WO2016078267A1 - Terminal realization method and device, and terminal and storage medium - Google Patents
Terminal realization method and device, and terminal and storage medium Download PDFInfo
- Publication number
- WO2016078267A1 WO2016078267A1 PCT/CN2015/074471 CN2015074471W WO2016078267A1 WO 2016078267 A1 WO2016078267 A1 WO 2016078267A1 CN 2015074471 W CN2015074471 W CN 2015074471W WO 2016078267 A1 WO2016078267 A1 WO 2016078267A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- couple
- terminal
- wifi
- mac address
- address information
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
Definitions
- the present invention relates to the field of communication technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for implementing a couple terminal based on Wifi Direct (where Wifi is an abbreviation of Wireless-Fidelity).
- Wifi Direct Unlike traditional Wi-Fi, traditional Wifi typically creates a wireless LAN to allow client devices to access the Internet.
- Wifi Direct operates between multiple client devices, which can be laptops, smartphones, televisions, or printers.
- client devices can be laptops, smartphones, televisions, or printers.
- the user can activate Wifi Direct for a certain purpose, such as printing files, file transfer or loading video without connecting to the network.
- the Wi-Fi Direct (Wi-Fi P2P) architecture is based on the original 802.11a, 802.11g, and 802.11n, and does not support 802.11b. It is faster than the existing ad-hoc mode, and also supports WPA2 (Wi-Fi Protected Access vertion 2).
- the maximum transmission distance is 200 meters and the maximum transmission speed is 250 Mbps, using the 2.4 GHz and 5 GHz bands. It supports one-to-one, and one-to-many mode. It refers to the process of building a Wifi network by using a wireless network card with Wifi access capability.
- Wifi Direct is a peer-to-peer connection technology that can establish TCP/IP links directly between two stations without the participation of APs.
- Group Owner Group administrator, referred to as GO
- GC Group Client
- GO and GC can be not only one-to-one, but also one-to-many.
- a GO can connect multiple GCs at the same time.
- GO can serve several GCs like an AP, and it can be like a traditional station.
- Wi-Fi Direct is a "software-only" technology. Currently, any existing Wi-Fi hardware can be upgraded to obtain Wifi Direct functionality through software upgrades.
- MAC Medium/Media Access Control
- MAC Medium/Media Access Control
- the first three bytes are codes assigned by the IEEE's Registration Authority (RA) to different vendors (high-order 24 bits), also known as the "Organizationally Unique Identifier" (OUI). Is the identifier that identifies the LAN (Local Area Network) node.
- RA Registration Authority
- UAI Organizationally Unique Identifier
- the last three bytes (lower 24 bits) are assigned by the respective manufacturers to the adapter interface of the production, called the extended identifier (uniqueness).
- the physical address of the network card is usually an EPROM (Erasable Programmable Read Only Memory) that is burned into the network card by the network card manufacturer.
- the address of the host that is to say, in the physical transmission process under the network, the host is identified by the physical address, which is globally unique. Take the Ethernet card as an example.
- the physical address is a 48-bit integer, such as 44-45-53-54-00-00, which is stored in the host interface in a machine-readable manner.
- the Ethernet address management organization IEEE Institute of Electrical and Electronics Engineers combines 48-bit Ethernet addresses into several independent contiguous address groups. Manufacturers who produce Ethernet NICs purchase one of them, during specific production, Assign these unique addresses to individual Ethernet cards one by one.
- the mobile phone receives corresponding signals from other devices in a small range and responds, for example, one-to-one mutual communication between the couples Personalized needs for induction.
- the technical solution By identifying wireless signals to pair into a couple's mobile phone, hardware support is required, so that the cost is correspondingly increased, and the signals transmitted and received between the two mobile phones must match, and the pairing is not intelligent.
- the interworking number is solidified inside the couple's mobile phone, and the button area of the couple's mobile phone is provided with an intercommunication button, and the two bare machines send text messages to each other.
- the external call can be dialed.
- the phone realizes the normal function of the mobile phone, so that the couple's mobile phones can cooperate with each other in function.
- the technical solution is paired into a couple's mobile phone by setting an intercommunication number, which requires manual setting by the user, and the user experience is poor.
- the purpose of the embodiments of the present invention is to provide a method and device for implementing a couple terminal based on Wifi Direct, a terminal thereof, and a storage medium.
- an embodiment of the present invention provides a method for implementing a couple terminal based on Wifi Direct, including:
- the Wifi Direct-based couple terminal implementation method further includes:
- the step of pre-configuring the couple MAC address comprises:
- the MAC address information of the Wifi terminal to be configured is obtained through a normal Wifi Direct connection, and the MAC address information is configured as a couple MAC address.
- the MAC address information is decrypted.
- the couple terminal function entity is triggered according to the couple Wifi Direct connection.
- an embodiment of the present invention provides a device for implementing a couple terminal based on Wifi Direct, including:
- a search module configured to search for a Wifi terminal
- the processing module is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
- the Wifi Direct-based couple terminal implementation device further includes:
- the configuration module is configured to pre-configure the couple's MAC address.
- the configuration module includes:
- connection unit configured to establish a normal Wifi Direct connection with the Wifi terminal to be configured
- the configuration unit is configured to obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
- the Wifi Direct-based couple terminal implementation device further includes:
- a decryption module configured to: after obtaining the MAC address information, the MAC address The information is decrypted.
- the Wifi Direct-based couple terminal implementation device further includes:
- the triggering module is configured to trigger the couple terminal function entity according to the couple Wifi Direct connection after establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information.
- an embodiment of the present invention provides a terminal, including the Wifi Direct-based lover terminal implementation device, as described above, where the device includes:
- a search module configured to search for a Wifi terminal
- the processing module is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
- an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute a Wifi Direct-based couple provided by the first aspect of the present invention. Terminal implementation method.
- the present invention when the user manually opens the Wifi function, the user does not need to add additional hardware configuration, and the user does not need to manually configure the couple terminal, and the nearby Wifi terminal can be automatically searched, and the searched Wifi terminal is The MAC address information is matched with the pre-stored couple MAC address. When the match is consistent, a couple Wifi Direct connection with the Wifi terminal is established to execute the corresponding couple terminal function entity. It can be seen that, compared with the prior art, the present invention can satisfy the requirement of universality of the couple terminal, and is intelligent based on software implementation, 2) no need to add hardware modules, low cost, and no need for signal matching. The automatic connection of the couple terminal can be realized, the intelligence of the pairing is improved, and 3) the user is not required to manually set the intercommunication number to be paired into the couple terminal, thereby improving the user experience.
- 1 is a schematic diagram of Wifi channel division
- FIG. 2 is a schematic flowchart of a method for implementing a Wifi Direct-based couple terminal according to an embodiment of the present invention
- FIG. 3 is a schematic flowchart of a method for implementing a Wifi Direct-based couple terminal according to another embodiment of the present invention.
- FIG. 4 is a schematic flowchart of pre-configuring a couple MAC address according to another embodiment of the present invention.
- FIG. 5 is a schematic diagram of a process of establishing a Wifi Direct connection in an embodiment of the present invention
- FIG. 6 is a schematic diagram of a data structure of recording MAC address information in an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a pairing process of a couple terminal in an embodiment of the present invention.
- FIG. 8 is a schematic flowchart of configuring a couple terminal in an embodiment of the present invention.
- FIG. 9 is a schematic diagram of a flow of executing a specific function of a couple in an embodiment of the present invention.
- FIG. 10 is a schematic diagram of a flow of performing a Wifi ranging process according to an embodiment of the present invention.
- FIG. 11 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to an embodiment of the present invention
- FIG. 12 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to another embodiment of the present invention.
- FIG. 13 is a schematic structural diagram of a configuration module according to an embodiment of the present disclosure.
- FIG. 14 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to another embodiment of the present invention.
- FIG. 15 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to another embodiment of the present invention.
- an embodiment of the present invention provides a method for implementing a couple terminal based on Wifi Direct.
- the method is applied to a Wifi terminal having a Wifi function, such as a mobile phone, and includes the following steps:
- the Wifi Direct-based couple terminal implementation method further includes:
- the step of pre-configuring the couple MAC address comprises:
- S002 Obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
- a common function such as file sharing and screen display sharing can be implemented, and based on the couple Wifi Direct connection, a couple terminal function entity deployed on the terminal can be triggered to implement, for example, instant chat. More rich and intimate features such as distance display.
- the user when the user buys back two mobile phones and performs booting, it will detect whether there is a contact terminal information saved, and the pairing function is not automatically invoked, the function will open the Wifi, and then perform a Wifi Direct connection. At the same time, the MAC address of the other party is recorded in the background and marked as a couple tag, so that the pairing is successful. The next time you connect two phones, they will automatically connect. And automatically obtain the MAC address of the other party and determine that if the MAC address of the other party is the same as the saved MAC address of the couple, it is recognized that the other party's mobile phone is a couple terminal, and then the pre-designed couple terminal function is executed.
- the corresponding couple terminal MAC address information is cleared in the memory of the mobile phone, and the user can selectively perform re-pairing of the couple terminal, and the re-pairing method Reference can be made to the above.
- the MAC address information is decrypted.
- the information in the process of performing MAC address information transmission, the information may be encrypted.
- the encryption algorithm may adopt MD5 (Message Digest Algorithm 5, message digest algorithm fifth edition) or other designed mapping algorithm.
- the couple terminal function entity is triggered according to the couple Wifi Direct connection, and the couple terminal function entity is used to implement a specific function such as a friendly prompt, a distance display, a position display, and the like. .
- FIG. 5 it shows a mechanism for exchanging device information when a Wifi P2P device discovers each other and discovers that the other party is a Wifi Direct device in the process of performing a Wifi Direct connection according to an embodiment of the present invention.
- the scanning technology is similar to the scanning technology used when discovering a conventional access point, and continues to refer to FIG. 5, the Wifi device. 1
- the Wifi device 2 is invited.
- the two Wifi devices pass the handshake, and the handshake process transmits information such as the device name and password. After the handshake is successful, the device can be connected.
- a database record stored in the Wifi device is defined for recording the MAC address of the Wifi device, and the record also has an attribute to mark whether the corresponding Wifi device is a couple terminal. This can ensure that when the mobile phone scans, it is determined whether the detected Wifi device is a couple terminal. In some embodiments, after the user selects to restore the factory settings, the saved value can be cleared and the user can selectively perform the pairing of the couple terminal again.
- the background program when the phone is turned on, the background program will detect whether or not the contact terminal is saved. MAC address, if not, you need to perform couple pairing. If there is, scan to detect surrounding Wifi terminal. If you find a couple terminal, perform Wifi Direct connection and perform couple-specific function. Otherwise, perform normal Wifi Direct function.
- the main steps include:
- Step 1 The user performs booting on the two mobile phones.
- the mobile phone can be selected as the newly purchased mobile phone.
- Step 2 The mobile phone determines whether the MAC address of the couple is stored in the background database. If not, step 3 is performed to perform pair matching; if yes, step 4 is performed.
- Step 3 Pair the couple terminal, see Figure 8 for details.
- Step 4 After the user opens the Wifi function, scan and detect the surrounding Wifi terminal, and scan to obtain the MAC address of the surrounding Wifi terminal, and compare the MAC address of the Wifi terminal of the other party with the MAC address of the couple stored in the database. If they are the same, then Initiate an invitation to make a Wifi Direct connection, and perform step 5 for a couple-specific function; otherwise, perform step 6 to perform a normal Wifi function.
- Step 5 Perform a couple-specific function, see Figure 9 for details.
- Step 6 It is up to the user to manually connect to other terminals or accept connection requests from other terminals.
- the pairing of the couple terminal is performed, mainly to save the MAC address of the recorded couple terminal, and the main steps include:
- Step 1 Automatically turn on the Wifi function of the unit, and prompt the user to pair with the couple. Please do not turn off the Wifi function.
- Step 2 Scan the surrounding Wifi terminal and make a Wifi Direct connection.
- Step 3 Encrypt the MAC address of the local machine to the other party.
- the algorithm can use MD5 or other designed mapping algorithms.
- Step 4 After receiving the encrypted packet sent by the other party, the scanned MAC address of the other party is encrypted once.
- Step 5 Compare the two packets to see if they are consistent. If they are consistent, the encryption algorithms used by the two phones are the same. You can think of it as a couple terminal, save the MAC address, and mark it as a couple attribute; otherwise, go to step 6. ;
- Step 6 Is the surrounding Wifi terminal all connected? If not, then change the Wifi terminal to try to connect, go to step 2; otherwise, the pairing fails.
- the couple-specific functional entities are mainly for performing couple-specific functions and better improving the user experience.
- the main steps include:
- Step 1 Proactively connect to the couple terminal and initiate a Wifi Direct request
- Step 2 If the connection is not successful, perform step 1 to connect again; if successful, perform step 3.
- Step 3 Display that the couple terminal is connected and display the terminal names of each other.
- Step 4 Call the Wifi ranging module to perform ranging and display the distance from each other on the screen. See Figure 10 for details.
- Step 5 Open the chat window and send messages to each other and send them via Wifi.
- the Wifi ranging module mainly detects a Wifi terminal having a power minimum that can be connected by using a binary scanning method known in the prior art, and then can determine the distance of the other party by searching the built-in database table.
- the main steps include:
- Step 1 In the case of a Wifi connection, set an initial minimum power and maximum power.
- Step 2 Set the transmit power to the middle of the minimum and maximum values.
- Step 3 Scan and detect the couple terminal to determine whether the other party can be found. If it is not found, proceed to step 4; otherwise, perform step 5.
- Step 4 It is indicated that only the transmit power is greater than this intermediate value, it is possible to connect, and the minimum value is modified to this intermediate value, and the process proceeds to step 2 to scan again.
- Step 5 Determine whether the current intermediate value is close to the maximum power, that is, whether the transmission power can be adjusted again. If it is not close, it indicates that the minimum connectable power has not been found, and step 6 is performed. Otherwise, Note that a minimum connectable power value has been found and go to step 7.
- Step 6 Explain that the transmit power is less than the intermediate power, and it is also possible to connect. Therefore, modify the maximum value to this intermediate value, and go to step 2 to scan again.
- Step 7 Explain that the power value is exactly the minimum power value that can be connected, and find the maximum support distance corresponding to this power in the built-in database table, so that the distance of the other party is tested.
- Step 8 In order to accurately measure the distance, the values measured by Wifi are transmitted to each other, and then the average value is taken as the distance between the two, and displayed on the respective screens.
- an embodiment of the present invention further provides a device for implementing a couple terminal based on Wifi Direct, including:
- the search module 10 is configured to search for a Wifi terminal
- the obtaining module 20 is configured to obtain MAC address information of the searched Wifi terminal;
- the processing module 30 is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
- the Wifi Direct-based lover terminal implementation device further includes:
- the configuration module 40 is configured to pre-configure the couple MAC address.
- the configuration module 40 includes:
- the connecting unit 401 is configured to establish a normal Wifi Direct connection with the Wifi terminal to be configured;
- the configuration unit 402 is configured to obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
- the Wifi Direct-based lover terminal implementation device further includes:
- the decryption module 50 is configured to decrypt the MAC address information after obtaining the MAC address information.
- the Wifi Direct-based lover terminal implementation apparatus further includes:
- the triggering module 60 is configured to establish a Wifi Direct connection with the Wifi terminal Thereafter, the couple terminal function entity is triggered according to the couple Wifi Direct connection.
- a terminal comprising a Wifi Direct-based couple terminal implementation device as described above, the device comprising:
- the search module 10 is configured to search for a Wifi terminal
- the obtaining module 20 is configured to obtain MAC address information of the searched Wifi terminal;
- the processing module 30 is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
- the search module, the acquisition module, the processing module, the configuration module, the decryption module, the trigger module, and the like in the Wifi Direct-based couple terminal implementation device provided by the embodiment of the present invention, and the connection unit and the configuration unit included in the configuration module can pass
- the processor in the terminal is implemented; of course, it can also be implemented by a specific logic circuit; in the process of the specific embodiment, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) ) or field programmable gate array (FPGA).
- CPU central processing unit
- MPU microprocessor
- DSP digital signal processor
- FPGA field programmable gate array
- the Wifi Direct-based couple terminal implementation method is implemented in the form of a software function module, and is sold or used as an independent product, it may also be stored in a computer readable storage. In the medium.
- the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
- a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions for executing a Wifi Direct-based couple terminal provided in various embodiments of the present invention. Implementation.
- the Wifi terminal is searched; the MAC address information of the searched Wifi terminal is obtained, and when the MAC address information is consistent with the pre-stored couple MAC address, the Wifi terminal corresponding to the MAC address information is established.
- Wifi Direct connection thus, with the invention, when the user manually opens the Wifi function, the user does not need to add additional hardware configuration, and the user does not need to manually configure the couple terminal manually, and the Wifi terminal can be automatically searched, and the MAC of the searched Wifi terminal will be searched.
- the address information is matched with the pre-stored couple MAC address.
- a Wifi Direct connection with the Wifi terminal is established to execute the corresponding couple terminal function entity, thereby improving the user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Disclosed are a terminal realization method and device, and a terminal and a storage medium. The method comprises: searching for a WiFi terminal; acquiring MAC address information about the found WiFi terminal, and when the MAC address information is consistent with a pre-stored couple MAC address, establishing a couple WiFi direct connection with the WiFi terminal corresponding to the MAC address information.
Description
本发明涉及通信技术领域,具体而言,涉及一种基于Wifi直连(Wifi Direct,其中Wifi为无线保真(Wireless-Fidelity)的缩写)的情侣终端实现方法、装置及其终端、存储介质。The present invention relates to the field of communication technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for implementing a couple terminal based on Wifi Direct (where Wifi is an abbreviation of Wireless-Fidelity).
Wifi Direct与传统Wi-Fi不同,传统Wifi通常会创建一个无线局域网以让客户端设备访问互联网。而Wifi Direct在多个客户端设备之间运作,这些客户端设备可以为笔记本电脑、智能手机、电视或打印机等。对于某些实际的应用场合,用户出于某一需求可以通过激活Wifi Direct来达成相应的目的,例如打印文件、文件传输或者加载视频,而不用连接网络。Wifi Direct Unlike traditional Wi-Fi, traditional Wifi typically creates a wireless LAN to allow client devices to access the Internet. Wifi Direct operates between multiple client devices, which can be laptops, smartphones, televisions, or printers. For some practical applications, the user can activate Wifi Direct for a certain purpose, such as printing files, file transfer or loading video without connecting to the network.
Wi-Fi Direct(Wi-Fi P2P)架构在原有的802.11a、802.11g、802.11n之上,不支持802.11b。比既有的ad-hoc模式更快,同时也支持WPA2(Wi-Fi Protected Access vertion 2,保护无线电脑网络安全系统第2版)加密机制。最大传输距离是200米,最大传输速度为250Mbps,使用2.4GHz与5GHz频段。它支持一对一,以及一对多模式。它是指拥有Wifi接入能力的设备通过使用自身的无线网卡反过来自建Wifi网络的过程。Wifi Direct是一种点对点连接技术,它可以在两台station之间直接建立TCP/IP链接,并不需要AP的参与;其中一台station会起到传统意义上的AP的作用,称为Group Owner(组管理员,简称GO),另外一台station则称为Group Client(组客户端,简称GC),像连接AP一样连接到GO。GO和GC不仅可以一对一,也可以是一对多的关系,比如,一台GO可以同时连接着多台GC。GO可以像AP一样为几台GC提供服务,并且它可以像传统的站(station)一样,
连接到某个接入点(AP)。Wi-Fi Direct是一种“纯软件”的技术,目前而言,任何已存在的Wi-Fi硬件都可以通过软件升级获得Wifi Direct的功能。The Wi-Fi Direct (Wi-Fi P2P) architecture is based on the original 802.11a, 802.11g, and 802.11n, and does not support 802.11b. It is faster than the existing ad-hoc mode, and also supports WPA2 (Wi-Fi Protected Access vertion 2). The maximum transmission distance is 200 meters and the maximum transmission speed is 250 Mbps, using the 2.4 GHz and 5 GHz bands. It supports one-to-one, and one-to-many mode. It refers to the process of building a Wifi network by using a wireless network card with Wifi access capability. Wifi Direct is a peer-to-peer connection technology that can establish TCP/IP links directly between two stations without the participation of APs. One of the stations will function as a traditional AP, called Group Owner. (Group administrator, referred to as GO), another station is called Group Client (group client, referred to as GC), connected to GO as connected AP. GO and GC can be not only one-to-one, but also one-to-many. For example, a GO can connect multiple GCs at the same time. GO can serve several GCs like an AP, and it can be like a traditional station.
Connect to an access point (AP). Wi-Fi Direct is a "software-only" technology. Currently, any existing Wi-Fi hardware can be upgraded to obtain Wifi Direct functionality through software upgrades.
MAC(Medium/Media Access Control,介质访问控制)地址,用来表示互联网上每一个站点的标识符,采用十六进制数表示,共六个字节(48bit)。其中,前三个字节是由IEEE的注册管理机构RA(Registration Authority)负责给不同厂家分配的代码(高位24bit),也称为“编制上唯一的标识符”(Organizationally Unique Identifier,简称OUI),是识别LAN(Local Area Network,局域网)节点的标识。后三个字节(低位24bit)由各厂家自行指派给生产的适配器接口,称为扩展标识符(唯一性)。网卡的物理地址通常是由网卡生产厂家烧入网卡的EPROM(Erasable Programmable Read Only Memory,可擦除可编程只读寄存器),它存储的是传输数据时用以标识发出数据的电脑和接收数据的主机的地址。也就是说,在网络底层的物理传输过程中,是通过物理地址来识别主机的,它是全球唯一的。以以太网卡为例,其物理地址是48bit的整数,如:44-45-53-54-00-00,以机器可读的方式存入主机接口中。以太网地址管理机构IEEE(电气和电子工程师协会)将48bit的以太网地址进行不同组合,分为若干独立的连续地址组,生产以太网网卡的厂家通过购买其中一组,在具体生产时,再逐个地将这些唯一地址赋予单独的以太网卡。MAC (Medium/Media Access Control) address, used to indicate the identifier of each site on the Internet, expressed in hexadecimal numbers, a total of six bytes (48 bits). The first three bytes are codes assigned by the IEEE's Registration Authority (RA) to different vendors (high-order 24 bits), also known as the "Organizationally Unique Identifier" (OUI). Is the identifier that identifies the LAN (Local Area Network) node. The last three bytes (lower 24 bits) are assigned by the respective manufacturers to the adapter interface of the production, called the extended identifier (uniqueness). The physical address of the network card is usually an EPROM (Erasable Programmable Read Only Memory) that is burned into the network card by the network card manufacturer. It stores the computer that transmits the data and receives the data when transmitting the data. The address of the host. That is to say, in the physical transmission process under the network, the host is identified by the physical address, which is globally unique. Take the Ethernet card as an example. The physical address is a 48-bit integer, such as 44-45-53-54-00-00, which is stored in the host interface in a machine-readable manner. The Ethernet address management organization IEEE (Institute of Electrical and Electronics Engineers) combines 48-bit Ethernet addresses into several independent contiguous address groups. Manufacturers who produce Ethernet NICs purchase one of them, during specific production, Assign these unique addresses to individual Ethernet cards one by one.
目前,发明人了解到的相关现有技术有:At present, the related prior art that the inventors have learned are:
一、基于结构设计的情侣手机及手机配套外壳。其仅仅从硬件结构上定义了一种情侣手机,缺少灵活性,无法满足通用性要求,且其软件部分不具有智能性。First, based on the structural design of the couple's mobile phone and mobile phone supporting shell. It only defines a couple's mobile phone from the hardware structure, lacks flexibility, can not meet the general requirements, and its software part is not intelligent.
二、通过在手机主体上安装有发射模块、处理芯片、接收模块以及响应模块,实现手机接收来自小范围内其他设备的相应信号并做出响应,比如能满足情侣之间的手机一对一互相感应的个性化需求。然而该技术方案
通过识别无线信号以配对成为情侣手机,需要增加硬件支持,从而使得成本也相应的增加了,并且两部手机之间其发射与接收的信号必须匹配,配对不智能。Second, by installing a transmitting module, a processing chip, a receiving module and a response module on the main body of the mobile phone, the mobile phone receives corresponding signals from other devices in a small range and responds, for example, one-to-one mutual communication between the couples Personalized needs for induction. However, the technical solution
By identifying wireless signals to pair into a couple's mobile phone, hardware support is required, so that the cost is correspondingly increased, and the signals transmitted and received between the two mobile phones must match, and the pairing is not intelligent.
三、在情侣手机中设置互通号码,所述互通号码固化在情侣手机内部,以及所述情侣手机的按键区设置有互通按键,两部裸机互发短信,当用户插入SIM卡后,可拨打外部电话,实现手机的正常功能,从而实现情侣手机在功能上互相配合。该技术方案通过设置一个互通号码进行通信从而配对成情侣手机,需要用户手动设置,用户体验差。3. Setting an interworking number in the couple's mobile phone, the interworking number is solidified inside the couple's mobile phone, and the button area of the couple's mobile phone is provided with an intercommunication button, and the two bare machines send text messages to each other. When the user inserts the SIM card, the external call can be dialed. The phone realizes the normal function of the mobile phone, so that the couple's mobile phones can cooperate with each other in function. The technical solution is paired into a couple's mobile phone by setting an intercommunication number, which requires manual setting by the user, and the user experience is poor.
发明内容Summary of the invention
鉴于此,为了解决现有技术中存在的需要增加硬件模块导致成本较高、需要对两部手机之间的发射与接收信号进行匹配导致情侣终端配对不具有智能化,或情侣终端需要用户手动设置导致用户体验较差技术问题中的至少一个,本发明实施例的目的在于提供一种基于Wifi Direct的情侣终端实现方法、装置及其终端、存储介质。In view of this, in order to solve the need in the prior art to increase the hardware module, the cost is high, and the matching between the transmitting and receiving signals between the two mobile phones is required, so that the couple terminal pairing is not intelligent, or the couple terminal needs to be manually set by the user. At least one of the technical problems caused by poor user experience, the purpose of the embodiments of the present invention is to provide a method and device for implementing a couple terminal based on Wifi Direct, a terminal thereof, and a storage medium.
本发明实施例的技术方案如下:The technical solution of the embodiment of the present invention is as follows:
第一方面,本发明实施例提供一种基于Wifi Direct的情侣终端实现方法,包括:In a first aspect, an embodiment of the present invention provides a method for implementing a couple terminal based on Wifi Direct, including:
搜索Wifi终端;Search for Wifi terminal;
获取搜索到的Wifi终端的MAC地址信息,当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。Obtaining the MAC address information of the searched Wifi terminal, and when the MAC address information is consistent with the pre-stored couple MAC address, establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information.
在本发明的一种实施例中,在执行所有步骤之前,所述基于Wifi Direct的情侣终端实现方法还包括:In an embodiment of the present invention, the Wifi Direct-based couple terminal implementation method further includes:
预先配置情侣MAC地址。Pre-configure couple MAC address.
在本发明的一种实施例中,预先配置情侣MAC地址的步骤包括:
In an embodiment of the invention, the step of pre-configuring the couple MAC address comprises:
建立与待配置Wifi终端的普通Wifi Direct连接;Establish a normal Wifi Direct connection with the Wifi terminal to be configured;
通过普通Wifi Direct连接获取待配置Wifi终端的MAC地址信息,并将所述MAC地址信息配置为情侣MAC地址。The MAC address information of the Wifi terminal to be configured is obtained through a normal Wifi Direct connection, and the MAC address information is configured as a couple MAC address.
在本发明的一种实施例中,在获取到所述MAC地址信息后,对所述MAC地址信息进行解密处理。In an embodiment of the present invention, after the MAC address information is acquired, the MAC address information is decrypted.
在本发明的一种实施例中,在建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接之后,依据所述情侣Wifi Direct连接触发情侣终端功能实体。In an embodiment of the present invention, after establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information, the couple terminal function entity is triggered according to the couple Wifi Direct connection.
第二方面,本发明实施例提供一种基于Wifi Direct的情侣终端实现装置,包括:In a second aspect, an embodiment of the present invention provides a device for implementing a couple terminal based on Wifi Direct, including:
搜索模块,配置为搜索Wifi终端;a search module configured to search for a Wifi terminal;
获取模块,配置为获取搜索到的Wifi终端的MAC地址信息;Obtaining a module, configured to obtain MAC address information of the searched Wifi terminal;
处理模块,配置为当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。The processing module is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
在本发明的一种实施例中,所述基于Wifi Direct的情侣终端实现装置还包括:In an embodiment of the present invention, the Wifi Direct-based couple terminal implementation device further includes:
配置模块,配置为预先配置情侣MAC地址。The configuration module is configured to pre-configure the couple's MAC address.
在本发明的一种实施例中,所述配置模块包括:In an embodiment of the invention, the configuration module includes:
连接单元,配置为建立与待配置Wifi终端的普通Wifi Direct连接;a connection unit configured to establish a normal Wifi Direct connection with the Wifi terminal to be configured;
配置单元,配置为通过普通Wifi Direct连接获取待配置Wifi终端的MAC地址信息,并将所述MAC地址信息配置为情侣MAC地址。The configuration unit is configured to obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
在本发明的一种实施例中,所述基于Wifi Direct的情侣终端实现装置还包括:In an embodiment of the present invention, the Wifi Direct-based couple terminal implementation device further includes:
解密模块,配置为在获取到所述MAC地址信息后,对所述MAC地址
信息进行解密处理。a decryption module, configured to: after obtaining the MAC address information, the MAC address
The information is decrypted.
在本发明的一种实施例中,所述基于Wifi Direct的情侣终端实现装置还包括:In an embodiment of the present invention, the Wifi Direct-based couple terminal implementation device further includes:
触发模块,配置为在建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接之后,依据所述情侣Wifi Direct连接触发情侣终端功能实体。The triggering module is configured to trigger the couple terminal function entity according to the couple Wifi Direct connection after establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information.
第三方面,本发明实施例提供一种终端,包括如上所述的基于Wifi Direct的情侣终端实现装置,所述装置包括:In a third aspect, an embodiment of the present invention provides a terminal, including the Wifi Direct-based lover terminal implementation device, as described above, where the device includes:
搜索模块,配置为搜索Wifi终端;a search module configured to search for a Wifi terminal;
获取模块,配置为获取搜索到的Wifi终端的MAC地址信息;Obtaining a module, configured to obtain MAC address information of the searched Wifi terminal;
处理模块,配置为当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。The processing module is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
第三方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明第一方面实施例提供的基于Wifi Direct的情侣终端实现方法。In a third aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute a Wifi Direct-based couple provided by the first aspect of the present invention. Terminal implementation method.
采用本发明实施例提供的技术方案,当用户手动打开了Wifi功能时,无需额外增加硬件配置,也无需用户手动频繁配置情侣终端,即可自动搜索附近Wifi终端,并且将搜索到的Wifi终端的MAC地址信息与预先存储的情侣MAC地址进行匹配,当匹配一致时,则建立与所述Wifi终端的情侣Wifi Direct连接,以执行相应的情侣终端功能实体。可见,本发明相对于现有技术而言,1)可以满足情侣终端对于通用性的需求,且基于软件实现具有智能性,2)不需要增加硬件模块,成本较低,且无需进行信号匹配即可实现情侣终端的自动连接,提高了配对的智能性,3)无需用户进行手动设置互通号码以配对成情侣终端,提高了用户体验。
With the technical solution provided by the embodiment of the present invention, when the user manually opens the Wifi function, the user does not need to add additional hardware configuration, and the user does not need to manually configure the couple terminal, and the nearby Wifi terminal can be automatically searched, and the searched Wifi terminal is The MAC address information is matched with the pre-stored couple MAC address. When the match is consistent, a couple Wifi Direct connection with the Wifi terminal is established to execute the corresponding couple terminal function entity. It can be seen that, compared with the prior art, the present invention can satisfy the requirement of universality of the couple terminal, and is intelligent based on software implementation, 2) no need to add hardware modules, low cost, and no need for signal matching. The automatic connection of the couple terminal can be realized, the intelligence of the pairing is improved, and 3) the user is not required to manually set the intercommunication number to be paired into the couple terminal, thereby improving the user experience.
图1是Wifi信道划分示意图;1 is a schematic diagram of Wifi channel division;
图2是本发明实施例提供的基于Wifi Direct的情侣终端实现方法流程示意图;2 is a schematic flowchart of a method for implementing a Wifi Direct-based couple terminal according to an embodiment of the present invention;
图3是本发明另一实施例提供的基于Wifi Direct的情侣终端实现方法流程示意图;3 is a schematic flowchart of a method for implementing a Wifi Direct-based couple terminal according to another embodiment of the present invention;
图4是本发明另一实施例提供的预先配置情侣MAC地址的流程示意图;4 is a schematic flowchart of pre-configuring a couple MAC address according to another embodiment of the present invention;
图5是本发明实施例中建立Wifi Direct连接过程示意图;FIG. 5 is a schematic diagram of a process of establishing a Wifi Direct connection in an embodiment of the present invention; FIG.
图6是本发明实施例中记录MAC地址信息的数据结构示意图;6 is a schematic diagram of a data structure of recording MAC address information in an embodiment of the present invention;
图7是本发明实施例中情侣终端配对流程示意图;7 is a schematic diagram of a pairing process of a couple terminal in an embodiment of the present invention;
图8是本发明实施例中配置情侣终端的流程示意图;8 is a schematic flowchart of configuring a couple terminal in an embodiment of the present invention;
图9是本发明实施例中执行情侣特定功能流程示意图;9 is a schematic diagram of a flow of executing a specific function of a couple in an embodiment of the present invention;
图10是本发明实施例中执行Wifi测距流程示意图;FIG. 10 is a schematic diagram of a flow of performing a Wifi ranging process according to an embodiment of the present invention; FIG.
图11是本发明实施例提供的基于Wifi Direct的情侣终端实现装置结构示意图;11 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to an embodiment of the present invention;
图12是本发明另一实施例提供的基于Wifi Direct的情侣终端实现装置结构示意图;FIG. 12 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to another embodiment of the present invention; FIG.
图13是本发明实施例提供的配置模块结构示意图;FIG. 13 is a schematic structural diagram of a configuration module according to an embodiment of the present disclosure;
图14是本发明另一实施例提供的基于Wifi Direct的情侣终端实现装置结构示意图;FIG. 14 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to another embodiment of the present invention; FIG.
图15是本发明另一实施例提供的基于Wifi Direct的情侣终端实现装置结构示意图。FIG. 15 is a schematic structural diagram of a device for implementing a couple terminal based on Wifi Direct according to another embodiment of the present invention.
本发明目的的实现、功能特点及优异效果,下面将结合具体实施例以及附图做进一步的说明。
The implementation, functional features and excellent effects of the object of the present invention will be further described below in conjunction with the specific embodiments and the accompanying drawings.
下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述,以使本领域的技术人员可以更好的理解本发明并能予以实施,但所举实施例不作为对本发明的限定。The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments to enable those skilled in the art to understand the invention. .
如图2所示,本发明实施例提供了一种基于Wifi Direct的情侣终端实现方法,该方法应用于手机等具有Wifi功能的Wifi终端,包括如下步骤:As shown in FIG. 2, an embodiment of the present invention provides a method for implementing a couple terminal based on Wifi Direct. The method is applied to a Wifi terminal having a Wifi function, such as a mobile phone, and includes the following steps:
S10、搜索Wifi终端;S10, searching for a Wifi terminal;
S20、获取搜索到的Wifi终端的MAC地址信息,当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi直连(Direct)连接。S20. Obtain MAC address information of the searched Wifi terminal, and when the MAC address information is consistent with the pre-stored couple MAC address, establish a couple Wifi direct connection of the Wifi terminal corresponding to the MAC address information.
优选地,参考图3,在执行所有步骤之前,所述基于Wifi Direct的情侣终端实现方法还包括:Preferably, referring to FIG. 3, before performing all the steps, the Wifi Direct-based couple terminal implementation method further includes:
S00、预先配置情侣MAC地址。S00, pre-configured couple MAC address.
优选地,参考图4,预先配置情侣MAC地址的步骤包括:Preferably, referring to FIG. 4, the step of pre-configuring the couple MAC address comprises:
S001、建立与待配置Wifi终端的普通Wifi Direct连接;S001. Establish a normal Wifi Direct connection with the Wifi terminal to be configured.
S002、通过普通Wifi Direct连接获取待配置Wifi终端的MAC地址信息,并将所述MAC地址信息配置为情侣MAC地址。S002: Obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
在本实施例中,基于所述普通Wifi Direct连接可实现普通的如文件共享,屏幕显示共享功能,基于所述情侣Wifi Direct连接可触发部署于终端之上的情侣终端功能实体,实现诸如即时聊天、距离显示等更为丰富且亲密的功能。In this embodiment, based on the normal Wifi Direct connection, a common function such as file sharing and screen display sharing can be implemented, and based on the couple Wifi Direct connection, a couple terminal function entity deployed on the terminal can be triggered to implement, for example, instant chat. More rich and intimate features such as distance display.
在一种实际的应用场景中,例如当用户买回两部手机并执行开机后,会检测是否有保存有情侣终端信息,没有会自动调用配对功能,该功能会打开Wifi,然后进行Wifi Direct连接,同时后台记录下对方MAC地址并相互标记为情侣标签,这样就配对成功。下次当两台手机靠近时会自动连接,
并自动获取对方MAC地址并判别,如果对方的MAC地址与保存的情侣MAC地址相同,则识别出对方手机是情侣终端,然后执行预先设计的情侣终端功能。在某些其他实施例中,当用户选择了恢复出厂设置后,会在该手机的内存中清除相应的情侣终端MAC地址信息,用户可选择地执行情侣终端的重新配对,所述重新配对的方法可参考上文所述。In a practical application scenario, for example, when the user buys back two mobile phones and performs booting, it will detect whether there is a contact terminal information saved, and the pairing function is not automatically invoked, the function will open the Wifi, and then perform a Wifi Direct connection. At the same time, the MAC address of the other party is recorded in the background and marked as a couple tag, so that the pairing is successful. The next time you connect two phones, they will automatically connect.
And automatically obtain the MAC address of the other party and determine that if the MAC address of the other party is the same as the saved MAC address of the couple, it is recognized that the other party's mobile phone is a couple terminal, and then the pre-designed couple terminal function is executed. In some other embodiments, when the user selects the factory reset setting, the corresponding couple terminal MAC address information is cleared in the memory of the mobile phone, and the user can selectively perform re-pairing of the couple terminal, and the re-pairing method Reference can be made to the above.
优选地,在获取到所述MAC地址信息后,对所述MAC地址信息进行解密处理。在本实施例中,在执行MAC地址信息传送的过程中,均可以对该信息进行加密处理,加密算法可以采用MD5(Message Digest Algorithm 5,消息摘要算法第五版)或者其他设计的映射算法。Preferably, after the MAC address information is acquired, the MAC address information is decrypted. In this embodiment, in the process of performing MAC address information transmission, the information may be encrypted. The encryption algorithm may adopt MD5 (Message Digest Algorithm 5, message digest algorithm fifth edition) or other designed mapping algorithm.
优选地,在建立与所述Wifi终端的情侣Wifi Direct连接之后,依据所述情侣Wifi Direct连接触发情侣终端功能实体,所述情侣终端功能实体用于实现友好提示、距离显示、位置显示等特定功能。Preferably, after establishing a Wifi Direct connection with the Wifi terminal, the couple terminal function entity is triggered according to the couple Wifi Direct connection, and the couple terminal function entity is used to implement a specific function such as a friendly prompt, a distance display, a position display, and the like. .
如图5所示,其示出了本发明一实施例执行Wifi Direct连接的过程中、Wifi P2P设备彼此发现对方、且发现对方是Wifi Direct设备时交换设备信息的机制。在具体应用过程中,通过采用扫描技术以检测其他设备、并与之建立连接,本实施例中,所述扫描技术与发现常规接入点时所用的扫描技术类似,继续参考图5,Wifi设备1发出连接请求即邀请Wifi设备2,两个Wifi设备通过握手,握手过程会传输设备名称及密码等信息,握手成功后即可连接。As shown in FIG. 5, it shows a mechanism for exchanging device information when a Wifi P2P device discovers each other and discovers that the other party is a Wifi Direct device in the process of performing a Wifi Direct connection according to an embodiment of the present invention. In a specific application process, by using a scanning technology to detect and establish a connection with other devices, in the embodiment, the scanning technology is similar to the scanning technology used when discovering a conventional access point, and continues to refer to FIG. 5, the Wifi device. 1 When the connection request is made, the Wifi device 2 is invited. The two Wifi devices pass the handshake, and the handshake process transmits information such as the device name and password. After the handshake is successful, the device can be connected.
如图6所示,首先要定义一个存储于Wifi设备中的数据库记录,用于记录Wifi设备的MAC地址,所述记录中还有一个属性,以标记相应Wifi设备是否为情侣终端。这样可以保证,当手机开机扫描时,判断检测到的Wifi设备是否为情侣终端。在某些实施例中,当用户选择恢复出厂设置后,可以清除这个保存值,用户可选择性地再次进行情侣终端配对。As shown in FIG. 6, first, a database record stored in the Wifi device is defined for recording the MAC address of the Wifi device, and the record also has an attribute to mark whether the corresponding Wifi device is a couple terminal. This can ensure that when the mobile phone scans, it is determined whether the detected Wifi device is a couple terminal. In some embodiments, after the user selects to restore the factory settings, the saved value can be cleared and the user can selectively perform the pairing of the couple terminal again.
如图7所示,当手机开机时,后台程序会检测是否保存有情侣终端的
MAC地址,如果没有,则需要执行情侣配对,如果有,则扫描检测周围Wifi终端,如果找到情侣终端,则进行Wifi Direct连接并执行情侣特定功能,否则执行普通Wifi Direct功能。其主要步骤包括:As shown in Figure 7, when the phone is turned on, the background program will detect whether or not the contact terminal is saved.
MAC address, if not, you need to perform couple pairing. If there is, scan to detect surrounding Wifi terminal. If you find a couple terminal, perform Wifi Direct connection and perform couple-specific function. Otherwise, perform normal Wifi Direct function. The main steps include:
步骤1:用户对两部手机执行开机,在本实施例中,所述手机可以选择为新购置的手机。Step 1: The user performs booting on the two mobile phones. In this embodiment, the mobile phone can be selected as the newly purchased mobile phone.
步骤2:手机判断后台数据库中是否保存有属性为情侣的MAC地址,如果没有,则执行步骤3以进行情侣配对;如果有,则执行步骤4。Step 2: The mobile phone determines whether the MAC address of the couple is stored in the background database. If not, step 3 is performed to perform pair matching; if yes, step 4 is performed.
步骤3:进行情侣终端配对,详细请参见附图8。Step 3: Pair the couple terminal, see Figure 8 for details.
步骤4:用户打开Wifi功能后,扫描检测周围Wifi终端,通过扫描可以得到周围Wifi终端的MAC地址,把对方Wifi终端的MAC地址与保存在数据库中的情侣MAC地址进行比对,如果相同,则发起邀请进行Wifi Direct连接,执行步骤5以进行情侣特定功能;否则,执行步骤6以进行普通Wifi功能。Step 4: After the user opens the Wifi function, scan and detect the surrounding Wifi terminal, and scan to obtain the MAC address of the surrounding Wifi terminal, and compare the MAC address of the Wifi terminal of the other party with the MAC address of the couple stored in the database. If they are the same, then Initiate an invitation to make a Wifi Direct connection, and perform step 5 for a couple-specific function; otherwise, perform step 6 to perform a normal Wifi function.
步骤5:执行情侣特定功能,详细请参见附图9。Step 5: Perform a couple-specific function, see Figure 9 for details.
步骤6:由用户决定手动去连接其他终端或者接受其他终端的连接请求。Step 6: It is up to the user to manually connect to other terminals or accept connection requests from other terminals.
如图8所示,执行情侣终端配对,主要是为了保存记录情侣终端的MAC地址,主要步骤包括:As shown in FIG. 8, the pairing of the couple terminal is performed, mainly to save the MAC address of the recorded couple terminal, and the main steps include:
步骤1:自动打开本机Wifi功能,同时提示用户正在进行情侣配对,请不要关闭Wifi功能。Step 1: Automatically turn on the Wifi function of the unit, and prompt the user to pair with the couple. Please do not turn off the Wifi function.
步骤2:扫描周围Wifi终端并进行Wifi Direct连接。Step 2: Scan the surrounding Wifi terminal and make a Wifi Direct connection.
步骤3:加密发送本机的MAC地址给对方,算法可以采用MD5或者其他设计的映射算法。Step 3: Encrypt the MAC address of the local machine to the other party. The algorithm can use MD5 or other designed mapping algorithms.
步骤4:接收到对方发送的加密包后,再将扫描到的对方MAC地址加密一次。
Step 4: After receiving the encrypted packet sent by the other party, the scanned MAC address of the other party is encrypted once.
步骤5:将两个信息包进行比对,看是否一致,如果一致则说明两部手机采用的加密算法一致,可以认为是情侣终端,保存此MAC地址,并标记为情侣属性;否则执行步骤6;Step 5: Compare the two packets to see if they are consistent. If they are consistent, the encryption algorithms used by the two phones are the same. You can think of it as a couple terminal, save the MAC address, and mark it as a couple attribute; otherwise, go to step 6. ;
步骤6:周围Wifi终端是否全部连接过,如果没有则换下个Wifi终端尝试连接,转到步骤2;否则,提示配对失败。Step 6: Is the surrounding Wifi terminal all connected? If not, then change the Wifi terminal to try to connect, go to step 2; otherwise, the pairing fails.
如图9所示,情侣特定功能实体,主要是为了执行情侣特定功能,更好地提高用户体验,主要步骤包括:As shown in Figure 9, the couple-specific functional entities are mainly for performing couple-specific functions and better improving the user experience. The main steps include:
步骤1:主动连接情侣终端,发起Wifi Direct请求;Step 1: Proactively connect to the couple terminal and initiate a Wifi Direct request;
步骤2:如果连接不成功,则执行步骤1以再次连接;如果成功,则执行步骤3。Step 2: If the connection is not successful, perform step 1 to connect again; if successful, perform step 3.
步骤3:显示情侣终端已经连接上,显示彼此终端名称。Step 3: Display that the couple terminal is connected and display the terminal names of each other.
步骤4:调用Wifi测距模块进行测距,并且在屏上显示彼此距离,详细请参见附图10。Step 4: Call the Wifi ranging module to perform ranging and display the distance from each other on the screen. See Figure 10 for details.
步骤5:打开聊天窗口,可以互相发消息,通过Wifi传送。Step 5: Open the chat window and send messages to each other and send them via Wifi.
如图10所示,Wifi测距模块,主要是通过现有技术中已知的二分法扫描检测到一个可以连接上的具有功率最小值的Wifi终端,然后通过查找内置数据库表可以判断出对方距离,主要步骤包括:As shown in FIG. 10, the Wifi ranging module mainly detects a Wifi terminal having a power minimum that can be connected by using a binary scanning method known in the prior art, and then can determine the distance of the other party by searching the built-in database table. The main steps include:
步骤1:Wifi连接情况下,设置一个初始最小功率和最大功率。Step 1: In the case of a Wifi connection, set an initial minimum power and maximum power.
步骤2:把发射功率设为最小和最大值的中间值。Step 2: Set the transmit power to the middle of the minimum and maximum values.
步骤3:扫描检测情侣终端,判断可否发现对方,如果发现不了,则执行步骤4;否则执行步骤5。Step 3: Scan and detect the couple terminal to determine whether the other party can be found. If it is not found, proceed to step 4; otherwise, perform step 5.
步骤4:说明只有发射功率大于这个中间值才有可能连接上,把最小值修改为此中间值,转到步骤2再次扫描检测。Step 4: It is indicated that only the transmit power is greater than this intermediate value, it is possible to connect, and the minimum value is modified to this intermediate value, and the process proceeds to step 2 to scan again.
步骤5:判断当前的中间值与最大功率是否接近,即发射功率是否能再调整,如果不接近,说明还没有找到最小的可连接功率,执行步骤6,否则,
说明已经找到一个最小可连接上的功率值,执行步骤7。Step 5: Determine whether the current intermediate value is close to the maximum power, that is, whether the transmission power can be adjusted again. If it is not close, it indicates that the minimum connectable power has not been found, and step 6 is performed. Otherwise,
Note that a minimum connectable power value has been found and go to step 7.
步骤6:说明发射功率小于这个中间值功率,也有可能连接上,因此修改最大值为此中间值,转到步骤2再次扫描检测。Step 6: Explain that the transmit power is less than the intermediate power, and it is also possible to connect. Therefore, modify the maximum value to this intermediate value, and go to step 2 to scan again.
步骤7:说明此功率值正好是最小的可以连接上的功率值,查找内置的数据库表此功率对应的最大支持距离,这样就测试出对方的距离。Step 7: Explain that the power value is exactly the minimum power value that can be connected, and find the maximum support distance corresponding to this power in the built-in database table, so that the distance of the other party is tested.
步骤8:为了距离测量准确,通过Wifi互传测试出来的数值,然后取平均值作为两者距离,显示在各自屏幕上。Step 8: In order to accurately measure the distance, the values measured by Wifi are transmitted to each other, and then the average value is taken as the distance between the two, and displayed on the respective screens.
参考图11,相对应地,本发明实施例还提供了一种基于Wifi Direct的情侣终端实现装置,包括:Referring to FIG. 11, correspondingly, an embodiment of the present invention further provides a device for implementing a couple terminal based on Wifi Direct, including:
搜索模块10,配置为搜索Wifi终端;The search module 10 is configured to search for a Wifi terminal;
获取模块20,配置为获取搜索到的Wifi终端的MAC地址信息;The obtaining module 20 is configured to obtain MAC address information of the searched Wifi terminal;
处理模块30,配置为当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。The processing module 30 is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
优选地,参考图12,所述基于Wifi Direct的情侣终端实现装置还包括:Preferably, referring to FIG. 12, the Wifi Direct-based lover terminal implementation device further includes:
配置模块40,配置为预先配置情侣MAC地址。The configuration module 40 is configured to pre-configure the couple MAC address.
优选地,参考图13,所述配置模块40包括:Preferably, referring to FIG. 13, the configuration module 40 includes:
连接单元401,配置为建立与待配置Wifi终端的普通Wifi Direct连接;The connecting unit 401 is configured to establish a normal Wifi Direct connection with the Wifi terminal to be configured;
配置单元402,配置为通过普通Wifi Direct连接获取待配置Wifi终端的MAC地址信息,并将所述MAC地址信息配置为情侣MAC地址。The configuration unit 402 is configured to obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
优选地,参考图14,所述基于Wifi Direct的情侣终端实现装置还包括:Preferably, referring to FIG. 14, the Wifi Direct-based lover terminal implementation device further includes:
解密模块50,配置为在获取到所述MAC地址信息后,对所述MAC地址信息进行解密处理。The decryption module 50 is configured to decrypt the MAC address information after obtaining the MAC address information.
优选地,参考图15,所述基于Wifi Direct的情侣终端实现装置还包括:Preferably, referring to FIG. 15, the Wifi Direct-based lover terminal implementation apparatus further includes:
触发模块60,配置为在建立与所述Wifi终端的情侣Wifi Direct连接之
后,依据所述情侣Wifi Direct连接触发情侣终端功能实体。The triggering module 60 is configured to establish a Wifi Direct connection with the Wifi terminal
Thereafter, the couple terminal function entity is triggered according to the couple Wifi Direct connection.
一种终端,包括如上所述的基于Wifi Direct的情侣终端实现装置,所述装置包括:A terminal comprising a Wifi Direct-based couple terminal implementation device as described above, the device comprising:
搜索模块10,配置为搜索Wifi终端;The search module 10 is configured to search for a Wifi terminal;
获取模块20,配置为获取搜索到的Wifi终端的MAC地址信息;The obtaining module 20 is configured to obtain MAC address information of the searched Wifi terminal;
处理模块30,配置为当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。The processing module 30 is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
对于所述基于Wifi Direct的情侣终端实现装置的有关实施例,请参考上文所述。For related embodiments of the Wifi Direct-based couple terminal implementation device, please refer to the above.
本发明实施例提供的基于Wifi Direct的情侣终端实现装置中的搜索模块、获取模块、处理模块、配置模块、解密模块、触发模块等模块,以及配置模块所包括的连接单元、配置单元都可以通过终端中的处理器来实现;当然也可通过具体的逻辑电路实现;在具体实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。The search module, the acquisition module, the processing module, the configuration module, the decryption module, the trigger module, and the like in the Wifi Direct-based couple terminal implementation device provided by the embodiment of the present invention, and the connection unit and the configuration unit included in the configuration module can pass The processor in the terminal is implemented; of course, it can also be implemented by a specific logic circuit; in the process of the specific embodiment, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) ) or field programmable gate array (FPGA).
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的基于Wifi Direct的情侣终端实现方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于
任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the above-mentioned Wifi Direct-based couple terminal implementation method is implemented in the form of a software function module, and is sold or used as an independent product, it may also be stored in a computer readable storage. In the medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present invention are not limited to
Any combination of specific hardware and software.
相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明各实施例中提供的基于Wifi Direct的情侣终端实现方法。Correspondingly, the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions for executing a Wifi Direct-based couple terminal provided in various embodiments of the present invention. Implementation.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.
本发明实施例中,搜索Wifi终端;获取搜索到的Wifi终端的MAC地址信息,当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接;如此,采用本发明,当用户手动打开了Wifi功能时,无需额外增加硬件配置,也无需用户手动频繁配置情侣终端,即可自动搜索Wifi终端,并且将搜索到的Wifi终端的MAC地址信息与预先存储的情侣MAC地址进行匹配,当匹配一致时,则建立与所述Wifi终端的情侣Wifi Direct连接,以执行相应的情侣终端功能实体,提高了用户体验。
In the embodiment of the present invention, the Wifi terminal is searched; the MAC address information of the searched Wifi terminal is obtained, and when the MAC address information is consistent with the pre-stored couple MAC address, the Wifi terminal corresponding to the MAC address information is established. Wifi Direct connection; thus, with the invention, when the user manually opens the Wifi function, the user does not need to add additional hardware configuration, and the user does not need to manually configure the couple terminal manually, and the Wifi terminal can be automatically searched, and the MAC of the searched Wifi terminal will be searched. The address information is matched with the pre-stored couple MAC address. When the matching is consistent, a Wifi Direct connection with the Wifi terminal is established to execute the corresponding couple terminal function entity, thereby improving the user experience.
Claims (12)
- 一种基于Wifi Direct的情侣终端实现方法,包括:A method for implementing a couple terminal based on Wifi Direct, comprising:搜索Wifi终端;Search for Wifi terminal;获取搜索到的Wifi终端的MAC地址信息,当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。Obtaining the MAC address information of the searched Wifi terminal, and when the MAC address information is consistent with the pre-stored couple MAC address, establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information.
- 如权利要求1所述的基于Wifi Direct的情侣终端实现方法,其中,在执行所有步骤之前,还包括:The method for implementing a Wifi Direct-based couple terminal according to claim 1, wherein before performing all the steps, the method further comprises:预先配置情侣MAC地址。Pre-configure couple MAC address.
- 如权利要求2所述的基于Wifi Direct的情侣终端实现方法,其中,预先配置情侣MAC地址的步骤包括:The method for implementing a Wifi Direct-based couple terminal according to claim 2, wherein the step of pre-configuring the couple MAC address comprises:建立与待配置Wifi终端的普通Wifi Direct连接;Establish a normal Wifi Direct connection with the Wifi terminal to be configured;通过普通Wifi Direct连接获取待配置Wifi终端的MAC地址信息,并将所述MAC地址信息配置为情侣MAC地址。The MAC address information of the Wifi terminal to be configured is obtained through a normal Wifi Direct connection, and the MAC address information is configured as a couple MAC address.
- 如权利要求1所述的基于Wifi Direct的情侣终端实现方法,其中,在获取到所述MAC地址信息后,对所述MAC地址信息进行解密处理。The method for implementing a Wifi Direct-based lover terminal according to claim 1, wherein after the MAC address information is acquired, the MAC address information is decrypted.
- 如权利要求1所述的基于Wifi Direct的情侣终端实现方法,其中,在建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接之后,依据所述情侣Wifi Direct连接触发情侣终端功能实体。The method for implementing a Wifi Direct-based couple terminal according to claim 1, wherein after establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information, the couple terminal function entity is triggered according to the couple Wifi Direct connection.
- 一种基于Wifi Direct的情侣终端实现装置,包括:A device for implementing a couple terminal based on Wifi Direct, comprising:搜索模块,配置为搜索Wifi终端;a search module configured to search for a Wifi terminal;获取模块,配置为获取搜索到的Wifi终端的MAC地址信息;Obtaining a module, configured to obtain MAC address information of the searched Wifi terminal;处理模块,配置为当所述MAC地址信息与预先存储的情侣MAC地址一致时,建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接。 The processing module is configured to establish a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information when the MAC address information is consistent with the pre-stored couple MAC address.
- 如权利要求6所述的基于Wifi Direct的情侣终端实现装置,其中,还包括:The device for implementing a Wifi Direct-based couple terminal according to claim 6, further comprising:配置模块,配置为预先配置情侣MAC地址。The configuration module is configured to pre-configure the couple's MAC address.
- 如权利要求7所述的基于Wifi Direct的情侣终端实现装置,其中,所述配置模块包括:The Wifi Direct-based lover terminal implementation device of claim 7, wherein the configuration module comprises:连接单元,配置为建立与待配置Wifi终端的普通Wifi Direct连接;a connection unit configured to establish a normal Wifi Direct connection with the Wifi terminal to be configured;配置单元,配置为通过普通Wifi Direct连接获取待配置Wifi终端的MAC地址信息,并将所述MAC地址信息配置为情侣MAC地址。The configuration unit is configured to obtain MAC address information of the Wifi terminal to be configured through a normal Wifi Direct connection, and configure the MAC address information as a couple MAC address.
- 如权利要求6所述的基于Wifi Direct的情侣终端实现装置,其中,还包括:The device for implementing a Wifi Direct-based couple terminal according to claim 6, further comprising:解密模块,配置为在获取到所述MAC地址信息后,对所述MAC地址信息进行解密处理。The decryption module is configured to decrypt the MAC address information after obtaining the MAC address information.
- 如权利要求6所述的基于Wifi Direct的情侣终端实现装置,其中,还包括:The device for implementing a Wifi Direct-based couple terminal according to claim 6, further comprising:触发模块,配置为在建立与所述MAC地址信息对应的Wifi终端的情侣Wifi Direct连接之后,依据所述情侣Wifi Direct连接触发情侣终端功能实体。The triggering module is configured to trigger the couple terminal function entity according to the couple Wifi Direct connection after establishing a couple Wifi Direct connection of the Wifi terminal corresponding to the MAC address information.
- 一种终端,包括如权利要求6至10任一项所述的基于Wifi Direct的情侣终端实现装置。A terminal comprising the Wifi Direct-based couple terminal implementing device according to any one of claims 6 to 10.
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至5任一项所述的基于Wifi Direct的情侣终端实现方法。 A computer storage medium storing computer executable instructions for executing the Wifi Direct-based couple terminal implementation method according to any one of claims 1 to 5.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410663075.8A CN105682250A (en) | 2014-11-19 | 2014-11-19 | Method and apparatus for realizing couple terminal based on Wifi Direct and terminal thereof |
CN201410663075.8 | 2014-11-19 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016078267A1 true WO2016078267A1 (en) | 2016-05-26 |
Family
ID=56013165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/074471 WO2016078267A1 (en) | 2014-11-19 | 2015-03-18 | Terminal realization method and device, and terminal and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105682250A (en) |
WO (1) | WO2016078267A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106454766A (en) * | 2016-09-27 | 2017-02-22 | 盐城工学院 | Real-time cooperation data sharing system based on Android system and Wi-Fi Direct |
CN108966364A (en) * | 2018-07-18 | 2018-12-07 | 奇酷互联网络科技(深圳)有限公司 | Wi-Fi hotspot reconnection method, device, readable storage medium storing program for executing and mobile terminal |
CN112533298B (en) * | 2019-09-18 | 2022-10-04 | 浙江大华技术股份有限公司 | Terminal pairing method and system based on electromagnetic radiation frequency spectrum characteristics and paired terminals |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101175318A (en) * | 2006-11-02 | 2008-05-07 | 中兴通讯股份有限公司 | Method for communication between mobile phone of lovers |
CN102547703A (en) * | 2010-12-24 | 2012-07-04 | 株式会社泛泰 | Mobile terminal, server, and method for providing content information |
CN103260257A (en) * | 2013-04-10 | 2013-08-21 | 广东欧珀移动通信有限公司 | Method and system capable of automatically building Wi-Fi Display connection to achieve screen sharing |
CN104125655A (en) * | 2013-04-23 | 2014-10-29 | 中兴通讯股份有限公司 | Realization method and device of paired handsets |
-
2014
- 2014-11-19 CN CN201410663075.8A patent/CN105682250A/en not_active Withdrawn
-
2015
- 2015-03-18 WO PCT/CN2015/074471 patent/WO2016078267A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101175318A (en) * | 2006-11-02 | 2008-05-07 | 中兴通讯股份有限公司 | Method for communication between mobile phone of lovers |
CN102547703A (en) * | 2010-12-24 | 2012-07-04 | 株式会社泛泰 | Mobile terminal, server, and method for providing content information |
CN103260257A (en) * | 2013-04-10 | 2013-08-21 | 广东欧珀移动通信有限公司 | Method and system capable of automatically building Wi-Fi Display connection to achieve screen sharing |
CN104125655A (en) * | 2013-04-23 | 2014-10-29 | 中兴通讯股份有限公司 | Realization method and device of paired handsets |
Also Published As
Publication number | Publication date |
---|---|
CN105682250A (en) | 2016-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11902869B2 (en) | Communication device | |
US11917512B2 (en) | Communication device | |
US11889453B2 (en) | Method and apparatus for registering wireless device in wireless communication system | |
US10321312B2 (en) | Communication apparatus and control method thereof | |
WO2014086252A1 (en) | Device association method, apparatus, and system | |
KR102036686B1 (en) | Apparatus and method for selecting channel in wireless communication system | |
KR102114992B1 (en) | Wireless communication equipment and method for configuring mesh network thereof | |
WO2016078267A1 (en) | Terminal realization method and device, and terminal and storage medium | |
JP2016036190A (en) | Communication device | |
JP2017208850A (en) | Communication device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15862037 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15862037 Country of ref document: EP Kind code of ref document: A1 |