WO2017181522A1 - Terminal networking method and device - Google Patents

Terminal networking method and device Download PDF

Info

Publication number
WO2017181522A1
WO2017181522A1 PCT/CN2016/087149 CN2016087149W WO2017181522A1 WO 2017181522 A1 WO2017181522 A1 WO 2017181522A1 CN 2016087149 W CN2016087149 W CN 2016087149W WO 2017181522 A1 WO2017181522 A1 WO 2017181522A1
Authority
WO
WIPO (PCT)
Prior art keywords
networking
terminal
acceleration
acceleration sensor
key
Prior art date
Application number
PCT/CN2016/087149
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 WO2017181522A1 publication Critical patent/WO2017181522A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • H04W4/027Services making use of location information using location based information parameters using movement velocity, acceleration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/26Reselection being triggered by specific parameters by agreed or negotiated communication parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the present invention relates to, but is not limited to, a terminal networking technology, and more particularly to a terminal networking method and apparatus.
  • Networking combines different terminal devices into one network and can communicate with each other, such as sending information and sending files.
  • the network can be a local area network or a wide area network.
  • the terminal is widely used.
  • the terminals In addition to communication through the public mobile communication network provided by the communication carrier, the terminals often form a local area network through some short-range wireless communication methods, such as Bluetooth, Near Field Communication (NFC, Near). Field Communication), Wireless Fidelity (WIFI, Wireless-Fidelity), etc., so that it does not consume traffic from the communication carrier, and the transmission is faster.
  • some short-range wireless communication methods such as Bluetooth, Near Field Communication (NFC, Near). Field Communication), Wireless Fidelity (WIFI, Wireless-Fidelity), etc.
  • the embodiment of the invention provides a terminal networking method and device, which can quickly and simply set up a wireless local area network without manual matching or authentication.
  • the embodiment of the invention provides a terminal networking method, and the method includes:
  • the acceleration value is greater than or equal to the preset acceleration threshold, triggering the networking requirement of the terminal, enabling the preset wireless communication mode of the terminal, and generating a networking key based on the current time point;
  • the automatic connection completes the networking.
  • the method before the obtaining the acceleration value of the acceleration sensor of the terminal, the method further includes:
  • the terminal starts a switch of the networking, and sets a networking mode
  • the networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals.
  • the acceleration sensor is a three-axis acceleration sensor
  • the acceleration value of the acceleration sensor includes an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
  • the networking requirements of the terminal are triggered, including:
  • the acceleration sensor of the terminal triggers the networking requirement of the terminal when the acceleration value of at least one of the three directions of X, Y, and Z is greater than or equal to the acceleration threshold.
  • the generating the networking key based on the current time point includes:
  • the networking key is generated based on the time point at which the terminal networking requirement is triggered.
  • the automatic connection completes the networking, including:
  • the networking is completed by automatically connecting two or more terminals with the same networking key.
  • An embodiment of the present invention further provides a terminal networking device, where the device includes an acquisition module, a trigger module, and a connection module, where
  • the acquiring module is configured to: acquire an acceleration value of the acceleration sensor of the terminal;
  • the triggering module is configured to: when the acceleration value is greater than or equal to a preset acceleration threshold, trigger a networking requirement of the terminal, enable a preset wireless communication mode of the terminal, and generate a network based on the current time point.
  • the connection module is configured to: start the search based on the wireless communication mode, and automatically connect to complete the networking when two or more terminals of the same networking key are searched.
  • the device further includes: a function setting module, configured to:
  • the networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals.
  • the acceleration sensor is a three-axis acceleration sensor
  • the acceleration value of the acceleration sensor includes an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
  • the trigger module is set to:
  • acceleration sensor of the terminal in at least one of the three directions of X, Y, and Z is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal.
  • connection module is set to:
  • the networking key is generated based on the time point at which the terminal networking requirement is triggered.
  • connection module is set to:
  • the difference between the two network keys is obtained. If the difference is less than the preset value, the networking key is considered to be the same;
  • the networking is completed by automatically connecting two or more terminals with the same networking key.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions that are implemented by a processor to implement the above method.
  • the embodiment of the invention provides a terminal networking method and device, and acquires an acceleration sensor of the terminal.
  • the acceleration value is greater than or equal to the preset acceleration threshold, triggering the networking requirement of the terminal, enabling the preset wireless communication mode of the terminal, and generating a networking key based on the current time point;
  • the wireless communication mode enables the search, and when two or more terminals of the same networking key are searched, the automatic connection completes the networking; it can be seen that the embodiment of the present invention completes the group of multiple terminals by the movement of multiple terminals. Network, and no need to manually find, add other terminals, without the need to manually enter the key, can quickly and easily set up a wireless LAN.
  • FIG. 1 is a schematic flowchart of an implementation process of a terminal networking method based on an acceleration sensor according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an implementation process of a two-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic flowchart of an implementation process of a multi-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 3 of the present invention
  • FIG. 4 is a schematic diagram of another implementation flow of a multi-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 4 of the present invention
  • FIG. 5 is a schematic diagram of a terminal networking device based on an acceleration sensor according to Embodiment 5 of the present invention.
  • an acceleration sensor-based terminal networking method of the embodiment includes:
  • Step 101 Acquire an acceleration value of an acceleration sensor of the terminal.
  • the acceleration sensor may be a three-axis acceleration sensor
  • the acceleration value of the acceleration sensor includes: acceleration of the acceleration sensor in the X direction a value, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
  • the premise that the acceleration value can be obtained is: the terminal is in motion, such as moving, rotating, vibrating, shaking, etc.; the motion in this embodiment may be the handheld terminal for the handheld terminal.
  • the acceleration sensor can be driven by adding a drive motor to obtain an acceleration value.
  • performing corresponding setting on the terminal includes: the terminal turning on the switch of the networking, setting a networking mode; setting the acceleration sensor of the terminal Acceleration threshold; setting the wireless communication mode that automatically enters after triggering the networking requirement of the terminal.
  • the networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals;
  • the two-person mode refers to two terminals forming a local area network that can send messages to each other and transfer files, one of which creates a local area network and the other of which joins a local area network;
  • Multi-player mode means that multiple terminals form a local area network, one of which acts as the originating terminal, creates a local area network, and the other joins the local area network;
  • the originating terminal here may arbitrarily designate one terminal, or may be the one that first triggers the networking requirement;
  • the arbitrarily designated manner may be selected when a certain terminal opens the networking switch, or when the terminal is “moving”, pressing a specified key, such as a volume key, a home screen Home key, a menu Menu key, or a return Back button.
  • a specified key such as a volume key, a home screen Home key, a menu Menu key, or a return Back button.
  • the wireless communication method generally includes Bluetooth, Near Field Communication (NFC), or Wireless Fidelity (WIFI);
  • Bluetooth is a wireless technology standard, which can realize short-distance data exchange between fixed equipment, mobile equipment and building personal area network, using UHF radio waves of 2.4-2.485 GHz ISM band.
  • Bluetooth has the characteristics of low cost, short transmission distance and low power consumption. The general transmission distance is about 10 meters.
  • the commonly used mobile phones generally have Bluetooth function.
  • Bluetooth can also pass Bluetooth. Connect a mobile phone accessory such as a headset.
  • NFC evolved from the integration of contactless radio frequency identification (RFID) and interoperability technologies, The combination of an inductive card reader, inductive card and point-to-point function on a single chip enables identification and data exchange with compatible devices over short distances.
  • RFID radio frequency identification
  • the operating frequency is 13.56MHz.
  • NFC has a small transmission volume and short transmission distance, but it is safer and faster.
  • the commonly used mobile phones generally have NFC function, and the mobile phone with this function can be used as an airport. Boarding verification, building access keys, traffic card, credit card, payment card, etc.
  • WIFI is a technology that can wirelessly connect terminals such as personal computers and handheld devices (such as tablets and mobile phones). It is a high-frequency radio signal with a wide frequency range and transmission compared to Bluetooth and NFC. Large capacity, fast transmission speed and long transmission distance.
  • the wireless communication method can also be a third-party application (APP), such as sink sharing, eggplant fast transmission, fast tooth, flash transmission, etc.
  • APP third-party application
  • These applications generally use WIFI to transmit files, which are convenient to use, simple to operate, and have large transmission capacity. Fast speed;
  • the role of these wireless communication methods is that they do not consume the traffic of the communication carrier, and are not limited by the strength of the public mobile communication network signal. For example, in remote areas, the use of the signal is not affected.
  • Step 102 When the acceleration value is greater than or equal to the preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point;
  • triggering the networking requirement of the terminal may include:
  • the acceleration value of the acceleration sensor in the at least one of the three directions of the X, Y, and Z directions is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal, that is, if the acceleration value in one direction is greater than When the acceleration threshold is equal to the triggering threshold, the networking requirement of the terminal is triggered. If the acceleration value of more than one direction is greater than or equal to the acceleration threshold, the networking requirement of the terminal is also triggered, so that the triggering is more sensitive. .
  • the setting of the acceleration threshold can refer to the prior art.
  • many handheld terminals have the functions of “shake and shake” to grab red packets and grab points, and will not be described here.
  • the wireless communication mode preset by the terminal is automatically entered into the wireless communication mode preset by the terminal; here, the wireless communication mode preset by the terminal, that is, the wireless communication mode described in step 101, may be Bluetooth or NFC. Or one of WIFI, it can also be a third-party APP, such as sharing, eggplant fast transmission, fast teeth, flash transmission, etc.;
  • the terminal When the networking requirement of the terminal is triggered, the terminal is notified to automatically enter a preset wireless communication mode.
  • the network key is generated at the same time as the networking requirement of the terminal is triggered.
  • the network key is generated based on the time point of triggering the terminal networking requirement.
  • a numeric string consisting of the number of months, days, hours, minutes, and seconds, for example, 201603221056.12.
  • Step 103 The search is started based on the wireless communication mode. When two or more terminals of the same networking key are searched, the automatic connection completes the networking.
  • the same networking key may be: obtaining a difference between two networking keys, and if the difference is less than a preset value, the networking key is considered to be the same;
  • the network key is less than the preset value, the network key is considered to be the same. You can directly match the connection, and then you can deliver the message, transfer the file, and so on.
  • the preset value is set in step 101. Generally, it can be set to less than 1 minute. In actual use, it is set to Less than 10 seconds, you can meet the requirements of use.
  • the networking can be completed.
  • the automatic networking one of the earliest triggering networking requirements is to create a local area network, and the other is to join the local area network;
  • the terminal selects the two-person mode, but the number of terminals with the same network key is greater than two, the network key is the closest, that is, the network key difference is the smallest, if the network key difference is The same, then select the earliest search;
  • the terminal with the same network key is continuously searched until the new terminal is not searched, the search is ended, and the local area network is established; wherein, if the designated originating terminal is selected, In the mode, the initiating terminal creates a local area network, and the other joins the local area network. If the initiating terminal is not specified, the earliest triggering network requirement is used as the initiating terminal;
  • Select the mode of initiating the terminal You need to select the specified terminal for each terminal. Specify the initiating terminal. You can specify it when the networking switch is enabled, or you can press the specified button, such as the volume button and the home screen. (Home) button, Menu button or Back button;
  • the earliest triggering network requirement is the initiating terminal.
  • search process is:
  • the broadcast list includes the terminal serial number, physical address (MAC address), and trigger time. Point, network key and other information, if it is multiplayer mode, it also includes the originating terminal identifier;
  • the search ends; for the multi-person mode, the search is not completed until the list is not updated.
  • FIG. 2 is a schematic flowchart of implementing a two-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 2 of the present invention. As shown in FIG. 2, the process includes:
  • Step 201 Perform corresponding settings on the terminal, including:
  • Steps 202 to 203 The terminal moves to obtain an acceleration value of the acceleration sensor of the terminal, and whether the acquired acceleration value is greater than or equal to a preset acceleration threshold;
  • Step 204 If the acceleration value of the acceleration sensor is greater than or equal to a preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point to generate a Broadcast list
  • Steps 205 to 207 Refresh the broadcast list, whether there is an update, and if there is an update, the network is configured.
  • FIG. 3 is a schematic flowchart of an implementation process of a multi-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 3 of the present invention.
  • the implementation process of the multi-person mode does not specify an initiating terminal. As shown in FIG. 3, the process includes:
  • Step 301 Perform corresponding settings on the terminal, including:
  • Steps 302 to 303 The terminal moves to obtain an acceleration value of the acceleration sensor of the terminal, and whether the acquired acceleration value is greater than or equal to a preset acceleration threshold;
  • Step 304 If the acceleration value of the acceleration sensor is greater than or equal to the preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point to generate a network key. Broadcast list
  • Steps 305-309 Refreshing the broadcast list, whether the number of terminals is increased, and if not increasing, searching for the originating terminal identifier;
  • the terminal with the smallest network key is selected from the broadcast list as the originating terminal;
  • the networking is performed, that is, the local area network is created by the terminal having the originating terminal identifier, and the other terminals join the local area network.
  • FIG. 4 is a schematic diagram of another implementation flow of a multi-person mode in a method for constructing a terminal based on an acceleration sensor according to Embodiment 4 of the present invention.
  • the implementation process of the multi-person mode has a designated originating terminal. As shown in FIG. 4, the process includes:
  • Step 401 Perform corresponding settings on the terminal, including:
  • Steps 402 to 403 The terminal moves to obtain an acceleration value of the acceleration sensor of the terminal, and whether the acquired acceleration value is greater than or equal to a preset acceleration threshold.
  • Step 404 If the acceleration value of the acceleration sensor is greater than or equal to the preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point to generate a network key. Broadcast list
  • Steps 405 to 409 refresh the broadcast list, whether the number of terminals is increased, and if it is no longer increased, look for the originating terminal identifier;
  • the refreshing continues until the originating terminal appears;
  • the networking is performed, that is, the local area network is created by the terminal having the initiating terminal identifier, and the other terminals are added to the local area network.
  • an acceleration sensor-based terminal networking device of the embodiment includes an acquisition module 51, a trigger module 52, and a connection module 53.
  • the acquiring module 51 is configured to: acquire an acceleration value of the acceleration sensor of the terminal;
  • the acceleration sensor may be a three-axis acceleration sensor
  • the acceleration value of the acceleration sensor includes: an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
  • the premise that the acceleration value can be obtained is: the terminal is in motion, such as moving, rotating, vibrating, shaking, etc.; the motion in this embodiment may be the handheld terminal for the handheld terminal.
  • the acceleration sensor can be driven by adding a drive motor to obtain an acceleration value.
  • the device may further include a function setting module, configured to: enable a switch of the networking, set a networking mode; set an acceleration threshold of the acceleration sensor of the terminal; and set a wireless communication that automatically enters after triggering a networking requirement of the terminal. the way.
  • a function setting module configured to: enable a switch of the networking, set a networking mode; set an acceleration threshold of the acceleration sensor of the terminal; and set a wireless communication that automatically enters after triggering a networking requirement of the terminal. the way.
  • the networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals;
  • the two-person mode means that two terminals form a bureau that can send messages to each other and transmit files.
  • Domain network one of which creates a local area network and the other adds a local area network;
  • Multi-player mode means that multiple terminals form a local area network, one of which acts as the originating terminal, creates a local area network, and the other joins the local area network;
  • the originating terminal here may arbitrarily designate one terminal, or may be the one that first triggers the networking requirement;
  • the arbitrarily designated manner may be selected when a certain terminal opens the networking switch, or when the terminal is “moving”, pressing a specified key, such as a volume key, a home screen Home key, a menu Menu key, or a return Back button.
  • a specified key such as a volume key, a home screen Home key, a menu Menu key, or a return Back button.
  • the wireless communication method generally includes Bluetooth, Near Field Communication (NFC) or Wireless Fidelity (WIFI);
  • Bluetooth is a wireless technology standard, which can realize short-distance data exchange between fixed equipment, mobile equipment and building personal area network, using UHF radio waves of 2.4-2.485 GHz ISM band. Bluetooth has the characteristics of low cost, short transmission distance and low power consumption. The general transmission distance is about 10 meters.
  • the commonly used mobile phones generally have a Bluetooth function.
  • a mobile phone accessory such as a headset through Bluetooth.
  • NFC evolved from the integration of contactless radio frequency identification (RFID) and interoperability technologies, combines inductive readers, inductive cards and point-to-point functions on a single chip to identify and interact with compatible devices over short distances. Data exchange.
  • the working frequency is 13.56MHz.
  • NFC has a small transmission volume and short transmission distance, but it is safer and faster.
  • NFC NFC function
  • mobile phones with this function can be used as airport boarding verification, building access keys, traffic card, credit card, payment card, etc.
  • WIFI is a technology that can wirelessly connect terminals such as personal computers and handheld devices (such as tablets and mobile phones). It is a high-frequency radio signal with a wide frequency range compared to Bluetooth and NFC. The transmission capacity is large, the transmission speed is fast, and the transmission distance is long.
  • the wireless communication method can also be a third-party application (APP), such as sink sharing, eggplant fast transmission, fast tooth, flash transmission, etc.
  • APP third-party application
  • These applications generally use WIFI to transmit files, which are convenient to use, simple to operate, and have large transmission capacity. Fast speed;
  • the triggering module 52 is configured to: when the acceleration value is greater than or equal to a preset acceleration threshold, trigger a networking requirement of the terminal, enable a preset wireless communication mode of the terminal, and generate a group based on the current time point.
  • the networking requirement of the terminal is triggered, including:
  • the acceleration value of the acceleration sensor in the at least one of the three directions of the X, Y, and Z directions is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal, that is, if the acceleration value in one direction is greater than When the acceleration threshold is equal to the triggering threshold, the networking requirement of the terminal is triggered. If the acceleration value of more than one direction is greater than or equal to the acceleration threshold, the networking requirement of the terminal is also triggered, so that the triggering is more sensitive. .
  • the setting of the acceleration threshold can refer to the prior art.
  • many handheld terminals have the functions of “shake and shake” to grab red packets and grab points, and will not be described here.
  • the wireless communication mode preset by the terminal is automatically entered into the wireless communication mode preset by the terminal; here, the wireless communication mode preset by the terminal, that is, the wireless communication mode described in step 101, may be Bluetooth or NFC. Or one of WIFI, it can also be a third-party APP, such as sharing, eggplant fast transmission, fast teeth, flash transmission, etc.;
  • the terminal When the networking requirement of the terminal is triggered, the terminal is notified to automatically enter a preset wireless communication mode.
  • the network key is generated at the same time as the networking requirement of the terminal is triggered.
  • the network key is generated based on the time point of triggering the terminal networking requirement.
  • a numeric string consisting of the number of months, days, hours, minutes, and seconds, for example, 201603221056.12.
  • the connection module 53 is configured to: start searching based on the wireless communication mode, when searching When two or more terminals of the same networking key are used, the automatic connection completes the networking.
  • the same networking key may: determine a difference between two networking keys, and if the difference is less than a preset value, consider that the networking key is the same;
  • the network key is less than the preset value, the network key is considered to be the same. You can directly match the connection, and then you can deliver the message, transfer the file, and so on.
  • the preset value is set in step 101. Generally, it can be set to less than 1 minute. In actual use, it is set to Less than 10 seconds, you can meet the requirements of use.
  • the networking can be completed.
  • the automatic networking one of the earliest triggering networking requirements is to create a local area network, and the other is to join the local area network;
  • the terminal selects the two-person mode, but the number of terminals with the same network key is greater than two, the network key is the closest, that is, the network key difference is the smallest, if the network key difference is The same, then select the earliest search;
  • the terminal with the same network key is continuously searched until the new terminal is not searched, the search is ended, and the local area network is established; if the mode of initiating the terminal is selected, the initiating terminal creates the local area network, and the other Joining the local area network, if you choose not to specify the originating terminal, the earliest triggering network requirements as the initiating terminal;
  • the specified initiating terminal can be specified when the networking switch is enabled, or when the terminal is "sports", press the specified key, such as the volume key, the main Home button, Menu button or Back button;
  • the earliest triggering network requirement is the initiating terminal.
  • search process is:
  • the broadcast list includes the terminal serial number, physical address (MAC address), and trigger time. Point, network key and other information, if it is multiplayer mode, it also includes the originating terminal identifier;
  • the list is updated to end the search; for the multiplayer mode, the search is not completed until the list is not updated.
  • the acquisition module 51, the trigger module 52, and the connection module 53 may each be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate located at the terminal.
  • Array FPGA
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the terminal networking method.
  • embodiments of the present invention can be provided as a method, system, or computer program product.
  • embodiments of the invention may take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware.
  • embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) in which computer usable program code is embodied.
  • Embodiments of the invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the embodiment of the present invention completes the networking of the terminal by the movement of the terminal, and does not need to manually find and add other terminals, and does not need to manually input a key, and can quickly and simply set up the wireless local area network.

Landscapes

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

Abstract

Disclosed herein are a terminal networking method and device. The method comprises: acquiring an acceleration value of an acceleration sensor of a terminal; if the acceleration value is greater than or equal to a predetermined acceleration threshold, then triggering a networking demand of the terminal, turning on a predetermined wireless communication mode of the terminal, and generating, on the basis of a current time, a networking key; and initiating, on the basis of the wireless communication mode, a search, and upon finding two or more terminals having the same networking key, performing automatic connection to construct a network.

Description

一种终端组网方法及装置Terminal networking method and device 技术领域Technical field
本申请涉及但不限于终端组网技术,尤指一种终端组网方法及装置。The present invention relates to, but is not limited to, a terminal networking technology, and more particularly to a terminal networking method and apparatus.
背景技术Background technique
组网是将不同的终端设备组合到一个网络中,相互间可以通讯,如发送信息、发送文件等。网络可以是局域网,也可以是广域网。Networking combines different terminal devices into one network and can communicate with each other, such as sending information and sending files. The network can be a local area network or a wide area network.
目前,终端使用广泛,终端之间除了通过通讯运营商提供的公众移动通信网络进行通讯外,还经常通过一些近距离的无线通讯方式组成局域网,如蓝牙(Bluetooth)、近场通信(NFC,Near Field Communication)、无线保真(WIFI,WIreless-Fidelity)等,这样,既不会消耗通讯运营商的流量,传输也更快速。At present, the terminal is widely used. In addition to communication through the public mobile communication network provided by the communication carrier, the terminals often form a local area network through some short-range wireless communication methods, such as Bluetooth, Near Field Communication (NFC, Near). Field Communication), Wireless Fidelity (WIFI, Wireless-Fidelity), etc., so that it does not consume traffic from the communication carrier, and the transmission is faster.
但这些无线通讯方式的组网,都必须手动匹配或鉴权,如打开该通讯方式,选择设备,点击匹配等操作,其中,匹配还需要手动设置匹配密钥。整个操作过程步骤多、繁琐、组网效率低。However, the networking of these wireless communication methods must be manually matched or authenticated, such as opening the communication mode, selecting a device, clicking matching, etc., wherein the matching also needs to manually set a matching key. The whole operation process has many steps, is cumbersome, and has low networking efficiency.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种终端组网方法及装置,能快速、简单地组建无线局域网,且无需手动匹配或鉴权。The embodiment of the invention provides a terminal networking method and device, which can quickly and simply set up a wireless local area network without manual matching or authentication.
本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供了一种终端组网方法,所述方法包括:The embodiment of the invention provides a terminal networking method, and the method includes:
获取终端的加速度传感器的加速度值;Obtaining an acceleration value of the acceleration sensor of the terminal;
所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启所述终端预设的无线通讯方式,并基于当前时间点生成组网密钥; When the acceleration value is greater than or equal to the preset acceleration threshold, triggering the networking requirement of the terminal, enabling the preset wireless communication mode of the terminal, and generating a networking key based on the current time point;
基于所述无线通讯方式开启搜索,搜索到相同组网密钥的两个或多个终端时,自动连接完成组网。When the search is started based on the wireless communication mode and two or more terminals of the same networking key are searched, the automatic connection completes the networking.
可选的,所述获取终端的加速度传感器的加速度值之前,所述方法还包括:Optionally, before the obtaining the acceleration value of the acceleration sensor of the terminal, the method further includes:
所述终端开启组网的开关,设置组网模式;The terminal starts a switch of the networking, and sets a networking mode;
设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
设置触发所述终端的组网需求后自动进入的无线通讯方式。Set the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
可选的,所述组网模式包括两个终端的两人模式和多个终端的多人模式。Optionally, the networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals.
可选的,所述加速度传感器为三轴加速度传感器;Optionally, the acceleration sensor is a three-axis acceleration sensor;
所述加速度传感器的加速度值包括所述加速度传感器在X方向的加速度值、所述加速度传感器在Y方向的加速度值、或所述加速度传感器在Z方向的加速度值;The acceleration value of the acceleration sensor includes an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,包括:When the acceleration value is greater than or equal to the preset acceleration threshold, the networking requirements of the terminal are triggered, including:
所述终端的加速度传感器在X、Y、Z三个方向中至少一个方向的加速度值大于或等于所述加速度阈值时,触发所述终端的组网需求。The acceleration sensor of the terminal triggers the networking requirement of the terminal when the acceleration value of at least one of the three directions of X, Y, and Z is greater than or equal to the acceleration threshold.
可选的,所述基于当前时间点生成组网密钥,包括:Optionally, the generating the networking key based on the current time point includes:
基于触发所述终端组网需求的时间点,生成组网密钥。The networking key is generated based on the time point at which the terminal networking requirement is triggered.
可选的,所述搜索到相同组网密钥的两个或多个终端时,自动连接完成组网,包括:Optionally, when the two or more terminals of the same networking key are searched, the automatic connection completes the networking, including:
求两个组网密钥之间的差值,所述差值小于预设值时,认为所述组网密钥相同;Finding a difference between the two network keys, where the difference is less than a preset value, the network key is considered to be the same;
自动连接组网密钥相同的两个或多个终端,完成组网。The networking is completed by automatically connecting two or more terminals with the same networking key.
本发明实施例还提供了一种终端组网装置,所述装置包括获取模块、触发模块和连接模块;其中,An embodiment of the present invention further provides a terminal networking device, where the device includes an acquisition module, a trigger module, and a connection module, where
所述获取模块,设置为:获取终端的加速度传感器的加速度值; The acquiring module is configured to: acquire an acceleration value of the acceleration sensor of the terminal;
所述触发模块,设置为:所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启所述终端预设的无线通讯方式,并基于当前时间点生成组网密钥;The triggering module is configured to: when the acceleration value is greater than or equal to a preset acceleration threshold, trigger a networking requirement of the terminal, enable a preset wireless communication mode of the terminal, and generate a network based on the current time point. Key
所述连接模块,设置为:基于所述无线通讯方式开启搜索,当搜索到相同组网密钥的两个或多个终端时,自动连接,完成组网。The connection module is configured to: start the search based on the wireless communication mode, and automatically connect to complete the networking when two or more terminals of the same networking key are searched.
可选的,所述装置还包括:功能设置模块,设置为:Optionally, the device further includes: a function setting module, configured to:
开启组网的开关,设置组网模式;Enable the networking switch and set the networking mode.
设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
设置触发所述终端的组网需求后自动进入的无线通讯方式。Set the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
可选的,所述组网模式包括两个终端的两人模式和多个终端的多人模式。Optionally, the networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals.
可选的,所述加速度传感器为三轴加速度传感器;Optionally, the acceleration sensor is a three-axis acceleration sensor;
加速度传感器的加速度值包括所述加速度传感器在X方向的加速度值、所述加速度传感器在Y方向的加速度值或所述加速度传感器在Z方向的加速度值;The acceleration value of the acceleration sensor includes an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
所述触发模块设置为:The trigger module is set to:
如果所述终端的加速度传感器在X、Y、Z三个方向中至少一个方向的加速度值大于或等于所述加速度阈值时,触发所述终端的组网需求。If the acceleration sensor of the terminal in at least one of the three directions of X, Y, and Z is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal.
可选的,所述连接模块,设置为:Optionally, the connection module is set to:
基于触发所述终端组网需求的时间点,生成组网密钥。The networking key is generated based on the time point at which the terminal networking requirement is triggered.
可选的,所述连接模块,设置为:Optionally, the connection module is set to:
求两个组网密钥之间的差值,如果所述差值小于预设值时,认为所述组网密钥相同;The difference between the two network keys is obtained. If the difference is less than the preset value, the networking key is considered to be the same;
自动连接组网密钥相同的两个或多个终端,完成组网。The networking is completed by automatically connecting two or more terminals with the same networking key.
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions that are implemented by a processor to implement the above method.
本发明实施例提供一种终端组网方法及装置,获取终端的加速度传感器 的加速度值;所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启所述终端预设的无线通讯方式,并基于当前时间点生成组网密钥;基于所述无线通讯方式开启搜索,搜索到相同组网密钥的两个或多个终端时,自动连接完成组网;可见,本发明实施例通过多个终端的运动,完成了多个终端的组网,且无需手动查找、添加其它终端,无需手动输入密钥,能快速、简单地组建无线局域网。The embodiment of the invention provides a terminal networking method and device, and acquires an acceleration sensor of the terminal. The acceleration value is greater than or equal to the preset acceleration threshold, triggering the networking requirement of the terminal, enabling the preset wireless communication mode of the terminal, and generating a networking key based on the current time point; The wireless communication mode enables the search, and when two or more terminals of the same networking key are searched, the automatic connection completes the networking; it can be seen that the embodiment of the present invention completes the group of multiple terminals by the movement of multiple terminals. Network, and no need to manually find, add other terminals, without the need to manually enter the key, can quickly and easily set up a wireless LAN.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1为本发明实施例一基于加速度传感器的终端组网方法的实现流程示意图;1 is a schematic flowchart of an implementation process of a terminal networking method based on an acceleration sensor according to an embodiment of the present invention;
图2为本发明实施例二基于加速度传感器的终端组网方法中两人模式的实现流程示意图;2 is a schematic flowchart of an implementation process of a two-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 2 of the present invention;
图3为本发明实施例三基于加速度传感器的终端组网方法中多人模式的一种实现流程示意图;3 is a schematic flowchart of an implementation process of a multi-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 3 of the present invention;
图4为本发明实施例四基于加速度传感器的终端组网方法中多人模式的另一种实现流程示意图;4 is a schematic diagram of another implementation flow of a multi-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 4 of the present invention;
图5为本发明实施例五基于加速度传感器的终端组网装置的示意图。FIG. 5 is a schematic diagram of a terminal networking device based on an acceleration sensor according to Embodiment 5 of the present invention.
本发明的实施方式Embodiments of the invention
下面将结合附图及实施例对本发明的实施方式进行说明。Embodiments of the present invention will be described below with reference to the drawings and embodiments.
实施例一Embodiment 1
如图1所示,本实施例的一种基于加速度传感器的终端组网方法,包括:As shown in FIG. 1 , an acceleration sensor-based terminal networking method of the embodiment includes:
步骤101:获取终端的加速度传感器的加速度值;Step 101: Acquire an acceleration value of an acceleration sensor of the terminal.
这里,所述加速度传感器可以为三轴加速度传感器;Here, the acceleration sensor may be a three-axis acceleration sensor;
所述加速度传感器的加速度值包括:所述加速度传感器在X方向的加速 度值、所述加速度传感器在Y方向的加速度值、或所述加速度传感器在Z方向的加速度值;The acceleration value of the acceleration sensor includes: acceleration of the acceleration sensor in the X direction a value, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
本实施例中,能获取所述加速度值的前提是:所述终端在运动,如移动、转动、振动、晃动等;本实施例中的运动,对手持终端来说,可以是手持所述终端,进行“摇一摇”的运动;如果是非手持终端,可以通过加装驱动电机来驱动所述加速传感器,获得加速度值。In this embodiment, the premise that the acceleration value can be obtained is: the terminal is in motion, such as moving, rotating, vibrating, shaking, etc.; the motion in this embodiment may be the handheld terminal for the handheld terminal. To perform a "shake" motion; if it is a non-handheld terminal, the acceleration sensor can be driven by adding a drive motor to obtain an acceleration value.
这里,在所述获取终端的加速度传感器的加速度值之前,在所述终端进行相应的设置,包括:所述终端开启所述组网的开关,设置组网模式;设置所述终端的加速度传感器的加速度阈值;设置触发所述终端的组网需求后自动进入的无线通讯方式。Here, before the acquiring the acceleration value of the acceleration sensor of the terminal, performing corresponding setting on the terminal includes: the terminal turning on the switch of the networking, setting a networking mode; setting the acceleration sensor of the terminal Acceleration threshold; setting the wireless communication mode that automatically enters after triggering the networking requirement of the terminal.
所述组网模式包括两个终端的两人模式和多个终端的多人模式;The networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals;
这里,两人模式是指两个终端组成一个可以相互发信息、传送文件的局域网,其中一个创建局域网,另一个加入局域网;Here, the two-person mode refers to two terminals forming a local area network that can send messages to each other and transfer files, one of which creates a local area network and the other of which joins a local area network;
多人模式是指多个终端组成一个局域网,其中一个作为发起终端,创建局域网,其它加入局域网;Multi-player mode means that multiple terminals form a local area network, one of which acts as the originating terminal, creates a local area network, and the other joins the local area network;
这里的发起终端可以任意指定一个终端,也可以是最早触发组网需求的一个终端;The originating terminal here may arbitrarily designate one terminal, or may be the one that first triggers the networking requirement;
所述任意指定的方式,可以是在某一个终端开启组网开关时选择,也可以是该终端“运动”的同时,按指定的键,如音量键、主屏幕Home键、菜单Menu键或返回Back键。The arbitrarily designated manner may be selected when a certain terminal opens the networking switch, or when the terminal is “moving”, pressing a specified key, such as a volume key, a home screen Home key, a menu Menu key, or a return Back button.
所述无线通讯方式一般包括蓝牙、近场通信(NFC)、或无线保真(WIFI);The wireless communication method generally includes Bluetooth, Near Field Communication (NFC), or Wireless Fidelity (WIFI);
其中,蓝牙是一种无线技术标准,可实现固定设备、移动设备和楼宇个人域网之间的短距离数据交换,使用2.4—2.485GHz的ISM波段的UHF无线电波。蓝牙具有成本低、传输距离近、低功耗的特点,一般的传输距离在10米左右;目前常用的手机,一般都具有蓝牙功能,除了能通过蓝牙与其它手机传输资料外,也能通过蓝牙连接耳机等手机附件。Among them, Bluetooth is a wireless technology standard, which can realize short-distance data exchange between fixed equipment, mobile equipment and building personal area network, using UHF radio waves of 2.4-2.485 GHz ISM band. Bluetooth has the characteristics of low cost, short transmission distance and low power consumption. The general transmission distance is about 10 meters. Currently, the commonly used mobile phones generally have Bluetooth function. In addition to transmitting data through Bluetooth and other mobile phones, Bluetooth can also pass Bluetooth. Connect a mobile phone accessory such as a headset.
NFC,由非接触式射频识别(RFID)及互联互通技术整合演变而来,在 单一芯片上结合感应式读卡器、感应式卡片和点对点的功能,能在短距离内与兼容设备进行识别和数据交换。工作频率为13.56MHz,相比蓝牙,NFC的传输量小、传输距离短,但具有更安全、更快捷的特点;目前常用的手机,一般都具有NFC功能,具有此功能的手机可以用作机场登机验证、大厦的门禁钥匙、交通一卡通、***、支付卡等等;NFC, evolved from the integration of contactless radio frequency identification (RFID) and interoperability technologies, The combination of an inductive card reader, inductive card and point-to-point function on a single chip enables identification and data exchange with compatible devices over short distances. The operating frequency is 13.56MHz. Compared with Bluetooth, NFC has a small transmission volume and short transmission distance, but it is safer and faster. Currently, the commonly used mobile phones generally have NFC function, and the mobile phone with this function can be used as an airport. Boarding verification, building access keys, traffic card, credit card, payment card, etc.
WIFI是一种可以将个人电脑、手持设备(如平板电脑、手机)等终端以无线方式互相连接的技术,它是一种高频无线电信号,相比蓝牙和NFC,其具有频率范围广、传输容量大、传输速度快和传输距离远的特点。WIFI is a technology that can wirelessly connect terminals such as personal computers and handheld devices (such as tablets and mobile phones). It is a high-frequency radio signal with a wide frequency range and transmission compared to Bluetooth and NFC. Large capacity, fast transmission speed and long transmission distance.
无线通讯方式还可以是第三方的应用(APP),如汇分享、茄子快传、快牙、闪传等,这些应用一般也是利用WIFI来传输文件,具有使用方便、操作简单,传输容量大、速度快的特点;The wireless communication method can also be a third-party application (APP), such as sink sharing, eggplant fast transmission, fast tooth, flash transmission, etc. These applications generally use WIFI to transmit files, which are convenient to use, simple to operate, and have large transmission capacity. Fast speed;
这些无线通讯方式的作用在于,不会消耗通信运营商的流量,而且,也不会受到公众移动通信网络信号强弱的限制,如在偏远地区,也不会因为信号差而影响使用。The role of these wireless communication methods is that they do not consume the traffic of the communication carrier, and are not limited by the strength of the public mobile communication network signal. For example, in remote areas, the use of the signal is not affected.
步骤102:所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启预设的无线通讯方式,并基于当前时间点生成组网密钥;Step 102: When the acceleration value is greater than or equal to the preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point;
这里,所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,可包括:Here, when the acceleration value is greater than or equal to the preset acceleration threshold, triggering the networking requirement of the terminal may include:
如果所述终端的加速度传感器在X、Y、Z三个方向中至少一个方向的加速度值大于或等于所述加速度阈值时,触发所述终端的组网需求,即只要有一个方向的加速度值大于或等于所述加速度阈值时,就触发所述终端的组网需求,如果有多于一个方向的加速度值大于或等于所述加速度阈值时,也触发所述终端的组网需求,这样触发比较灵敏。If the acceleration value of the acceleration sensor in the at least one of the three directions of the X, Y, and Z directions is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal, that is, if the acceleration value in one direction is greater than When the acceleration threshold is equal to the triggering threshold, the networking requirement of the terminal is triggered. If the acceleration value of more than one direction is greater than or equal to the acceleration threshold, the networking requirement of the terminal is also triggered, so that the triggering is more sensitive. .
其中,对于X、Y、Z中的任意一个来说,都有正负两个方向,可表示为:Among them, for any of X, Y, and Z, there are two directions, positive and negative, which can be expressed as:
当x>=value||x<=-value||y>=value||y<=-value||z>=value||z<=-value时,触发所述终端的组网需求;其中的value指所述加速度阈值; When x>=value||x<=-value||y>=value||y<=-value||z>=value||z<=-value, the networking requirement of the terminal is triggered; The value refers to the acceleration threshold;
加速度阈值的设置可以参照已有技术,如很多手持终端都有“摇一摇”抢红包、抢积分等功能,在此不再赘述。The setting of the acceleration threshold can refer to the prior art. For example, many handheld terminals have the functions of “shake and shake” to grab red packets and grab points, and will not be described here.
开启所述终端预设的无线通讯方式,是指自动进入终端预设的无线通讯方式;这里,所述终端预设的无线通讯方式,即步骤101所述的无线通讯方式,可以是蓝牙、NFC或WIFI中的一种,还可以是第三方的APP,如汇分享、茄子快传、快牙、闪传等;The wireless communication mode preset by the terminal is automatically entered into the wireless communication mode preset by the terminal; here, the wireless communication mode preset by the terminal, that is, the wireless communication mode described in step 101, may be Bluetooth or NFC. Or one of WIFI, it can also be a third-party APP, such as sharing, eggplant fast transmission, fast teeth, flash transmission, etc.;
当所述终端的组网需求被触发时,通知所述终端自动进入预设的无线通讯方式。When the networking requirement of the terminal is triggered, the terminal is notified to automatically enter a preset wireless communication mode.
在触发所述终端的组网需求的同时,生成组网密钥;所述组网密钥的生成,基于触发所述终端组网需求的时间点,可以是所述组网密钥为年、月、日、时、分、秒的数字组成的数字字符串,例如201603221056.12。The network key is generated at the same time as the networking requirement of the terminal is triggered. The network key is generated based on the time point of triggering the terminal networking requirement. A numeric string consisting of the number of months, days, hours, minutes, and seconds, for example, 201603221056.12.
步骤103:基于所述无线通讯方式开启搜索,当搜索到相同组网密钥的两个或多个终端时,自动连接完成组网。Step 103: The search is started based on the wireless communication mode. When two or more terminals of the same networking key are searched, the automatic connection completes the networking.
这里,所述相同组网密钥可以是:求两个组网密钥之间的差值,如果所述差值小于预设值时,认为所述组网密钥相同;Here, the same networking key may be: obtaining a difference between two networking keys, and if the difference is less than a preset value, the networking key is considered to be the same;
由于需要组网的终端基本都在很短的时间内同时“运动”,所以它们产生的组网密钥的大部分数据都是相同的,它们的差值是很小的;这里,把差值小于预设值的组网密钥认为相同,可以直接匹配连接,然后可以传递消息、传输文件等,预设值是步骤101中设置的,一般可以设置为小于1分钟,实际使用中,设置成小于10秒,就能满足使用要求。Since the terminals that need to be networked basically "sport" at the same time in a short period of time, most of the data of the network keys they generate are the same, and the difference is small; here, the difference is If the network key is less than the preset value, the network key is considered to be the same. You can directly match the connection, and then you can deliver the message, transfer the file, and so on. The preset value is set in step 101. Generally, it can be set to less than 1 minute. In actual use, it is set to Less than 10 seconds, you can meet the requirements of use.
对于自动连接组网密钥相同的两个或多个终端,完成组网,可以包括:For two or more terminals that have the same connection network key, the networking can be completed.
如果在终端选择了两人模式,则在搜索到组网密钥相同的两个终端后,自动组网,最早触发组网需求的一个创建局域网,另一个加入局域网;If the two-person mode is selected in the terminal, after searching for two terminals with the same networking key, the automatic networking, one of the earliest triggering networking requirements is to create a local area network, and the other is to join the local area network;
如果终端选择了两人模式,但搜索到的组网密钥相同的终端大于两个,则选择组网密钥最接近的,即组网密钥差值最小的,如果组网密钥差值一样,则选择最早搜索到的;If the terminal selects the two-person mode, but the number of terminals with the same network key is greater than two, the network key is the closest, that is, the network key difference is the smallest, if the network key difference is The same, then select the earliest search;
如果在终端选择了多人模式,则持续搜索组网密钥相同的终端,直到搜索不到新的终端,结束搜索,组建局域网;其中,如果选择指定发起终端的 方式,则发起终端创建局域网,其它的加入局域网,如果选择不指定发起终端,则最早触发组网需求的作为发起终端;If the multi-person mode is selected in the terminal, the terminal with the same network key is continuously searched until the new terminal is not searched, the search is ended, and the local area network is established; wherein, if the designated originating terminal is selected, In the mode, the initiating terminal creates a local area network, and the other joins the local area network. If the initiating terminal is not specified, the earliest triggering network requirement is used as the initiating terminal;
选择指定发起终端的方式,需要每个终端选择指定终端,指定发起终端,可以在开启组网开关时指定,也可以是该终端“运动”的同时,按指定的键,如音量键、主屏幕(Home)键、菜单(Menu)键或返回(Back)键;Select the mode of initiating the terminal. You need to select the specified terminal for each terminal. Specify the initiating terminal. You can specify it when the networking switch is enabled, or you can press the specified button, such as the volume button and the home screen. (Home) button, Menu button or Back button;
如果有两个以上的终端都选择了作为发起终端,则最早触发组网需求的为发起终端。If more than two terminals are selected as the initiating terminal, the earliest triggering network requirement is the initiating terminal.
可选的,搜索的过程是:Alternatively, the search process is:
触发终端的组网需求,开启无线通讯方式,并基于当前时间点生成组网密钥后,会生成一个广播列表(list),所述广播列表包含终端序号、物理地址(MAC地址)、触发时间点、组网密钥等信息,如果是多人模式,还包含发起终端标示符;Trigger the networking requirements of the terminal, enable the wireless communication mode, and generate a broadcast list (list) based on the current time point. The broadcast list includes the terminal serial number, physical address (MAC address), and trigger time. Point, network key and other information, if it is multiplayer mode, it also includes the originating terminal identifier;
对于两人模式,当列表有更新,就结束搜索;对于多人模式,一直到列表没有更新,才结束搜索。For the two-person mode, when the list is updated, the search ends; for the multi-person mode, the search is not completed until the list is not updated.
实施例二Embodiment 2
图2为本发明实施例二基于加速度传感器的终端组网方法中两人模式的实现流程示意图,如图2所示,流程包括:2 is a schematic flowchart of implementing a two-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 2 of the present invention. As shown in FIG. 2, the process includes:
步骤201:在所述终端进行相应的设置,包括:Step 201: Perform corresponding settings on the terminal, including:
在所述终端开启所述组网的开关,并选择组网模式;Turning on the switch of the networking on the terminal, and selecting a networking mode;
设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
选择触发所述终端的组网需求后自动进入的无线通讯方式。Select the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
步骤202~203:终端运动,获取终端的加速度传感器的加速度值,获取的加速度值是否大于或等于预设的加速度阈值; Steps 202 to 203: The terminal moves to obtain an acceleration value of the acceleration sensor of the terminal, and whether the acquired acceleration value is greater than or equal to a preset acceleration threshold;
步骤204:如果所述加速度传感器的加速度值大于或等于预设的加速度阈值,触发所述终端的组网需求,开启预设的无线通讯方式,并基于当前时间点生成组网密钥,生成一个广播列表;Step 204: If the acceleration value of the acceleration sensor is greater than or equal to a preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point to generate a Broadcast list
步骤205~207:刷新广播列表,是否有更新,如果有更新,则组网。 Steps 205 to 207: Refresh the broadcast list, whether there is an update, and if there is an update, the network is configured.
实施例三Embodiment 3
图3为本发明实施例三基于加速度传感器的终端组网方法中多人模式的一种实现流程示意图,此多人模式的实现流程没有指定发起终端,如图3所示,流程包括:FIG. 3 is a schematic flowchart of an implementation process of a multi-person mode in a terminal networking method based on an acceleration sensor according to Embodiment 3 of the present invention. The implementation process of the multi-person mode does not specify an initiating terminal. As shown in FIG. 3, the process includes:
步骤301:在所述终端进行相应的设置,包括:Step 301: Perform corresponding settings on the terminal, including:
在所述终端开启所述组网的开关,并选择组网模式;Turning on the switch of the networking on the terminal, and selecting a networking mode;
设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
选择触发所述终端的组网需求后自动进入的无线通讯方式。Select the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
步骤302~303:终端运动,获取终端的加速度传感器的加速度值,获取的加速度值是否大于或等于预设的加速度阈值; Steps 302 to 303: The terminal moves to obtain an acceleration value of the acceleration sensor of the terminal, and whether the acquired acceleration value is greater than or equal to a preset acceleration threshold;
步骤304:如果所述加速度传感器的加速度值大于或等于预设的加速度阈值,触发所述终端的组网需求,开启预设的无线通讯方式,并基于当前时间点生成组网密钥,生成一个广播列表;Step 304: If the acceleration value of the acceleration sensor is greater than or equal to the preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point to generate a network key. Broadcast list
步骤305~309:刷新广播列表,终端数量是否有增加,如果不再增加,则寻找发起终端标示符;Steps 305-309: Refreshing the broadcast list, whether the number of terminals is increased, and if not increasing, searching for the originating terminal identifier;
如果没有找到发起终端标示符,则从广播列表中选取组网密钥最小的终端作为发起终端;If the originating terminal identifier is not found, the terminal with the smallest network key is selected from the broadcast list as the originating terminal;
如果找到发起终端标示符,则组网,即由具有发起终端标示符的终端创建局域网,其它终端加入局域网。If the originating terminal identifier is found, the networking is performed, that is, the local area network is created by the terminal having the originating terminal identifier, and the other terminals join the local area network.
实施例四Embodiment 4
图4为本发明实施例四基于加速度传感器的终端组网方法中多人模式的另一种实现流程示意图,此多人模式的实现流程有指定发起终端,如图4所示,流程包括:FIG. 4 is a schematic diagram of another implementation flow of a multi-person mode in a method for constructing a terminal based on an acceleration sensor according to Embodiment 4 of the present invention. The implementation process of the multi-person mode has a designated originating terminal. As shown in FIG. 4, the process includes:
步骤401:在所述终端进行相应的设置,包括:Step 401: Perform corresponding settings on the terminal, including:
在所述终端开启所述组网的开关,并选择组网模式;Turning on the switch of the networking on the terminal, and selecting a networking mode;
设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
选择触发所述终端的组网需求后自动进入的无线通讯方式。 Select the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
步骤402~403:终端运动,获取终端的加速度传感器的加速度值,获取的加速度值是否大于或等于预设的加速度阈值; Steps 402 to 403: The terminal moves to obtain an acceleration value of the acceleration sensor of the terminal, and whether the acquired acceleration value is greater than or equal to a preset acceleration threshold.
步骤404:如果所述加速度传感器的加速度值大于或等于预设的加速度阈值,触发所述终端的组网需求,开启预设的无线通讯方式,并基于当前时间点生成组网密钥,生成一个广播列表;Step 404: If the acceleration value of the acceleration sensor is greater than or equal to the preset acceleration threshold, trigger the networking requirement of the terminal, enable a preset wireless communication mode, and generate a networking key based on the current time point to generate a network key. Broadcast list
步骤405~409:刷新广播列表,终端数量是否有增加,如果不再增加,则寻找发起终端标示符; Steps 405 to 409: refresh the broadcast list, whether the number of terminals is increased, and if it is no longer increased, look for the originating terminal identifier;
如果没有找到发起终端标示符,则继续刷新,直到出现发起终端;If the originating terminal identifier is not found, the refreshing continues until the originating terminal appears;
如果出现发起终端标示符,则组网,即由具有发起终端标示符的终端创建局域网,其它终端加入局域网。If the originating terminal identifier is present, the networking is performed, that is, the local area network is created by the terminal having the initiating terminal identifier, and the other terminals are added to the local area network.
实施例五Embodiment 5
如图5所示,本实施例的一种基于加速度传感器的终端组网装置,包括获取模块51、触发模块52和连接模块53;其中,As shown in FIG. 5, an acceleration sensor-based terminal networking device of the embodiment includes an acquisition module 51, a trigger module 52, and a connection module 53.
所述获取模块51,设置为:获取终端的加速度传感器的加速度值;The acquiring module 51 is configured to: acquire an acceleration value of the acceleration sensor of the terminal;
这里,所述加速度传感器可以为三轴加速度传感器;Here, the acceleration sensor may be a three-axis acceleration sensor;
所述加速度传感器的加速度值包括:所述加速度传感器在X方向的加速度值、所述加速度传感器在Y方向的加速度值、或所述加速度传感器在Z方向的加速度值;The acceleration value of the acceleration sensor includes: an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
本实施例中,能获取所述加速度值的前提是:所述终端在运动,如移动、转动、振动、晃动等;本实施例中的运动,对手持终端来说,可以是手持所述终端,进行“摇一摇”的运动;如果是非手持终端,可以通过加装驱动电机来驱动所述加速传感器,获得加速度值。In this embodiment, the premise that the acceleration value can be obtained is: the terminal is in motion, such as moving, rotating, vibrating, shaking, etc.; the motion in this embodiment may be the handheld terminal for the handheld terminal. To perform a "shake" motion; if it is a non-handheld terminal, the acceleration sensor can be driven by adding a drive motor to obtain an acceleration value.
所述装置还可包括功能设置模块,设置为:开启组网的开关,设置组网模式;设置所述终端的加速度传感器的加速度阈值;设置触发所述终端的组网需求后自动进入的无线通讯方式。The device may further include a function setting module, configured to: enable a switch of the networking, set a networking mode; set an acceleration threshold of the acceleration sensor of the terminal; and set a wireless communication that automatically enters after triggering a networking requirement of the terminal. the way.
所述组网模式包括两个终端的两人模式和多个终端的多人模式;The networking mode includes a two-person mode of two terminals and a multi-person mode of multiple terminals;
这里,两人模式是指两个终端组成一个可以相互发信息、传送文件的局 域网,其中一个创建局域网,另一个加入局域网;Here, the two-person mode means that two terminals form a bureau that can send messages to each other and transmit files. Domain network, one of which creates a local area network and the other adds a local area network;
多人模式是指多个终端组成一个局域网,其中一个作为发起终端,创建局域网,其它加入局域网;Multi-player mode means that multiple terminals form a local area network, one of which acts as the originating terminal, creates a local area network, and the other joins the local area network;
这里的发起终端可以任意指定一个终端,也可以是最早触发组网需求的一个终端;The originating terminal here may arbitrarily designate one terminal, or may be the one that first triggers the networking requirement;
所述任意指定的方式,可以是在某一个终端开启组网开关时选择,也可以是该终端“运动”的同时,按指定的键,如音量键、主屏幕Home键、菜单Menu键或返回Back键。The arbitrarily designated manner may be selected when a certain terminal opens the networking switch, or when the terminal is “moving”, pressing a specified key, such as a volume key, a home screen Home key, a menu Menu key, or a return Back button.
所述无线通讯方式一般包括蓝牙、近场通信(NFC)或无线保真(WIFI);The wireless communication method generally includes Bluetooth, Near Field Communication (NFC) or Wireless Fidelity (WIFI);
其中,蓝牙,是一种无线技术标准,可实现固定设备、移动设备和楼宇个人域网之间的短距离数据交换,使用2.4—2.485GHz的ISM波段的UHF无线电波。蓝牙具有成本低、传输距离近、低功耗的特点,一般的传输距离在10米左右;Among them, Bluetooth is a wireless technology standard, which can realize short-distance data exchange between fixed equipment, mobile equipment and building personal area network, using UHF radio waves of 2.4-2.485 GHz ISM band. Bluetooth has the characteristics of low cost, short transmission distance and low power consumption. The general transmission distance is about 10 meters.
目前常用的手机,一般都具有蓝牙功能,除了能通过蓝牙与其它手机传输资料外,也能通过蓝牙连接耳机等手机附件。At present, the commonly used mobile phones generally have a Bluetooth function. In addition to transmitting data through Bluetooth and other mobile phones, it is also possible to connect a mobile phone accessory such as a headset through Bluetooth.
NFC,由非接触式射频识别(RFID)及互联互通技术整合演变而来,在单一芯片上结合感应式读卡器、感应式卡片和点对点的功能,能在短距离内与兼容设备进行识别和数据交换。工作频率为13.56MHz,相比蓝牙,NFC的传输量小、传输距离短,但具有更安全、更快捷的特点;NFC, evolved from the integration of contactless radio frequency identification (RFID) and interoperability technologies, combines inductive readers, inductive cards and point-to-point functions on a single chip to identify and interact with compatible devices over short distances. Data exchange. The working frequency is 13.56MHz. Compared with Bluetooth, NFC has a small transmission volume and short transmission distance, but it is safer and faster.
目前常用的手机,一般都具有NFC功能,具有此功能的手机可以用作机场登机验证、大厦的门禁钥匙、交通一卡通、***、支付卡等等;Currently used mobile phones generally have NFC function, and mobile phones with this function can be used as airport boarding verification, building access keys, traffic card, credit card, payment card, etc.
WIFI,WIFI是一种可以将个人电脑、手持设备(如平板电脑、手机)等终端以无线方式互相连接的技术,它是一种高频无线电信号,相比蓝牙和NFC,其具有频率范围广、传输容量大、传输速度快和传输距离远的特点。WIFI, WIFI is a technology that can wirelessly connect terminals such as personal computers and handheld devices (such as tablets and mobile phones). It is a high-frequency radio signal with a wide frequency range compared to Bluetooth and NFC. The transmission capacity is large, the transmission speed is fast, and the transmission distance is long.
无线通讯方式还可以是第三方的应用(APP),如汇分享、茄子快传、快牙、闪传等,这些应用一般也是利用WIFI来传输文件,具有使用方便、操作简单,传输容量大、速度快的特点;The wireless communication method can also be a third-party application (APP), such as sink sharing, eggplant fast transmission, fast tooth, flash transmission, etc. These applications generally use WIFI to transmit files, which are convenient to use, simple to operate, and have large transmission capacity. Fast speed;
这些无线通讯方式的作用在于,不会消耗通信运营商的流量,而且也不 会受到公众移动通信网络信号强弱的限制,如在偏远地区,也不会因为信号差而影响使用。The role of these wireless communication methods is that they do not consume the traffic of the communication carrier, nor It will be limited by the strength of public mobile communication network signals, such as in remote areas, and will not affect the use due to signal differences.
所述触发模块52,设置为:所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启所述终端预设的无线通讯方式,并基于当前时间点生成组网密钥;The triggering module 52 is configured to: when the acceleration value is greater than or equal to a preset acceleration threshold, trigger a networking requirement of the terminal, enable a preset wireless communication mode of the terminal, and generate a group based on the current time point. Network key
这里,所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,包括:Here, when the acceleration value is greater than or equal to the preset acceleration threshold, the networking requirement of the terminal is triggered, including:
如果所述终端的加速度传感器在X、Y、Z三个方向中至少一个方向的加速度值大于或等于所述加速度阈值时,触发所述终端的组网需求,即只要有一个方向的加速度值大于或等于所述加速度阈值时,就触发所述终端的组网需求,如果有多于一个方向的加速度值大于或等于所述加速度阈值时,也触发所述终端的组网需求,这样触发比较灵敏。If the acceleration value of the acceleration sensor in the at least one of the three directions of the X, Y, and Z directions is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal, that is, if the acceleration value in one direction is greater than When the acceleration threshold is equal to the triggering threshold, the networking requirement of the terminal is triggered. If the acceleration value of more than one direction is greater than or equal to the acceleration threshold, the networking requirement of the terminal is also triggered, so that the triggering is more sensitive. .
其中,对于X、Y、Z中的任意一个来说,都有正负两个方向,可表示为:Among them, for any of X, Y, and Z, there are two directions, positive and negative, which can be expressed as:
当x>=value||x<=-value||y>=value||y<=-value||z>=value||z<=-value时,触发所述终端的组网需求;其中的value指所述加速度阈值;When x>=value||x<=-value||y>=value||y<=-value||z>=value||z<=-value, the networking requirement of the terminal is triggered; The value refers to the acceleration threshold;
加速度阈值的设置可以参照已有技术,如很多手持终端都有“摇一摇”抢红包、抢积分等功能,在此不再赘述。The setting of the acceleration threshold can refer to the prior art. For example, many handheld terminals have the functions of “shake and shake” to grab red packets and grab points, and will not be described here.
开启所述终端预设的无线通讯方式,是指自动进入终端预设的无线通讯方式;这里,所述终端预设的无线通讯方式,即步骤101所述的无线通讯方式,可以是蓝牙、NFC或WIFI中的一种,还可以是第三方的APP,如汇分享、茄子快传、快牙、闪传等;The wireless communication mode preset by the terminal is automatically entered into the wireless communication mode preset by the terminal; here, the wireless communication mode preset by the terminal, that is, the wireless communication mode described in step 101, may be Bluetooth or NFC. Or one of WIFI, it can also be a third-party APP, such as sharing, eggplant fast transmission, fast teeth, flash transmission, etc.;
当所述终端的组网需求被触发时,通知所述终端自动进入预设的无线通讯方式。When the networking requirement of the terminal is triggered, the terminal is notified to automatically enter a preset wireless communication mode.
在触发所述终端的组网需求的同时,生成组网密钥;所述组网密钥的生成,基于触发所述终端组网需求的时间点,可以是所述组网密钥为年、月、日、时、分、秒的数字组成的数字字符串,例如201603221056.12。The network key is generated at the same time as the networking requirement of the terminal is triggered. The network key is generated based on the time point of triggering the terminal networking requirement. A numeric string consisting of the number of months, days, hours, minutes, and seconds, for example, 201603221056.12.
所述连接模块53,设置为:基于所述无线通讯方式开启搜索,当搜索到 相同组网密钥的两个或多个终端时,自动连接完成组网。The connection module 53 is configured to: start searching based on the wireless communication mode, when searching When two or more terminals of the same networking key are used, the automatic connection completes the networking.
这里,所述相同组网密钥可以:求两个组网密钥之间的差值,如果所述差值小于预设值时,认为所述组网密钥相同;Here, the same networking key may: determine a difference between two networking keys, and if the difference is less than a preset value, consider that the networking key is the same;
由于需要组网的终端基本都在很短的时间内同时“运动”,所以它们产生的组网密钥的大部分数据都是相同的,它们的差值是很小的;这里,把差值小于预设值的组网密钥认为相同,可以直接匹配连接,然后可以传递消息、传输文件等,预设值是步骤101中设置的,一般可以设置为小于1分钟,实际使用中,设置成小于10秒,就能满足使用要求。Since the terminals that need to be networked basically "sport" at the same time in a short period of time, most of the data of the network keys they generate are the same, and the difference is small; here, the difference is If the network key is less than the preset value, the network key is considered to be the same. You can directly match the connection, and then you can deliver the message, transfer the file, and so on. The preset value is set in step 101. Generally, it can be set to less than 1 minute. In actual use, it is set to Less than 10 seconds, you can meet the requirements of use.
对于自动连接组网密钥相同的两个或多个终端,完成组网,可以包括:For two or more terminals that have the same connection network key, the networking can be completed.
如果在终端选择了两人模式,则在搜索到组网密钥相同的两个终端后,自动组网,最早触发组网需求的一个创建局域网,另一个加入局域网;If the two-person mode is selected in the terminal, after searching for two terminals with the same networking key, the automatic networking, one of the earliest triggering networking requirements is to create a local area network, and the other is to join the local area network;
如果终端选择了两人模式,但搜索到的组网密钥相同的终端大于两个,则选择组网密钥最接近的,即组网密钥差值最小的,如果组网密钥差值一样,则选择最早搜索到的;If the terminal selects the two-person mode, but the number of terminals with the same network key is greater than two, the network key is the closest, that is, the network key difference is the smallest, if the network key difference is The same, then select the earliest search;
如果在终端选择了多人模式,则持续搜索组网密钥相同的终端,直到搜索不到新的终端,结束搜索,组建局域网;其中如果选择指定发起终端的方式,则发起终端创建局域网,其它的加入局域网,如果选择不指定发起终端,则最早触发组网需求的作为发起终端;If the multi-person mode is selected in the terminal, the terminal with the same network key is continuously searched until the new terminal is not searched, the search is ended, and the local area network is established; if the mode of initiating the terminal is selected, the initiating terminal creates the local area network, and the other Joining the local area network, if you choose not to specify the originating terminal, the earliest triggering network requirements as the initiating terminal;
选择指定发起终端的方式,需要每个终端选择指定终端,指定的发起终端,可以在开启组网开关时指定,也可以是该终端“运动”的同时,按指定的键,如音量键、主屏幕(Home)键、菜单(Menu)键或返回(Back)键;Select the mode of initiating the terminal. Each terminal needs to select a specified terminal. The specified initiating terminal can be specified when the networking switch is enabled, or when the terminal is "sports", press the specified key, such as the volume key, the main Home button, Menu button or Back button;
如果有两个以上的终端都选择了作为发起终端,则最早触发组网需求的为发起终端。If more than two terminals are selected as the initiating terminal, the earliest triggering network requirement is the initiating terminal.
可选的,搜索的过程是:Alternatively, the search process is:
触发终端的组网需求,开启无线通讯方式,并基于当前时间点生成组网密钥后,会生成一个广播列表(list),所述广播列表包含终端序号、物理地址(MAC地址)、触发时间点、组网密钥等信息,如果是多人模式,还包含发起终端标示符; Trigger the networking requirements of the terminal, enable the wireless communication mode, and generate a broadcast list (list) based on the current time point. The broadcast list includes the terminal serial number, physical address (MAC address), and trigger time. Point, network key and other information, if it is multiplayer mode, it also includes the originating terminal identifier;
对于两人模式,则列表有更新,就结束搜索;对于多人模式,一直到列表没有更新,才结束搜索。For the two-person mode, the list is updated to end the search; for the multiplayer mode, the search is not completed until the list is not updated.
在实际应用中,所述获取模块51、触发模块52和连接模块53均可由位于终端的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)、或现场可编程门阵列(FPGA)等实现。In practical applications, the acquisition module 51, the trigger module 52, and the connection module 53 may each be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate located at the terminal. Array (FPGA) and other implementations.
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述终端组网方法。The embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the terminal networking method.
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明实施例可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Thus, embodiments of the invention may take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) in which computer usable program code is embodied.
本发明实施例是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的可选实施例而已,并非用于限定本申请的保护范围。The above is only an alternative embodiment of the present invention and is not intended to limit the scope of the present application.
工业实用性Industrial applicability
本发明实施例通过终端的运动,完成了终端的组网,且无需手动查找、添加其它终端,无需手动输入密钥,能快速、简单地组建无线局域网。 The embodiment of the present invention completes the networking of the terminal by the movement of the terminal, and does not need to manually find and add other terminals, and does not need to manually input a key, and can quickly and simply set up the wireless local area network.

Claims (12)

  1. 一种终端组网方法,所述方法包括:A terminal networking method, the method comprising:
    获取终端的加速度传感器的加速度值;Obtaining an acceleration value of the acceleration sensor of the terminal;
    所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启所述终端预设的无线通讯方式,并基于当前时间点生成组网密钥;When the acceleration value is greater than or equal to the preset acceleration threshold, triggering the networking requirement of the terminal, enabling the preset wireless communication mode of the terminal, and generating a networking key based on the current time point;
    基于所述无线通讯方式开启搜索,搜索到相同组网密钥的两个或多个终端时,自动连接完成组网。When the search is started based on the wireless communication mode and two or more terminals of the same networking key are searched, the automatic connection completes the networking.
  2. 根据权利要求1所述的方法,其中,所述获取终端的加速度传感器的加速度值之前,所述方法还包括:The method according to claim 1, wherein before the acquiring the acceleration value of the acceleration sensor of the terminal, the method further comprises:
    所述终端开启组网的开关,设置组网模式;The terminal starts a switch of the networking, and sets a networking mode;
    设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
    设置触发所述终端的组网需求后自动进入的无线通讯方式。Set the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
  3. 根据权利要求2所述的方法,其中,所述组网模式包括两个终端的两人模式和多个终端的多人模式。The method of claim 2, wherein the networking mode comprises a two-person mode of two terminals and a multi-person mode of a plurality of terminals.
  4. 根据权利要求1或2所述的方法,其中,所述加速度传感器为三轴加速度传感器;The method according to claim 1 or 2, wherein the acceleration sensor is a three-axis acceleration sensor;
    所述加速度传感器的加速度值包括所述加速度传感器在X方向的加速度值、所述加速度传感器在Y方向的加速度值、或所述加速度传感器在Z方向的加速度值;The acceleration value of the acceleration sensor includes an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
    所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,包括:When the acceleration value is greater than or equal to the preset acceleration threshold, the networking requirements of the terminal are triggered, including:
    所述终端的加速度传感器在X、Y、Z三个方向中至少一个方向的加速度值大于或等于所述加速度阈值时,触发所述终端的组网需求。The acceleration sensor of the terminal triggers the networking requirement of the terminal when the acceleration value of at least one of the three directions of X, Y, and Z is greater than or equal to the acceleration threshold.
  5. 根据权利要求1或2所述的方法,其中,所述基于当前时间点生成组网密钥,包括:The method according to claim 1 or 2, wherein the generating the networking key based on the current time point comprises:
    基于触发所述终端组网需求的时间点,生成组网密钥。The networking key is generated based on the time point at which the terminal networking requirement is triggered.
  6. 根据权利要求1或2所述的方法,其中,所述搜索到相同组网密钥的 两个或多个终端时,自动连接完成组网,包括:The method according to claim 1 or 2, wherein said searching for the same networking key When two or more terminals are connected, the automatic connection completes the networking, including:
    求两个组网密钥之间的差值,所述差值小于预设值时,认为所述组网密钥相同;Finding a difference between the two network keys, where the difference is less than a preset value, the network key is considered to be the same;
    自动连接组网密钥相同的两个或多个终端,完成组网。The networking is completed by automatically connecting two or more terminals with the same networking key.
  7. 一种终端组网装置,所述装置包括获取模块、触发模块和连接模块;其中,A terminal networking device, the device comprising an acquisition module, a trigger module and a connection module; wherein
    所述获取模块,设置为:获取终端的加速度传感器的加速度值;The acquiring module is configured to: acquire an acceleration value of the acceleration sensor of the terminal;
    所述触发模块,设置为:所述加速度值大于或等于预设的加速度阈值时,触发所述终端的组网需求,开启所述终端预设的无线通讯方式,并基于当前时间点生成组网密钥;The triggering module is configured to: when the acceleration value is greater than or equal to a preset acceleration threshold, trigger a networking requirement of the terminal, enable a preset wireless communication mode of the terminal, and generate a network based on the current time point. Key
    所述连接模块,设置为:基于所述无线通讯方式开启搜索,当搜索到相同组网密钥的两个或多个终端时,自动连接,完成组网。The connection module is configured to: start the search based on the wireless communication mode, and automatically connect to complete the networking when two or more terminals of the same networking key are searched.
  8. 根据权利要求7所述的装置,所述装置还包括:功能设置模块,设置为:The device according to claim 7, further comprising: a function setting module, configured to:
    开启组网的开关,设置组网模式;Enable the networking switch and set the networking mode.
    设置所述终端的加速度传感器的加速度阈值;Setting an acceleration threshold of the acceleration sensor of the terminal;
    设置触发所述终端的组网需求后自动进入的无线通讯方式。Set the wireless communication mode that automatically enters after triggering the networking requirements of the terminal.
  9. 根据权利要求8所述的装置,其中,所述组网模式包括两个终端的两人模式和多个终端的多人模式。The apparatus of claim 8, wherein the networking mode comprises a two-person mode of two terminals and a multi-person mode of a plurality of terminals.
  10. 根据权利要求7或8所述的装置,其中,所述加速度传感器为三轴加速度传感器;The apparatus according to claim 7 or 8, wherein the acceleration sensor is a three-axis acceleration sensor;
    加速度传感器的加速度值包括所述加速度传感器在X方向的加速度值、所述加速度传感器在Y方向的加速度值或所述加速度传感器在Z方向的加速度值;The acceleration value of the acceleration sensor includes an acceleration value of the acceleration sensor in the X direction, an acceleration value of the acceleration sensor in the Y direction, or an acceleration value of the acceleration sensor in the Z direction;
    所述触发模块设置为:The trigger module is set to:
    如果所述终端的加速度传感器在X、Y、Z三个方向中至少一个方向的加速度值大于或等于所述加速度阈值时,触发所述终端的组网需求。 If the acceleration sensor of the terminal in at least one of the three directions of X, Y, and Z is greater than or equal to the acceleration threshold, triggering the networking requirement of the terminal.
  11. 根据权利要求7或8所述的装置,其中,所述连接模块,设置为:The device according to claim 7 or 8, wherein the connection module is configured to:
    基于触发所述终端组网需求的时间点,生成组网密钥。The networking key is generated based on the time point at which the terminal networking requirement is triggered.
  12. 根据权利要求7或8所述的装置,其中,所述连接模块,设置为:The device according to claim 7 or 8, wherein the connection module is configured to:
    求两个组网密钥之间的差值,如果所述差值小于预设值时,认为所述组网密钥相同;The difference between the two network keys is obtained. If the difference is less than the preset value, the networking key is considered to be the same;
    自动连接组网密钥相同的两个或多个终端,完成组网。 The networking is completed by automatically connecting two or more terminals with the same networking key.
PCT/CN2016/087149 2016-04-22 2016-06-24 Terminal networking method and device WO2017181522A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610257369.X 2016-04-22
CN201610257369.XA CN107306457A (en) 2016-04-22 2016-04-22 A kind of terminal network-building method and device based on acceleration transducer

Publications (1)

Publication Number Publication Date
WO2017181522A1 true WO2017181522A1 (en) 2017-10-26

Family

ID=60116517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087149 WO2017181522A1 (en) 2016-04-22 2016-06-24 Terminal networking method and device

Country Status (2)

Country Link
CN (1) CN107306457A (en)
WO (1) WO2017181522A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111555872B (en) * 2020-04-30 2022-06-21 平安科技(深圳)有限公司 Communication data processing method, device, computer system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279705A (en) * 2011-08-03 2011-12-14 惠州Tcl移动通信有限公司 Method for wirelessly switching slides and terminal thereof
JP5297628B2 (en) * 2007-10-30 2013-09-25 京セラ株式会社 Portable electronic device and control method thereof
CN105100487A (en) * 2015-07-31 2015-11-25 东莞安尔发智能科技股份有限公司 Smart phone and control method for starting WIFI function of smart phone by shaking
CN105100488A (en) * 2015-07-31 2015-11-25 东莞安尔发智能科技股份有限公司 Smart phone and control method for starting Bluetooth function of smart phone by shaking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5297628B2 (en) * 2007-10-30 2013-09-25 京セラ株式会社 Portable electronic device and control method thereof
CN102279705A (en) * 2011-08-03 2011-12-14 惠州Tcl移动通信有限公司 Method for wirelessly switching slides and terminal thereof
CN105100487A (en) * 2015-07-31 2015-11-25 东莞安尔发智能科技股份有限公司 Smart phone and control method for starting WIFI function of smart phone by shaking
CN105100488A (en) * 2015-07-31 2015-11-25 东莞安尔发智能科技股份有限公司 Smart phone and control method for starting Bluetooth function of smart phone by shaking

Also Published As

Publication number Publication date
CN107306457A (en) 2017-10-31

Similar Documents

Publication Publication Date Title
AU2021204198B2 (en) Ranging between mobile devices
US10225719B2 (en) Method and apparatus for establishing communication between an image photographing apparatus and a user device
EP2965546B1 (en) Method and apparatus for peer-2-peer wi-fi ranging using near field communication
US11553349B2 (en) Communication apparatus, control method, and computer-readable storage medium
EP2445257A1 (en) Delayed and conditional transport switch
CN103490466B (en) Battery electric quantity shares method, device and server
US20140302794A1 (en) Close proximity based event triggering
US9735860B2 (en) Non-networked wireless communication
WO2019000411A1 (en) Method and device for establishing wireless communication connection
US9363840B2 (en) Application based connectivity event triggering
CN106028266B (en) Information transmission method, device and system
US20150312744A1 (en) Controlled discovery
CN103209406A (en) Method and device for acquiring equipment identifiers
US20180213585A1 (en) Communication apparatus, communication method, and program
CN105207813B (en) Smart machine sort method and device
DE112016005814T5 (en) METHOD AND DEVICE FOR COUPLING BETWEEN A SCANNING WIRELESS RADIO COMMUNICATION DEVICE AND WIRELESS ELECTRONIC TARGET DEVICES
WO2017181522A1 (en) Terminal networking method and device
CN106503023A (en) The method and device of prompting nearby friends
JP6040617B2 (en) COMMUNICATION DEVICE, INFORMATION PROCESSING METHOD, AND PROGRAM
Mahajan et al. Design of chatting application based on android bluetooth
CN104766599A (en) Intelligent music beat interaction equipment
US10225703B2 (en) Communication circuit, communication apparatus, communication method and computer program for acquiring available services in an active communication mode and a passive communication mode using NFC
Yadav et al. Design architecture and comparison of interactive smart button using HC-05 and ESP8266
WO2023130283A1 (en) Mapping mode determination method/apparatus/device and storage medium
WO2023098356A1 (en) Fingerprint identification method and system, and electronic device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16899109

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16899109

Country of ref document: EP

Kind code of ref document: A1