CN110832947B - Networking method and equipment - Google Patents

Networking method and equipment Download PDF

Info

Publication number
CN110832947B
CN110832947B CN201880044571.1A CN201880044571A CN110832947B CN 110832947 B CN110832947 B CN 110832947B CN 201880044571 A CN201880044571 A CN 201880044571A CN 110832947 B CN110832947 B CN 110832947B
Authority
CN
China
Prior art keywords
terminal
network group
access
access point
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880044571.1A
Other languages
Chinese (zh)
Other versions
CN110832947A (en
Inventor
陈才龙
朱爽
魏万军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN110832947A publication Critical patent/CN110832947A/en
Application granted granted Critical
Publication of CN110832947B publication Critical patent/CN110832947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Abstract

A networking method and equipment are used for solving the problems that in the prior art, a product based on an artificial networking technology is high in use threshold and poor in user experience. The method comprises the following steps: the method comprises the steps that a first terminal detects the operation of close-range networking of a user request and a target group, wherein the target group comprises the first terminal and at least two second terminals. And the first terminal and the second terminal establish close range network connection. And the first terminal displays an instant communication interface after establishing the short-distance network connection with the second terminal, wherein the instant communication interface is used for communicating with a user of the second terminal.

Description

Networking method and equipment
This application claims priority from chinese patent application filed on 12.04.2018 under the name "close range networking method and terminal device", with the application number 201810325466.7, which is incorporated herein by reference in its entirety.
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a networking method and networking equipment.
Background
A Wireless Local Area Network (WLAN) direct protocol is a protocol in a WLAN protocol cluster, and the WLAN direct protocol refers to a wireless access point between devices that can easily connect to each other through WLAN direct connection without an intermediary property. At present, intelligent terminals in the market widely use WLAN direct connection to realize file sharing in a short-distance scene. Before a WLAN direct network (Group) is established, devices participating in establishing the WLAN direct Group are all WLAN direct devices (devices), and after WLAN direct negotiation between the WLAN direct devices is completed, one central Device is selected from the WLAN direct devices to serve as a network Group Owner (GO) to establish the WLAN direct Group. After the WLAN direct Group is established, the GC searches the GO by itself and then requests to connect to the GO to join the Group.
At present, when multiple devices establish a WLAN direct Group, a user holding each device first manually opens a WLAN direct function of the device, and then one of the multiple devices is used as a GO to establish the WLAN direct Group. A user holding the GC manually operates to search for GO, and the GC sends a connection request to GO under the operation of the user after searching for GO. After receiving a connection request sent by the GC, the GO agrees to access the GC under the operation of a user, and the plurality of devices realize WLAN direct connection networking. Therefore, in the prior art, when a WLAN direct Group is established among multiple devices, a user is required to participate in the establishment. When the WLAN between the devices is constructed in a mode of manually participating in the construction, some scenes such as networking abnormity, networking conflict and the like need to be manually participated in the solution, the requirement on users is high, and the product realized based on the prior art has high use threshold and poor experience.
Disclosure of Invention
The embodiment of the application provides a networking method and equipment, which are used for solving the problems of high product use threshold and poor user experience in the prior art based on an artificial networking technology.
In a first aspect, an embodiment of the present application provides a networking method, including: the method comprises the steps that a first terminal detects the operation of close-range networking of a user request and a target group, wherein the target group comprises the first terminal and at least two second terminals. And the first terminal and the second terminal establish close range network connection. And the first terminal displays an instant communication interface after establishing the short-distance network connection with the second terminal, wherein the instant communication interface is used for communicating with a user of the second terminal. Compared with the prior art that a user operates a terminal to search other terminals, send connection requests to other terminals, agree with connection requests of other terminals and the like, the method and the device for establishing the close-range network connection with the second terminal can be achieved without other operations of the user. For example, taking 3 terminals as an example, after 3 terminals respectively detect the operation of requesting the short-range networking by the user, the 3 terminals automatically establish the short-range network connection, so that the 3 terminals can communicate with each other. Compared with the prior art, after the 3 terminals respectively detect the operation that the user requests the short-range networking, the user needs to negotiate to determine one terminal as the GO, and then the user operates the GO to search wireless signals of the other two terminals. After searching the other two terminals, the user selects the other two terminals through the operation on the GO and sends request messages to the other two terminals through the operation of the GO so as to request the other two terminals to access the GO based on the WLAN Direct technology. After the other two terminals receive the request message sent by the GO, the user needs to agree to perform WLAN Direct operation on the terminal, so that the terminal can access the GO based on the WLAN Direct technology. In the embodiment of the application, when the plurality of terminals establish the short-distance network connection, the operation of the user can be reduced, so that the user can be better unaware of the networking establishing process. In addition, because the plurality of terminals can automatically establish the short-distance network connection, manual participation in solution is not needed when some scenes such as abnormal networking and conflict occur, so that the requirement on the user can be reduced, and the user experience can be improved.
In one possible design, the first terminal may automatically establish a short-range network connection with the second terminal. In the above design, the first terminal may establish the short-distance network connection with the second terminal without the user's perception, so that the user may directly use the network group established by the first terminal and the second terminal to perform communication.
In one possible design, the short-range network connection may be one of the following connections: bluetooth connection, Near Field Communication (NFC), Wireless Local Area Network (WLAN) direct, WLAN hotspot connection.
In one possible design, the first terminal may broadcast a first central election message and receive a second central election message broadcast by the second terminal. Wherein the first central point election message carries at least one of the following information: the equipment identity identification of the first terminal, the networking capability of the first terminal and the time for the first terminal to send the first central point election message, wherein the first central point election message is used for informing a receiving end that the first terminal is in a to-be-networked state. The second election message carries at least one of the following information: the equipment identity identification of the second terminal, the networking capability of the second terminal and the time for the second terminal to send the second central point election message, wherein the second central point election message is used for informing a receiving end that the second terminal is in a to-be-networked state. And the first terminal determines whether the first terminal is an access point according to a preset rule and the second central point election message broadcast by the second terminal. If the first terminal determines that the first terminal is the access point, a first center point creation message is broadcasted, the second terminal serves as an access end and is connected to the first terminal, and the first center point creation message is used for informing a receiving end that the first terminal is the access point. If the first terminal determines that the first terminal is not the access point, the first terminal is used as an access terminal to be connected to the access point after receiving a second center point creation message broadcasted by the access point, other second terminals except the access point in the target group are accessed to the access point, and the second center point creation message is used for informing a receiving terminal that the terminal sending the second center point creation message is the access point. In the design, each terminal can determine whether the terminal is an access point according to the central point election message broadcasted by other terminals, and the terminal determined as the access point creates a message through the broadcasting central point so that other terminals are connected to the access point as access ends.
In one possible design, the first terminal may create the message through a legacy bluetooth, or Bluetooth Low Energy (BLE) broadcast hub.
In a possible design, after the first terminal establishes the short-range network connection with the second terminal, the first terminal is an access terminal, and the first terminal may communicate with any one of the second terminals serving as the access terminal through the access terminal.
In a possible design, after the first terminal establishes the short-range network connection with the second terminal, the first terminal may receive a third centroid creating message broadcasted by an access point of a second network group, where the third centroid creating message is used to notify a receiving end that a terminal sending the third centroid creating message is the access point of the second network group, and the third centroid creating message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The first terminal may determine an access point of a third network group according to a preset rule and the third center point creation message, where the third network group is a network group obtained by combining the first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. And if the access point of the third network group is the access point of the second network group, the first terminal is used as an access end to be connected to the access point of the second network group. And if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group. In the above design, the first terminal is combined with the network into one network group when receiving the center point creation message broadcast by the access point of the other network group.
In one possible design, the first terminal may be in the same group as the access point of the second network group. In the above design, the first terminal merges the first network group and the second network group when being in the same group as the access point of the second network group, so that the network security can be improved.
In a possible design, after the first terminal establishes the short-range network connection with the second terminal, the first terminal may receive a center point connection message broadcasted by an access terminal of a second network group, where the center point connection message is used to notify a receiving terminal that the terminal sending the center point connection message has accessed an access point of the second network group, and the center point connection message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The first terminal may determine an access point of a third network group according to a preset rule and the central point connection message, where the third network group is a network group obtained by combining the first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. And if the access point of the third network group is the access point of the second network group, the first terminal is used as an access end to be connected to the access point of the second network group. And if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group. In the above design, the first terminal is combined with the network into one network group when receiving the central point connection message broadcast by the access terminals of other network groups.
In one possible design, the first terminal may be in the same group as the access terminals of the second network group. In the above design, the first terminal merges the first network group and the second network group when being in the same group with the access end of the second network group, so as to improve the network security.
In one possible design, the first terminal may also obtain the number of access points in the second network group before the first terminal connects as an access point to an access point of the second network group. And the first terminal determines the connection mode of the access point which needs to be connected to the second network group according to the number of the access ends in the second network group and the number of the access ends in the first network group, so that the first terminal is connected to the access point of the second network group according to the determined connection mode. In the foregoing, the first terminal determines the access mode of the access point of the second network group according to the access capability of the access point of the second network group, so that the network quality can be better ensured.
In a possible design, if the first terminal is an access point of the first network group, when a sum of the number of access terminals in the first network group and the number of access terminals in the second network group is greater than a preset value, the first terminal may be connected to the access point of the second network group as a WIFI STA, and maintain network connection with the access terminals in the first network group. Or, if the first terminal is an access point of the first network group, and when the sum of the number of access terminals in the first network group and the number of access terminals in the second network group is less than or equal to the preset value, the first terminal may be used as a network group client GC to connect to the access point of the second network group, and disconnect the network connection with the access terminals in the first network group. In the above design, the first terminal may access the access point of the second network group in a WLAN direct connection manner when the access capability of the access point of the second network group is not exceeded, and may access the access point of the second network group in a WIFI connection manner when the access capability of the access point of the second network group is insufficient, so that the load of the access point of the second network group may be reduced, and the network quality may be better ensured.
In a possible design, if the first terminal is an access point of the first network group, when a sum of a number of access points in the first network group and a number of access points in the second network group is greater than a preset value, the first terminal may send a merge message to an access point of the first network group, where the merge message is used to indicate that the access point of the first network group is connected to an access point of the second network group as a WIFI STA. Or, if the first terminal is an access end of the first network group, when the sum of the number of access ends in the first network group and the number of access ends in the second network group is less than or equal to the preset value, the first terminal may be used as a GC to connect to an access point of the second network group, and disconnect a network connection with the access point of the first network group. In the above design, the access point of the first network group can access the access point of the second network group in a WLAN direct connection manner when the access capability of the access point of the second network group is not exceeded, and can access the access point of the second network group in a WIFI connection manner when the access capability of the access point of the second network group is insufficient, so that the load of the access point of the second network group can be reduced, and the network quality can be better ensured.
In a second aspect, an embodiment of the present application provides a first terminal, including: the system comprises a processor, a first terminal and a second terminal, wherein the processor is used for detecting the operation of close-range networking of a user request and a target group, and the target group comprises the first terminal and at least two second terminals; and establishing a short-distance network connection with the second terminal. And the display screen is used for displaying an instant communication interface after the transceiver establishes the short-distance network connection with the second terminal, and is used for communicating with the user of the second terminal.
In one possible design, the first terminal may further include a touch screen. The touch screen is used for triggering an instruction for requesting close-range networking with a target group under the operation of a user. The processor, when detecting an operation of a user requesting close-range networking with a target group, may be specifically configured to: and receiving the instruction triggered by the touch screen.
In a possible design, when the short-range network connection is established with the second terminal, the processor may be specifically configured to: and automatically establishing short-distance network connection with the second terminal.
In one possible design, the short-range network connection may be one of the following connections: bluetooth connection, NFC, WLAN direct connection, WLAN hotspot connection.
In one possible design, the first terminal may also include a transceiver. The transceiver is used for broadcasting a first central point election message and receiving a second central point election message broadcast by the second terminal; the first central point election message may carry at least one of the following information: the equipment identity of the first terminal, the networking capability of the first terminal and the time for the first terminal to send the first central point election message, wherein the first central point election message is used for informing a receiving terminal that the first terminal is in a to-be-networked state; the second election center point message may carry at least one of the following information: the equipment identity identification of the second terminal, the networking capability of the second terminal and the time for the second terminal to send the second central point election message, wherein the second central point election message is used for informing a receiving end that the second terminal is in a to-be-networked state. The processor, when establishing a short-range network connection with the second terminal, may be specifically configured to: and determining whether the first terminal is an access point according to a preset rule and the second central point election message received by the transceiver. If the first terminal is determined to be the access point, the transceiver is further configured to broadcast a first center point creation message, the second terminal is connected to the first terminal as an access end, and the first center point creation message is used to notify a receiving end that the first terminal is the access point. If the transceiver is determined not to be the access point, the transceiver may further be configured to receive a second center point creation message broadcast by the access point, where the second center point creation message is used to notify a receiving end that a terminal sending the second center point creation message is the access point. The processor may be further configured to, after the transceiver receives the second center point creation message, connect to the access point as an access end, and access the access point by a second terminal in the target group except the access point.
In one possible design, the transceiver may be configured to communicate with any one of the second terminals as the access terminal through the access point after the processor establishes the short-range network connection with the second terminal.
In a possible design, if the first terminal is an access terminal, the transceiver may be configured to receive a third center point creation message broadcasted by an access point of a second network group after the processor establishes a short-distance network connection with the second terminal, where the third center point creation message is used to notify a receiving end that the terminal sending the third center point creation message is the access point of the second network group, and the third center point creation message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The processor may be further configured to determine an access point of a third network group according to a preset rule and the third center point creation message received by the transceiver, where the third network group is a network group obtained by combining a first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. If the access point of the third network group is the access point of the second network group, the processor may be further configured to connect to the access point of the second network group as an access end. And if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
In one possible design, if the first terminal is an access terminal. The transceiver may be configured to receive a central point connection message broadcasted by an access end of a second network group after the processor establishes a short-distance network connection with the second terminal, where the central point connection message is used to notify a receiving end that a terminal sending the central point connection message has accessed an access point of the second network group, and the central point connection message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The processor is further configured to determine an access point of a third network group according to a preset rule and the central point connection message, where the third network group is a network group obtained by combining the first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. If the access point of the third network group is the access point of the second network group, the processor may be further configured to serve as an access end connected to the access point of the second network group. And if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
In a possible design, the processor may be further configured to, before being connected to the access point of the second network group as an access terminal, obtain the number of access terminals in the second network group, and determine a connection manner of the access point that needs to be connected to the second network group according to the number of access terminals in the second network group and the number of access terminals in the first network group. The processor, when connected to the access point of the second network group as an access end, is specifically configured to: the first terminal is connected to the access points of the second network group according to the determined connection mode.
In one possible design, if the first terminal is an access point of the first network group. The processor, when determining a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group, may specifically be configured to: and if the sum of the number of the access ends in the first network group and the number of the access ends in the second network group is greater than a preset value, the WIFI STA serves as an access point for connecting the WIFI STA to the second network group, and network connection between the WIFI STA and the access ends in the first network group is maintained. Or, if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, the access point is used as the access point where the network group client GC is connected to the second network group, and the network connection with the access terminals in the first network group is disconnected.
In one possible design, if the first terminal is an access terminal of the first network group. The processor, when determining a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group, may specifically be configured to: if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is greater than a preset value, controlling the transceiver to send a combined message to the access point of the first network group, wherein the combined message is used for indicating the access point of the first network group to be used as the access point of the WIFI STA to be connected to the second network group. Or if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, connecting the GC to the access point of the second network group, and disconnecting the network connection with the access point of the first network group.
In a third aspect, an embodiment of the present application provides a networking device, including: the detection module is used for detecting the operation of close range networking of a user request and a target group, wherein the target group comprises a first terminal and at least two second terminals. And the network connection module is used for establishing close range network connection with the second terminal after the detection module detects that the user requests the close range networking operation with the target group. And the display module is used for displaying an instant communication interface after the network connection module establishes the short-distance network connection with the second terminal, and is used for communicating with the user of the second terminal.
In one possible design, the network connection module may be specifically configured to: and automatically establishing short-distance network connection with the second terminal.
In one possible design, the short-range network connection may be one of the following connections: bluetooth connection, NFC, WLAN direct connection, WLAN hotspot connection.
In one possible design, the apparatus may further include a transceiver module. The transceiver module is configured to broadcast a first central point election message, where the first central point election message carries at least one of the following information: the equipment identity identification of the first terminal, the networking capability of the first terminal and the time for the first terminal to send the first central point election message, wherein the first central point election message is used for informing a receiving end that the first terminal is in a to-be-networked state. And receiving a second central point election message broadcasted by the second terminal, wherein the second central point election message carries at least one of the following information: the equipment identity identification of the second terminal, the networking capability of the second terminal and the time for the second terminal to send the second central point election message, wherein the second central point election message is used for informing a receiving end that the second terminal is in a to-be-networked state. The network connection module may be specifically configured to: and determining whether the first terminal is an access point according to a preset rule and the second central point election message received by the transceiver module. If the first terminal is determined to be the access point, the transceiver module may be further configured to broadcast a first center point creation message, where the second terminal is connected to the first terminal as an access end, and the first center point creation message is used to notify a receiving end that the first terminal is the access point. If the access point is determined not to be the access point, the transceiver module may be further configured to receive a second center point creation message broadcast by the access point. The network connection module may be further configured to, after the transceiver module receives a second center point creation message broadcast by an access point, serve as an access terminal to connect to the access point, where other second terminals in the target group except the access point access the access point, and the second center point creation message is used to notify a receiving terminal that the terminal sending the second center point creation message is the access point.
In one possible design, the apparatus may further include a communication module. The communication module is used for communicating with any second terminal serving as an access end through the access point after the network connection module establishes short-distance network connection with the second terminal.
In one possible design, the apparatus may further include a determination module. The transceiver module may be further configured to receive a third center point creation message broadcasted by an access point of a second network group after the network connection module establishes a short-distance network connection with the second terminal, where the third center point creation message is used to notify a receiving end that a terminal sending the third center point creation message is the access point of the second network group, and the third center point creation message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The determining module is configured to determine an access point of a third network group according to a preset rule and the third center point creation message received by the transceiver module, where the third network group is a network group obtained by combining a first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. If the determining module determines that the access point of the third network group is the access point of the second network group, the network connection module may further be configured to connect the first terminal serving as the access end to the access point of the second network group. If the determining module determines that the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
In a possible design, the transceiver module may be further configured to receive a central point connection message broadcasted by an access end of a second network group after the network connection module establishes a short-distance network connection with the second terminal, where the central point connection message is used to notify a receiving end that the terminal sending the central point connection message has accessed an access point of the second network group, and the central point connection message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The determining module may be further configured to determine an access point of a third network group according to a preset rule and the central point connection message received by the transceiver module, where the third network group is a network group obtained by combining a first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. If the determining module determines that the access point of the third network group is the access point of the second network group, the network connection module may be further configured to be connected to the access point of the second network group as an access end. If the determining module determines that the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
In one possible design, the apparatus may further include an acquisition module. An obtaining module, configured to obtain the number of access ends in the second network group before the network connection module is used as an access end to connect to an access point of the second network group. The determining module may be further configured to determine a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group. The network connection module, when serving as an access end connected to the access point of the second network group, may specifically be configured to: and connecting to the access points of the second network group according to the determined connection mode.
In one possible design, if the first terminal is an access point of the first network group. The determining module, when determining a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group received by the transceiver module, may specifically be configured to: and if the sum of the number of the access ends in the first network group and the number of the access ends in the second network group is greater than a preset value, the WIFI STA serves as an access point for connecting the WIFI STA to the second network group, and network connection between the WIFI STA and the access ends in the first network group is maintained. Or, if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, the access point is used as the access point where the network group client GC is connected to the second network group, and the network connection with the access terminals in the first network group is disconnected.
In one possible design, if the first terminal is an access terminal of the first network group. The determining module, when determining a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group, may be specifically configured to: if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is greater than a preset value, sending a combined message to an access point of the first network group through a transceiver module, wherein the combined message is used for indicating the access point of the first network group to be used as a WIFI STA to be connected to an access point of the second network group. Or if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, connecting the GC to the access point of the second network group, and disconnecting the network connection with the access point of the first network group.
In a fourth aspect, this embodiment of the present application further provides a computer storage medium, where a software program is stored, and when the software program is read and executed by one or more processors, the software program may implement the method provided by the first aspect or any one of the designs of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product containing instructions, which when executed on a computer, cause the computer to perform the method provided by the first aspect or any one of the first aspects.
Drawings
Fig. 1 is a schematic diagram of an architecture of a WLAN direct connection set according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a networking method according to an embodiment of the present application;
fig. 3 is a schematic diagram of an instant messaging interface according to an embodiment of the present disclosure;
fig. 4A is a schematic diagram of a network group formed by a terminal a, a terminal B, a terminal C, and a terminal D according to an embodiment of the present application;
fig. 4B is a schematic diagram of a network group formed by a terminal B, a terminal C, and a terminal D according to an embodiment of the present application;
fig. 4C is a schematic diagram of a network group formed by a terminal a, a terminal B, a terminal C, and a terminal D according to an embodiment of the present application;
fig. 5 is a schematic diagram of a networking process provided in an embodiment of the present application;
fig. 6A is a schematic diagram of a network combining and processing provided in an embodiment of the present application;
fig. 6B is a schematic diagram of another network combining and processing provided in the embodiment of the present application;
fig. 7A is a schematic diagram of a merged network group according to an embodiment of the present application;
fig. 7B is a schematic diagram of another merged network group according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a networking device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a first terminal according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
At present, a terminal can be used as a wireless router to share the internet with other terminals having a Wireless Local Area Network (WLAN) function. Specifically, the first terminal shares the internet as a WiFi access point (WiFi AP), the second terminal with the WLAN function can access the internet by accessing the first terminal as a WiFi client (WiFi STA), and the second terminal can perform internet browsing, file transmission, and the like through the internet shared by the first terminal.
But in some cases the user does not need to use the internet, just wants to connect two devices and share some data between them, like sending a file or printing something on a printer. In this case, the terminal supporting the WLAN Direct (WLAN Direct) function may perform network connection through the WLAN Direct technology, thereby transmitting data. Terminals supporting the WLAN Direct function can be connected to each other without joining the internet. A terminal supporting the WLAN Direct function may make a one-to-one connection, or a plurality of terminals may be connected simultaneously. When two or more terminals are directly connected through WLAN Direct technology, they may form a WLAN Direct group (group), that is, a WLAN Direct network group.
Three components are defined in the basic architecture of the WLAN Direct group, and are respectively: the terminal comprises WLAN Direct equipment (device), a Group Owner (GO) and a Group Client (GC), wherein terminals in the WLAN Direct group are WLAN Direct devices, the GO is a terminal which serves as an access point in the WLAN Direct group, and the GC is a terminal which serves as an access terminal in the WLAN Direct group.
Taking an example that 3 terminals establish a WLAN Direct group, before establishing the WLAN Direct group, a user opens the operation of the WLAN Direct connection function of the terminal, and the terminal sends a wireless signal to the other two terminals, so that the other two terminals can detect the terminal. After negotiation, a user holding 3 terminals determines one terminal as GO and the other two terminals as GC. The user then operates the GC to search for the wireless signal of GO. After the GO is searched, the user selects the GO from the GC and triggers the GC to send a connection request to the GO so as to request to access the GO. After the GO receives a connection request sent by the GC, a user agrees to access the GC by operating the GO, and then the GC accesses the GO based on a WLAN Direct technology after the GO agrees to access. After two GCs access the GO, 3 terminals establish a WLAN Direct group, which may be as shown in fig. 1. The GO functions like a WLAN Access Point (AP), and terminals that do not support WLAN direct connection function around can also discover and connect to the GO, and these terminal devices are called legacy clients (legacy clients).
At present, a terminal widely uses WLAN direct connection to realize file sharing in a close-range scene, but the file sharing needs manual participation in network establishment, and the user cannot be unaware of the network establishment process. In addition, networks built by the terminal through the WLAN direct connection technology are all temporary, namely the networks are disassembled after the networks are not needed to be used, and the networks need to be rebuilt when files are shared again. Taking the WLAN Direct group shown in fig. 1 as an example, after the user turns off the WLAN Direct connection function of 3 terminals, the WLAN Direct group is disassembled. If the 3 terminals transmit data again, the above process needs to be repeated again to reconstruct the WLAN Direct group resolution, and the user experience is poor. In addition, some abnormal and conflicting scenes of network establishment need to be solved by manual participation, the requirement on users is high, and the product realized based on the prior art has high use threshold and poor experience.
Based on this, the embodiments of the present application provide a networking method and apparatus, so as to solve the problems in the prior art that a product based on an artificial networking technology has a high use threshold and a poor user experience. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
In the embodiments of the present application, the plurality refers to two or more.
The group mentioned in the embodiment of the application is a top-level logical relationship, and is similar to a WeChat group, a QQ group and other user groups, and terminals in the same group can establish a short-distance network connection with each other.
The network group mentioned in the embodiment of the present application is a bottom-layer physical link relationship, and terminals in the same network group can communicate with each other, that is, communication among all nodes in the network group is reachable.
In addition, it should be understood that the terms first, second, etc. in the description of the embodiments of the present application are used for distinguishing between the descriptions and not for indicating or implying relative importance or order.
Referring to fig. 2, a flowchart of a networking method provided in an embodiment of the present application is shown. The method can be used in terminals supporting WLAN Direct function, and the terminals can be notebook computers, tablet computers, smart phones, modern printers, wireless mice, wireless keyboards, remote controllers, speakers, televisions, displays, cameras, scanners, music equipment and the like. The networking method comprises the following steps:
s201, a first terminal detects a user request and a target group close-range networking operation, wherein the target group comprises the first terminal and at least two second terminals. The user may request short-distance networking with the target group by starting an Application (APP) for short-distance networking on the first terminal, or may request short-distance networking with the target group by opening a short-distance networking function of the first terminal. Or, the user may also perform a preset gesture on the first terminal to request the close-range networking with the target group, where the preset gesture includes double-clicking a touch screen of the first terminal, pressing a specific physical key on the first terminal, drawing a circle with a finger joint on the touch screen of the first terminal, and the like. Of course, the user may also perform other operations on the first terminal to request close-range networking with the target group, and the operation behavior of the user is not specifically limited in this embodiment of the application.
The target group may be pre-established for users of the first terminal and the at least two second terminals. For example, a first terminal may create a group under the operation of a user and then invite a second terminal to join the group. When the first terminal invites the second terminal to join the group, the first terminal may send a network link inviting the second terminal to join the group, and the second terminal joins the group by clicking the network link after receiving the network link sent by the first terminal. Or, the first terminal may also send a two-dimensional code inviting the second terminal to join the group, and the second terminal joins the group by scanning the two-dimensional code after receiving the two-dimensional code sent by the first terminal. Or, the first terminal may also present the two-dimensional code inviting to join the group to the second terminal, and the second terminal joins the group by scanning the two-dimensional code. Or, the first terminal may also send the group name to the second terminal, or the user holding the first terminal tells the user holding the second terminal the group name by dictation or the like, and the user applies for joining the group after searching the group name on the second terminal. Of course, the first terminal may invite the second terminal to join the group in other manners, which is not described in detail herein in this embodiment of the application. It should be noted that the terminal that creates the group may also be any second terminal, and in the embodiment of the present application, only the first terminal is taken as an example for description.
The target group may also be established by the first terminal and the at least two second terminals through detecting peripheral devices, for example, the first terminal and the at least two second terminals respectively search for devices existing around, and automatically establish the group after the first terminal and the at least two second terminals detect each other. For example, the first terminal and the at least two second terminals may respectively turn on the bluetooth function and then search for surrounding bluetooth devices. Or, the first terminal and at least two second terminals may also respectively turn on the WLAN Direct function, and then search for the surrounding WLAN Direct devices. Alternatively, the first terminal and the at least two second terminals may also respectively turn on a Near Field Communication (NFC) function, and then search for surrounding NFC devices, and the like. Of course, the first terminal and the at least two second terminals may also detect the peripheral devices through other technologies, so as to automatically establish the group.
The target group may also be established by other manners, and details are not described herein again in this embodiment of the present application.
S202, the first terminal and the second terminal establish close range network connection. The short-distance network connection can be one of the following connection modes: the bluetooth connection, the NFC, the WLAN direct connection, and the WLAN hotspot connection, or the short-distance network connection may also be other connection modes, such as a connection mode that occurs in future communication development, and the connection mode of the short-distance network connection is not specifically limited in this embodiment of the present application. The first terminal and the second terminal can automatically establish the short-distance network connection. The first terminal and the second terminal can obtain a first network group after establishing the short-distance network connection.
In a possible implementation manner, after the first terminal detects that the user requests the operation of close-range networking with the target group, if the distance between the first terminal and the second terminal is within a preset range, the first terminal may automatically establish close-range network connection with the second terminal. If the distance between the first terminal and the second terminal is not within the preset range, the first terminal can automatically establish the short-distance network connection with the second terminal when the distance between the first terminal and the second terminal is within the preset range. The preset range may be a transmission distance of bluetooth, and certainly, the preset range may also be other distances, and the preset range is not specifically limited in this embodiment of the present application.
S203, the first terminal displays an instant messaging interface for communicating with a user of the second terminal. Taking the first terminal remarking the second terminal as "zhang XX", an instant messaging interface for the first terminal to communicate with the second terminal may be as shown in fig. 3. The user can send data to the second terminal on the instant messaging interface, and can also receive the data sent by the second terminal on the instant messaging interface. For example, if the first terminal is a modern printer, a wireless mouse, a wireless keyboard, a remote controller, a speaker, a television, a display, a camera, a scanner, a music device, etc., the first terminal may not display the instant messaging interface but directly receive the data sent by the second terminal.
In the embodiment of the application, when the terminal detects that the user requests the operation of close-range networking with the target group, the close-range network connection with the second terminal can be established without other operations performed by the user. For example, taking 3 terminals as an example, after 3 terminals respectively detect the operation of requesting the short-range networking by the user, the 3 terminals automatically establish the short-range network connection, so that the 3 terminals can communicate with each other. Compared with the prior art, after the 3 terminals respectively detect the operation that the user requests the short-range networking, the user needs to negotiate to determine one terminal as the GO, and then the user operates the GO to search wireless signals of the other two terminals. After searching the other two terminals, the user selects the other two terminals through the operation on the GO and sends request messages to the other two terminals through the operation of the GO so as to request the other two terminals to access the GO based on the WLAN Direct technology. After the other two terminals receive the request message sent by the GO, the user needs to agree to perform WLAN Direct operation on the terminal, so that the terminal can access the GO based on the WLAN Direct technology. In the embodiment of the application, when the plurality of terminals establish the short-distance network connection, the operation of the user can be reduced, so that the user can be better unaware of the networking establishing process. In addition, because the plurality of terminals can automatically establish the short-distance network connection, manual participation in solution is not needed when some scenes such as abnormal networking and conflict occur, so that the requirement on the user can be reduced, and the user experience can be improved.
In a possible implementation manner, the first terminal may automatically establish a short-range network connection with the second terminal by:
a1, the first terminal broadcasts a central point election message. The central point election message may be used to notify the receiving end that the terminal sending the central point election message is in a to-be-networked state, and the central point election message may carry one or more of the following information: the device identity of the terminal that sends the central point election message, the networking capability of the terminal that sends the central point election message, and the time when the terminal sends the central point election message, the central point election message may also carry other information, such as load information of the terminal that sends the central point election message, priority of the terminal that sends the central point election message, and the like, where the priority is used to indicate priority that the terminal may serve as an access point when the access point is elected, and embodiments of the present application are not specifically limited herein. The device identity of the terminal may be a PeerID of the terminal.
For convenience of description, the name of the message referred to in the embodiment of the present application is only an exemplary illustration, and in practical applications, the name may be named as another name, for example, the center point election message is named as XX, and it should be understood that XX may also be understood as the center point election message in the embodiment of the present application if XX may also implement the function implemented by the center point election message in the embodiment of the present application.
A2, the first terminal receives the centre point election message broadcast by the second terminal. When receiving the centre point election message broadcasted by the second terminal, the first terminal may store information carried by the centre point election message.
And A3, the first terminal determines whether the first terminal is an access point according to a preset rule and the central point election message broadcast by the second terminal. The first terminal may wait for a preset duration and then determine whether the first terminal is an access point according to a preset rule and a central point election message broadcast by the second terminal, so that the first terminal may receive the central point election messages sent by all the second terminals in the target group. If the first terminal is an access point, step a4 is performed. If the first terminal is not an access point, step a5 is performed. The access point mentioned in the embodiment of the present application may be understood as GO, and the access terminal may be understood as GC.
Specifically, step a3 can be implemented in any one of the following five ways:
in a first manner, if the central point election message carries the device identity of the terminal that sends the central point election message, the first terminal may determine whether the first terminal is an access point according to the first rule and the device identity of the second terminal. For example, the first rule may be that the device id of the access point is the smallest among the device ids of all the terminals, and the first terminal may determine whether the first terminal is the access point by determining whether the device id of the first terminal is smaller than the device id of any second terminal. And if the equipment identity of the first terminal is smaller than that of any second terminal, determining that the first terminal is the access point, otherwise, determining that the first terminal is not the access point. It should be understood that the first rule may also be that the device ids of the access point are the largest among the device ids of all the terminals, or the first rule may also be that the device ids of all the terminals are sorted from large to small, and the device id of the access point is ranked at the second position, or the first rule may also be that the device ids of all the terminals are sorted from small to large, and the device id of the access point is ranked at the second position, and so on, and the first rule may also be other, and the first rule is not specifically limited herein in this embodiment of the present application.
In the second mode, if the central point election message carries the networking capability of the terminal sending the central point election message, the first terminal may determine whether the first terminal is an access point according to the second rule and the networking capability of the second terminal. For example, the second rule may be that the networking capability of the access point is the largest among the networking capabilities of all the terminals, and the first terminal may determine whether the first terminal is the access point by determining whether the networking capability of the first terminal is greater than the networking capability of any second terminal. And if the networking capability of the first terminal is greater than that of any second terminal, determining that the first terminal is the access point, otherwise, determining that the first terminal is not the access point.
In a third mode, if the central point election message carries the time for the terminal to send the central point election message, the first terminal may determine whether the first terminal is an access point according to the third rule and the time for the second terminal to send the central point election message. For example, the third rule may be that the access point sends the central point election message the earliest time compared to the time when other terminals send the central point election message, and the first terminal may determine whether itself is the access point by determining whether the time when itself sends the central point election message is earlier than the time when any one of the second terminals sends the central point election message. And if the time for sending the central point election message by the first terminal is earlier than the time for sending the central point election message by any second terminal, determining that the first terminal is the access point, and otherwise, determining that the first terminal is not the access point.
In a fourth mode, if the central point election message carries load information of the terminal that sends the central point election message, the first terminal may determine whether the first terminal is an access point according to a fourth rule and the load information of the second terminal. For example, the fourth rule may be that the load of the access point is the smallest among the loads of all the terminals, and the first terminal may determine whether itself is the access point by determining whether its load is smaller than that of any of the second terminals. And if the load of the first terminal is smaller than that of any second terminal, determining that the first terminal is the access point, otherwise, determining that the first terminal is not the access point.
In a fifth mode, if the priority of the terminal sending the central point election message is carried in the central point election message, the first terminal may determine whether the first terminal is the access point according to a fifth rule and the priority of the second terminal. For example, the fourth rule may be that the priority of the access point is the largest among the priorities of all the terminals, and the first terminal may determine whether itself is the access point by determining whether its priority is greater than the priority of any of the second terminals. And if the priority of the first terminal is greater than that of any second terminal, determining that the first terminal is the access point, otherwise, determining that the first terminal is not the access point.
And A4, if the first terminal determines itself to be the access point, the first terminal broadcasts the message created by the central point, and the second terminal is connected to the first terminal as the access end. The center point creation message may be used to notify the receiving end that the terminal sending the center point creation message is an access point, so that the receiving end may access the terminal sending the center point creation message after receiving the center point creation message. The first terminal may periodically broadcast the central point creation message. The access terminal may periodically broadcast a central point connection message after accessing the access point, where the central point connection message is used to notify the receiving terminal that the central point connection message is sent to access the access point, and the central point connection message may carry an identifier of the access point.
When the access point connected with one access terminal is changed, the central point connection message sent by the access terminal carries the identification of a new access point, so that the access terminal can inform other terminals in the group of the access terminal to migrate to the new access point through the central point connection message.
Optionally, the first terminal may receive messages sent by other terminals in the same group, and for messages sent by other terminals not in the same group, the first terminal may not receive the messages or may not perform processing after receiving the messages. The message may be a central point election message, a message may be created for a central point, or a message may be connected for a central point.
A5, if the first terminal determines that the first terminal is not an access point, the first terminal is connected to the access point as an access end after receiving the center point creation message broadcasted by the access point, and other second terminals except the access point in the target group are accessed to the access point as access ends. The access point may determine that the access point itself is sent after being determined as the access point for a certain second terminal in the target group according to a preset rule and the central point election message sent by other terminals in the target group. The first terminal and the other second terminals may broadcast the center point connection message after connecting to the access point.
The first terminal and the second terminal can broadcast a central point election message, a central point creation message and a central point connection message through traditional Bluetooth or BLE. Bluetooth is divided into two categories, namely, legacy bluetooth and BLE. The traditional Bluetooth can be used for transmitting files with larger data volume, such as voice, music, higher data volume transmission and the like. The BLE technology is a low-cost, short-distance and interoperable robust wireless technology, works in an unlicensed ISM radio frequency band of 2.4GHz, and can be used for products with high real-time requirements but low data rate, such as a mouse, a keyboard and the like.
Of course, the first terminal and the second terminal may also broadcast the central point election message, the central point creation message, and the central point connection message by using other technologies, such as a broadcast technology appearing in future communication development, and the broadcast technology is not specifically limited in this embodiment of the application. For convenience of description, BLE is taken as an example in the embodiments of the present application for illustration.
In one implementation, the access point may periodically broadcast a central point creation message and the access terminal may periodically broadcast a central point connection message.
Optionally, the priority of the center point connection message > the priority of the center point creation message > the priority of the center point election message, and the first terminal may preferentially process the message with the high priority.
If the first terminal is the access terminal, after the first terminal establishes the short-distance network connection with the second terminal, the first terminal can communicate with any second terminal serving as the access terminal through the access point.
After the first terminal establishes the short-distance network connection with the second terminal, when the access point of the first network group leaves the first network group, the short-distance network connection can be automatically established between the access terminals of the first network group. The access point of the first network group may be the first terminal or any second terminal. The reason why the access point of the first network group leaves the first network group may be that the access point of the first network group is powered off, or the access point of the first network group is capable of closing the network connection function, or the access point of the first network group is far away from the first network group.
When the access terminal automatically establishes the short-range network connection with other access terminals, reference may be made to the methods described in steps a1 to a5, and details are not repeated in this embodiment of the application.
After the second network group is obtained, if the access point of the first network group returns again, the access point can be used as the access point of the access end accessing the second network group. The access point of the first network group may access the second network group when rebooting, the access point of the first network group may also access the second network group when rebooting the network connection function, the access point of the first network group may also access the second network group when approaching the second network group, and the access point of the first network group may also access the second network group in other scenarios.
Taking fig. 4A as an example, terminal a, terminal B, terminal C, and terminal D form a network group, where terminal a is an access point of the network group. When the terminal a leaves the network group, the terminal B, the terminal C, and the terminal D form a new network group, as shown in fig. 4B, wherein the terminal B is an access point of the new network group. Terminal a may be accessed as access terminal B when it comes back again, as shown in fig. 4C.
When two network groups are close, the two network groups may be merged into one network group. The first network group and the third network group may be merged into a fourth network group by establishing a short-range network connection for at least two terminals.
B1, the first terminal receives the message broadcast by the third terminal in the third network group. If the third terminal is an access point of the third network group, the message broadcast by the third terminal is a center point creation message, where the center point creation message is used to notify the receiving end that the third terminal is an access point of the third network group, and the center point creation message may carry at least one of the following information: the equipment identity of the third terminal and the networking capability of the third terminal. If the third terminal is an access end of the third network group, the message broadcasted by the third terminal may be a central point connection message, where the central point connection message is used to notify the receiving end that the third terminal has accessed an access point of the third network group, and the central point connection message may carry at least one of the following information: a device identity of an access point of the third network group, networking capabilities of the access point of the third network group. The first terminal and the third terminal may be in the same group, and thus the first terminal may process the message broadcast by the third terminal.
And B2, the first terminal determines whether the access point of the second network group can be used as the access point of the fourth network group according to the preset rule and the message broadcast by the third terminal. If yes, go to step B3. If not, go to step B4. The first process of determining whether the access point of the first network group can be used as the access point of the fourth network group according to the preset rule and the message broadcast by the third terminal may refer to step a3, and details of the embodiment of the present application are not repeated here.
B3, the first terminal is connected as an access terminal to an access point of the third network group.
In a possible implementation manner, before the first terminal is connected to the access point of the third network group as the access terminal, the first terminal may obtain the number of access terminals in the third network group, so that the first terminal may determine, according to the number of access terminals in the third network group and the number of access terminals in the first network group, a connection manner of the access point that needs to be connected to the third network group, and further, the first terminal may be connected to the access point of the third network group according to the determined connection manner. The number of the access terminals in the third network group may be carried in the message broadcast by the third terminal, so that the first terminal may obtain the number of the access terminals in the third network group when receiving the message broadcast by the third terminal.
The first terminal determines a connection mode of the access point to be connected to the third network group according to the number of the access terminals in the third network group and the number of the access terminals in the first network group, and may be implemented by any one of the following modes:
in the first mode, if the first terminal is an access point of the first network group, when the sum of the number of access terminals in the first network group and the number of access terminals in the third network group is greater than a preset value, the first terminal may be connected to the access point of the third network group as a WIFI STA, that is, the first terminal adopts a WIFI connection mode as an access point where the access terminal is connected to the third network group. The first terminal is connected to the access point of the third network group as the access end in a WIFI connection mode, and the first terminal can keep network connection with the access end in the first network group. The preset value may be determined according to access resources, access capabilities, load information, etc. of the access point of the third network group.
The terminal can be used as a wireless router, the Internet is shared with other terminals with the WLAN function, and at the moment, the other terminals can be connected with the terminal as WIFI STAs. Three components are defined in the WLAN hotspot architecture: the terminal comprises WIFI hotspot equipment, a WIFI Access Point (AP) and a WIFI STA, wherein the terminal with the WLAN function can be used as the WIFI hotspot equipment, and the WIFI STA is the WIFI hotspot equipment accessed to the WIFI AP.
In a second manner, if the first terminal is an access point of the first network group, when the sum of the number of access terminals in the first network group and the number of access terminals in the third network group is less than or equal to the preset value, the first terminal may be connected to the access point of the third network group as the GC, that is, the first terminal adopts a WLAN direct connection manner as the access point connected to the third network group. When the first terminal is connected to the access point of the third network group as the access end in the WLAN direct connection manner, the network connection with the access end in the first network group may be disconnected.
In a third manner, if the first terminal is an access end of the first network group, when the sum of the number of access ends in the first network group and the number of access ends in the third network group is greater than a preset value, the first terminal may send a merge message to the access point of the first network group, where the merge message is used to indicate that the access point of the first network group is used as an access point of the WIFI STA to connect to the third network group. When the access point of the first network group is connected to the access point of the third network group as the WIFI STA, the network connection with the access end of the first network group may be maintained.
In a fourth manner, if the first terminal is an access end of the first network group, the first terminal may be used as an access point of the GC connected to the third network group when the sum of the number of access ends in the first network group and the number of access ends in the third network group is less than or equal to the preset value. The first terminal may disconnect a network connection with the access point of the first network group when connecting to the access point of the third network group as the GC. When the first terminal is connected to the access point of the third network group as the GC, it may also broadcast a center point connect message for notifying the receiving end that the first terminal has connected to the access point of the third network group. Other terminals of the first network group may also connect to the access point of the third network group after receiving the center point connect message broadcast by the first terminal. Alternatively, after receiving the center point connection message broadcast by the first terminal, the other terminals in the first network group may also connect to the access point in the third network group when determining that the other terminals are in the same group as the access point in the third network group.
B4, the access point of the third network group is connected to the access point of the first network group as an access end. The process of using the access point of the third network group as the access point to connect to the access point of the first network group may refer to the method described in B3, and details of the embodiment of the present application are not repeated here.
For better understanding of the embodiments of the present application, the networking process is described in detail below with reference to specific application scenarios. Taking the example that the central point election message carries the device identity of the terminal that sends the central point election message, and the preset rule is that the device identity of the access point is the smallest among the device identities of all terminals, the networking process of the terminal a, the terminal B, the terminal C, and the terminal D is described, where the device identity of the terminal a is the smallest, and the networking process can be referred to as shown in fig. 5.
S501, the terminal A, the terminal B, the terminal C and the terminal D respectively detect the operation of requesting the close-range networking by the user.
S502, the terminal A, the terminal B, the terminal C and the terminal D respectively broadcast the central point election message through BLE, and receive the central point election messages broadcast by other terminals through BLE.
And S503, the terminal A, the terminal B, the terminal C and the terminal D respectively store the received equipment identity marks carried in the central point election messages.
S504, the terminal A, the terminal B, the terminal C and the terminal D respectively determine whether the terminal A, the terminal B, the terminal C and the terminal D receive the message with the priority higher than that of the central point election message. If yes, go to step S505. If not, go to step S506. Wherein messages with higher priority than the central point election message create messages and/or central point connection messages for the central point.
And S505, processing the received message with the highest priority. If the received message with the highest priority is the center point creation message, the terminal may be connected to the terminal that transmits the center point creation message as an access terminal. If the received message with the highest priority is a central point connection message, and the central point connection message carries the identifier of the access point, the terminal can be used as an access terminal to be connected to the terminal corresponding to the identifier.
S506, the terminal A determines that the equipment identity of the terminal A is minimum, and creates a message through a BLE broadcast center point. And the terminal B, the terminal C and the terminal D are connected to the terminal A as access ends after receiving the message created by the center point of the BLE broadcast by the terminal A. Thus, terminal a, terminal B, terminal C, and terminal D constitute a network group as shown in fig. 4A.
In order to better understand the embodiments of the present application, the following network combinations are specifically described in detail with reference to specific application scenarios. Taking the network group 1 and the network group 2 shown in fig. 4A as an example, a merging process of the network group 1 and the network group 2 is described, where the network group 2 includes a terminal E, a terminal F, and a terminal G, where the terminal E is an access point of the network group 2.
Scene one: the terminal a of the network group 1 and the terminal E of the network group 2 belong to the same group, and when the network group 1 and the network group 2 are close, each terminal in the network group 1 may perform the following steps, as shown in fig. 6A.
S601a, the terminal a receives a center point creation message broadcasted by the terminal E through BLE, where the center point creation message carries the number of access terminals connected to the terminal E and the device identity of the terminal E. Step S602a is performed.
S602a, terminal a determines whether the device id of terminal E is smaller than its own device id. If yes, go to step S603 a. If not, no processing is carried out.
S603a, the terminal a determines whether the sum of the number of the connected aps and the number of the connected aps of the terminal E is less than a preset value. If yes, go to step S604 a. If not, go to step S607 a.
S604a, the terminal a accesses the terminal E by using WLAN direct connection, and broadcasts a center point connection message through BLE, where the center point connection message is used to notify the receiving end that the terminal a has accessed the terminal E. When the terminal A is accessed to the terminal E in a WLAN direct connection mode, the network connection with the terminal B, the terminal C and the terminal D can be disconnected.
After the execution of S604a, before the execution of step S606a, step S605a may be performed for terminal B, terminal C, and terminal D, respectively.
S605a, after receiving the center point connect message broadcasted by BLE, determines whether terminal E is in the same group as itself. If yes, go to step S606 a. If not, no processing is carried out.
And S606a, accessing the terminal E in a WLAN direct connection mode. If the terminal B, the terminal C, and the terminal D access the terminal E in a WLAN direct connection manner, the combined network group may be as shown in fig. 7A.
And S607a, the terminal A accesses the terminal E in a WIFI connection mode and keeps network connection with the terminal B, the terminal C and the terminal D. The merged network group may be as shown in fig. 7B.
The execution process of each terminal in the network group 2 may refer to the above steps S601a to S607a, and the embodiment of the present application is not repeated.
Scene two: the terminal B of the network group 1 and the terminal E of the network group 2 belong to the same group, and when the network group 1 and the network group 2 are close, the terminal B may perform the following steps, as shown in fig. 6B.
S601B, the terminal B receives a center point creation message broadcasted by the terminal E through BLE, where the center point creation message carries the number of access terminals connected to the terminal E and the device identity of the terminal E. Step S602b is performed.
S602B, terminal B determines whether the device id of terminal E is smaller than the device id of terminal a. If yes, go to step S603 b. If not, no processing is carried out.
S603B, terminal B determines whether the sum of the number of the aps connected to terminal E and the number of the aps connected to terminal a is less than a predetermined value. If yes, go to step S604 b. If not, go to step S607 b.
S604B, the terminal B accesses the terminal a by using WLAN direct connection, and broadcasts a center point connection message through BLE, where the center point connection message is used to notify the receiving end that the terminal B has accessed the terminal E. When the terminal B accesses the terminal A in a WLAN direct connection mode, the network connection with the terminal A can be disconnected.
After the execution of S604b, before the execution of step S606b, step S605b may be performed for terminal a, terminal C, and terminal D, respectively.
S605B, after receiving the center point connect message broadcasted by BLE, determines whether terminal E is in the same group as itself. If yes, go to step S606 b. If not, no processing is carried out.
And S606b, disconnecting the terminal E from other terminals and accessing the terminal E in a WLAN direct connection mode. If the terminal a, the terminal C, and the terminal D access the terminal E in a WLAN direct connection manner, the combined network group may be as shown in fig. 7A.
S607B, the terminal B sends a merge instruction message to the terminal a, where the merge instruction message is used to instruct the terminal a to access the terminal E in a WIFI connection mode. Therefore, the terminal A is accessed to the terminal E in a WIFI connection mode after receiving the merging indication message sent by the terminal B. When the terminal a accesses the terminal E in the WIFI connection mode, the network connection with the terminal B, the terminal C, and the terminal D may be maintained, as shown in fig. 7B.
When the network group 1 and the network group 2 are close to each other, the terminal E may receive a central point connection message broadcasted by the terminal B, where the central point connection message carries the number of access terminals connected to the terminal a and the device identity of the terminal a. After receiving the center point connection message broadcast by the terminal B, the terminal E may execute steps S602a to S607a, which is not repeated in this embodiment of the present application.
Scene three: the terminal B of the network group 1 and the terminal F of the network group 2 belong to the same group. When the network group 1 and the network group 2 are close to each other, the terminal B may receive a central point connection message broadcasted by the terminal F, where the central point connection message carries the number of access terminals connected to the terminal E and the device identity of the terminal E. After receiving the center point connection message broadcast by the terminal F, the terminal B may execute steps S602B to S607B, which is not repeated in this embodiment of the present application.
When the network group 1 and the network group 2 are close to each other, the terminal F may receive a central point connection message broadcasted by the terminal B, where the central point connection message carries the number of access terminals connected to the terminal a and the device identity of the terminal a. After receiving the center point connection message broadcast by the terminal B, the terminal F may execute steps S602B to S607B, which is not repeated in this embodiment of the present application.
In the embodiment of the application, when the terminal detects that the user requests the operation of close-range networking with the target group, the close-range network connection with the second terminal can be established without other operations performed by the user. For example, taking 3 terminals as an example, after 3 terminals respectively detect the operation of requesting the short-range networking by the user, the 3 terminals automatically establish the short-range network connection, so that the 3 terminals can communicate with each other. Compared with the prior art, after the 3 terminals respectively detect the operation that the user requests the short-range networking, the user needs to negotiate to determine one terminal as the GO, and then the user operates the GO to search wireless signals of the other two terminals. After searching the other two terminals, the user selects the other two terminals through the operation on the GO and sends request messages to the other two terminals through the operation of the GO so as to request the other two terminals to access the GO based on the WLAN Direct technology. After the other two terminals receive the request message sent by the GO, the user needs to agree to perform WLAN Direct operation on the terminal, so that the terminal can access the GO based on the WLAN Direct technology. In the embodiment of the application, when the plurality of terminals establish the short-distance network connection, the operation of the user can be reduced, so that the user can be better unaware of the networking establishing process. In addition, because the plurality of terminals can automatically establish the short-distance network connection, manual participation in solution is not needed when some scenes such as abnormal networking and conflict occur, so that the requirement on the user can be reduced, and the user experience can be improved.
Based on the same inventive concept as the method embodiment, the embodiment of the present invention provides a networking apparatus 80, which is specifically configured to implement the method described in the embodiments illustrated in fig. 2 to 7B, and the structure of the apparatus is shown in fig. 8, and the apparatus includes a detection module 81, a network connection module 82, and a display module 83, where:
the detection module 81 is configured to detect an operation of a user requesting close-range networking with a target group, where the target group includes a first terminal and at least two second terminals. The network connection module 82 is configured to establish a short-distance network connection with the second terminal after the detection module 81 detects that the user requests an operation of performing short-distance networking with a target group. A display module 83, configured to display an instant messaging interface for communicating with a user of the second terminal after the network connection module 82 establishes the short-distance network connection with the second terminal.
The network connection module 82 may be specifically configured to: and automatically establishing short-distance network connection with the second terminal.
The short-distance network connection can be one of the following connection modes: bluetooth connection, NFC, WLAN direct connection, WLAN hotspot connection.
The apparatus 80 may also include a transceiver module 84. The transceiver module 84 is configured to broadcast a first central point election message, where the first central point election message carries at least one of the following information: the equipment identity identification of the first terminal, the networking capability of the first terminal and the time for the first terminal to send the first central point election message, wherein the first central point election message is used for informing a receiving end that the first terminal is in a to-be-networked state. And receiving a second central point election message broadcasted by the second terminal, wherein the second central point election message carries at least one of the following information: the equipment identity identification of the second terminal, the networking capability of the second terminal and the time for the second terminal to send the second central point election message, wherein the second central point election message is used for informing a receiving end that the second terminal is in a to-be-networked state. The network connection module 82 may be specifically configured to: determining whether the first terminal is an access point according to a preset rule and the second center point election message received by the transceiver module 84. If it is determined that the first terminal is an access point, the transceiver module 84 may be further configured to broadcast a first center point creation message, where the second terminal is connected to the first terminal as an access end, and the first center point creation message is used to notify a receiving end that the first terminal is an access point. The transceiver module 84 may be further configured to receive a second centroid creating message broadcast by the access point if it is determined that the access point is not the access point. The network connection module 82 may be further configured to, after the transceiver module 84 receives a second center point creation message broadcasted by an access point, serve as an access end to connect to the access point, where other second terminals in the target group except the access point access the access point, and the second center point creation message is used to notify a receiving end that a terminal sending the second center point creation message is an access point.
The apparatus 80 may also include a communication module 85. The communication module 85 is configured to communicate with any second terminal serving as an access terminal through the access point after the network connection module 82 establishes a short-range network connection with the second terminal.
The apparatus 80 may also include a determination module 86. The transceiver module 84 may be further configured to receive a third center point creation message broadcasted by an access point of a second network group after the network connection module 82 establishes a short-distance network connection with the second terminal, where the third center point creation message is used to notify a receiving end that the terminal sending the third center point creation message is the access point of the second network group, and the third center point creation message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The determining module 86 is configured to determine an access point of a third network group according to a preset rule and the third center point creation message received by the transceiver module 84, where the third network group is a network group obtained by combining a first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. If the determining module 86 determines that the access point of the third network group is the access point of the second network group, the network connecting module 82 may also be configured to connect the first terminal serving as the access end to the access point of the second network group. If the determining module 86 determines that the access point of the third network group is the access point of the first network group, the access point of the second network group is connected to the access point of the first network group as an access end.
In a possible implementation manner, the transceiver module 84 may be further configured to receive a central point connection message broadcasted by an access end of a second network group after the network connection module 82 establishes a short-range network connection with the second terminal, where the central point connection message is used to notify a receiving end that the terminal sending the central point connection message has accessed an access point of the second network group, and the central point connection message carries at least one of the following information: the device identity of the access point of the second network group, and the networking capability of the access point of the second network group, wherein the second network group is obtained after at least two third terminals establish close-range network connection. The determining module 86 may be further configured to determine an access point of a third network group according to a preset rule and the center point connection message received by the transceiver module 84, where the third network group is a network group obtained by combining a first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal. If the determining module 86 determines that the access point of the third network group is the access point of the second network group, the network connecting module 82 may be further configured to be an access point connected to the access point of the second network group. If the determining module 86 determines that the access point of the third network group is the access point of the first network group, the access point of the second network group is connected to the access point of the first network group as an access end.
The apparatus 80 may also include an acquisition module 87. An obtaining module 87, configured to obtain the number of access terminals in the second network group before the network connection module 82 is used as an access terminal to connect to an access point of the second network group. The determining module 86 may be further configured to determine a connection mode of the access point that needs to be connected to the second network group according to the number of the access terminals in the second network group and the number of the access terminals in the first network group. The network connection module 82, when serving as an access end connected to the access point of the second network group, may specifically be configured to: and connecting to the access points of the second network group according to the determined connection mode.
In a possible implementation manner, if the first terminal is an access point of the first network group. The determining module 86, when determining the connection mode of the access point that needs to be connected to the second network group according to the number of the access terminals in the second network group and the number of the access terminals in the first network group received by the transceiver module 84, may specifically be configured to: and if the sum of the number of the access ends in the first network group and the number of the access ends in the second network group is greater than a preset value, the WIFI STA serves as an access point for connecting the WIFI STA to the second network group, and network connection between the WIFI STA and the access ends in the first network group is maintained. Or, if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, the access point is used as the access point where the network group client GC is connected to the second network group, and the network connection with the access terminals in the first network group is disconnected.
In another possible implementation manner, if the first terminal is an access end of the first network group. The determining module 86, when determining the connection mode of the access point that needs to be connected to the second network group according to the number of the access terminals in the second network group and the number of the access terminals in the first network group, may specifically be configured to: if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is greater than a preset value, sending a merging message to the access point of the first network group through the transceiver module 84, where the merging message is used to indicate that the access point of the first network group is connected to the access point of the second network group as a WIFI STA. Or if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, connecting the GC to the access point of the second network group, and disconnecting the network connection with the access point of the first network group.
The division of the modules in the embodiments of the present application is schematic, and only one logical function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in each embodiment of the embodiments of the present application may be integrated in one processor, may also exist alone physically, or may also integrate two or more modules in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
When implemented by hardware, as shown in fig. 9, a schematic structural diagram of a first terminal provided in the embodiment of the present application is shown. The first terminal 100 includes a display device 110, a processor 120, and a memory 130. The memory 130 may be used to store software programs and data, and the processor 120 executes various functional applications and data processing of the first terminal 100 by executing the software programs and data stored in the memory 130, for example, the processor 120 may perform other operations besides transmitting and receiving messages and displaying an instant messaging interface in the methods described in fig. 2 to 7B, such as step S202 in fig. 2, step S502 in fig. 5, step S504, and the like. The memory 130 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system program, an application program required for at least one function (e.g., establishing a short-range network connection with the second terminal, etc.), and the like; the storage data area may store data acquired according to the first terminal 100 (such as a central point election message received by the first terminal 100), and the like. Further, the memory 130 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The processor 120 is a control center of the first terminal 100, connects various parts of the entire first terminal using various interfaces and lines, and performs various functions of the first terminal 100 by running or executing software programs and/or data stored in the memory 130, thereby performing overall monitoring of the first terminal. The processor 120 may include one or more general processors, and may further include one or more Digital Signal Processors (DSPs), MCUs, or the like, for performing relevant operations to implement the technical solutions provided in the embodiments of the present application.
The first terminal 100 may further include an input device 140 for receiving input numerical information, character information, or contact touch operation/non-contact gesture, and generating signal input related to user setting and function control of the first terminal 100, etc. Specifically, in the embodiment of the present application, the input device 140 may include a touch panel 141. The touch panel 141, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 141 or on the touch panel 141 using any suitable object or accessory such as a finger or a stylus) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 141 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 120, and can receive and execute commands sent by the processor 120. For example, a user clicks an icon or legend for requesting a short-range networking with a finger on the touch panel 141, the touch detection device detects the signal caused by the click, transmits the signal to the touch controller, the touch controller converts the signal into a coordinate and transmits the coordinate to the processor 120, the processor 120 determines an operation (open) to be performed on the icon or legend according to the coordinate and the type of the signal (single click or double click), then determines a memory space required to be occupied for performing the operation, and if the memory space required to be occupied is smaller than a free memory, starts to establish a short-range network connection with the second terminal.
The touch panel 141 can be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 141, the input device 140 may also include other input devices 142, and the other input devices 142 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., control keys, switch keys, etc.), and the like.
The display device 110 comprises a display panel 111 for displaying an instant messaging interface for communicating with a user of the second terminal. Information input by the user or information provided to the user, various menu interfaces of the first terminal 100, and the like may also be provided. Alternatively, the display panel may be configured in the form of a Liquid Crystal Display (LCD) or an organic light-emitting diode (OLED) to configure the display panel 111. In some other embodiments, the touch panel 141 can cover the display panel 111 to form a touch display screen.
In addition to the above, the first terminal 100 may further include a power supply 150 for supplying power to other modules. The wearable smart device 100 may further include a transceiver 160, and the transceiver 160 is configured to perform operations of transceiving messages in the methods described in fig. 2 to 7B, such as broadcasting a central point election message, receiving a central point connection message sent by a second terminal, and the like. The transceiver 160 may include an NFC module 161 configured to perform near field communication with other devices, a bluetooth module 162 configured to perform bluetooth communication with other devices, a Radio Frequency (RF) circuit 163 configured to perform network communication with a wireless network device, and a WLAN module 164 configured to perform WLAN direct connection communication with other devices or WIFI connection communication with other devices. The first terminal 100 may also include a speaker 170 for playing music, voice prompts, or sounding prompt tones, etc.
The embodiment of the present invention further provides a computer-readable storage medium, which is used for storing computer software instructions required to be executed for executing the processor, and which contains a program required to be executed for executing the processor.
An embodiment of the present invention further provides a chip, where the chip includes the communication interface and the processor, and is used to support a terminal to implement any one of the methods described in the embodiments shown in fig. 2 to 7B.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application 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, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are intended to include such modifications and variations as well.

Claims (20)

1. A networking method, comprising:
the method comprises the steps that a first terminal detects the operation of close-range networking of a user request and a target group, wherein the target group comprises the first terminal and at least two second terminals;
the first terminal and the second terminal establish close range network connection;
the first terminal displays an instant messaging interface for communicating with a user of the second terminal;
the first terminal and the second terminal establish a short-distance network connection, and the method comprises the following steps:
the first terminal broadcasts a first central point election message, wherein the first central point election message carries at least one of the following information: the equipment identity of the first terminal, the networking capability of the first terminal and the time for the first terminal to send the first central point election message, wherein the first central point election message is used for informing a receiving terminal that the first terminal is in a to-be-networked state;
the first terminal receives a second center point election message broadcasted by the second terminal, wherein the second center point election message carries at least one of the following information: the equipment identity of the second terminal, the networking capability of the second terminal and the time for the second terminal to send the second central point election message, wherein the second central point election message is used for informing a receiving terminal that the second terminal is in a to-be-networked state;
the first terminal determines whether the first terminal is an access point according to a preset rule and the second central point election message broadcast by the second terminal;
if the first terminal determines that the first terminal is the access point, a first center point creation message is broadcasted, the second terminal serves as an access end and is connected to the first terminal, and the first center point creation message is used for informing a receiving end that the first terminal is the access point;
if the first terminal determines that the first terminal is not the access point, the first terminal is used as an access terminal to be connected to the access point after receiving a second center point creation message broadcasted by the access point, other second terminals except the access point in the target group are accessed to the access point, and the second center point creation message is used for informing a receiving terminal that the terminal sending the second center point creation message is the access point.
2. The method of claim 1, wherein the first terminal establishing the short-range network connection with the second terminal comprises:
and the first terminal automatically establishes short-distance network connection with the second terminal.
3. The method of claim 1, wherein the short-range network connection is one of: bluetooth connection, WLAN direct connection of a wireless local area network and WLAN hotspot connection.
4. The method of claim 1, wherein after the first terminal establishes the short-range network connection with the second terminal, further comprising:
the first terminal is an access end, and the first terminal communicates with any second terminal serving as the access end through the access point.
5. The method of claim 1, wherein after the first terminal establishes the close range network connection with the second terminal, the method further comprises:
the first terminal receives a third center point creation message broadcasted by an access point of a second network group, the third center point creation message is used for notifying a receiving end that a terminal sending the third center point creation message is the access point of the second network group, and the third center point creation message carries at least one of the following information: the device identity of the access point of the second network group and the networking capability of the access point of the second network group are obtained after at least two third terminals establish close-range network connection;
the first terminal determines an access point of a third network group according to a preset rule and the third center point creation message, wherein the third network group is obtained by combining a first network group and a second network group, and the first network group is obtained by establishing a short-distance network connection between the first terminal and the second terminal;
if the access point of the third network group is the access point of the second network group, the first terminal is used as an access end to be connected to the access point of the second network group;
and if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
6. The method of claim 1, wherein after the first terminal establishes the short-range network connection with the second terminal, further comprising:
the first terminal receives a center point connection message broadcasted by an access end of a second network group, the center point connection message is used for informing a receiving end that a terminal sending the center point connection message has accessed an access point of the second network group, and the center point connection message carries at least one of the following information: the device identity of the access point of the second network group and the networking capability of the access point of the second network group are obtained after at least two third terminals establish close-range network connection;
the first terminal determines an access point of a third network group according to a preset rule and the central point connection message, wherein the third network group is obtained by combining a first network group and the second network group, and the first network group is obtained by establishing short-distance network connection between the first terminal and the second terminal;
if the access point of the third network group is the access point of the second network group, the first terminal is used as an access end to be connected to the access point of the second network group;
and if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
7. The method of claim 5 or 6, wherein before the first terminal connects as an access terminal to an access point of the second network group, further comprising:
the first terminal obtains the number of the access terminals in the second network group;
the first terminal determines the connection mode of the access point which needs to be connected to the second network group according to the number of the access ends in the second network group and the number of the access ends in the first network group;
the first terminal is connected to the access point of the second network group as an access terminal, and comprises:
the first terminal is connected to the access points of the second network group according to the determined connection mode.
8. The method of claim 7, wherein the first terminal is an access point of the first network group;
the first terminal determines a connection mode of the access point which needs to be connected to the second network group according to the number of the access terminals in the second network group and the number of the access terminals in the first network group, and the method includes:
if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is greater than a preset value, the first terminal is used as a wireless fidelity client WIFI STA to be connected to an access point of the second network group and keeps network connection with the access terminals in the first network group; or
If the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, the first terminal serves as a network group client GC to be connected to an access point of the second network group, and network connection between the first terminal and the access terminals in the first network group is disconnected.
9. The method of claim 8, wherein the first terminal is an access terminal of the first network group;
the first terminal determines a connection mode of the access point which needs to be connected to the second network group according to the number of the access terminals in the second network group and the number of the access terminals in the first network group, and the method includes:
if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is greater than a preset value, the first terminal sends a merging message to an access point of the first network group, wherein the merging message is used for indicating the access point of the first network group to be used as an access point of a WIFI STA to be connected to the second network group; or
And if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, the first terminal is used as a GC to be connected to an access point of the second network group, and network connection between the first terminal and the access point of the first network group is disconnected.
10. A first terminal, comprising:
the system comprises a processor, a first terminal and a second terminal, wherein the processor is used for detecting the operation of close-range networking of a user request and a target group, and the target group comprises the first terminal and at least two second terminals; and establishing a close range network connection with the second terminal;
the display screen is used for displaying an instant communication interface after the processor establishes the short-distance network connection with the second terminal and is used for communicating with a user of the second terminal;
the first terminal further comprises a transceiver;
the transceiver is used for broadcasting a first central point election message and receiving a second central point election message broadcast by the second terminal; the first election by central point message carries at least one of the following information: the equipment identity of the first terminal, the networking capability of the first terminal and the time for the first terminal to send the first central point election message, wherein the first central point election message is used for informing a receiving terminal that the first terminal is in a to-be-networked state; the second election message carries at least one of the following information: the equipment identity of the second terminal, the networking capability of the second terminal and the time for the second terminal to send the second central point election message, wherein the second central point election message is used for informing a receiving terminal that the second terminal is in a to-be-networked state;
the processor, when establishing a short-range network connection with the second terminal, is specifically configured to:
determining whether the first terminal is an access point according to a preset rule and the second central point election message received by the transceiver;
if the transceiver is determined to be the access point, the transceiver is further configured to broadcast a first center point creation message, the second terminal is connected to the first terminal as an access end, and the first center point creation message is used to notify a receiving end that the first terminal is the access point;
if the transceiver is determined not to be the access point, the transceiver is also used for receiving a second center point creation message broadcasted by the access point, and the second center point creation message is used for informing a receiving end that a terminal sending the second center point creation message is the access point; the processor is further configured to connect to the access point as an access end after the transceiver receives the second center point creation message, and access the access point by other second terminals in the target group except the access point.
11. The first terminal of claim 10, wherein the first terminal further comprises a touch screen;
the touch screen is used for triggering an instruction for requesting close-range networking with a target group under the operation of a user;
the processor, when detecting an operation of a user requesting close-range networking with a target group, is specifically configured to:
and receiving the instruction triggered by the touch screen.
12. The first terminal of claim 10, wherein the processor, when establishing the short-range network connection with the second terminal, is specifically configured to:
and automatically establishing short-distance network connection with the second terminal.
13. The first terminal of claim 10, wherein the short-range network connection is one of: bluetooth connection, WLAN direct connection, WLAN hotspot connection.
14. The first terminal of claim 10, wherein the first terminal is an access terminal, the first terminal further comprising a transceiver;
and the transceiver is used for communicating with any second terminal serving as an access end through the access point after the processor establishes the short-distance network connection with the second terminal.
15. The first terminal of claim 10, wherein the first terminal is an access terminal, the first terminal further comprising a transceiver;
the transceiver is configured to receive a third center point creation message broadcasted by an access point of a second network group after the processor establishes a short-distance network connection with the second terminal, where the third center point creation message is used to notify a receiving end that a terminal sending the third center point creation message is the access point of the second network group, and the third center point creation message carries at least one of the following information: the device identity of the access point of the second network group and the networking capability of the access point of the second network group are obtained after at least two third terminals establish close-range network connection;
the processor is further configured to determine an access point of a third network group according to a preset rule and the third center point creation message received by the transceiver, where the third network group is a network group obtained by combining a first network group and the second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal;
if the access point of the third network group is the access point of the second network group, the processor is further configured to serve as an access end to connect to the access point of the second network group;
and if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
16. The first terminal of claim 10, wherein the first terminal is an access terminal, the first terminal further comprising a transceiver;
the transceiver is configured to receive a central point connection message broadcasted by an access end of a second network group after the processor establishes a short-distance network connection with the second terminal, where the central point connection message is used to notify a receiving end that a terminal sending the central point connection message has accessed an access point of the second network group, and the central point connection message carries at least one of the following information: the device identity of the access point of the second network group and the networking capability of the access point of the second network group are obtained after at least two third terminals establish close-range network connection;
the processor is further configured to determine an access point of a third network group according to a preset rule and the central point connection message, where the third network group is a network group obtained by combining a first network group and a second network group, and the first network group is a network group obtained by establishing a short-distance network connection between the first terminal and the second terminal;
if the access point of the third network group is the access point of the second network group, the processor is further configured to serve as an access end to connect to the access point of the second network group;
and if the access point of the third network group is the access point of the first network group, the access point of the second network group is used as an access end to be connected to the access point of the first network group.
17. The first terminal of claim 15 or 16, wherein said processor is further configured to obtain the number of access points in the second network group before connecting as access points to the access points of the second network group; determining a connection mode of the access point which needs to be connected to the second network group according to the number of the access ends in the second network group and the number of the access ends in the first network group;
the processor, when connected to the access point of the second network group as an access end, is specifically configured to:
and connecting to the access points of the second network group according to the determined connection mode.
18. The first terminal of claim 17, wherein the first terminal is an access point of the first network group;
the processor, when determining a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group, is specifically configured to:
if the sum of the number of the access ends in the first network group and the number of the access ends in the second network group is larger than a preset value, the WIFI STA serves as an access point for connecting the WIFI STA to the second network group, and network connection between the WIFI STA and the access ends in the first network group is maintained; or
And if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, connecting the first network group to an access point of the second network group as a network group client GC, and disconnecting the network connection with the access terminals in the first network group.
19. The first terminal of claim 17, wherein the first terminal is an access terminal of the first network group;
the processor, when determining a connection mode of an access point that needs to be connected to the second network group according to the number of access ends in the second network group and the number of access ends in the first network group, is specifically configured to:
if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is greater than a preset value, controlling the transceiver to send a combined message to an access point of the first network group, wherein the combined message is used for indicating the access point of the first network group to be used as an access point of a WIFI STA to be connected to the second network group; or
And if the sum of the number of the access terminals in the first network group and the number of the access terminals in the second network group is less than or equal to the preset value, connecting the GC to an access point of the second network group, and disconnecting the network connection with the access point of the first network group.
20. A computer storage medium having computer-executable instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 9.
CN201880044571.1A 2018-04-12 2018-07-26 Networking method and equipment Active CN110832947B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201810325466 2018-04-12
CN2018103254667 2018-04-12
PCT/CN2018/097288 WO2019196253A1 (en) 2018-04-12 2018-07-26 Networking method and device

Publications (2)

Publication Number Publication Date
CN110832947A CN110832947A (en) 2020-02-21
CN110832947B true CN110832947B (en) 2021-08-31

Family

ID=68163876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880044571.1A Active CN110832947B (en) 2018-04-12 2018-07-26 Networking method and equipment

Country Status (2)

Country Link
CN (1) CN110832947B (en)
WO (1) WO2019196253A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901767A (en) * 2020-08-05 2020-11-06 杭州叙简科技股份有限公司 System of POC ad hoc network of law enforcement recorder
CN112055365B (en) * 2020-09-16 2024-04-09 北京数码视讯技术有限公司 Method and device for terminal networking, terminal and readable storage medium
CN115802516A (en) * 2021-09-10 2023-03-14 华为技术有限公司 Wi-Fi direct communication method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118101A (en) * 2013-01-25 2013-05-22 深圳清华大学研究院 Information sharing method used for mobile terminals
CN103118337A (en) * 2011-11-17 2013-05-22 中兴通讯股份有限公司 Information processing method and device for Bluetooth device and Bluetooth device thereof
CN103686586A (en) * 2013-12-11 2014-03-26 联想(北京)有限公司 Information processing method and electronic equipment
CN103873342A (en) * 2012-12-11 2014-06-18 腾讯科技(深圳)有限公司 Method, terminal and system for joining social group
CN104333888A (en) * 2014-10-27 2015-02-04 中央民族大学 Self-organized instant messaging method based on Wi-Fi direct connection
CN106937239A (en) * 2015-12-29 2017-07-07 天津三星通信技术研究有限公司 Set up and closely connect and control the method and apparatus that electric terminal sets up the connection
CN107493563A (en) * 2017-08-31 2017-12-19 大唐终端技术有限公司 A kind of bluetooth realizes the method and system of group's intercommunication

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10387918B2 (en) * 2009-03-03 2019-08-20 Mobilitie, Llc System and method for retail sales using wireless communication devices in a wireless communication network
KR101842047B1 (en) * 2012-03-15 2018-03-26 삼성전자주식회사 Method and apparatus for group profile management in wi-fi direct communication system
US9055390B2 (en) * 2012-10-19 2015-06-09 Hong Kong Applied Science And Technology Research Institute Co., Ltd. Apparatus, system, and method for peer group formation for mobile devices by proximity sensing
SE539593C2 (en) * 2014-10-08 2017-10-17 Crunchfish Ab Communication device for improved sharing of content

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118337A (en) * 2011-11-17 2013-05-22 中兴通讯股份有限公司 Information processing method and device for Bluetooth device and Bluetooth device thereof
CN103873342A (en) * 2012-12-11 2014-06-18 腾讯科技(深圳)有限公司 Method, terminal and system for joining social group
CN103118101A (en) * 2013-01-25 2013-05-22 深圳清华大学研究院 Information sharing method used for mobile terminals
CN103686586A (en) * 2013-12-11 2014-03-26 联想(北京)有限公司 Information processing method and electronic equipment
CN104333888A (en) * 2014-10-27 2015-02-04 中央民族大学 Self-organized instant messaging method based on Wi-Fi direct connection
CN106937239A (en) * 2015-12-29 2017-07-07 天津三星通信技术研究有限公司 Set up and closely connect and control the method and apparatus that electric terminal sets up the connection
CN107493563A (en) * 2017-08-31 2017-12-19 大唐终端技术有限公司 A kind of bluetooth realizes the method and system of group's intercommunication

Also Published As

Publication number Publication date
CN110832947A (en) 2020-02-21
WO2019196253A1 (en) 2019-10-17

Similar Documents

Publication Publication Date Title
US9510163B2 (en) Method and apparatus for managing a group profile in a Wi-Fi direct communication system
RU2572615C2 (en) Method for wireless communication in local domain and terminal supporting same
KR101597177B1 (en) Context awareness proximity-based establishment of wireless communication connection
KR101742985B1 (en) The method of determining group owner in peer to peer network and the device thereof
CN110832947B (en) Networking method and equipment
EP2651179B1 (en) Method of reducing a waiting time when cancelling a connection and an electronic device therefor
CN112118539B (en) Method and device for device information interaction between terminals
KR102249413B1 (en) Image sharing method and electronic device
EP2761937A1 (en) Identification-assisted wireless network connections
WO2015058506A1 (en) Multi-screen interaction method, apparatus and system
US20230239673A1 (en) Device for wireless communication with other devices
JP7049086B2 (en) Communication equipment, control methods, and programs
EP2756629B1 (en) Method and system for searching for object in network
US9830116B2 (en) Printing device discovery
EP2856728A1 (en) A method, a server and a computer program for local discovery
US11234113B2 (en) Electronic device and method for providing service by electronic device
JP5874825B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONTROL PROGRAM, AND COMMUNICATION CONTROL METHOD
US20170103009A1 (en) Monitoring a device status for an application
CN114007202A (en) Method for establishing binding relationship and related equipment
CN114071652A (en) Method for establishing binding relationship and related equipment
CN110213319B (en) Access method and device, terminal, server and storage medium
CN113873685B (en) Method, device and equipment for establishing WiFi direct connection
CN117412276A (en) Bluetooth connection method, device, medium and equipment
CN116938701A (en) Module configuration method, device, computer readable storage medium and computer equipment
CN117768926A (en) Multi-device networking method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant