WO2019120188A1 - Automatic communication mode switching method, terminal and smart device - Google Patents

Automatic communication mode switching method, terminal and smart device Download PDF

Info

Publication number
WO2019120188A1
WO2019120188A1 PCT/CN2018/121710 CN2018121710W WO2019120188A1 WO 2019120188 A1 WO2019120188 A1 WO 2019120188A1 CN 2018121710 W CN2018121710 W CN 2018121710W WO 2019120188 A1 WO2019120188 A1 WO 2019120188A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
smart device
same subnet
service set
set identifier
Prior art date
Application number
PCT/CN2018/121710
Other languages
French (fr)
Chinese (zh)
Inventor
蒋焘
Original Assignee
捷开通讯(深圳)有限公司
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 捷开通讯(深圳)有限公司 filed Critical 捷开通讯(深圳)有限公司
Publication of WO2019120188A1 publication Critical patent/WO2019120188A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, a terminal, and a smart device for automatically switching a communication method.
  • One of the methods for controlling the smart device is to connect with the smart device through a terminal such as a mobile phone, and send a control signal through the network to realize control of the smart device.
  • the terminal controls the smart device either by communicating in the same subnet of the home network or by forwarding control signals through the external device to achieve remote control.
  • the inventor of the present application found that the external network environment is complex, the delay is high, and the data transmission is limited by the bandwidth; while the internal subnet environment is simple, the delay is low, and the transmission speed is fast. Therefore, if the subnet transmission is preferentially selected, the transmission efficiency of the control signal can be improved.
  • the present invention provides a method, a terminal, and an intelligent device for automatically switching a communication method, so as to solve the technical problem that the control signal transmission efficiency caused by subnet transmission cannot be preferentially selected when the terminal controls the smart device in the prior art.
  • a technical solution adopted by the present invention is to provide a method for automatically switching a communication method, including:
  • the terminal determines whether the currently connected network is a mobile network or a wireless local area network
  • the network currently connected to the terminal is the wireless local area network, determine whether the terminal and the smart device are in the same subnet;
  • the terminal directly communicates with the smart device, otherwise the communication signal between the terminal and the smart device is forwarded by the external device.
  • a terminal including:
  • a processor configured to determine whether the currently connected network is a mobile network or a wireless local area network; if the network currently connected by the terminal is the wireless local area network, determine whether the terminal and the smart device are in the same subnet;
  • a first communication circuit configured to directly communicate with the smart device when the terminal is in the same subnet as the smart device; and when the terminal is not in the same subnet as the smart device, pass the external device Forwarding a communication signal with the smart device.
  • a smart device including:
  • a second communication circuit configured to: when the smart device is in the same subnet as the terminal, directly communicate with the smart device; when the smart device is not in the same subnet as the terminal, forwarding, by the external device, Communication signals between terminals.
  • the invention determines that the terminal and the smart device are in the same subnet, and preferentially selects the signal transmitted through the subnet, so that the terminal has higher control efficiency on the smart device.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for automatically switching a communication method according to the present invention
  • FIG. 2 is a schematic flow chart of another embodiment of a method for automatically switching a communication mode according to the present invention.
  • FIG. 3 is a schematic flow chart of another embodiment of a method for automatically switching a communication mode according to the present invention.
  • FIG. 4 is a schematic flow chart of another embodiment of a method for automatically switching a communication mode according to the present invention.
  • FIG. 5 is a schematic structural diagram of an embodiment of a terminal of the present invention.
  • FIG. 6 is a schematic structural diagram of an embodiment of a smart device according to the present invention.
  • an embodiment of a method for automatically switching a communication mode according to the present invention includes:
  • the terminal determines whether the currently connected network is a mobile network or a wireless local area network.
  • the terminal may be a mobile phone, a tablet computer, or the like.
  • the mobile network to which the terminal is connected may be a cellular mobile network, and the communication signal is forwarded through an external device such as a base station, a server, or the like.
  • the wireless LAN connected to the terminal may be a wireless network generated through a home router, such as WiFi (WIreless-Fidelity).
  • the network currently connected by the terminal is a wireless local area network, determine whether the terminal and the smart device are in the same subnet;
  • whether the terminal and the smart device are in the same subnet can be determined by using a Service Set Identifier (SSID) to broadcast and query an IP (Internet Protocol) address.
  • SSID Service Set Identifier
  • IP Internet Protocol
  • the smart device may be an intelligent monitoring device, an intelligent security device, a digital cinema device, an intelligent lighting device, or the like.
  • the external device may be a base station, a server, or the like.
  • the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.
  • an embodiment of a method for automatically switching a communication mode according to the present invention includes:
  • the mobile network to which the terminal is connected may be a cellular mobile network, and the communication signal is forwarded through an external device, such as a base station, a server, or the like.
  • the wireless LAN connected to the terminal may be a wireless network generated through a home router, such as WiFi.
  • the terminal may receive the service set identifier of the smart device through the currently connected wireless local area network, or obtain the service set identifier of the smart device by using other communication methods, such as Bluetooth, a mobile network, and the like.
  • the network currently connected by the terminal is a mobile network, forward the communication signal between the terminal and the smart device by using the external device.
  • the external device may be a server, and the terminal and the server, the smart device, and the server are respectively connected through a mobile network, and the communication signal is forwarded by the server to implement communication between the terminal and the smart device.
  • the service set identifier of the smart device if the service set identifier of the smart device is empty, it is not determined whether the terminal and the smart device are in the same subnet, and it is still necessary to further determine whether the terminal and the smart device are in the same subnet by looking for a mark.
  • step S207 If the search flag is true, the terminal and the smart device are in the same subnet, and can directly communicate; otherwise, returning to step S203, the communication signal between the terminal and the smart device is set by the outside world.
  • the terminal acquires the IP address of the smart device and compares it with the IP address of the terminal, thereby determining the terminal and the smart device. Whether it is in the same subnet.
  • the method for setting a search mark includes:
  • the terminal sends a broadcast to find a smart device in the currently connected subnet.
  • the terminal searches for a smart device by sending a service set identifier broadcast.
  • the search flag is set to true; If the terminal is not in the same subnet, the smart device cannot receive the service set identifier broadcast sent by the terminal, and the signal cannot be fed back. At this time, the search flag is set to false.
  • the method may further include:
  • the terminal monitors a system broadcast changed by the wireless local area network, and determines whether the wireless local area network connected to the terminal changes.
  • the terminal determines whether the wireless local area network changes by monitoring the system broadcast of the wireless local area network change by software.
  • the terminal and the smart device when the WLAN connected to the terminal does not change, if the terminal and the smart device are in the same subnet, the terminal and the smart device still communicate directly in the subnet; if the terminal and the smart device are not in the same subnet Within the terminal, the terminal and the smart device still forward the communication signal through the external device.
  • the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.
  • the original communication mode is executed, and the terminal is required to determine whether the smart device is broadcasted in the wireless local area network every time the terminal sends the control signal.
  • an embodiment of the terminal 50 of the present invention includes:
  • the processor 501 is configured to determine whether the currently connected network is a mobile network or a wireless local area network; if the network currently connected by the terminal is a wireless local area network, determine whether the terminal and the smart device are in the same subnet;
  • the first communication circuit 502 is configured to directly communicate with the smart device when the terminal and the smart device are in the same subnet; and when the terminal and the smart device are not in the same subnet, forward the communication signal with the smart device through the external device .
  • the method for the communication of the terminal 50 is described in the foregoing method for automatically switching the communication mode, and details are not described herein again.
  • the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.
  • an embodiment of the smart device 60 of the present invention includes:
  • the second communication circuit 601 is configured to directly communicate with the smart device when the smart device and the terminal are in the same subnet; and when the smart device and the terminal are not in the same subnet, forward and communicate with the external device The communication signal between the terminals.
  • the method for the communication of the smart device 60 is described in the foregoing method for automatically switching the communication mode, and details are not described herein again.
  • the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.

Landscapes

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

Abstract

Disclosed are an automatic communication mode switching method, a terminal and a smart device. The method for automatically switching communication modes comprises: a terminal determining whether a currently connected network is a mobile network or a wireless local area network; and if the currently connected network of the terminal is a wireless local area network, determining whether the terminal and the smart device are in the same subnet; if so, the terminal directly communicating with the smart device; otherwise, forwarding, by means of an external device, the communication signals between the terminal and the smart device. By determining whether the terminal and the intelligent device are in the same subnet, the present invention preferably selects a subnet to transmit signals, enabling the terminal to have a higher efficiency to control the smart device.

Description

一种自动切换通信方式的方法、终端及智能设备Method, terminal and smart device for automatically switching communication modes 技术领域Technical field
本发明涉及通信技术领域,特别涉及一种自动切换通信方式的方法、终端及智能设备。The present invention relates to the field of communications technologies, and in particular, to a method, a terminal, and a smart device for automatically switching a communication method.
背景技术Background technique
随着智能设备和物联网技术的蓬勃发展,越来越多的智能设备进入到普通用户的家庭。控制智能设备的方法之一就是通过手机等终端,与智能设备联网,通过网络发送控制信号,实现对智能设备的控制。终端对智能设备控制既可以通过在家庭网络的同一子网内通信,也可以通过外界设备转发控制信号,实现远程控制。With the rapid development of smart devices and Internet of Things technologies, more and more smart devices are entering the homes of ordinary users. One of the methods for controlling the smart device is to connect with the smart device through a terminal such as a mobile phone, and send a control signal through the network to realize control of the smart device. The terminal controls the smart device either by communicating in the same subnet of the home network or by forwarding control signals through the external device to achieve remote control.
本申请的发明人在长期的研发中发现,外部网络环境复杂,延迟性高,并且数据传输受到带宽限制;而内部子网环境单纯,延迟性低,传输速度快。因此,若优先选择子网传输,就能提高控制信号的传输效率。In the long-term research and development, the inventor of the present application found that the external network environment is complex, the delay is high, and the data transmission is limited by the bandwidth; while the internal subnet environment is simple, the delay is low, and the transmission speed is fast. Therefore, if the subnet transmission is preferentially selected, the transmission efficiency of the control signal can be improved.
发明内容Summary of the invention
本发明提供一种自动切换通信方式的方法、终端及智能设备,以解决现有技术中终端控制智能设备时不能优先选择子网传输造成的控制信号传输效率低的技术问题。The present invention provides a method, a terminal, and an intelligent device for automatically switching a communication method, so as to solve the technical problem that the control signal transmission efficiency caused by subnet transmission cannot be preferentially selected when the terminal controls the smart device in the prior art.
为解决上述技术问题,本发明采用的一个技术方案是提供一种自动切换通信方式的方法,包括:In order to solve the above technical problem, a technical solution adopted by the present invention is to provide a method for automatically switching a communication method, including:
终端判断当前连接的网络是移动网络还是无线局域网;The terminal determines whether the currently connected network is a mobile network or a wireless local area network;
若所述终端当前连接的网络是所述无线局域网,则判断所述终端与智能设备是否在同一子网内;If the network currently connected to the terminal is the wireless local area network, determine whether the terminal and the smart device are in the same subnet;
若是,则所述终端与所述智能设备直接通信,否则通过外界设备转发所述终端与所述智能设备之间的通信信号。If yes, the terminal directly communicates with the smart device, otherwise the communication signal between the terminal and the smart device is forwarded by the external device.
为解决上述技术问题,本发明采用的另一个技术方案是提供一种终端, 包括:In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a terminal, including:
处理器,用于判断当前连接的网络是移动网络还是无线局域网;若所述终端当前连接的网络是所述无线局域网,则判断所述终端与智能设备是否在同一子网内;a processor, configured to determine whether the currently connected network is a mobile network or a wireless local area network; if the network currently connected by the terminal is the wireless local area network, determine whether the terminal and the smart device are in the same subnet;
第一通信电路,用于当所述终端与所述智能设备在同一子网内时,与所述智能设备直接通信;当所述终端与所述智能设备不在同一子网内时,通过外界设备转发与所述智能设备之间的通信信号。a first communication circuit, configured to directly communicate with the smart device when the terminal is in the same subnet as the smart device; and when the terminal is not in the same subnet as the smart device, pass the external device Forwarding a communication signal with the smart device.
为解决上述技术问题,本发明采用的另一个技术方案是提供一种智能设备,包括:In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a smart device, including:
第二通信电路,用于当所述智能设备与终端在同一子网内时,与所述智能设备直接通信;当所述智能设备与终端不在同一子网内时,通过外界设备转发与所述终端之间的通信信号。a second communication circuit, configured to: when the smart device is in the same subnet as the terminal, directly communicate with the smart device; when the smart device is not in the same subnet as the terminal, forwarding, by the external device, Communication signals between terminals.
本发明通过判断终端与智能设备是否在同一子网内,优先选择通过子网传输信号,使得终端对智能设备的控制效率更高。The invention determines that the terminal and the smart device are in the same subnet, and preferentially selects the signal transmitted through the subnet, so that the terminal has higher control efficiency on the smart device.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,其中:In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings may be obtained according to these drawings without any creative work, wherein:
图1是本发明自动切换通信方式的方法一实施例的流程示意图;1 is a schematic flow chart of an embodiment of a method for automatically switching a communication method according to the present invention;
图2是本发明自动切换通信方式的方法另一实施例的流程示意图;2 is a schematic flow chart of another embodiment of a method for automatically switching a communication mode according to the present invention;
图3是本发明自动切换通信方式的方法另一实施例的流程示意图;3 is a schematic flow chart of another embodiment of a method for automatically switching a communication mode according to the present invention;
图4是本发明自动切换通信方式的方法另一实施例的流程示意图;4 is a schematic flow chart of another embodiment of a method for automatically switching a communication mode according to the present invention;
图5是本发明终端实施例的结构示意图;FIG. 5 is a schematic structural diagram of an embodiment of a terminal of the present invention; FIG.
图6是本发明智能设备实施例的结构示意图。FIG. 6 is a schematic structural diagram of an embodiment of a smart device according to the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没 有做出创造性劳动前提下所获得的所有其他实施例,均属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参见图1,本发明自动切换通信方式的方法一实施例包括:Referring to FIG. 1, an embodiment of a method for automatically switching a communication mode according to the present invention includes:
S101、终端判断当前连接的网络是移动网络还是无线局域网;S101. The terminal determines whether the currently connected network is a mobile network or a wireless local area network.
在本实施例中,终端可以为手机、平板电脑等。终端连接的移动网络可以为蜂窝移动网络,通过外界设备,例如基站、服务器等转发通信信号。终端连接的无线局域网可以为通过家庭路由器产生的无线网络,例如WiFi(WIreless-Fidelity,无线保真)等。In this embodiment, the terminal may be a mobile phone, a tablet computer, or the like. The mobile network to which the terminal is connected may be a cellular mobile network, and the communication signal is forwarded through an external device such as a base station, a server, or the like. The wireless LAN connected to the terminal may be a wireless network generated through a home router, such as WiFi (WIreless-Fidelity).
S102、若终端当前连接的网络是无线局域网,则判断终端与智能设备是否在同一子网内;S102. If the network currently connected by the terminal is a wireless local area network, determine whether the terminal and the smart device are in the same subnet;
在本实施例中,可以通过服务集标识(SSID,Service Set Identifier)广播、查询IP(Internet Protocol,网络协议)地址等方式判断终端与智能设备是否在同一子网内。In this embodiment, whether the terminal and the smart device are in the same subnet can be determined by using a Service Set Identifier (SSID) to broadcast and query an IP (Internet Protocol) address.
在本实施例中,智能设备可以是智能监控设备、智能安防设备、数字影院设备、智能照明设备等。In this embodiment, the smart device may be an intelligent monitoring device, an intelligent security device, a digital cinema device, an intelligent lighting device, or the like.
S103、若是,则所述终端与所述智能设备直接通信;S103. If yes, the terminal directly communicates with the smart device.
S104、若否,则通过外界设备转发所述终端与所述智能设备之间的通信信号。S104. If no, the communication signal between the terminal and the smart device is forwarded by the external device.
在本实施例中,外界设备可以为基站、服务器等。In this embodiment, the external device may be a base station, a server, or the like.
本发明实施例通过判断终端与智能设备是否在同一子网内,优先选择通过子网传输信号,使得终端对智能设备的控制效率更高。In the embodiment of the present invention, by determining whether the terminal and the smart device are in the same subnet, the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.
参见图2,本发明自动切换通信方式的方法一实施例包括:Referring to FIG. 2, an embodiment of a method for automatically switching a communication mode according to the present invention includes:
S201、判断终端当前连接的网络是移动网络还是无线局域网;S201. Determine whether the network currently connected by the terminal is a mobile network or a wireless local area network;
在本实施例中,终端连接的移动网络可以为蜂窝移动网络,通过外界设备,例如基站、服务器等转发通信信号。终端连接的无线局域网可以为通过家庭路由器产生的无线网络,例如WiFi等。In this embodiment, the mobile network to which the terminal is connected may be a cellular mobile network, and the communication signal is forwarded through an external device, such as a base station, a server, or the like. The wireless LAN connected to the terminal may be a wireless network generated through a home router, such as WiFi.
S202、若终端当前连接的网络是无线局域网,则获取智能设备的服务集标识;S202. If the network currently connected by the terminal is a wireless local area network, obtain a service set identifier of the smart device.
在本实施例中,终端可以通过当前连接的无线局域网接收智能设备的服务集标识,也可以通过其他通信方式获取智能设备的服务集标识,例如 蓝牙、移动网络等。In this embodiment, the terminal may receive the service set identifier of the smart device through the currently connected wireless local area network, or obtain the service set identifier of the smart device by using other communication methods, such as Bluetooth, a mobile network, and the like.
S203、若终端当前连接的网络是移动网络,则通过外界设备转发终端与智能设备之间的通信信号;S203. If the network currently connected by the terminal is a mobile network, forward the communication signal between the terminal and the smart device by using the external device.
在本实施例中,外界设备可以为服务器,终端与服务器、智能设备与服务器分别通过移动网络连接,通过服务器转发通信信号以实现终端与智能设备之间的通信。In this embodiment, the external device may be a server, and the terminal and the server, the smart device, and the server are respectively connected through a mobile network, and the communication signal is forwarded by the server to implement communication between the terminal and the smart device.
S204、判断智能设备的服务集标识是否为空;S204. Determine whether the service set identifier of the smart device is empty.
在本实施例中,通过智能设备的服务集标识缓存判断智能设备的服务集标识是否为空。In this embodiment, it is determined whether the service set identifier of the smart device is empty by the service set identifier cache of the smart device.
S205、若智能设备的服务集标识不为空,则判断终端的服务集标识与智能设备的服务集标识是否相同;S205. If the service set identifier of the smart device is not empty, determine whether the service set identifier of the terminal is the same as the service set identifier of the smart device.
S206、若智能设备的服务集标识为空,或终端的服务集标识与智能设备的服务集标识相同,则判断寻找标记(Last Found)是否为真;S206. If the service set identifier of the smart device is empty, or the service set identifier of the terminal is the same as the service set identifier of the smart device, determine whether the Last Found is true.
在本实施例中,若智能设备的服务集标识为空,则无法确定终端与智能设备是否在同一子网,仍需通过寻找标记进一步判断终端与智能设备是否在同一子网。In this embodiment, if the service set identifier of the smart device is empty, it is not determined whether the terminal and the smart device are in the same subnet, and it is still necessary to further determine whether the terminal and the smart device are in the same subnet by looking for a mark.
S207、若寻找标记为真,则终端与智能设备在同一子网内,可以直接通信;否则返回步骤S203,通过外界设转发终端与智能设备之间的通信信号。S207. If the search flag is true, the terminal and the smart device are in the same subnet, and can directly communicate; otherwise, returning to step S203, the communication signal between the terminal and the smart device is set by the outside world.
在其他实施例中,还可以通过查询IP地址的方式判断终端与智能设备是否在同一子网内,例如,终端获取智能设备的IP地址,与终端的IP地址进行比较,从而确定终端与智能设备是否在同一子网中。In other embodiments, it is also possible to determine whether the terminal and the smart device are in the same subnet by querying the IP address. For example, the terminal acquires the IP address of the smart device and compares it with the IP address of the terminal, thereby determining the terminal and the smart device. Whether it is in the same subnet.
具体的,参见图3,设置寻找标记的方法具体包括:Specifically, referring to FIG. 3, the method for setting a search mark includes:
S301、终端在当前连接的子网内发送广播寻找智能设备;S301. The terminal sends a broadcast to find a smart device in the currently connected subnet.
在本实施例中,终端通过发送服务集标识广播寻找智能设备。In this embodiment, the terminal searches for a smart device by sending a service set identifier broadcast.
S302、判断智能设备是否应答;S302. Determine whether the smart device answers.
S303、若智能设备应答,则将寻找标记设置为真;S303. If the smart device answers, set the search flag to true.
S304、若智能设备无应答,则将寻找标记设置为假。S304. If the smart device does not answer, set the search flag to false.
在本实施例中,若智能设备与终端在同一子网中,当智能设备接收到终端发送的服务集标识广播,就会反馈信号至终端,此时将寻找标记设置 为真;若智能设备与终端不在同一子网中,智能设备无法接收到终端发送的服务集标识广播,就无法反馈信号,此时将寻找标记设置为假。In this embodiment, if the smart device and the terminal are in the same subnet, when the smart device receives the service set identifier broadcast sent by the terminal, the device sends a feedback signal to the terminal, and the search flag is set to true; If the terminal is not in the same subnet, the smart device cannot receive the service set identifier broadcast sent by the terminal, and the signal cannot be fed back. At this time, the search flag is set to false.
参见图4,在本实施例中还可以包括:Referring to FIG. 4, in this embodiment, the method may further include:
S401、终端监听无线局域网改变的系统广播,判断终端连接的无线局域网是否发生改变;S401. The terminal monitors a system broadcast changed by the wireless local area network, and determines whether the wireless local area network connected to the terminal changes.
在本实施例中,终端通过软件监听无线局域网改变的系统广播来判断无线局域网是否发生改变。In this embodiment, the terminal determines whether the wireless local area network changes by monitoring the system broadcast of the wireless local area network change by software.
S402、若是,则重新判断终端与智能设备是否在同一子网内;S402. If yes, re-determine whether the terminal and the smart device are in the same subnet;
在本实施例中,若终端连接的无线局域网发生改变,则需重新判断终端与智能设备是否在同一子网内,即返回上述的步骤S201,重复判断过程。In this embodiment, if the WLAN connected to the terminal changes, it is necessary to re-determine whether the terminal and the smart device are in the same subnet, that is, return to the above step S201, and repeat the determination process.
S403、否则执行原有的通信方式。S403. Otherwise, the original communication mode is executed.
在本实施例中,终端连接的无线局域网没有发生改变时,若终端与智能设备在同一子网内,则终端与智能设备仍在子网中直接进行通信;若终端与智能设备不在同一子网内,则终端与智能设备仍通过外界设备转发通信信号。In this embodiment, when the WLAN connected to the terminal does not change, if the terminal and the smart device are in the same subnet, the terminal and the smart device still communicate directly in the subnet; if the terminal and the smart device are not in the same subnet Within the terminal, the terminal and the smart device still forward the communication signal through the external device.
本发明实施例通过判断终端与智能设备是否在同一子网内,优先选择通过子网传输信号,使得终端对智能设备的控制效率更高。同时通过监听无线局域网改变的系统广播,在无线局域网没有发生改变的情况下,执行原有的通信方式,避免终端每次发送控制信号的时候都需要在无线局域网中通过广播的方式确定智能设备是否存在,节省时间和通信次数,降低程度逻辑的复杂度。In the embodiment of the present invention, by determining whether the terminal and the smart device are in the same subnet, the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device. At the same time, by monitoring the system broadcast changed by the wireless local area network, in the case that the wireless local area network has not changed, the original communication mode is executed, and the terminal is required to determine whether the smart device is broadcasted in the wireless local area network every time the terminal sends the control signal. Exist, save time and communication times, reduce the complexity of the degree of logic.
参见图5,本发明终端50实施例包括:Referring to FIG. 5, an embodiment of the terminal 50 of the present invention includes:
处理器501,用于判断当前连接的网络是移动网络还是无线局域网;若终端当前连接的网络是无线局域网,则判断终端与智能设备是否在同一子网内;The processor 501 is configured to determine whether the currently connected network is a mobile network or a wireless local area network; if the network currently connected by the terminal is a wireless local area network, determine whether the terminal and the smart device are in the same subnet;
第一通信电路502,用于当终端与智能设备在同一子网内时,与智能设备直接通信;当终端与智能设备不在同一子网内时,通过外界设备转发与智能设备之间的通信信号。The first communication circuit 502 is configured to directly communicate with the smart device when the terminal and the smart device are in the same subnet; and when the terminal and the smart device are not in the same subnet, forward the communication signal with the smart device through the external device .
具体的,终端50的通信方法参见上述自动切换通信方式的方法实施例,在此不再赘述。Specifically, the method for the communication of the terminal 50 is described in the foregoing method for automatically switching the communication mode, and details are not described herein again.
本发明实施例通过判断终端与智能设备是否在同一子网内,优先选择通过子网传输信号,使得终端对智能设备的控制效率更高。In the embodiment of the present invention, by determining whether the terminal and the smart device are in the same subnet, the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.
参见图6,本发明智能设备60实施例包括:Referring to FIG. 6, an embodiment of the smart device 60 of the present invention includes:
第二通信电路601,用于当所述智能设备与终端在同一子网内时,与所述智能设备直接通信;当所述智能设备与终端不在同一子网内时,通过外界设备转发与所述终端之间的通信信号。The second communication circuit 601 is configured to directly communicate with the smart device when the smart device and the terminal are in the same subnet; and when the smart device and the terminal are not in the same subnet, forward and communicate with the external device The communication signal between the terminals.
具体的,智能设备60的通信方法参见上述自动切换通信方式的方法实施例,在此不再赘述。Specifically, the method for the communication of the smart device 60 is described in the foregoing method for automatically switching the communication mode, and details are not described herein again.
本发明实施例通过判断终端与智能设备是否在同一子网内,优先选择通过子网传输信号,使得终端对智能设备的控制效率更高。In the embodiment of the present invention, by determining whether the terminal and the smart device are in the same subnet, the signal is transmitted through the subnet preferentially, so that the terminal has higher control efficiency on the smart device.
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of the present invention.

Claims (17)

  1. 一种自动切换通信方式的方法,其中,包括:A method for automatically switching a communication method, including:
    终端判断当前连接的网络是移动网络还是无线局域网;The terminal determines whether the currently connected network is a mobile network or a wireless local area network;
    若所述终端当前连接的网络是所述无线局域网,则判断所述终端与智能设备是否在同一子网内;If the network currently connected to the terminal is the wireless local area network, determine whether the terminal and the smart device are in the same subnet;
    若是,则所述终端与所述智能设备直接通信,否则通过外界设备转发所述终端与所述智能设备之间的通信信号。If yes, the terminal directly communicates with the smart device, otherwise the communication signal between the terminal and the smart device is forwarded by the external device.
  2. 根据权利要求1所述的方法,其中,判断所述终端与智能设备是否在同一子网内的方法具体包括:The method of claim 1, wherein the method for determining whether the terminal and the smart device are in the same subnet specifically comprises:
    判断所述智能设备的服务集标识是否为空;Determining whether the service set identifier of the smart device is empty;
    若所述智能设备的服务集标识为空,则判断寻找标记是否为真,若寻找标记为真,则所述终端与所述智能设备在同一子网内,若寻找标记为假,则所述终端与所述智能设备不在同一子网内;If the service set identifier of the smart device is empty, it is determined whether the search mark is true. If the search mark is true, the terminal is in the same subnet as the smart device, and if the search mark is false, the The terminal is not in the same subnet as the smart device;
    若所述服务集表示不为空,则判断所述终端的服务集标识与所述智能设备的服务集标识是否相同,若所述终端与所述智能设备的服务集标识相同,则判断寻找标记是否为真,若寻找标记为真,则所述终端与所述智能设备在同一子网内,若寻找标记为假,则所述终端与所述智能设备不在同一子网内;若所述终端与所述智能设备的服务集标识不同,则所述终端与所述智能设备不在同一子网内。If the service set indication is not empty, determining whether the service set identifier of the terminal is the same as the service set identifier of the smart device, and if the terminal and the smart device have the same service set identifier, determining the search mark If the flag is true, the terminal is in the same subnet as the smart device, and if the search flag is false, the terminal is not in the same subnet as the smart device; Different from the service set identifier of the smart device, the terminal is not in the same subnet as the smart device.
  3. 根据权利要求2所述的方法,其中,判断所述智能设备的服务集标识是否为空的方法具体包括:The method of claim 2, wherein the method for determining whether the service set identifier of the smart device is empty comprises:
    获取所述智能设备的服务集标识缓存,根据所述智能设备的服务集标识缓存判断所述智能设备的服务集标识是否为空。Obtaining a service set identifier cache of the smart device, and determining, according to the service set identifier cache of the smart device, whether the service set identifier of the smart device is empty.
  4. 根据权利要求3所述的方法,其中,所述终端通过当前连接的无线局域网获取所述智能设备的服务集标识,或者是通过蓝牙或移动网络获取所述智能设备的服务集标识。The method according to claim 3, wherein the terminal acquires a service set identifier of the smart device through a currently connected wireless local area network, or acquires a service set identifier of the smart device through a Bluetooth or a mobile network.
  5. 根据权利要求2所述的方法,其中,设置所述寻找标记的方法具体包括:The method of claim 2, wherein the method of setting the search mark comprises:
    所述终端在当前连接的子网内发送广播寻找所述智能设备;The terminal sends a broadcast in the currently connected subnet to find the smart device;
    判断所述智能设备是否应答;Determining whether the smart device answers
    若所述智能设备应答,则将所述寻找标记设置为真;Setting the search flag to true if the smart device answers;
    若所述智能设备无应答,则将所述寻找标记设置为假。If the smart device does not answer, the lookup flag is set to false.
  6. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    终端监听所述无线局域网改变的系统广播;The terminal monitors the system broadcast of the wireless local area network change;
    判断终端连接的无线局域网是否发生改变;Determining whether the wireless LAN connected to the terminal has changed;
    若终端连接的无线局域网发生改变,则重新判断所述终端与智能设备是否在同一子网内;否则继续执行原有的通信方式。If the wireless LAN connected to the terminal changes, it is determined whether the terminal and the smart device are in the same subnet; otherwise, the original communication mode is continued.
  7. 根据权利要求6所述的方法,其中,The method of claim 6 wherein
    所述终端通过软件监听所述无线局域网改变的系统广播。The terminal monitors the system broadcast of the wireless local area network change through software.
  8. 根据权利要求1所述的方法,其中,判断所述终端与智能设备是否在同一子网内的方法具体包括:The method of claim 1, wherein the method for determining whether the terminal and the smart device are in the same subnet specifically comprises:
    所述终端获取所述智能设备的IP地址,将所述智能设备的IP地址与所述终端本身的IP地址进行比较,从而确定所述终端与所述智能设备是否在同一子网中。The terminal acquires an IP address of the smart device, compares an IP address of the smart device with an IP address of the terminal itself, and determines whether the terminal and the smart device are in the same subnet.
  9. 一种终端,其中,包括:A terminal, including:
    处理器,用于判断当前连接的网络是移动网络还是无线局域网;若所述终端当前连接的网络是所述无线局域网,则判断所述终端与智能设备是否在同一子网内;a processor, configured to determine whether the currently connected network is a mobile network or a wireless local area network; if the network currently connected by the terminal is the wireless local area network, determine whether the terminal and the smart device are in the same subnet;
    第一通信电路,用于当所述终端与所述智能设备在同一子网内时,与所述智能设备直接通信;当所述终端与所述智能设备不在同一子网内时,通过外界设备转发与所述智能设备之间的通信信号。a first communication circuit, configured to directly communicate with the smart device when the terminal is in the same subnet as the smart device; and when the terminal is not in the same subnet as the smart device, pass the external device Forwarding a communication signal with the smart device.
  10. 根据权利要求9所述的终端,其中,The terminal according to claim 9, wherein
    所述处理器还用于:判断所述智能设备的服务集标识是否为空;若所述智能设备的服务集标识为空,则判断寻找标记是否为真,若寻找标记为真,则所述终端与所述智能设备在同一子网内,若寻找标记为假,则所述终端与所述智 能设备不在同一子网内;若所述服务集表示不为空,则判断所述终端的服务集标识与所述智能设备的服务集标识是否相同,若所述终端与所述智能设备的服务集标识相同,则判断寻找标记是否为真,若寻找标记为真,则所述终端与所述智能设备在同一子网内,若寻找标记为假,则所述终端与所述智能设备不在同一子网内;若所述终端与所述智能设备的服务集标识不同,则所述终端与所述智能设备不在同一子网内。The processor is further configured to: determine whether the service set identifier of the smart device is empty; if the service set identifier of the smart device is empty, determine whether the search mark is true, and if the search mark is true, the The terminal is in the same subnet as the smart device, and if the search mark is false, the terminal is not in the same subnet as the smart device; if the service set indicates not empty, determining the service of the terminal Whether the set identifier is the same as the service set identifier of the smart device, and if the terminal and the smart device have the same service set identifier, determining whether the search mark is true, and if the search mark is true, the terminal and the If the smart device is in the same subnet, if the search mark is false, the terminal is not in the same subnet as the smart device; if the terminal and the smart device have different service set identifiers, the terminal and the The smart device is not in the same subnet.
  11. 根据权利要求10所述的终端,其中,The terminal according to claim 10, wherein
    所述第一通信电路还用于获取所述智能设备的服务集标识缓存,所述处理器根据所述智能设备的服务集标识缓存判断所述智能设备的服务集标识是否为空。The first communication circuit is further configured to obtain a service set identifier cache of the smart device, and the processor determines, according to the service set identifier cache of the smart device, whether the service set identifier of the smart device is empty.
  12. 根据权利要求11所述的终端,其中,所述第一通信电路通过无线局域网连接或蓝牙连接或移动网络连接的方式获取所述智能设备的服务集标识。The terminal according to claim 11, wherein the first communication circuit acquires a service set identifier of the smart device by means of a wireless local area network connection or a Bluetooth connection or a mobile network connection.
  13. 根据权利要求10所述的终端,其中,所述处理器还用于设置所述寻找标记,具体包括:The terminal according to claim 10, wherein the processor is further configured to set the search mark, specifically:
    控制所述终端在当前连接的子网内发送广播寻找所述智能设备;Controlling, by the terminal, sending a broadcast in the currently connected subnet to find the smart device;
    判断所述智能设备是否应答;Determining whether the smart device answers
    若所述智能设备应答,则将所述寻找标记设置为真;Setting the search flag to true if the smart device answers;
    若所述智能设备无应答,则将所述寻找标记设置为假。If the smart device does not answer, the lookup flag is set to false.
  14. 根据权利要求9所述的终端,其中,所述处理器还用于:The terminal of claim 9, wherein the processor is further configured to:
    控制所述终端监听所述无线局域网改变的系统广播;Controlling, by the terminal, a system broadcast of the wireless local area network change;
    判断终端连接的无线局域网是否发生改变;Determining whether the wireless LAN connected to the terminal has changed;
    若终端连接的无线局域网发生改变,则重新判断所述终端与智能设备是否在同一子网内;否则继续执行原有的通信方式。If the wireless LAN connected to the terminal changes, it is determined whether the terminal and the smart device are in the same subnet; otherwise, the original communication mode is continued.
  15. 根据权利要求14所述的终端,其中,所述处理器还用于:The terminal of claim 14, wherein the processor is further configured to:
    控制所述终端通过软件监听所述无线局域网改变的系统广播。Controlling, by the software, the system broadcasts the system broadcast changed by the wireless local area network.
  16. 根据权利要求9所述的终端,其中,所述处理器还用于:The terminal of claim 9, wherein the processor is further configured to:
    控制所述终端获取所述智能设备的IP地址,将所述智能设备的IP地址与所 述终端本身的IP地址进行比较,以判断所述终端与所述智能设备是否在同一子网内。The terminal is controlled to obtain an IP address of the smart device, and compares an IP address of the smart device with an IP address of the terminal itself to determine whether the terminal and the smart device are in the same subnet.
  17. 一种智能设备,其中,包括:A smart device, including:
    第二通信电路,用于当所述智能设备与终端在同一子网内时,与所述终端直接通信;当所述智能设备与终端不在同一子网内时,通过外界设备转发与所述终端之间的通信信号;a second communication circuit, configured to: when the smart device and the terminal are in the same subnet, directly communicate with the terminal; when the smart device is not in the same subnet as the terminal, forwarding, by the external device, the terminal Communication signal between
    其中,所述终端包括:The terminal includes:
    处理器,用于判断当前连接的网络是移动网络还是无线局域网;若所述终端当前连接的网络是所述无线局域网,则判断所述终端与所述智能设备是否在同一子网内;a processor, configured to determine whether the currently connected network is a mobile network or a wireless local area network; if the network currently connected by the terminal is the wireless local area network, determining whether the terminal and the smart device are in the same subnet;
    第一通信电路,用于当所述终端与所述智能设备在同一子网内时,与所述智能设备直接通信;当所述终端与所述智能设备不在同一子网内时,通过外界设备转发与所述智能设备之间的通信信号。a first communication circuit, configured to directly communicate with the smart device when the terminal is in the same subnet as the smart device; and when the terminal is not in the same subnet as the smart device, pass the external device Forwarding a communication signal with the smart device.
PCT/CN2018/121710 2017-12-18 2018-12-18 Automatic communication mode switching method, terminal and smart device WO2019120188A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711371499.7A CN108174434B (en) 2017-12-18 2017-12-18 Method, terminal and intelligent device for automatically switching communication modes
CN201711371499.7 2017-12-18

Publications (1)

Publication Number Publication Date
WO2019120188A1 true WO2019120188A1 (en) 2019-06-27

Family

ID=62522744

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121710 WO2019120188A1 (en) 2017-12-18 2018-12-18 Automatic communication mode switching method, terminal and smart device

Country Status (2)

Country Link
CN (1) CN108174434B (en)
WO (1) WO2019120188A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023134387A1 (en) * 2022-01-14 2023-07-20 荣耀终端有限公司 Communication method and apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108174434B (en) * 2017-12-18 2020-04-24 捷开通讯(深圳)有限公司 Method, terminal and intelligent device for automatically switching communication modes

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217297A (en) * 2007-12-26 2008-07-09 周津诚 A WG wireless transceiver
CN103048961A (en) * 2012-12-06 2013-04-17 四川长虹电器股份有限公司 Control method of intelligent household appliance
CN105262599A (en) * 2015-07-22 2016-01-20 大连海事大学 WiFi based remote power supply control system
CN105530672A (en) * 2016-02-17 2016-04-27 海信集团有限公司 Switching method and switching system for mobile terminal and smart home communication network
WO2016093674A1 (en) * 2014-12-12 2016-06-16 주식회사 경동원 Home network system using z-wave network and home automation device connection method using same
CN108174434A (en) * 2017-12-18 2018-06-15 捷开通讯(深圳)有限公司 A kind of method, terminal and smart machine for automatically switching communication mode

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217297A (en) * 2007-12-26 2008-07-09 周津诚 A WG wireless transceiver
CN103048961A (en) * 2012-12-06 2013-04-17 四川长虹电器股份有限公司 Control method of intelligent household appliance
WO2016093674A1 (en) * 2014-12-12 2016-06-16 주식회사 경동원 Home network system using z-wave network and home automation device connection method using same
CN105262599A (en) * 2015-07-22 2016-01-20 大连海事大学 WiFi based remote power supply control system
CN105530672A (en) * 2016-02-17 2016-04-27 海信集团有限公司 Switching method and switching system for mobile terminal and smart home communication network
CN108174434A (en) * 2017-12-18 2018-06-15 捷开通讯(深圳)有限公司 A kind of method, terminal and smart machine for automatically switching communication mode

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023134387A1 (en) * 2022-01-14 2023-07-20 荣耀终端有限公司 Communication method and apparatus
EP4247056A4 (en) * 2022-01-14 2024-09-11 Honor Device Co Ltd Communication method and apparatus

Also Published As

Publication number Publication date
CN108174434B (en) 2020-04-24
CN108174434A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
US11129030B1 (en) Communication networks for broadcast and mobile devices
KR101891145B1 (en) Method and apparatus for managing device discovery in wireless system
US9137641B2 (en) Wireless communication system, base station, and terminal
WO2023284584A1 (en) Communication method and apparatus
WO2016049837A1 (en) Data transmission method and apparatus
US10264038B2 (en) Discovery and management of synchronous audio or video streaming service to multiple sinks in wireless display system
EP2995128B1 (en) Delegating wifi network discovery and traffic monitoring
CN109561340B (en) Multimedia service processing method, device, multimedia service group and storage medium
US9894616B2 (en) Delegating WiFi network discovery and traffic monitoring
CN105392185B (en) A kind of networking method of smart machine, apparatus and system
WO2012083825A1 (en) Method, system and device for integrating internet of things with telecommunication network
TWI849175B (en) Directed forwarding information sharing between devices in a mesh network
WO2019120188A1 (en) Automatic communication mode switching method, terminal and smart device
CN110824946A (en) Intelligent equipment control system and method based on WiFi ad hoc network
KR102009810B1 (en) Method and apparatus for transmitting and receiving a service in a wireless communication system
WO2014166201A1 (en) Multiband wireless communication method, coordinating device, and network
JPWO2017119219A1 (en) Communication method
WO2023001172A1 (en) Method and apparatus for determining recommended bit rate, and related device
CN105474706B (en) WTP cut-in method, management method, apparatus and system
CN115515254A (en) Point-to-point connection establishing method and device, storage medium and electronic equipment
KR101643512B1 (en) Data transmission method, multi-medium access point and multi-medium client
US9936473B2 (en) Method and apparatus for managing radio interfaces
US8824431B2 (en) Apparatus for acquiring network information
JP2007028231A (en) Wireless lan system
US10880198B2 (en) Aggregating targeted and exploration queries

Legal Events

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

Ref document number: 18892281

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18892281

Country of ref document: EP

Kind code of ref document: A1