Device networking method and device, device, and storage medium

In P2P networking, the new device automatically re-networks and creates a group owner identity, solving the problem of networking flexibility and convenience caused by device identity distinction in the existing technology, and realizing the direct connection and networking requirements between the new device and the target device.

CN115460220BActive Publication Date: 2025-04-08HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110559921.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2025-04-08
Estimated Expiration
2041-05-21

AI Technical Summary

Technical Problem

In the existing P2P networking technology, devices distinguish different identities between group owners (GO) and group clients (GC), resulting in users needing to perceive the existence of GO and GC identities in multi-device connection scenarios, which reduces the flexibility and convenience of networking.

Method used

In a one-to-one network, the new device automatically re-networks, creates the group owner identity, and connects with the original GO device and the new device to form a new network, thereby meeting the direct networking needs of the new device and the target device.

Benefits of technology

It realizes automatic re-organization of networking in multi-device connection scenarios to meet the direct networking needs of new equipment and target equipment, and improves the flexibility and convenience of networking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115460220B_ABST
    Figure CN115460220B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a device networking method and apparatus, device, and storage medium, the method comprising: if networking request information is obtained, then sending a reorganization network request message to the first device, so that the first device deletes the first network formed by the one-to-one networking of the present device and the first device, wherein the first device is the group owner of the first network, and the present device is the group client of the first network; after disconnecting from the first network, creating a group owner identity, and sending network information to the first device and the second device that sends the networking request information respectively, so that the first device and the second device are connected to the present device respectively according to the network information to form a second network. In the case where a new device applies to join an existing one-to-one network, and the target device of the new device is a GC device in the one-to-one network, automatic re-networking can be performed to meet the needs of direct networking between the new device and the target device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of P2P networking technology, and in particular to a device networking method and apparatus, equipment, and storage medium. Background Art

[0002] Based on Bluetooth Low Energy (BLE) and WIFI peer to peer (P2P) technology, the one-to-one terminal communication networking capability is already very mature. However, due to the constraints of P2P protocol specifications, networking devices distinguish between different identities of group owners (GO) and group clients (GC). Figure 1 As shown in the figure, only GO devices can connect to multiple GC devices, while GC devices can only connect to one GO device. Therefore, if there are more device connection scenarios, we need to let users know the existence of GO and GC identities, which greatly reduces the flexibility and convenience of networking and reduces the user experience. Summary of the invention

[0003] The embodiment of the present invention provides a device networking method and apparatus, equipment, and storage medium. Through the device networking method, when a new device applies to join an existing one-to-one network and the target device of the new device is a GC device in the one-to-one network, the network can be automatically re-established to meet the demand for direct connection between the new device and the target device.

[0004] In a first aspect, an embodiment of the present invention provides a device networking method, comprising: if networking request information is obtained, sending a reorganization network request message to a first device, so that the first device deletes a first network formed by a one-to-one group networking between the present device and the first device, wherein the first device is a group owner of the first network, and the present device is a group client of the first network; and after disconnecting from the first network, creating a group owner identity, and sending network information to the first device and the second device that sends the networking request information respectively, so that the first device and the second device are respectively connected to the present device according to the network information to form a second network, wherein in the second network the present device is simultaneously connected to the first device and the second device.

[0005] Furthermore, after sending a network reorganization request message to the first device to make the first device delete a first network formed by a one-to-one group network between the device and the first device, and before creating a group owner identity, it also includes: cutting off a network connection with the first network.

[0006] Furthermore, the network information includes an identifier of the second network and a key of the second network.

[0007] Furthermore, after the device is started, a first status broadcast message of the device is continuously broadcast; wherein the first status broadcast message includes a device identification of the device, a device identity of the device, and a device ID of the first device.

[0008] In a second aspect, an embodiment of the present application also provides a device networking method, including: sending a networking request message to a target device, wherein the target device is a group client in a target network; and obtaining network information sent by the target device, and directly connecting to the target device based on the network information.

[0009] Furthermore, before sending the networking request information to the target device, it also includes: determining that the number of group clients in the target network where the target device is located is less than a set number.

[0010] Furthermore, before determining that the number of group clients in the network where the target device is located is less than a set number, it also includes: obtaining a first status broadcast message broadcast by the target device; and determining whether the number of group clients in the target network is less than a set number based on the first status broadcast message; wherein the first status broadcast message includes a device identifier of the target device, a device identity of the target device, and a device ID of a group owner device in the target network.

[0011] Furthermore, determining whether the number of group clients in the network where the target device is located is less than a set number based on the status broadcast message includes: obtaining a second status broadcast message broadcast by the group owner device based on the device ID of the group owner device in the target network; determining whether the number of group clients in the target network is less than a set number based on the second status broadcast message; wherein the second status broadcast information includes the device identification of the group owner device, the device identity of the group owner device and the number of group clients connected to the group owner device; wherein the target device is one of the group clients connected to the group owner device.

[0012] In a third aspect, another embodiment of the present application further provides a device networking apparatus, comprising: a processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, it implements the device networking method provided in the first aspect or the second aspect.

[0013] In one implementation, the device networking apparatus provided in the second aspect may be a chip.

[0014] In a fourth aspect, another embodiment of the present application further provides a chip, wherein the chip is connected to a memory, wherein the memory stores at least one program or instruction, and when the program or instruction is executed by the chip, the device networking method provided in the first aspect or the second aspect is implemented.

[0015] In a fifth aspect, another embodiment of the present application further provides a device, the device comprising a device body and the device networking apparatus provided in the third aspect. In another implementation, the device may comprise a device body and the chip provided in the fourth aspect.

[0016] In a sixth aspect, another embodiment of the present application further provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the device networking method of the first aspect or the device networking method provided by the second aspect is implemented.

[0017] Through the above technical solution, after receiving the networking request information, the present device (currently GC) in the first network formed by a one-to-one group networking can send a reorganization network request message to the first device (the current GO of the first network) in the first network, so that the first device (the current GO of the first network) deletes the first network. Further, after the present device disconnects from the first network, a group owner (GO) identity is created, and network information is sent to the first device (currently the initial identity) and the second device (the device that sends the networking request information) as the group owner, so that the first device and the second device are connected to the present device according to the network information to form a second network, wherein in the second network, the present device (the current GO of the second network) is connected to the first device (the current GC of the second network) and the second device (the current GC of the second network) at the same time. Through this solution, when a new device applies to join an existing one-to-one network, and the target device of the new device is a GC device in the one-to-one network, the network can be automatically reorganized to meet the needs of direct networking between the new device and the target device. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 It is a P2P network architecture diagram in the prior art;

[0020] Figure 2 A schematic diagram of different needs of users using mobile phones to project screens in the prior art;

[0021] Figure 2a A schematic diagram of two mobile phones projecting screens onto the same TV in the prior art;

[0022] Figure 3 A one-to-one network flow chart provided for an embodiment of the present application;

[0023] Figure 4 A schematic diagram of device networking requirements provided for yet another embodiment of the present application;

[0024] Figure 5 A schematic diagram of a network of three devices provided for an embodiment of the present application;

[0025] Figure 6 A flowchart of a device requesting to join a P2P network provided in yet another embodiment of the present application;

[0026] Figure 6a A schematic diagram of a network of three devices provided for another embodiment of the present application;

[0027] Figure 7a A schematic diagram of a direct connection network for adding mobile phone screen projection provided in yet another embodiment of the present application;

[0028] Figure 7b A schematic diagram of a mobile phone provided in another embodiment of the present application being directly connected to a TV and a smart speaker for networking;

[0029] Figure 8 A schematic diagram of the structure of a device networking apparatus provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] Restricted by the P2P protocol specifications, users need to perceive the GO and GC identities in the P2P network, and the user's device can only be directly connected to the GO device in the P2P network. If the user's target device is a GC device in the P2P network, the user's device cannot be directly connected to the target device (GC device) in the P2P network.

[0032] For example, Figure 2 A schematic diagram of different needs of users using mobile phone screen projection in the prior art, such as Figure 2As shown, the scene may include a mobile phone 201 and a TV 202. In conventional operation, the mobile phone 201 may request to be networked with the TV 202, and then the mobile phone 201 is connected to the TV 202 for screen projection. To meet the specific needs of users, two mobile phones may also be supported to be connected to the same TV for screen projection at the same time. Figure 2a Schematic diagram of two mobile phones casting screens to the same TV in the prior art, such as Figure 2a As shown, mobile phone 201a (mobile phone A) and mobile phone 201b (mobile phone B) can be networked with TV 202, and mobile phone 201a (mobile phone A) and mobile phone 201b (mobile phone B) are simultaneously connected to TV 202 for screen projection, wherein TV 202 can simultaneously display the projection images of mobile phone 201a (mobile phone A) and mobile phone 201b (mobile phone B).

[0033] In the current implementation, the application layer defines the identity of TV 202 as GO, and then no matter whether it is a mobile phone or the two mobile phones mentioned above, they are connected to TV 202 (GO) as GC. However, the user cannot perceive the identity information of the mobile phone and TV 202, that is, it is impossible to perceive which device is GO and which device is GC. In this case, the user cannot realize that the mobile phone (GC) is projected on TV 202 and at the same time connect the mobile phone (GC) to the speaker 203 for sound delivery.

[0034] In summary, it can be determined that in the existing technical solutions, the upper-layer service or the user needs to explicitly specify the device identity (GO identity, GC identity), and after the device identity is determined, the device identity cannot be switched to meet the user's networking needs.

[0035] In order to overcome the above technical problems, the embodiment of the present application provides a device networking method. When the device networking method is used to perform device networking, the user does not need to clarify the identity of the device in the target network, and can directly request to network with the target device in the target network. When the GC device in the target network determines that it is the target device requested for direct networking, after deleting the current network and switching the device identity, the target device can re-network with the GO identity to respectively connect the original GO device and the above-mentioned user's device, so as to meet the user's needs for direct networking with the target device in the target network through its own device.

[0036] The device networking method provided in the embodiment of the present application is to control the networking of a third device joining the one-to-one network after the one-to-one network is formed. Figure 3 A one-to-one network flow chart provided for an embodiment of the present application, such as Figure 3 As shown, the one-to-one group network process may include the following steps:

[0037] Step 301: Device A requests to connect to device B.

[0038] Step 302: Device A creates a GO identity.

[0039] Step 303: Device A sends an M2 message to device B as a GO.

[0040] Step 304: Device B completes the connection with device A according to the M2 message, and device A and device B form a one-to-one network.

[0041] In the initial state, there is no networking between device A and device B, that is, the device identities of device A and device B are both initial identities (initial, INIT identities). In the initial state, device A and device B broadcast M1 messages with INIT identities.

[0042] Among them, the M1 message is a status broadcast message of the device. After each device is started, the M1 message can be continuously broadcast and sent through BLE. The M1 message may include the following information: the device ID, the device identity (Role), the GO device identity (PeerGO) connected to the device, and the number of GC devices connected to the device (GCNum). Through the M1 message, the devices can exchange and perceive the device status and device capabilities. Among them, the device identity in the M1 message of the device may include GO, GC or INIT. It can be determined whether the device has been networked based on the device identity. If the device identity is INIT, it is determined that the device is in the initial state and has not been networked; if the device identity is not INIT, it is determined that the device has been networked, and it can be further determined whether the device's identity in the network is GO or GC. If the device is not networked (Role = INIT), PeerGO and GCNum in the M1 message broadcast by the device are empty. If the device has been networked (Role = GO / GC), further, if the identity of the device in the network is GO, the PeerGO in the M1 message broadcast by the device is empty, and the number of GC devices connected to the device (Role = GO) can be displayed in GCNum. For example, GCNum = 1 means that the device has been connected to 1 GC device, and GCNum = 2 means that the device has been connected to 2 GC devices. If the identity of the device in the network is GC, the GCNum in the M1 message broadcast by the device is empty, and the device ID of the GO device connected to the device can be displayed in PeerGO.

[0043] like Figure 3As shown, in the specific implementation of steps 301 to 304, device A can initiate networking and connect to device B. Among them, device A can determine that the current device identity of device B is INIT through the M1 message broadcast by device B, so device A first creates a GO, uses itself as a GO device, and sends an M2 message to device B as a GO to request a connection. After receiving the M2 message sent by device A, device B connects to the network with device A and serves as a GC device in the GO network created by device A, completing one-to-one device networking.

[0044] Among them, the M2 message is a networking key message. Whether the GO device initiates networking and actively connects to the GC device, or the GC device actively initiates networking and requests to connect to the GO device, the GO device will eventually send the network key information of the device to the GC device to be connected through the M2 message. The M2 message may include the following information: Service Set Identifier (SSID), GO network key. After receiving the M2 message sent by the GO device, the GC device can connect and join the GO network according to the SSID and GO network key.

[0045] After the one-to-one network is formed, the network control can be performed when a third device requests to join the one-to-one network. In the one-to-one network, device A is a GO device, device B is a GC device, and the third device (device C) requests to join the one-to-one network.

[0046] Figure 4 A schematic diagram of device networking requirements provided in another embodiment of the present application is shown in FIG. Figure 4 As shown, when device C in the initial state requests to join the one-to-one network (target network) formed by device A and device B, the target device that device C requests to directly connect to the network can be device A in the one-to-one network or device B in the one-to-one network.

[0047] If the target device of device C is device A, that is, device C sends an M3 message to device A to request to directly connect to device A and join the network. Since device A is the GO device in the network, device A (GO device) has the ability to connect to multiple GC devices at the same time, and device A can retain the current one-to-one network. The M3 message is a networking request message, and the M3 message includes the following information: the device ID of the GC device that initiates the networking request, and the device ID of the target device. Among them, the device ID of the target device can be obtained according to the M1 message broadcast by the target device.

[0048] Furthermore, after receiving the M3 message sent by device C, device A determines that it is a GO device, and can reply to device C with an M2 message to inform device C of the SSID and GO network key of the one-to-one network (formed by device A and device B). After receiving the M2 message replied by device A, device C can connect to join the GO network according to the SSID and GO network key therein, so as to form a network like Figure 5 The device A shown is connected to the three devices of device B and device C to form a network, so as to realize the direct connection network between device C and the target device (device A).

[0049] like Figure 4 As shown, if the target device of device C is device B, that is, device C sends an M3 message to device B to request to directly connect to device B and join the network. Since device B is a GC device in the network, and a GC device can only be connected to one GO device, in order to meet the direct networking requirements of device C and device B (currently a GC device), the network can be reorganized to achieve direct networking between device C and the target device (device B).

[0050] Figure 6 A flowchart of a device requesting to join a P2P network (a one-to-one network formed by connecting device A and device B) provided in yet another embodiment of the present application, Figure 6 The device networking method provided in the illustrated embodiment includes the following steps:

[0051] Step 601: Device C requests to connect to device B (GC device).

[0052] Step 602: Device C sends an M3 message to device B to request to connect to device B.

[0053] Step 603: Device B determines that it is a GC device and cannot be networked with device C directly.

[0054] Step 604: Device B sends an M4 message to device A (GO device) to request re-networking.

[0055] Step 605: After disconnecting from the network connection with device A, device B creates a GO identity and sends M2 messages to device A and device C respectively as the GO identity.

[0056] Step 606: Device A and device C are respectively connected to device B according to the M2 message to form a second network.

[0057] In a one-to-one network (first network) formed by connecting device A and device B, device A is a GO device in the first network, and device B is a GC device in the first network. Device C is an INIT device to be directly connected to device B for networking.

[0058] After each device is started, it can continuously broadcast and send M1 messages (status broadcast messages) via BLE. Among them, device B continuously broadcasts the first status broadcast message via BLE, and the first status broadcast message may include: the device ID of device B, the current device identity (GC) of device B, and the device ID (PeerGO) of the GO device in the first network, that is, the device ID of device A).

[0059] Device A continuously broadcasts a second status broadcast message via BLE, and the second status broadcast message may include: the device ID of device A, the current device identity of device A (GO), and the number of GC devices connected to the GO device in the first network (GCNum), that is, the number of GC devices connected to device A). Currently, device A (GO) is only connected to device B (GC), so GCNum=1 in the current second status broadcast message.

[0060] Device C continuously broadcasts a third state broadcast message through BLE, and the third state broadcast message may include: a device ID of device C and a current device identity (INIT) of device C.

[0061] In the specific implementation of step 601, device C attempts to directly connect to the target device (device B in the first network) to form a network. A request connection event can be generated in device C to request connection with device B. After generating the request connection event, device C determines whether the number of GC devices (GCNum) in the first network is less than the set number N, and continues to execute step 602 after determining that GCNum is less than N. If it is determined that GCNum is ≥N, the request connection event is terminated.

[0062] Specifically, device C can obtain the first status broadcast message broadcast by the target device (device B). Since the target device (device B) is a GC device in the first network, the number of GC devices in the first network cannot be known based on the first status broadcast message, but the device ID of the GO device in the first network can be obtained. Then, the second status broadcast message broadcast by the GO device (i.e., device A) can be obtained based on the device ID of the GO device in the first network, and whether the number of GC devices in the first network (GCNum) is less than the set number N can be determined based on the second status broadcast message.

[0063] In the specific implementation of step 602, after determining that the number of GC devices in the first network is less than the set number N, device C can send an M3 message to the target device (device B), and the M3 message can include the device ID of device C and the device ID of the target device (device B).

[0064] In the specific implementation of step 603, after receiving the M3 message sent by device C, device B determines that device C requests direct networking with its own device. Device B determines that it cannot directly network with device C based on its current identity (GC device) and needs to re-network, and executes step 604.

[0065] In the specific implementation of step 604, device B (GC device) sends an M4 message to device A (GO device) to request the reorganization of the current network (first network). The message M4 is a network reorganization request message. When the two devices (GO device, GC device) are successfully networked, the GC device can send an M4 message to the GO device to notify the GO device of network reorganization and delete the current existing network. The M4 message may include: the device ID of the GC device (device B) that initiates the network reorganization request and the device ID of the GO device (device A) in the current network.

[0066] In one implementation, after sending the M4 message to device A (GO device), device B may wait for device A (GO device) to complete the network disconnection with device B and the current network deletion operation before continuing to execute step 605 .

[0067] In another implementation, after sending the M4 message to device A (GO device), in order to quickly realize network reorganization, device B may actively cut off the network connection with the first network (ie, delete the GC), and then continue to execute step 605 .

[0068] It should be noted that during the network switching, the original two devices (GO device and GC device in the first network) will be disconnected for a certain period of time (in some measurement experiments, the interruption time is generally about 500ms). During this period, the user experience is maintained through caching and user interaction. In addition, the IP address of the device will inevitably change, and the application needs to perform relevant perception and processing.

[0069] In the specific implementation of step 605, after device B disconnects from the network connection with device A, device B can create a GO identity and send M2 messages to device A and device C respectively as the GO identity. After receiving the M2 message sent by device B, device A and device C respectively establish network connections with device B, and then device A and device C both serve as GC devices in the GO network created by device A, completing the networking (i.e., forming a second network).

[0070] Figure 6 The process of reorganizing the network provided by the illustrated embodiment is as follows Figure 6a As shown, the one-to-one group network of device A and device B is deleted, and device B is used as GO to create a second network, so that device A and device C are connected to device B respectively to form a three-device network of B to A and C.

[0071] The following uses the screen projection scenario as an example to describe the specific Figure 6 The device networking method provided by the illustrated embodiment.

[0072] Figure 7a A schematic diagram of a direct connection network for adding mobile phone screen projection is provided for another embodiment of the present application, such as Figure 7a As shown, mobile phone 701 and TV 702 have formed a one-to-one group network (first network), wherein in the first network, mobile phone 701 is a GO device and TV 702 is a GC device. When another mobile phone needs to cast the screen to TV 702, the mobile phone needs to be directly connected to the TV 702. In this scenario, there are two mobile phones at the same time. To distinguish the two mobile phones, they are marked as mobile phone 701a and mobile phone 701b respectively, wherein mobile phone 701a is a mobile phone in a one-to-one group network with TV 702 in the first network, and mobile phone 701b is another mobile phone requesting to join the screen casting.

[0073] Mobile phone 701b (INIT device) attempts to connect to TV 702, and obtains the first state broadcast message broadcast by TV 702 (GC device) to obtain the device ID of mobile phone 701a. And obtain the second state broadcast message broadcast by mobile phone 701a according to the device ID of mobile phone 701a to determine whether the number of GC devices in the target network (first network) is less than the set number N (N can be 2). That is, when mobile phone 701b determines that there is only one GC device in the first network, it sends an M3 message to TV 702 to request to connect to TV 702. After receiving the M3 message sent by mobile phone 701b, TV 702 determines that it is a GC device and cannot directly network with mobile phone 701b. TV 702 also sends an M4 message to mobile phone 701a to request re-networking. After receiving the M4 message, mobile phone 701a executes the operation of deleting the first network. In order to quickly achieve re-networking, TV 702 can actively cut off the network connection with mobile phone 701a and create a GO identity. The TV 702 sends M2 messages to the mobile phone 701a and the mobile phone 702b respectively as a GO, requesting the mobile phone 701a and the mobile phone 702b to form a network, and then the TV 702 completes the networking with the mobile phone 701a and the mobile phone 702b to form a second network.

[0074] Figure 7b A schematic diagram of a mobile phone directly connected to a TV and a smart speaker for networking provided in another embodiment of the present application is shown in FIG. Figure 7bAs shown, mobile phone 701 and TV 702 have formed a one-to-one group network (first network), wherein in the first network, mobile phone 701 is a GO device and TV 702 is a GC device. When mobile phone 701 wants to connect to speaker 703 again, the sound can be transmitted to speaker 703 for playing. Since mobile phone 701 is a GO device in the first network, it can be networked with the speaker 703. Then mobile phone 701 can actively send an M2 message to speaker 703 to request networking with speaker 703. Speaker 703 connects to mobile phone 701 according to the received M2 message, completing the direct connection networking between mobile phone 701 and speaker 703, and then mobile phone 701 can cast the screen on TV 702, and transmit the corresponding audio information to speaker 703, so that speaker 703 plays the corresponding sound.

[0075] Figure 8 A device networking apparatus is provided in another embodiment of the present application, such as Figure 8 As shown, the device may include a processor 801 and a memory 802, wherein the memory 802 is used to store at least one instruction, and when the instruction is loaded and executed by the processor 801, the Figure 6 The device networking method provided in the illustrated embodiment. In one implementation, Figure 8 The device networking apparatus provided in the illustrated embodiment may be a chip.

[0076] On the other hand, another embodiment of the present application further provides a chip, the chip is connected to a memory, the memory user stores at least one program or instruction, the program or instruction is executed by the chip to implement Figure 6 The device networking method provided by the illustrated embodiment.

[0077] Another embodiment of the present application further provides a device, which includes a device body and Figure 8 The device networking apparatus provided by the illustrated embodiment. In another implementation, the device may include a device body and the above-mentioned chip connected to the memory.

[0078] Another embodiment of the present application further provides a computer storage medium having a computer program stored thereon, which implements Figure 6 The device networking method provided by the illustrated embodiment.

[0079] It should be noted that the terminals involved in the embodiments of the present invention may include but are not limited to personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, smart watches, smart speakers, smart large screens, etc.

[0080] It is understandable that the application may be an application program (nativeApp) installed on the terminal, or may also be a web page program (webApp) of a browser on the terminal, which is not limited in the embodiment of the present invention.

[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0082] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0083] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0084] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0085] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A device networking method, characterized in that: The method comprises: If the networking request information is obtained, sending a network reorganization request message to the first device, so that the first device deletes the first network formed by the one-to-one networking between the present device and the first device, wherein the first device is the group owner of the first network and the present device is the group client of the first network; and After disconnecting from the first network, creating a group owner identity, and sending network information to the first device and the second device that sends the networking request information, respectively, so that the first device and the second device are connected to the present device respectively according to the network information to form a second network, wherein the present device is connected to the first device and the second device at the same time in the second network, and the networking request information is sent by the second device after determining that the number of group clients in the first network is less than a set number; The sending of the second device after determining that the number of group clients in the first network is less than a set number includes: The second device obtains the first status broadcast message broadcast by the device; and The second device determines whether the number of group clients in the first network is less than a set number according to the first status broadcast message; The first status broadcast message includes the device identification of the local device, the device identity of the local device and the device ID of the first device; The second device determining whether the number of group clients in the first network is less than a set number according to the first status broadcast message includes: The second device obtains, according to the device ID of the first device, a second status broadcast message broadcast by the first device; The second device determines whether the number of group clients in the first network is less than a set number according to the second status broadcast message; The second status broadcast information includes the device identification of the first device, the device identity of the first device, and the number of group clients connected to the first device.

2. The method according to claim 1, characterized in that After sending a network reorganization request message to the first device so that the first device deletes a first network formed by a one-to-one group network between the device and the first device, and before creating a group owner identity, the method further includes: The network connection with the first network is disconnected.

3. The method according to claim 1, characterized in that The network information includes an identifier of the second network and a key of the second network.

4. The method according to claim 1, characterized in that: After the device is started, the first state broadcast message of the device is continuously broadcasted; The first status broadcast message includes the device identification of the current device, the device identity of the current device and the device ID of the first device.

5. A device networking method, characterized in that: The method comprises: Sending a networking request message to a target device, so that the target device sends a network reorganization request message to a first device, wherein the network reorganization request message is used by the first device to delete a target network formed by a one-to-one networking of the target device and the first device, wherein the first device is a group owner of the target network and the target device is a group client in the target network; and Acquire network information sent by the target device, and directly connect to the target device according to the network information; Before sending the networking request information to the target device, the method further includes: Determining that the number of group clients in the target network where the target device is located is less than a set number; Before determining that the number of group clients in the network where the target device is located is less than a set number, the method further includes: Acquire a first status broadcast message broadcast by the target device; and Determining whether the number of group clients in the target network is less than a set number according to the first status broadcast message; The first status broadcast message includes the device identification of the target device, the device identity of the target device and the device ID of the first device; The determining, according to the first status broadcast message, whether the number of group clients in the target network is less than a set number comprises: Acquire, according to the device ID of the first device, a second state broadcast message broadcast by the first device; Determining whether the number of group clients in the target network is less than a set number according to the second state broadcast message; The second status broadcast information includes the device identification of the first device, the device identity of the first device, and the number of group clients connected to the first device.

6. A device networking apparatus, characterized in that: The device comprises: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the device networking method as described in any one of claims 1 to 5 is implemented.

7. A device, characterized in that: The device includes the device networking apparatus according to claim 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the device networking method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Networking method, device and system

    CN114390491A

  • Wireless communication devices and methods for forming peer-to-peer (P2P) wireless connections between devices

    US20150117318A1

  • Group formation control in multi-group peer-to-peer network

    US20190014172A1