[go: up one dir, main page]

CN113438102B - Network configuration system, network configuration method, electronic device and routing device - Google Patents

Network configuration system, network configuration method, electronic device and routing device Download PDF

Info

Publication number
CN113438102B
CN113438102B CN202110635811.9A CN202110635811A CN113438102B CN 113438102 B CN113438102 B CN 113438102B CN 202110635811 A CN202110635811 A CN 202110635811A CN 113438102 B CN113438102 B CN 113438102B
Authority
CN
China
Prior art keywords
information
access point
routing
network configuration
electronic device
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
CN202110635811.9A
Other languages
Chinese (zh)
Other versions
CN113438102A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110635811.9A priority Critical patent/CN113438102B/en
Publication of CN113438102A publication Critical patent/CN113438102A/en
Application granted granted Critical
Publication of CN113438102B publication Critical patent/CN113438102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

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

Abstract

本申请适用于终端技术领域,提供了一种网络配置系统、网络配置方法、电子设备及路由设备。针对新购入或者重置后的路由设备进行网络配置的应用场景,在本申请的网络配置系统中,电子设备在接入点模式广播协议报文和接入点名称,路由设备识别接收的协议报文得到目标标识字段和接入点名称,并基于目标标识字段将协议报文中的接入点名称与获取到的电子设备广播的接入点名称进行匹配,两者匹配一致后,路由设备和电子设备可以建立通信连接,从而路由设备可以接收电子设备发送的网络配置信息完成网络配置。降低了其他电子设备无需密码即可连接路由设备的可能性,提高了对路由设备网络配置的安全性。

Figure 202110635811

The present application is applicable to the field of terminal technology, and provides a network configuration system, a network configuration method, an electronic device and a routing device. For the application scenario of network configuration for newly purchased or reset routing devices, in the network configuration system of the present application, the electronic device broadcasts the protocol message and the access point name in the access point mode, and the routing device identifies the received protocol. The message obtains the target identification field and the access point name, and based on the target identification field, matches the access point name in the protocol message with the obtained access point name broadcast by the electronic device. A communication connection can be established with the electronic device, so that the routing device can receive the network configuration information sent by the electronic device to complete the network configuration. The possibility that other electronic devices can connect to the routing device without a password is reduced, and the security of the network configuration of the routing device is improved.

Figure 202110635811

Description

网络配置系统、网络配置方法、电子设备及路由设备Network configuration system, network configuration method, electronic device and routing device

技术领域technical field

本申请涉及终端技术领域,尤其涉及网络配置系统、网络配置方法、电子设备及路由设备。The present application relates to the field of terminal technologies, and in particular, to a network configuration system, a network configuration method, an electronic device, and a routing device.

背景技术Background technique

路由设备为网络互连的核心设备。其中,以家庭使用的普通路由器为例,作为连接多个网络的网关设备,在接入网络之前需要通过电子设备对其进行网络配置。The routing device is the core device for network interconnection. Among them, taking an ordinary router used in a home as an example, as a gateway device connecting multiple networks, it needs to be configured with an electronic device before accessing the network.

目前,在通过电子设备对路由器进行网络配置时,电子设备无需密码就可以与路由器建立连接,进而对路由器进行配置。该网络配置的方式,容易被用户以外的其他人进行恶意连接,导致在网络配置时存在一定的安全隐患。At present, when network configuration is performed on a router through an electronic device, the electronic device can establish a connection with the router without a password, and then configure the router. The network configuration method is easy to be maliciously connected by others other than the user, which leads to certain security risks in the network configuration.

发明内容SUMMARY OF THE INVENTION

本申请提供一种网络配置系统、网络配置方法、电子设备及路由设备,可以提高路由器网络配置的安全性。The present application provides a network configuration system, a network configuration method, an electronic device and a routing device, which can improve the security of router network configuration.

为达到上述目的,本申请采用如下技术方案:To achieve the above object, the application adopts the following technical solutions:

第一方面,提供一种网络配置系统,所述系统包括电子设备和路由设备;In a first aspect, a network configuration system is provided, the system includes an electronic device and a routing device;

所述电子设备,用于:The electronic equipment is used for:

在启动接入点模式后,广播协议报文以及接入点信息,所述协议报文包括预定的目标标识字段以及接入点信息;After starting the access point mode, broadcast a protocol message and access point information, where the protocol message includes a predetermined target identification field and access point information;

所述路由设备,用于:The routing device is used for:

在工作站模式下,接收到协议报文后,对接收到的协议报文进行识别,若识别到该协议报文中包含所述目标标识字段,则获取接入点信息,并将获取到的接入点信息与所述协议报文中的接入点信息进行匹配;In the workstation mode, after receiving the protocol packet, the received protocol packet is identified, and if it is identified that the protocol packet contains the target identification field, the access point information is acquired, and the acquired access point information is obtained. matching the access point information with the access point information in the protocol packet;

若获取到的接入点信息中存在与所述协议报文中的接入点信息匹配一致的接入点信息,则与所述电子设备建立通信连接,并向所述电子设备反馈通信连接成功的信息;If there is access point information that matches the access point information in the protocol message in the obtained access point information, establish a communication connection with the electronic device, and report back to the electronic device that the communication connection is successful Information;

所述电子设备,还用于:The electronic equipment is also used for:

在接收到所述路由设备反馈的通信连接成功的信息后,接收用户输入的网络配置信息,并将所述网络配置信息发送给所述路由设备;After receiving the successful communication connection information fed back by the routing device, receiving the network configuration information input by the user, and sending the network configuration information to the routing device;

所述路由设备,还用于:The routing device is also used for:

根据接收到的所述网络配置信息进行网络配置。Perform network configuration according to the received network configuration information.

由于新购入或者重置后的路由设备一般都使用出厂时的默认名称时,在用户电子设备附近存在多个路由设备时,可能存在无意识连错路由设备的情况;或者在路由设备接通电源后被用户电子设备以外的其他电子设备进行恶意连接的情况。从而本申请针对上述可能存在的情况,提供一种网络配置系统,可以应用在对新购入或者重置后的路由设备进行网络配置的场景。Since the newly purchased or reset routing devices generally use the factory default names, when there are multiple routing devices near the user's electronic device, there may be a situation in which the wrong routing device is unintentionally connected; or when the routing device is powered on The situation where malicious connection is made by other electronic devices other than the user's electronic device. Therefore, the present application provides a network configuration system for the above possible situations, which can be applied to the scenario of network configuration of newly purchased or reset routing equipment.

需要说明的是,在上述网络配置系统中,网络配置之前,电子设备处于接入点模式,路由设备处于工作站模式,两者可以通过广播的方式在一致的物理信道上进行无连接的广播通信;从而电子设备可以用于向路由设备周期性地广播协议报文和接入点信息,路由设备处于被动接收状态,可以用于接收协议报文和接入点信息。It should be noted that, in the above network configuration system, before the network configuration, the electronic device is in the access point mode, and the routing device is in the workstation mode, and the two can perform connectionless broadcast communication on the same physical channel by broadcasting; Therefore, the electronic device can be used to periodically broadcast the protocol packet and the access point information to the routing device, and the routing device is in a passive receiving state and can be used to receive the protocol packet and the access point information.

示例性的,协议报文中的目标标识字段可以为电子设备和路由设备预先设定一致的特殊标识字段,例如“连接connection”或者“配置configuration”等。Exemplarily, the target identification field in the protocol packet may preset a consistent special identification field for the electronic device and the routing device, such as "connection" or "configuration".

示例性的,协议报文中还可以包括电子设备处于接入点模式时的接入点信息,接入点信息中可以包括电子设备个人热点的热点名称以及电子设备可以支持的速率等信息。Exemplarily, the protocol message may further include access point information when the electronic device is in the access point mode, and the access point information may include information such as the hotspot name of the personal hotspot of the electronic device and the speed that the electronic device can support.

其中,路由设备获取的接入点信息为电子设备直接广播出的接入点信息,可以为在识别协议报文之前接收到的并存储的接入点信息,也可以是识别协议报文后接收到的接入点信息。The access point information acquired by the routing device is the access point information directly broadcasted by the electronic device, which may be the access point information received and stored before the identification protocol message, or may be received after the identification protocol message. to the access point information.

需要说明的是,接入点信息中的热点名称还可以由用户自行设置。It should be noted that the hotspot name in the access point information can also be set by the user.

由于路由器处于工作站模式,电子设备广播接入点信息的同时还广播了用于进行信息匹配的协议报文,使得用户以外的其他电子设备无法连接到路由设备,从而在对路由设备进行网络配置时,降低了其他电子设备可能恶意连接及配置的概率,提高了路由设备网络配置的安全性。Since the router is in the workstation mode, the electronic device broadcasts the access point information and also broadcasts the protocol message for information matching, so that other electronic devices other than the user cannot connect to the routing device. , reducing the possibility of malicious connection and configuration of other electronic devices, and improving the security of the network configuration of the routing device.

另外,通过电子设备发送协议报文,路由设备对协议报文中目标标识字段的识别,以及基于目标标识字段触发的获取电子设备广播的热点名称、匹配热点名称的过程,还可以有效避免出现无意识连错其他路由设备的情况。In addition, the electronic device sends the protocol message, the routing device recognizes the target identification field in the protocol message, and the process of acquiring the hotspot name broadcasted by the electronic device and matching the hotspot name triggered by the target identification field can also effectively avoid unconsciousness. Misconnection to other routing devices.

在第一方面的一种可能的实现方式中,所述电子设备,还用于:In a possible implementation manner of the first aspect, the electronic device is further configured to:

通过第一预定方式开启热点,进入所述接入点模式;Turn on the hotspot through the first predetermined method, and enter the access point mode;

其中,所述第一预定方式包括:电子设备接收用户点击目标控件输入第一触发指令并响应于所述第一触发指令的方式;Wherein, the first predetermined manner includes: a manner in which the electronic device receives a user clicking a target control to input a first trigger instruction and responds to the first trigger instruction;

所述路由设备,还用于:The routing device is also used for:

通过第二预定方式进入所述工作站模式;enter the workstation mode through a second predetermined manner;

其中,所述第二预定方式包括:路由设备接收用户点击目标按键输入第三触发指令并响应于所述第三触发指令的方式。Wherein, the second predetermined manner includes: a manner in which the routing device receives a user clicking a target button to input a third trigger instruction and responds to the third trigger instruction.

示例性的,第一预定方式还可以包括通过语音交互的方式,通过唤醒电子设备的语音助手,控制电子设备开启热点,进入接入点模式。目标控件可以是个人热点的开关控件,还可以是个人热点图表对应的控件。Exemplarily, the first predetermined manner may further include, by means of voice interaction, by waking up the voice assistant of the electronic device, and controlling the electronic device to turn on the hotspot and enter the access point mode. The target control may be a personal hotspot switch control, or may be a control corresponding to the personal hotspot chart.

示例性的,第二预定方式还可以是通过触摸屏接收用户输入的触摸控制指令或通过麦克风接收用户输入语音控制指令的方式;第三触发指令可以是用户通过长按3秒目标按键输入的指令。Exemplarily, the second predetermined manner may also be a manner of receiving a touch control instruction input by the user through a touch screen or a manner of receiving a voice control instruction input by the user through a microphone; the third trigger instruction may be an instruction input by the user by long pressing the target key for 3 seconds.

在第一方面的一种可能的实现方式中,所述电子设备,还用于:In a possible implementation manner of the first aspect, the electronic device is further configured to:

在启动接入点模式后,接收用户输入的第二触发指令,响应于所述第二触发指令,启动配网向导,所述配网向导用于指示开始广播所述协议报文。After starting the access point mode, a second trigger instruction input by the user is received, and in response to the second trigger instruction, a network configuration guide is started, and the network configuration guide is used to instruct to start broadcasting the protocol message.

一方面,电子设备在开启热点,进入工作站模式后,可以用于广播接入点信息和协议报文。On the one hand, after the electronic device turns on the hotspot and enters the workstation mode, it can be used to broadcast access point information and protocol packets.

另一方面,针对在电子设备日常提供热点的工作场景,为了降低电子设备在接入点模式同时广播协议报文和接入点信息的功耗,在电子设备启动接入点模式后,可以用于只广播接入点信息,从而满足电子设备日常提供热点的工作需求;在需要对路由设备进行网络配置的应用场景时,电子设备在接入点模式下,还可以用于接收用户输入的第二触发指令,响应于第二触发指令,再广播包含目标标识字段的协议报文。从而可以降低电子设备在日常提供热点的工作场景下的功耗,并且在接收到第二触发指令后,依然可以用于实现对路由器进行网络配置。On the other hand, in order to reduce the power consumption of the electronic device broadcasting protocol packets and access point information at the same time in the access point mode, after the electronic device starts the access point mode, you can use the It only broadcasts the access point information, so as to meet the daily work requirements of electronic devices to provide hotspots; in the application scenario where the network configuration of the routing device is required, the electronic device in the access point mode can also be used to receive the first input from the user. Second trigger instruction, in response to the second trigger instruction, rebroadcast the protocol message including the target identification field. Therefore, the power consumption of the electronic device in the daily working scenario of providing a hotspot can be reduced, and after receiving the second trigger instruction, it can still be used to implement network configuration on the router.

在第一方面的一种可能的实现方式中,所述电子设备还用于:In a possible implementation manner of the first aspect, the electronic device is further configured to:

在接收到路由设备反馈的通信连接成功的信息后,显示一个窗口,所述窗口用于供用户输入所述网络配置信息:After receiving the successful communication connection information fed back by the routing device, a window is displayed, and the window is used for the user to input the network configuration information:

所述路由设备,还用于:The routing device is also used for:

在根据所述网络配置信息进行网络配置之后,发出完成网络配置的提示信息,发出所述提示信息的方式包括语音、弹窗显示、灯光闪烁中的一种或多种。After the network configuration is performed according to the network configuration information, prompt information for completing the network configuration is sent, and the prompt information is sent out by one or more of voice, pop-up window display, and light flashing.

示例性的,在路由设备将获取到的接入点信息与协议报文中的接入点信息匹配一致后,路由设备与电子设备建立通信连接,并向电子设备反馈连接成功的信息。Exemplarily, after the routing device matches the acquired access point information with the access point information in the protocol message, the routing device establishes a communication connection with the electronic device, and feeds back information about the successful connection to the electronic device.

一种可能的实现方式中,由于电子设备在开启热点进入接入点模式后,即可广播协议报文和接入点信息;电子设备在接收到路由设备反馈的连接成功的信息并接收到配置路由设备的地址信息后,可以直接显示上述窗口,该窗口提供用户可以输入网络配置信息的区域(该过程无需第二触发指令的参与)。In a possible implementation manner, since the electronic device can broadcast the protocol message and the access point information after the hotspot is turned on and enters the access point mode; After the address information of the device is routed, the above-mentioned window can be directly displayed, and the window provides an area where the user can input the network configuration information (this process does not require the participation of the second trigger instruction).

另一种可能的实现方式中,电子设备在开启热点进入接入点模式后,可以广播协议报文和接入点信息;电子设备在接收到路由设备反馈的连接成功的信息后,还可以接收用户点击配网向导的控件,响应于该点击操作,电子设备接收到路由设备反馈的配置路由设备的地址信息后,加载并显示上述窗口。此时,所述的配网向导控件用于指示后续接收用户输入网络配置信息的流程。In another possible implementation, the electronic device can broadcast protocol packets and access point information after the hotspot is turned on and enter the access point mode; after receiving the successful connection information fed back by the routing device, the electronic device can also receive The user clicks on the control of the network configuration wizard, and in response to the click operation, the electronic device loads and displays the above window after receiving the address information for configuring the routing device fed back by the routing device. At this time, the network configuration wizard control is used to instruct the subsequent process of receiving the network configuration information input by the user.

还有一种可能的实现方式中,电子设备在开启热点进入接入点模式后,可以只广播接入点信息,在接收到用户点击配网向导的操作后,开始广播协议报文;然后在路由设备与电子设备建立通信连接,电子设备接收到路由设备反馈的配置路由设备的地址信息后,电子设备直接跳转至上述窗口的显示界面。In another possible implementation, after the electronic device turns on the hotspot and enters the access point mode, it can only broadcast the access point information, and after receiving the operation of the user clicking on the network configuration wizard, it starts to broadcast the protocol message; The device establishes a communication connection with the electronic device, and after the electronic device receives the address information for configuring the routing device fed back by the routing device, the electronic device directly jumps to the display interface of the above window.

在第一方面的一种可能的实现方式中,所述电子设备与所述路由设备建立的通信连接为通过蓝牙、近距无线通信技术、数据网络中的任意一种方式进行的连接。In a possible implementation manner of the first aspect, the communication connection established between the electronic device and the routing device is a connection through any one of Bluetooth, short-range wireless communication technology, and a data network.

第二方面,本申请实施例提供一种电子设备,所述电子设备包括:In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

无线广播模块,用于在启动接入点模式后,广播协议报文以及接入点信息,所述协议报文包括目标标识字段以及接入点信息;a wireless broadcast module, configured to broadcast a protocol message and access point information after starting the access point mode, where the protocol message includes a target identification field and access point information;

无线发送模块,用于在接收到路由设备反馈的通信连接成功的信息后,接收用户输入的网络配置信息,并将所述网络配置信息发送给所述路由设备进行网络配置;其中,所述通信连接成功的信息为所述路由设备与所述电子设备建立通信连接之后反馈的,所述路由设备与所述电子设备建立通信连接的条件包括:路由设备接收到的协议报文中包含目标标识字段,且所述路由设备获取到的接入点信息中存在与该协议报文中的接入点信息匹配一致的接入点信息。The wireless sending module is configured to receive the network configuration information input by the user after receiving the information that the communication connection is successful fed back by the routing device, and send the network configuration information to the routing device for network configuration; wherein, the communication The connection success information is fed back after the routing device establishes a communication connection with the electronic device, and the conditions for establishing a communication connection between the routing device and the electronic device include: the protocol message received by the routing device contains a target identification field , and the access point information obtained by the routing device contains access point information that matches the access point information in the protocol packet.

示例性的,电子设备可以是手机、平板电脑、智能手表或者笔记本电脑等设备。Exemplarily, the electronic device may be a device such as a mobile phone, a tablet computer, a smart watch, or a laptop computer.

在第二方面的一种可能的实现方式中,所述电子设备还包括:In a possible implementation manner of the second aspect, the electronic device further includes:

热点控制模块,用于通过第一预定方式开启热点,进入所述接入点模式;a hotspot control module, configured to turn on the hotspot through the first predetermined method and enter the access point mode;

其中,所述第一预定方式包括:电子设备接收用户点击目标控件输入第一触发指令并响应于所述第一触发指令的方式。Wherein, the first predetermined manner includes: a manner in which the electronic device receives a user clicking a target control to input a first trigger instruction and responds to the first trigger instruction.

在第二方面的一种可能的实现方式中,所述电子设备还包括:In a possible implementation manner of the second aspect, the electronic device further includes:

配网控制模块,用于在启动接入点模式后,接收用户输入的第二触发指令,响应于所述第二触发指令,启动配网向导,所述配网向导用于指示开始广播所述协议报文。The distribution network control module is used to receive the second trigger instruction input by the user after starting the access point mode, and in response to the second trigger instruction, start the distribution network wizard, and the network distribution wizard is used to instruct to start broadcasting the protocol message.

在第二方面的一种可能的实现方式中,所述电子设备还包括:In a possible implementation manner of the second aspect, the electronic device further includes:

显示单元,用于在电子设备接收到路由设备反馈的通信连接成功的信息后,显示一个窗口,所述窗口用于供用户输入所述网络配置信息。The display unit is configured to display a window after the electronic device receives the successful communication connection information fed back by the routing device, where the window is used for the user to input the network configuration information.

在第二方面的一种可能的实现方式中,所述通信连接为通过蓝牙、近距无线通信技术、数据网络中的任意一种方式进行的连接。In a possible implementation manner of the second aspect, the communication connection is a connection through any one of Bluetooth, short-range wireless communication technology, and data network.

第三方面,本申请实施例提供一种路由设备,所述路由设备包括:In a third aspect, an embodiment of the present application provides a routing device, where the routing device includes:

中央处理器,用于在工作站模式下接收到电子设备广播的协议报文后,对接收到的协议报文进行识别,若识别到所述协议报文中包含预定的目标标识字段,则获取接入点信息,并将获取到的接入点信息与所述协议报文中的接入点信息进行匹配;The central processing unit is used to identify the received protocol message after receiving the protocol message broadcast by the electronic device in the workstation mode, and if it is recognized that the protocol message contains a predetermined target identification field, obtain the received protocol message. Access point information, and match the obtained access point information with the access point information in the protocol packet;

无线通信模块,用于若获取到的接入点信息中存在与所述协议报文中的接入点信息匹配一致的接入点信息,则所述路由设备与所述电子设备建立通信连接,并向所述电子设备反馈通信连接成功的信息;A wireless communication module, configured to establish a communication connection between the routing device and the electronic device if there is access point information that matches the access point information in the protocol message in the obtained access point information, and feed back the information that the communication connection is successful to the electronic device;

网络配置模块,用于接收所述电子设备发送的网络配置信息,根据所述网络配置信息进行网络配置,其中,所述网络配置信息是所述电子设备在接收到所述路由设备反馈的通信连接成功的信息后发送的。A network configuration module, configured to receive network configuration information sent by the electronic device, and perform network configuration according to the network configuration information, wherein the network configuration information is the communication connection that the electronic device receives feedback from the routing device Sent after a successful message.

在第三方面的一种可能的实现方式中,所述路由设备还包括:In a possible implementation manner of the third aspect, the routing device further includes:

模式控制模块,用于在工作站模式下接收到电子设备广播的协议报文之前,通过第二预定方式进入所述工作站模式;其中,所述第二预定方式包括:路由设备接收用户点击目标按键输入第三触发指令并响应于所述第三触发指令的方式。The mode control module is configured to enter the workstation mode through a second predetermined mode before receiving the protocol message broadcast by the electronic device in the workstation mode; wherein, the second predetermined mode includes: the routing device receives the input of the user clicking the target key The third triggering instruction and the manner of responding to the third triggering instruction.

在第三方面的一种可能的实现方式中,所述路由设备还包括:In a possible implementation manner of the third aspect, the routing device further includes:

提示模块,用于在根据所述网络配置信息进行网络配置之后,发出所述提示信息的方式包括语音、弹窗显示、灯光闪烁中的一种或多种。The prompting module is configured to send out the prompting information after the network configuration is performed according to the network configuration information, including one or more of voice, pop-up window display, and light flashing.

在第三方面的一种可能的实现方式中,所述模式控制模块还用于在根据所述网络配置信息进行网络配置之后,由工作站模式切换至接入点模式。In a possible implementation manner of the third aspect, the mode control module is further configured to switch from the workstation mode to the access point mode after network configuration is performed according to the network configuration information.

第四方面,提供一种网络配置方法,应用于电子设备,所述方法包括:电子设备在启动接入点模式后,广播协议报文以及接入点信息,所述协议报文包括目标标识字段以及接入点信息;In a fourth aspect, a network configuration method is provided, applied to an electronic device, the method comprising: after the electronic device starts an access point mode, broadcasting a protocol message and access point information, the protocol message including a target identification field and access point information;

电子设备在接收到路由设备反馈的通信连接成功的信息后,接收用户输入的网络配置信息,并将所述网络配置信息发送给所述路由设备进行网络配置;其中,所述通信连接成功的信息为所述路由设备与所述电子设备建立通信连接之后反馈的,所述路由设备与所述电子设备建立通信连接的条件包括:路由设备接收到的协议报文中包含目标标识字段,且所述路由设备获取到的接入点信息中存在与该协议报文中的接入点信息匹配一致的接入点信息。After receiving the information of successful communication connection fed back by the routing device, the electronic device receives the network configuration information input by the user, and sends the network configuration information to the routing device for network configuration; wherein, the information about the successful communication connection Feedback after the routing device establishes a communication connection with the electronic device, the conditions for establishing a communication connection between the routing device and the electronic device include: the protocol packet received by the routing device includes a target identification field, and the The access point information obtained by the routing device contains the access point information that matches the access point information in the protocol packet.

在第四方面的一种可能的实现方式中,在所述广播协议报文以及接入点信息之前,所述方法还包括:In a possible implementation manner of the fourth aspect, before the broadcast protocol message and the access point information, the method further includes:

电子设备通过第一预定方式开启热点,进入所述接入点模式;其中,所述第一预定方式包括:电子设备接收用户点击目标控件输入第一触发指令并响应于所述第一触发指令的方式。The electronic device turns on the hotspot and enters the access point mode through a first predetermined manner; wherein, the first predetermined manner includes: the electronic device receives a user clicking on a target control to input a first trigger instruction and responds to the first trigger instruction Way.

一种可能的方式,电子设备可以接收用户通过一个网络管理APP输入的开启个人热点的指令,还可以是在电子设备的设置应用中的个人热点界面输入的开启个人热点的指令。In a possible manner, the electronic device may receive an instruction to turn on the personal hotspot entered by the user through a network management APP, and may also be an instruction to turn on the personal hotspot entered on the personal hotspot interface in the setting application of the electronic device.

应理解,网络管理APP仅为一种示例,除此之外,还可以通过其它一个或多个应用程序实现本申请介绍的开启热点的过程。It should be understood that the network management APP is only an example, and in addition, the process of opening a hotspot introduced in this application may also be implemented through one or more other application programs.

在第四方面的一种可能的实现方式中,在所述广播协议报文之前,所述方法还包括:In a possible implementation manner of the fourth aspect, before the broadcast protocol message, the method further includes:

电子设备在启动接入点模式后,接收用户输入的第二触发指令,响应于所述第二触发指令,启动配网向导,所述配网向导用于指示开始广播所述协议报文。After starting the access point mode, the electronic device receives a second trigger instruction input by the user, and in response to the second trigger instruction, starts a network configuration guide, where the network configuration guide is used to instruct to start broadcasting the protocol message.

示例性的,针对电子设备在只提供个人热点的无线网络的应用场景,为了降低电子设备开启热点后同时广播协议报文和热点名称所产生的功耗或者对处理器内存的占用率,电子设备在进入接入点模式后,可以只广播接入点信息;针对需要对路由设备进行网络配置时,在接收到用户输入的第二触发指令,启动配网向导,此处的配网向导可以用于指示广播协议报文。Exemplarily, for an application scenario of an electronic device in a wireless network that only provides a personal hotspot, in order to reduce the power consumption or the occupancy rate of the processor memory caused by broadcasting the protocol message and the hotspot name at the same time after the electronic device starts the hotspot, the electronic device After entering the access point mode, only the access point information can be broadcast; for the network configuration of the routing device, after receiving the second trigger command input by the user, start the network configuration wizard. The network configuration wizard here can be used with Used to indicate broadcast protocol messages.

在第四方面的一种可能的实现方式中,在电子设备接收到路由设备反馈的通信连接成功的信息后,所述方法还包括:In a possible implementation manner of the fourth aspect, after the electronic device receives the successful communication connection information fed back by the routing device, the method further includes:

电子设备显示一个窗口,所述窗口用于供用户输入所述网络配置信息。The electronic device displays a window for the user to input the network configuration information.

示例性的,该窗口中可以显示配置路由器的地址信息、设备序列码(路由设备的),网络配置信息可以包括“网络账号”和“网络密码”分别对应的内容,以及“无线名称”和“无线密码”分别对应的内容。Exemplarily, the address information and device serial code (of the routing device) for configuring the router can be displayed in this window, and the network configuration information can include the contents corresponding to "network account" and "network password", as well as "wireless name" and "wireless name". Wireless Password" corresponding content respectively.

示例性的,电子设备可以在上网设置区域接收用户输入的“网络账号”和“网络密码”分别对应的内容,例如,“网络账号”对应的“0755***123@163.com”和“网络密码”对应的“ABCDEF”;电子设备还可以接收用户在路由设置区域输入的“无线名称”和“无线密码”分别对应的内容,例如“无线名称”对应的“小明的家123”,“无线密码”对应的“abcdef”。Exemplarily, the electronic device may receive content corresponding to the "network account" and "network password" input by the user, respectively, in the Internet setting area, for example, "0755***123@163.com" and "" "ABCDEF" corresponding to "Network Password"; the electronic device can also receive the content corresponding to "Wireless Name" and "Wireless Password" entered by the user in the routing setting area, for example, "Xiao Ming's Home 123" corresponding to "Wireless Name", " "abcdef" corresponding to "Wireless Password".

在第四方面的一种可能的实现方式中,所述通信连接为通过蓝牙、近距无线通信技术、数据网络中的任意一种方式进行的连接。In a possible implementation manner of the fourth aspect, the communication connection is a connection through any one of Bluetooth, short-range wireless communication technology, and data network.

第五方面,提供一种网络配置方法,应用于路由设备,所述方法包括:A fifth aspect provides a network configuration method, which is applied to a routing device, the method comprising:

路由设备在工作站模式下接收到电子设备广播的协议报文后,对接收到的协议报文进行识别,若识别到所述协议报文中包含预定的目标标识字段,则获取接入点信息,并将获取到的接入点信息与所述协议报文中的接入点信息进行匹配;After receiving the protocol message broadcast by the electronic device in the workstation mode, the routing device identifies the received protocol message, and if it recognizes that the protocol message contains a predetermined target identification field, obtains access point information, and matching the obtained access point information with the access point information in the protocol message;

若获取到的接入点信息中存在与所述协议报文中的接入点信息匹配一致的接入点信息,则所述路由设备与所述电子设备建立通信连接,并向所述电子设备反馈通信连接成功的信息;If there is access point information that matches the access point information in the protocol packet in the obtained access point information, the routing device establishes a communication connection with the electronic device, and sends a message to the electronic device. Feedback information about successful communication connection;

路由设备接收所述电子设备发送的网络配置信息,根据所述网络配置信息进行网络配置,其中,所述网络配置信息是所述电子设备在接收到所述路由设备反馈的通信连接成功的信息后发送的。The routing device receives the network configuration information sent by the electronic device, and performs network configuration according to the network configuration information, wherein the network configuration information is after the electronic device receives the information that the communication connection is successful fed back by the routing device sent.

需要说明的是,路由设备在工作站模式,处于被动接收的状态,可以接收电子设备广播的协议报文和接入点信息;降低了在网络配置过程中被其他电子设备进行恶意连接的可能性,提高了路由设备网络配置的安全性。It should be noted that the routing device is in the workstation mode and is in a passive receiving state, and can receive the protocol packets and access point information broadcast by the electronic device; it reduces the possibility of malicious connection by other electronic devices during the network configuration process. Improves the security of routing device network configuration.

在第五方面的一种可能的实现方式中,在所述路由设备在工作站模式下接收到电子设备广播的协议报文之前,所述方法还包括:In a possible implementation manner of the fifth aspect, before the routing device receives the protocol message broadcast by the electronic device in the workstation mode, the method further includes:

路由设备通过第二预定方式进入所述工作站模式;其中,所述第二预定方式包括:路由设备接收用户点击目标按键输入第三触发指令并响应于所述第三触发指令的方式。The routing device enters the workstation mode through a second predetermined manner, wherein the second predetermined manner includes: a manner in which the routing device receives a user clicking a target key to input a third trigger instruction and responds to the third trigger instruction.

示例性的,第二预定方式还可以是用于通过触摸屏或者麦克风输入指令并响应于该指令的方式;该指令可以是触摸指令,例如通过用户单击或双击路由设备的显示屏上显示的工作模式控件输入的指令;该指令还可以是语音指令,例如路由设备通过麦克风接收到“小路、小路,切换至工作站模式或站点模式”的语音指令。Exemplarily, the second predetermined manner may also be a manner for inputting an instruction through a touch screen or a microphone and responding to the instruction; the instruction may be a touch instruction, for example, by the user clicking or double-clicking the work displayed on the display screen of the routing device. The instruction input by the mode control; the instruction can also be a voice instruction, for example, the routing device receives the voice instruction of "path, path, switch to workstation mode or station mode" through the microphone.

在第五方面的一种可能的实现方式中,在所述根据所述网络配置信息进行网络配置之后,所述方法还包括:In a possible implementation manner of the fifth aspect, after performing the network configuration according to the network configuration information, the method further includes:

路由设备发出完成网络配置的提示信息,发出所述提示信息的方式包括语音、弹窗显示、灯光闪烁中的一种或多种。The routing device sends out prompt information for completing the network configuration, and the way of sending the prompt information includes one or more of voice, pop-up window display, and light flashing.

在第五方面的一种可能的实现方式中,在所述根据所述网络配置信息进行网络配置之后还包括:In a possible implementation manner of the fifth aspect, after performing the network configuration according to the network configuration information, the method further includes:

路由设备由工作站模式切换至接入点模式。The routing device switches from workstation mode to access point mode.

示例性的,路由设备在完成网络配置后,例如根据网络配置信息设置好网络名称、网络密码、无线名称以及无线密码等信息后,可以由当前的工作站模式直接切换至接入点模式,从而用户电子设备可以通过搜索该路由设备的无线名称接入网络,或者通过有线方式接入该路由设备的本地网接口,接入网路。Exemplarily, after the routing device completes the network configuration, for example, after setting the network name, network password, wireless name, wireless password and other information according to the network configuration information, it can directly switch from the current workstation mode to the access point mode, so that the user can directly switch to the access point mode. The electronic device can access the network by searching for the wireless name of the routing device, or access the local network interface of the routing device in a wired manner to access the network.

第六方面,本申请实施例提供一种电子设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程序时实现如上述第四方面任一项的方法。In a sixth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, any one of the above-mentioned fourth aspects is implemented. Methods.

第七方面,本申请实施例提供一种路由设备,所述路由设备包括中央处理器、无线通信模块以及交换芯片,所述无线通讯模块用于与电子设备进行无线通信,所述交换芯片用于在网络层转发无线通信数据,以及所述中央处理器用于对无线通信数据进行处理,以实现如上述第五方面任一项的方法。In a seventh aspect, an embodiment of the present application provides a routing device, the routing device includes a central processing unit, a wireless communication module, and a switching chip, the wireless communication module is used for wireless communication with an electronic device, and the switching chip is used for The wireless communication data is forwarded at the network layer, and the central processing unit is configured to process the wireless communication data, so as to implement the method according to any one of the above fifth aspects.

第八方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现如上述第四方面或第五方面任一项的方法。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the method according to any one of the fourth aspect or the fifth aspect.

第九方面,本申请实施例提供一种芯片系统,该芯片系统包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现如上述第四方面或第五方面任一项所述的方法。该芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。In a ninth aspect, an embodiment of the present application provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory, so as to implement any one of the fourth aspect or the fifth aspect above method described in item. The chip system may be a single chip, or a chip module composed of multiple chips.

第十方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第四方面或第五方面任一项所述的方法。In a tenth aspect, an embodiment of the present application provides a computer program product, which, when the computer program product runs on an electronic device, enables the electronic device to execute the method described in any one of the fourth aspect or the fifth aspect.

本申请实施例与现有技术相比存在的有益效果是:The beneficial effects that the embodiments of the present application have compared with the prior art are:

本申请实施例提供的网络配置系统,包括电子设备和路由器设备,电子设备在接入点模式下可以用于广播协议报文和接入点信息;路由设备在工作站模式下可以用于接收电子设备广播的协议报文和接入点信息,并对协议报文进行识别,得到协议报文中的目标标识字段和接入点信息;路由设备在获取电子设备的接入点信息,并将获取到的接入点信息与协议报文中的接入点信息匹配一致后,与电子设备建立通信连接,从而可以通过电子设备获取用户输入的网络配置信息并进行网络配置;由于路由设备处于工作站模式并对接收到的协议报文的识别后,与匹配的电子设备建立通信连接;使得用户电子设备以外的其他电子设备也就无法连接到该路由设备,从而降低了在配置路由设备的网络时其他电子设备进行恶意连接并配置的的可能性,提高了路由设备的网络配置的安全性。The network configuration system provided by the embodiment of the present application includes an electronic device and a router device. The electronic device can be used to broadcast protocol packets and access point information in the access point mode; the routing device can be used to receive the electronic device in the workstation mode. The broadcast protocol message and access point information, and identify the protocol message to obtain the target identification field and access point information in the protocol message; the routing device is acquiring the access point information of the electronic device, and will obtain the After the access point information in the protocol message matches the access point information in the protocol message, a communication connection is established with the electronic device, so that the network configuration information input by the user can be obtained through the electronic device and the network configuration can be performed; since the routing device is in the workstation mode and After identifying the received protocol message, establish a communication connection with the matching electronic device; so that other electronic devices other than the user's electronic device cannot connect to the routing device, thereby reducing the need for other electronic devices when configuring the network of the routing device. The possibility of malicious connection and configuration of the device improves the security of the network configuration of the routing device.

可以理解的是,上述第二方面至第十方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that, for the beneficial effects of the foregoing second aspect to the tenth aspect, reference may be made to the relevant description in the foregoing first aspect, and details are not described herein again.

附图说明Description of drawings

图1为本申请实施例提供的一例系统架构示意图;FIG. 1 is a schematic diagram of an example of a system architecture provided by an embodiment of the present application;

图2为本申请实施例提供的一例手机与路由器交互流程的示例图;2 is an example diagram of an interaction process between a mobile phone and a router provided by an embodiment of the present application;

图3-1为本申请实施例提供的一例电子设备的硬件架构的示意图;3-1 is a schematic diagram of a hardware architecture of an example of an electronic device provided by an embodiment of the present application;

图3-2为本申请实施例提供的一例路由设备的硬件架构的示意图;3-2 is a schematic diagram of a hardware architecture of an example of a routing device provided by an embodiment of the present application;

图4为本申请实施例提供的一例软件架构的示意图;4 is a schematic diagram of an example software architecture provided by an embodiment of the present application;

图5为本申请实施例提供的一例网络配置方法的流程示意图;FIG. 5 is a schematic flowchart of an example of a network configuration method provided by an embodiment of the present application;

图6-1为本申请实施例提供的一例网络配置方法的图像用户界面示意图;6-1 is a schematic diagram of a graphical user interface of an example of a network configuration method provided by an embodiment of the present application;

图6-2为本申请实施例提供的另一例网络配置方法的图像用户界面示意图。FIG. 6-2 is a schematic diagram of a graphical user interface of another example of a network configuration method provided by an embodiment of the present application.

具体实施方式Detailed ways

下面示例性介绍本申请可能涉及的相关内容及场景,进一步结合场景,对本申请实施例中的技术方案进行详细描述。The relevant content and scenarios that may be involved in the present application are exemplarily introduced below, and the technical solutions in the embodiments of the present application are further described in detail in combination with the scenarios.

本申请实施例中,路由设备可以包括但不限于路由器、调制解调器以及无线接入点等设备,电子设备可以包括但不限于笔记本电脑、手机、平板以及智能手表等设备。在以下描述中,路由设备以路由器为例、电子设备以手机为例对本申请实施例进行详细说明。In the embodiments of the present application, routing devices may include but are not limited to routers, modems, wireless access points, and other devices, and electronic devices may include, but are not limited to, laptop computers, mobile phones, tablets, and smart watches. In the following description, a router is used as an example for the routing device, and a mobile phone is used as an example for the electronic device to describe the embodiments of the present application in detail.

(1)接入点(Access Point,AP)模式,指可以提供无线或有线接入服务,允许设备接入,为设备提供数据访问的工作模式。(1) Access Point (AP) mode, which refers to a working mode that can provide wireless or wired access services, allow device access, and provide data access for devices.

(2)工作站(Station,STA)模式,指不接受设备的接入,但可以连接到AP模式下的设备的工作模式。(2) Station (Station, STA) mode, which refers to a working mode in which the device does not accept the access of the device, but can be connected to the device in the AP mode.

针对新购入的或者重置的路由器,需要对其进行网络的重新配置,才能在有线或无线网络中起到网关的作用。通常在路由器接通电源并接入外部网络后,路由器进入接入点模式,可以作为其他电子设备的网络接入点。For a newly purchased or reset router, the network needs to be reconfigured before it can function as a gateway in a wired or wireless network. Usually after the router is powered on and connected to an external network, the router enters access point mode and can act as a network access point for other electronic devices.

在路由器进入接入点模式后,可以发出无线广播;其他电子设备在接收到无线广播后,无需输入密码,即可与路由器建立局域网通信连接,然后基于局域网通信连接对路由器进行网络配置。After the router enters the access point mode, it can send out wireless broadcasts; after receiving wireless broadcasts, other electronic devices can establish a LAN communication connection with the router without entering a password, and then configure the router based on the LAN communication connection.

然而,上述路由器网络配置的方式,由于无需密码,容易被用户电子设备以外的其他电子设备进行恶意连接,并对路由器进行配置等,使得在网络配置时存在一定的安全隐患。另外,由于同一生产商推出的路由器都使用了相同的服务集标识(Service SetIdentifier,SSID),针对新购入的路由器一般会使用出厂时的默认名称,或者路由器重置后会恢复至默认名称,因此用户电子设备可能会搜索到附近多个相同名称的路由器,而使用户不确定连接哪个路由器,从而可能存在用户无意识连错路由器的情况。However, the above-mentioned router network configuration method does not require a password, so it is easy to be maliciously connected by other electronic devices other than the user's electronic device, and configure the router, etc., so that there are certain security risks in network configuration. In addition, since the routers launched by the same manufacturer all use the same Service SetIdentifier (SSID), the newly purchased routers generally use the factory default name, or the router will return to the default name after reset. Therefore, the user electronic device may search for a plurality of nearby routers with the same name, so that the user is not sure which router to connect to, so that the user may unintentionally connect to the wrong router.

针对上述的应用场景及可能出现的情况,本申请实施例提供一种网络配置方法,可以在对路由器进行网络配置时,避免出现用户电子设备以外的其他电子设备进行恶意连接或用户不确定连接哪个路由器、可能连错路由器的情况,提高网络配置以及网络接入的安全性。In view of the above-mentioned application scenarios and possible situations, the embodiments of the present application provide a network configuration method, which can avoid malicious connection of other electronic devices other than the user's electronic device or the user is not sure which one to connect when configuring the router. Routers, possibly connected to the wrong router, improve the security of network configuration and network access.

图1是本申请实施例提供的一例系统架构示意图。本申请实施例可以应用于图1所示的系统架构中。该系统架构可以包括电子设备和路由设备。其中,电子设备可以是手机、平板电脑、智能手表或者笔记本电脑等设备,本申请实施例对电子设备的类型不做限定。路由设备可以是路由器、调制解调器以及无线接入点等设备,本申请实施例对路由设备的类型不做限定。FIG. 1 is a schematic diagram of an example of a system architecture provided by an embodiment of the present application. The embodiments of the present application may be applied to the system architecture shown in FIG. 1 . The system architecture may include electronic equipment and routing equipment. The electronic device may be a device such as a mobile phone, a tablet computer, a smart watch, or a notebook computer, and the embodiment of the present application does not limit the type of the electronic device. The routing device may be a router, a modem, a wireless access point, and other devices, and the type of the routing device is not limited in this embodiment of the present application.

如图1所示,在本申请实施例中,电子设备以手机10为例,路由设备以路由器20为例,进行描述。As shown in FIG. 1 , in this embodiment of the present application, the electronic device takes a mobile phone 10 as an example, and the routing device takes a router 20 as an example for description.

本申请实施例中,针对重置后的或新购入的路由器20,在与手机10建立通信连接之前,处于工作站模式,并且手机10处于接入点模式。基于两者所处的工作模式,路由器20与手机10建立通信连接。In the embodiment of the present application, for the reset or newly purchased router 20, before establishing a communication connection with the mobile phone 10, it is in the workstation mode, and the mobile phone 10 is in the access point mode. Based on the working modes of the two, the router 20 establishes a communication connection with the mobile phone 10 .

如图1所示的,手机10和路由器20之间的交互过程可以包括:As shown in FIG. 1 , the interaction process between the mobile phone 10 and the router 20 may include:

101,路由器20接收手机10广播的信息。其中广播的信息可以包括协议报文、手机10的接入点信息(该接入点信息可以包括手机10个人热点的热点名称)。101 , the router 20 receives the information broadcast by the mobile phone 10 . The broadcasted information may include protocol packets and access point information of the mobile phone 10 (the access point information may include the hotspot name of the personal hotspot of the mobile phone 10).

102,路由器20与手机10建立连接,路由器20向手机10反馈消息。所反馈的消息可以包括通知手机连接成功的信息。102 , the router 20 establishes a connection with the mobile phone 10 , and the router 20 feeds back a message to the mobile phone 10 . The feedback message may include information notifying the mobile phone that the connection is successful.

示例性的,在手机10处于接入点模式时,可以周期性的广播协议报文和接入点信息;路由器20处于工作站模式时,可以接收到手机10广播的协议报文和接入点信息,在识别到协议报文中包含预先设定一致的目标标识字段后,可以获取手机10广播的接入点信息,并将获取到的接入点信息和协议报文中的接入点信息进行匹配,若匹配成功(两者相同),则路由器20与手机10建立通信连接。Exemplarily, when the mobile phone 10 is in the access point mode, it can periodically broadcast the protocol message and the access point information; when the router 20 is in the workstation mode, it can receive the protocol message and the access point information broadcasted by the mobile phone 10. , after recognizing that the protocol message contains a pre-set consistent target identification field, the access point information broadcast by the mobile phone 10 can be obtained, and the obtained access point information and the access point information in the protocol message can be compared. If the matching is successful (the two are the same), the router 20 establishes a communication connection with the mobile phone 10 .

其中,路由器20获取到的手机10广播的接入点信息,可以是在识别协议报文之前接收到并存储在路由器20中的接入点信息,也可以是在识别出目标标识字段之时或之后接收到的接入点信息。The access point information broadcast by the mobile phone 10 obtained by the router 20 may be the access point information received and stored in the router 20 before the identification protocol message, or it may be when the target identification field is identified or Access point information received afterward.

示例性的,该通信连接可以是路由器20和手机10共同确定的进行数据传输的通道,例如可以是基于近场通信、蓝牙通信、无线局域网通信或者低功耗局域网协议通信等的传输通道,在此不做具体限制。Exemplarily, the communication connection may be a channel jointly determined by the router 20 and the mobile phone 10 for data transmission, for example, it may be a transmission channel based on near field communication, Bluetooth communication, wireless local area network communication or low power consumption local area network protocol communication, etc. There is no specific restriction on this.

由于重置后的或者新购入的路由器20处于工作站模式时,不会广播自己的无线连接信息,因此用户电子设备以外的其他电子设备也就无法搜索并连接到该路由器20,从而可以避免其他电子设备在配置路由器20的网络时进行恶意连接。Since the reset or newly purchased router 20 is in the workstation mode, it will not broadcast its own wireless connection information, so other electronic devices other than the user's electronic device cannot search for and connect to the router 20, thereby avoiding other electronic devices. The electronic device makes a malicious connection when configuring the network of the router 20 .

示例性的,在手机10与路由器20建立通信连接后,手机10可以向路由器20发送网络配置信息。路由器20接收到网络配置信息,根据网络配置信息进行网络配置;其中网络配置信息可以包括网络名称、网络密码、无线名称以及无线密码等;并在网络配置完成后通知手机10完成网络配置;路由器20由工作站模式切换至接入点模式;从而手机10可以通过路由器20接入网络。Exemplarily, after the mobile phone 10 establishes a communication connection with the router 20 , the mobile phone 10 may send the network configuration information to the router 20 . The router 20 receives the network configuration information and performs network configuration according to the network configuration information; wherein the network configuration information may include network name, network password, wireless name and wireless password, etc.; and notify the mobile phone 10 to complete the network configuration after the network configuration is completed; the router 20 Switch from the workstation mode to the access point mode; thus the mobile phone 10 can access the network through the router 20 .

图2是本申请实施例提供的一例手机与路由器交互流程的示例图。以手机10和路由器20为例,结合该附图对本申请实施例提供的网络配置方法进行示例性的说明。FIG. 2 is an example diagram of an interaction flow between a mobile phone and a router provided by an embodiment of the present application. Taking the mobile phone 10 and the router 20 as examples, the network configuration method provided by the embodiment of the present application is exemplarily described with reference to the accompanying drawings.

如图2所示,手机10与路由器20交互流程可以包括:As shown in FIG. 2, the interaction process between the mobile phone 10 and the router 20 may include:

201,手机开启热点,进入接入点Access Point模式。201, the mobile phone turns on the hotspot and enters the Access Point mode.

202,手机广播包含特殊标识字段(例如connection)和接入点信息的协议报文以及广播包含特殊格式的热点名称的接入点信息。202 , the mobile phone broadcasts a protocol message including a special identification field (eg, connection) and access point information, and broadcasts the access point information including a hotspot name in a special format.

手机10通过预定方式开启热点,进入接入点(Access Point,AP)模式,并周期性的广播协议报文等信息。示例性的,所述预定方式可以为用户点击手机10个人热点界面的开关控件输入的方式。所述协议报文可以包含目标标识字段,该目标标识字段为与路由器20预先设定一致的特殊标识字段,例如“connection”字段。协议报文中还可以包括接入点信息,该接入点信息可以包括手机10的个人热点的特殊格式的热点名称;用户可以自定义设置该热点名称的特殊格式,例如“小明的手机”;该热点名称可以包含字母、符号以及数字等内容,在此不做具体限定。手机10开启热点后,还可以周期性地广播包含特殊格式的热点名称的接入点信息,该特殊格式的热点名称为该手机10的个人热点的网络名称。The mobile phone 10 activates the hotspot in a predetermined manner, enters the access point (Access Point, AP) mode, and periodically broadcasts information such as protocol packets. Exemplarily, the predetermined manner may be a manner in which the user clicks the switch control on the personal hotspot interface of the mobile phone 10 to input. The protocol message may include a target identification field, where the target identification field is a special identification field that is consistent with the router 20 preset, such as a "connection" field. The protocol message may also include access point information, and the access point information may include the hotspot name in a special format of the personal hotspot of the mobile phone 10; the user can customize the special format of the hotspot name, such as "Xiao Ming's mobile phone"; The hotspot name may contain letters, symbols, numbers, etc., which are not specifically limited here. After the mobile phone 10 turns on the hotspot, it can also periodically broadcast the access point information including the hotspot name in a special format, where the hotspot name in the special format is the network name of the personal hotspot of the mobile phone 10 .

203,路由器接收长按指令,进入工作站Station模式(处于被动接收状态)。203, the router receives the long-press instruction, and enters the station mode of the workstation (in a passive receiving state).

204,路由器解析接收到的协议报文,得到特殊标识字段(例如connection)和接入点信息。204, the router parses the received protocol packet to obtain a special identification field (eg connection) and access point information.

205,获取接入点信息中特殊格式的热点名称,将该热点名称与协议报文中接入点信息中的热点名称进行匹配;若匹配一直,路由器与手机建立通信连接。205: Obtain the hotspot name in the special format in the access point information, and match the hotspot name with the hotspot name in the access point information in the protocol packet; if the match is consistent, the router establishes a communication connection with the mobile phone.

206,路由器向手机发送连接成功的反馈信息。206, the router sends feedback information of successful connection to the mobile phone.

路由器20可以通过另一预定方式进入工作站Station模式。示例性的,该另一预定方式可以为用户对路由器20上的目标按键通过长按3秒输入长按指令的方式,路由器20响应于该长按指令,进入工作站模式。路由器20在工作站模式可以接收手机10广播的协议报文。路由器20接收到协议报文后,可以对协议报文进行解析;若解析得到的协议报文中的目标标识字段为预先设定一致的特殊标识字段(例如connection),则获取手机10的广播的接入点信息(包含特殊格式的热点名称),该获取到的接入点信息可以是在识别协议报文之前接收到并存储在路由器20中的,也可以是在识别出目标标识字段后接收到的手机10广播的接入点信息。The router 20 may enter the station mode in another predetermined manner. Exemplarily, the other predetermined manner may be a manner in which the user inputs a long-press instruction by long-pressing a target button on the router 20 for 3 seconds, and the router 20 enters the workstation mode in response to the long-press instruction. The router 20 can receive the protocol packets broadcast by the mobile phone 10 in the workstation mode. After the router 20 receives the protocol packet, it can parse the protocol packet; if the target identification field in the parsed protocol packet is a pre-set consistent special identification field (for example, connection), it obtains the broadcast information of the mobile phone 10. Access point information (including the hotspot name in a special format), the obtained access point information may be received and stored in the router 20 before identifying the protocol message, or it may be received after identifying the target identification field Access point information broadcast by the mobile phone 10 to the destination.

需要说明的是,手机10在进入接入点模式后,除了广播协议报文之外,还可以周期性的广播包含自己的热点名称的接入点信息。It should be noted that, after the mobile phone 10 enters the access point mode, in addition to broadcasting the protocol message, it can also periodically broadcast the access point information including its own hotspot name.

示例性的,路由器20基于协议报文中的目标标识字段,触发获取手机10的广播的包含特殊格式的热点名称的接入点信息,以及将该特殊格式的热点名称与协议报文中解析出的热点名称进行匹配的操作;若两者匹配一致,则路由器20与手机10建立通信连接,路由器20向手机10发送通信连接成功的反馈信息。Exemplarily, based on the target identification field in the protocol message, the router 20 triggers the acquisition of the access point information broadcasted by the mobile phone 10 that includes the hotspot name in a special format, and parses the hotspot name in the special format from the protocol message. The hotspot name is matched; if the two match, the router 20 establishes a communication connection with the mobile phone 10 , and the router 20 sends the mobile phone 10 feedback information that the communication connection is successful.

207,手机接收用户输入的网络配置信息。207. The mobile phone receives the network configuration information input by the user.

208,手机向路由器发送网络配置信息。208, the mobile phone sends the network configuration information to the router.

209,路由器根据网络配置信息进行网络配置。209, the router performs network configuration according to the network configuration information.

210,路由器向手机发送配置完成的反馈信息。210 , the router sends feedback information that the configuration is completed to the mobile phone.

211,路由器配置完成后,通过闪烁指示灯提示,并由工作站模式切换至接入点模式。211. After the configuration of the router is completed, it is prompted by flashing indicator lights, and the workstation mode is switched to the access point mode.

212,手机显示配置已完成的界面。212, the mobile phone displays an interface that the configuration has been completed.

示例性的,在手机10接收到路由器20发送的通信连接成功的反馈信息后,可以显示一个窗口,该窗口可以供用户输入网络配置信息。手机10还可以基于通信连接获取到配置路由器的地址信息。Exemplarily, after the mobile phone 10 receives the feedback information that the communication connection is successful sent by the router 20, a window may be displayed, and the window may be used for the user to input the network configuration information. The mobile phone 10 can also obtain the address information of the configuration router based on the communication connection.

手机10接收用户输入的网络配置信息,并根据配置路由器的地址信息向路由器20发送网络配置信息;路由器20在接收到网络配置信息后,设置例如网络账户、网络密码、无线名称以及无线密码等信息。在路由器20配置完成后,向手机发送配置完成的反馈信息,并通过控制指示灯闪烁提示配网完成,然后由当前工作站模式切换至接入点AccessionPoint模式。手机10在接收到路由器20发送的配置完成的反馈信息后,显示配置已完成的界面。手机10还可以通过搜索路由器20的无线名称(即Wi-Fi名称),或者通过有线方式接入路由器20的本地网接口,通过路由器20接入网络。The mobile phone 10 receives the network configuration information input by the user, and sends the network configuration information to the router 20 according to the address information of the configuration router; after receiving the network configuration information, the router 20 sets information such as network account, network password, wireless name and wireless password, etc. . After the configuration of the router 20 is completed, the feedback information of the configuration completion is sent to the mobile phone, and the control indicator light flashes to indicate that the network configuration is completed, and then the current workstation mode is switched to the access point AccessionPoint mode. After receiving the feedback information that the configuration is completed sent by the router 20, the mobile phone 10 displays an interface that the configuration is completed. The mobile phone 10 can also access the network through the router 20 by searching for the wireless name (ie, the Wi-Fi name) of the router 20, or by connecting to the local network interface of the router 20 in a wired manner.

本申请实施例通过手机10发送协议报文,路由器20对协议报文中目标标识字段的识别以及基于目标标识字段触发的获取手机广播的热点名称、匹配热点名称的过程,可以有效避免出现无意识连错路由器的情况。同时,由于路由器20处于工作站模式,可以避免其他电子设备的恶意连接,提高了路由器网络配置的安全性。In the embodiment of the present application, the mobile phone 10 sends a protocol message, the router 20 identifies the target identification field in the protocol message, and the process of acquiring the hotspot name broadcasted by the mobile phone and matching the hotspot name triggered by the target identification field can effectively avoid the occurrence of unintentional connection. The case of the wrong router. At the same time, since the router 20 is in the workstation mode, malicious connections of other electronic devices can be avoided, thereby improving the security of the router network configuration.

图3-1为本申请实施例提供的一例电子设备的硬件架构示意图。FIG. 3-1 is a schematic diagram of a hardware architecture of an example of an electronic device provided by an embodiment of the present application.

图3-2为本申请实施例提供的一例路由设备的硬件架构示意图。FIG. 3-2 is a schematic diagram of a hardware architecture of an example of a routing device according to an embodiment of the present application.

一种可能的情况中,电子设备和路由设备分别可以具有如图3-1和图3-2分别所示的部分或者全部的硬件结构。应理解,电子设备以手机10为例,路由设备以路由器20为例,在介绍本申请实施例提供的网络配置方法之前,先介绍手机10和路由器20可能的硬件结构。In a possible situation, the electronic device and the routing device may have some or all of the hardware structures shown in Figure 3-1 and Figure 3-2, respectively. It should be understood that the electronic device takes the mobile phone 10 as an example, and the routing device takes the router 20 as an example. Before introducing the network configuration method provided by the embodiments of the present application, the possible hardware structures of the mobile phone 10 and the router 20 are introduced.

如图3-1所示,手机10可以包括处理器110,外部存储接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L以及骨传导传感器180M等。As shown in FIG. 3-1, the mobile phone 10 may include a processor 110, an external storage interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本申请实施例示意的结构并不构成对手机10的具体限定。在本申请另一些实施例中,手机10可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the mobile phone 10 . In other embodiments of the present application, the mobile phone 10 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor ( image signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU), etc. . Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

其中,控制器可以是手机10的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the mobile phone 10 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) interface /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and/or Universal serial bus (universal serial bus, USB) interface, etc.

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现手机10的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, so as to realize the touch function of the mobile phone 10 .

I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serialinterface,DSI)等。处理器110和显示屏194通过DSI接口通信,实现手机10的显示功能。GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and the like. The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the mobile phone 10 . The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机10充电,也可以用于手机10与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the mobile phone 10, and can also be used to transfer data between the mobile phone 10 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.

可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对手机10的结构限定。在本申请另一些实施例中,手机10也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the mobile phone 10 . In other embodiments of the present application, the mobile phone 10 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.

充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.

手机10的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the mobile phone 10 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。手机10中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in handset 10 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed into a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块150可以提供应用在手机10上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(lownoise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the mobile phone 10 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在手机10上的包括无线局域网(wireless localarea networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequencymodulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the mobile phone 10 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems ( global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify the signal, and then convert it into an electromagnetic wave for radiation through the antenna 2 .

在本申请实施例中,手机10接收到触摸信号后,可以进入接入点模式,从而无线模块可以从处理器110接收待广播或发送的信号,例如将协议报文或信标帧通过无线通信模块160广播出去。In the embodiment of the present application, after receiving the touch signal, the mobile phone 10 can enter the access point mode, so that the wireless module can receive the signal to be broadcast or sent from the processor 110, for example, the protocol message or beacon frame can be wirelessly communicated Module 160 broadcasts out.

在一些实施例中,手机10的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机10可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code divisionmultiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(globalnavigation satellite system,GLONASS),北斗卫星导航系统(beidou navigationsatellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the mobile phone 10 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 10 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code Division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi-zenith). satellite system, QZSS) and/or satellite based augmentation systems (SBAS).

手机10通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The mobile phone 10 realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,手机10可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). , AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the handset 10 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

手机10可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The mobile phone 10 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.

ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .

摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机10可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the mobile phone 10 may include one or N cameras 193 , where N is a positive integer greater than one.

数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当手机10在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the mobile phone 10 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point, and the like.

视频编解码器用于对数字视频压缩或解压缩。手机10可以支持一种或多种视频编解码器。这样,手机10可以播放或录制多种编码格式的视频,例如:动态图像专家组(movingpicture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The handset 10 may support one or more video codecs. In this way, the mobile phone 10 can play or record videos in various encoding formats, such as: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.

外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机10的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机10的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机10使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the mobile phone 10 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the mobile phone 10 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.

手机10可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The mobile phone 10 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.

音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。手机10可以通过扬声器170A收听音乐,或收听免提通话。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当手机10接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。手机10可以设置至少一个麦克风170C。在另一些实施例中,手机10可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,手机10还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The mobile phone 10 can listen to music through the speaker 170A, or listen to a hands-free call. The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the mobile phone 10 receives a call or a voice message, the voice can be received by placing the receiver 170B close to the human ear. The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The mobile phone 10 may be provided with at least one microphone 170C. In other embodiments, the mobile phone 10 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the mobile phone 10 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.

耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone port 170D may be the USB port 130 or a 3.5mm open mobile terminal platform (OMTP) standard port, a cellular telecommunications industry association of the USA (CTIA) standard port.

压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。陀螺仪传感器180B可以用于确定手机10的运动姿态。气压传感器180C用于测量气压。在一些实施例中,手机10通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。磁传感器180D包括霍尔传感器。加速度传感器180E可检测手机10在各个方向上(一般为三轴)加速度的大小。距离传感器180F,用于测量距离。手机10可以通过红外或激光测量距离。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。环境光传感器180L用于感知环境光亮度。手机10可以根据感知的环境光亮度自适应调节显示屏194亮度。温度传感器180J用于检测温度。在一些实施例中,手机10利用温度传感器180J检测的温度,执行温度处理策略。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. The gyro sensor 180B can be used to determine the motion attitude of the mobile phone 10 . The air pressure sensor 180C is used to measure air pressure. In some embodiments, the mobile phone 10 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 10 in various directions (generally three axes). Distance sensor 180F for measuring distance. The mobile phone 10 can measure the distance by infrared or laser. Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The ambient light sensor 180L is used to sense ambient light brightness. The mobile phone 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The temperature sensor 180J is used to detect the temperature. In some embodiments, the cell phone 10 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

指纹传感器180H用于采集指纹。手机10可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。骨传导传感器180M可以获取振动信号。The fingerprint sensor 180H is used to collect fingerprints. The mobile phone 10 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like. Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . The bone conduction sensor 180M can acquire vibration signals.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机10可以接收按键输入,产生与手机10的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. Touch buttons are also possible. The cell phone 10 can receive key input and generate key signal input related to user settings and function control of the cell phone 10 .

马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.

SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机10的接触和分离。手机10可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。手机10通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,手机10采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在手机10中,不能和手机10分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the mobile phone 10 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The mobile phone 10 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The mobile phone 10 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the handset 10 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the mobile phone 10 and cannot be separated from the mobile phone 10 .

应理解,电子设备以手机10为例,可以包括以上介绍的全部硬件结构,或者包括以上的部分硬件结构,又或者具有更多的以上没有列举的其他硬件结构,本申请实施例对此不作限定。It should be understood that the electronic device, taking the mobile phone 10 as an example, may include all the hardware structures described above, or include some of the above hardware structures, or have more other hardware structures not listed above, which are not limited in the embodiments of the present application. .

如图3-2所示的路由器20的硬件结构示意图。路由器20以普通路由器为例,可以包括中央处理器210,交换芯片211,无线通信模块212,广域网接口213,本地网接口214,电源215,指示灯216(可以为多个,例如1-N个,N为大于1的整数),显示屏217,按键218,调试接口219,USB接口220,闪存221,存储器222,数据通道223以及管理通道224。A schematic diagram of the hardware structure of the router 20 is shown in FIG. 3-2. The router 20 takes an ordinary router as an example, and may include a central processing unit 210, a switching chip 211, a wireless communication module 212, a wide area network interface 213, a local network interface 214, a power supply 215, and an indicator light 216 (which can be multiple, such as 1-N , N is an integer greater than 1), display screen 217 , keys 218 , debugging interface 219 , USB interface 220 , flash memory 221 , memory 222 , data channel 223 and management channel 224 .

其中,中央处理器210可以为多核网络处理器,主要负责路由器的配置管理和数据包的转发,具有较强的并行处理能力,并且可以支持对网络协议报文的解析、保存及转发等处理。交换芯片211可以支持对协议报文在网络层的转发;路由器20还可以包括多个芯片,形成交换矩阵网络。中央处理器210与交换芯片211之间的数据通道223可以由10G的通道接口相连接,可以支持大量数据的传输;管理通道可以通过高速串行计算机扩展(peripheralcomponent interconnect express,PCIe)总线相连接,用以传输控制信号。The central processor 210 may be a multi-core network processor, which is mainly responsible for router configuration management and data packet forwarding, has strong parallel processing capability, and can support parsing, saving, and forwarding of network protocol packets. The switch chip 211 can support forwarding of protocol packets at the network layer; the router 20 can also include multiple chips to form a switch matrix network. The data channel 223 between the central processing unit 210 and the switching chip 211 can be connected by a 10G channel interface, which can support the transmission of a large amount of data; the management channel can be connected by a high-speed serial computer expansion (peripheral component interconnect express, PCIe) bus, Used to transmit control signals.

无线通信模块212可以支持2.4G或5G的网络信号速率。广域网接口213用于接外部网络,可以支持快速以太网或千兆以太网的自适应传输速率;本地网接口214可用于连接内部网络,也可以支持快速以太网或千兆以太网的自适应传输速率。The wireless communication module 212 may support a network signal rate of 2.4G or 5G. The WAN interface 213 is used to connect to the external network, and can support the adaptive transmission rate of Fast Ethernet or Gigabit Ethernet; the local network interface 214 can be used to connect to the internal network, and can also support the adaptive transmission of Fast Ethernet or Gigabit Ethernet rate.

另外,一个路由器可以包括一个广域网接口312和多个本地网接口214(例如1-M个,M为大于1的总数)。Additionally, a router may include one WAN interface 312 and multiple local network interfaces 214 (eg, 1-M, where M is a total number greater than 1).

闪存221可以存储路由器20的操作系统。存储器222可以存储程序数据。The flash memory 221 may store the operating system of the router 20 . Memory 222 may store program data.

应理解,路由器20可以包括以上介绍的全部硬件结构,或者包括以上的部分硬件结构,又或者具有更多的以上没有列举的其他硬件结构,本申请实施例对此不作限定。It should be understood that the router 20 may include all the hardware structures described above, or include a part of the above hardware structures, or have more other hardware structures not listed above, which are not limited in this embodiment of the present application.

还应理解,电子设备和路由设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的系统为例,以及以手机10和路由器20为例,示例性说明手机10和路由器20的软件结构。It should also be understood that the software system of the electronic device and the routing device may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiments of the present application, a system with a layered architecture is used as an example, and a mobile phone 10 and a router 20 are used as examples to exemplarily describe the software structures of the mobile phone 10 and the router 20 .

上述介绍了手机10和路由器20可能具有的硬件结构,下面将以手机10和路由器20具有的分层架构系统为例说明。The hardware structures that the mobile phone 10 and the router 20 may have are described above. The following will take the layered architecture system of the mobile phone 10 and the router 20 as an example for description.

图4为本申请实施例提供的一例软件架构示意图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将手机10的安卓

Figure BDA0003101390280000151
系统分为四层,从上至下分别为应用程序层,应用程序框架层,内核层和网络传输层等。FIG. 4 is a schematic diagram of an example of a software architecture provided by an embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android
Figure BDA0003101390280000151
The system is divided into four layers, from top to bottom, the application layer, the application framework layer, the kernel layer and the network transport layer.

应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.

如图4中的(a)图所示,手机10的应用程序层可以包括相机、日历、设置、WLAN、图库、蓝牙以及网络管理等应用程序(application,APP)。例如,网络管理应用可以对路由器的网络进行配置。As shown in (a) of FIG. 4 , the application layer of the mobile phone 10 may include applications (application, APP) such as camera, calendar, settings, WLAN, gallery, Bluetooth, and network management. For example, a network management application can configure a router's network.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for the applications of the application layer. The application framework layer can include some predefined functions.

手机10的应用程序框架层可以包括窗口管理器、内容提供器、数据授权管理模块、通知管理器、视图系统以及通信管理模块等。The application framework layer of the mobile phone 10 may include a window manager, a content provider, a data authorization management module, a notification manager, a view system, a communication management module, and the like.

其中,数据授权管理模块可以用于管理手机10可以被路由器访问的数据权限。通信管理模块可以用于控制和路由器20之间的通信,例如通信管理模块控制手机10通过网络传输层的蓝牙模块或无线模块,建立蓝牙通道或无线局域网通道,实现与路由器20之间的通信。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。The data authorization management module may be used to manage the data authorization that the mobile phone 10 can access by the router. The communication management module can be used to control the communication with the router 20. For example, the communication management module controls the mobile phone 10 to establish a Bluetooth channel or a wireless local area network channel through the Bluetooth module or wireless module of the network transport layer to realize the communication with the router 20. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.

视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于向用户传达告知类型的消息,该消息可以短暂停留后自动消失,无需用户交互。比如通过通知管理器告知用户连接成功或配置完成,进行相应的消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,还可以是以对话窗口形式出现在屏幕上的通知。View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures. The notification manager enables an application to display notification information in the status bar, which can be used to convey a notification-type message to the user, which can disappear automatically after a short stay without user interaction. For example, the notification manager informs the user that the connection is successful or the configuration is completed, and performs corresponding message reminders. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a graphic or scroll bar text, or a notification that appears on the screen in the form of a dialog window.

内核层是硬件和软件之间的层。The kernel layer is the layer between hardware and software.

手机10的内核层至少包含显示驱动,无线传输驱动,任务调度模块,基带芯片驱动以及传感器驱动等。The kernel layer of the mobile phone 10 at least includes a display driver, a wireless transmission driver, a task scheduling module, a baseband chip driver, a sensor driver, and the like.

网络传输层可以用于不同设备之间的通信、数据传输等,例如蓝牙模块,通过在手机10和路由器20之间建立蓝牙通道,通过蓝牙通道传输数据或消息、指令等,此处不再赘述。The network transport layer can be used for communication, data transmission, etc. between different devices, such as a Bluetooth module, by establishing a Bluetooth channel between the mobile phone 10 and the router 20, and transmitting data or messages, instructions, etc. through the Bluetooth channel, which will not be repeated here. .

如图4中的(b)图所示,路由器20至少可以包括应用层、控制层以及通信层。其中通信层用于实现与手机10的通信。控制层用于对数据进行处理或解析等。应用层可以包含一系列的应用程序包,用于实现路由器的网络配置、数据转发等功能。As shown in (b) of FIG. 4 , the router 20 may include at least an application layer, a control layer, and a communication layer. The communication layer is used to realize the communication with the mobile phone 10 . The control layer is used to process or parse the data, etc. The application layer can contain a series of application packages to implement the router's network configuration, data forwarding and other functions.

以上介绍了手机10和路由器20可能包括的软件功能模块,应理解,手机10和路由器20可能包括比图4中的(a)图和(b)图示出的更多或者更少的软件功能模块,本申请实施例对此不作限定。The software function modules that the mobile phone 10 and the router 20 may include are described above. It should be understood that the mobile phone 10 and the router 20 may include more or less software functions than those shown in (a) and (b) in FIG. 4 . module, which is not limited in this embodiment of the present application.

图5为本申请实施例提供的一例网络配置方法的流程示意图。在该流程示意图中,电子设备以手机10为例、路由设备以路由器20为例进行说明。如图5所示,该方法流程可以包括以下步骤:FIG. 5 is a schematic flowchart of an example of a network configuration method provided by an embodiment of the present application. In this schematic flowchart, the electronic device is illustrated by taking the mobile phone 10 as an example, and the routing device is described by taking the router 20 as an example. As shown in Figure 5, the method flow may include the following steps:

步骤S501,手机通过第一预定方式开启热点,进入接入点模式。Step S501, the mobile phone enables the hotspot through the first predetermined method, and enters the access point mode.

其中,第一预定方式包括:手机接收用户点击目标控件输入第一触发指令并响应于第一触发指令的方式。例如,手机10接收用户输入的第一触发指令,响应于第一触发指令,启动接入点模式。目标控件可以为手机的个人热点的开关控件,也可以为在快捷菜单中的个人热点图标控件。Wherein, the first predetermined manner includes: a manner in which the mobile phone receives a user clicking a target control to input a first trigger instruction and responds to the first trigger instruction. For example, the mobile phone 10 receives the first trigger instruction input by the user, and starts the access point mode in response to the first trigger instruction. The target control can be the switch control of the personal hotspot of the mobile phone, or the personal hotspot icon control in the shortcut menu.

图6-1和图6-2分别是本申请实施例提供的网络配置方法的图像用户界面(graphical user interface,GUI)的示意图。FIG. 6-1 and FIG. 6-2 are respectively schematic diagrams of a graphical user interface (graphical user interface, GUI) of the network configuration method provided by the embodiment of the present application.

示例性的,图6-1中的(a)图示出了手机在解锁状态下,手机的屏幕显示系统显示了当前输出的界面内容601,该界面内容601为手机的主界面。该界面内容601显示了多款应用程序,例如图库、设置、音乐和网络管理等。应理解,界面内容601还可以包括其它更多的应用程序,本申请对此不作限定。Exemplarily, Figure 6-1 (a) shows that when the mobile phone is unlocked, the screen display system of the mobile phone displays currently output interface content 601, which is the main interface of the mobile phone. The interface content 601 displays various applications, such as gallery, settings, music, and network management. It should be understood that the interface content 601 may also include other more application programs, which is not limited in this application.

如图6-1中的(a)图所示,在手机10的主界面601上,用户点击网络管理APP,响应于用于的点击操作,手机10进入网络管理界面。如图6-1中的(b)图所示的界面602,在该界面602上,可以包括不同的功能区域和菜单等,例如菜单区域可以包括该网络管理应用的主菜单类别:网络配置、路由设置、网络状态、设备管理和安全设置等,用户可以点击该不同的主菜单显示不同的内容,用户可以通过每一个菜单选项执行不同的操作或者查看不同的内容,本申请实施例对每个区域的功能不再赘述。另外,在网络管理界面上还可以显示当前用户处于已登录状态或未登录状态,在用户登录状态还可以显示用户头像、用户名等内容。As shown in (a) of FIG. 6-1, on the main interface 601 of the mobile phone 10, the user clicks the network management APP, and in response to the click operation for the mobile phone 10, the mobile phone 10 enters the network management interface. The interface 602 shown in (b) of FIG. 6-1, on the interface 602, may include different functional areas and menus, etc. For example, the menu area may include the main menu categories of the network management application: network configuration, Routing settings, network status, device management and security settings, etc., the user can click on the different main menus to display different contents, and the user can perform different operations or view different contents through each menu option. The function of the area will not be repeated here. In addition, on the network management interface, it is also possible to display whether the current user is in a logged-in state or not in a logged-in state, and in the user's logged-in state, user avatars, user names, etc. can also be displayed.

如图6-1中的(b)图所示的操作,用户点击功能菜单区域的“网络配置”菜单,响应于用户的点击操作,显示界面603。在该界面603上,包括图中虚线划分的位于屏幕上方的个人热点区域603-1和位于屏幕下方的配网向导区域603-2。In the operation shown in (b) of Fig. 6-1, the user clicks the "Network Configuration" menu in the function menu area, and in response to the user's click operation, an interface 603 is displayed. The interface 603 includes a personal hotspot area 603-1 at the top of the screen and a network distribution guide area 603-2 at the bottom of the screen, which are divided by the dotted line in the figure.

示例性的,在个人热点区域603-1包括热点开关、网络名称和密码等;例如,网络名称“AAA”为手机10的热点名称或设备名称,密码为接入该手机10的热点网络的密码;针对网络名称和密码,手机端用户可以自行设置。Exemplarily, the personal hotspot area 603-1 includes a hotspot switch, network name and password; for example, the network name "AAA" is the hotspot name or device name of the mobile phone 10, and the password is the password for accessing the hotspot network of the mobile phone 10. ; For the network name and password, mobile phone users can set it by themselves.

其中,个人热点的网络名称为电子设备独有的服务集标识(Service SetIdentifier,SSID),作为该电子设备的无线局域网的标识,每个设备之间可以不同,也可以由用户进行更改设置。Wherein, the network name of the personal hotspot is the unique service set identifier (SSID) of the electronic device. As the identifier of the wireless local area network of the electronic device, each device can be different, or the user can change the setting.

示例性的,第一触发指令可以为通过用户点击手机设置中的个人热点界面上或网络管理APP的网络配置选项对应的个人热点界面上的开关控件,或者点击手机下拉快捷菜单中的个人热点图标控件产生的指令。如图6-1中的(c)图所示,在网络管理APP的网络配置界面上,用户点击个人热点开关控件,手机响应于该点击动作,开启热点,进入接入点模式。Exemplarily, the first trigger instruction may be that the user clicks the switch control on the personal hotspot interface in the settings of the mobile phone or on the personal hotspot interface corresponding to the network configuration option of the network management APP, or clicks the personal hotspot icon in the drop-down shortcut menu of the mobile phone. The command generated by the control. As shown in (c) of Figure 6-1, on the network configuration interface of the network management APP, the user clicks the personal hotspot switch control, and the mobile phone responds to the click action to turn on the hotspot and enter the access point mode.

需要说明的是,手机可以在设置中的个人热点界面响应用户输入的打开个人热点的触发指令,也可以是在一个可以进行网络配置的应用程序(Application,APP)中的个人热点界面响应用户输入的打开个人热点的触发指令,还可以是在手机下拉快捷菜单中个人热点图标处响应打开个人热点的触发指令;还可以通过其他的预定方式使手机进入接入点模式,在此不作限定。It should be noted that the mobile phone can respond to the triggering instruction to turn on the personal hotspot input by the user on the personal hotspot interface in the settings, or respond to the user input on the personal hotspot interface in an application (Application, APP) that can perform network configuration. The trigger instruction to open the personal hotspot can also be a response to the trigger instruction to open the personal hotspot at the personal hotspot icon in the drop-down shortcut menu of the mobile phone; the mobile phone can also enter the access point mode through other predetermined methods, which is not limited here.

如图6-1中的(c)图所示的操作1,用户点击个人热点的开关(置于打开状态),响应于用户的点击操作,开启热点,手机10置为接入点模式。In operation 1 shown in (c) of Figure 6-1, the user clicks the switch of the personal hotspot (turn it on), and in response to the user's click operation, the hotspot is turned on, and the mobile phone 10 is set to the access point mode.

另外,在网络名称和密码的下方,还可以包括接入手机网络的提醒:“您在“个人热点”设置中或在“控制中心”(快捷菜单中的)中将其打开时,允许其他用户或设备查找您的共享网络“AAA”。”;即除了在该网络管理APP中可以打开个人热点,在手机的设置中的个人热点界面也可以接收用户输入的打开个人热点的触发指令,或者在快捷菜单的控制中心中也可以接收用户输入的打开个人热点的触发指令,在开启热点后允许其他用户或设备查找该手机的共享网络的热点名称“AAA”。In addition, under the network name and password, you can also include a reminder to access the mobile network: "Allow other users to Or the device searches your shared network "AAA"."; that is, in addition to opening the personal hotspot in the network management APP, the personal hotspot interface in the settings of the mobile phone can also receive the trigger command input by the user to open the personal hotspot, or in the The control center of the shortcut menu can also receive a trigger command input by the user to turn on the personal hotspot, and after turning on the hotspot, other users or devices are allowed to find the hotspot name "AAA" of the shared network of the mobile phone.

步骤S502,路由器通过第二预定方式进入工作站模式。Step S502, the router enters the workstation mode through a second predetermined manner.

其中,第二预定方式包括:路由器接收用户点击目标按键输入第三触发指令并响应于第三触发指令的方式。例如,路由器20接收用户输入的第三触发指令,响应于第三触发指令,进入工作站模式。Wherein, the second predetermined manner includes: a manner in which the router receives a user clicking a target button to input a third trigger instruction and responds to the third trigger instruction. For example, the router 20 receives the third trigger instruction input by the user, and enters the workstation mode in response to the third trigger instruction.

示例性的,第三触发指令可以为用户通过点击目标按键达到预设时长后输入的指令,例如预设时长可以为3秒。如图6-1中的(d)图所示,第三触发指令可以是用户通过长按3秒目标按键输入的指令。Exemplarily, the third trigger instruction may be an instruction input by the user after the user clicks the target button for a preset duration, for example, the preset duration may be 3 seconds. As shown in (d) of Figure 6-1, the third trigger instruction may be an instruction input by the user by pressing and holding the target button for 3 seconds.

示例性的,第三触发指令还可以包括用户通过触摸屏或者麦克风等输入的指令。例如通过用户双击路由器20的显示屏上显示的工作模式控件输入的指令,又或者通过麦克风接收到的语音切换指令等(例如:“小路、小路,切换至工作站模式或站点模式”);路由器20响应于第三触发指令,将工作模式切换至工作站模式。Exemplarily, the third trigger instruction may further include an instruction input by the user through a touch screen or a microphone. For example, an instruction input by the user double-clicking the working mode control displayed on the display screen of the router 20, or a voice switching instruction received through the microphone, etc. (for example: "small road, small road, switch to workstation mode or station mode"); In response to the third trigger instruction, the working mode is switched to the workstation mode.

需要说明的是,使路由器进入工作站模式的第二预定方式不仅限于上述所描述的方式,还可以包括其他的预定方式,例如遥控方式等;在此不作具体限定。It should be noted that the second predetermined manner of making the router enter the workstation mode is not limited to the manner described above, but may also include other predetermined manners, such as remote control manners, etc., which are not specifically limited herein.

应理解,针对新购入的路由器,在接通电源及插上外部有线网络接头后,在立即实施第二预定方式的情况下,可以直接进入工作站模式。在路由器接通电源及插上外部有线网络接头后,在无外界触发或预设的情况下,可以直接进入接入点模式,或者重置后的路由器也可以是处于接入点模式;在上述接入点模式下,路由器通过实施第二预定方式(例如接收到第三触发指令)可以进入接入点模式。It should be understood that, for a newly purchased router, after the power is turned on and the external wired network connector is plugged in, the workstation mode can be directly entered under the condition that the second predetermined mode is implemented immediately. After the router is powered on and plugged into the external wired network connector, it can directly enter the access point mode without external triggers or presets, or the reset router can also be in the access point mode; in the above In the access point mode, the router can enter the access point mode by implementing the second predetermined manner (for example, receiving a third trigger instruction).

另外,路由器20通过实施的第二预定方式可以覆盖之前所有的配置信息以及断开所有连接,然后进入工作站模式。In addition, the router 20 can cover all previous configuration information and disconnect all connections by implementing the second predetermined manner, and then enter the workstation mode.

其中,路由器20接通电源后,指示灯1亮(指示灯1为电源指示灯)。Wherein, after the router 20 is powered on, the indicator light 1 is on (the indicator light 1 is a power indicator light).

通过本申请实施例,路由器20进入工作站模式,降低了用户电子设备以外的其他电子设备进行恶意连接或配置可能性,提高了路由器网络配置及网络接入的安全性。Through the embodiment of the present application, the router 20 enters the workstation mode, which reduces the possibility of malicious connection or configuration of other electronic devices other than the user electronic device, and improves the security of the router's network configuration and network access.

步骤S503,手机广播协议报文和接入点信息。Step S503, the mobile phone broadcasts the protocol message and the access point information.

示例性的,手机在启动接入点模式后,广播协议报文以及接入点信息;其中,协议报文包括目标标识字段以及接入点信息。Exemplarily, after starting the access point mode, the mobile phone broadcasts a protocol message and access point information; wherein, the protocol message includes a target identification field and access point information.

示例性的,手机10在接入点模式可以周期性的发送广播帧,例如每100ms发送一次;广播帧可以是协议报文和/或接入点信息。协议报文可以是基于蓝牙协议的数据包,该数据包可以具有特定的数据格式。接入点信息可以包括手机10的个人热点的热点名称。Exemplarily, in the access point mode, the mobile phone 10 may periodically send broadcast frames, for example, once every 100 ms; the broadcast frames may be protocol packets and/or access point information. The protocol message may be a data packet based on the Bluetooth protocol, and the data packet may have a specific data format. The access point information may include the hotspot name of the personal hotspot of the handset 10 .

示例性的,数据包可以包括包头部分和数据部分;包头部分可以包括对组成数据包的两部分的类型描述符和数据大小描述符;通过数据大小描述符可以确定数据部分的长度。类型描述符和数据大小描述符分别可以占有预设大小的数据位。Exemplarily, the data packet may include a header part and a data part; the packet header part may include a type descriptor and a data size descriptor for the two parts constituting the data packet; the length of the data part may be determined by the data size descriptor. The type descriptor and the data size descriptor can respectively occupy data bits of a preset size.

示例性的,协议报文中可以包括目标标识字段,例如“连接connection”;该目标标识字段可以位于数据包的数据部分。协议报文中还可以包括手机的接入点信息,例如手机的个人热点的热点名称,例如“AAA”,该网络名称也可以包含在数据数据包的数据部分。Exemplarily, the protocol message may include a target identification field, such as "connection"; the target identification field may be located in the data part of the data packet. The protocol message may also include the access point information of the mobile phone, such as the hotspot name of the personal hotspot of the mobile phone, such as "AAA", and the network name may also be included in the data part of the data packet.

其中,目标标识字段可以是手机10与路由器20预定一致的特殊标识字段,该特殊标识字段不限制字符的类型,可以是包含文字、字母、数字以及符号等类型的字段。接入点信息可以包括手机10的个人热点的网络名称,可以是用户自行设定的特殊格式的字段,例如解析出的接入点信息可以包括网络名称“AAA”。The target identification field may be a special identification field predetermined by the mobile phone 10 and the router 20. The special identification field does not limit the type of characters, and may be a field including text, letters, numbers, and symbols. The access point information may include the network name of the personal hotspot of the mobile phone 10, which may be a field in a special format set by the user, for example, the parsed access point information may include the network name "AAA".

应理解,手机10处于接入点模式时,可以通过不同的线程分别周期性地广播协议报文和接入点信息。例如手机10开启个人热点后,通过第一线程广播基于蓝牙协议的数据包(即协议报文),通过第二线程以信标帧(beacon帧)的形式广播接入点信息。其中,两个线程可以是通过同一个无线模块发出的广播,还可以是通过不同无线模块分别发出的广播。It should be understood that when the mobile phone 10 is in the access point mode, the protocol packet and the access point information may be broadcast periodically through different threads, respectively. For example, after the mobile phone 10 turns on the personal hotspot, the first thread broadcasts data packets (ie, protocol packets) based on the Bluetooth protocol, and the second thread broadcasts the access point information in the form of a beacon frame (beacon frame). Wherein, the two threads may be broadcasts sent by the same wireless module, or may be broadcasts sent by different wireless modules respectively.

示例性的,手机10还可以通过不同频率的物理信道以及基于蓝牙低功耗协议广播不同类型的数据,例如协议报文和信标帧还可以通过不同的物理信道广播出来。Exemplarily, the mobile phone 10 can also broadcast different types of data through physical channels of different frequencies and based on the Bluetooth low energy protocol. For example, protocol packets and beacon frames can also be broadcast through different physical channels.

示例性的,在手机10的处理器检测到手机10个人热点开启,处于接入点模式后,可以向无线模块(例如蓝牙模块)发送指令,通知无线模块发送协议报文或接入点信息;无线模块可以通过不同的线程发出不同的广播,例如发出协议报文和接入点信息等。Exemplarily, after the processor of the mobile phone 10 detects that the personal hotspot of the mobile phone 10 is turned on and is in the access point mode, it can send an instruction to the wireless module (such as a Bluetooth module) to notify the wireless module to send a protocol message or access point information; The wireless module can send different broadcasts through different threads, such as sending protocol packets and access point information.

在一些实施例中,手机在启动接入点模式后,可以开启广播协议报文和接入点信息。In some embodiments, after starting the access point mode, the mobile phone can start broadcasting protocol packets and access point information.

在图6-1中的(c)图所示的界面603上,可以不包括区域603-2。如图6-1中的(c)图所示的操作1,用户点击个人热点的开关(置于打开状态),手机10响应于用户的点击操作,开启热点,手机10进入接入点模式,开始周期性地广播接入点信息和协议报文。On the interface 603 shown in (c) of FIG. 6-1 , the area 603-2 may not be included. In operation 1 shown in (c) in Figure 6-1, the user clicks the switch of the personal hotspot (turn it on), the mobile phone 10 responds to the user's click operation, and turns on the hotspot, and the mobile phone 10 enters the access point mode, Start to periodically broadcast access point information and protocol packets.

在其他一些实施例中,在广播协议报文之前,还包括:手机在启动接入点模式后,接收用户输入的第二触发指令,响应于第二触发指令,启动配网向导,配网向导用于指示开始广播协议报文。In some other embodiments, before broadcasting the protocol message, the method further includes: after the mobile phone starts the access point mode, receiving a second trigger instruction input by the user, in response to the second trigger instruction, starting the network configuration guide, and the network configuration guide Used to indicate the start of broadcasting protocol packets.

示例性的,手机10在启动接入点模式后,作为一种通用状态,只广播接入点信息,并不开始广播协议报文。在手机接收到第二触发指令后,开始广播协议报文。Exemplarily, after the mobile phone 10 starts the access point mode, as a general state, it only broadcasts the access point information, and does not start to broadcast the protocol message. After the mobile phone receives the second trigger instruction, it starts to broadcast the protocol message.

其中,配网向导可以是手机10个人热点界面上的一个控件;第二触发指令可以是用户点击该控件输入的指令;手机10的处理器检测到用户点击该控件的操作后,响应于该点击操作,向无线模块发送指令,由无线模块开始广播协议报文。Wherein, the network distribution guide may be a control on the personal hotspot interface of the mobile phone 10; the second trigger instruction may be an instruction input by the user by clicking on the control; after the processor of the mobile phone 10 detects that the user clicks the control, it responds to the click Operation, send an instruction to the wireless module, and the wireless module starts to broadcast the protocol message.

在图6-1中的(c)图所示的界面603上,还可以包括区域603-2,在区域603-2上可以包括配网向导的控件或图标。针对手机10只提供个人热点的无线网络的应用场景,为了降低手机10开启个人热点后同时广播协议报文和接入点信息所产生的功耗或者对处理器内存的占用率,在图6-1中的(c)图所示的界面603上用户执行操作1之后,响应于操作1的点击操作,开启个人热点,并可以只周期性地广播接入点信息;然后用户在该界面603上的区域603-2继续执行操作2之后,响应于操作2的点击操作,再开始周期性地广播协议报文。On the interface 603 shown in (c) of FIG. 6-1, an area 603-2 may also be included, and the controls or icons of the network configuration wizard may be included in the area 603-2. For the application scenario of the wireless network where the mobile phone 10 only provides the personal hotspot, in order to reduce the power consumption or the occupancy rate of the processor memory caused by the simultaneous broadcasting of the protocol packet and the access point information after the mobile phone 10 turns on the personal hotspot, in Figure 6- After the user performs operation 1 on the interface 603 shown in (c) in Fig. 1, in response to the click operation of operation 1, the personal hotspot is turned on, and the access point information can only be broadcast periodically; then the user on the interface 603 After the region 603-2 continues to perform operation 2, in response to the click operation of operation 2, it starts to periodically broadcast the protocol message.

需要说明的是,图6-1中的(c)图所示的界面603可以是在一个应用程序(例如图6-1中的(a)图所示的界面601所示的网络管理APP)中,手机10响应于用户点击功能菜单进入的界面;也可以是在“设置”应用(例如界面601上的)或通知界面的控制中心,手机10响应于用户点击个人热点菜单进入的界面。手机10可以周期性地广播包含目标标识字段的协议报文的逻辑,可以是手机10软件架构的应用层的设置,无需涉及框架层的改动。因此,通过一个单独的软件APP(例如图6-1中的(a)图所示的界面601所示的网络管理APP)或者在手机设置的个人热点的应用中均可实现该广播协议报文的逻辑。It should be noted that the interface 603 shown in (c) of FIG. 6-1 may be an application (for example, the network management APP shown in the interface 601 shown in (a) of FIG. 6-1 ) , the interface entered by the mobile phone 10 in response to the user clicking on the function menu; it may also be the interface entered by the mobile phone 10 in response to the user clicking the personal hotspot menu in the "Settings" application (eg, on interface 601) or the control center of the notification interface. The logic that the mobile phone 10 can periodically broadcast the protocol message including the target identification field can be the setting of the application layer of the software architecture of the mobile phone 10, and does not need to involve the modification of the framework layer. Therefore, the broadcast protocol message can be implemented through a separate software APP (for example, the network management APP shown in the interface 601 shown in (a) of Figure 6-1) or in the application of the personal hotspot set on the mobile phone logic.

步骤S504,路由器识别接收到的协议报文,得到协议报文中的目标标识字段。Step S504, the router identifies the received protocol packet, and obtains a target identification field in the protocol packet.

步骤S505,路由器获取接入点信息,并将获取到的接入点信息与该协议报文中的接入点信息进行匹配。Step S505, the router acquires the access point information, and matches the acquired access point information with the access point information in the protocol packet.

步骤S506,若匹配一致,则路由器与手机建立通信连接。Step S506, if the matches are consistent, the router establishes a communication connection with the mobile phone.

步骤S507,路由器向手机反馈连接成功的信息。Step S507, the router feeds back information of successful connection to the mobile phone.

示例性的,路由器在工作站模式下接收到手机广播的协议报文后,对接收到的协议报文进行识别,若识别到协议报文中包含预定的目标标识字段,则获取接入点信息,并将获取到的接入点信息与协议报文中的接入点信息进行匹配。Exemplarily, after receiving the protocol message broadcast by the mobile phone in the workstation mode, the router recognizes the received protocol message, and if it recognizes that the protocol message contains a predetermined target identification field, then obtains the access point information, The obtained access point information is matched with the access point information in the protocol packet.

示例性的,路由器20进入工作站模式后,可以处于被动接收状态,接收手机10发送的协议报文。Exemplarily, after the router 20 enters the workstation mode, it may be in a passive receiving state and receive protocol packets sent by the mobile phone 10 .

需要说明的是,手机10与路由器20的广播通信可以为无连接的数据通信,手机10在广播通信的物理信道上广播数据,路由器20根据自身的策略可以在对应的信道上扫描并接收数据。例如,广播通信的物理信道可以选择射频中心频率为2402MHz、2426MHz或2480MHz的射频通道。It should be noted that the broadcast communication between the mobile phone 10 and the router 20 may be connectionless data communication. The mobile phone 10 broadcasts data on the physical channel of broadcast communication, and the router 20 can scan and receive data on the corresponding channel according to its own strategy. For example, the physical channel of broadcast communication may select a radio frequency channel whose center frequency is 2402MHz, 2426MHz or 2480MHz.

另外,手机10和路由器20的无线模块均可以支持多个信道上广播通信及数据接收,针对不同类型的数据,还可以通过不同频率的物理信道进行广播和接收。手机10和路由器20之间的广播通信可以是基于低功耗蓝牙(Bluetooth Low Energy,BLE)协议的无连接数据通信。In addition, the wireless modules of the mobile phone 10 and the router 20 can both support broadcast communication and data reception on multiple channels, and for different types of data, they can also broadcast and receive data through physical channels of different frequencies. The broadcast communication between the mobile phone 10 and the router 20 may be connectionless data communication based on the Bluetooth Low Energy (BLE) protocol.

示例性的,路由器20通过上述物理信道接收到协议报文后,对协议报文进行解析识别,得到协议报文中的目标标识字段和接入点信息。目标标识字段为路由器20与手机10预定一致的特殊标识字段,例如目标标识字段可以为“连接connection”。路由器20的中央处理器解析出该目标标识字段后,获取接入点信息;一方面中央处理器向无线模块下达指令,控制无线模块通过物理信道搜索并接收手机10广播的接入点信息;另一方面中央处理器还可以中读取之前接收到并存储在存储器中的接入点信息。Exemplarily, after receiving the protocol packet through the above-mentioned physical channel, the router 20 parses and identifies the protocol packet, and obtains the target identification field and the access point information in the protocol packet. The target identification field is a special identification field predetermined by the router 20 and the mobile phone 10, for example, the target identification field may be "connection". After the central processing unit of the router 20 parses the target identification field, it obtains the access point information; on the one hand, the central processing unit issues an instruction to the wireless module to control the wireless module to search for and receive the access point information broadcast by the mobile phone 10 through the physical channel; On the one hand, the central processing unit can also read the access point information previously received and stored in the memory.

需要说明的是,协议报文中的目标标识字段用于触发路由器20获取手机10广播的接入点信息,以及将协议报文中的接入点信息和获取到的接入点信息进行匹配的流程;其中,获取到的接入点信息可以是在路由器20识别协议报文之前接收到并存储在路由器20中的接入点信息,也可以是在路由器20识别出目标标识字段之时或之后接收到的接入点信息。It should be noted that the target identifier field in the protocol packet is used to trigger the router 20 to acquire the access point information broadcast by the mobile phone 10, and to match the access point information in the protocol packet with the acquired access point information. The process; wherein, the obtained access point information may be the access point information received and stored in the router 20 before the router 20 identifies the protocol message, or it may be when the router 20 identifies the target identification field or after Received access point information.

示例性的,路由器20在扫描手机广播的接入点信息的方式可以是主动扫描或被动扫描的方式。若采用主动扫描的方式,路由器20的无线模块可以通过广播的方式发送探测信号(也可称为探测请求帧probe request)。若为被动扫描的方式,路由器20被动的接收手机10广播的接入点信息。Exemplarily, the manner in which the router 20 scans the access point information broadcast by the mobile phone may be an active scanning manner or a passive scanning manner. If the active scanning method is adopted, the wireless module of the router 20 may send a probe signal (also referred to as a probe request frame probe request) by broadcasting. In the passive scanning mode, the router 20 passively receives the access point information broadcast by the mobile phone 10 .

需要说明的是,主动扫描的方式为路由器20主动去探测搜索包含热点名称的接入点信息,路由器20会在其所支持的物理信道上以广播的形式依次发送探测信号,用于探测周围存在的无线网络并获取包含热点名称的接入点信息。It should be noted that the active scanning method is that the router 20 actively detects and searches for the access point information including the hotspot name, and the router 20 will send the detection signal in the form of broadcast on the physical channel supported by it in turn to detect the existence of the surrounding. and get access point information including hotspot name.

其中,探测信号中还可以包括指定网络名称(也可以是SSID),例如指定网络名称可以为依据协议报文中解析出的接入点信息中的热点名称生成的;探测信号中也可以不包括指定网络名称。The detection signal may also include a specified network name (or SSID), for example, the specified network name may be generated according to the hotspot name in the access point information parsed from the protocol packet; the detection signal may not include Specify the network name.

若探测信号中包括指定网络名称,则在手机10收到探测信号后,手机10发现探测信号中的网络名称和自己的网络名称相同,则路由器可以接收到手机10的回应。若探测信号中不包括指定网络名称,则路由器20可以接收到周围所有能接收到该探测信号并可以广播自身接入点信息的电子设备的回应,从而路由器20可以获取到周围所有电子设备的接入点信息。If the detection signal includes the specified network name, after the mobile phone 10 receives the detection signal, the mobile phone 10 finds that the network name in the detection signal is the same as its own network name, and the router can receive the response from the mobile phone 10 . If the detection signal does not include the specified network name, the router 20 can receive responses from all surrounding electronic devices that can receive the detection signal and can broadcast its own access point information, so that the router 20 can obtain the access points of all surrounding electronic devices. entry point information.

示例性的,若路由器获取到的接入点信息中存在与所述协议报文中的接入点信息匹配一致的接入点信息,则路由器与手机建立通信连接,并向手机反馈通信连接成功的信息。Exemplarily, if there is access point information that matches the access point information in the protocol message in the access point information acquired by the router, the router establishes a communication connection with the mobile phone, and reports back to the mobile phone that the communication connection is successful. Information.

示例性的,在路由器20通过被动扫描接收到手机10广播的接入点信息,或者通过主动扫描获取到周围多个电子设备的接入点信息时,路由器20会将扫描到的接入点信息与协议报文中的接入点信息进行匹配。路由器20判断手机10广播的接入点信息与协议报文中的接入点信息是否相同,若相同,则路由器20与手机10建立通信连接;或者从周围多个电子设备广播的接入点信息中确定与协议报文中的接入点信息相同的接入点信息,并与该接入点信息对应对应的电子设备建立通信连接。Exemplarily, when the router 20 receives the access point information broadcast by the mobile phone 10 through passive scanning, or obtains the access point information of multiple surrounding electronic devices through active scanning, the router 20 will scan the obtained access point information. Match with the access point information in the protocol packet. The router 20 determines whether the access point information broadcasted by the mobile phone 10 is the same as the access point information in the protocol message. If they are the same, the router 20 establishes a communication connection with the mobile phone 10; or the access point information broadcasted from multiple surrounding electronic devices In the protocol message, the same access point information as the access point information in the protocol message is determined, and a communication connection is established with the corresponding electronic device corresponding to the access point information.

示例性的,路由器20采用主动扫描或被动扫描的方式接收到与协议报文中的接入点信息相同的接入点信息后,可以与该接入点信息对应的电子设备进行链路认证和关联,从而可以与该电子设备(手机)建立通信连接。Exemplarily, after the router 20 receives the access point information that is the same as the access point information in the protocol packet by means of active scanning or passive scanning, it can perform link authentication and verification on the electronic device corresponding to the access point information. so as to establish a communication connection with the electronic device (mobile phone).

示例性的,手机10和路由器20进行链路认证过程可以包括开放系统认证或共享密钥认证。开放系统认证为路由器20可以向手机10发送认证请求,手机10允许路由器20认证成功,则链路认证通过。共享密钥认证为路由器20可以与手机10预先设定一个密钥,路由器20向手机10发送认证请求后,手机10通过预先设定的密钥验证路由器20身份的合法性,验证合法后链路认证通过。Exemplarily, the link authentication process performed by the mobile phone 10 and the router 20 may include open system authentication or shared key authentication. The open system authentication means that the router 20 can send an authentication request to the mobile phone 10, and the mobile phone 10 allows the authentication of the router 20 to succeed, and the link authentication is passed. Shared key authentication means that the router 20 and the mobile phone 10 can pre-set a key. After the router 20 sends an authentication request to the mobile phone 10, the mobile phone 10 verifies the legitimacy of the identity of the router 20 through the preset key, and the link after verification is valid. Certification passed.

示例性的,在链路认证通过后,路由器20与手机10进行关联。路由器20可以向手机10发送关联请求帧;手机10接收到路由器20发送的关联请求帧后,向路由器20反馈关联响应帧,从而完成关联。在关联完成后,路由器20与手机10之间建立起数据通信的无线链路,即通信连接。Exemplarily, after the link authentication is passed, the router 20 associates with the mobile phone 10 . The router 20 may send an association request frame to the mobile phone 10; after receiving the association request frame sent by the router 20, the mobile phone 10 feeds back an association response frame to the router 20, thereby completing the association. After the association is completed, a wireless link for data communication, that is, a communication connection, is established between the router 20 and the mobile phone 10 .

示例性的,如图6-1中的(d)图所示,在路由器20与手机10建立通信连接后,路由器20还可以发出连接成功的提示信息。可以通过指示灯2闪烁预设次数进行提示,还可以通过显示屏显示“连接成功”的字样进行提示,还可以通过扬声器播放“连接成功”的语音进行提示;此处具体的提示方式不做限定。Exemplarily, as shown in (d) of FIG. 6-1, after the router 20 establishes a communication connection with the mobile phone 10, the router 20 may also send out a prompt message that the connection is successful. It can be prompted by flashing the indicator light 2 for a preset number of times, it can also be prompted by the words "connection successful" displayed on the display screen, and the voice of "connection successful" can also be played through the speaker; the specific prompting method here is not limited. .

另外,建立通信连接后,路由器20还可以向手机10反馈通信连接成功的信息,以通知手机可以执行后续流程的操作。In addition, after the communication connection is established, the router 20 may also feed back information that the communication connection is successful to the mobile phone 10, so as to notify the mobile phone that the operation of the subsequent process can be performed.

示例性的,通信连接为通过蓝牙、近距无线通信技术、数据网络中的任意一种方式进行的连接。Exemplarily, the communication connection is a connection through any one of Bluetooth, short-range wireless communication technology, and data network.

通过本申请实施例,由手机10向路由器20发送协议报文,路由器20识别出协议报文中的目标标识字段后获取手机10广播的接入点信息,以及将手机10广播的接入点信息与协议报文中的接入点信息匹配一致后,可以确定用户电子设备(手机)正在连接的路由器为自己的路由器,从而可以避免了用户无意识的连错其他路由器。Through the embodiment of the present application, the mobile phone 10 sends a protocol message to the router 20, and the router 20 obtains the access point information broadcast by the mobile phone 10 after identifying the target identification field in the protocol message, and the access point information broadcast by the mobile phone 10. After matching with the access point information in the protocol message, it can be determined that the router to which the user's electronic device (mobile phone) is connecting is its own router, thereby preventing the user from accidentally connecting to other routers by mistake.

步骤S508,手机接收用户输入的网络配置信息。Step S508, the mobile phone receives the network configuration information input by the user.

步骤S509,手机向路由器发送网络配置信息。Step S509, the mobile phone sends network configuration information to the router.

示例性的,手机在接收到路由器反馈的通信连接成功的信息后,接收用户输入的网络配置信息,并将网络配置信息发送给路由器进行网络配置。Exemplarily, after receiving the successful communication connection information fed back by the router, the mobile phone receives the network configuration information input by the user, and sends the network configuration information to the router for network configuration.

其中,通信连接成功的信息为路由器20与手机10建立通信连接之后反馈的,路由器20与手机10建立通信连接的条件包括:路由器接收到的协议报文中包含目标标识字段,且路由器获取到的接入点信息中存在与该协议报文中的接入点信息匹配一致的接入点信息。The information about the successful communication connection is fed back after the router 20 establishes the communication connection with the mobile phone 10, and the conditions for establishing the communication connection between the router 20 and the mobile phone 10 include: the protocol message received by the router includes a target identification field, and the information obtained by the router The access point information contains the access point information that matches the access point information in the protocol packet.

在一些实施例中,在手机接收到路由设备反馈的通信连接成功的信息后,手机显示一个窗口,该窗口用于供用户输入网络配置信息。In some embodiments, after the mobile phone receives the information that the communication connection is successful fed back by the routing device, the mobile phone displays a window for the user to input network configuration information.

示例性的,路由器20与手机10建立通信连接后,路由器20还可以向手机10反馈连接成功的信息以及配置路由器的地址信息。手机10在接收到反馈信息后,可以切换至下一界面,如图6-2中的(e)图所示的界面604;或者手机10在接收到用户在区域603-2执行的操作2并收到路由器反馈的连接成功的信息和配置路由器的地址信息后,切换至界面604。Exemplarily, after the router 20 establishes a communication connection with the mobile phone 10 , the router 20 may also feed back the information of the successful connection and the address information of the configuration router to the mobile phone 10 . After receiving the feedback information, the mobile phone 10 can switch to the next interface, such as the interface 604 shown in (e) in Figure 6-2; or the mobile phone 10 receives the operation 2 performed by the user in the area 603-2 and After receiving the successful connection information and the address information of the configuration router fed back by the router, switch to interface 604 .

在一些实施例中,在图6-1中的(c)图所示的界面603上,可以不包括区域603-2。在图6-1中的(c)图所示的界面603上用户执行操作1之后,响应于操作1的点击操作,手机10开启个人热点,进入接入点模式,并可以周期性地广播接入点信息和协议报文。在手机10与路由器20建立通信连接后,根据路由器20反馈的配置路由器的地址信息,手机10由图6-1中的(c)图所示的界面603直接跳转至图6-2中的(e)图所示的界面604。In some embodiments, on the interface 603 shown in (c) of FIG. 6-1 , the area 603-2 may not be included. After the user performs operation 1 on the interface 603 shown in (c) of FIG. 6-1, in response to the click operation of operation 1, the mobile phone 10 turns on the personal hotspot, enters the access point mode, and can periodically broadcast an access point. Ingress information and protocol packets. After the mobile phone 10 establishes a communication connection with the router 20, according to the address information of the configuration router fed back by the router 20, the mobile phone 10 directly jumps from the interface 603 shown in (c) in FIG. 6-1 to the interface in FIG. 6-2. (e) Interface 604 as shown.

在另一些实施例中,在图6-1中的(c)图所示的界面603上,还可以包括区域603-2。如图6-1中的(c)图所示的操作1,用户点击个人热点的开关(置于打开状态),手机10响应于用户的点击操作,手机10开启热点,进入接入点模式,并周期性的广播接入点信息和协议报文。在处于接入点模式的手机10与处于工作站模式的路由器20建立通信连接的过程中(或者完成通信连接后),如图6-1中的(c)图所示的操作2,用户点击“配网向导”控件,手机10响应于用户的点击操作,并且在接收到路由器20反馈的配置路由器的地址信息后,手机10加载并显示图6-2中的(e)图所示的界面604。In other embodiments, on the interface 603 shown in (c) of FIG. 6-1 , an area 603-2 may also be included. In operation 1 as shown in (c) in Figure 6-1, the user clicks the switch of the personal hotspot (turn it on), the mobile phone 10 responds to the user's click operation, and the mobile phone 10 turns on the hotspot and enters the access point mode, And periodically broadcast access point information and protocol packets. During the process of establishing a communication connection between the mobile phone 10 in the access point mode and the router 20 in the workstation mode (or after the communication connection is completed), in the operation 2 shown in (c) in Figure 6-1, the user clicks " "Network Configuration Wizard" control, the mobile phone 10 responds to the user's click operation, and after receiving the address information for configuring the router fed back by the router 20, the mobile phone 10 loads and displays the interface 604 shown in (e) in Figure 6-2. .

在其他一些实施例中,图6-1中的(c)图所示的界面603上,还可以包括区域603-2。针对手机10在只提供个人热点的无线网络的应用场景,为了降低手机10开启热点后同时广播协议报文和热点名称所产生的功耗或者对处理器内存的占用率,在图6-1中的(c)图所示的界面603上用户执行操作1之后,响应于操作1的点击操作,手机10开启个人热点,进入接入点模式,并可以只周期性地广播接入点信息;然后用户在该界面603上的区域603-2继续执行操作2之后,手机10响应于操作2的点击操作,开始周期性地广播协议报文。然后,在手机10与路由器20建立通信连接后,根据路由器20反馈的配置路由器的地址信息,手机10由图6-1中的(c)图所示的界面603跳转至图6-2中的(e)图所示的界面604。In some other embodiments, the interface 603 shown in (c) of FIG. 6-1 may further include an area 603-2. For the application scenario of the mobile phone 10 in a wireless network that only provides personal hotspots, in order to reduce the power consumption or the occupancy rate of the processor memory caused by the mobile phone 10 broadcasting the protocol message and the hotspot name at the same time after the hotspot is turned on, in Figure 6-1 After the user performs operation 1 on the interface 603 shown in (c), in response to the click operation of operation 1, the mobile phone 10 turns on the personal hotspot, enters the access point mode, and can only broadcast the access point information periodically; then After the user continues to perform the operation 2 in the area 603-2 on the interface 603, the mobile phone 10 starts to periodically broadcast the protocol message in response to the click operation of the operation 2. Then, after the mobile phone 10 establishes a communication connection with the router 20, according to the address information of the configuration router fed back by the router 20, the mobile phone 10 jumps from the interface 603 shown in (c) in FIG. 6-1 to the one shown in FIG. 6-2. (e) of the interface 604 shown.

示例性的,如图6-2中的(e)图所示的手机10显示的窗口,在该窗口中的界面604上,“HONOR.XXX.cn”为配置路由器的地址信息,设备序列码“HONOR-123_HiLink”为路由器20的默认名称或出厂名称。其中,配置路由器的地址信息和设备序列码由路由器开发商设定,本申请实施例仅示例性说明,不做具体限定。上网设置区域的“网络账号”和“网络密码”分别对应的内容初始显示状态可以均为空;手机10可接收用户输入的自己设定的网络名称和网络密码。以及路由设置区域的“无线名称”和“无线密码”分别对应的内容初始显示状态可以均为空,手机10可以可接收用户输入的自己设定的无线名称和无线密码;或者“无线名称”对应的内容初始状态可以显示该路由设备(路由器)的序列码,手机10可以接收用户的更改操作并接收用户输入的自定义的无线名称。另外,在该界面604还可以显示已连接的提示信息。Exemplarily, in the window displayed by the mobile phone 10 as shown in (e) of FIG. 6-2, on the interface 604 in the window, "HONOR.XXX.cn" is the address information of the configuration router, the device serial code. "HONOR-123_HiLink" is the default name or factory name of the router 20. The address information and device serial code for configuring the router are set by the router developer, and the embodiments of the present application are only illustrative and do not specifically limit. The initial display states of the respective contents corresponding to "network account" and "network password" in the Internet setting area may be empty; the mobile phone 10 can receive the network name and network password set by the user input. And the initial display state of the content corresponding to the "wireless name" and "wireless password" in the routing setting area may be empty, and the mobile phone 10 may receive the wireless name and wireless password set by the user input; or the "wireless name" corresponds to The initial state of the content of the router can display the serial code of the routing device (router), and the mobile phone 10 can receive the user's modification operation and receive the user-defined wireless name input by the user. In addition, the connected prompt information can also be displayed on the interface 604 .

可选的,在图6-2中的(e)图所示的手机界面604,手机10可以在上网设置区域接收用户输入的“网络账号”和“网络密码”分别对应的内容,例如,“网络账号”对应的“0755***123@163.com”和“网络密码”对应的“ABCDEF”;手机10还可以接收用户在路由设置区域输入的“无线名称”和“无线密码”分别对应的内容,例如“无线名称”对应的“小明的家123”,“无线密码”对应的“abcdef”。以上设置的具体内容仅示例性说明,具体设置的字段和显示形式不做限定,例如“网络密码”和“无线密码”对应的内容还可以选择全部不可见或部分可见的形式进行显示。还可以对路由器是否开启无线广播进行配置,设置路由器工作在接入点模式时为广播状态,以便路由器在接入点模式时其他电子设备可以搜索并接入配置好的路由器。Optionally, in the mobile phone interface 604 shown in (e) in FIG. 6-2, the mobile phone 10 can receive the content corresponding to the "network account" and "network password" input by the user in the Internet setting area, for example, " "0755***123@163.com" corresponding to "Network Account" and "ABCDEF" corresponding to "Network Password"; the mobile phone 10 can also receive the corresponding "Wireless Name" and "Wireless Password" input by the user in the routing setting area, respectively For example, "Xiao Ming's home 123" corresponding to "Wireless Name", and "abcdef" corresponding to "Wireless Password". The specific content of the above settings is only illustrative, and the fields and display forms of the specific settings are not limited. For example, the content corresponding to "Network Password" and "Wireless Password" can also be displayed in a completely invisible or partially visible form. You can also configure whether to enable wireless broadcast on the router, and set the router to be in the broadcast state when it works in the access point mode, so that other electronic devices can search for and access the configured router when the router is in the access point mode.

步骤S510,路由器根据接收到的网络配置信息进行网络配置。Step S510, the router performs network configuration according to the received network configuration information.

示例性的,路由器接收手机发送的网络配置信息,根据所述网络配置信息进行网络配置。其中,网络配置信息是手机在接收到路由器反馈的通信连接成功的信息后发送的。Exemplarily, the router receives network configuration information sent by the mobile phone, and performs network configuration according to the network configuration information. The network configuration information is sent by the mobile phone after receiving the information that the communication connection is successful fed back by the router.

步骤S511,路由器向手机反馈配置完成的信息。Step S511, the router feeds back the configuration completion information to the mobile phone.

步骤S512,手机显示配置完成界面。Step S512, the mobile phone displays a configuration completion interface.

步骤S513,路由器发出完成网络配置的提示信息,并由工作站模式切换至接入点模式。Step S513, the router sends out a prompt message for completing the network configuration, and switches from the workstation mode to the access point mode.

示例性的,网络配置信息可以为路由器20的属性信息,可以包括上网信息或路由信息;上网信息可以包括网络账号和网络密码;路由信息可以包括无线名称和无线密码;还可以包括路由器20的其他属性信息,例如最大传输速率等,在此不做具体限定。Exemplarily, the network configuration information may be attribute information of the router 20, and may include Internet access information or routing information; the Internet access information may include a network account and a network password; the routing information may include a wireless name and a wireless password; and may also include other information of the router 20. The attribute information, such as the maximum transmission rate, is not specifically limited here.

如图6-1中的(d)图所示,路由器20的指示灯2,在手机10与路由器20连接成功后,指示灯2进行预设次数的闪烁,以及在手机10接收网络配置信息的过程,指示灯2由闪烁转为保持长亮的状态,以指示路由器还在配置过程中。As shown in (d) in Figure 6-1, the indicator light 2 of the router 20, after the mobile phone 10 is successfully connected to the router 20, the indicator light 2 flashes for a preset number of times, and when the mobile phone 10 receives the network configuration information During the process, the indicator light 2 changes from blinking to a steady state, indicating that the router is still in the configuration process.

示例性的,手机10在接收到用户输入的网络配置信息后,如图6-2中的(e)图所示的操作,用户点击“确定”选项,手机10接收到用户输入的指令,响应于用户的点击操作,手机10向路由器20发送网络配置信息。路由器20接收手机10发送的网络配置信息进行网络配置。在路由器20配置完成后,发出完成网络配置的提示信息,并由工作站模式切换至接入点模式。Exemplarily, after receiving the network configuration information input by the user, the mobile phone 10 performs the operation as shown in (e) of FIG. According to the user's click operation, the mobile phone 10 sends the network configuration information to the router 20 . The router 20 receives the network configuration information sent by the mobile phone 10 to perform network configuration. After the configuration of the router 20 is completed, a prompt message for completing the network configuration is sent, and the workstation mode is switched to the access point mode.

示例性的,如图6-2中的(f)图所示,路由器20完成网络配置时,指示灯2由亮变为不亮,指示灯3闪烁预设次数,在路由器由工作站模式切换至接入点模式,指示灯3长亮。其中,路由器20发出的完成网络配置的提示信息的方式可以是通过指示3闪烁的形式进行提示,也可以通过显示屏显示配置完成的形式进行提示,还可以是通过扬声器播放语音“配置已完成”的形式进行提示,用户可以选择任意一种或多种提醒方式,本申请实施例对此不作具体限定。Exemplarily, as shown in (f) of Figure 6-2, when the router 20 completes the network configuration, the indicator light 2 changes from on to off, the indicator light 3 flashes a preset number of times, and when the router switches from the workstation mode to In the access point mode, the indicator light 3 is always on. Among them, the way of prompting the router 20 to complete the network configuration can be prompted by the flashing of the indicator 3, or by the display screen showing that the configuration is complete, or by playing the voice "configuration is complete" through the speaker. The user can select any one or more reminder methods, which is not specifically limited in this embodiment of the present application.

示例性的,在路由器20配置完成后,向手机10反馈设置已完成的信息,手机10收到反馈信息后,显示配置完成的界面,如图6-2中的(g)图所示的界面605;在该界面605可以显示路由器配置已完成,还可以同时显示路由器20的无线名称(Wi-Fi名称)和无线密码;其中,无线密码还可以处于全不可见或部分不可见的显示状态。Exemplarily, after the router 20 is configured, it feeds back the information that the setting has been completed to the mobile phone 10, and after receiving the feedback information, the mobile phone 10 displays the configuration complete interface, such as the interface shown in (g) in Figure 6-2. 605; on this interface 605, it can be displayed that the router configuration has been completed, and the wireless name (Wi-Fi name) and wireless password of the router 20 can also be displayed at the same time; wherein, the wireless password can also be in a completely invisible or partially invisible display state.

应理解,在路由器20切换至接入点模式后,与手机10的连接可以自动断开;手机10可以在工作站模式,接入配置好的路由器20的无线网络。It should be understood that after the router 20 is switched to the access point mode, the connection with the mobile phone 10 can be automatically disconnected; the mobile phone 10 can be in the workstation mode to access the configured wireless network of the router 20 .

还应理解,上述电子设备还可以是平板电脑、笔记本电脑、智能手表或者其他可以提供无线局域网的终端设备,路由设备包括但不限于集线器、交换机、网桥、路由器、网关、网络接口卡、无线接入点以及调制解调器等设备,本申请实施例对此不作具体限定。上述各设备为了实现上述功能,其可以包含了执行各个功能相应的硬件和/或软件模块。结合本文所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It should also be understood that the above-mentioned electronic devices can also be tablet computers, notebook computers, smart watches or other terminal devices that can provide wireless local area networks. Routing devices include but are not limited to hubs, switches, bridges, routers, gateways, network interface cards, wireless Devices such as an access point and a modem are not specifically limited in this embodiment of the present application. In order to realize the above functions, the above devices may include corresponding hardware and/or software modules for executing each function. The present application can be implemented in hardware or a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.

本实施例可以根据上述方法示例上述各设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,本申请实施例对此不作限定。In this embodiment, the above-mentioned devices can be divided into functional modules according to the above method. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division manners in actual implementation, which is not limited in this embodiment of the present application.

需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that, all relevant contents of the steps involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here.

本实施例提供的电子设备、路由器等设备,用于执行上述配置网络的方法,因此可以达到与上述实现方法相同的效果。The electronic device, router, and other devices provided in this embodiment are used to execute the above method for configuring a network, and thus can achieve the same effect as the above implementation method.

在采用集成的单元的情况下,电子设备和路由器等设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对执行的动作进行控制管理,存储模块可以用于存储程序代码和数据等,通信模块可以用于手机和路由器之间的通信。Where integrated units are employed, devices such as electronic devices and routers may include processing modules, storage modules, and communication modules. The processing module can be used to control and manage the executed actions, the storage module can be used to store program codes and data, etc., and the communication module can be used to communicate between the mobile phone and the router.

其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination comprising one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.

在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备、路由器可以为分别具有图3-1和图3-2所示结构的设备。In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device and router involved in this embodiment may be devices having the structures shown in FIG. 3-1 and FIG. 3-2 respectively.

本实施例还提供一种网络配置的系统,包括上述的电子设备和路由设备,电子设备和路由设备分别用于执行上述方法相关步骤,以实现上述实施例中的网络配置方法。This embodiment also provides a network configuration system, including the above-mentioned electronic device and routing device, where the electronic device and the routing device are respectively configured to execute relevant steps of the above-mentioned method, so as to realize the network configuration method in the above-mentioned embodiment.

本实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令被运行时,使得在包括电子设备、路由器等设备的系统中可以执行上述相关方法步骤实现上述实施例中的网络配置方法。This embodiment also provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium. When the computer instructions are executed, the above-mentioned related methods can be executed in a system including electronic devices, routers, and other devices. The steps implement the network configuration method in the above embodiment.

本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的网络配置方法。This embodiment also provides a computer program product, which when the computer program product runs on the computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the network configuration method in the above-mentioned embodiment.

另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片、组件或模块,该装置可以包括相连的处理器和存储器;其中存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的网络配置方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein the memory is used for storing instructions for execution by a computer, and when the apparatus is running, processing The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the network configuration method in the above method embodiments.

其中,本实施例提供的电子设备、路由设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, routing device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to above. The beneficial effects of the provided corresponding methods will not be repeated here.

通过以上实施方式描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结果划分成不同的功能模块,以完成以上描述的全部或部分功能。From the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example. Module completion, that is, dividing the internal results of the device into different functional modules to complete all or part of the functions described above.

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

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以分局实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. The purpose of the solution in this embodiment may be achieved by selecting some or all of the units in the sub-station as required.

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

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

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。此外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。本申请中的“多个”指两个或两个以上。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. Furthermore, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be construed as indicating or implying relative importance. References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. "Plurality" in this application refers to two or more.

最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that: the above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or replacements within the technical scope disclosed in the present application should be covered by the present application. within the scope of protection of the application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (25)

1. A network configuration system, characterized in that the system comprises an electronic device and a router device;
the electronic device is configured to:
after the access point mode is started, broadcasting a protocol message and first access point information, wherein the protocol message comprises a preset target identification field and the first access point information;
the routing device is configured to:
in a working station mode, after receiving a protocol message, identifying the received protocol message, if the protocol message is identified to contain the target identification field, acquiring second access point information, and matching the acquired second access point information with first access point information in the protocol message;
if the acquired second access point information contains access point information which is matched with the first access point information in the protocol message in a consistent manner, establishing communication connection with the electronic equipment, and feeding back information of successful communication connection to the electronic equipment;
the electronic device is further configured to:
after receiving the information of successful communication connection fed back by the routing equipment, receiving network configuration information input by a user, and sending the network configuration information to the routing equipment;
the routing device is further configured to:
configuring attribute information of the routing equipment according to the received network configuration information, wherein the attribute information comprises internet surfing information or routing information of the routing equipment;
after the electronic device receives the information of successful communication connection fed back by the routing device, the routing device is further configured to: feeding back address information to the electronic equipment; the electronic device is further configured to: and displaying a window for a user to input network configuration information according to the address information for configuring the routing equipment fed back by the routing equipment.
2. The system of claim 1, wherein the electronic device is further configured to:
starting a hotspot in a first preset mode and entering the access point mode;
wherein the first predetermined manner comprises: the method comprises the steps that the electronic equipment receives a mode that a user clicks a target control to input a first trigger instruction and responds to the first trigger instruction;
the routing device is further configured to:
entering the workstation mode by a second predetermined manner;
wherein the second predetermined manner comprises: and the routing equipment receives a mode that a user clicks a target key to input a third trigger instruction and responds to the third trigger instruction.
3. The system of claim 1, wherein the electronic device is further configured to:
and after the access point mode is started, receiving a second trigger instruction input by a user, and starting a distribution network guide in response to the second trigger instruction, wherein the distribution network guide is used for indicating to start broadcasting the protocol message.
4. The system of claim 1,
the routing device is further configured to:
and sending prompt information for completing the network configuration after the network configuration is carried out according to the network configuration information, wherein the mode for sending the prompt information comprises one or more of voice, pop-up window display and light flashing.
5. The system according to any one of claims 1 to 4, wherein the communication connection established between the electronic device and the routing device is a connection made by any one of Bluetooth, short-range wireless communication technology and data network.
6. An electronic device, characterized in that the electronic device comprises:
the wireless broadcast module is used for broadcasting a protocol message and first access point information after the access point mode is started, wherein the protocol message comprises a target identification field and the first access point information;
the wireless sending module is used for receiving network configuration information input by a user after receiving information of successful communication connection fed back by the routing equipment, and sending the network configuration information to the routing equipment for configuration of attribute information of the routing equipment, wherein the attribute information comprises internet access information or routing information of the routing equipment; wherein the information that the communication connection is successful is fed back after the routing device establishes the communication connection with the electronic device, and the condition for establishing the communication connection between the routing device and the electronic device includes: a protocol message received by the routing equipment contains a target identification field, and access point information which is matched and consistent with first access point information in the protocol message exists in second access point information obtained by the routing equipment;
and the display unit is used for displaying a window for a user to input network configuration information according to the address information of the routing equipment, which is configured and fed back by the routing equipment, after receiving the information of successful communication connection, which is fed back by the routing equipment.
7. The electronic device of claim 6, further comprising:
the hot spot control module is used for opening a hot spot in a first preset mode and entering the access point mode;
wherein the first predetermined manner comprises: and receiving a mode that a user clicks a target control to input a first trigger instruction and responds to the first trigger instruction.
8. The electronic device of claim 6 or 7, further comprising:
and the distribution network control module is used for receiving a second trigger instruction input by a user after the access point mode is started, and starting a distribution network guide in response to the second trigger instruction, wherein the distribution network guide is used for indicating to start broadcasting the protocol message.
9. The electronic device according to claim 6 or 7, wherein the communication connection is a connection via any one of bluetooth, short-range wireless communication technology, and data network.
10. The electronic device of claim 8, wherein the communication connection is a connection via any one of bluetooth, short-range wireless communication technology, and data network.
11. A routing device, characterized in that the routing device comprises:
the central processing unit is used for identifying the received protocol message after receiving the protocol message broadcasted by the electronic equipment in the workstation mode, acquiring second access point information if the protocol message is identified to contain a preset target identification field, and matching the acquired second access point information with the first access point information in the protocol message;
the wireless communication module is used for establishing communication connection between the routing equipment and the electronic equipment and feeding back information of successful communication connection to the electronic equipment if access point information which is matched with the first access point information in the protocol message is contained in the acquired second access point information; receiving network configuration information sent by the electronic equipment;
the network configuration module is used for configuring attribute information of the routing equipment according to the network configuration information, wherein the attribute information comprises internet surfing information or routing information of the routing equipment, and the network configuration information is sent by the electronic equipment after receiving information of successful communication connection fed back by the routing equipment;
the wireless communication module is further configured to feed back address information to the electronic device after receiving information of successful communication connection fed back by the routing device, where the address information is used to instruct the electronic device to display a window for a user to input network configuration information.
12. The routing device of claim 11, wherein the routing device further comprises:
the mode control module is used for entering a workstation mode through a second preset mode before receiving a protocol message broadcasted by the electronic equipment in the workstation mode;
wherein the second predetermined manner comprises: and receiving a mode that a user clicks a target key to input a third trigger instruction and responds to the third trigger instruction.
13. The routing device according to claim 11 or 12, wherein the routing device further comprises:
and the prompting module is used for sending out prompting information for completing the network configuration after the network configuration is carried out according to the network configuration information, and the mode for sending out the prompting information comprises one or more of voice, pop-up window display and light flicker.
14. The routing device of claim 12, wherein the mode control module is further configured to switch from a station mode to an access point mode after network configuration according to the network configuration information.
15. A network configuration method applied to an electronic device includes:
after the electronic equipment starts an access point mode, broadcasting a protocol message and first access point information, wherein the protocol message comprises a target identification field and the first access point information;
after receiving information of successful communication connection fed back by routing equipment, the electronic equipment receives network configuration information input by a user, and sends the network configuration information to the routing equipment to configure attribute information of the routing equipment, wherein the attribute information comprises internet access information or routing information; wherein the information of successful communication connection is fed back after the routing device establishes communication connection with the electronic device, and the condition for establishing communication connection between the routing device and the electronic device includes: a protocol message received by the routing equipment contains a target identification field, and access point information which is matched and consistent with first access point information in the protocol message exists in second access point information acquired by the routing equipment;
after receiving the information of successful communication connection fed back by the routing device, the electronic device further includes: and according to the address information of the routing equipment configured and fed back by the routing equipment, the electronic equipment displays a window for a user to input network configuration information.
16. The method of claim 15, wherein prior to the broadcast protocol packet and access point information, the method further comprises:
the electronic equipment starts a hotspot in a first preset mode and enters the access point mode;
wherein the first predetermined manner comprises: the method includes that the electronic equipment receives a mode that a user clicks a target control to input a first trigger instruction and responds to the first trigger instruction.
17. The method according to claim 15 or 16, wherein prior to the broadcast protocol packet, the method further comprises:
and after the electronic equipment starts the access point mode, receiving a second trigger instruction input by a user, and starting a distribution network guide in response to the second trigger instruction, wherein the distribution network guide is used for indicating to start broadcasting the protocol message.
18. The method according to any one of claims 15 or 16, wherein the communication connection is a connection via any one of bluetooth, short-range wireless communication technology, and data network.
19. The method according to claim 17, wherein the communication connection is a connection via any one of bluetooth, short-range wireless communication technology, and data network.
20. A network configuration method is applied to a routing device, and comprises the following steps:
after receiving a protocol message broadcasted by the electronic equipment in a workstation mode, the routing equipment identifies the received protocol message, if the protocol message is identified to contain a preset target identification field, second access point information is obtained, and the obtained second access point information is matched with first access point information in the protocol message;
if access point information which is matched with the first access point information in the protocol message is consistent in the obtained second access point information, the routing equipment establishes communication connection with the electronic equipment and feeds back information of successful communication connection to the electronic equipment;
the routing equipment receives network configuration information sent by the electronic equipment, and configures attribute information of the routing equipment according to the network configuration information, wherein the attribute information comprises internet surfing information or routing information, and the network configuration information is sent by the electronic equipment after receiving information of successful communication connection fed back by the routing equipment;
after the electronic device receives the information of successful communication connection fed back by the routing device, the method further comprises the following steps: the routing equipment sends address information to the electronic equipment; the address information is used to instruct the electronic device to display a window for a user to input network configuration information.
21. The method of claim 20, wherein before the routing device receives the protocol message broadcast by the electronic device in the workstation mode, the method further comprises:
the routing equipment enters the workstation mode through a second preset mode;
wherein the second predetermined manner comprises: and the routing equipment receives a mode that a user clicks a target key to input a third trigger instruction and responds to the third trigger instruction.
22. The method according to claim 20 or 21, wherein after said configuring of the attribute information of the routing device according to the network configuration information, the method further comprises:
the routing equipment sends out prompt information for completing network configuration, and the mode for sending out the prompt information comprises one or more of voice, popup display and light flashing.
23. The method of claim 20, further comprising, after the configuring the attribute information of the routing device according to the network configuration information:
the routing device switches from the station mode to the access point mode.
24. An electronic device, characterized in that the electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method according to any of claims 15 to 19 when executing the computer program.
25. A routing device, characterized in that the routing device comprises a central processor, a wireless communication module for wireless communication with an electronic device, and a switch chip for forwarding wireless communication data at a network layer, and the central processor is configured to process the wireless communication data to implement the method according to any one of claims 20 to 23.
CN202110635811.9A 2021-06-04 2021-06-04 Network configuration system, network configuration method, electronic device and routing device Active CN113438102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110635811.9A CN113438102B (en) 2021-06-04 2021-06-04 Network configuration system, network configuration method, electronic device and routing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110635811.9A CN113438102B (en) 2021-06-04 2021-06-04 Network configuration system, network configuration method, electronic device and routing device

Publications (2)

Publication Number Publication Date
CN113438102A CN113438102A (en) 2021-09-24
CN113438102B true CN113438102B (en) 2022-07-26

Family

ID=77803891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110635811.9A Active CN113438102B (en) 2021-06-04 2021-06-04 Network configuration system, network configuration method, electronic device and routing device

Country Status (1)

Country Link
CN (1) CN113438102B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20240061831A (en) * 2022-11-01 2024-05-08 삼성전자주식회사 Electronic apparatus and control method thereif
CN118524121B (en) * 2024-07-19 2024-10-01 杭州海康威视数字技术股份有限公司 Traffic control system and equipment configuration method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509417B1 (en) * 2002-02-28 2009-03-24 Palm, Inc. Method for intelligently selecting a wireless communication access point
WO2011133195A1 (en) * 2010-04-22 2011-10-27 Zipit Wireless, Inc. System and method for administration and operation of one or more mobile electronic communications devices
CN110290570A (en) * 2019-06-10 2019-09-27 浙江大华技术股份有限公司 Wireless network access method and relevant device, storage device
WO2019183810A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Method for sharing data in local area network and electronic device
EP3823250A1 (en) * 2019-11-15 2021-05-19 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for network configuration, router, and server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105163366B (en) * 2015-09-24 2019-03-29 小米科技有限责任公司 Wireless network connecting method and device
CN110719589A (en) * 2019-07-11 2020-01-21 厦门亿联网络技术股份有限公司 IP telephone deployment method and system
CN110519131B (en) * 2019-07-26 2021-08-03 华为技术有限公司 Method for controlling equipment and terminal
CN111132137A (en) * 2019-09-16 2020-05-08 华为技术有限公司 Wi-Fi connection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509417B1 (en) * 2002-02-28 2009-03-24 Palm, Inc. Method for intelligently selecting a wireless communication access point
WO2011133195A1 (en) * 2010-04-22 2011-10-27 Zipit Wireless, Inc. System and method for administration and operation of one or more mobile electronic communications devices
WO2019183810A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Method for sharing data in local area network and electronic device
CN110290570A (en) * 2019-06-10 2019-09-27 浙江大华技术股份有限公司 Wireless network access method and relevant device, storage device
EP3823250A1 (en) * 2019-11-15 2021-05-19 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for network configuration, router, and server

Also Published As

Publication number Publication date
CN113438102A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN115209194B (en) A terminal device, method and system for realizing one-touch screen projection through a remote control
CN112822663B (en) Bluetooth connection method and related device
US11825539B2 (en) Bluetooth connection method and electronic device
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
WO2020224486A1 (en) Calling method, device and system
US12075499B2 (en) Bluetooth reconnection method and related apparatus
WO2021052178A1 (en) Wi-fi connection method and device
WO2020244623A1 (en) Air-mouse mode implementation method and related device
WO2021175268A1 (en) Method and apparatus for sharing mobile network hotspot, and hotspot sharing device
CN114610193B (en) Content sharing method, electronic device and storage medium
WO2021043045A1 (en) Method and device for configuring network configuration information
CN112469011A (en) Bluetooth pairing method and related device
WO2021043250A1 (en) Bluetooth communication method, and related device
CN114390337A (en) Screen projection method and system and electronic equipment
CN112449336B (en) Device capability discovery method and P2P device
CN113630777B (en) Internet access control system, method and routing equipment
WO2022048371A1 (en) Cross-device audio playing method, mobile terminal, electronic device and storage medium
WO2021218544A1 (en) Wireless connection providing system, method, and electronic apparatus
CN113438102B (en) Network configuration system, network configuration method, electronic device and routing device
CN113498108A (en) Chip, equipment and method for adjusting data transmission strategy based on service type
CN115119336B (en) Earphone connection system, earphone connection method, earphone, electronic device and readable storage medium
WO2023024889A1 (en) First electronic device, second electronic device, and method for screen-casting
EP4362507A1 (en) Communication system and communication method
WO2022267917A1 (en) Bluetooth communication method and system
CN114697438B (en) Method, device, equipment and storage medium for carrying out call by utilizing intelligent equipment

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
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address