Connection information sharing method, electronic device, and computer program product

By acquiring and sharing the connection information of the sending terminal through the receiving terminal, the problem of cumbersome networking operations for terminal devices is solved, and a more efficient networking method is achieved.

WO2026092077A1PCT designated stage Publication Date: 2026-05-07ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
ZTE CORP
Filing Date
2025-10-10
Publication Date
2026-05-07

AI Technical Summary

Technical Problem

In existing technologies, when terminal devices share audio and video with multiple devices, the networking process is cumbersome, which affects the user experience.

Method used

By configuring the receiving terminal to obtain the connection information of the sending terminal and establishing a communication connection between the receiving terminal and the sending terminal, the networking process is simplified.

Benefits of technology

It simplifies the networking process, improves the user experience, reduces manual operations, and increases networking efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025126833_07052026_PF_FP_ABST
    Figure CN2025126833_07052026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a connection information sharing method, an electronic device, and a computer program product. The method comprises: acquiring connection information of a sending terminal sent by a first receiving terminal, wherein the connection information is acquired by the first receiving terminal from the sending terminal; and on the basis of the connection information, establishing a communication connection between a second receiving terminal and the sending terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Connecting information sharing methods, electronic devices and computer program products

[0001] Cross-references to related applications

[0002] This application is based on and claims priority to Chinese patent application CN202411518196.3, filed on October 28, 2024, entitled “Method for Connecting Information Sharing, Electronic Device and Computer Program Product”, and incorporates the entire disclosure of that patent application by reference. Technical Field

[0003] This disclosure relates to the field of communication technology, and more specifically, to a method for connecting information sharing, an electronic device, and a computer program product. Background Technology

[0004] If a terminal wants to share audio and video with other terminals, depending on the existing network configuration, the sharing terminal needs to connect and pair with the other terminals in turn. In some cases, the user also needs to manually confirm the network setup process on the sharing terminal. When there are many terminals to be shared, this network setup method is cumbersome for users and affects their user experience. Summary of the Invention

[0005] This disclosure provides a method for connecting and sharing information, an electronic device, and a computer program product to at least solve the problem of cumbersome operation in existing networking schemes.

[0006] According to one embodiment of this disclosure, a connection information sharing method is provided, which should be configured as a second receiving terminal, including: obtaining connection information of a sending terminal sent by a first receiving terminal, wherein the connection information is obtained by the first receiving terminal from the sending terminal; and establishing a communication connection between the second receiving terminal and the sending terminal based on the connection information.

[0007] According to another embodiment of this disclosure, a connection information sharing method is provided, which should be configured as a first receiving terminal, including: acquiring connection information of the sending terminal sent by the sending terminal, wherein the connection information is configured to establish a communication connection between the first receiving terminal and the sending terminal; establishing a communication connection between the first receiving terminal and the sending terminal according to the connection information; and sending the connection information of the sending terminal to a second receiving terminal, wherein the connection information is further configured to establish a communication connection between the second receiving terminal and the sending terminal.

[0008] According to yet another embodiment of this disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in the above method embodiments.

[0009] According to yet another embodiment of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments. Attached Figure Description

[0010] Figure 1 is a schematic block diagram of the hardware structure of a mobile terminal for a connection information sharing method according to an embodiment of the present disclosure;

[0011] Figure 2 is a schematic diagram of the network architecture of a connection information sharing system according to an embodiment of the present disclosure;

[0012] Figure 3 is a structural block diagram of the internal structure of each terminal according to an embodiment of the present disclosure;

[0013] Figure 4 is a flowchart illustrating a connection information sharing method according to an embodiment of the present disclosure;

[0014] Figure 5 is a schematic diagram of the data format of interactive information according to an embodiment of the present disclosure;

[0015] Figure 6 is a schematic diagram of the terminal interaction process according to an embodiment of the present disclosure;

[0016] Figure 7 is a flowchart illustrating a connection information sharing method according to another embodiment of the present disclosure;

[0017] Figure 8 is a schematic diagram of a terminal interaction process according to another embodiment of the present disclosure. Detailed Implementation

[0018] The embodiments of this disclosure will be described in detail below with reference to the accompanying drawings and examples.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0020] The methods and embodiments provided in this application can be executed in a mobile terminal, computer terminal, or similar computing device. Taking a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal for a connection information sharing method according to an embodiment of this disclosure. As shown in FIG1, the mobile terminal may include one or more (only one is shown in FIG1) processors 102 (processors 102 may include, but are not limited to, microprocessors MCUs or programmable logic devices FPGAs, etc.) and a memory 104 for storing data. The mobile terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that the structure shown in FIG1 is only illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may include more or fewer components than shown in FIG1, or have a different configuration than shown in FIG1.

[0021] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the connection information sharing method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0022] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0023] This embodiment of the disclosure can also be operated on the network architecture shown in FIG2. As shown in FIG2, the network architecture may include: a transmitting terminal 20 and multiple receiving terminals. FIG2 only shows two of the multiple receiving terminals, namely the first receiving terminal 31 and the second receiving terminal 32. The transmitting terminal 20 and the multiple receiving terminals, as well as the multiple receiving terminals, can exchange information, thereby establishing a communication connection between the transmitting terminal 20, the first receiving terminal 31 and the second receiving terminal 32.

[0024] For example, as shown in Figure 2, when forming a network via Wi-Fi, the connection information in this embodiment of the present disclosure can be Wi-Fi information. That is, after the sending terminal 20 sends its Wi-Fi information to the first receiving terminal 31, the first receiving terminal 31 will have, set, or enable a "sharer identifier," which means that the first receiving terminal 31 has the ability to share the sending terminal's Wi-Fi information with other receiving terminals (such as the second receiving terminal 32). In this way, when forming a Wi-Fi network, the sending terminal 20 does not need to interact with all receiving terminals sequentially. The Wi-Fi information of the sending terminal can be interacted by the receiving terminal that has received the sending terminal's Wi-Fi information with other receiving terminals that have not received the sending terminal's Wi-Fi information (such as the second receiving terminal 32). This allows for faster networking via Wi-Fi.

[0025] In one exemplary embodiment, the transmitting terminal 20, the first receiving terminal 31, and the second receiving terminal 32 may be a music phone or any other suitable terminal device or electronic device.

[0026] Figure 3 is a structural block diagram of the internal structure of each terminal according to an embodiment of the present disclosure. As shown in Figure 3, the transmitting terminal 20, the first receiving terminal 31, and the second receiving terminal 32 each include: a control module (201, 311, 321), an NFC module (202, 312, 322), and a WIFI module (203, 313, 323). In Figure 2, the transmitting terminal 20, the first receiving terminal 31, or the second receiving terminal 32 can use the NFC module as the communication method to obtain WIFI information from the interactive peer. In other example embodiments, other communication modules may also be included.

[0027] The control module is a purely software module that can function without hardware support (it can also be based on a processor or storage medium). Its functions may include one or more of the following components:

[0028] Part A: Set the role of the terminal, that is, set the terminal as a music sender (sending terminal) or a music receiver (receiving terminal); and then set the relevant connection configurations for the terminal according to its role.

[0029] Part B: When this terminal interacts with other terminals, it provides connection information of this terminal to the NFC module to assist NFC in completing information interaction, and saves and transmits the connection information of other terminals to this terminal's connection module.

[0030] Part C is used to control the playback of audio and video on this terminal, and to share the audio and video of this terminal to other terminals.

[0031] In one embodiment, the control module can be an application (APP), or the various functions can be distributed to other modules that can implement the corresponding functions. For example, the function of "setting the role of the terminal" can be placed in the "settings" module of the operating system, and the playback function can be placed in the "video" module of the system, etc.

[0032] The NFC module requires the terminal to support NFC in its hardware. This module is used to complete the exchange of connection-related information during the terminal's NFC interactive sensing process, in order to prepare for networking.

[0033] The connection module requires the terminal to support the connection in hardware. When the NFC module obtains the connection information of other terminals, it will automatically connect to the local area network to complete the network formation.

[0034] Currently, there are two main networking methods that rely on connections: one is networking via hotspots and stations, and the other is networking via P2P. However, both methods are relatively cumbersome to operate. Specifically, the hotspot and station method requires each station to enter a hotspot identifier, i.e., the hotspot SSID (Service Set Identifier), and a hotspot password to connect. The P2P method requires the mobile phone to negotiate roles, i.e., the terminal is either a GC or a GO, and each GC needs to be manually confirmed by the GO before it can join the network.

[0035] This embodiment provides a connection information sharing method operating on the aforementioned mobile terminal or network architecture, which simplifies the initial network setup steps. This method can be applied to a second receiving terminal, wherein the second receiving terminal has not received connection information from the sending terminal. Figure 4 is a flowchart of the connection information sharing method according to an embodiment of this disclosure. As shown in Figure 4, connection information sharing may include the following steps:

[0036] Step S402: Obtain the connection information of the sending terminal sent by the first receiving terminal, wherein the WIFI information is obtained by the first receiving terminal from the sending terminal.

[0037] In the embodiments of this disclosure, the connection information may be wireless network information, including but not limited to WIFI information.

[0038] Before step S402 in this embodiment, the method may further include: setting the working mode of the second receiving terminal to the receiver mode, and setting the interaction information of the second receiving terminal for interacting with the first receiving terminal according to the receiver's working mode, wherein the interaction information of the first receiving terminal carries the connection information of the sending terminal, the working mode of the first receiving terminal, the networking mode of the first receiving terminal, the connection information of the first receiving terminal, and the sharer flag; the interaction information of the second receiving terminal carries the working mode of the second receiving terminal, the networking mode of the second receiving terminal, and the connection information of the second receiving terminal.

[0039] In an exemplary embodiment, the first receiving terminal can operate as a receiver; the networking mode of the first receiving terminal can include: WIFI hotspot and Station mode and WIFI IP2P mode, etc.

[0040] Before step S402 in this embodiment, the method may further include: the sending terminal setting its own working mode to sender mode, setting interaction information for interacting with the first receiving terminal according to the sender working mode, so as to send the connection information of the sending terminal to the first receiving terminal, thereby sending the connection information of the sending terminal to the second receiving terminal through the first receiving terminal, wherein the interaction information of the sending terminal carries the connection information of the sending terminal, the working mode of the sending terminal, the networking mode of the sending terminal, and the connection information of the sending terminal.

[0041] In one exemplary embodiment, the networking mode of the first receiving terminal, the second receiving terminal, or the sending terminal may include: Wi-Fi hotspot and Station mode, Wi-Fi IP2P mode, etc. The networking modes of the first receiving terminal, the second receiving terminal, and the sending terminal are consistent.

[0042] In an exemplary embodiment, the "control module" of the terminal in Figure 2 is made into an app. Through this app, users can set the working mode through the UI (User Interface). The default working mode of the terminal is the receiver mode. Users can pre-set the working mode of the sending terminal to the sender mode, and then initiate a network through WIFI.

[0043] In one exemplary embodiment, when the control module of the sending terminal or the receiving terminal detects that the NFC module needs to perform Wi-Fi information interaction, the control module of the sending terminal or the first receiving terminal autonomously sets the working mode of the terminal according to the application data information in the background of the terminal, and sets the networking mode of the terminal according to the communication data. The communication data includes whether to enable the hotspot function, etc.

[0044] In one exemplary embodiment, when the control module of the sending terminal detects that the application data running on the terminal contains playing audio and / or video, it defaults to setting the terminal's operating mode to sender. Simultaneously, a UI pop-up prompts the user for further confirmation. Upon receiving confirmation, the information indicating "operating mode as sender" is recorded in the interaction information used for communication with the peer, i.e., the "operating mode" field in the interaction information is set to "sender". The terminal's default network mode is Wi-Fi P2P. If the control module detects that the terminal has enabled hotspot functionality, it switches the network mode to Wi-Fi hotspot and Station mode, and records the modified network mode information in the interaction information used for communication with the peer, i.e., the "network mode" field in the interaction information is set to "Wi-Fi hotspot and Station mode". Otherwise, the default Wi-Fi P2P mode is used for the interaction information. Specifically, when the terminal's network mode is Wi-Fi hotspot and Station mode, before interacting with the peer using Wi-Fi information, a prompt message is sent to inform the peer of the terminal's network mode so that the peer can switch network modes promptly.

[0045] In an exemplary embodiment, when the control module of the first receiving terminal detects that there is no audio and / or video playback in the application data running on this terminal, it defaults to setting the working mode of this terminal to receiver. At the same time, a pop-up window appears on the terminal's UI interface for the user to confirm further. If the user confirms, the information "working mode is receiver" is recorded in the interaction information used for interaction with the peer, that is, the "working mode" field in the interaction information is set to "receiver". The terminal's default networking mode is Wi-Fi IP2P mode. If the control module receives networking mode prompt information sent by the peer, it switches the networking mode to Wi-Fi hotspot and station mode, and records the modified networking mode information in the interaction information used for interaction with the peer, that is, the "network mode" field in the interaction information is set to "Wi-Fi hotspot and station mode". Otherwise, the interaction information is set to the default Wi-Fi IP2P mode.

[0046] For a scenario where the networking mode is WIFIP2P, before step S402, the method may further include: setting the networking mode of the second receiving terminal to WIFIP2P mode and setting the role mode of the second receiving terminal to GC mode, and correspondingly setting the role mode of the sending terminal to GO mode, wherein the role mode includes GO mode and GC mode, and the role mode information of each terminal can be written into the "to be expanded field" of the interaction information data format.

[0047] For scenarios where the networking mode is WIFI hotspot and Station mode, before step S402, the method further includes: setting the networking mode of the second receiving terminal to WIFI hotspot and Station mode.

[0048] In one exemplary embodiment, the "control module" of the second receiving terminal is set as an app on the second receiving terminal, through which the user sets the working mode and networking mode via the UI, that is, sets the working mode to receiver mode and sets the networking mode to WIFI hotspot and Station mode or WIFI IP2P mode.

[0049] In an exemplary embodiment, when the control module of the second receiving terminal detects that there is no audio and / or video playback in the application data running on this terminal, it defaults to setting the working mode of this terminal to receiver. At the same time, a pop-up window appears on the terminal's UI interface for the user to confirm further. If the user confirms, the information "working mode is receiver" is recorded in the interaction information used for interaction with the peer, that is, the "working mode" field in the interaction information is set to "receiver". The terminal's default networking mode is Wi-Fi IP2P mode. If the control module receives networking mode prompt information sent by the peer, it switches the networking mode to Wi-Fi hotspot and station mode, and records the modified networking mode information in the interaction information used for interaction with the peer, that is, the "network mode" field in the interaction information is set to "Wi-Fi hotspot and station mode". Otherwise, the interaction information is set to the default Wi-Fi IP2P mode.

[0050] Figure 5 is a schematic diagram of the data format of the interactive information according to an embodiment of the present disclosure. As shown in Figure 5, the data format may include, but is not limited to, one or more of the following fields: working mode, network mode, local connection information, sending terminal connection information, (local terminal) current connection status, sharer identifier, byte 1 to be expanded, and byte 2 to be expanded.

[0051] In an exemplary embodiment, the data format of the interactive information may include, but is not limited to, one or more of the following fields: working mode, networking mode, local WIFI information, sending terminal WIFI information, (this terminal) current connection status, sharer identifier, byte 1 to be expanded, and byte 2 to be expanded.

[0052] In an exemplary embodiment, the data format of the interactive information received by the terminal may include the following fields: working mode, network mode, sending terminal connection information, and sharer identifier.

[0053] In an exemplary embodiment, the data format of the interactive information of the sending terminal may include the following fields: working mode, network mode, and sending terminal connection information.

[0054] The operating mode can include two modes: receiver and sender. In the receiver mode, the two terminals can interact via NFC. Receivers who have obtained the Wi-Fi information of the sending terminal and receivers who have not obtained the Wi-Fi information of the sending terminal can also interact. Other types of terminals cannot interact.

[0055] The networking modes can include two types: WIFI hotspot and Station mode, and WIFI IP2P mode.

[0056] Local Wi-Fi information indicates the information that this terminal's Wi-Fi needs to share.

[0057] The sending terminal's Wi-Fi information is optional and represents relevant information about the sending terminal. For terminals that have not yet interacted with the sending terminal via NFC, this field is empty; if a terminal has already established an NFC interaction with the sending terminal, it can share the sending terminal's Wi-Fi information through this field during subsequent interactions with other terminals.

[0058] Current connection status refers to whether the current Wi-Fi connection is connected or disconnected.

[0059] The sharer flag indicates whether this terminal is a sharer, with two states: "yes" and "no".

[0060] The byte 1 indicates a future expansion byte for adding functionality later.

[0061] The byte 2 indicates a future expansion byte for adding functionality later.

[0062] Using the data format shown in Figure 5, the required interactive information can be added to the data format according to the needs, avoiding the problem in existing related technical solutions that are limited to sharing WIFI hotspot identifiers and passwords due to the limitation of NFC tags, and that NFC tags cannot be rewritten.

[0063] In this embodiment, the data format shown in Figure 5 is a custom data format. This data format can be adjusted as needed, or relevant information can be added to the bytes to be expanded (byte 1 and byte 2) for transmission. This data can be placed in the `transmit()` function for NFC interaction.

[0064] In one exemplary embodiment, when the data in the "Sharer Identifier" field is "1", it indicates that the current receiving terminal has received the Wi-Fi information of the sending terminal and is able to share the Wi-Fi information of the sending terminal; when the data in the "Sharer Identifier" field is "0", it indicates that the current receiving terminal has not received the Wi-Fi information of the sending terminal and cannot share the Wi-Fi information of the sending terminal. For example, if the data in the "Sharer Identifier" field of the interaction information sent by the first receiving terminal to the second receiving terminal is "1", it means that the first receiving terminal is able (allowed) to share the Wi-Fi information of the sending terminal, and the second receiving terminal, upon recognizing this information, receives the Wi-Fi information of the sending terminal from the first receiving terminal; if the data in the "Sharer Identifier" field of the interaction information sent by the first receiving terminal to the second receiving terminal is "0", it means that the first receiving terminal is not (not allowed) to share the Wi-Fi information of the sending terminal, and the second receiving terminal, upon recognizing this information, does not save and discards the relevant information of the first receiving terminal.

[0065] In one exemplary embodiment, a "sharer identifier" is added to the interaction information based on whether the WIFI information of the sending terminal has been received. If the "sharer identifier" field exists in the interaction information, it indicates that the first receiving terminal is able (allowed) to share the WIFI information of the sending terminal; otherwise, it indicates that the first receiving terminal is unable (not allowed) to share the WIFI information of the sending terminal.

[0066] In one exemplary embodiment, various terminals send the aforementioned interactive information via APDU (Application Protocol Data Unit) naming.

[0067] Step S404: Establish a communication connection between the second receiving terminal and the sending terminal based on the connection information.

[0068] In step S404 of this embodiment, establishing a communication connection between the second receiving terminal and the sending terminal according to the connection information includes: sending a connection request (i.e., a communication connection request) to the sending terminal, wherein the connection request includes information provided by the sending terminal required to establish the connection, and the connection information includes information required to establish the connection; and establishing a communication connection between the second receiving terminal and the sending terminal if the connection request is accepted.

[0069] In one exemplary embodiment, a connection request is sent to a sending terminal, wherein the connection request includes information provided by the sending terminal required to establish a communication connection, including: sending a communication connection request to the sending terminal based on an acquired Wi-Fi hotspot identifier, wherein the communication connection request includes a hotspot password, the information required to establish a communication connection includes a Wi-Fi hotspot password, the Wi-Fi hotspot identifier is used to identify the Wi-Fi hotspot provided by the sending terminal, and the Wi-Fi hotspot password is used to access and connect to the Wi-Fi hotspot; if the communication connection request is accepted, a communication connection is established between a second receiving terminal and the sending terminal, including: if the hotspot password is verified by the sending terminal, a communication connection is established between the second receiving terminal and the sending terminal.

[0070] The hotspot identifier and hotspot password can be preset by the sending terminal. For example, the hotspot identifier is ABCWIFI and the hotspot password is 123456.

[0071] In one exemplary embodiment, the hotspot identifier can be obtained in advance by the user of the receiving terminal, and then obtained according to the hotspot identifier input by the user.

[0072] In an exemplary embodiment, a hotspot identifier may be carried in the interaction information between terminals. When the receiving terminal recognizes the hotspot identifier of the sending terminal in the interaction information, it is added to the hotspot list so that the user can select the corresponding hotspot and enter the password.

[0073] In this embodiment, the WIFI hotspot identifier and WIFI hotspot password can be carried in the "Local Connection Information" field of the data structure in Figure 5.

[0074] In one embodiment, a connection request is sent to a sending terminal, wherein the connection request includes information provided by the sending terminal required to establish a communication connection, including: sending a connection request to the sending terminal, wherein the connection request includes the address of the sending terminal, and the information required to establish a communication connection includes the address of the sending terminal.

[0075] In this embodiment, the address of the sending terminal is used to enable the receiving terminal to access the local area network based on the address, wherein the address may be a MAC address.

[0076] In one embodiment, before establishing a communication connection between the second receiving terminal and the sending terminal, the method further includes: sending the address of the second receiving terminal to the first receiving terminal so that the address of the second receiving terminal is recorded in a preset list by the first receiving terminal; and establishing a communication connection between the second receiving terminal and the sending terminal when the connection request is accepted, including: establishing a communication connection between the second receiving terminal and the sending terminal when the connection request also includes the address of the second receiving terminal and the address of the second receiving terminal is recorded in the preset list.

[0077] In one embodiment, the sending terminal records the address of the received second receiving terminal in a preset list. When the second receiving terminal sends a connection request to the sending terminal, the sending terminal determines that the connection request corresponds to the address of the second receiving terminal based on the address of the second receiving terminal recorded in the preset list, and then directly allows the second receiving terminal to access the local area network without manual confirmation from the user.

[0078] By setting a preset list, users can avoid having to manually confirm each receiving terminal when forming a network via Wi-Fi, thus enabling more efficient network formation via Wi-Fi.

[0079] In one embodiment, recording the address of the second receiving terminal in a preset list includes: sending the address of the second receiving terminal to a first receiving terminal, wherein the first receiving terminal is configured to send the address of the second receiving terminal to the sending terminal through a communication connection established between the first receiving terminal and the sending terminal, and the sending terminal is configured to record the received address of the second receiving terminal in a preset list.

[0080] In an exemplary embodiment, a preset list is set in the sending terminal. The second receiving terminal sends its address to the first receiving terminal based on its interaction with the first receiving terminal. The first receiving terminal then interacts with the sending terminal to send the address of the second receiving terminal to the sending terminal. The sending terminal stores the address of the second receiving terminal in its locally set preset list.

[0081] In this embodiment, the address of the second receiving terminal can be carried in the "Local Connection Information" field of the data structure in Figure 5.

[0082] In one embodiment, recording the address of the second receiving terminal in a preset list includes: sending the address of the second receiving terminal to a first receiving terminal, wherein the first receiving terminal is configured to send the address of the second receiving terminal to a server, and the server is configured to record the received address of the second receiving terminal in a preset list.

[0083] In an exemplary embodiment, a preset list may be set in the sending terminal. The second receiving terminal sends its address to the first receiving terminal based on the interaction with the first receiving terminal. The first receiving terminal sends the address of the second receiving terminal to the server / cloud server. The sending terminal periodically retrieves the address of the second receiving terminal from the server, or retrieves the address of the second receiving terminal from the server according to the instruction information of the first receiving terminal, and then stores the address of the second receiving terminal in a list set locally by the sending terminal.

[0084] In one exemplary embodiment, the preset list may be set in a server or a cloud server. The second receiving terminal sends its address to the first receiving terminal based on its interaction with the first receiving terminal. The first receiving terminal sends the address of the second receiving terminal to the server / cloud server. The sending terminal periodically retrieves the address of the second receiving terminal from the preset list of the server, or retrieves the address of the second receiving terminal from the preset list of the server according to the instruction information of the first receiving terminal.

[0085] In one embodiment, recording the MAC address of the second receiving terminal in a preset list of the sending terminal includes: when the first receiving terminal is set as a group owner (GC) and the sending terminal is set as a group owner (GO), recording the address of the second receiving terminal in the preset list of the sending terminal.

[0086] In Wi-Fi networking, GO refers to the device that initiates the network setup using Wi-Fi Direct technology and is responsible for managing the network connections; GC refers to the device that joins the Wi-Fi network and establishes a connection with the GO to enable communication between devices. The GO and GC communicate and transmit data via Wi-Fi technology.

[0087] In one embodiment, obtaining the connection information of the sending terminal sent by the first receiving terminal includes: obtaining the connection information sent by the first receiving terminal through a target communication method, wherein the target communication method is different from the communication method via WIFI.

[0088] In one exemplary embodiment, obtaining connection information sent by the first receiving terminal through a target communication method includes: when the second receiving terminal has enabled Near Field Communication (NFC), obtaining WIFI information sent by the first receiving terminal through NFC, wherein the target communication method includes NFC.

[0089] In this embodiment, the NFC module includes two functions—a card reader function and a card emulation function. That is, the NFC module of each terminal plays a different role at different stages. For example, when the second receiving terminal needs to read the WIFI information of the sending terminal, its function is a card reader function, while the NFC module in the sending terminal being read functions as a card emulation function. Conversely, if the sending terminal wants to read the WIFI information of the second receiving terminal, the NFC module of the sending terminal functions as a card reader function, and the NFC module of the second receiving terminal functions as a card emulation function.

[0090] In one embodiment, after an NFC link is established between the sending terminal and the second receiving terminal, the NFC module uses the "transmit()" function to enable interaction between the sending terminal and the second receiving terminal.

[0091] In one embodiment, obtaining the connection information of the sending terminal sent by the first receiving terminal includes: obtaining the connection information sent by the first receiving terminal when the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing of the sending terminal's connection information; or, obtaining the connection information sent by the first receiving terminal when the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing of the sending terminal's connection information, and the second receiving terminal is configured to allow receiving media information sent by the sending terminal but currently does not have the ability to share the sending terminal's connection information.

[0092] In an exemplary embodiment, if the interaction information contains a sharer flag field or the data in the sharer flag field of the interaction information is 1, it indicates that the sharing of the WIFI information of the sending terminal is permitted.

[0093] In one embodiment, when the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing of the sending terminal's connection information, obtaining the connection information sent by the first receiving terminal includes: obtaining a data packet sent by the first receiving terminal; and when a first field in the data packet indicates that the first receiving terminal is configured to allow receiving media information sent by the sending terminal and a second field indicates that the first receiving terminal is configured to allow sharing of the sending terminal's connection information, determining the information represented by the third field in the data packet as the connection information.

[0094] In one exemplary embodiment, media information may include audio, video, or text shared by the sending terminal.

[0095] In an exemplary embodiment, the first field is equivalent to the "working mode" field shown in FIG5. When the "working mode" field corresponding to the first receiving terminal indicates that the first receiving terminal is a receiver, it means that the first receiving terminal is set to allow receiving media information sent by the sending terminal.

[0096] The second field is equivalent to the "Sharer Flag" field in Figure 5. When the first receiving terminal has a sharer flag, it means that the first receiving terminal is set to allow sharing the connection information of the sending terminal.

[0097] The third field is equivalent to the "Sender Connection Information" field in Figure 5, and is used to carry the connection information of the sending terminal.

[0098] In one embodiment, establishing a communication connection between a second receiving terminal and a sending terminal based on connection information includes: if a first receiving terminal has already established a communication connection with a sending terminal based on connection information, then establishing a communication connection between the second receiving terminal and the sending terminal based on the connection information.

[0099] Through the steps described in this embodiment, since the first receiving terminal can send the connection information of the sending terminal to the second receiving terminal (i.e., the connection information of the sending terminal can be sent by the receiving terminal), during network formation, the sending terminal sharing audio and video does not need to sequentially share connection information with other receiving terminals. Instead, the receiving terminal that has already received the connection information of the sending terminal can share the connection information with other receiving terminals that have not yet received it, simplifying the network formation. Therefore, it can at least solve the problem of cumbersome operation in existing networking schemes in related technologies, achieving the effect of simplifying the networking method.

[0100] This disclosure provides a networking scheme using Wi-Fi, in which a receiving terminal can indirectly obtain the Wi-Fi information of a sending terminal through other receiving terminals. Figure 6 is a schematic diagram of the terminal interaction process according to this disclosure, which involves three terminals: receiving terminal 1 (i.e., the first receiving terminal), receiving terminal 2 (i.e., the second receiving terminal), and the sending terminal. Receiving terminal 1 is the terminal that has received the Wi-Fi information from the sending terminal, and receiving terminal 2 is the terminal that has not received the Wi-Fi information from the sending terminal. As shown in Figure 6, the process includes the following steps:

[0101] Receiving terminal 1 side:

[0102] Step R01: Set the working mode of this terminal to receiver.

[0103] The working mode is receiver, indicating that the terminal is set to receive music or video.

[0104] Step R01 also includes setting various parameters of the WIFI and the network mode of the terminal according to the receiver's working mode.

[0105] Specifically, the terminal's operating mode can be set to receiver mode via its control module. This setting can be done through the user interface. Generally, the default operating mode for initial use is "receiver" mode. The value of this parameter will be used for subsequent NFC interactions.

[0106] In addition, users can set the network mode through the UI interface. There are two modes: "WIFI Hotspot Mode" and "WIFI P2P Mode". For the sending terminal, either mode can be selected. The default is usually "WIFI P2P Mode". For the receiving terminal, there is no need to set the mode. Just gray it out according to the sending terminal menu.

[0107] If the network mode is hotspot and station mode, the terminal receives the WIFI hotspot identifier and hotspot password shared by the sending terminal; where the sending terminal is the terminal in the sender mode.

[0108] If the networking mode is WIFIP2P, the terminal sets its own role mode to GC, and the sending terminal sets its own role mode to GO. Then the two terminals exchange their respective interaction information.

[0109] In one exemplary embodiment, after the GO receives the interaction information from the GC, it records the GC's MAC address in a pre-set list. In this way, the GC can directly connect to the local area network between GO groups without user confirmation.

[0110] Step R02: Enable NFC on receiving terminal 1. The NFC functionality of receiving terminal 1 is configured within its NFC module.

[0111] Step R03: Interact with the receiving terminal 2 via NFC to send the WIFI information of the sending terminal to the receiving terminal 2.

[0112] In step R03, the receiving terminal 1 in Figure 6 is assumed to have the identity of a "sharer", that is, it has the sharer mark and has directly or indirectly obtained the WIFI information of the sending terminal. That is, it has directly interacted with the sending terminal and obtained the WIFI information of the sending terminal, or it has interacted with other receiving terminals with the identity of "sharer" and obtained the WIFI information of the sending terminal. At the same time, the obtained WIFI information is stored in the local database of the receiving terminal 1.

[0113] In step R03, the following conditions are required for receiving terminal 1 to share the WIFI information of sending terminal with receiving terminal 2: both are in the working mode of receiver, one has the identity of "sharer" and the other does not. Otherwise, receiving terminal 2 saves the interaction information of receiving terminal 1.

[0114] The above conditions can be determined by judging the two parameters in Figure 5: "Working Mode" and "Sender WIFI Information". Both terminals must be working in "Receiver" mode, one terminal's "Sharer Flag" must be yes, and the other terminal's must be no. The "Sharer Flag" is determined by whether the corresponding data in the "Sharer Flag" field is "1" or "0", for example, "1" represents yes and "0" represents no.

[0115] In one embodiment, the Wi-Fi information exchange in step R03 is achieved through NFC contact, which requires manual NFC contact. The core of this embodiment is that it does not require NFC contact between the sending end and each receiving end, but rather that any terminal that has touched the sending terminal also has the function of sharing the sending terminal's Wi-Fi information.

[0116] Specifically, the NFC of receiving terminal 1 reads the WIFI information of receiving terminal 2 through the card reader function, and correspondingly, receiving terminal 2 provides its WIFI information to receiving terminal 1 through the NFC card emulation (HCE) function; and receiving terminal 1 provides its WIFI information to receiving terminal 2 through the NFC HCE function, and correspondingly, receiving terminal 2 reads the WIFI information of receiving terminal 1 through the NFC card reader function.

[0117] In this embodiment, the control modules of receiving terminal 1 and receiving terminal 2 interact through NFC card reading and HCE card emulation functions. Interaction in HCE requires the card reader to send an APDU (Application Protocol Data Unit) command containing a specific AID (Application Identifier). Communication can only take place if the terminal receiving the command can respond to the AID.

[0118] In this embodiment, the information that the NFC modules of each terminal need to exchange can be obtained from the terminal control module. The interaction process mainly relies on the HCE card reading process. After the NFC link is established, it is implemented through the "transmit()" function. This function does not specify the data format, and the data mode can be customized as needed, as shown in Figure 5.

[0119] Once the receiving terminal and the sending terminal have interacted via NFC, the receiving terminal acquires the sending terminal's Wi-Fi information, thus gaining the ability to share the sending terminal's Wi-Fi information. As shown in Figure 5, the "sending terminal Wi-Fi information" in the NFC interaction data corresponds to the Wi-Fi information acquired from the sending terminal.

[0120] Receiving terminal 2 sides:

[0121] Step R11: Set the working mode of this terminal to receiver.

[0122] The terminal's operating mode can be set to receiver mode via its control module. This setting can be done through the user interface. Generally, the default operating mode for initial use is "receiver" mode. The value of this parameter will be used for subsequent NFC interactions.

[0123] In addition, users can set the network mode through the UI interface. There are two modes: "WIFI Hotspot Mode" and "WIFI P2P Mode". For the sending terminal, either mode can be selected. The default is usually "WIFI P2P Mode". For the receiving terminal, there is no need to set this mode. Just gray it out according to the sending terminal menu.

[0124] Step R12: Enable NFC on receiving terminal 2. The NFC functionality of receiving terminal 2 is configured within its NFC module.

[0125] Step R13: Interact with receiving terminal 1 via NFC to receive WIFI information from sending terminal.

[0126] In step R13, the receiving terminal 1 obtains the Wi-Fi information of the sending terminal. At this time, the receiving terminal 2, having received the Wi-Fi information of the sending terminal, also acquires the identity of a "sharer" and has the ability to share the Wi-Fi information of the sending terminal.

[0127] In step R13, the WIFI information of the sending terminal obtained by the receiving terminal 2 is mainly obtained through the "sending terminal WIFI information" field in the interaction information sent by the receiving terminal 1.

[0128] After receiving terminal 2 completes step R13, it gains the ability to share the sending terminal's Wi-Fi information with other terminals. If receiving terminals 3, 4, etc., also exist, then receiving terminals 1 and 2 in Figure 3 can share the sending terminal's Wi-Fi information with receiving terminals 3 and 4. However, this approach significantly reduces the convenience and flexibility of user operation during actual network setup.

[0129] Step R14: Turn on the WIFI of receiving terminal 2.

[0130] Step R15: Connect to the sending terminal via NFC and Wi-Fi to connect to the local area network corresponding to the sending terminal.

[0131] In step R15, receiving terminal 2 obtains the WIFI information of sending terminal through the "sending terminal WIFI information" field in the interaction information of receiving terminal 1 and connects to sending terminal to form a local area network.

[0132] Step R16: Receive and play the audio and / or video shared by the sending terminal.

[0133] In this embodiment, once the local area network is established, each terminal in the local area network will have an IP address, and subsequent playback will use this IP address for audio and / or video playback and sharing.

[0134] In one embodiment, a media player-like interface can be provided to the user through the control module on each terminal, allowing the user to add a list of audio and video files to be shared. When playback begins, the audio and video stream is sent to other terminals on the local area network via Wi-Fi. These other terminals also have similar playback interfaces, which can be used to receive and decode audio and / or video streams sent via IP addresses.

[0135] Step R17: End synchronized playback.

[0136] When the sending terminal ends audio and / or video sharing, the synchronous playback of the receiving terminal 2 stops.

[0137] In this embodiment, the receiving terminal 1 also synchronously receives the audio and / or video shared by the sending terminal, as shown in Figure 6. Figure 6 is intended to illustrate in detail how the receiving terminal 2 achieves connection with the sending terminal and audio / video sharing through the receiving terminal 1.

[0138] Sending terminal side:

[0139] Step S01: Set the working mode of this terminal to sender.

[0140] Specifically, the working mode is that the sender indicates that the terminal is set up to send music or video.

[0141] Step S01 also includes setting various parameters of the WIFI and the network mode of the terminal according to the sender's working mode.

[0142] In an exemplary embodiment, the control module in Figure 2 above is set as an app, through which the user can select the working mode via the UI. The default working mode is "receiver", and the user can also manually set the mode to "sender" according to the actual situation. For the terminal in step S01, it is a receiver, so the default state can be maintained.

[0143] In one embodiment, if the networking mode is hotspot and station mode, the terminal sends its Wi-Fi hotspot identifier and hotspot password to the receiving terminal; if the networking mode is Wi-Fi IP2P mode, the receiving terminal sets its own role mode to GC, the terminal sets its own role mode to GO, and then the two terminals exchange their respective interaction information.

[0144] In one exemplary embodiment, after the GO receives the interaction information from the GC, it records the GC's MAC address in a pre-set list. In this way, the GC can directly connect to the local area network between GO groups without user confirmation.

[0145] Step S02: Enable NFC on the transmitting terminal. The NFC functionality of the transmitting terminal is configured within its NFC module.

[0146] Step S03: Obtain the WIFI information of receiving terminal 1 via NFC and establish a local area network.

[0147] Step S04: Turn on the WIFI of the sending terminal.

[0148] Step S05: Connect with the receiving terminal 2 via NFC and interact via WIFI.

[0149] Step S06: Play audio and / or video and share the played audio and / or video streams with the receiving end.

[0150] Step S07: End the playback process and audio and / or video sharing.

[0151] When the sending terminal ends audio and / or video sharing, it needs to shut down the data stream and turn off Wi-Fi, which means closing the app represented by the control module in the sending terminal.

[0152] Typically, when setting up a network via Wi-Fi, users manually connect to form a local area network (LAN). However, this method is cumbersome, requiring the operation of multiple interfaces and the input of passwords. In this embodiment, the introduction of a control module allows for easy switching of roles after network setup, providing flexible and versatile networking options and simplifying user operation.

[0153] Figure 7 illustrates a connection information sharing method according to another embodiment of the present disclosure, which can be applied to a first receiving terminal. As shown in Figure 7, the method may include:

[0154] Step S702: Obtain the connection information of the sending terminal sent by the sending terminal, wherein the connection information is used for the first receiving terminal to establish a communication connection with the sending terminal;

[0155] In the embodiments of this disclosure, the connection information of the sending terminal or receiving terminal includes, but is not limited to, WIFI information.

[0156] Before step S702 in this embodiment, the method may further include: the first receiving terminal setting its own working mode to the receiver mode, and setting the interaction information of the first receiving terminal for interacting with the sending terminal according to the receiver working mode, wherein the interaction information of the first receiving terminal carries the working mode of the first receiving terminal, the networking mode of the first receiving terminal, and the connection information of the first receiving terminal.

[0157] Before step S702 in this embodiment, the method may further include: the sending terminal sets its working mode to sender mode, and sets interaction information for interacting with the first receiving terminal according to the sender working mode, so as to send the connection information of the sending terminal to the first receiving terminal, wherein the interaction information of the sending terminal carries the connection information of the sending terminal, the working mode of the sending terminal, the networking mode of the sending terminal, and the connection information of the sending terminal.

[0158] In one exemplary embodiment, the networking mode of the first receiving terminal or sending terminal may include: Wi-Fi hotspot and Station mode, Wi-Fi IP2P mode, etc. The networking mode of the first receiving terminal and the sending terminal are consistent.

[0159] In one exemplary embodiment, the control module is set in each terminal in the form of an app. The user sets the terminal's working mode through the app's UI. The default terminal working mode is receiver mode. The user can pre-set the sending terminal's working mode to sender mode, and then initiate a network via WIFI.

[0160] In one exemplary embodiment, when the control module of the sending terminal or the receiving terminal detects that the NFC module needs to perform Wi-Fi information interaction, the control module of the sending terminal or the first receiving terminal autonomously sets the working mode of the terminal according to the application data information in the background of the terminal, and sets the networking mode of the terminal according to the communication data. The communication data includes whether to enable the hotspot function, etc.

[0161] In one exemplary embodiment, when the control module of the sending terminal detects that the application data running on the terminal contains playing audio and / or video, it defaults to setting the terminal's operating mode to sender. Simultaneously, a UI pop-up prompts the user for further confirmation. Upon receiving confirmation, the information indicating "operating mode as sender" is recorded in the interaction information used for communication with the peer, i.e., the "operating mode" field in the interaction information is set to "sender". The terminal's default network mode is Wi-Fi P2P. If the control module detects that the terminal has enabled hotspot functionality, it switches the network mode to Wi-Fi hotspot and Station mode, and records the modified network mode information in the interaction information used for communication with the peer, i.e., the "network mode" field in the interaction information is set to "Wi-Fi hotspot and Station mode". Otherwise, the default Wi-Fi P2P mode is used for the interaction information. Specifically, when the terminal's network mode is Wi-Fi hotspot and Station mode, before interacting with the peer using Wi-Fi information, a prompt message is sent to inform the peer of the terminal's network mode so that the peer can switch network modes promptly.

[0162] In an exemplary embodiment, when the control module of the first receiving terminal detects that there is no audio and / or video playback in the application data running on this terminal, it defaults to setting the working mode of this terminal to receiver. At the same time, a pop-up window appears on the terminal's UI interface for the user to confirm further. If the user confirms, the information "working mode is receiver" is recorded in the interaction information used for interaction with the peer, that is, the "working mode" field in the interaction information is set to "receiver". The terminal's default networking mode is Wi-Fi IP2P mode. If the control module receives networking mode prompt information sent by the peer, it switches the networking mode to Wi-Fi hotspot and station mode, and records the modified networking mode information in the interaction information used for interaction with the peer, that is, the "network mode" field in the interaction information is set to "Wi-Fi hotspot and station mode". Otherwise, the interaction information is set to the default Wi-Fi IP2P mode.

[0163] Step S704: Establish a communication connection between the first receiving terminal and the sending terminal according to the connection information;

[0164] Step S706: The connection information of the sending terminal is sent to the second receiving terminal, wherein the connection information is also used for the second receiving terminal to establish a communication connection with the sending terminal.

[0165] In step S706 of this embodiment, sending the connection information of the sending terminal to the second receiving terminal includes: sending the connection information of the sending terminal to the second receiving terminal through a target communication method, wherein the target communication method is different from the communication method through WIFI.

[0166] Before step S706 in this embodiment, the method further includes: setting the working mode of the second receiving terminal to the receiver mode, and setting the interaction information of the second receiving terminal for interacting with the first receiving terminal according to the receiver working mode, wherein the interaction information of the second receiving terminal carries the working mode of the second receiving terminal, the networking mode of the second receiving terminal, and the connection information of the second receiving terminal.

[0167] In one exemplary embodiment, the user can set the working mode and networking mode of the second terminal through the app corresponding to the control module of the second receiving terminal via the UI, that is, set the working mode to receiver mode and the networking mode to WIFI hotspot and Station mode or WIFI IP2P mode.

[0168] In an exemplary embodiment, when the control module of the second receiving terminal detects that there is no audio and / or video playback in the application data running on this terminal, it defaults to setting the working mode of this terminal to receiver. At the same time, a pop-up window appears on the terminal's UI interface for the user to confirm further. If the user confirms, the information "working mode is receiver" is recorded in the interaction information used for interaction with the peer, that is, the "working mode" field in the interaction information is set to "receiver". The terminal's default networking mode is Wi-Fi IP2P mode. If the control module receives networking mode prompt information sent by the peer, it switches the networking mode to Wi-Fi hotspot and station mode, and records the modified networking mode information in the interaction information used for interaction with the peer, that is, the "network mode" field in the interaction information is set to "Wi-Fi hotspot and station mode". Otherwise, the interaction information is set to the default Wi-Fi IP2P mode.

[0169] In one exemplary embodiment, sending the Wi-Fi information of the sending terminal to the second receiving terminal via a target communication method includes: when the second receiving terminal has enabled Near Field Communication (NFC), sending the Wi-Fi information of the sending terminal to the second receiving terminal via NFC, wherein the target communication method includes NFC.

[0170] In an exemplary embodiment, the first receiving terminal and the second receiving terminal interact with each other via NFC for Wi-Fi information. In addition to the first receiving terminal's working mode, networking mode, and Wi-Fi information, the interaction information of the first receiving terminal also carries the Wi-Fi information of the sending terminal and a sharer identifier.

[0171] In an exemplary embodiment, the data format of the interaction information of each terminal may further include the following fields: the current connection status of this terminal, the sharer identifier, the byte to be expanded 1, and the byte to be expanded 2.

[0172] In step S706 of this example, sending the connection information of the sending terminal to the second receiving terminal includes: sending the connection information of the sending terminal to the second receiving terminal when the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing the connection information of the sending terminal; or, sending the connection information of the sending terminal to the second receiving terminal when the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing the connection information of the sending terminal, and the second receiving terminal is configured to allow receiving media information sent by the sending terminal but currently does not have the ability to share the connection information of the sending terminal.

[0173] In one embodiment, when the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing the connection information of the sending terminal, sending the connection information of the sending terminal to the second receiving terminal includes: sending a data packet to the second receiving terminal, wherein a first field in the data packet indicates that the first receiving terminal is configured to allow receiving media information sent by the sending terminal, a second field indicates that the first receiving terminal is configured to allow sharing the connection information of the sending terminal, and a third field indicates connection information.

[0174] In one embodiment, the method further includes: obtaining the address of the second receiving terminal sent by the second receiving terminal, wherein the address of the second receiving terminal and the connection information of the sending terminal are used together to establish a communication connection between the second receiving terminal and the sending terminal; and recording the address of the second receiving terminal in a preset list, wherein the preset list is used to record the addresses of receiving terminals that the sending terminal allows to automatically establish a communication connection.

[0175] In one embodiment, recording the address of the second receiving terminal in a preset list includes: sending the address of the second receiving terminal to the sending terminal through a communication connection established between the first receiving terminal and the sending terminal, wherein the sending terminal is configured to record the received address of the second receiving terminal in the preset list; or, sending the address of the second receiving terminal to a server, wherein the server is configured to record the received address of the second receiving terminal in the preset list.

[0176] In an exemplary embodiment, a preset list is set in the sending terminal. The first receiving terminal interacts with the sending terminal to send the address of the second receiving terminal to the sending terminal, so that the sending terminal stores the address of the second receiving terminal in its locally set preset list.

[0177] In an exemplary embodiment, a preset list is set in the sending terminal. The first receiving terminal sends the address of the received second receiving terminal to the server / cloud server. The sending terminal periodically retrieves the address of the second receiving terminal from the server. Alternatively, the server / cloud server periodically sends instruction information to the sending terminal to instruct the sending terminal to retrieve the address of the second receiving terminal from the server / cloud server. Afterward, the sending terminal stores the address of the second receiving terminal in a list set locally in the sending terminal.

[0178] In one exemplary embodiment, a preset list is set in a server or cloud server. The first receiving terminal sends the address of the received second receiving terminal to the server / cloud server. The sending terminal periodically retrieves the address of the second receiving terminal from the preset list of the server. Alternatively, the server / cloud server periodically sends instruction information to the sending terminal to instruct the sending terminal to retrieve the address of the second receiving terminal from the server / cloud server.

[0179] In one embodiment, sending the connection information of the sending terminal to the second receiving terminal via a target communication method includes: sending the connection information of the first receiving terminal to the sending terminal via a target communication method according to an application protocol data unit command containing a specific application identifier, and receiving the connection information of the sending terminal.

[0180] In one exemplary embodiment, the first receiving terminal sends its Wi-Fi information to the sending terminal via Near Field Communication (NFC) according to an Application Protocol Data Unit command containing a specific application identifier, and receives the Wi-Fi information from the sending terminal.

[0181] Through the above steps, since the first receiving terminal can send the Wi-Fi information of the sending terminal to the second receiving terminal (meaning the receiving terminal can send the sending terminal's Wi-Fi information), during Wi-Fi networking, the sending terminal sharing audio and video does not need to sequentially share Wi-Fi information with other receiving terminals. Instead, the receiving terminal that has already received the sending terminal's Wi-Fi information can share it with other receiving terminals that have not yet received it, simplifying the networking method. Therefore, this solves the problem of cumbersome operation in existing Wi-Fi networking schemes and simplifies the networking method using Wi-Fi.

[0182] Another embodiment of this disclosure provides a networking scheme via Wi-Fi, in which the receiving terminal and the sending terminal interact directly to obtain the Wi-Fi information of the sending terminal. Figure 8 is a schematic diagram of the terminal interaction process according to another embodiment of this disclosure, which involves two terminals—a receiving terminal and a sending terminal. In this interaction process, the receiving terminal has not yet obtained the Wi-Fi information of the sending terminal.

[0183] Sending terminal side:

[0184] Step S11: Set the working mode of this terminal to sender.

[0185] The "Sender" working mode indicates that the terminal is configured to send music or video.

[0186] Step S11 also includes setting various parameters of the WIFI and the network mode of the terminal according to the sender's working mode.

[0187] In an exemplary embodiment, the control module in Figure 2 above is set as an app, through which the user can select the working mode via the UI. The default working mode is "receiver", and the user can also manually set the mode to "sender" according to the actual situation. For the terminal in step S11, it is a receiver, so the default state can be maintained.

[0188] In step S11, if the network mode is set to hotspot and station mode, it is necessary to obtain the SSID (i.e., hotspot identifier) ​​and password information of the WIFI hotspot of this terminal, and then send this information to the receiving terminal of the other end in the NFC interaction; if the network mode is set to WIFI IP2P mode, it is necessary to set the role mode of this terminal to GO, and send this information to the receiving terminal of the other end through NFC later.

[0189] Step S12: Enable the NFC function of the sending terminal.

[0190] Step S13: Obtain the WIFI information of the receiving terminal via NFC and establish a local area network.

[0191] NFC interacts with the peer device's NFC via the card reader function and HCE function. The information to be exchanged by the sending terminal can be obtained from the terminal's control module and is implemented through the "transmit()" function after the NFC link is established. This function does not specify a data format.

[0192] Step S14: Turn on the WIFI of the sending terminal.

[0193] Specifically, if the networking mode is hotspot and station mode, the terminal sends its Wi-Fi hotspot identifier and hotspot password to the receiving terminal; if the networking mode is Wi-Fi IP2P mode, the receiving terminal sets its own role mode to GC, the terminal sets its own role mode to GO, and then the two terminals exchange their respective interaction information.

[0194] Step S15: Connect with the receiving terminal via NFC and interact via Wi-Fi.

[0195] If the network topology is hotspot and station mode, under the corresponding hotspot, receiving terminals that enter the correct hotspot password are allowed to join the established local area network.

[0196] If the network mode is Wi-Fi 2P, after the GO receives the interaction information from the GC, it records the GC's MAC address in a pre-set list. This allows the GC to directly connect to the local area network between the GO groups without user confirmation. Once the NFC interaction is complete, the GO's control module will initiate the corresponding connection based on its respective mode.

[0197] In one embodiment, the preset list can be set locally on the GO side or on a cloud server. The GO side can obtain the MAC addresses of receiving terminals that can be received without confirmation from the preset list on the cloud server.

[0198] Step S16: Play audio and / or video and share the played audio and / or video streams with the receiving end.

[0199] Step S17: End the playback process and audio and / or video sharing.

[0200] In step S17, sharing ends by sending a command to the receiving terminal to end sharing.

[0201] Receiving terminal side:

[0202] Step R21: Set the working mode of this terminal to receiver.

[0203] The working mode is receiver, indicating that the terminal is set to receive music or video.

[0204] Step R21 also includes setting various parameters of the WIFI and the network mode of the terminal according to the receiver's working mode.

[0205] For the receiving terminal, if the network mode is hotspot or station mode, the receiving terminal only needs to receive the WIFI information from the sending terminal; if the network mode is Wi-Fi 2P mode, the receiving terminal needs to set its own role mode to GC before exchanging WIFI information with the sending terminal.

[0206] Step R22: Enable NFC on the receiving terminal.

[0207] Step R23: Exchange WIFI information with the sending terminal via NFC.

[0208] After obtaining the "Wi-Fi information of the sending terminal" through step R23, the receiving terminal can store this information in its local database. Simultaneously, the receiving terminal acquires the identity of a "sharer," meaning that while it is a receiver, it also possesses the ability to share the sending terminal's Wi-Fi information via NFC. This can be indicated to the user via a pop-up window or a toast message: "This terminal has the ability to share the sending terminal's Wi-Fi information." The receiving terminal can display whether it has the "sharer" capability on the corresponding display interface of the control module. For example, the color of the "sharer" text in the interface indicates whether it has this capability; gray "sharer" indicates that the terminal has not obtained the sending terminal's Wi-Fi information, while green "sharer" indicates that it has obtained the sending terminal's Wi-Fi information. Subsequently, the terminal can share the sending terminal's Wi-Fi information with other receiving terminals through the process shown in Figure 6. The locally stored "Wi-Fi information of the sending terminal" is later used to populate the "Sending Terminal Wi-Fi Information" field in Figure 5.

[0209] Step R24: Turn on the WIFI on the receiving terminal.

[0210] Step R25: Connect to the network by using NFC and interacting with the sending terminal via Wi-Fi.

[0211] Step R26: Receive the bitstream from the sending terminal and synchronously play and display it on the local machine.

[0212] Step R27: Receive the termination command from the sending terminal and end local playback.

[0213] In step R27, synchronous playback ends after receiving the end command from the sending terminal.

[0214] In this embodiment of the disclosure, any receiving terminal that has established a connection with the sending terminal and obtained the WIFI information of the sending terminal can share the WIFI information of the sending terminal with other receiving terminals that have not established a connection with the sending terminal.

[0215] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solutions of this disclosure, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this disclosure.

[0216] Embodiments of this disclosure also provide a computer-readable storage medium storing a computer program configured to perform the steps in any of the above method embodiments when executed.

[0217] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0218] Embodiments of this disclosure also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0219] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0220] According to yet another embodiment of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the methods in various embodiments of this application.

[0221] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0222] It is obvious to those skilled in the art that the modules or steps of this disclosure described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this disclosure is not limited to any particular combination of hardware and software.

[0223] The above are merely preferred embodiments of this disclosure and are not intended to limit this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A connection information sharing method, applied to a second receiving terminal, comprising: Obtain connection information of the sending terminal sent by the first receiving terminal, wherein the connection information is obtained by the first receiving terminal from the sending terminal; A communication connection is established between the second receiving terminal and the sending terminal based on the connection information.

2. The method according to claim 1, wherein, The step of establishing a communication connection between the second receiving terminal and the sending terminal based on the connection information includes: A connection request is sent to the sending terminal, wherein the connection request includes information provided by the sending terminal required to establish the communication connection, and the connection information includes the information required to establish the communication connection; If the connection request is accepted, a communication connection is established between the second receiving terminal and the sending terminal.

3. The method according to claim 2, wherein, Before establishing a communication connection between the second receiving terminal and the sending terminal based on the connection information, the method further includes: The address of the second receiving terminal is sent to the first receiving terminal so that the address of the second receiving terminal is recorded in a preset list by the first receiving terminal. If the connection request is accepted, establishing a communication connection between the second receiving terminal and the sending terminal includes: if the connection request also includes the address of the second receiving terminal and the address of the second receiving terminal is recorded in the preset list, then establishing a communication connection between the second receiving terminal and the sending terminal.

4. The method according to claim 3, wherein, Sending the address of the second receiving terminal to the first receiving terminal, so that the address of the second receiving terminal is recorded in a whitelist by the first receiving terminal, includes: The address of the second receiving terminal is sent to the first receiving terminal, wherein the first receiving terminal is configured to send the address of the second receiving terminal to the sending terminal through a communication connection established between the first receiving terminal and the sending terminal, and the sending terminal is configured to record the received address of the second receiving terminal in the preset list; or... The address of the second receiving terminal is sent to the first receiving terminal, wherein the first receiving terminal is configured to send the address of the second receiving terminal to the server, and the server is configured to record the received address of the second receiving terminal in the preset list.

5. The method according to claim 3, wherein, The step of recording the address of the second receiving terminal in the preset list includes: When the first receiving terminal is set as a group client and the sending terminal is set as a group owner, the address of the second receiving terminal is sent to the first receiving terminal so that the address of the second receiving terminal is recorded in the preset list through the first receiving terminal.

6. The method according to any one of claims 1 to 3, wherein, The step of obtaining the connection information of the sending terminal sent by the first receiving terminal includes: The connection information sent by the first receiving terminal is obtained through a target communication method, wherein the target communication method is different from the method of communication via WIFI.

7. The method according to any one of claims 1 to 3, wherein, The step of obtaining the connection information of the sending terminal sent by the first receiving terminal includes: If sharing the connection information of the sending terminal is permitted, obtain the connection information sent by the first receiving terminal; or When the first receiving terminal is configured to receive media information sent by the sending terminal and to share the connection information of the sending terminal, and the second receiving terminal is configured to receive media information sent by the sending terminal but currently does not have the ability to share the connection information of the sending terminal, the connection information sent by the first receiving terminal is acquired.

8. The method according to claim 7, wherein, When the first receiving terminal is configured to allow receiving media information sent by the sending terminal and to allow sharing of the sending terminal's connection information, obtaining the connection information sent by the first receiving terminal includes: Obtain the data packet sent by the first receiving terminal; If the first field in the data packet indicates that the first receiving terminal is configured to receive media information sent by the sending terminal, and the second field indicates that the first receiving terminal is configured to share the connection information of the sending terminal, then the information represented by the third field in the data packet is determined to be the connection information.

9. The method according to any one of claims 1 to 3, wherein, The step of establishing a communication connection between the second receiving terminal and the sending terminal based on the connection information includes: If the first receiving terminal has already established a communication connection with the sending terminal based on the connection information, a communication connection is then established between the second receiving terminal and the sending terminal based on the connection information.

10. A connection information sharing method, applied to a first receiving terminal, comprising: Obtain the connection information of the sending terminal sent by the sending terminal, wherein the connection information is used by the first receiving terminal to establish a communication connection with the sending terminal; A communication connection is established between the first receiving terminal and the sending terminal based on the connection information. The connection information of the sending terminal is sent to the second receiving terminal, wherein the connection information is also used by the second receiving terminal to establish a communication connection with the sending terminal.

11. The method according to claim 10, wherein, Sending the connection information of the sending terminal to the second receiving terminal includes: The connection information of the sending terminal is sent to the second receiving terminal through a target communication method, wherein the target communication method is different from the communication method via WIFI.

12. The method according to claim 10 or 11, wherein, Sending the connection information of the sending terminal to the second receiving terminal includes: When the first receiving terminal is configured to receive media information sent by the sending terminal and to share the connection information of the sending terminal, the connection information of the sending terminal is sent to the second receiving terminal; or When the first receiving terminal is configured to receive media information sent by the sending terminal and to share the connection information of the sending terminal, and the second receiving terminal is configured to receive media information sent by the sending terminal but currently does not have the ability to share the connection information of the sending terminal, the connection information of the sending terminal is sent to the second receiving terminal.

13. The method according to claim 12, wherein, When the first receiving terminal is configured to receive media information sent by the sending terminal and to share the connection information of the sending terminal, sending the connection information of the sending terminal to the second receiving terminal includes: A data packet is sent to the second receiving terminal, wherein the first field in the data packet indicates that the first receiving terminal is configured to receive media information sent by the sending terminal, the second field indicates that the first receiving terminal is configured to share the connection information of the sending terminal, and the third field indicates the connection information.

14. The method of claim 10, wherein, The method further includes: Obtain the address of the second receiving terminal sent by the second receiving terminal, wherein the address of the second receiving terminal and the connection information of the sending terminal are used together to establish a communication connection between the second receiving terminal and the sending terminal; The address of the second receiving terminal is recorded in a preset list, wherein the preset list is used to record the addresses of receiving terminals that the sending terminal allows to automatically establish communication connections.

15. The method according to claim 14, wherein, The step of recording the address of the second receiving terminal in the preset list includes: The address of the second receiving terminal is sent to the sending terminal through the communication connection established between the first receiving terminal and the sending terminal, wherein the sending terminal is configured to record the received address of the second receiving terminal in the preset list; or, The address of the second receiving terminal is sent to the server, wherein the server is configured to record the received address of the second receiving terminal in the preset list.

16. The method according to claim 11, wherein, Sending the connection information of the sending terminal to the second receiving terminal via the target communication method includes: According to the application protocol data unit command containing a specific application identifier, the connection information of the first receiving terminal is sent to the sending terminal through the target communication method, and the connection information of the sending terminal is received.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 9, or implements the steps of the method according to any one of claims 10 to 16.

18. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9, or implements the steps of the method according to any one of claims 10 to 16.

Citation Information

Patent Citations

  • Networking method, device and system

    CN114390491A

  • Multimedia data sharing method, server and terminal

    CN115776513A

  • Method and terminal for establishing communication connection

    JP2017022759A