[go: up one dir, main page]

CN111356209B - Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment - Google Patents

Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111356209B
CN111356209B CN202010095422.7A CN202010095422A CN111356209B CN 111356209 B CN111356209 B CN 111356209B CN 202010095422 A CN202010095422 A CN 202010095422A CN 111356209 B CN111356209 B CN 111356209B
Authority
CN
China
Prior art keywords
hotspot
frequency band
terminal
interface
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010095422.7A
Other languages
Chinese (zh)
Other versions
CN111356209A (en
Inventor
吴国钿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010095422.7A priority Critical patent/CN111356209B/en
Publication of CN111356209A publication Critical patent/CN111356209A/en
Application granted granted Critical
Publication of CN111356209B publication Critical patent/CN111356209B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/08Access point devices

Landscapes

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

Abstract

The embodiment of the application discloses a multi-frequency WiFi hotspot opening method, a multi-frequency WiFi hotspot opening device, a storage medium and electronic equipment, wherein the method comprises the following steps: the method includes the steps of receiving a hotspot opening instruction, obtaining a plurality of hotspot frequency bands supported by the terminal, creating hotspot configuration files corresponding to the hotspot frequency bands respectively, wherein the hotspot configuration files contain hotspot configuration information, configuring frequency band ports of the hotspot frequency bands based on the hotspot configuration information corresponding to the hotspot frequency bands respectively, and opening the frequency band ports of the hotspot frequency bands.

Description

多频WiFi热点开启方法、装置、存储介质及电子设备Method, device, storage medium and electronic device for opening a multi-frequency WiFi hotspot

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种多频WiFi热点开启方法、装置、存储介质及电子设备。The present application relates to the field of computer technology, and in particular, to a method, device, storage medium and electronic device for opening a multi-frequency WiFi hotspot.

背景技术Background technique

随着无线通信技术的发展以及终端的普及,极大便利了人们的日常生活。而在终端的网络功能中,其热点功能起着至关重要的作用,终端通过热点功能向其它电子设备(如手机、电脑等)共享网络。终端通过自身的网络(如第五代通信系统网络,即5G)实现与另一电子设备之间的热点网络共享。With the development of wireless communication technology and the popularization of terminals, people's daily life has been greatly facilitated. In the network function of the terminal, the hotspot function plays a crucial role, and the terminal shares the network with other electronic devices (such as mobile phones, computers, etc.) through the hotspot function. The terminal realizes the hotspot network sharing with another electronic device through its own network (such as the fifth generation communication system network, ie 5G).

目前,终端的网络共享模块通常可以同时支持2.4GHZ热点频段和5.0GHZ热点频段的热点,用户在开启热点功能时,会开启终端2.4GHZ热点频段与5.0GHZ热点频段中的一个频段(如2.4GHZ)进行热点网络共享。在热点网络共享的整个过程中,均以该频段共享热点网络,若通信对端的电子设备不支持该频段,就会连接不上终端的热点网络,从而影响终端热点资源的利用率。At present, the network sharing module of the terminal can usually support the hotspot of the 2.4GHZ hotspot frequency band and the 5.0GHZ hotspot frequency band at the same time. When the user turns on the hotspot function, the terminal will turn on one of the 2.4GHZ hotspot frequency band and the 5.0GHZ hotspot frequency band (such as 2.4GHZ). ) for hotspot tethering. In the whole process of hotspot network sharing, the hotspot network is shared in this frequency band. If the electronic device at the opposite end of the communication does not support this frequency band, it will not be able to connect to the hotspot network of the terminal, thus affecting the utilization of hotspot resources of the terminal.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种多频WiFi热点开启方法、装置、存储介质及电子设备,可以提高终端热点资源的利用率。所述技术方案如下:Embodiments of the present application provide a method, device, storage medium, and electronic device for opening a multi-frequency WiFi hotspot, which can improve the utilization rate of terminal hotspot resources. The technical solution is as follows:

第一方面,本申请实施例提供了一种多频WiFi热点开启方法,所述方法包括:In a first aspect, an embodiment of the present application provides a method for enabling a multi-frequency WiFi hotspot, and the method includes:

接收热点开启指令,获取所述终端支持的多个热点频段;receiving a hotspot opening instruction, and acquiring multiple hotspot frequency bands supported by the terminal;

创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息;creating hotspot configuration files corresponding to the multiple hotspot frequency bands respectively, where the hotspot configuration file includes hotspot configuration information;

基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口。The frequency band port of each hotspot frequency band is configured based on the hotspot configuration information corresponding to the plurality of hotspot frequency bands, and the frequency band port of each hotspot frequency band is enabled.

第二方面,本申请实施例提供了一种多频WiFi热点开启装置,所述装置包括:In a second aspect, an embodiment of the present application provides a device for enabling a multi-frequency WiFi hotspot, the device comprising:

热点频段获取模块,用于接收热点开启指令,获取所述终端支持的多个热点频段;a hotspot frequency band acquisition module, configured to receive a hotspot turn-on instruction and acquire multiple hotspot frequency bands supported by the terminal;

配置文件创建模块,用于创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息;a configuration file creation module, configured to create a hotspot configuration file corresponding to the plurality of hotspot frequency bands, the hotspot configuration file contains hotspot configuration information;

频段端口开启模块,用于基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口。The frequency band port opening module is configured to configure the frequency band port of each hot spot frequency band based on the hot spot configuration information corresponding to the multiple hot spot frequency bands, and open the frequency band port of each hot spot frequency band.

第三方面,本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行上述的方法步骤。In a third aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.

第四方面,本申请实施例提供一种电子设备,可包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行上述的方法步骤。In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the above method steps .

本申请一些实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided by some embodiments of the present application include at least:

在本申请一个或多个实施例中,终端接收热点开启指令,获取所述终端支持的多个热点频段,创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息,基于所述多个热点频段分别对应的热点配置信息配置并开启各热点频段的频段端口,开启所述各热点频段的频段端口。终端通过基于多个热点频段分别对应的配置信息开启各热点频段的频段端口,可以开启终端所支持的多个热点频段分别对应的热点,从而覆盖到电子设备支持的全部热点频段,避免了终端热点网络共享的整个过程中由于与电子设备热点频段不匹配导致电子设备无法连接热点网络的问题,提高了终端热点资源的利用率。In one or more embodiments of the present application, the terminal receives a hotspot opening instruction, acquires multiple hotspot frequency bands supported by the terminal, and creates a hotspot configuration file corresponding to the multiple hotspot frequency bands, where the hotspot configuration file includes the hotspot configuration information, configure and open the frequency band port of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, and open the frequency band port of each hotspot frequency band. By opening the frequency band ports of each hotspot frequency band based on the configuration information corresponding to the multiple hotspot frequency bands, the terminal can open the hotspots corresponding to the multiple hotspot frequency bands supported by the terminal, thereby covering all the hotspot frequency bands supported by the electronic device and avoiding the terminal hotspot. In the whole process of network sharing, the electronic device cannot connect to the hotspot network due to the mismatch with the hotspot frequency band of the electronic device, which improves the utilization rate of the terminal hotspot resources.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本申请实施例提供的一种多频WiFi热点开启方法的流程示意图;1 is a schematic flowchart of a method for enabling a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图2是本申请实施例提供的一种多频WiFi热点开启方法涉及的终端的个人热点界面示意图;2 is a schematic diagram of a personal hotspot interface of a terminal involved in a method for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图3是本申请实施例提供的一种多频WiFi热点开启方法涉及的终端的菜单界面显示示意图;3 is a schematic diagram of a menu interface display of a terminal involved in a method for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图4是本申请实施例提供的一种多频WiFi热点开启方法涉及的个人热点设置界面的界面示意图;4 is a schematic interface diagram of a personal hotspot setting interface involved in a method for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图5是本申请实施例提供的一种多频WiFi热点开启方法涉及的热点频段设置的界面示意图;5 is a schematic interface diagram of hotspot frequency band setting involved in a method for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图6是本申请实施例提供的另一种多频WiFi热点开启方法的流程示意图;6 is a schematic flowchart of another method for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图7是本申请实施例提供的一种多频WiFi热点开启方法涉及的智能手机个人热点设置界面的示意图;7 is a schematic diagram of a smartphone personal hotspot setting interface involved in a method for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图8是本申请实施例提供的一种多频WiFi热点开启方法涉及的热点频段界面的示意图;8 is a schematic diagram of a hotspot frequency band interface involved in a method for enabling a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图9是本申请实施例提供的一种多频WiFi热点开启的场景架构示意图;FIG. 9 is a schematic diagram of a scenario architecture in which a multi-frequency WiFi hotspot is turned on according to an embodiment of the present application;

图10是本申请实施例提供的一种多频WiFi热点开启装置的结构示意图;10 is a schematic structural diagram of a device for enabling a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图11是本申请实施例提供的一种频段端口开启模块的结构示意图;11 is a schematic structural diagram of a frequency band port opening module provided by an embodiment of the present application;

图12是本申请实施例提供的另一种多频WiFi热点开启装置的结构示意图;FIG. 12 is a schematic structural diagram of another device for opening a multi-frequency WiFi hotspot provided by an embodiment of the present application;

图13是本申请实施例提供的一种电子设备的结构示意图。FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本申请的描述中,需要说明的是,除非另有明确的规定和限定,“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In the description of the present application, it should be understood that the terms "first", "second" and the like are used for descriptive purposes only, and should not be construed as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise expressly specified and defined, "including" and "having" and any modifications thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood in specific situations. Also, in the description of the present application, unless otherwise specified, "a plurality" means two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.

下面结合具体的实施例对本申请进行详细说明。The present application will be described in detail below with reference to specific embodiments.

在一个实施例中,如图1所示,特提出了一种多频WiFi热点开启方法,该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的多频WiFi热点开启装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。In one embodiment, as shown in FIG. 1 , a method for enabling a multi-frequency WiFi hotspot is proposed. The method can be implemented by relying on a computer program and can be run on a device for enabling a multi-frequency WiFi hotspot based on the von Neumann system. . The computer program can be integrated into an application or run as a stand-alone utility application.

具体的,该多频WiFi热点开启方法包括:Specifically, the method for enabling a multi-frequency WiFi hotspot includes:

步骤101:接收热点开启指令,获取所述终端支持的多个热点频段。Step 101: Receive a hotspot opening instruction, and acquire multiple hotspot frequency bands supported by the terminal.

所述指令是指挥终端工作的指示和命令,可以理解为指定执行某种运算或功能实现的某种控制的代码。所述热点开启指令在本申请实施例中可以理解为指挥终端执行开启多频WiFi热点功能的代码,终端可以通过执行所述代码,将多频WiFi热点开启。The instructions are instructions and commands to instruct the terminal to work, and can be understood as a code specifying a certain control to perform a certain operation or function realization. In the embodiment of the present application, the hotspot activation instruction may be understood as instructing the terminal to execute the code for enabling the function of the multi-frequency WiFi hotspot, and the terminal may activate the multi-frequency WiFi hotspot by executing the code.

在本申请实施例中,终端作为热点接入设备,可以提供多个WiFi热点连接的设备,终端在开启多频WiFi热点功能之后作为多频WiFi路由器使用,处于终端多频WiFi热点的信号覆盖范围之内的电子设备(如手机、平板)可以扫描到终端的热点信号。以终端为手机、支持的多频WiFi热点为一种双频WiFi热点为例,终端在开启多频WiFi热点之后,通过配置,手机可以同时工作在2.4GHZ和5GHZ的双频WiFi。In this embodiment of the present application, the terminal, as a hotspot access device, can provide devices connected to multiple WiFi hotspots. After the multi-frequency WiFi hotspot function is enabled, the terminal acts as a multi-frequency WiFi router and is within the signal coverage of the terminal's multi-frequency WiFi hotspot. The electronic devices (such as mobile phones and tablets) inside can scan the hotspot signal of the terminal. Take the terminal as a mobile phone and the supported multi-band WiFi hotspot as an example of a dual-band WiFi hotspot. After the multi-band WiFi hotspot is enabled on the terminal, through configuration, the mobile phone can work at 2.4GHZ and 5GHZ dual-band WiFi at the same time.

其中,所述“2.4GHZ”、“5GHZ”即为终端所支持的热点频段,通常终端可支持包含802.11a/b/g/n完整的无线网络,其属于第五代Wi-Fi传输技术。其中,上述提及的2.4GHz频段和5GHz频段各有优缺点,2.4GHz频段覆盖距离远,穿墙性好,但是抗干扰差,速率低些,5GHz频段抗干扰性强,速率高,但是覆盖距离短,穿墙性差。The "2.4GHZ" and "5GHZ" are the hotspot frequency bands supported by the terminal. Usually, the terminal can support a complete wireless network including 802.11a/b/g/n, which belongs to the fifth-generation Wi-Fi transmission technology. Among them, the 2.4GHz frequency band and the 5GHz frequency band mentioned above have their own advantages and disadvantages. The 2.4GHz frequency band has a long coverage distance and good wall penetration, but has poor anti-interference and lower speed. The 5GHz frequency band has strong anti-interference and high speed, but the coverage The distance is short and the wall penetration is poor.

其中,终端接收用户所输入的热点开启指令之后,通过执行本申请实施例提及的所述多频WiFi热点开启方法,从而开启多个热点频段分别对应的热点,如开启A热点、B热点、C热点,其中,A热点、B热点、C热点一般是3个工作在不同热点频段的WiFi热点,A热点可以是现在应用广泛使用的2.4GHZ热点频段、B热点可以是5GHZ频段、C热点可以是除2.4GHZ以及5GHZ以外的其他热点频段的热点,需要说明的是,本申请实施涉及到多个热点频段具体不作具体限定,在实际应用中所述热点频段不限于上述提及的5GHZ和2.4GHZ的热点频段。Wherein, after receiving the hotspot activation instruction input by the user, the terminal executes the multi-frequency WiFi hotspot activation method mentioned in the embodiment of the present application, so as to activate the hotspots corresponding to the multiple hotspot frequency bands respectively, such as turning on the A hotspot, the B hotspot, C hotspot, among them, A hotspot, B hotspot and C hotspot are generally 3 WiFi hotspots working in different hotspot frequency bands, A hotspot can be the 2.4GHZ hotspot frequency band widely used now, B hotspot can be 5GHZ frequency band, C hotspot can be It is a hotspot of other hotspot frequency bands except 2.4GHZ and 5GHZ. It should be noted that the implementation of this application involves multiple hotspot frequency bands and is not specifically limited. In practical applications, the hotspot frequency bands are not limited to the 5GHZ and 2.4 mentioned above. GHZ hotspot band.

在一种具体的实施场景中,终端接收到的热点开启指令可以是根据用户输入的选择操作接收到的。所述终端可以包含触控屏,触控屏具有感应用户触摸操作的功能。触控屏的结构至少包括4个部分:屏幕玻璃层,传感器薄膜,显示面板层,控制器板,其中传感器薄膜有触摸感应器层,含有多种感应器,例如压力传感器、位置感应器等等,当用户在终端的当前显示界面上触控所述“热点”的图标时,终端的触控屏能够通过其中的传感器获取其触控的位置参数。然后对所述位置参数进行处理,识别到所述位置参数对应的显示界面上的“热点”的图标被触控,终端即可识别并接收到用户所输入的热点开启指令。In a specific implementation scenario, the hotspot activation instruction received by the terminal may be received according to a selection operation input by the user. The terminal may include a touch screen, and the touch screen has a function of sensing a user's touch operation. The structure of the touch screen includes at least 4 parts: the screen glass layer, the sensor film, the display panel layer, and the controller board. The sensor film has a touch sensor layer and contains a variety of sensors, such as pressure sensors, position sensors, etc. , when the user touches the icon of the "hot spot" on the current display interface of the terminal, the touch screen of the terminal can obtain the position parameter of the touch through the sensor therein. Then, the location parameter is processed, and it is recognized that the "hotspot" icon on the display interface corresponding to the location parameter is touched, and the terminal can recognize and receive the hotspot activation instruction input by the user.

在一种具体的实施场景中,如图2所示,图2是终端的个人热点界面的示意图,图2所示的终端的显示界面中显示有个人热点开启图标、热点提示信息(开启后,将共享您的互联网连接...)、个人热点设置选项、连接管理选项等。In a specific implementation scenario, as shown in FIG. 2, FIG. 2 is a schematic diagram of the personal hotspot interface of the terminal, and the display interface of the terminal shown in FIG. will share your internet connection...), personal hotspot settings options, connection management options, and more.

当用户可以在终端的设置界面中选择“个人热点”选项,然后在如图2所示的终端的“个人热点界面”中选中终端的触控屏上的“个人热点开启图标”;或,用户可以在终端的桌面下拉菜单界面,一种终端的菜单界面显示示意图如图3所示,用户可以通过手指触控的方式选中并打开“个人热点”图标,具体通过触控触控屏上的屏幕玻璃层,终端的触控屏通过传感器薄膜中的位置传感器获取其触控“个人热点开启图标”所对应的位置参数,然后对所述位置参数进行处理,识别到用户输入的开启个人热点的指令,此时,通过读取并执行开启“个人热点开启图标”的控制逻辑对应的机器可执行指令,执行下一步“获取所述终端支持的多个热点频段”的步骤。When the user can select the "Personal Hotspot" option in the setting interface of the terminal, and then select the "Personal Hotspot Enable Icon" on the touch screen of the terminal in the "Personal Hotspot Interface" of the terminal as shown in Figure 2; or, the user The menu interface can be pulled down on the desktop of the terminal. A schematic diagram of the menu interface of the terminal is shown in Figure 3. The user can select and open the "Personal Hotspot" icon by touching the finger. Specifically, by touching the screen on the touch screen glass layer, the touch screen of the terminal obtains the position parameter corresponding to the touch "personal hotspot open icon" through the position sensor in the sensor film, and then processes the position parameter to recognize the command input by the user to open the personal hotspot , at this time, by reading and executing the machine-executable instruction corresponding to the control logic for enabling the "personal hotspot open icon", the next step of "obtaining multiple hotspot frequency bands supported by the terminal" is performed.

可选的,所述用户输入的热点开启指令可以是通过外部设备完成的,例如,用户可以通过连接终端的激光笔/鼠标等外部设备选中当前显示界面的个人热点开启图标输入的热点开启指令;可以是用户通过语音输入开启个人热点指令(例如语音输入开启个人热点等);可以是用户通过终端所包含的摄像头采集用户的手势控制指令完成开启特定的操作-“开启个人热点操作”,还可以是通过按压终端的物理按键(开关机键、音量键等)输入的针对所述终端的个人热点开启指令等。Optionally, the hotspot activation instruction input by the user may be completed by an external device, for example, the user may select the hotspot activation instruction input by the personal hotspot activation icon of the current display interface through an external device such as a laser pointer/mouse connected to the terminal; It may be that the user activates the personal hotspot instruction through voice input (for example, the voice input activates the personal hotspot, etc.); it may be that the user collects the user's gesture control instruction through the camera included in the terminal to complete a specific operation - "opening the personal hotspot operation", or It is a personal hotspot turn-on instruction for the terminal, etc., which is input by pressing the physical keys (power on/off key, volume key, etc.) of the terminal.

终端在接收到用户所输入的热点开启指令,对所述热点开启指令作出响应。通常终端所支持的热点频段信息可以存储在本地存储空间中,终端可以在本地存储空间中获取所支持的热点频段信息,基于所述热点频段信息即可获取到所支持的各热点频段。The terminal responds to the hotspot opening instruction after receiving the hotspot opening instruction input by the user. Usually, the information of the hotspot frequency bands supported by the terminal can be stored in the local storage space, and the terminal can obtain the information of the supported hotspot frequency bands in the local storage space, and each supported hotspot frequency band can be obtained based on the hotspot frequency band information.

步骤102:创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息。Step 102: Create hotspot configuration files corresponding to the multiple hotspot frequency bands respectively, where the hotspot configuration file includes hotspot configuration information.

所述热点配置文件包含热点名称或其他标识(网络ID)、用于接入热点网络的无线密钥或密码、以及加密类型等热点配置信息,可以理解的是,终端在创建热点配置文件,以便终端底层与热点功能相关的硬件基于热点配置文件,获取配置文件中的配置信息进行热点配置,如基于配置信息对端口进行配置等。The hotspot configuration file includes the hotspot name or other identifiers (network ID), the wireless key or password used to access the hotspot network, and the hotspot configuration information such as the encryption type. It can be understood that the terminal is creating the hotspot configuration file so as to The hardware related to the hotspot function at the bottom layer of the terminal is based on the hotspot configuration file, and the configuration information in the configuration file is obtained to configure the hotspot, such as configuring ports based on the configuration information.

其中,所述热点配置文件可以基于终端操作系统的类型确定,如当终端的操作系统是苹果公司开发的IOS系统(包括基于IOS系统深度开发的系统)时,创建的配置文件可以是mobileconfig文件;当终端的操作系统是安卓(Android)系统(包括基于Android系统深度开发的系统)时,创建的配置文件可以是wificonfig文件,还可以是其他操作系统创建的XML文件,等等。Wherein, the hotspot configuration file can be determined based on the type of the terminal operating system. For example, when the operating system of the terminal is an IOS system developed by Apple (including a system based on the deep development of the IOS system), the created configuration file can be a mobileconfig file; When the operating system of the terminal is an Android system (including a system deeply developed based on the Android system), the created configuration file may be a wificonfig file, or an XML file created by other operating systems, and so on.

在一种具体的实施场景中,用户可以在开启终端的热点功能时,在如图2所示的终端的显示界面中,选中“个人热点设置”选项向终端输入个人热点设置指令,此时,终端对用户所输入的个人热点设置指令作出响应,在当前显示界面上显示“个人热点设置”界面,如图4所示,图4是一种个人热点设置界面的界面示意图,在如图4所示的个人热点设置界面,用户可以分别多个热点频段中的各热点进行设置,以多个热点频段为2.4GHZ频段和5.0GHZ频段为例。如用户可以依次对各热点频段的热点的配置信息进行设置,如先对2.4GHZ频段的热点的配置信息进行设置,再对5.0GHZ频段的热点的配置信息进行设置。所述配置信息可以是热点名称、热点加密方式、密码等配置项。In a specific implementation scenario, when the user enables the hotspot function of the terminal, on the display interface of the terminal as shown in FIG. 2 , the user can select the "personal hotspot setting" option to input the personal hotspot setting instruction to the terminal. At this time, The terminal responds to the personal hotspot setting instruction input by the user, and displays a "personal hotspot setting" interface on the current display interface, as shown in Figure 4, which is a schematic interface diagram of a personal hotspot setting interface, as shown in Figure 4. On the personal hotspot setting interface shown, the user can set each hotspot in multiple hotspot frequency bands separately, taking the multiple hotspot frequency bands as 2.4GHZ frequency band and 5.0GHZ frequency band as an example. For example, the user can set the configuration information of the hotspots in each hotspot frequency band in turn, for example, set the configuration information of the hotspots in the 2.4GHZ frequency band first, and then set the configuration information of the hotspots in the 5.0GHZ frequency band. The configuration information may be configuration items such as a hotspot name, a hotspot encryption method, and a password.

具体可以是在如图4所示的界面中点击“AP频段”选项,如图5所示,图5是在一种选择AP频段进行热点配置的界面示意图,用户在点击“AP频段”选项,可以选中2.4GHZ频段,然后相应对2.4GHZ频段的热点的配置信息进行设置,如对2.4GHZ频段的热点名称、热点加密方式、2.4GHZ频段的密码等配置项进行设置;然后对5.0GHZ频段的热点的配置信息进行设置,,用户可以再点击“AP频段”选项,可以选中5.0GHZ频段,然后相应对5.0GHZ频段的热点的配置信息进行设置,如对5.0GHZ频段的热点名称、热点加密方式、5.0GHZ频段的密码等配置项进行设置;设置完成之后,可以选中如图4所示的“保存”选项输入保存指令,终端对用户输入的所述保存指令进行响应,创建所述多个热点频段分别对应的热点配置文件,如创建2.4GHZ频段和5.0GHZ频段分别对应的2.4GHZ热点配置文件以及5.0GHZ热点配置文件。Specifically, click the "AP frequency band" option in the interface shown in Figure 4, as shown in Figure 5, Figure 5 is a schematic diagram of the interface for selecting the AP frequency band for hotspot configuration, the user clicks the "AP frequency band" option, You can select the 2.4GHZ frequency band, and then set the configuration information of the hotspot in the 2.4GHZ frequency band accordingly, such as the hotspot name in the 2.4GHZ frequency band, the hotspot encryption method, and the password in the 2.4GHZ frequency band. To set the configuration information of the hotspot, the user can click the "AP frequency band" option again to select the 5.0GHZ frequency band, and then set the configuration information of the hotspot in the 5.0GHZ frequency band accordingly, such as the hotspot name and hotspot encryption method in the 5.0GHZ frequency band. , 5.0GHZ frequency band password and other configuration items to set; after the setting is completed, you can select the "Save" option as shown in Figure 4 to input the save command, the terminal responds to the save command input by the user, and creates the multiple hotspots Hotspot profiles corresponding to the frequency bands, such as creating a 2.4GHZ hotspot profile and a 5.0GHZ hotspot profile corresponding to the 2.4GHZ frequency band and the 5.0GHZ frequency band respectively.

在一种具体的实施场景中,终端在接收用户所输入热点开启指令之后,可以直接基于默认的无线接入配置文档来创建与无线网络相关联的配置文件,所述无线接入配置文档可以理解为终端默认的多个热点频段中各热点频段所对应的热点信息,例如默认多个热点频段中的2.4GHZ频段的热点信息包括但不限于热点名称、热点加密方式、密码等配置项。从而无需用户手动对多个热点频段所对应的热点信息进行设置,可以方便快捷的开启创建多个热点频段分别对应的热点配置文件。In a specific implementation scenario, after receiving the hotspot activation instruction input by the user, the terminal may directly create a configuration file associated with the wireless network based on the default wireless access configuration document, which can be understood The hotspot information corresponding to each hotspot frequency band among the default hotspot frequency bands of the terminal, for example, the hotspot information of the 2.4GHZ frequency band among the default hotspot frequency bands includes but not limited to hotspot name, hotspot encryption method, password and other configuration items. Therefore, the user does not need to manually set the hotspot information corresponding to the multiple hotspot frequency bands, and can conveniently and quickly open and create hotspot configuration files corresponding to the multiple hotspot frequency bands.

在一种具体的实施场景中,终端在接收用户所输入热点开启指令之后,可以基于历史热点开启记录创建多个热点频段分别对应的热点配置文件。所述历史热点开启记录保存有用户历史时间点开启多个热点频段的配置信息,如,终端可以以用户上一次开启多个热点频段确定的配置信息作为参考,创建本次热点开启时所述多个热点频段分别对应的热点配置文件。In a specific implementation scenario, after receiving the hotspot activation instruction input by the user, the terminal may create hotspot configuration files corresponding to multiple hotspot frequency bands based on the historical hotspot activation records. The historical hotspot activation record saves the configuration information of the user's activation of multiple hotspot frequency bands at historical time points. For example, the terminal may use the configuration information determined by the user to open multiple hotspot frequency bands last time as a reference to create the hotspot activation this time. Hotspot profiles corresponding to each hotspot frequency band respectively.

在一种具体的实施方式中,终端还可以使用连接到期时间来创建多个热点频段的配置文件,以便限制接入热点的电子设备可以连接到无线网络的时间量;终端还可以使用固定电子设备的标识来创建多个热点频段的配置文件,以便限制与所述标识不一致的其他电子设备可以连接到无线网络;终端还可以使用固定电子设备的IP地址来创建多个热点频段的配置文件,以便限制与所述IP地址不一致的其他电子设备可以连接到无线网络,等等。In a specific implementation, the terminal may also use the connection expiration time to create profiles for multiple hotspot frequency bands in order to limit the amount of time that electronic devices accessing the hotspot can connect to the wireless network; the terminal may also use fixed electronic The identification of the device to create a configuration file of multiple hotspot frequency bands, so as to limit other electronic devices inconsistent with the identification can connect to the wireless network; the terminal can also use the IP address of the fixed electronic device to create a configuration file of multiple hotspot frequency bands, in order to restrict other electronic devices that do not agree with the IP address from being able to connect to the wireless network, and so on.

在一种具体的实施方式中,终端创建所述多个热点频段分别对应的热点配置文件可以是基于与终端建立通信连接的电子设备发送的参考配置信息创建的,所述参考配置信息可以作为终端创建多个热点频段分别对应的热点配置文件的参考,所述参考配置信息包含多个热点频段分别对应的诸如热点名称、热点加密方式、密码等配置项。In a specific implementation manner, the hotspot configuration files corresponding to the multiple hotspot frequency bands created by the terminal may be created based on reference configuration information sent by an electronic device that establishes a communication connection with the terminal, and the reference configuration information may be used as the terminal Create a reference to the hotspot configuration files corresponding to the multiple hotspot frequency bands, and the reference configuration information includes configuration items such as the hotspot name, the hotspot encryption method, and the password corresponding to the multiple hotspot frequency bands.

步骤103:基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口。Step 103: Configure the frequency band ports of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, and enable the frequency band ports of each hotspot frequency band.

所述频段端口与热点频段对应,即一个频段端口对应一个热点频段,所述频段端口用在完成频段端口的配置之后开启热点网络,以使热点信号覆盖范围之内的电子设备能够连接上终端的热点网络,实现终端热点频段对应热点网络的网络共享。The frequency band port corresponds to the hotspot frequency band, that is, a frequency band port corresponds to a hotspot frequency band, and the frequency band port is used to open the hotspot network after completing the configuration of the frequency band port, so that the electronic devices within the coverage of the hotspot signal can be connected to the terminal. Hotspot network, realize the network sharing of the terminal hotspot frequency band corresponding to the hotspot network.

具体的,终端可以基于多个热点频段分别对应的热点配置信息配置各热点频段的频段端口。以下为了叙述的方便以其中5.0GHZ热点频段对应的热点配置信息配置该热点频段的频段端口为例进行说明,其中:Specifically, the terminal may configure the frequency band port of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands respectively. For the convenience of description, the following is an example of configuring the frequency band port of the hotspot frequency band with the hotspot configuration information corresponding to the 5.0GHZ hotspot frequency band, wherein:

终端获取到所述5.0GHZ热点配置信息之后,所述热点配置信息通常包含多项配置项的配置信息,具体终端根据基于该热点配置信息对热点频段的配置项进行参数配置,可以是将频段端口的热点名称设置为热点配置信息中的热点名称信息;将频段端口的安全项设置为热点配置信息中对应的加密方式(如WPA加密方式、WPA2加密方式等);将频段端口的网络设备节点设置为热点配置信息中对应的设备节点;将频段端口的工作信道配置项基于热点配置信息中对应的支持信道进行信道驻留;将频段端口的工作无线项设置为热点配置信息中的频段天线(如支持5.0GHZ频段的天线);将频段端口的最大热点连接项设置为热点配置信息中的最大热点连接数;将频段端口的无线协议类型配置项设置为热点配置信息中的目标热点协议;将频段端口的热点服务项设置为热点配置信息中的热点服务(如IPv6、IPv4等);将频段端口的网络地址项设置为热点配置信息中的网络地址段;将频段端口的IP设置项设置为热点配置信息中的IP项(如DHCP项、静态项等),等等。After the terminal obtains the 5.0GHZ hotspot configuration information, the hotspot configuration information usually includes configuration information of multiple configuration items, and the specific terminal configures the configuration items of the hotspot frequency band based on the hotspot configuration information. Set the hotspot name of the frequency band port to the hotspot name information in the hotspot configuration information; set the security item of the frequency band port to the corresponding encryption method (such as WPA encryption method, WPA2 encryption method, etc.) in the hotspot configuration information; set the network device node of the frequency band port It is the corresponding device node in the hotspot configuration information; the working channel configuration item of the frequency band port is based on the corresponding support channel in the hotspot configuration information to perform channel camping; the working wireless item of the frequency band port is set to the frequency band antenna in the hotspot configuration information (such as Antennas supporting 5.0GHZ frequency band); set the maximum hotspot connection item of the frequency band port to the maximum number of hotspot connections in the hotspot configuration information; set the wireless protocol type configuration item of the frequency band port to the target hotspot protocol in the hotspot configuration information; set the frequency band Set the hotspot service item of the port to the hotspot service (such as IPv6, IPv4, etc.) in the hotspot configuration information; set the network address item of the frequency band port to the network address segment in the hotspot configuration information; set the IP setting item of the frequency band port to the hotspot IP items in configuration information (such as DHCP items, static items, etc.), etc.

其中,终端基于热点配置信息对热点频段的频段端口的各配置项进行配置时,各配置项的配置可以是终端为各配置型创建配置进程,并调用终端资源池为各配置进程分配计算资源,各配置进程之间可以是同步进行,也可以是异步进行,在本申请实施例中不作具体限定。Wherein, when the terminal configures each configuration item of the frequency band port of the hotspot frequency band based on the hotspot configuration information, the configuration of each configuration item may be that the terminal creates a configuration process for each configuration type, and calls the terminal resource pool to allocate computing resources for each configuration process. Each configuration process may be performed synchronously or asynchronously, which is not specifically limited in this embodiment of the present application.

具体的,终端基于所述多个热点频段分别对应的热点配置信息配置各热点频段的频段端口配置完成之后,开启所述各热点频段的频段端口。Specifically, after configuring the frequency band ports of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, the terminal opens the frequency band port of each hotspot frequency band.

在一种具体的实施方式中,终端可以通过ConnectivityManager的startTethering方法来加载所述各热点频段的频段端口,再以AP模式通过NetworkManagementService在频段端口下加载固件;同时在硬件抽象层(HAL层)通过抽象函数对硬件(如网卡芯片)进行抽象化。然后通过调用setWifiApState()函数向终端上层(应用层)发送广播消息,告知当前各热点频段的热点打开的过程信息,终端的应用层基于所述过程信息可以通过netlink socket监听内核热插拔事件)类注册了一个Observer来监听Interface中的add、remove、change的参数变化,接下来进行启动各热点频段的热点,具体可以是调用mSoftApManager.start(config)函数为热点频段的热点设置该热点频段对应的信道以及国家码,以完成信道以及国家码的实时更新,然后进入Netd流程启动SoftAp(热点),可以是在startAccessPoint中执行executeOrLogWithMessage方法,最后根据startSoftap()函数启动Hostapd进程,直至各热点频段的热点开启完成。In a specific implementation, the terminal can load the frequency band ports of the hotspot frequency bands through the startTethering method of ConnectivityManager, and then load the firmware under the frequency band ports through NetworkManagementService in AP mode; The abstract function abstracts the hardware (such as the network card chip). Then, by calling the setWifiApState() function, a broadcast message is sent to the upper layer (application layer) of the terminal to inform the current hotspot opening process information of each hotspot frequency band. Based on the process information, the application layer of the terminal can monitor the kernel hot plug event through the netlink socket) The class registers an Observer to monitor the parameter changes of add, remove, and change in the Interface, and then starts the hotspot of each hotspot frequency band. Specifically, the mSoftApManager.start(config) function can be called to set the corresponding hotspot frequency band for the hotspot of the hotspot frequency band. to complete the real-time update of the channel and country code, and then enter the Netd process to start SoftAp (hot spot), which can be executed by executing the executeOrLogWithMessage method in startAccessPoint, and finally start the Hostapd process according to the startSoftap() function. The hotspot is turned on.

在本申请实施例中,终端通过基于多个热点频段分别对应的配置信息开启各热点频段的频段端口,可以开启终端所支持的多个热点频段分别对应的热点,从而覆盖到电子设备支持的全部热点频段,避免了终端WiFi热点网络共享的整个过程中由于与电子设备热点频段不匹配导致电子设备无法连接热点网络的问题,提高了终端热点资源的利用率。In the embodiment of the present application, the terminal can open the frequency band ports of each hotspot frequency band based on the configuration information corresponding to the multiple hotspot frequency bands, so as to open the hotspots corresponding to the multiple hotspot frequency bands supported by the terminal, so as to cover all the hotspot frequency bands supported by the electronic device. The hotspot frequency band avoids the problem that the electronic device cannot connect to the hotspot network due to the mismatch with the hotspot frequency band of the electronic device during the whole process of terminal WiFi hotspot network sharing, and improves the utilization rate of the terminal hotspot resource.

请参见图6,图6是本申请提出的一种多频WiFi热点开启方法的另一种实施例的流程示意图。在本申请实施例中,所述多频WiFi热点开启方法应用于终端,终端通过执行所述多频WiFi热点开启方法可以开启两个频段WiFi热点或两个以上频段的WiFi热点,其多频WiFi热点的数量通常根据终端的实际应用场景确定,此处不作具体限定。Please refer to FIG. 6 , which is a schematic flowchart of another embodiment of a method for enabling a multi-frequency WiFi hotspot proposed by the present application. In the embodiment of the present application, the method for enabling a multi-frequency WiFi hotspot is applied to a terminal, and the terminal can open a WiFi hotspot of two frequency bands or a WiFi hotspot of more than two frequency bands by executing the method for enabling a multi-frequency WiFi hotspot. The number of hotspots is usually determined according to the actual application scenario of the terminal, and is not specifically limited here.

以下为了叙述的方便多以终端通过执行所述多频WiFi热点开启方法开启两个频段WiFi热点为例进行描述。For the convenience of description, the following description will be made by taking the example that the terminal opens two frequency band WiFi hotspots by executing the multi-frequency WiFi hotspot opening method.

具体的:specific:

步骤201:接收热点开启指令,获取所述终端支持的多个热点频段。Step 201: Receive a hotspot opening instruction, and acquire multiple hotspot frequency bands supported by the terminal.

具体可参见步骤101,此处不再赘述。For details, refer to step 101, which will not be repeated here.

步骤202:接收针对各所述热点频段所输入的热点配置信息,并分别创建存储所述热点配置信息的热点配置文件。Step 202: Receive hotspot configuration information input for each of the hotspot frequency bands, and respectively create a hotspot configuration file storing the hotspot configuration information.

具体的,终端接收到用户针对终端的热点开启指令,获取所述终端支持的多个热点频段之后,用户可以对终端的各所述热点频段分别进行设置,如用户可以对热点频段1、热点频段2、热点频段3...热点频段n(n正整数)分别进行设置,终端可以接收用户针对各所述热点频段所输入的热点配置信息,所述热点配置信息可以是热点频段的热点名称、热点密码、热点加密方式、最大热点连接数等信息,并分别创建存储所述热点配置信息的热点配置文件。如:终端可以接收用户针对各所述热点频段所输入的热点配置信息:热点频段1对应的热点配置信息1、热点频段2对应的热点配置信息2、热点频段3对应的热点配置信息3...热点频段n对应的热点配置信息n。则终端可以分别创建存储热点配置信息1的热点配置文件1、...存储热点配置信息n的热点配置文件n。Specifically, after the terminal receives the user's hotspot activation instruction for the terminal and obtains multiple hotspot frequency bands supported by the terminal, the user can set each of the hotspot frequency bands of the terminal respectively. 2. Hotspot frequency band 3... Hotspot frequency band n (n positive integer) are respectively set, the terminal can receive the hotspot configuration information input by the user for each of the hotspot frequency bands, and the hotspot configuration information can be the hotspot name of the hotspot frequency band, Hotspot password, hotspot encryption method, maximum number of hotspot connections and other information, and respectively create a hotspot configuration file storing the hotspot configuration information. For example, the terminal can receive the hotspot configuration information input by the user for each of the hotspot frequency bands: hotspot configuration information 1 corresponding to hotspot frequency band 1, hotspot configuration information 2 corresponding to hotspot frequency band 2, and hotspot configuration information 3 corresponding to hotspot frequency band 3.. . Hotspot configuration information n corresponding to hotspot frequency band n. Then, the terminal may create a hotspot configuration file 1 that stores the hotspot configuration information 1, . . . a hotspot configuration file n that stores the hotspot configuration information n.

以下以所述多个热点频段包括第一热点频段以及第二热点频段进行详细释义:The following describes in detail that the multiple hotspot frequency bands include a first hotspot frequency band and a second hotspot frequency band:

终端接收用户针对所述第一热点频段所输入的第一配置信息,并创建存储所述第一配置信息的第一配置文件,以及接收用户针对所述第二热点频段所输入的第二配置信息,并创建存储所述第二配置信息的第二配置文件。The terminal receives the first configuration information input by the user for the first hotspot frequency band, creates a first configuration file that stores the first configuration information, and receives the second configuration information inputted by the user for the second hotspot frequency band , and create a second configuration file storing the second configuration information.

所述第一热点频段可以是2.4GHz频段和5GHz频段中的其一,所述第二热点频段可以是2.4GHz频段和5GHz频段中的其一,所述第一热点频段与所述第二热点频段不同。在本申请实施例,对第一热点频段以及第二热点频段不作具体限定,如,第一热点频段可以是2.4GHz频段,也可以是5GHz频段。The first hotspot frequency band may be one of the 2.4GHz frequency band and the 5GHz frequency band, the second hotspot frequency band may be one of the 2.4GHz frequency band and the 5GHz frequency band, and the first hotspot frequency band and the second hotspot frequency band The frequency bands are different. In this embodiment of the present application, the first hotspot frequency band and the second hotspot frequency band are not specifically limited. For example, the first hotspot frequency band may be a 2.4 GHz frequency band or a 5 GHz frequency band.

所述第一配置信息是指所述第一热点频段的配置信息,所述第一配置信息可以是包括第一热点频段的热点名称或其他标识(网络ID)、用于接入热点网络的无线密钥或密码、以及加密类型等信息。所述第一配置文件可以理解为用于存储第一配置信息的文件,在本申请实施例中,通过创建第一配置文件,以便终端的底层固件(如网卡芯片)读取所包含的第一配置信息以配置所述第一热点频段对应的频段端口(第一软接口以及第一网卡接口)。The first configuration information refers to the configuration information of the first hotspot frequency band, and the first configuration information may include the hotspot name or other identifier (network ID) of the first hotspot frequency band, the wireless network used for accessing the hotspot network. Information such as key or password, and encryption type. The first configuration file can be understood as a file used to store the first configuration information. In this embodiment of the present application, the first configuration file is created so that the underlying firmware of the terminal (such as a network card chip) reads the included first configuration file. The configuration information is used to configure a frequency band port (a first soft interface and a first network card interface) corresponding to the first hotspot frequency band.

所述第二配置信息是指所述第二热点频段的配置信息,所述第二配置信息可以是包括第二热点频段的热点名称或其他标识(网络ID)、用于接入热点网络的无线密钥或密码、以及加密类型等信息。在本申请实施例中,通过创建第二配置文件,以便终端的底层固件(如网卡芯片)读取所包含的第二配置信息以配置所述第二热点频段对应的频段端口(第二软接口以及第二网卡接口)。The second configuration information refers to the configuration information of the second hotspot frequency band, and the second configuration information may include the hotspot name or other identifier (network ID) of the second hotspot frequency band, the wireless network used for accessing the hotspot network. Information such as key or password, and encryption type. In this embodiment of the present application, by creating a second configuration file, the underlying firmware of the terminal (such as a network card chip) reads the included second configuration information to configure the frequency band port (second soft interface) corresponding to the second hotspot frequency band and the second NIC interface).

具体的,终端接收针对终端的热点开启指令,获取所述终端支持的多个热点频段之后,用户可以对终端的第一热点频段以及第二热点频段分别进行设置,终端可以接收用户针对所述第一热点频段所输入的第一配置信息,所述第一配置信息可以是第一热点频段的热点名称、热点密码、热点加密方式、最大热点连接数等信息,并创建存储所述第一配置信息的第一配置文件。同上终端可以接收用户针对所述第二热点频段所输入的第二配置信息,并创建存储所述第二配置信息的第二配置文件。通过创建第一配置文件以及第二配置文件,以便终端的底层固件(如网卡芯片)读取所包含的第一配置信息以配置所述第一热点频段对应的频段端口(第二软接口以及第二网卡接口)以及读取所包含的第二配置信息以配置所述第二热点频段对应的频段端口(第二软接口以及第二网卡接口)。Specifically, after the terminal receives a hotspot activation instruction for the terminal, and after acquiring multiple hotspot frequency bands supported by the terminal, the user can set the first hotspot frequency band and the second hotspot frequency band of the terminal respectively, and the terminal can receive the user's request for the first hotspot frequency band and the second hotspot frequency band respectively. The first configuration information entered in a hotspot frequency band, the first configuration information may be the hotspot name, hotspot password, hotspot encryption method, maximum number of hotspot connections and other information of the first hotspot frequency band, and the first configuration information is created and stored the first configuration file. The terminal as above may receive the second configuration information input by the user for the second hotspot frequency band, and create a second configuration file storing the second configuration information. By creating a first configuration file and a second configuration file, the underlying firmware of the terminal (such as a network card chip) reads the contained first configuration information to configure the frequency band ports (the second soft interface and the first hotspot frequency band) corresponding to the first hotspot frequency band. two network card interfaces) and read the included second configuration information to configure the frequency band ports (the second soft interface and the second network card interface) corresponding to the second hotspot frequency band.

在一种具体的实施场景中,所述终端可以是电脑、手机、平板等智能设备,为了描述的方便,以终端为智能手机举例,用户可以在智能手机界面打开个人热点设置界面,具体对第一热点频段以及第二热点频段的配置信息进行设置,如图7所示,图7是一种智能手机个人热点设置界面的示意图,在如7所示的个人热点设置界面中,包含至少一个热点频段配置选项,如“第一热点频段”配置选项、“第二热点频段”配置选项以及“双频热点频段”配置选项,若用户需要对各热点频段的配置信息进行设置时,用户可以通过手指触控的方式,选中某一热点频段配置选项以对相应热点频段的配置信息进行设置,如用户可以通过手指触控的方式选中图7中的“第一热点频段”配置选项,在终端的第一热点频段界面对第一热点频段的配置信息进行配置,如图8所示,图8是一种热点频段界面的示意图,用户可以在如图8所示的界面上设置第一热点频段的配置信息,如将第一热点频段的名称设置为“热点1”、将第一热点频段的安全性设置为“WPA2 PSK”加密方式、将最大连接数设置为“20”等等。在设置完成后,用户可以在如图8所示的界面上点击保存,终端-智能手机即可将所述第一热点频段对应的第一配置信息保存,并创建存储第一配置信息的第一配置文件。同上所述,终端可以接收用户针对所述第二热点频段所输入的第二配置信息,并创建存储所述第二配置信息的第二配置文件,此处不再赘述。In a specific implementation scenario, the terminal may be a smart device such as a computer, a mobile phone, or a tablet. For the convenience of description, taking the terminal as an example of a smart phone, the user can open the personal hotspot setting interface on the smart phone interface. The configuration information of a hotspot frequency band and a second hotspot frequency band is set, as shown in FIG. 7 , which is a schematic diagram of a personal hotspot setting interface of a smartphone. The personal hotspot setting interface shown in FIG. 7 includes at least one hotspot Frequency band configuration options, such as "First Hotspot Frequency Band" configuration option, "Second Hotspot Frequency Band" configuration option and "Dual-frequency Hotspot Frequency Band" configuration option, if the user needs to set the configuration information of each hotspot frequency band, the user can use finger By touch, select a certain hotspot frequency band configuration option to set the configuration information of the corresponding hotspot frequency band. For example, the user can select the "first hotspot frequency band" configuration option in Fig. A hotspot frequency band interface configures the configuration information of the first hotspot frequency band, as shown in Figure 8, which is a schematic diagram of a hotspot frequency band interface, the user can set the configuration of the first hotspot frequency band on the interface as shown in Figure 8 information, such as setting the name of the first hotspot frequency band to "hotspot 1", setting the security of the first hotspot frequency band to "WPA2 PSK" encryption method, setting the maximum number of connections to "20" and so on. After the setting is completed, the user can click Save on the interface as shown in Figure 8, and the terminal-smartphone can save the first configuration information corresponding to the first hotspot frequency band, and create a first configuration information that stores the first configuration information. configuration file. As described above, the terminal may receive the second configuration information input by the user for the second hotspot frequency band, and create a second configuration file storing the second configuration information, which will not be repeated here.

其中,当用户在使用过程中,需要对某一热点频段的配置信息进行更改时,可以在图7所示的界面中选择相应的热点频段进行更改,当用户更改完点击保存之后,终端可以调用writeWiFiConfiguration()函数将用户更改的信息更新到对应热点频段的配置文件中,如更新到第一热点频段的第一配置文件中。Among them, when the user needs to change the configuration information of a certain hotspot frequency band during use, he can select the corresponding hotspot frequency band to make changes in the interface shown in Figure 7. After the user clicks save after the change, the terminal can call the The writeWiFiConfiguration() function updates the information changed by the user to the configuration file corresponding to the hotspot frequency band, for example, to the first configuration file of the first hotspot frequency band.

在一种可行的实施方式中,终端可以为用户提供“多频热点一键配置”功能,用户可以在如图7所示的界面中,点击“多频热点一键配置”选项,同时对第一热点频段、第二热点频段...第n热点频段进行配置,可以理解的是,“多频热点一键配置”配置的各热点频段的多个配置项相同,如第一热点频段与第二热点频段的多个配置项相同,例如热点名称相同、热点密码相同、加密方式相同、最大连接数相同等等,从而可以方便用户快速对终端的各热点频段进行配置。In a feasible implementation manner, the terminal can provide the user with the function of "one-key configuration of multi-frequency hotspots". The user can click the option of "one-key configuration of multi-frequency hotspots" in the interface as shown in FIG. The first hotspot frequency band, the second hotspot frequency band...the nth hotspot frequency band is configured. It is understandable that the multiple configuration items of each hotspot frequency band configured by "multi-frequency hotspot one-key configuration" are the same. The multiple configuration items of the two hotspot frequency bands are the same, such as the same hotspot name, the same hotspot password, the same encryption method, the same maximum number of connections, etc., so that the user can quickly configure each hotspot frequency band of the terminal.

步骤203:读取各所述热点配置文件中的热点配置信息,所述热点配置信息包括软接口信息以及网卡接口信息。Step 203: Read hotspot configuration information in each of the hotspot configuration files, where the hotspot configuration information includes soft interface information and network card interface information.

具体的,终端可以读取各所述热点配置文件中的热点配置信息,所述热点配置信息包括软接口信息以及网卡接口信息,如读取所述第一配置文件中的第一配置信息以及所述第二配置文件中的第二配置信息,则所述第一配置信息包括第一软接口信息以及第一网卡接口信息,所述第二配置信息包括第二软接口信息以及第二网卡接口信息。Specifically, the terminal can read the hotspot configuration information in each of the hotspot configuration files, and the hotspot configuration information includes soft interface information and network card interface information, such as reading the first configuration information in the first configuration file and all the second configuration information in the second configuration file, the first configuration information includes first soft interface information and first network card interface information, and the second configuration information includes second soft interface information and second network card interface information .

其中,所述终端的各热点频段的频段端口通常有两个,一个热点频段会对应一个软接口(softap接口)以及一个网卡接口(PHY接口)。其中:Wherein, there are usually two frequency band ports of each hotspot frequency band of the terminal, and one hotspot frequency band corresponds to a soft interface (softap interface) and a network card interface (PHY interface). in:

所述软接口(softap接口)为软件类接口,通过该接口方便终端的应用层调用热点服务进行相应的操作,如调用Netd守护热点服务管理网络设备接口、流量控制等操作、dnsmasq热点服务:用来配置dns、forward、dhcp等功能、iptables热点服务:用来实现路由表管理,实现NAT等功能,等等。The soft interface (softap interface) is a software interface, through which it is convenient for the application layer of the terminal to call the hotspot service to perform corresponding operations, such as calling Netd to guard the hotspot service management network device interface, flow control and other operations, dnsmasq hotspot service: use To configure dns, forward, dhcp and other functions, iptables hotspot services: used to implement routing table management, NAT and other functions, and so on.

所述网卡接口为硬件类接口,是网卡芯片上硬件类接口,通常该网卡接口与终端的天线对应,用于控制所述终端的天线工作在某一频段(如2.4GHZ频段)、某一信道等进行信号的收发。可以理解的是,第一热点频段对应一个第一软接口以及第一网卡接口,第二热点频段对应一个第二软接口以及第二网卡接口。The network card interface is a hardware interface, which is a hardware interface on the network card chip. Usually, the network card interface corresponds to the antenna of the terminal, and is used to control the antenna of the terminal to work in a certain frequency band (such as the 2.4GHZ frequency band) and a certain channel. Wait for signal transmission and reception. It can be understood that the first hotspot frequency band corresponds to a first soft interface and a first network card interface, and the second hotspot frequency band corresponds to a second soft interface and a second network card interface.

在实际应用中,通常热点频段的软接口需要根据配置信息中的软接口信息进行创建并进行相应配置,所述网卡接口可以理解为物理接口,通过热点配置信息中的网卡接口信息进行创建并进行相应配置,可以实现通过接口寄存器与特定网卡接口电路与外设天线进行数据以及指令的交互,以实现天线信号的收发。In practical applications, usually the soft interface of the hotspot frequency band needs to be created and configured according to the soft interface information in the configuration information. Corresponding configuration can realize the interaction of data and instructions with the interface circuit of the specific network card and the peripheral antenna through the interface register, so as to realize the transmission and reception of the antenna signal.

在一种具体的实施场景中,终端针对第一热点频段以及第二热点频段,在创建第一配置文件以及第二配置文件之后,通常存储在终端底层(硬件层)的寄存区中,终端在执行“基于所述多个热点频段分别对应的热点配置信息配置各热点频段的频段端口”步骤时,可以读取所述第一配置文件中的第一配置信息以及所述第二配置文件中的第二配置信息,从而可以获取到所述第一配置信息中的第一软接口信息以及第一网卡接口信息,以及所述第二配置信息中的第二软接口信息以及第二网卡接口信息。一种具体的实现方式中通过readWiFiConfiguration()函数从配置文件中读取数据,并使用StoreData接口对数据进行解析,StoreData接口用于对所述数据实现序列化和反序列化数据以对配置文件写入或读取热点配置信息,即可以得到解析之后的热点配置信息。In a specific implementation scenario, after the terminal creates the first configuration file and the second configuration file for the first hotspot frequency band and the second hotspot frequency band, they are usually stored in the storage area of the bottom layer (hardware layer) of the terminal. When the step of "configuring the frequency band ports of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands" is performed, the first configuration information in the first configuration file and the first configuration information in the second configuration file can be read. The second configuration information, so that the first soft interface information and the first network card interface information in the first configuration information, and the second soft interface information and the second network card interface information in the second configuration information can be obtained. In a specific implementation, the readWiFiConfiguration() function is used to read data from the configuration file, and use the StoreData interface to parse the data. The StoreData interface is used to serialize and deserialize the data to write to the configuration file. Enter or read the hotspot configuration information to obtain the parsed hotspot configuration information.

步骤204:创建各所述热点频段对应的软接口,根据所述软接口信息配置所述软接口的接口参数,根据所述网卡接口信息分配所述软接口对应的网卡接口,所述网卡接口用于控制所述终端的天线收发信号。Step 204 : Create a soft interface corresponding to each of the hotspot frequency bands, configure interface parameters of the soft interface according to the soft interface information, allocate a network card interface corresponding to the soft interface according to the network card interface information, and use the network interface to control the antenna of the terminal to send and receive signals.

具体的,终端可以分别创建各所述热点频段对应的软接口,根据各所述软接口信息配置相对应的所述软接口的接口参数,然后网卡接口信息分配所述软接口对应的网卡接口。Specifically, the terminal may create a soft interface corresponding to each of the hotspot frequency bands, configure interface parameters of the corresponding soft interface according to the information of each soft interface, and then allocate the network card interface corresponding to the soft interface according to the network interface information.

以下将以所述多个热点频段包括第一热点频段以及第二热点频段,进行详细释义:The following will describe in detail that the multiple hotspot frequency bands include a first hotspot frequency band and a second hotspot frequency band:

具体的,终端可以创建所述第一热点频段对应的第一软接口,根据所述第一软接口信息配置所述第一软接口的接口参数,根据所述第一网卡接口信息分配所述第一软接口对应的第一网卡接口,所述第一网卡接口用于控制所述终端的天线收发信号。Specifically, the terminal may create a first soft interface corresponding to the first hotspot frequency band, configure interface parameters of the first soft interface according to the first soft interface information, and allocate the first soft interface according to the first network card interface information. A first network card interface corresponding to a soft interface, where the first network card interface is used to control the antenna of the terminal to send and receive signals.

所述终端的热点频段的频段端口通常有两个,第一热点频段对应的频段端口为第一软接口以及第一网卡接口,第二热点频段对应的频段端口为第二软接口以及第二网卡接口。There are usually two frequency band ports in the hotspot frequency band of the terminal, the frequency band port corresponding to the first hotspot frequency band is the first soft interface and the first network card interface, and the frequency band port corresponding to the second hotspot frequency band is the second soft interface and the second network card interface.

所述第一软接口(如softap0接口)以及第二软接口(如softap1接口)为软件类接口,通过第一软接口(如softap0接口)以及第二软接口(如softap1接口)终端的应用层可以调用热点服务进行相应的操作,如调用第一软接口(如softap0接口)的Netd守护热点服务来管理第一热点频段的网络设备接口、流量控制等操作、调用第一软接口(如softap0接口)的dnsmasq热点服务:用来配置第一热点频段的dns、forward、dhcp等功能、调用第一软接口(如softap0接口)的iptables热点服务:用来实现第一热点频段的路由表管理,实现NAT等功能,等等。The first soft interface (such as the softap0 interface) and the second soft interface (such as the softap1 interface) are software interfaces, and the application layer of the terminal through the first soft interface (such as the softap0 interface) and the second soft interface (such as the softap1 interface) You can call the hotspot service to perform corresponding operations, such as calling the Netd guard hotspot service of the first soft interface (such as the softap0 interface) to manage the network device interface, flow control and other operations of the first hotspot frequency band, calling the first soft interface (such as the softap0 interface) ) dnsmasq hotspot service: used to configure dns, forward, dhcp and other functions of the first hotspot frequency band, and call the iptables hotspot service of the first soft interface (such as the softap0 interface): used to realize the routing table management of the first hotspot frequency band, realize Features like NAT, etc.

所述第一网卡接口(如PHYA接口)以及第二网卡接口(如PHYB接口)为硬件类接口,是网卡芯片上两个硬件类接口作为物理层天线信号的收发器使用,通常该网卡接口与终端的天线对应,如第一网卡接口(如PHYA接口)用于控制所述终端的天线工作在某一频段(如2.4GHZ频段)、某一信道等进行信号的收发。可以理解的是,第一热点频段对应一个第一软接口以及第一网卡接口,第二热点频段对应一个第二软接口以及第二网卡接口。The first network card interface (such as the PHYA interface) and the second network card interface (such as the PHYB interface) are hardware interfaces, and the two hardware interfaces on the network card chip are used as transceivers for physical layer antenna signals. The antenna of the terminal corresponds, for example, the first network card interface (eg, PHYA interface) is used to control the antenna of the terminal to operate in a certain frequency band (eg, 2.4GHZ frequency band), a certain channel, etc. to send and receive signals. It can be understood that the first hotspot frequency band corresponds to a first soft interface and a first network card interface, and the second hotspot frequency band corresponds to a second soft interface and a second network card interface.

在实际应用中,通常热点频段的第一软接口以及第二软接口需要根据配置信息中的软接口信息进行创建并进行相应配置,所述网卡接口可以理解为物理接口,通过配置信息中的网卡接口信息对网卡接口并进行相应配置即可。可以实现通过接口寄存器与特定网卡接口电路与外设天线进行数据以及指令的交互,以实现天线信号的收发。In practical applications, usually the first soft interface and the second soft interface of the hotspot frequency band need to be created and configured according to the soft interface information in the configuration information. The network card interface can be understood as a physical interface. The interface information can be configured on the network card interface and correspondingly. It is possible to realize the interaction of data and instructions with the interface circuit of the specific network card and the peripheral antenna through the interface register, so as to realize the transmission and reception of the antenna signal.

所述第一软接口信息通常包含配置第一软接口的接口参数信息,如热点名称、无线密钥、加密类型等。所述第二软接口信息通常包含配置第二软接口的接口参数信息,如热点名称、无线密钥、加密类型等。The first soft interface information generally includes interface parameter information for configuring the first soft interface, such as hotspot name, wireless key, encryption type, and the like. The second soft interface information usually includes interface parameter information for configuring the second soft interface, such as hotspot name, wireless key, encryption type, and the like.

所述第一网卡接口信息通常包含配置第一网卡接口的接口参数信息,如工作频段、无线协议、连接速度、工作模式(双工、半双工等)等。所述第二网卡接口信息通常包含配置第二网卡接口的接口参数信息,如工作频段、无线协议类型、连接速度、工作模式(双工、半双工等)、接口地址、工作信道配置信息等。The first network card interface information generally includes interface parameter information for configuring the first network card interface, such as working frequency band, wireless protocol, connection speed, working mode (duplex, half-duplex, etc.). The second network card interface information usually includes interface parameter information for configuring the second network card interface, such as working frequency band, wireless protocol type, connection speed, working mode (duplex, half-duplex, etc.), interface address, working channel configuration information, etc. .

具体的,终端可以调用createAPIface(sofap0)函数创建所述第一热点频段对应的第一软接口,根据所述第一软接口信息配置所述第一软接口的接口参数,如第一热点频段的热点名称、无线密钥、加密类型等接口参数。一种可行的实施方式中,终端在创建第一软接口之后,可以采用mConnector.execute("softap1","set",wlanIface,wifiConfig.SSID,getSecurityType(wifiConfig),wifiConfig.preSharedKey)指令第一软接口的热点名称、加密方式、以及密码进行接口参数配置。终端根据所述第一网卡接口信息(如工作频段(2.4GHZ或5GHZ)、无线协议类型等)在网卡芯片中的至少一个网卡接口中确定相匹配的第一网卡接口。所述相匹配可以理解为可以以第一网卡接口信息中的参数进行工作,如工作在第一网卡接口信息中的工作频段下。并将所述以第一网卡接口分配至第一软接口。同时基于第一网卡接口信息对第一网卡接口进行参数配置,如第一网卡接口的工作频段设置为某一工作频段(2.4GHZ或5GHZ),将第一网卡接口的无线协议类型设置为工作频段对应的无线协议类型(如可支持5GHZ的协议类型),将第一网卡接口的工作模式确定为双工模式、将第一网卡接口的接口地址设置为第一网卡接口信息中的接口地址,等等。通常所述第一网卡接口通过接口寄存器与特定网卡接口电路可以与外设天线进行数据以及指令的交互,以实现控制所述终端的天线收发信号。Specifically, the terminal may call the createAPIface(sofap0) function to create a first soft interface corresponding to the first hotspot frequency band, and configure interface parameters of the first soft interface according to the first soft interface information, such as the first hotspot frequency band. Interface parameters such as hotspot name, wireless key, encryption type, etc. In a feasible implementation manner, after creating the first soft interface, the terminal may use mConnector.execute("softap1", "set", wlanIface, wifiConfig.SSID, getSecurityType(wifiConfig), wifiConfig.preSharedKey) to instruct the first soft interface. The hotspot name, encryption method, and password of the interface are used to configure interface parameters. The terminal determines a matching first network card interface in at least one network card interface in the network card chip according to the first network card interface information (eg, working frequency band (2.4GHZ or 5GHZ), wireless protocol type, etc.). The matching can be understood as being able to work with the parameters in the interface information of the first network card, for example, working under the working frequency band in the interface information of the first network card. and assigning the first network card interface to the first soft interface. At the same time, the parameters of the first network card interface are configured based on the interface information of the first network card. For example, the working frequency band of the first network card interface is set to a certain working frequency band (2.4GHZ or 5GHZ), and the wireless protocol type of the first network card interface is set to the working frequency band. Corresponding wireless protocol type (such as the protocol type that can support 5GHZ), determine the working mode of the first network card interface as duplex mode, set the interface address of the first network card interface to the interface address in the first network card interface information, etc. Wait. Usually, the first network card interface can exchange data and instructions with a peripheral antenna through an interface register and a specific network card interface circuit, so as to control the antenna of the terminal to send and receive signals.

同理,终端可以创建所述第二热点频段对应的第二软接口,根据所述第二软接口信息配置所述第二软接口的接口参数,根据所述第二网卡接口信息分配所述第二软接口对应的第二网卡接口,所述第二网卡接口用于控制所述终端的天线收发信号。Similarly, the terminal may create a second soft interface corresponding to the second hotspot frequency band, configure interface parameters of the second soft interface according to the second soft interface information, and allocate the second soft interface according to the second network card interface information. The second network card interface corresponding to the second soft interface, the second network card interface is used to control the antenna of the terminal to send and receive signals.

在一种具体的实施场景中,终端可以调用createAPIface(sofap1)函数创建所述第二热点频段对应的第二软接口,根据所述第二软接口信息配置所述第二软接口的接口参数,如第二热点频段的热点名称、无线密钥、加密类型等接口参数。一种可行的实施方式中,终端在创建第二软接口之后,可以采用mConnector.execute("softap1","set",wlanIface,wifiConfig.SSID,getSecurityType(wifiConfig),wifiConfig.preSharedKey)指令第二软接口的热点名称、加密方式、以及密码进行接口参数配置。终端根据所述第二网卡接口信息(如工作频段(2.4GHZ或5GHZ)、无线协议类型等)在网卡芯片中的至少一个网卡接口中确定相匹配的第二网卡接口。所述相匹配可以理解为可以以第二网卡接口信息中的参数进行工作,如工作在第二网卡接口信息中的工作频段下。并将所述以第二网卡接口分配至第二软接口。同时基于第二网卡接口信息对第二网卡接口进行参数配置,如第二网卡接口的工作频段设置为某一工作频段(2.4GHZ或5GHZ),将第二网卡接口的无线协议类型设置为工作频段对应的无线协议类型(如可支持5GHZ的协议类型),将第二网卡接口的工作模式确定为双工模式、将第二网卡接口的接口地址设置为第二网卡接口信息中的接口地址,等等。通常所述第二网卡接口通过接口寄存器与特定网卡接口电路可以与外设天线进行数据以及指令的交互,以实现控制所述终端的天线收发信号。In a specific implementation scenario, the terminal may call the createAPIface(sofap1) function to create a second soft interface corresponding to the second hotspot frequency band, and configure interface parameters of the second soft interface according to the second soft interface information, For example, interface parameters such as the hotspot name, wireless key, and encryption type of the second hotspot frequency band. In a feasible implementation manner, after creating the second soft interface, the terminal may use mConnector.execute("softap1", "set", wlanIface, wifiConfig.SSID, getSecurityType(wifiConfig), wifiConfig.preSharedKey) to instruct the second soft interface. The hotspot name, encryption method, and password of the interface are used to configure interface parameters. The terminal determines a matching second network card interface in at least one network card interface in the network card chip according to the second network card interface information (eg, working frequency band (2.4GHZ or 5GHZ), wireless protocol type, etc.). The matching can be understood as being able to work with the parameters in the interface information of the second network card, for example, working under the working frequency band in the interface information of the second network card. and assigning the second network card interface to the second soft interface. At the same time, configure the parameters of the second network card interface based on the interface information of the second network card. For example, the working frequency band of the second network card interface is set to a certain working frequency band (2.4GHZ or 5GHZ), and the wireless protocol type of the second network card interface is set to the working frequency band. Corresponding wireless protocol type (such as the protocol type that can support 5GHZ), determine the working mode of the second network card interface as duplex mode, set the interface address of the second network card interface to the interface address in the second network card interface information, etc. Wait. Usually, the second network card interface can exchange data and instructions with a peripheral antenna through an interface register and a specific network card interface circuit, so as to control the antenna of the terminal to send and receive signals.

步骤205:确定所述各热点频段的频段端口分别对应的各加载项,并加载所述各加载项。Step 205: Determine each add-on item corresponding to the frequency band port of each hotspot frequency band, and load the each add-on item.

所述加载项可以理解为开启某一热点频段端口需要加载的频段端口对应的配置运行文件、驱动文件、相关热点进程、驱动或固件等。The add-in can be understood as a configuration running file, driver file, related hotspot process, driver or firmware, etc. corresponding to the frequency band port that needs to be loaded to open a certain hotspot frequency band port.

具体的,终端预先设定在开启WiFi热点的热点频段的过程中可以设置并确定各各热点频段的频段端口进行加载的加载项,这个设定可以通常可以是终端的操作系统提前进行设置的,也可以用户通过相应的WiFi热点对应的热点频段加载管理界面进行设置的。在接收到终端的各热点频段加载指令之后,在存储有相应的热点频段的加载项信息的配置文件中确定与热点频段预加载指令对应的加载项,并加载确定的加载项。可以理解的是WiFi热点的开启需要加载的热点频段的所有的加载项是固定的,加载项即为在开启一个应用或者功能时需要加载的驱动、进程或者固件,上述驱动、进程或者固件统称为加载项。基于上述,终端确定各热点频段的频段端口分别对应的各加载项,并加载所述各加载项。Specifically, the terminal is preset in the process of opening the hotspot frequency band of the WiFi hotspot and can set and determine the add-on to be loaded by the frequency band port of each hotspot frequency band. This setting can usually be set in advance by the operating system of the terminal. It can also be set by the user by loading the management interface of the hotspot frequency band corresponding to the corresponding WiFi hotspot. After receiving each hot frequency band loading instruction of the terminal, the add-on item corresponding to the hot-spot frequency band preloading instruction is determined in the configuration file storing the add-on item information of the corresponding hot-spot frequency band, and the determined add-on item is loaded. It can be understood that all the add-ons of the hotspot frequency band that need to be loaded to open the WiFi hotspot are fixed, and the add-ons are the drivers, processes or firmware that need to be loaded when an application or function is opened. The above drivers, processes or firmware are collectively referred to as Add-ons. Based on the above, the terminal determines each add-on item corresponding to the frequency band port of each hotspot frequency band, and loads the each add-on item.

在一种可行的实施方式中,终端通过执行所述多频WiFi热点开启方法开启双频热点的过程中,终端即可以确定所述第一频段端口对应的第一加载项以及所述第二频段端口对应的第二加载项,并分别加载所述第一加载项和所述第二加载项。In a feasible implementation manner, in the process of enabling a dual-band hotspot by executing the method for enabling a multi-band WiFi hotspot, the terminal can determine the first add-on item corresponding to the port of the first frequency band and the second frequency band The second add-in corresponding to the port is loaded, and the first add-in and the second add-in are loaded respectively.

所述第一加载项可以理解为开启所述第一频段端口需要加载的频段端口对应的配置运行文件、驱动文件、相关热点进程、驱动或固件等,在实际应用中,在开启第一频段端口之前对第一频段端口的配置过程中,所述第一频段端口的第一加载项即随之确定,终端只需按照预设的开启流程分布依次加载所述第一加载项即可开启所述第一频段端口。The first add-in item can be understood as the configuration running file, driver file, related hotspot process, driver or firmware, etc. corresponding to the frequency band port that needs to be loaded to open the first frequency band port. In the previous configuration process of the first frequency band port, the first add-on item of the first frequency band port is determined accordingly, and the terminal only needs to load the first add-on item in sequence according to the preset opening process distribution to enable the said first add-on item. The first band port.

所述第二加载项可以理解为开启所述第二频段端口需要加载的频段端口对应的配置运行文件、驱动文件、相关热点进程、驱动或固件等,在实际应用中,在开启第二频段端口之前对第二频段端口的配置过程中,所述第二频段端口的第二加载项即随之确定,终端只需按照预设的开启流程分布依次加载所述第二加载项即可开启所述第一频段端口。The second add-in can be understood as the configuration running file, driver file, related hotspot process, driver or firmware, etc. corresponding to the frequency band port that needs to be loaded to open the second frequency band port. In the previous configuration process of the second frequency band port, the second add-on item of the second frequency band port is determined accordingly, and the terminal only needs to load the second add-on item in sequence according to the preset opening process distribution to enable the said second add-on item. The first band port.

可选的,对于热点频段的频段端口的开启需要加载的所有的加载项来说,部分加载项是可以预先进行加载的,而部分加载项是在开启热点频段的频段端口进行加载的,即这部分的加载项加载完毕即标识着频段端口开启完成,此时相应热点频段的WiFi热点即开启成功。Optionally, for all the add-ons that need to be loaded when the frequency band port of the hotspot frequency band is opened, some add-ons can be loaded in advance, and some add-ons are loaded when the frequency band port of the hotspot frequency band is turned on, that is, this When some add-ons are loaded, it means that the opening of the frequency band port is completed. At this time, the WiFi hotspot of the corresponding hotspot frequency band is successfully opened.

可选的,终端根据实际情况对第一加载项、第二加载项、...第n加载项的确定并加载以及对确定并加载从而开启所述各热点频段的频段端口,可以是同步进行的,还可以是异步进行的,Optionally, the terminal determines and loads the first add-in item, the second add-in item, ... the nth add-in item according to the actual situation, and determines and loads the frequency band ports of the hot frequency frequency bands, which may be performed synchronously. Yes, it can also be done asynchronously,

在一种可行的实施方式,终端可以异步开启第一频段端口、第二频段端口,即异步执行“确定所述第一频段端口对应的第一加载项,并加载所述第一加载项”以及“确定所述第二频段端口对应的第二加载项,并加载所述第二加载项”的步骤。In a feasible implementation manner, the terminal can asynchronously enable the first frequency band port and the second frequency band port, that is, asynchronously execute "determine the first add-on item corresponding to the first frequency band port, and load the first add-on item" and The steps of "determining the second add-in item corresponding to the second frequency band port, and loading the second add-in item".

在一种可行的实施方式中,用户可以对开启各热点频段的频段端口的开启时间进行自定义,如对开启第一热点频段的第一频段端口以及第二热点频段的第二频段端口的开启时间进行自定义,可以理解的是,用户可以在终端的相应热点配置界面上对各热点频段的频段端口的开启时间进行设置时,可以对个开启时间进行分别设置,如设置各热点频段的频段端口的开启时间可以是同一时间,可以是不同的时间点依次开启不同的热点频段的频段端口,如在对第一热点频段以及第二热点频段进行配置信息设置时,可以设置第一热点频段对应的第一开启端口时间为时间点T1、设置第二热点频段对应的第二开启端口时间为时间点T2。然后终端可以根据所述第一开启时间信息-时间点T1开启第一频段端口,以及根据所述第二开启时间信息-时间点T2开启第二频段端口,具体为根据时间点T1确定所述第一频段端口对应的第一加载项,并加载所述第一加载项以开启第一频段端口。以及根据时间点T2确定所述第二频段端口对应的第二加载项,并加载所述第二加载项以开启第二频段端口。In a feasible implementation manner, the user can customize the opening time of the frequency band ports of each hotspot frequency band, such as opening the first frequency band port of the first hotspot frequency band and the opening of the second frequency band port of the second hotspot frequency band The time can be customized. It is understandable that when the user can set the opening time of the frequency band port of each hotspot frequency band on the corresponding hotspot configuration interface of the terminal, he can set the opening time separately, such as setting the frequency band of each hotspot frequency band. The opening time of the port can be the same time, or it can be different time points to open the frequency band ports of different hotspot frequency bands in turn. For example, when setting the configuration information for the first hotspot frequency band and the second hotspot frequency band, you can set the corresponding The first port opening time is time point T1, and the second port opening time corresponding to the second hotspot frequency band is set time point T2. Then, the terminal can open the first frequency band port according to the first open time information-time point T1, and open the second frequency band port according to the second open time information-time point T2, specifically determining the first frequency band port according to the time point T1 A first add-in item corresponding to a frequency band port is loaded, and the first add-in item is loaded to enable the first frequency band port. and determining a second add-in item corresponding to the second frequency band port according to the time point T2, and loading the second add-in item to enable the second frequency band port.

步骤206:获取所述终端的剩余电量,当所述剩余电量小于电量阈值时,获取所述各热点频段所对应的设备连接数。Step 206: Obtain the remaining power of the terminal, and when the remaining power is less than a power threshold, obtain the number of device connections corresponding to the hotspot frequency bands.

所述剩余电量(State OfCharge,SOC)是指终端的供电模块-电池内的可用电量占标称容量的比例,是终端的用于实现电池管理的一个重要监控数据,终端通常可以根据SOC值控制电池工作状态。电池的剩余电量也即反映的是电池的荷电状态,所述剩余电量的表征形式可以是以电量百分比的形式、可以是以剩余电容量等形式。The remaining power (State OfCharge, SOC) refers to the power supply module of the terminal - the ratio of the available power in the battery to the nominal capacity, and is an important monitoring data for the terminal to realize battery management. The terminal can usually control it according to the SOC value. Battery working status. The remaining power of the battery also reflects the state of charge of the battery, and the representation form of the remaining power may be in the form of a percentage of the power, may be in the form of a remaining electric capacity, or the like.

所述阈值是指某一领域、状态或系统的门限值,也称临界值。在本实施例中所述电量阈值是指终端剩余电量的门限值或临界值,可以理解的是,当剩余电量小于电量阈值时,终端的电量可能不足以支持第一频段热点以及第二频段热点长时间开启。The threshold value refers to a threshold value of a certain field, state or system, also called a critical value. In this embodiment, the power threshold refers to the threshold or critical value of the remaining power of the terminal. It can be understood that when the remaining power is less than the power threshold, the power of the terminal may not be enough to support the first frequency band hotspot and the second frequency band The hotspot is on for a long time.

具体的,终端获取当前的剩余电量可以是通过创建监听剩余电量的进程。Specifically, the terminal may acquire the current remaining power by creating a process for monitoring the remaining power.

在一种的具体的实施场景中,以终端的操作系统为安卓(Android)系统为例,Android系统中终端电量发生变化的消息是通接收Intent广播来实现的,终端可以创建接收剩余电量的进程来实现对剩余电量的获取,具体可采用getIntExtra("level")函数来获取所述终端的剩余电量。In a specific implementation scenario, taking the operating system of the terminal as an Android system as an example, the message of the terminal power change in the Android system is realized by receiving an Intent broadcast, and the terminal can create a process to receive the remaining power To achieve the acquisition of the remaining power, the getIntExtra("level") function can be specifically used to obtain the remaining power of the terminal.

在一种的具体的实施场景中,终端获取当前的剩余电量可以是针对供电模块的状态信息发出相应的获取指令,基于获取到的供电模块的状态信息进行解析处理获取到的终端的剩余电量。如通过发出“adb shell dumpsys battery”获取指令,通过所述获取指令可以返回供电模块的各种状态信息(如充电状态、实时温度、实时电压、实时电流、剩余电量等),然后通过查找“level(百分比)”对应的参数,即可获取到终端的剩余电量,该剩余电量为电量百分比的形式。In a specific implementation scenario, the terminal may obtain the current remaining power by issuing a corresponding obtaining instruction for the state information of the power supply module, and performing analysis processing based on the obtained state information of the power supply module to obtain the remaining power of the terminal. For example, by issuing the "adb shell dumpsys battery" command, various status information of the power supply module (such as charging status, real-time temperature, real-time voltage, real-time current, remaining power, etc.) (Percentage)", you can get the remaining power of the terminal, which is in the form of a percentage of power.

具体的,终端获取到的剩余电量小于电量阈值时,终端可以获取各热点频段所对应的设备连接数,如上述第一热点频段的第一设备连接数以及上述第二热点频段的第二设备连接数。具体的终端可以通过调用getNumConnectedDevices函数来分别获取各热点频段所对应的设备连接信息,如获取第一热点频段的第一设备连接数以及所述第二热点频段的第二设备连接数,然后基于getNumConnectedDevices函数的返回值即可分别确定设备连接信息中的设备连接数,如第一设备连接数以及第二设备连接数。Specifically, when the remaining power obtained by the terminal is less than the power threshold, the terminal can obtain the number of device connections corresponding to each hotspot frequency band, such as the number of first device connections in the first hotspot frequency band and the second device connection in the second hotspot frequency band. number. A specific terminal can obtain the device connection information corresponding to each hotspot frequency band by calling the getNumConnectedDevices function, such as obtaining the first device connection number of the first hotspot frequency band and the second device connection number of the second hotspot frequency band, and then based on getNumConnectedDevices The return value of the function can respectively determine the number of device connections in the device connection information, such as the number of first device connections and the number of second device connections.

步骤207:在所述设备连接数中确定最小设备连接数,对所述最小设备连接数指示的目标热点频段进行限流处理。Step 207: Determine the minimum number of device connections in the number of device connections, and perform current limiting processing on the target hotspot frequency band indicated by the minimum number of device connections.

所述限流处理可以是对所述目标热点频段执行终止该网络流量的传输或者降低网络传输的上下行速度,达到限流的目的,以确保较大设备连接数指示的热点频段的网络通信为正常状态或保证较大设备连接数指示的热点频段的持续时长。The current limiting process may be performed on the target hotspot frequency band to terminate the transmission of the network traffic or reduce the uplink and downlink speed of network transmission, so as to achieve the purpose of current limitation, so as to ensure that the network communication of the hotspot frequency band indicated by the larger number of device connections is as follows. Normal state or guaranteed duration of the hotspot band indicated by the larger number of device connections.

具体的,终端在获取到各热点频段所对应的设备连接数之后,对热点频段所对应的设备连接数进行比较,确定最小设备连接数,然后对较小设备连接数指示的目标热点频段,执行限流处理。如获取到第一热点频段的第一设备连接数-10个以及第二热点频段的第二设备连接数-130之后,对所述第一设备连接数以及第二设备连接数进行比较,确定最小设备连接数-10,然后对较小设备连接数-10指示的目标热点频段-第一热点频段,执行限流处理。Specifically, after obtaining the number of device connections corresponding to each hotspot frequency band, the terminal compares the number of device connections corresponding to the hotspot frequency band, determines the minimum number of device connections, and then executes the target hotspot frequency band indicated by the smaller number of device connections. Current limit processing. For example, after obtaining the number of first device connections in the first hotspot frequency band -10 and the number of second device connections in the second hotspot frequency band -130, compare the number of first device connections and the number of second device connections to determine the minimum The number of device connections is -10, and then the current limiting process is performed on the target hotspot frequency band indicated by the smaller device connection number -10 - the first hotspot frequency band.

在一种具体的实施场景中,以目标热点频段为第一热点频段为例,终端获取对连接第一热点频段的所有电子设备的数据流量进行监测,判断各电子设备是否在第一热点频段下产生数据流或是否在某一预定时长(如3分钟内),当未产生数据流时,断开与该电子设备的热点连接。In a specific implementation scenario, taking the target hotspot frequency band as the first hotspot frequency band as an example, the terminal acquires and monitors the data traffic of all electronic devices connected to the first hotspot frequency band, and determines whether each electronic device is under the first hotspot frequency band Generate a data stream or whether within a predetermined period of time (eg, 3 minutes), when no data stream is generated, disconnect the hotspot connection with the electronic device.

在一种具体的实施场景中,以目标热点频段为第一热点频段为例,终端获取对连接第一热点频段的所有电子设备的数据流量进行监测,获取各电子设备在第一热点频段下的总数据流量或在某一预定时长(如3分钟内)产生的数据流量,当数据流量超过设定的流量阈值时,降低该电子设备的热点连接的上下行传输速度,以对该电子设备进行限流处理,即降低所述电子设备的上下行传输速度。In a specific implementation scenario, taking the target hotspot frequency band as the first hotspot frequency band as an example, the terminal acquires and monitors the data traffic of all electronic devices connected to the first hotspot frequency band, and obtains the data traffic of each electronic device in the first hotspot frequency band. The total data traffic or the data traffic generated within a predetermined period of time (such as 3 minutes), when the data traffic exceeds the set traffic threshold, reduce the uplink and downlink transmission speed of the hotspot connection of the electronic device, so that the electronic device can be connected. Current limiting processing, that is, reducing the uplink and downlink transmission speed of the electronic device.

在一种具体的实施场景中,以目标热点频段为第一热点频段为例,终端获取对连接第一热点频段的所有电子设备的数据流量进行监测,当所有电子设备的数据流量为0时,关闭该热点频段。In a specific implementation scenario, taking the target hotspot frequency band as the first hotspot frequency band as an example, the terminal acquires and monitors the data traffic of all electronic devices connected to the first hotspot frequency band. When the data traffic of all electronic devices is 0, Turn off the hotspot band.

在一种具体的实施场景中,终端还可以对非目标热点频段进行限流处理,以目标热点频段为第一热点频段,非目标热点频段为第一热点频段为例,其中所述非目标热点频段为第一设备连接数以及第二设备连接数中较大设备连接数指示的热点频段,终端获取对连接第二热点频段的所有电子设备的数据流量进行监测,获取各电子设备在第二热点频段下的总数据流量或在某一预定时长(如3分钟内)产生的数据流量,当数据流量超过设定的流量阈值时,对超过该流量阈值的电子设备进行限流处理,即降低所述电子设备的上下行传输速度。In a specific implementation scenario, the terminal may also perform current limiting processing on the non-target hotspot frequency band, taking the target hotspot frequency band as the first hotspot frequency band and the non-target hotspot frequency band as the first hotspot frequency band as an example, wherein the non-target hotspot frequency band is the first hotspot frequency band. The frequency band is the hotspot frequency band indicated by the larger number of device connections in the first device connection number and the second device connection number. The total data traffic under the frequency band or the data traffic generated within a predetermined period of time (such as 3 minutes), when the data traffic exceeds the set traffic threshold, the electronic devices that exceed the traffic threshold are subjected to current limiting processing, that is, to reduce the data traffic. The uplink and downlink transmission speed of the electronic device.

在本申请实施例中,终端通过基于多个热点频段分别对应的配置信息开启各热点频段的频段端口,可以开启终端所支持的多个热点频段分别对应的热点,从而覆盖到电子设备支持的全部热点频段,避免了终端热点网络共享的整个过程中由于与电子设备热点频段不匹配导致电子设备无法连接热点网络的问题,提高了终端热点资源的利用率;同时当终端剩余电量较低时,对多个热点频段中设备连接数较小的目标热点频段进行限流处理,可以在降低终端功耗的同时保障热点资源的最大利用。In the embodiment of the present application, the terminal can open the frequency band ports of each hotspot frequency band based on the configuration information corresponding to the multiple hotspot frequency bands, so as to open the hotspots corresponding to the multiple hotspot frequency bands supported by the terminal, so as to cover all the hotspot frequency bands supported by the electronic device. The hotspot frequency band avoids the problem that the electronic device cannot connect to the hotspot network due to the mismatch with the hotspot frequency band of the electronic device during the whole process of terminal hotspot network sharing, and improves the utilization rate of the terminal hotspot resources; at the same time, when the remaining power of the terminal is low, the The target hotspot frequency band with a small number of device connections among multiple hotspot frequency bands is subjected to current limiting processing, which can reduce the power consumption of the terminal and ensure the maximum utilization of hotspot resources.

请参见图9,为本申请实施例提供的一种多频WiFi热点开启系统的场景示意图。如图9所示,所述多频WiFi热点开启系统可以包括终端100以及电子设备集群。所述电子设备集群可以包括多个电子设备,如图1所示,具体包括电子设备1、电子设备2、…、电子设备n,n为大于0的整数;为便于理解,本发明实施例以图1中的电子设备100和电子设备1为例进行描述。Please refer to FIG. 9 , which is a schematic diagram of a scenario of a system for enabling a multi-frequency WiFi hotspot according to an embodiment of the present application. As shown in FIG. 9 , the multi-frequency WiFi hotspot opening system may include a terminal 100 and an electronic device cluster. The electronic device cluster may include multiple electronic devices, as shown in FIG. 1 , specifically including electronic device 1, electronic device 2, . . . , electronic device n, where n is an integer greater than 0; The electronic device 100 and the electronic device 1 in FIG. 1 are described as an example.

所述终端设备100可以是具有无线网络接入服务的多频WiFi热点接入设备,可以方便用户在无固定网络的条件下,通过终端设备100提供的多频WiFi热点信号的通道,接入到无线局域网中,进而实现对互联网的访问,常用的热点设备包含便携式宽带无线设备(Mobile WIF,MIFI)、手机、车载WiFi热点设备、具有热点共享功能的个人电脑等。The terminal device 100 may be a multi-frequency WiFi hotspot access device with wireless network access services, which can facilitate users to access the wireless network through the multi-frequency WiFi hotspot signal channel provided by the terminal device 100 without a fixed network. In the wireless local area network, access to the Internet is further realized. Common hotspot devices include portable broadband wireless devices (Mobile WIF, MIFI), mobile phones, vehicle WiFi hotspot devices, and personal computers with hotspot sharing functions.

所述电子设备集群中的各电子设备可以是具有定位功能以及蓝牙广播功能的电子设备,该电子设备包括但不限于:可穿戴设备、手持设备、个人电脑、平板电脑、车载设备、智能手机、计算设备或连接到无线调制解调器的其它处理设备等。在不同的网络中电子设备可以叫做不同的名称,例如:用户设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置、蜂窝电话、无绳电话、个人数字处理(personal digital assistant,PDA)、5G网络或未来演进网络中的电子设备等。Each electronic device in the electronic device cluster can be an electronic device with positioning function and Bluetooth broadcasting function, and the electronic device includes but is not limited to: wearable device, handheld device, personal computer, tablet computer, vehicle-mounted device, smart phone, A computing device or other processing device connected to a wireless modem, etc. Electronic equipment may be called by different names in different networks, for example: user equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication Equipment, user agent or user equipment, cellular phone, cordless phone, personal digital assistant (PDA), electronic equipment in 5G network or future evolution network, etc.

终端100接收用户所输入的热点开启指令,对所述热点开启指令作出响应。通常终端100所支持的热点频段信息可以存储在本地存储空间中,终端100可以在本地存储空间中获取所支持的热点频段信息,基于所述热点频段信息即可获取到所支持的各热点频段,如终端100支持的热点频段可以是5GHZ和2.4GHZ的热点频段。The terminal 100 receives the hotspot activation instruction input by the user, and responds to the hotspot activation instruction. Usually, the information of the hotspot frequency bands supported by the terminal 100 can be stored in the local storage space, and the terminal 100 can obtain the information of the supported hotspot frequency bands in the local storage space, and each supported hotspot frequency band can be obtained based on the information of the hotspot frequency bands, For example, the hotspot frequency bands supported by the terminal 100 may be 5GHZ and 2.4GHZ hotspot frequency bands.

以下为了叙述的方便,以终端100支持的热点频段为5GHZ和2.4GHZ的热点频段为例,即第一热点频段为5GHZ的热点频段、第二热点频段为2.4GHZ的热点频段进行详细释义。For the convenience of description below, the hotspot frequency bands supported by the terminal 100 are 5GHZ and 2.4GHZ as examples, that is, the first hotspot frequency band is the 5GHZ hotspot frequency band and the second hotspot frequency band is the 2.4GHZ hotspot frequency band for detailed explanation.

终端100接收用户针对所述第一热点频段-5GHZ热点频段所输入的第一配置信息,并创建存储所述第一配置信息的第一配置文件,以及接收针对所述第二热点频段-2.4GHZ热点频段所输入的第二配置信息,并创建存储所述第二配置信息的第二配置文件。The terminal 100 receives the first configuration information input by the user for the first hotspot frequency band-5GHZ hotspot frequency band, creates a first configuration file storing the first configuration information, and receives the second hotspot frequency band-2.4GHZ The second configuration information entered in the hotspot frequency band is created, and a second configuration file storing the second configuration information is created.

其中,终端100可以为用户提供“双频热点一键配置”功能,用户可以在如图7所示的界面中,点击“双频热点一键配置”选项,同时对第一热点频段以及第二热点频段进行配置,可以理解的是,“双频热点一键配置”配置的第一热点频段与第二热点频段的多个配置项相同,例如热点名称相同、热点密码相同、加密方式相同、最大连接数相同等等,从而可以方便用户快速对第一热点频段与第二热点频段进行配置。Among them, the terminal 100 can provide the user with a "dual-frequency hotspot one-key configuration" function, and the user can click the "dual-frequency hotspot one-key configuration" option in the interface as shown in FIG. It can be understood that the first hotspot frequency band configured in "Dual-frequency hotspot one-key configuration" is the same as the second hotspot frequency band, for example, the hotspot name is the same, the hotspot password is the same, the encryption method is the same, and the maximum The number of connections is the same, etc., so that it is convenient for the user to quickly configure the first hotspot frequency band and the second hotspot frequency band.

终端100读取所述第一配置文件中的第一配置信息以及所述第二配置文件中的第二配置信息,具体可以是通过readWiFiConfiguration()函数从配置文件中读取数据,并使用StoreData接口对数据进行解析,StoreData接口用于对所述数据实现序列化和反序列化数据以对配置文件写入或读取配置信息,即可以得到解析之后的配置信息。The terminal 100 reads the first configuration information in the first configuration file and the second configuration information in the second configuration file, specifically, reading data from the configuration file through the readWiFiConfiguration() function, and using the StoreData interface To parse the data, the StoreData interface is used to serialize and deserialize the data to write or read the configuration information to the configuration file, that is, the parsed configuration information can be obtained.

终端100基于所述第一热点频段-5GHZ热点频段对应的第一热点配置信息配置5GHZ热点频段的频段端口,以及基于所述第一热点频段-2.4GHZ热点频段对应的第一热点配置信息配置2.4GHZ热点频段的频段端口,然后开启所述5GHZ热点频段的频段端口以及2.4GHZ热点频段的频段端口。The terminal 100 configures the frequency band port of the 5GHZ hotspot frequency band based on the first hotspot configuration information corresponding to the first hotspot frequency band-5GHZ hotspot frequency band, and configures 2.4 based on the first hotspot configuration information corresponding to the first hotspot frequency band-2.4GHZ hotspot frequency band The frequency band port of the GHZ hotspot frequency band, and then the frequency band port of the 5GHZ hotspot frequency band and the frequency band port of the 2.4GHZ hotspot frequency band are opened.

其中,所述基于热点配置信息配置热点频段的频段端口可参考步骤101-103,以及步骤201-208,此处不再赘述。For the configuration of the frequency band port of the hotspot frequency band based on the hotspot configuration information, reference may be made to steps 101-103 and steps 201-208, which will not be repeated here.

当终端100开启所述5GHZ热点频段的频段端口以及2.4GHZ热点频段的频段端口之后,终端100的5GHZ热点以及2.4GHZ热点成功开启,对外发射5GHZ热点频段以及2.4GHZ热点频段的热点信号。After the terminal 100 opens the frequency band port of the 5GHZ hotspot frequency band and the frequency band port of the 2.4GHZ hotspot frequency band, the terminal 100 successfully opens the 5GHZ hotspot frequency band and the 2.4GHZ hotspot frequency band, and transmits the hotspot signal of the 5GHZ hotspot frequency band and the 2.4GHZ hotspot frequency band.

电子设备1开启通信扫描功能,扫描当前通信网络下的所有通信接入点。以当前通信网络为wifi网络来举例,其中,电子设备1可以是通过wifi manage(wifi管理器)中的scan方法来扫描当前的通信接入点,当扫描到至少一个通信接入点时,会通过wifi manage(wifi管理器)的回调函数将扫描的所述至少一个通信接入点的扫描结果返回,所述扫描结果会封装成一个列表,该列表中的各项就是扫描到的所述至少一个通信接入点中各通信接入点的设备标识(id、MAC地址、IP地址、数字证书、编号等)。当未扫描到通信接入点时,则通过回调函数返回的结果为Null(空)。电子设备1可以在当前显示界面向用户以列表的形式展示扫描到的全部或部分通信接入点所对应的设备标识,如所述设备标识可以是终端100的5GHZ热点名称和/或2.4GHZ热点名称,此时,电子设备1的用户可以选中终端100的5GHZ热点名称和/或2.4GHZ热点名称,输入对应的热点密码,电子设备1向终端100发送携带有所述热点密码的通信连接请求。终端100在接收到通信连接请求之后,对通信连接请求携带的热点密码进行鉴权验证,当鉴权验证通过之后,即可建立电子设备1与终端100的通信连接(热点连接)。此时电子设备1即可成功连接上终端100的5GHZ热点名称或2.4GHZ热点。其中,当电子设备1支持双频WiFi功能时,可以同时连接上终端100的5GHZ热点和2.4GHZ热点,以通过终端100的热点网络进行网络访问。The electronic device 1 enables the communication scanning function to scan all communication access points under the current communication network. Taking the current communication network as a wifi network as an example, the electronic device 1 may scan the current communication access point through the scan method in wifi manage (wifi manager). The scan result of the at least one communication access point scanned is returned through the callback function of wifi manage (wifi manager), and the scan result will be encapsulated into a list, and the items in the list are the scanned at least one The device identification (id, MAC address, IP address, digital certificate, serial number, etc.) of each communication access point in a communication access point. When no communication access point is scanned, the result returned by the callback function is Null (empty). The electronic device 1 can display the device identifiers corresponding to all or part of the scanned communication access points to the user in the form of a list on the current display interface. For example, the device identifiers can be the 5GHZ hotspot name and/or the 2.4GHZ hotspot of the terminal 100. At this time, the user of the electronic device 1 can select the 5GHZ hotspot name and/or the 2.4GHZ hotspot name of the terminal 100, input the corresponding hotspot password, and the electronic device 1 sends a communication connection request carrying the hotspot password to the terminal 100. After receiving the communication connection request, the terminal 100 performs authentication and verification on the hotspot password carried in the communication connection request. After the authentication and verification are passed, the communication connection (hotspot connection) between the electronic device 1 and the terminal 100 can be established. At this point, the electronic device 1 can successfully connect to the 5GHZ hotspot name or the 2.4GHZ hotspot of the terminal 100 . Wherein, when the electronic device 1 supports the dual-band WiFi function, the 5GHZ hotspot and the 2.4GHZ hotspot of the terminal 100 can be simultaneously connected to perform network access through the hotspot network of the terminal 100 .

在本申请实施例中,终端通过基于多个热点频段分别对应的配置信息开启各热点频段的频段端口,可以开启终端所支持的多个热点频段分别对应的热点,从而覆盖到电子设备支持的全部热点频段,避免了终端热点网络共享的整个过程中由于与电子设备热点频段不匹配导致电子设备无法连接热点网络的问题,提高了终端热点资源的利用率。In the embodiment of the present application, the terminal can open the frequency band ports of each hotspot frequency band based on the configuration information corresponding to the multiple hotspot frequency bands, so as to open the hotspots corresponding to the multiple hotspot frequency bands supported by the terminal, so as to cover all the hotspot frequency bands supported by the electronic device. The hotspot frequency band avoids the problem that the electronic device cannot connect to the hotspot network due to incompatibility with the hotspot frequency band of the electronic device during the whole process of terminal hotspot network sharing, and improves the utilization rate of the terminal hotspot resource.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which may be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

请参见图10,其示出了本申请一个示例性实施例提供的多频WiFi热点开启装置的结构示意图。该多频WiFi热点开启装置可以通过软件、硬件或者两者的结合实现成为装置的全部或一部分。该装置1包括热点频段获取模块11、配置文件创建模块12和频段端口开启模块13。Please refer to FIG. 10 , which shows a schematic structural diagram of a device for enabling a multi-frequency WiFi hotspot provided by an exemplary embodiment of the present application. The device for enabling multi-frequency WiFi hotspots can be implemented as a whole or a part of the device through software, hardware or a combination of the two. The device 1 includes a hotspot frequency band acquisition module 11 , a configuration file creation module 12 and a frequency band port opening module 13 .

热点频段获取模块11,用于接收热点开启指令,获取所述终端支持的多个热点频段;A hotspot frequency band acquisition module 11, configured to receive a hotspot activation instruction, and acquire multiple hotspot frequency bands supported by the terminal;

配置文件创建模块12,用于创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息;a configuration file creation module 12, configured to create a hotspot configuration file corresponding to the multiple hotspot frequency bands, the hotspot configuration file contains hotspot configuration information;

频段端口开启模块13,用于基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口。The frequency band port opening module 13 is configured to configure the frequency band ports of each hotspot frequency band based on the hotspot configuration information corresponding to the plurality of hotspot frequency bands, and enable the frequency band ports of the various hotspot frequency bands.

可选的,所述配置文件创建模块12,具体用于:Optionally, the configuration file creation module 12 is specifically used for:

接收针对各所述热点频段所输入的热点配置信息,并分别创建存储所述热点配置信息的热点配置文件。The hotspot configuration information input for each of the hotspot frequency bands is received, and a hotspot configuration file storing the hotspot configuration information is created respectively.

可选的,如图12所示,所述装置1,还包括:Optionally, as shown in Figure 12, the device 1 further includes:

配置信息读取模块14,用于读取各所述热点配置文件中的热点配置信息,所述热点配置信息包括软接口信息以及网卡接口信息。The configuration information reading module 14 is configured to read the hotspot configuration information in each of the hotspot configuration files, where the hotspot configuration information includes soft interface information and network card interface information.

可选的,如图11所示,所述频段端口开启模块13,包括:Optionally, as shown in FIG. 11 , the frequency band port opening module 13 includes:

软接口开启单元131,用于创建各所述热点频段对应的软接口,根据所述软接口信息配置所述软接口的接口参数;A soft interface enabling unit 131, configured to create a soft interface corresponding to each of the hotspot frequency bands, and configure interface parameters of the soft interface according to the soft interface information;

网卡接口分配单元132,用于根据所述网卡接口信息分配所述软接口对应的网卡接口,所述网卡接口用于控制所述终端的天线收发信号。The network card interface allocation unit 132 is configured to allocate a network card interface corresponding to the soft interface according to the network card interface information, where the network card interface is used to control the antenna of the terminal to send and receive signals.

可选的,如图11所示,所述频段端口开启模块13,包括:Optionally, as shown in FIG. 11 , the frequency band port opening module 13 includes:

加载项加载单元133,用于确定所述各热点频段的频段端口分别对应的各加载项,并加载所述各加载项。The add-on item loading unit 133 is configured to determine each add-on item corresponding to the frequency band port of each of the hot-spot frequency bands, and load the each add-on item.

可选的,所述热点配置信息还包括开启时间信息,所述频段端口开启模块13,具体用于:Optionally, the hotspot configuration information further includes opening time information, and the frequency band port opening module 13 is specifically used for:

基于所述开启时间信息开启所述各热点频段的频段端口。The frequency band port of each hotspot frequency band is opened based on the opening time information.

可选的,如图12所示,所述装置1,包括:Optionally, as shown in FIG. 12 , the device 1 includes:

剩余电量获取模块15,用于获取所述终端的剩余电量;a remaining power acquisition module 15, configured to acquire the remaining power of the terminal;

热点频段限流模块16,用于当所述剩余电量小于电量阈值时,获取所述各热点频段所对应的设备连接数;A hotspot frequency band current limiting module 16, configured to acquire the number of device connections corresponding to each hotspot frequency band when the remaining power is less than a power threshold;

所述热点频段限流模块16,还用于在所述设备连接数中确定最小设备连接数,对所述最小设备连接数指示的目标热点频段进行限流处理。The hotspot frequency band current limiting module 16 is further configured to determine the minimum device connection number in the device connection number, and perform current limiting processing on the target hotspot frequency band indicated by the minimum device connection number.

可选的,所述多个热点频段包括第一热点频段以及第二热点频段。Optionally, the multiple hotspot frequency bands include a first hotspot frequency band and a second hotspot frequency band.

需要说明的是,上述实施例提供的多频WiFi热点开启装置在执行多频WiFi热点开启方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的多频WiFi热点开启装置与多频WiFi热点开启方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。It should be noted that, when the device for enabling multi-frequency WiFi hotspots provided in the above embodiments executes the method for enabling multi-frequency WiFi hotspots, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions may be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for enabling a multi-frequency WiFi hotspot provided by the above embodiments and the method for enabling a multi-frequency WiFi hotspot belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

在本申请实施例中,终端通过基于多个热点频段分别对应的配置信息开启各热点频段的频段端口,可以开启终端所支持的多个热点频段分别对应的热点,从而覆盖到电子设备支持的全部热点频段,避免了终端热点网络共享的整个过程中由于与电子设备热点频段不匹配导致电子设备无法连接热点网络的问题,提高了终端热点资源的利用率;同时当终端剩余电量较低时,对多个热点频段中设备连接数较小的目标热点频段进行限流处理,可以在降低终端功耗的同时保障热点资源的最大利用。In the embodiment of the present application, the terminal can open the frequency band ports of each hotspot frequency band based on the configuration information corresponding to the multiple hotspot frequency bands, so as to open the hotspots corresponding to the multiple hotspot frequency bands supported by the terminal, so as to cover all the hotspot frequency bands supported by the electronic device. The hotspot frequency band avoids the problem that the electronic device cannot connect to the hotspot network due to the mismatch with the hotspot frequency band of the electronic device during the whole process of terminal hotspot network sharing, and improves the utilization rate of the terminal hotspot resources; at the same time, when the remaining power of the terminal is low, the The target hotspot frequency band with a small number of device connections among multiple hotspot frequency bands is subjected to current limiting processing, which can reduce the power consumption of the terminal and ensure the maximum utilization of hotspot resources.

本申请实施例还提供了一种计算机存储介质,所述计算机存储介质可以存储有多条指令,所述指令适于由处理器加载并执行如上述图1-图9所示实施例的所述多频WiFi热点开启方法,具体执行过程可以参见图1-图9所示实施例的具体说明,在此不进行赘述。An embodiment of the present application further provides a computer storage medium, where the computer storage medium can store a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-described embodiments shown in FIG. 1 to FIG. 9 . For the method for enabling a multi-frequency WiFi hotspot, for the specific execution process, reference may be made to the specific description of the embodiments shown in FIG. 1 to FIG. 9 , which will not be repeated here.

本申请还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由所述处理器加载并执行如上述图1-图9所示实施例的所述多频WiFi热点开启方法,具体执行过程可以参见图1-图9所示实施例的具体说明,在此不进行赘述。The present application also provides a computer program product, the computer program product stores at least one instruction, and the at least one instruction is loaded by the processor and executes the multi-frequency in the embodiments shown in FIG. 1 to FIG. 9 above. For the specific execution process of the WiFi hotspot opening method, reference may be made to the specific description of the embodiments shown in FIG. 1 to FIG. 9 , which will not be repeated here.

请参见图13,为本申请实施例提供了一种电子设备的结构示意图。如图13所示,所述电子设备1000可以包括:至少一个处理器1001,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。Referring to FIG. 13 , a schematic structural diagram of an electronic device is provided in an embodiment of the present application. As shown in FIG. 13 , the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , user interface 1003 , memory 1005 , and at least one communication bus 1002 .

其中,通信总线1002用于实现这些组件之间的连接通信。Among them, the communication bus 1002 is used to realize the connection and communication between these components.

其中,用户接口1003可以包括显示屏(Display)、摄像头(Camera),可选用户接口1003还可以包括标准的有线接口、无线接口。The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

其中,网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Wherein, the network interface 1004 may optionally include a standard wired interface and a wireless interface (eg, a WI-FI interface).

其中,处理器1001可以包括一个或者多个处理核心。处理器1001利用各种借口和线路连接整个服务器1000内的各个部分,通过运行或执行存储在存储器1005内的指令、程序、代码集或指令集,以及调用存储在存储器1005内的数据,执行服务器1000的各种功能和处理数据。可选的,处理器1001可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable GateArray,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1001可集成中央处理器(Central ProcessingUnit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1001中,单独通过一块芯片进行实现。The processor 1001 may include one or more processing cores. The processor 1001 uses various excuses and lines to connect various parts of the entire server 1000, and executes the server by running or executing the instructions, programs, code sets or instruction sets stored in the memory 1005, and calling the data stored in the memory 1005. 1000s of various functions and processing data. Optionally, the processor 1001 may use at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware. The processor 1001 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 1001, but is implemented by a single chip.

其中,存储器1005可以包括随机存储器(RandomAccess Memory,RAM),也可以包括只读存储器(Read-OnlyMemory)。可选的,该存储器1005包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1005可用于存储指令、程序、代码、代码集或指令集。存储器1005可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图13所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及多频WiFi热点开启应用程序。The memory 1005 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. Memory 1005 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like used to implement the above method embodiments; the storage data area may store the data and the like involved in the above method embodiments. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001 . As shown in FIG. 13 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a multi-frequency WiFi hotspot opening application.

在图13所示的电子设备1000中,用户接口1003主要用于为用户提供输入的接口,获取用户输入的数据;而处理器1001可以用于调用存储器1005中存储的多频WiFi热点开启应用程序,并具体执行以下操作:In the electronic device 1000 shown in FIG. 13 , the user interface 1003 is mainly used to provide an input interface for the user to obtain the data input by the user; and the processor 1001 can be used to call the multi-frequency WiFi hotspot stored in the memory 1005 to start the application program , and specifically do the following:

接收热点开启指令,获取所述终端支持的多个热点频段;receiving a hotspot opening instruction, and acquiring multiple hotspot frequency bands supported by the terminal;

创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息;creating hotspot configuration files corresponding to the multiple hotspot frequency bands respectively, where the hotspot configuration file includes hotspot configuration information;

基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口。The frequency band port of each hotspot frequency band is configured based on the hotspot configuration information corresponding to the plurality of hotspot frequency bands, and the frequency band port of each hotspot frequency band is enabled.

在一个实施例中,所述处理器1001在执行所述创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息时,具体执行以下操作:In one embodiment, the processor 1001 specifically performs the following operations when executing the creating a hotspot configuration file corresponding to the multiple hotspot frequency bands, where the hotspot configuration file includes hotspot configuration information:

接收针对各所述热点频段所输入的热点配置信息,并分别创建存储所述热点配置信息的热点配置文件。The hotspot configuration information input for each of the hotspot frequency bands is received, and a hotspot configuration file storing the hotspot configuration information is created respectively.

在一个实施例中,所述处理器1001在执行所述基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口之前,还执行以下操作:In one embodiment, before the processor 1001 performs the configuration of the frequency band port of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, the processor 1001 further performs the following operations:

读取各所述热点配置文件中的热点配置信息,所述热点配置信息包括软接口信息以及网卡接口信息。Read the hotspot configuration information in each of the hotspot configuration files, where the hotspot configuration information includes soft interface information and network card interface information.

在一个实施例中,所述处理器1001在执行所述基于所述多个热点频段分别对应的热点配置信息配置各热点频段的频段端口时,具体执行以下步骤:In one embodiment, when the processor 1001 configures the frequency band port of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, the processor 1001 specifically performs the following steps:

创建各所述热点频段对应的软接口,根据所述软接口信息配置所述软接口的接口参数,根据所述网卡接口信息分配所述软接口对应的网卡接口,所述网卡接口用于控制所述终端的天线收发信号。Create a soft interface corresponding to each of the hotspot frequency bands, configure the interface parameters of the soft interface according to the soft interface information, allocate the network card interface corresponding to the soft interface according to the network card interface information, and the network card interface is used to control the The antenna of the terminal can send and receive signals.

在一个实施例中,所述处理器1001在执行所述开启所述频段端口时,具体执行以下步骤:In one embodiment, when the processor 1001 executes the enabling of the frequency band port, the processor 1001 specifically executes the following steps:

确定所述各热点频段的频段端口分别对应的各加载项,并加载所述各加载项。Each add-on item corresponding to the frequency band port of each hotspot frequency band is determined, and each add-on item is loaded.

在一个实施例中,所述处理器1001在执行所述热点配置信息还包括开启时间信息,所述开启所述各热点频段的频段端口时,具体执行以下步骤:In one embodiment, when executing the hotspot configuration information, the processor 1001 further includes opening time information, and when the frequency band port of each hotspot frequency band is opened, the following steps are specifically performed:

基于所述开启时间信息开启所述各热点频段的频段端口。The frequency band port of each hotspot frequency band is opened based on the opening time information.

在一个实施例中,所述处理器1001在执行所述多频WiFi热点开启方法时,还执行以下步骤:In one embodiment, when executing the method for enabling a multi-frequency WiFi hotspot, the processor 1001 further executes the following steps:

获取所述终端的剩余电量;obtain the remaining power of the terminal;

当所述剩余电量小于电量阈值时,获取所述各热点频段所对应的设备连接数;When the remaining power is less than the power threshold, obtain the number of device connections corresponding to the hotspot frequency bands;

在所述设备连接数中确定最小设备连接数,对所述最小设备连接数指示的目标热点频段进行限流处理。The minimum number of device connections is determined from the number of device connections, and current limiting processing is performed on the target hotspot frequency band indicated by the minimum number of device connections.

在一个实施例中,所述处理器1001在执行所述多频WiFi热点开启方法时,所述多个热点频段包括第一热点频段以及第二热点频段。In one embodiment, when the processor 1001 executes the method for enabling a multi-frequency WiFi hotspot, the multiple hotspot frequency bands include a first hotspot frequency band and a second hotspot frequency band.

在本实施例中,终端通过基于多个热点频段分别对应的配置信息开启各热点频段的频段端口,可以开启终端所支持的多个热点频段分别对应的热点,从而覆盖到电子设备支持的全部热点频段,避免了终端热点网络共享的整个过程中由于与电子设备热点频段不匹配导致电子设备无法连接热点网络的问题,提高了终端热点资源的利用率;同时当终端剩余电量较低时,对多个热点频段中设备连接数较小的目标热点频段进行限流处理,可以在降低终端功耗的同时保障热点资源的最大利用。In this embodiment, by opening the frequency band ports of each hotspot frequency band based on the configuration information corresponding to the multiple hotspot frequency bands, the terminal can open the hotspots corresponding to the multiple hotspot frequency bands supported by the terminal, thereby covering all the hotspots supported by the electronic device. The frequency band avoids the problem that the electronic device cannot connect to the hotspot network due to the mismatch with the hotspot frequency band of the electronic device during the whole process of terminal hotspot network sharing, and improves the utilization rate of the terminal hotspot resource; The target hotspot frequency band with a small number of device connections in the hotspot frequency band performs current limiting processing, which can reduce the power consumption of the terminal and ensure the maximum utilization of hotspot resources.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体或随机存储记忆体等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. Wherein, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, or a random storage memory, and the like.

以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。The above disclosures are only the preferred embodiments of the present application, and of course, the scope of the rights of the present application cannot be limited by this. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.

Claims (10)

1.一种多频WiFi热点开启方法,应用于终端,其特征在于,所述方法包括:1. A method for opening a multi-frequency WiFi hotspot, applied to a terminal, wherein the method comprises: 接收热点开启指令,获取所述终端支持的多个热点频段;receiving a hotspot opening instruction, and acquiring multiple hotspot frequency bands supported by the terminal; 创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息;creating hotspot configuration files corresponding to the multiple hotspot frequency bands respectively, where the hotspot configuration file includes hotspot configuration information; 基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口;Configure the frequency band ports of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, and enable the frequency band ports of the various hotspot frequency bands; 所述方法还包括:The method also includes: 获取所述终端的剩余电量;当所述剩余电量小于电量阈值时,获取所述各热点频段所对应的设备连接数;Obtain the remaining power of the terminal; when the remaining power is less than the power threshold, obtain the number of device connections corresponding to the hotspot frequency bands; 在所述设备连接数中确定最小设备连接数,对所述最小设备连接数指示的目标热点频段进行限流处理。The minimum number of device connections is determined from the number of device connections, and current limiting processing is performed on the target hotspot frequency band indicated by the minimum number of device connections. 2.根据权利要求1所述的方法,其特征在于,所述创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息包括:2 . The method according to claim 1 , wherein the creating hotspot configuration files corresponding to the plurality of hotspot frequency bands, wherein the hotspot configuration file contains hotspot configuration information comprising: 2 . 接收针对各所述热点频段所输入的热点配置信息,并分别创建存储所述热点配置信息的热点配置文件。The hotspot configuration information input for each of the hotspot frequency bands is received, and a hotspot configuration file storing the hotspot configuration information is created respectively. 3.根据权利要求1所述的方法,其特征在于,所述基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口之前,还包括:3 . The method according to claim 1 , wherein before configuring the frequency band port of each hotspot frequency band based on the hotspot configuration information corresponding to the multiple hotspot frequency bands, the method further comprises: 4 . 读取各所述热点配置文件中的热点配置信息,所述热点配置信息包括软接口信息以及网卡接口信息。Read the hotspot configuration information in each of the hotspot configuration files, where the hotspot configuration information includes soft interface information and network card interface information. 4.根据权利要求3所述的方法,其特征在于,所述基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,包括:4. The method according to claim 3, wherein the configuring the frequency band port of each hotspot frequency band based on the hotspot configuration information corresponding to the plurality of hotspot frequency bands, comprises: 创建各所述热点频段对应的软接口,根据所述软接口信息配置所述软接口的接口参数,根据所述网卡接口信息分配所述软接口对应的网卡接口,所述网卡接口用于控制所述终端的天线收发信号。Create a soft interface corresponding to each of the hotspot frequency bands, configure the interface parameters of the soft interface according to the soft interface information, allocate the network card interface corresponding to the soft interface according to the network card interface information, and the network card interface is used to control the The antenna of the terminal can send and receive signals. 5.根据权利要求1所述的方法,其特征在于,所述热点配置信息还包括开启时间信息,所述开启所述各热点频段的频段端口,包括:5 . The method according to claim 1 , wherein the hotspot configuration information further includes opening time information, and the enabling of the frequency band ports of the respective hotspot frequency bands comprises: 5 . 基于所述开启时间信息开启所述各热点频段的频段端口。The frequency band port of each hotspot frequency band is opened based on the opening time information. 6.根据权利要求1~5任意一项所述的方法,其特征在于,所述开启各热点频段的频段端口,包括:The method according to any one of claims 1 to 5, wherein the enabling the frequency band port of each hotspot frequency band comprises: 确定所述各热点频段的频段端口分别对应的各加载项,并加载所述各加载项。Each add-on item corresponding to the frequency band port of each hotspot frequency band is determined, and each add-on item is loaded. 7.根据权利要求1所述的方法,其特征在于,所述多个热点频段包括第一热点频段以及第二热点频段。7. The method according to claim 1, wherein the plurality of hotspot frequency bands comprise a first hotspot frequency band and a second hotspot frequency band. 8.一种多频WiFi热点开启装置,其特征在于,应用于终端,所述装置包括:8. A device for opening a multi-frequency WiFi hotspot, characterized in that, when applied to a terminal, the device comprises: 热点频段获取模块,用于接收热点开启指令,获取终端支持的多个热点频段;The hotspot frequency band acquisition module is used to receive the hotspot open command and obtain multiple hotspot frequency bands supported by the terminal; 配置文件创建模块,用于创建所述多个热点频段分别对应的热点配置文件,所述热点配置文件包含热点配置信息;a configuration file creation module, configured to create a hotspot configuration file corresponding to the plurality of hotspot frequency bands, the hotspot configuration file contains hotspot configuration information; 频段端口开启模块,用于基于所述多个热点频段分别对应的所述热点配置信息配置各热点频段的频段端口,开启所述各热点频段的频段端口;a frequency band port opening module, configured to configure frequency band ports of each hotspot frequency band based on the hotspot configuration information corresponding to the plurality of hotspot frequency bands, and open the frequency band ports of each hotspot frequency band; 所述装置还用于:获取所述终端的剩余电量;当所述剩余电量小于电量阈值时,获取所述各热点频段所对应的设备连接数;在所述设备连接数中确定最小设备连接数,对所述最小设备连接数指示的目标热点频段进行限流处理。The device is further configured to: obtain the remaining power of the terminal; when the remaining power is less than a power threshold, obtain the number of device connections corresponding to each hotspot frequency band; and determine the minimum number of device connections in the number of device connections , and perform current limiting processing on the target hotspot frequency band indicated by the minimum number of device connections. 9.一种计算机存储介质,其特征在于,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1~7任意一项的方法步骤。9. A computer storage medium, characterized in that the computer storage medium stores a plurality of instructions, the instructions are suitable for being loaded by a processor and performing the method steps of any one of claims 1-7. 10.一种电子设备,其特征在于,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如权利要求1~7任意一项的方法步骤。10. An electronic device, comprising: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute any one of claims 1 to 7 method steps for the item.
CN202010095422.7A 2020-02-17 2020-02-17 Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment Active CN111356209B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010095422.7A CN111356209B (en) 2020-02-17 2020-02-17 Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010095422.7A CN111356209B (en) 2020-02-17 2020-02-17 Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111356209A CN111356209A (en) 2020-06-30
CN111356209B true CN111356209B (en) 2022-04-26

Family

ID=71196980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010095422.7A Active CN111356209B (en) 2020-02-17 2020-02-17 Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111356209B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220312203A1 (en) * 2021-03-24 2022-09-29 Canon Kabushiki Kaisha Communication apparatus, communication method, and storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970750B (en) * 2020-08-18 2024-07-09 维沃移动通信有限公司 Multi-frequency WiFi identification method and device
CN113423116B (en) * 2021-08-25 2021-12-24 广州朗国电子科技股份有限公司 Configuration method of 5G hot spot default mode based on Android system
CN116419426A (en) * 2021-12-31 2023-07-11 中兴通讯股份有限公司 Method, terminal and storage medium for establishing communication connection
CN115002758B (en) * 2022-05-26 2025-05-13 深圳市联洲国际技术有限公司 Configuration method, configuration device and processor of multi-frequency wireless hotspot
CN115175277B (en) * 2022-06-13 2025-03-28 中兴通讯股份有限公司 Dual-band router control method, dual-band router control device and storage medium
CN115811777A (en) * 2022-12-08 2023-03-17 北京小米移动软件有限公司 A communication method, communication device and storage medium
CN118714549B (en) * 2024-06-03 2025-07-04 荣耀终端股份有限公司 Mobile hotspot control method and electronic device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661288A (en) * 2013-11-18 2015-05-27 网件公司 Systems and methods for improving WLAN range
CN106162665A (en) * 2015-03-15 2016-11-23 宏达国际电子股份有限公司 Wireless network system and its setting method
CN106454975A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment
CN106603526A (en) * 2016-12-07 2017-04-26 广东欧珀移动通信有限公司 WiFi/hotspot enabling method and device
CN106658623A (en) * 2016-09-14 2017-05-10 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment
CN106714279A (en) * 2016-11-14 2017-05-24 广东欧珀移动通信有限公司 A hotspot network switching method and terminal equipment
CN106973424A (en) * 2017-03-28 2017-07-21 维沃移动通信有限公司 The creation method and terminal of a kind of WAP
CN107580359A (en) * 2017-09-29 2018-01-12 努比亚技术有限公司 Hotspot sharing method, mobile terminal and computer-readable recording medium
CN107608629A (en) * 2017-08-30 2018-01-19 努比亚技术有限公司 A kind of data migration method, terminal and computer-readable recording medium
CN108307433A (en) * 2017-09-29 2018-07-20 努比亚技术有限公司 Hotspot sharing method, mobile terminal and computer readable storage medium
CN110913450A (en) * 2019-11-28 2020-03-24 宇龙计算机通信科技(深圳)有限公司 Control method and device for mobile hotspot, mobile terminal and storage medium
CN113228819A (en) * 2018-12-20 2021-08-06 赛普拉斯半导体公司 Operation of access points and autonomous group owners

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661288A (en) * 2013-11-18 2015-05-27 网件公司 Systems and methods for improving WLAN range
CN106162665A (en) * 2015-03-15 2016-11-23 宏达国际电子股份有限公司 Wireless network system and its setting method
WO2018049971A1 (en) * 2016-09-14 2018-03-22 广东欧珀移动通信有限公司 Hotspot network switching method and terminals
CN106454975A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment
CN106658623A (en) * 2016-09-14 2017-05-10 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment
CN106714279A (en) * 2016-11-14 2017-05-24 广东欧珀移动通信有限公司 A hotspot network switching method and terminal equipment
CN106603526A (en) * 2016-12-07 2017-04-26 广东欧珀移动通信有限公司 WiFi/hotspot enabling method and device
CN106973424A (en) * 2017-03-28 2017-07-21 维沃移动通信有限公司 The creation method and terminal of a kind of WAP
CN107608629A (en) * 2017-08-30 2018-01-19 努比亚技术有限公司 A kind of data migration method, terminal and computer-readable recording medium
CN107580359A (en) * 2017-09-29 2018-01-12 努比亚技术有限公司 Hotspot sharing method, mobile terminal and computer-readable recording medium
CN108307433A (en) * 2017-09-29 2018-07-20 努比亚技术有限公司 Hotspot sharing method, mobile terminal and computer readable storage medium
CN113228819A (en) * 2018-12-20 2021-08-06 赛普拉斯半导体公司 Operation of access points and autonomous group owners
CN110913450A (en) * 2019-11-28 2020-03-24 宇龙计算机通信科技(深圳)有限公司 Control method and device for mobile hotspot, mobile terminal and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Data-Driven Approach to Client-Transparent Access Selection of Dual-Band WiFi;Jun Zhang;《IEEE Transactions on Network and Service Management 》;20181108;全文 *
双频路由器怎么设置2.4G和5G;专注互联网资讯;《https://jingyan.baidu.com/article/5bbb5a1bca03a313eba179c4.html》;20181118;全文 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220312203A1 (en) * 2021-03-24 2022-09-29 Canon Kabushiki Kaisha Communication apparatus, communication method, and storage medium

Also Published As

Publication number Publication date
CN111356209A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN111356209B (en) Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment
CN111741513B (en) Network distribution method of Internet of things equipment and related equipment
CN109391648B (en) A method, device and communication system for associating application and network slicing
CN108476060B (en) Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
US20200288521A1 (en) Electronic device and method for forming wi-fi direct group thereof
CN106332307B (en) Method for accessing application program to network and mobile terminal
JP7200312B2 (en) Method and terminal device for establishing a hotspot connection
CN106304276B (en) A wireless network processing method and mobile terminal
US10212210B2 (en) Electronic device and method of providing information about the access point (AP)
CN106506862B (en) Mobile terminal working mode switching method and mobile terminal
US9883545B2 (en) Apparatus and method for selecting channel in wireless communication system
CN107147549B (en) Intelligent household equipment networking method and device
CN104936258A (en) Network access method, terminal and system
CN106507447A (en) A Wi-Fi hotspot connection method and mobile terminal
CN112839326A (en) Network switching method, device, storage medium and gateway equipment
US10757692B2 (en) Method for determining network standard in wireless communications network, access point device, terminal device, and radio network controller
CN108462994B (en) Channel selection method of personal hotspot and related products
CN108601063B (en) Personal hotspot implementation method and related products
CN110502280B (en) Android operating system starting method and device, storage medium and terminal
WO2020010995A1 (en) Icon arrangement method and apparatus, and readable storage medium and mobile terminal
US10917842B2 (en) Access point connection method and terminal
CN106535229B (en) WiFi signal receiving sensitivity testing method and mobile terminal
CN107371203A (en) Establish the method and Related product of calling
CN112256335A (en) Drive file loading method and device, storage medium and electronic equipment
CN118265157A (en) Uplink positioning reference signal frequency hopping method, device and terminal

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
GR01 Patent grant
GR01 Patent grant