Wireless communication method and terminal device

By using filtered information and virtual IP addresses in Wi-Fi P2P connections, the device discovery and connection process is simplified, complexity and stability problems in the prior art are solved, and efficient data transmission and multi-device interaction are achieved.

CN114339709BActive Publication Date: 2024-11-29HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011063160.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-30
Publication Date
2024-11-29
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

The existing data transmission process based on Wi-Fi P2P connections is complex, with high resource requirements, low search efficiency, and security risks and unstable connection problems.

Method used

By broadcasting a detection request message carrying filtered information, if a matching response message is received, a wireless point-to-point connection is established, and data transmission is used for virtual IP addresses, simplifying the device discovery and connection process, filtering out irrelevant devices, and improving search efficiency and security .

Benefits of technology

Reduces the complexity of P2P connections, reduces resource requirements, improves connection stability and search efficiency, enhances security, and supports multi-device video calls and file sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114339709B_ABST
    Figure CN114339709B_ABST
Patent Text Reader

Abstract

The present application provides a wireless communication method and terminal device, which relate to the field of communication technology, wherein the method comprises: a first terminal device broadcasts a detection request message carrying filtering information of the first terminal device; if a detection response message carrying filtering information of a second terminal device is received, and the filtering information of the first terminal device matches the filtering information of the second terminal device, it is determined that a wireless fidelity point-to-point connection between the first terminal device and the second terminal device has been established; in response to a user's sharing operation of a target file, the target file is shared with a target device in the connected terminal devices, wherein the pointing direction of the target device is relative to the pointing direction of the first terminal device. The technical solution provided by the present application has a simple Wi‑Fi P2P connection process, and users can quickly share files to an aligned terminal device through a simple sharing operation, thereby reducing the complexity of the data transmission process based on the P2P connection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a wireless communication method and terminal equipment. Background Art

[0002] Wireless fidelity direct (Wi-Fi Direct) is a peer-to-peer (P2P) connection technology, through which terminal devices can discover each other and establish a peer-to-peer connection without the participation of an access point (AP), and then transmit data between devices based on the established P2P connection. However, the current process of data transmission based on P2P connection is generally complicated. Summary of the invention

[0003] In view of this, the present application provides a wireless communication method and a terminal device for reducing the complexity of a data transmission process based on a P2P connection.

[0004] In order to achieve the above-mentioned object, in a first aspect, an embodiment of the present application provides a wireless communication method, which is applied to a first terminal device, including:

[0005] Broadcasting a detection request message carrying filtering information of the first terminal device;

[0006] If a detection response message carrying the filtering information of the second terminal device is received, and the filtering information of the first terminal device matches the filtering information of the second terminal device, it is determined that a wireless fidelity point-to-point connection between the first terminal device and the second terminal device has been established.

[0007] In the technical solution provided by this embodiment, after the first terminal device searches for the second terminal device that meets its own filtering conditions based on the filtering information, it establishes a Wi-Fi P2P connection with the second terminal device. Compared with the standard Wi-Fi direct connection process, the connection process is simpler, thereby reducing the complexity of the data transmission process based on the P2P connection; it can also reduce resource requirements and expand the scope of application; in addition, by searching and filtering the terminal devices through filtering information, irrelevant terminal devices can also be filtered out, thereby improving search efficiency and security.

[0008] In a possible implementation of the first aspect, the method also includes: if a detection request message carrying filtering information of a third terminal device is received, and the filtering information of the first terminal device matches the filtering information of the third terminal device, it is determined that a wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and a detection response message carrying the filtering information of the first terminal device is sent to the third terminal device.

[0009] In a possible implementation of the first aspect, the filtering information includes at least one of the following information: account information, group information, user input information, and short-range communication identification information, and the input information includes text information or voice information. In this implementation, the user can set the required filtering information as needed, which is highly flexible.

[0010] In a possible implementation of the first aspect, the method further includes:

[0011] Generate a virtual Internet protocol (IP) address of the first terminal device and a virtual IP address of a target terminal device, wherein the target terminal device is a terminal device with which a wireless fidelity point-to-point connection has been established;

[0012] Data is transmitted with the target terminal device based on the virtual IP address.

[0013] By using virtual IP addresses, compatibility with upper-layer applications such as the network layer can be achieved, so there is no need to modify the upper-layer applications, thereby reducing development costs.

[0014] In a possible implementation manner of the first aspect, during the data transmission process, neither the first message sent by the first terminal device to the target terminal device nor the second message received from the target terminal device includes IP address information;

[0015] During the process of processing the second message, the first terminal device adds virtual IP address information to the data packet corresponding to the second message passed to the network layer, the destination IP address in the virtual IP address information is the virtual IP address of the first terminal device, and the source IP address in the virtual IP address information is the virtual IP address of the target terminal device that sends the second message.

[0016] In a possible implementation of the first aspect, the method further includes:

[0017] Before the broadcasting of the detection request message carrying the filtering information of the first terminal device, in response to a triggering operation of the video call function by the user, displaying a first interface;

[0018] In response to a filtering information setting operation performed by a user on the first interface, determining filtering information of the first terminal device;

[0019] After establishing a wireless fidelity point-to-point connection, transmitting the captured video image to a target terminal device, the target terminal device being a terminal device with which a wireless fidelity point-to-point connection has been established;

[0020] Receive and display the video image captured by the target terminal device.

[0021] Through the above implementation, video calls between multiple devices can be easily realized; and this video call method does not rely on base station signals. Therefore, in some areas where the mobile communication signal is weak or there is no mobile communication signal, the above method can be used to make video calls, which can better meet user needs; in addition, the above video call method does not occupy mobile data traffic, so it can also save traffic resources.

[0022] In a possible implementation of the first aspect, the displaying of the video image captured by the target terminal device includes: if there are multiple target terminal devices, displaying the video image captured by one of the target terminal devices in a main window, and displaying the video images captured by other target terminal devices in a floating sub-window, wherein the size of the main window is larger than the size of the sub-window.

[0023] In a possible implementation of the first aspect, the filtering information includes a pointing direction of the device, and the pointing directions of any two terminal devices that match the filtering information are relative, and the method further includes:

[0024] The first target file is shared with a target terminal device, and / or a second target file is received from the target terminal device, wherein the target terminal device is a terminal device with which a wireless fidelity point-to-point connection has been established. Through the above implementation, file sharing between multiple devices can be conveniently performed.

[0025] In a second aspect, an embodiment of the present application provides a wireless communication method, applied to a first terminal device, including:

[0026] Establishing a wireless communication connection with at least one second terminal device;

[0027] In response to a user's sharing operation on a first target file, broadcasting a first notification message corresponding to the first target file;

[0028] Receiving a response message sent by the at least one second terminal device, wherein each received response message carries a pointing direction of the corresponding second terminal device;

[0029] Determine a target device from the at least one second terminal device according to the pointing direction of the first terminal device and the pointing directions of each of the second terminal devices, the pointing direction of the target device being opposite to the pointing direction of the first terminal device;

[0030] If the target device is determined, the first target file is shared with the target device.

[0031] The technical solution provided in this embodiment automatically determines the target device through an alignment operation, so that users can quickly share files to the aligned terminal device through simple sharing operations, thereby reducing the complexity of the data transmission process based on P2P connection and improving the convenience of users sharing files.

[0032] In a possible implementation of the second aspect, the sharing operation is a touch operation or a gesture operation.

[0033] In a possible implementation of the second aspect, the target device is located within a first preset range around the first terminal device, so that some devices that are too far away from the first terminal device can be filtered out, thereby improving the accuracy of data sharing.

[0034] In a possible implementation manner of the second aspect, each of the received response messages further carries a device position of a corresponding second terminal device, and determining a target device from the at least one second terminal device according to the pointing direction of the first terminal device and the pointing directions of each of the second terminal devices includes:

[0035] For each response message received, if the device position in the response message is within a first preset range centered on the device position of the first terminal device, and the pointing direction in the response message is relative to the pointing direction of the first terminal device, the second terminal device sending the response message is determined as the target device.

[0036] In a possible implementation manner of the second aspect, sharing the first target file with the target device includes:

[0037] Sending a second notification message corresponding to the first target file to the target device;

[0038] If a resource request message for requesting the first target file returned by the target device is received, the first target file is transmitted to the target device.

[0039] In the above implementation, the second terminal device can inform the first terminal device whether to receive the first target file by whether a resource request message is generated, which can improve the flexibility of file sharing.

[0040] In a possible implementation of the second aspect, the method further includes: if the target device is not determined, prompting that there is no target device. This makes it easier for users to understand the device determination situation and improves user experience.

[0041] In a possible implementation of the second aspect, when the target device is located within a second preset range with the pointing line of the first terminal device as the center line, and the azimuth angle between the pointing direction and the reverse direction of the pointing direction of the first terminal device is within a preset angle range, it is determined that the pointing direction of the target device is relative to the pointing direction of the first terminal device.

[0042] In the above implementation, when determining whether the pointing directions of the two devices are relative, a certain pointing error is allowed, which is convenient for users.

[0043] In a possible implementation manner of the second aspect, the method further includes:

[0044] If a first notification message corresponding to the second target file is received, a response message is sent to the second terminal device that sent the first notification message, wherein the response message sent carries the pointing direction of the first terminal device;

[0045] If a second notification message corresponding to the second target file is received, sending a resource request message for requesting the second target file to the second terminal device that sent the second notification message if the second target file is not stored;

[0046] The second target file is received.

[0047] In a third aspect, an embodiment of the present application provides a wireless communication apparatus, applied to a first terminal device, including:

[0048] A communication module, configured to broadcast a detection request message carrying filtering information of the first terminal device;

[0049] A processing module is used to determine that a wireless fidelity point-to-point connection between the first terminal device and the second terminal device has been established if the communication module receives a detection response message carrying filtering information of the second terminal device, and the filtering information of the first terminal device matches the filtering information of the second terminal device.

[0050] In a possible implementation of the third aspect, the processing module is also used for: if the communication module receives a detection request message carrying filtering information of a third terminal device, and the filtering information of the first terminal device matches the filtering information of the third terminal device, then determining that a wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and sending a detection response message carrying the filtering information of the first terminal device to the third terminal device.

[0051] In a possible implementation of the third aspect, the filtering information includes at least one of the following information: account information, group information, user input information and short-range communication identification information, and the input information includes text information or voice information.

[0052] In a possible implementation manner of the third aspect, the processing module is further used to:

[0053] Generate a virtual IP address of the first terminal device and a virtual IP address of a target terminal device, wherein the target terminal device is a terminal device with which a wireless fidelity point-to-point connection has been established;

[0054] Data is transmitted with the target terminal device based on the virtual IP address.

[0055] In a possible implementation manner of the third aspect, during the data transmission process, neither the first message sent by the first terminal device to the target terminal device nor the second message received from the target terminal device includes IP address information;

[0056] During the process of processing the second message, the first terminal device adds virtual IP address information to the data packet corresponding to the second message passed to the network layer, the destination IP address in the virtual IP address information is the virtual IP address of the first terminal device, and the source IP address in the virtual IP address information is the virtual IP address of the target terminal device that sends the second message.

[0057] In a possible implementation manner of the third aspect, the device further includes:

[0058] A display module, configured to display a first interface in response to a user triggering operation on a video call function before the broadcasting of the detection request message carrying the filtering information of the first terminal device;

[0059] An input module, used for receiving a filtering information setting operation performed by a user on the first interface;

[0060] The processing module is further used to: determine the filtering information of the first terminal device in response to the filtering information setting operation;

[0061] The communication module is further used to: after establishing a wireless fidelity point-to-point connection, transmit the collected video image to a target terminal device, the target terminal device being a terminal device with which a wireless fidelity point-to-point connection has been established;

[0062] The display module is further used for displaying the video image captured by the target terminal device after the communication module receives the video image.

[0063] In a possible implementation of the third aspect, the display module is specifically used to: if the target terminal device includes multiple ones, display the video image captured by one of the target terminal devices in the main window, and display the video images captured by other target terminal devices in a floating sub-window, wherein the size of the main window is larger than the size of the sub-window.

[0064] In a possible implementation manner of the third aspect, the filtering information includes a pointing direction of the device, and the pointing directions of any two terminal devices that match the filtering information are relative, and the communication module is further configured to:

[0065] A first target file is shared with a target terminal device, and / or a second target file is received from the target terminal device, wherein the target terminal device is a terminal device with which a wireless fidelity point-to-point connection has been established.

[0066] In a fourth aspect, an embodiment of the present application provides a wireless communication device, applied to a first terminal device, including: a communication module, an input module and a processing module, wherein:

[0067] The communication module is used to: establish a wireless communication connection with at least one second terminal device;

[0068] The input module is used to: receive a user's sharing operation on a first target file;

[0069] The processing module is used for: in response to a user's sharing operation on a first target file, broadcasting a first notification message corresponding to the first target file through the communication module;

[0070] The communication module is further used to: receive a response message sent by the at least one second terminal device, each received response message carries the pointing direction of the corresponding second terminal device;

[0071] The processing module is also used to: determine the target device from the at least one second terminal device according to the pointing direction of the first terminal device and the pointing direction of each of the second terminal devices; and when the target device is determined, share the first target file with the target device through the communication module, and the pointing direction of the target device is relative to the pointing direction of the first terminal device.

[0072] In a possible implementation of the fourth aspect, the sharing operation is a touch operation or a gesture operation.

[0073] In a possible implementation manner of the fourth aspect, the target device is located within a first preset range around the first terminal device.

[0074] In a possible implementation manner of the fourth aspect, each of the received response messages further carries a device location of a corresponding second terminal device, and the processing module is specifically configured to:

[0075] For each response message received, if the device position in the response message is within a first preset range centered on the device position of the first terminal device, and the pointing direction in the response message is relative to the pointing direction of the first terminal device, the second terminal device sending the response message is determined as the target device.

[0076] In a possible implementation manner of the fourth aspect, the communication module is specifically used to:

[0077] Sending a second notification message corresponding to the first target file to the target device;

[0078] If a resource request message for requesting the first target file returned by the target device is received, the first target file is transmitted to the target device.

[0079] In a possible implementation manner of the fourth aspect, the processing module is further configured to: if the target device is not determined, prompt that there is no target device.

[0080] In a possible implementation of the fourth aspect, the processing module is specifically used to: when the target device is located within a second preset range with the pointing line of the first terminal device as the center line, and the azimuth angle between the pointing direction and the reverse direction of the pointing direction of the first terminal device is within a preset angle range, determine that the pointing direction of the target device is relative to the pointing direction of the first terminal device.

[0081] In a possible implementation manner of the fourth aspect, the communication module is further used to:

[0082] If a first notification message corresponding to the second target file is received, a response message is sent to the second terminal device that sent the first notification message, wherein the response message sent carries the pointing direction of the first terminal device;

[0083] If a second notification message corresponding to the second target file is received, sending a resource request message for requesting the second target file to the second terminal device that sent the second notification message if the second target file is not stored;

[0084] The second target file is received.

[0085] In a fifth aspect, an embodiment of the present application provides a terminal device, comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to execute the method described in the first aspect or the second aspect above when calling the computer program.

[0086] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in the first aspect or the second aspect above is implemented.

[0087] In a seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method described in the first or second aspect above.

[0088] In an eighth aspect, an embodiment of the present application provides a chip system, including a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method described in the first aspect or the second aspect above. The chip system may be a single chip or a chip module composed of multiple chips.

[0089] It can be understood that the methods described in the first and second aspects above can be combined with each other to form a new implementation method. When the two are combined, the second terminal device described in the second aspect can also include the third terminal device described in the first aspect, that is, the second terminal device described in the second aspect can be represented by the target terminal device described in the first aspect; in addition, the beneficial effects of the third to eighth aspects above can be found in the relevant descriptions in the first and second aspects above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] Figure 1 A schematic diagram of the system architecture of a wireless communication method provided in an embodiment of the present application;

[0091] Figure 2 A schematic diagram of an application interface provided in an embodiment of the present application;

[0092] Figure 3 A schematic diagram of a device discovery process according to an embodiment of the present invention;

[0093] Figure 4 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0094] Figure 5 A schematic diagram of another application scenario provided for an embodiment of the present application;

[0095] Figure 6 A flowchart of a wireless communication method provided in an embodiment of the present application;

[0096] Figure 7 Another application interface diagram provided in the embodiment of the present application;

[0097] Figure 8 A schematic diagram of another application interface provided in an embodiment of the present application;

[0098] Fig. 9 Some application interface schematic diagrams provided for embodiments of the present application;

[0099] Fig.10 A schematic diagram of a filtering search process provided in an embodiment of the present application;

[0100] Fig.11 A schematic diagram of the frame structure of a probe request frame and a probe response frame provided in an embodiment of the present application;

[0101] Fig.12 A schematic diagram of another application interface provided in an embodiment of the present application;

[0102] Fig.13 A schematic diagram of another application interface provided in an embodiment of the present application;

[0103] Fig.14 A schematic diagram of a message structure provided for an embodiment of the present application;

[0104] Fig.15 A schematic diagram of another application interface provided in an embodiment of the present application;

[0105] Fig.16 A schematic diagram of another application interface provided in an embodiment of the present application;

[0106] Fig.17 A file sharing schematic diagram provided for an embodiment of the present application;

[0107] Fig.18 A schematic diagram of the file sharing process provided in the embodiment of the present application;

[0108] Fig.19 A schematic diagram of an application scenario of file sharing provided in an embodiment of the present application;

[0109] Fig. 20 A schematic diagram of the address information of each message in the file sharing provided in the embodiment of the present application;

[0110] Fig.21 A schematic diagram of determining the location range of a target device provided in an embodiment of the present application;

[0111] Fig. 22 Another file sharing schematic diagram provided for an embodiment of the present application;

[0112] Fig.23 Another file sharing schematic diagram provided for an embodiment of the present application;

[0113] Fig.24 A schematic diagram of the structure of a wireless communication device provided in an embodiment of the present application;

[0114] Fig.25 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0115] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method part of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0116] First, the application scenario of the embodiment of the present application is introduced. The technical solution provided in the embodiment of the present application can be applied to various Wi-Fi P2P connection scenarios. For the sake of convenience, the present embodiment takes the Wi-Fi direct connection scenario as an example for exemplary description.

[0117] Figure 1 A schematic diagram of the system architecture of the wireless communication method provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the system may include multiple terminal devices (three are used as an example for illustrative purposes), and Wi-Fi direct connections can be established between the terminal devices to share data with each other through the established connections. Among them, the terminal device can be Figure 1 The mobile phone 1100, tablet computer (pad) 1200, and TV 1300 shown in the figure may also be a large-screen device, a desktop computer, a notebook or a wearable device not shown, or other terminal devices supporting the Wi-Fi direct connection function.

[0118] Specifically, a wireless connection can be established between terminal devices using standard Wi-Fi Direct technology, that is, a group can be established between terminal devices. In the group, one terminal device plays the role of group owner (GO), and the other terminal devices play the role of group client (GC). A Wi-Fi Direct connection is established between the GO and each GC.

[0119] The connection establishment process between the GO and any GC may include processes such as device discovery and group formation. The two devices discover each other through the device discovery process and conduct GO negotiation and exchange security configuration information through the group formation process.

[0120] Figure 2 A schematic diagram of an application interface provided in an embodiment of the present application, such as Figure 2 As shown in (a) of FIG. 1 , the user can click the Wi-Fi Direct option 101 in the Wi-Fi setting interface 10 on the mobile phone 1100 to open the Wi-Fi Direct interface 20 and start the Wi-Fi Direct function. After the Wi-Fi Direct function is started, the terminal device will initiate a device discovery process to search for surrounding Wi-Fi Direct devices, such as Figure 2 As shown in (b) of FIG. 1 , a prompt message such as “Searching” may be displayed in the available device column 202 to prompt the user that the available Wi-Fi Direct devices are being searched. In the Wi-Fi Direct interface 20, the user may edit the name of the local Wi-Fi Direct device through the device name option 211 in the My Device column 201, such as Figure 2 The Wi-Fi Direct device name of the mobile phone 1100 shown in FIG. 1 is “AAA”.

[0121] The following takes two terminal devices (respectively a first terminal device and a second terminal device) as an example to illustrate the process of establishing a Wi-Fi direct connection.

[0122] Figure 3 A schematic diagram of the device discovery process provided in the embodiment of the present application is shown in FIG. Figure 3 As shown, the device discovery process may include: a scan phase and a find phase.

[0123] Scanning phase: After the device discovery process is started, the terminal device (including the first terminal device and the second terminal device) will first enter the scanning phase. During this phase, the terminal device sends a probe request frame on all frequency bands it supports. The terminal device does not process the probe request frame from other devices during this phase. It can receive the probe response frame to discover other terminal devices in the listening state.

[0124] Discovery phase: After the scanning phase is completed, the terminal device enters the discovery phase. During this phase, the terminal device switches back and forth between the listening state and the search state.

[0125] In the listening state, the terminal device randomly selects a frequency band from the 1, 6 and 11 frequency bands (i.e., ch1, ch6 and ch11 in the figure, called social channels) as the listening frequency band, listens to the probe request frame and replies with the probe response frame accordingly. For example, Figure 2 The monitoring frequency band of the first terminal device is 1, and the monitoring frequency band of the second terminal device is 6. The terminal device enters the search state after monitoring for a period of time.

[0126] In the search state, the terminal device will send a probe request frame on bands 1, 6, and 11. When two terminal devices are in the same band, the frames sent by one can be received by the other. For example, Figure 2 The second terminal device monitors the detection request frame sent by the first terminal device on ch6, and replies with a detection response frame to the first terminal device.

[0127] When the terminal device completes the interaction of the probe request frame and the probe response frame, that is, discovers the Wi-Fi Direct device, it can store the device information of the other device, including the media access control (MAC) address, device type, and device name.

[0128] like Figure 2 As shown in (c) in the figure, once the terminal device searches for a Wi-Fi Direct device, it updates the interface to display the searched Wi-Fi Direct device. For example, the available device column 202 in the figure displays the searched "BBB" (device name of pad1200) and "CCC" (device name of TV 1300). The user can select a Wi-Fi Direct device in the interface to establish a connection with it, for example, Figure 2 As shown in (c) and (d) in the figure, the user can click on “BBB” to establish a connection with it.

[0129] After the user selects the Wi-Fi Direct device to be connected, the terminal device can start the group establishment process (corresponding to the figure to start the group establishment) to prepare to construct a Group, which may include the GO negotiation (GO negotiation, GON) process and the security configuration (provisioning) process. Among them, the GON process is used to negotiate who will be the GO. After the GON process is completed, the security configuration process is carried out. This process mainly uses the Wi-Fi simple configuration (Wi-Fi simple configuration, WSC) protocol to negotiate security configuration information.

[0130] After the group establishment process is completed, the GC applies for an Internet protocol (IP) address from the GO. The GO starts a dynamic host configuration protocol (DHCP) server to assign an IP address to the GC. After the IP address is assigned, the terminal device can update the connection status to inform the user that the connection is successful. For example, Figure 2 As shown in (d) in FIG. 1 , the connection status of “BBB” is updated to “connected”. After the group is dissolved, the IP address of GC can be released.

[0131] After the group is established, the GO and GC can also invite other terminal devices to join the group through the P2P invitation process; during the device discovery process, the terminal device can also activate a previously established persistent group through the P2P invitation process.

[0132] In addition, if Figure 2 As shown in (b) and (c) in FIG. 1 , the user can stop the search by clicking the stop icon 203 in the Wi-Fi Direct interface 20 during the search process; Figure 2 As shown in (d) in FIG. 1 , the user may also start the device discovery process again by clicking the search icon 204 in the Wi-Fi Direct interface 20 after the search is completed.

[0133] According to the Wi-Fi Direct protocol, the default IP address of GO is 192.168.49.1, that is, the IP address of GO in any group is 192.168.49.1. In this way, the IP addresses of GOs in different groups overlap and may interfere with each other, resulting in unstable connection of terminal devices. Figure 4 A schematic diagram of an application scenario provided in an embodiment of the present application, for example Figure 4As shown in , A1, B1 and C1 are a group, A2, B2, C2 and D2 are a group, A1 and A2 are the GOs of their respective groups, and the default IP addresses of both are 192.168.49.1. In a relatively small space (such as in the same subway car), two groups want to share audio, video or pictures and other data internally at the same time; during the communication process, since A1 and A2 have the same IP address, each GC: B1, C1, B2, C2 and D2 cannot automatically determine which GO to connect to, and cannot be manually intervened; and after connecting to the wrong GO, even if the wrong GO leaves, the GC still needs a long time to restore the initial state and reconnect to the new GO, which will affect the connection stability of the terminal device.

[0134] In addition, the GC address is dynamically allocated by the GO, which may also affect the connection stability of the terminal device. Figure 5 Another application scenario diagram provided in the embodiment of the present application is as follows: Figure 5 As shown in the figure, A3, B3 and C3 are a group, and the three share data with each other, among which A3 is the GO. During the sharing process, A3 leaves, and D3 wants to join the group. Since A3 is the GO, after A3 leaves, the group is disbanded, and B3 and C3 cannot continue to share data. D3 cannot obtain the IP address in time, and thus cannot participate in data sharing. B3, C3 and D3 need to re-establish a group to continue sharing data.

[0135] In addition, the device discovery, negotiation and connection process in the Wi-Fi Direct protocol is complex, requires too many resources, and has a large system overhead, making it too heavy for thin devices. Moreover, during the device discovery process, all surrounding terminal devices in the device discovery state are scanned by default, so the search efficiency is low, and the operation interface corresponding to the search results is not simple enough. Moreover, if irrelevant terminal devices are searched and connected by mistake, there may be security risks.

[0136] To this end, the embodiment of the present application provides a lightweight wireless communication method, which mainly simplifies the Wi-Fi direct connection protocol and process, cuts out the group establishment and P2P invitation process, and adopts a decentralized approach to group management, that is, the devices at both ends are connected in a peer-to-peer manner, and the distinction between GO and GC roles is cancelled; and IP address management can also adopt a decentralized approach, canceling the unified management and allocation of GC's IP address, virtualizing the IP address, and locally managing the virtual IP addresses of the local and opposite ends by the terminal device, and forwarding the data by the data link layer to solve the problem of unstable automatic connection of the terminal device due to overlapping GO's IP address; in addition, in the device discovery process, the terminal device is searched and filtered to improve the search efficiency and security and optimize the operation interface. The technical solution is described in detail below.

[0137] Figure 6A flow chart of a wireless communication method provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the wireless communication method provided in this embodiment may include the following steps:

[0138] S110: The first terminal device searches for a second terminal device that meets a filtering condition of the first terminal in response to a connection triggering operation by a user.

[0139] S120: The first terminal device sets the Wi-Fi direct connection state between itself and the searched second terminal device to a connected state.

[0140] Specifically, the user can enable the Wi-Fi Direct function through a connection trigger operation, wherein the connection trigger operation can be a user's trigger operation on the target system function. For example, the user can Figure 3 As shown in (a) of FIG. 1 , click the Wi-Fi Direct option in the Wi-Fi setting interface to enable the Wi-Fi Direct function; as another implementation method, the first terminal device may also provide a quick option, such as Figure 7 As shown in , a Wi-Fi Direct icon can be provided in the drop-down notification bar, and the user can enable the Wi-Fi Direct function by clicking the icon. Among them, the Wi-Fi Direct function can only be enabled when the Wi-Fi function is enabled. Therefore, when receiving the user's connection trigger operation, the terminal device can automatically enable the Wi-Fi function and then enable the Wi-Fi Direct function when the Wi-Fi function is not enabled; it can also prompt the user to enable the Wi-Fi Direct function after the user authorizes to enable the Wi-Fi function.

[0141] In order to improve the convenience of user use, in this embodiment, when the user starts the target application (APP) or target function, the target APP or target function can be triggered to automatically start the Wi-Fi Direct function. For example, when the user clicks the gallery icon to open the gallery, the gallery automatically starts the Wi-Fi Direct function; for another example, when the user clicks the video call function to initiate a video call, the video call function automatically starts the Wi-Fi Direct function and searches for available Wi-Fi Direct devices to establish a connection.

[0142] It is understandable that the target application is not limited to the above-mentioned gallery, it can also be a file management APP or other instant messaging APP, etc., and the embodiments of the present application do not specifically limit this.

[0143] Of course, the user can enable the Wi-Fi Direct function by inputting a voice command, and this embodiment does not specifically limit this. In addition, the connection trigger operation can also be a user clicking the Wi-Fi Direct option to open the Wi-Fi Direct interface, and then clicking the search icon in the Wi-Fi Direct interface.

[0144] After the first terminal device detects the user's connection trigger operation, it can respond to the operation and enter the device discovery process to perform a filtering search to search for a second terminal device that meets the filtering conditions of this end, wherein the filtering conditions can be system preset, for example: the first terminal device automatically searches for the second terminal device that is logged in to the same system account as it; in order to increase the flexibility of user use, the first terminal device can also provide a filtering condition setting function for the user to independently set the filtering conditions.

[0145] In the specific implementation, Figure 8 As shown in (a), except Figure 2 In addition to the various functional options shown in FIG. 4 , the Wi-Fi direct connection interface 20 may also include a filter condition option 203, and the user may click the filter condition option 203 to open the filter condition interface 40; Figure 8 As shown in (b) in FIG. 4 , the filter condition interface 40 may include various filter condition options, and the user may set the desired filter condition in the filter condition interface 40 .

[0146] Specifically, Figure 8 As shown in (b), the filtering conditions may include system account filtering, group filtering, password filtering, voice filtering and near field communication (NFC) filtering, etc. The filtering condition interface 40 may provide switch controls 401 to 405 corresponding to each filtering condition, and the user may choose to enable one or more filtering conditions through these switch controls, that is, the filtering conditions may include one or more.

[0147] For system account filtering, if it is turned on by the user, the first terminal device can automatically search for a second terminal device that logs in to the same system account as the first terminal device during the search process. Optionally, the embodiments of the present application are not limited to filtering system accounts, and other accounts can also be filtered during specific implementation.

[0148] For group filtering, if the user has pre-established a target group, such as a family group (including relevant information of the terminal devices of all family members) and an adult group (excluding relevant information of the terminal devices held by minors in the family), the group filtering can also be turned on and group filtering conditions can be added when performing terminal search filtering. As shown in the figure, an edit option 4021 for the group name can be set in the column where the group filtering option is located, so that the user can edit the specific conditions for the group filtering. Optionally, the specific conditions for the group filtering can also be other group identification information such as the group number, which is not particularly limited in the embodiments of the present application. If the group filtering is turned on, the first terminal device can automatically search for the second terminal device in the target group selected by the user during the search process. For example, the user sets the group name in the group filtering to be a family group, and the first terminal device searches for the terminal devices (i.e., the second terminal devices) of each member in the family group.

[0149] For password filtering (also known as password filtering), as shown in the figure, a password editing option 4031 can be set in the column where the password filtering option is located, and the user can set the password through this option while turning on the password filtering. If the password filtering is turned on, the first terminal device can automatically search for the second terminal device with the same password set during the search process. Optionally, the embodiment of the present application is not limited to filtering passwords, and in the specific implementation, text information can also be filtered.

[0150] For voice filtering, if it is turned on by the user, the first terminal device can automatically collect the voice information input by the user after the Wi-Fi direct connection function is turned on, generate filtering information based on the collected voice information, and then automatically search for the second terminal device carrying the same filtering information in the detection message during the search process. For this filtering condition, in specific applications, since the distance between the terminal devices is relatively close, any user around the terminal device can send a voice message, and each terminal device can collect the voice information and generate filtering information corresponding to the filtering condition based on the voice information.

[0151] For NFC filtering, after turning on the Wi-Fi direct function of the first terminal device, the user can "touch" the first terminal device with the second terminal device that needs to establish a connection; the first terminal device can then collect the NFC information of the second terminal device (for example, it can be an NFC identifier), and then search for the second terminal device corresponding to the collected NFC information during the search process. In specific implementation, the first terminal device can generate filtering information based on the NFC information of the local terminal and the collected NFC information.

[0152] It is understandable that if the user does not enable any filtering conditions, the first terminal device can also perform device discovery and negotiation processes according to the standard Wi-Fi Direct protocol to establish a connection.

[0153] As another implementation method, the first terminal device may provide filtering functions corresponding to the above-mentioned various filtering conditions for the target application to call. After the target application turns on the Wi-Fi Direct function, the target application automatically enables at least one filtering function. For example, after the user opens the gallery, the gallery starts the system account filtering function while turning on the Wi-Fi Direct function, and searches for the second terminal device logged in to the same system account; for another example, after the user turns on the video call function, he can input voice to initiate a video call. The video call function starts the voice filtering function while turning on the Wi-Fi Direct function, and uses the voice input by the user as a filtering condition for filtering and searching; alternatively, the target APP or target function may also provide a startup option for the filtering function, and the user can start the corresponding filtering function by clicking the startup option. The following takes the video call function as an example of the target function to illustrate the process of the user turning on the Wi-Fi Direct function and starting the filtering function.

[0154] Fig. 9 Some application interface schematic diagrams provided for the embodiments of the present application, such as Fig. 9 As shown in (a) of FIG. 1 , a video call icon 3012 may be provided in the pull-down notification bar, and the user may click the icon to start the video call function. After the video call function is started, the Wi-Fi direct connection function may be automatically started as described above, or the Wi-Fi direct connection function may be automatically started as described above. Fig. 9 As shown in (b) of FIG. 1 , the user is prompted to authorize the Wi-Fi Direct function and the Wi-Fi function. The user can select the Enable option to enable the Wi-Fi Direct function and the Wi-Fi function, such as Fig. 9 As shown in (c), after the Wi-Fi Direct function is turned on, the video call function can provide startup options for various filtering conditions corresponding to the filtering function: system account filtering option 001, group filtering option 002, password filtering option 003, voice filtering option 004 and NFC filtering option 005. Among them, for system account filtering option 001, after the user clicks it, the first terminal device can search for available Wi-Fi Direct devices to establish a connection; for group filtering option 002 and password filtering option 003, after the user selects them, the video call function can provide an input interface for the user to enter group information or password information; for voice filtering option 004 and NFC filtering option 005, after the user selects them, the first terminal device can prompt the user to enter voice information or perform a "touch and pay" operation. Taking password filtering as an example, if Fig. 9 As shown in (c) and (d) in the figure, the user can click the password filtering option 003, and then enter the password in the pop-up input interface, wherein the number of digits of the password can be preset to 4 digits as shown in the figure, or the number of digits can be unlimited.

[0155] It is understandable that the video call function can also be displayed to the user in the form of an APP, and the specific implementation form is not particularly limited in this embodiment.

[0156] The search process of the first terminal device and the second terminal device is described in detail below.

[0157] As described above, the first terminal device can carry filtering information corresponding to the filtering conditions in the detection message, and the detection message can include a detection request message and a detection request response message, wherein the detection request message can specifically be a detection request frame, and the detection request response message can specifically be a detection response frame, that is, the first terminal device can carry filtering information in the detection request frame and the detection response frame; the filtering information can be the system account, group identifier, password, voice information or NFC information and other information in the above-mentioned filtering conditions. In order to improve the security of data transmission, the filtering information can also be character information generated based on the above-mentioned system account, group identifier, password, voice information or NFC information and other information. Correspondingly, when the first terminal device and the second terminal device search for each other, they can use Fig.10 The method shown is implemented as, Fig.10 A flowchart of a filtering search provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, the method may include the following steps:

[0158] S111. The first terminal device broadcasts a detection request frame carrying first filtering information.

[0159] Specifically, the second terminal device may also set filtering conditions, and the specific setting process is similar to the filtering condition setting process of the first terminal device, which will not be repeated here. For the sake of distinction, the filtering information corresponding to the filtering condition in the first terminal device is referred to as the first filtering information, and the filtering information corresponding to the filtering condition in the second terminal device is referred to as the second filtering information.

[0160] After the Wi-Fi Direct function is turned on, the first terminal device can broadcast a detection request frame on all channels or social channels as described above. In order to facilitate the peer device to know the filtering conditions of the first terminal device, the first terminal device can carry the first filtering information in the detection request frame, so that the second terminal device can reply with a response message if the filtering conditions are met, so as to inform the first terminal device that it meets the filtering conditions.

[0161] Fig.11 A schematic diagram of the frame structure of a probe request frame and a probe response frame provided in an embodiment of the present application, such as Fig.11As shown, the probe request frame may include a MAC header, a frame body, and a frame check sequence (FCS) field, wherein the MAC header may include some frame control information and address information, etc.; the frame body represents the data field, which is the effective load; and the FCS is used to ensure the integrity of the frame data.

[0162] The first filtering information may be carried in the frame body. In specific implementation, a characteristic parameter (character code) field may be added to the frame body to indicate the first filtering information. The characteristic parameter field may be located at any position in the frame body.

[0163] S112: After receiving the detection request frame, the second terminal device determines whether the first filtering information carried in the detection request frame matches the second filtering information. If they match, it is determined that the first terminal device meets the filtering condition of the local end.

[0164] The second terminal device can be similar to the first terminal device. It responds to the user's connection trigger operation and enables the Wi-Fi direct connection function. The specific process is similar to the process of enabling the Wi-Fi direct connection function of the first terminal device, and will not be repeated here.

[0165] After turning on the Wi-Fi Direct function, the second terminal device can monitor the detection request frame on the monitoring frequency band as described above. If the second terminal device monitors the detection request frame, it can extract the first filter information therein and compare it with the filter information corresponding to the filter condition of this end (i.e., the second filter information) to determine whether the first terminal device meets the filter condition of this end. If the first filter information matches the second filter information, it means that the first terminal device meets the filter condition of the second terminal device; if the first filter information does not match the second filter information, the second terminal device can discard the detection request frame and refuse to connect to the first terminal device.

[0166] When making specific judgments, for filtering conditions such as account, group, password and NFC, the first filtering information can be compared with the second filtering information to see if they are consistent. If they are consistent, the two are considered to match; for voice filtering, the similarity between the first filtering information and the second filtering information can be compared. If the similarity meets the preset similarity, the two are considered to match, where the size of the preset similarity can be set according to actual needs.

[0167] S113. The second terminal device returns a detection response frame carrying the second filtering information to the first terminal device.

[0168] If the second terminal device determines that the first filtering information carried in the detection request frame matches the second filtering information, it can reply with a detection response frame accordingly to inform the first terminal device that the filtering conditions of the two are consistent, that is, the first terminal device and the second terminal device meet the filtering conditions of the other end. Alternatively, confirmation information can be carried in the detection response frame to inform the first terminal device that the filtering conditions of the two are consistent.

[0169] In order to improve reliability, the second terminal device may also carry second filtering information in the frame to inform the first terminal device of the filtering condition of the local end.

[0170] like Fig.11 As shown, the probe response frame may include a MAC frame header, a frame body and an FCS field. Similar to the first filtering information, the second filtering information may be carried in the frame body of the probe response frame. Similarly, a characteristic parameter field may be added to the frame body of the probe response frame to indicate the second filtering information, wherein the characteristic parameter field may be located at any position in the frame body.

[0171] It is understandable that the probe request frame and the probe response frame may also carry device information such as the device identification, device name, device type and MAC address of the local device for identification by the peer device.

[0172] S114. After receiving the detection response frame, the first terminal device determines whether the second filtering information carried in the detection response frame matches the first filtering information. If they match, it is determined that the second terminal device meets the filtering conditions of this end.

[0173] Specifically, the first terminal device receives the detection response frame replied by the second terminal device, and can determine that the second terminal device meets the filtering condition of the local end.

[0174] As mentioned above, in order to improve reliability, the detection response frame can carry second filtering information. Correspondingly, the first terminal device can extract the second filtering information therein and compare it with the filtering information corresponding to the filtering conditions of this end (i.e., the first filtering information), and determine whether the second terminal device meets the filtering conditions of this end based on the comparison result.

[0175] Specifically, if the first filtering information matches the second filtering information, it means that the second terminal device meets the filtering condition of the first terminal device; if the first filtering information does not match the second filtering information, it means that the second terminal device does not meet the filtering condition of the first terminal device, and the first terminal device can discard the detection response frame and refuse to connect with the second terminal device. The process of the first terminal device judging whether the first filtering information matches the second filtering information is similar to the filtering information judgment process of the second terminal device, which will not be repeated here.

[0176] In the near-field communication scenario, the communicating parties are in the same local area network and can communicate with each other directly through the physical layer and the data link layer. Therefore, in this embodiment, when data is transmitted between terminal devices, the data packet may not carry the IP address, and communication is carried out through the physical layer and the data link layer. Correspondingly, the IP address allocation process can be cut out, and then the group establishment process and the P2P invitation process can be cut out. In this way, when the first terminal device searches for a second terminal device that meets the filtering conditions, it can be indicated that the connection is successfully established, and the Wi-Fi direct connection status of the searched second terminal device can be displayed as connected. Similarly, the searched second terminal device can also display the Wi-Fi direct connection status of the first terminal device as connected. Among them, the second terminal device searched by the first terminal device may include one or more.

[0177] It can be understood that the first terminal device and the second terminal device are just for distinguishing descriptions. For a certain terminal device, it can be used as a first terminal device or as a second terminal device, that is, the first terminal device and the second terminal device can both have the functions of each other. For example: for the first terminal device, it can also receive the detection request frame broadcast by other terminal devices (referred to as the third terminal device). When it is determined that the first filtering information matches the filtering information of the third terminal device carried in the detection request frame, it can be determined that the third terminal device meets the filtering conditions of this end, and a detection response frame carrying the first filtering information can be returned to the third terminal device; correspondingly, the third terminal device can determine that the first terminal device meets the filtering conditions of the third terminal device when it determines that its own filtering information matches the first filtering information in the detection response frame. That is, any terminal device can use Fig.10 The search process performed by the first terminal device shown in the figure, and / or the search process performed by the second terminal device to establish a Wi-Fi direct connection with other terminal devices.

[0178] For example, three terminal devices aaa, bbb and ccc search for each other and establish connections. Assume that the filtering conditions of aaa and bbb are the same, and they log in to the same system account, but the system account logged in by ccc is different from that of aaa and bbb. Fig.12 As shown in (a) of FIG. 1 , the user clicks on the Wi-Fi direct connection options of the three terminal devices to start the Wi-Fi direct connection function; Fig.12 As shown in (b) of FIG. 1 , three terminal devices begin to search for available Wi-Fi direct devices in the surrounding area. Fig.12 As shown in (c), aaa and bbb can search for each other and establish a connection. ccc does not meet the filtering conditions of aaa and bbb and is filtered out during the search process of aaa and bbb. It cannot establish a connection with aaa and bbb.

[0179] like Fig.13 As shown in (a) in the figure, the user can also click the file management icons 5 of the three terminal devices to open the file management APP, and the file management APP automatically starts the Wi-Fi direct connection function; aaa and bbb can search for each other and establish a connection based on the same system account (filter information), and ccc cannot establish a connection with aaa and bbb. Fig.13 As shown in (b), the user can view the connected Wi-Fi direct devices in the other device column 501 of the file management interface 50 corresponding to the file management icon 5, wherein the user can click the browse icon 502 of the file management interface 50 to open the browsing interface to browse files on the local device and other devices, and the other device column 501 can be located in the browsing interface; other functional controls such as a search box can also be provided in the file management interface 50.

[0180] In order to be compatible with upper-layer applications such as the network layer, the first terminal device and the second terminal device can locally generate virtual IP addresses for both parties, wherein the virtual IP address is only valid locally. When transmitting data, the first message sent outward may not carry the IP address. After the second terminal device receives the first message, it can add the virtual IP address to the data packet passed to the network layer for the network layer to identify, wherein the destination IP address is the virtual IP address of the second terminal device, and the source virtual IP address is the virtual IP address of the first terminal device; similarly, when the second terminal device returns a second message to the first terminal device, the second message may not carry the IP address. After the first terminal device receives the second message returned by the second terminal device, it adds the virtual IP address for the network layer to identify, wherein the destination IP address is the virtual IP address of the first terminal device, and the source virtual IP address is the virtual IP address of the second terminal device.

[0181] Fig.14 A schematic diagram of a message structure provided in an embodiment of the present application, such as Fig.14 As shown in (a) in the standard Wi-Fi Direct protocol, the packet header of the network layer contains the IP address, the packet header of the data link layer contains the MAC address, and the Ethernet payload part contains the IP address and the IP payload; Fig.14 As shown in (b), in this scheme, the above-mentioned unicast message includes the virtual IP addresses of the first terminal device and the second terminal device in the data packet corresponding to the network layer, the header of the data packet corresponding to the data link layer includes the MAC address, and the Ethernet payload part does not include the IP address information.

[0182] For multicast messages, when sending, the terminal device can add a multicast address in the IP header of the multicast message, where the destination IP address can be the multicast IP address and the source IP address can be the agreed virtual IP address; optionally, the multicast message can also be similar to the unicast message and does not carry the IP address when sent out. The setting method of the broadcast message is similar to that of the multicast message, and will not be repeated here.

[0183] Among them, the terminal device can generate a virtual IP address based on the MAC address or other device information. For example, the terminal device can generate a local virtual IP address based on its own MAC address after the Wi-Fi Direct function is started. After searching for the peer device, the terminal device can generate a virtual IP address for the peer device based on the MAC address of the peer device.

[0184] The beneficial effects of this scheme are described below: Figure 4 In the scenario shown, in this solution, A1, B1 and C1 can set the same filtering condition (for example, enter the same password), so that any two of them can establish a Wi-Fi direct connection and share resources with each other; similarly, A2, B2, C2 and D2 can also set the same filtering condition and establish a Wi-Fi direct connection to share resources. Each terminal device communicates with each other through its own unique MAC address, and the virtual IP address is managed locally, which can reduce the phenomenon of connection errors and effectively improve the connection stability between terminal devices.

[0185] for Figure 5 In the scenario shown, the same filtering condition can be set between A3, B3 and C3 (for example, logging in to the same system account), and connections can be established between each other; if A3 leaves during the sharing process and D3 wants to join, on the one hand, due to the peer connection between A3, B3 and C3, A3's departure does not affect the connection between B3 and C3; on the other hand, D3 can use the same filtering condition to search for B3 and C3 and establish connections with B3 and C3. Therefore, B3, C3 and D3 can continue to share data, which further improves the connection stability between terminal devices.

[0186] In addition, in this solution, the connection process of Wi-Fi Direct is simplified, and the group establishment and P2P invitation processes are cut out, thereby reducing the complexity of Wi-Fi Direct connection, thereby reducing resource requirements and expanding the scope of application; in addition, in the device discovery process, terminal devices are searched and filtered through filtering conditions, which can filter out irrelevant terminal devices, improve search efficiency and security, and only the searched terminal devices that meet the filtering conditions are displayed on the interface, so the operation interface can also be optimized.

[0187] After the first terminal device and the second terminal device establish a Wi-Fi direct connection, they can share files, make video calls, edit across devices, wirelessly cast screens, or remotely control each other through the Wi-Fi direct connection. The following uses video calls and file sharing as examples for exemplary description.

[0188] Video calling over Wi-Fi Direct connection:

[0189] For example, in some areas where the mobile communication signal is weak or there is no mobile communication signal and there is no wireless local area network, such as suburbs, users cannot communicate with each other with good quality. At this time, they can communicate with each other through the video call function based on the Wi-Fi direct connection on the terminal device.

[0190] Specifically, each user can use the above Fig. 9 The video call process shown in the figure establishes a video call connection. Let's continue with the password filtering example. Fig.15 As shown in (a) of FIG. 1 , after the user enters the password "1122" and clicks the confirmation option 0031 to confirm, the first terminal device starts searching for available Wi-Fi direct devices to establish a connection; assuming that the user of the second terminal device enters the same password "1122" in the same way, as shown in FIG. Fig.15 As shown in (b), the first terminal device can establish a connection with the second terminal device and make a video call through the connection, that is, transmit the collected video stream based on the established Wi-Fi direct connection.

[0191] Among them, the video call interface can provide a hang-up option and a switch to voice option as shown in the figure; it can also display the video image captured by one of the second terminal devices in the main window when multiple second terminal devices are connected, and display the video images of other second terminal devices in the sub-window, so that the user can switch the video image displayed in the main window, wherein the size of the sub-window is smaller than the size of the main window, and it can be displayed floating on the main window.

[0192] For example: User 1, User 2 and User 3 respectively establish video call connections with each other's terminal devices through the above password filtering method. For each user, the terminal device held by him (i.e., the first terminal device) can display the video images captured by the terminal devices held by the other two users (i.e., the second terminal devices); of the video images captured by the two second terminal devices, one is displayed in the main window and the other is displayed in the sub-window. Assume Fig.15 The first terminal device shown is the terminal device of user 1. The first terminal device first establishes a video call connection with the terminal device held by user 2, and then establishes a video call connection with the terminal device held by user 3. Fig.15As shown in (b), the first terminal device can display the video image captured by the terminal device held by user 2 in the main window, and the video image captured by the terminal device held by user 3 in the sub-window; the user can click on the sub-window to switch the video image displayed in the main window to the video image captured by the terminal device held by user 3.

[0193] Of course, the first terminal device can also display the video image captured by the first terminal device in another sub-window (not shown), and the user can also click on the sub-window to switch the video image displayed in the main window to the video image captured by the first terminal device; the first terminal device can also display the video image captured by the terminal device that last established a connection in the main window by default, that is, the above-mentioned first terminal device can also display the video image captured by the terminal device held by user 3 in the main window by default.

[0194] It should be noted that the above Fig.15 The position and size of the main window and the sub-window are only examples, and are not intended to limit the present application. They can be set as needed during specific implementation, and this embodiment does not specifically limit this.

[0195] In some scenarios, if the distance between two users (for example, user 1 and user 3) is too far, and the distance between another user (for example, user 2) and these two users is closer, a Wi-Fi direct connection cannot be established between the terminal devices of user 1 and user 3. The terminal device of user 2 can establish a Wi-Fi direct connection with the terminal devices of user 1 and user 3 respectively. In this case, user 1 and user 3 can communicate through the terminal device of user 2, that is, the terminal device of user 2 can serve as an intermediate device for communication to achieve communication over longer distances.

[0196] The above-mentioned video calling method does not rely on base station signals and can make video calls anytime and anywhere. Therefore, in some areas where the mobile communication signals are weak or there are no mobile communication signals, the above-mentioned method can be used to make video calls to better meet user needs. In addition, the above-mentioned video calling method does not occupy mobile data traffic, so it can also save traffic resources.

[0197] File sharing based on Wi-Fi Direct connection:

[0198] by Fig.13 Take the terminal device aaa shown in (b) as an example. Fig.16 As shown in (a) of FIG. 5 , the user can select the terminal device bbb that he wants to access in the other device column 501; Fig.16As shown in (b), after the user selects the terminal device bbb, the user can access the files on the terminal bbb and edit and manage the files on the terminal bbb. The accessible files may include the recent files, pictures, videos, audios, documents and other types of files shown in the figure. The files under each type of file may include multiple folders. For example, as shown in the figure, the video files include all video folders, camera folders, screen recording folders, download folders, WeChat folders and QQ folders, etc.

[0199] Fig.17 A file sharing schematic diagram provided in an embodiment of the present application, such as Fig.17 As shown in (a) of FIG. 1 , the user can select a target image S to be shared on the first terminal device, and then click on the sharing option 6 to open the sharing interface 60; Fig.17 As shown in (b) of FIG. 5 , the sharing interface 60 may include other sharing icons such as a WeChat icon 601, a Wi-Fi direct icon 602, a Bluetooth icon 603, and a QQ icon 604. The user may select the Wi-Fi direct icon 602 to open the Wi-Fi direct device selection interface 70; Fig.17 As shown in (c) in FIG. 7 , in the Wi-Fi direct device selection interface 70 , the user can select a target device bbb from the connected second terminal device to share the target image S with the selected target device bbb; Fig.17 As shown in (d), after the user selects the target device bbb, the target device bbb may pop up a dialog box 80 asking the user whether to receive the image. The user may click a receive option 801 in the dialog box 80 to receive the target image S, or click a reject option 802 to reject receiving the target image S.

[0200] It is understandable that the user can also share files with the first terminal device through the second terminal device. The shared files are not limited to pictures, but can also be other types of files such as videos, audios or documents. For the sake of convenience, pictures are used as examples for illustrative purposes in the following. In addition, when selecting the target file to be shared, it can be a click operation, or other selection operations such as a long press operation.

[0201] In order to improve user convenience, an embodiment of the present application provides another file sharing method, which automatically determines the target device mainly through an alignment operation, so that the user can quickly share files to the aligned terminal device through a simple sharing operation.

[0202] It is understandable that after the first terminal device and the second terminal device establish a connection, both parties can share files with each other. For ease of explanation, the following takes the example of the first terminal device sharing files with the connected second terminal device as an example.

[0203] In a specific implementation, the first terminal device can detect the user's touch operation on the target file. If the operation is detected, it can respond to the operation and share the target file with the target device in the connected second terminal device, wherein the pointing direction of the target device is relative to the pointing direction of the first terminal device.

[0204] For the specific process of the first terminal device sharing the target file with the target device, please refer to Fig.18 , Fig.18 A schematic diagram of the file sharing process provided in the embodiment of the present application is as follows: Fig.18 As shown, the process may include the following steps:

[0205] S210. The first terminal device broadcasts a first notification message corresponding to the target file in response to a user's sharing operation on the selected target file.

[0206] Specifically, the sharing operation can be a touch operation or a gesture operation, wherein the touch operation can be a sliding operation, such as sliding up in a target area of ​​the screen (such as the top of the screen), or other predefined touch operations such as a combo operation; the gesture operation can be a sliding gesture or other predefined gestures, which are not particularly limited in the embodiments of the present application. The target file can include one or more, and the user can select the target file by clicking and / or long pressing.

[0207] Fig.19 A schematic diagram of an application scenario of file sharing provided in an embodiment of the present application, such as Fig.19 As shown, the scenario includes mobile phone A2100, mobile phone B2200, large screen device 2300 and pad2400, where mobile phone A2100 represents the first terminal device, which establishes Wi-Fi direct connection with mobile phone B2200, large screen device 2300 and pad2400 (second terminal device) respectively. Fig.19 As shown, the user can select a file on the mobile phone, point the mobile phone at pad2400, and then share the file to pad2400 through a sharing operation.

[0208] It is understandable that the user can also point the mobile phone A2100 at the large-screen device 2300 to share files with the large-screen device 2300; and the mobile phone A2100, the mobile phone B2200, the large-screen device 2300 and the pad2400 can discover each other and establish a Wi-Fi direct connection. The user can also share files with other connected terminal devices through the pad2400 or the mobile phone B2200. Fig.19 This is just an example of a user sharing a file from a mobile phone A2100 to a pad2400. Fig.19 The scenario shown is used as an example to illustrate the interaction process between terminal devices.

[0209] In a specific implementation, after the first terminal device detects the sharing operation of the user, it can broadcast a notification message (referred to as a first notification message) to notify each second terminal device.

[0210] The first notification message may carry a file identifier of the target file, such as a file name (the file name will be used as an example in the following description) to inform each second terminal device that the first terminal device will share the target file.

[0211] The first notification message may also carry the pointing direction of the first terminal device to identify the first notification message. For example, if a user successively performs multiple sharing operations on the same target file, and each sharing operation is directed to a different second terminal device, the first terminal device will broadcast multiple first notification messages accordingly. The first notification message can be distinguished by the pointing direction of the first terminal device carried in the first notification message.

[0212] The first notification message may specifically be a broadcast message. In order to save resources, the first notification message may also be a multicast message. Fig. 20 A schematic diagram of the address information of each message in the file sharing provided in the embodiment of the present application, such as Fig. 20 As shown, the destination MAC address in the first notification message can be a multicast MAC address, and the source MAC address is the MAC address of mobile phone A.

[0213] S220. The second terminal device returns a response message corresponding to the first notification message.

[0214] Specifically, after receiving the first notification message, each second terminal device may return a response message to the first terminal device.

[0215] The response message may carry the pointing direction of the corresponding second terminal device, so that the first terminal device can determine the pointing relationship between the first terminal device and the second terminal device. The pointing direction may be measured by a direction sensor.

[0216] The reply message may also carry a file name, so that the first terminal device can determine which first notification message the second terminal device is replying to. For example, if a user has successively performed multiple sharing operations on the first terminal device to share different target files, the first terminal device will broadcast multiple first notification messages accordingly. After receiving each first notification message, each second terminal device can reply to each first notification message, and carry the file name in the reply message to inform the first terminal device which first notification message it is replying to.

[0217] In addition, the response message may also carry the pointing direction of the first terminal device to further identify the response message. For example, as mentioned above, the user successively performs multiple sharing operations on the same target file, and each sharing operation is aimed at a different second terminal device. The first terminal device broadcasts multiple first notification messages accordingly; after each second terminal device receives each first notification message, it can respond to each first notification message, carrying the file name and the pointing direction of the first terminal device in the response message to inform the first terminal device which first notification message it is responding to.

[0218] In order to improve the accuracy of data sharing, the target device can be located within a preset range (referred to as the first preset range) around the first terminal device, and the response message can also carry the device location of the corresponding second terminal device, so that the first terminal device can determine the target device based on the location, wherein the preset range can be a spherical area centered on the first terminal device, that is, the distance between the target device and the first terminal device does not exceed the preset distance; the preset range can also be a cylindrical area centered on the first terminal device, that is, the position of the target device relative to the first terminal device can be limited in the horizontal and vertical directions respectively. The specific size of the preset range can be set as needed, and this embodiment does not specifically limit this; the device location can be obtained through a global positioning system (GPS) module and / or a map application.

[0219] like Fig. 20 As shown, after mobile phone B2200 receives the first notification message, the destination MAC address in the returned response message is the MAC address of mobile phone A, and the source MAC address is the MAC address of mobile phone B; after the large-screen device 2300 receives the first notification message, the destination MAC address in the returned response message is the MAC address of mobile phone A, and the source MAC address is the MAC address of the large-screen device; after pad2400 receives the first notification message, the destination MAC address in the returned response message is the MAC address of mobile phone A, and the source MAC address is the MAC address of the pad.

[0220] S230: After receiving the response messages returned by the second terminal devices, the first terminal device determines the target device from the second terminal devices according to the pointing direction of the first terminal device corresponding to the sharing operation and the pointing direction of the second terminal device in the response message.

[0221] Specifically, after the first terminal device receives the response message returned by each second terminal device, it can determine the pointing relationship between the first terminal device and each second terminal device according to the pointing direction of the first terminal device when receiving the user's sharing operation on the target file and the pointing direction of the second terminal device in the response message, and use the second terminal device opposite to the pointing direction of the first terminal device as the target device. The pointing direction of the first terminal device can be recorded when receiving the user's sharing operation on the target file. If the pointing direction of the first terminal device is carried in the response message, the pointing relationship between the two can be determined directly according to the pointing direction of the first terminal device and the pointing direction of the second terminal device in the response message.

[0222] If the response message carries the device position of the corresponding second terminal device, then when determining the target device, the first terminal device can determine the positional relationship between the first terminal device and each second terminal device based on the device position of the first terminal device and the device position of the second terminal device, in addition to determining the pointing relationship between the first terminal device and each second terminal device as described above; if the device position of the second terminal device is within a preset range centered on the device position of the first terminal device, and the pointing direction is relative to the pointing direction of the first terminal device, the second terminal device is determined as the target device. In order to improve the accuracy of the determined positional relationship, the positional relationship between the first terminal device and the second terminal device can be corrected in combination with ranging technologies such as roundtrip time (RTT) ranging.

[0223] When determining whether the pointing direction of the second terminal device is relative to the pointing direction of the first terminal device, in order to improve the accuracy of the determination result, the determination may be made in combination with the device positions of the first terminal device and the second terminal device. Fig.21 A schematic diagram of determining the location range of a target device provided in an embodiment of the present application, such as Fig.21 As shown, point O is the device position of the first terminal device. If the second terminal device is located on the pointing line of the first terminal device, and its pointing direction is consistent with the opposite direction of the pointing direction of the first terminal device, then it can be considered that the pointing direction of the second terminal device is opposite to the pointing direction of the first terminal device, wherein the pointing line of the first terminal device takes the device position of the first terminal device as the starting point and extends along the pointing direction of the first terminal device.

[0224] In order to facilitate the use of the user, a certain pointing error may be allowed when determining whether the pointing direction of the second terminal device is relative to the pointing direction of the first terminal device. Fig.21As shown, if the second terminal device is located within a preset range (referred to as the second preset range) with the pointing line of the first terminal device as the center line, and the azimuth angle between the pointing direction and the opposite direction of the pointing direction of the first terminal device is within the preset angle range, then the pointing direction of the second terminal device can be considered to be relative to the pointing direction of the first terminal device. The second preset range can be a cylindrical or square columnar area, that is, the position of the target device relative to the pointing line of the first terminal device can be restricted in the horizontal and vertical directions. The size of the second preset range and the preset angle range can be set as needed, and this embodiment does not specifically limit this. It should be noted that Fig.21 The horizontal direction is taken as an example to illustrate the position range of the target device, and the vertical direction position range is not shown.

[0225] Continue with Fig.19 For example, for the sake of convenience, it is assumed that the devices of each terminal device are located on the same horizontal plane, the preset angle range is 15°, and the north direction is 0°. Fig.19 As shown, the pointing direction of mobile phone A2100 is 30° north by east (i.e. 30°), the pointing direction of mobile phone B2200 is 35° south by west (i.e. 215°), the pointing direction of large screen device 2300 is due south (i.e. 180°), the pointing direction of pad2400 is 40° south by west (i.e. 220°), large screen device 2300 and pad2400 are located in the first preset range around mobile phone A2100, mobile phone B2200 is located outside the first preset range around mobile phone A2100, mobile phone B2200 and pad2400 are located in the second preset range with the pointing line of mobile phone A2100 as the center line, and large screen device 2300 is located outside the second preset range with the pointing line of mobile phone A2100 as the center line. Among them, for the sake of simplicity, the first preset range shows the upper half, and the lower half is not shown.

[0226] Based on the above information, it can be known that pad2400 is located within the first preset range around mobile phone A2100; the reverse direction of the pointing direction of mobile phone A2100 is 30° south-west (i.e. 210°), the azimuth angle (10°) between the pointing direction of pad2400 (220°) and the reverse direction (210°) of the pointing direction of mobile phone A2100 is less than the preset angle range (15°), and pad2400 is located within the second preset range with the pointing line of mobile phone A2100 as the center line. Therefore, mobile phone A2100 can identify pad2400 as the target device and share picture A with it.

[0227] The azimuth angle (5°) between the pointing direction (215°) of mobile phone B2200 and the reverse direction (210°) of the pointing direction of mobile phone A2100 is smaller than the preset angle range (15°), and mobile phone B2200 is located within the second preset range with the pointing line of mobile phone A2100 as the center line. However, mobile phone B2200 is outside the first preset range around mobile phone A2100. Therefore, mobile phone B2200 is not determined as the target device of mobile phone A2100.

[0228] The large-screen device 2300 is located within the first preset range around the mobile phone A2100, but is located outside the second preset range with the pointing line of the mobile phone A2100 as the center line, and the azimuth angle (30°) between the pointing direction (180°) of the large-screen device 2300 and the reverse direction (210°) of the pointing direction of the mobile phone A2100 is greater than the preset angle range (15°). Therefore, the large-screen device 2300 is not determined as the target device of the mobile phone A2100.

[0229] It can be understood that the above-mentioned target device determination process can also be executed in the second terminal device, that is, when the first terminal device sends a first notification message to the second terminal device, it can carry the device location and pointing direction of the first terminal device. After receiving it, the second terminal device can determine whether this end is the target device, and then return the judgment result to the first terminal device.

[0230] If the first terminal device fails to determine the target device, it may prompt the user that there is no target device, wherein the prompting method may be a text prompt or a voice prompt.

[0231] S240: If the first terminal device determines the target device, the first terminal device sends a second notification message corresponding to the target file to the target device.

[0232] If the first terminal device determines the target device, the target file can be shared with the target device. In order to save resources, the target device can first check whether the target file is stored locally, and then request resources from the first terminal device if it is not stored.

[0233] In a specific implementation, after determining the target device, the first terminal device can first send a notification message (called a second notification message) to the target device. The second notification message can carry the file name of the target file to inform the target device of the target file to be shared, thereby facilitating the target device to perform subsequent viewing operations.

[0234] S250: If the target device receives the second notification message, it checks whether the target file is stored.

[0235] After receiving the second notification message, the target device can check whether the target file is stored locally according to the file name carried in the second notification message.

[0236] If the target device determines that the target file is stored locally, it can load and display the target file for the user to view; or it can also display a prompt message to prompt the user that the target file to be shared by the first terminal device is stored locally.

[0237] S260: If the target device determines that the target file is not stored, it sends a resource request message corresponding to the target file to the first terminal device.

[0238] If the target device determines that the target file is not stored locally, it can send a resource request message to the first terminal device to request the first terminal device to transmit the target file. The resource request message can carry the file name of the target file so that the first terminal device can identify the target file to be sent.

[0239] Optionally, the target device can be Fig.17 The pop-up dialog box shown in (d) asks the user whether to receive the target file. In order to facilitate user operation, the target device may not pop up the above dialog box. If the user does not want to receive the target file, the second terminal device may not be pointed at the first terminal device. In this way, the solution can also be directly applied to large-screen devices and other terminal devices that are not convenient for users to operate, thereby expanding the scope of application of file sharing and unifying the file sharing solutions between various terminal devices.

[0240] S270. After receiving the resource request message, the first terminal device sends the target file to the target device.

[0241] S280: The target device receives the target file.

[0242] Fig. 22 Another file sharing schematic diagram provided in the embodiment of the present application is taken as an example to illustrate the sharing of picture A (target file) from mobile phone A2100 to pad2400 (target device). Fig. 22 As shown in (a) in FIG. 1 , after the user opens the picture A, he or she slides up at the top of the screen to share the picture to the aligned pad 2400; Fig. 22 As shown in (b), after pad2400 receives picture A, it can load and display picture A for the user to view; of course, pad2400 can also display a prompt message to prompt the user that the target file has been received.

[0243] Fig.23 Another file sharing schematic diagram provided in the embodiment of the present application is taken as an example to illustrate the sharing of multiple pictures (target files) from mobile phone A2100 to pad2400 (target device). Fig.23 As shown in (a) in FIG. 1 , the user opens the picture selection interface by long pressing, clicks to select picture A, picture B, and picture C, and then slides up at the top of the screen to share these pictures to the aligned pad 2400; Fig.23 As shown in (b), after receiving pictures A, B and C, pad can load and display the last received picture, such as picture C, for the user to view; similarly, pad2400 can also display a prompt message to prompt the user that the target file has been received.

[0244] Those skilled in the art will appreciate that the above embodiments are exemplary and are not intended to limit the present application. Where possible, the execution order of one or more of the above steps may be adjusted, or may be selectively combined to obtain one or more other embodiments. Those skilled in the art may select and combine any of the above steps as needed, and all those that do not depart from the essence of the present application fall within the scope of protection of the present application.

[0245] The above shows the process of the first terminal device sharing a target file (referred to as the first target file) with the second terminal device. As mentioned above, the second terminal device can also share a file (referred to as the second target file) with the first terminal device. The specific sharing process is similar to the process of the first terminal device sharing the first target file with the second terminal device, and will not be repeated here.

[0246] As an optional implementation, the first terminal device and the second terminal device may also establish a Wi-Fi direct connection by using a direction filtering method before sharing files, that is, the filtering information carried in the detection message may include the location and direction of the terminal device. When searching for available WiFi direct connection devices, the first terminal device may use the above-mentioned method for determining the target device to search for a second terminal device that meets the filtering conditions of this end. The second terminal device with which the connection is established is the target device. After the connection is established, there is no need to execute the above-mentioned steps of determining the target device (i.e., steps S210-S230), and the target file can be directly shared with the second terminal device with which the connection is established.

[0247] In addition, the above file sharing method can also be applied to other wireless communication scenarios, that is, the wireless communication connection established between the first terminal device and the second terminal device is not limited to a Wi-Fi direct connection, but can also be a Bluetooth or other short-range communication connection.

[0248] The wireless communication method described above automatically determines the target device through an alignment operation, so that the user can quickly share files with the aligned terminal device through a simple sharing operation, thereby effectively improving the convenience of file sharing for the user.

[0249] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application provides a wireless communication device, and the device embodiment corresponds to the above method embodiment. For ease of reading, the present device embodiment will no longer repeat the details of the above method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents in the above method embodiment.

[0250] Fig.24 This is a schematic diagram of the structure of a wireless communication device provided in an embodiment of the present application, and the device can be applied to the terminal equipment involved in the above embodiments. Fig.24 As shown, the device provided in this embodiment may include: an input module 201 , a communication module 202 , a processing module 203 and a display module 204 .

[0251] The input module 201 is used to receive user input on the display interface of the terminal device, such as touch input, voice input, and gesture input, etc. The input module 201 is used to support the terminal device to execute the process related to receiving user operations in step S110 and step S210 in the above method embodiment and / or other processes for the technology described herein. The input module can be a touch screen or other hardware or a combination of hardware and software.

[0252] The communication module 202 is used to support the terminal device to execute the operations related to message transmission in steps S110, S111-S114, S210-S280 in the above method embodiment and / or other processes used for the technology described herein.

[0253] The processing module 203 is used to support the terminal device to execute the operations related to data processing in steps S110, S120, S111-S114, S210-S280 in the above method embodiment and / or other processes used for the technology described herein.

[0254] The display module 204 is used to support the terminal device to execute the operations related to the interface display in steps S120, S210, and S280 of the above method embodiment and / or other processes used for the technology described herein.

[0255] The device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0256] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0257] The present application also provides a terminal device, Fig.25 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.

[0258] The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0259] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0260] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0261] The controller may be the nerve center and command center of the terminal device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0262] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0263] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0264] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.

[0265] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0266] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0267] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0268] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0269] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0270] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.

[0271] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0272] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.

[0273] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0274] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0275] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0276] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0277] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0278] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0279] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division-synchronous code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GNSS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0280] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0281] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini LED, Micro LED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0282] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0283] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0284] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0285] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0286] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0287] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0288] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0289] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0290] The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0291] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0292] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0293] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.

[0294] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0295] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0296] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0297] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0298] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0299] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0300] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.

[0301] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0302] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.

[0303] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.

[0304] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0305] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0306] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.

[0307] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0308] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.

[0309] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0310] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0311] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.

[0312] The terminal device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0313] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiment is implemented.

[0314] The embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device implements the method described in the above method embodiment when executing the computer program product.

[0315] The present application also provides a chip system, including a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method described in the above method embodiment. The chip system can be a single chip or a chip module composed of multiple chips.

[0316] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0317] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media can include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0318] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

[0320] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0321] In the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship between associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0322] Furthermore, in the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0323] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0324] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0325] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0326] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

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

Claims

1. A wireless communication method, applied to a first terminal device, characterized in that: include: Broadcasting a detection request message carrying filtering information of the first terminal device; If a detection response message carrying the filtering information of the second terminal device is received, and the filtering information of the first terminal device matches the filtering information of the second terminal device, it is determined that a wireless fidelity point-to-point connection between the first terminal device and the second terminal device has been established.

2. The method according to claim 1, characterized in that: The method further comprises: If a detection request message carrying the filtering information of a third terminal device is received, and the filtering information of the first terminal device matches the filtering information of the third terminal device, it is determined that a wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and a detection response message carrying the filtering information of the first terminal device is sent to the third terminal device.

3. The method according to claim 1, characterized in that The filtering information includes at least one of the following information: account information, group information, user input information and short-range communication identification information, and the input information includes text information or voice information.

4. The method according to claim 1, characterized in that The method further comprises: Generate a virtual Internet Protocol IP address of the first terminal device and a virtual IP address of a target terminal device, wherein the target terminal device is a terminal device with which a wireless fidelity point-to-point connection has been established; Data is transmitted with the target terminal device based on the virtual IP address.

5. The method according to claim 4, characterized in that During the data transmission process, the first message sent by the first terminal device to the target terminal device and the second message received from the target terminal device do not include IP address information; During the process of processing the second message, the first terminal device adds virtual IP address information to the data packet corresponding to the second message passed to the network layer, the destination IP address in the virtual IP address information is the virtual IP address of the first terminal device, and the source IP address in the virtual IP address information is the virtual IP address of the target terminal device that sends the second message.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Before the broadcasting of the detection request message carrying the filtering information of the first terminal device, in response to a triggering operation of the video call function by the user, displaying a first interface; In response to a filtering information setting operation performed by a user on the first interface, determining filtering information of the first terminal device; After establishing a wireless fidelity point-to-point connection, transmitting the captured video image to a target terminal device, the target terminal device being a terminal device with which a wireless fidelity point-to-point connection has been established; Receive and display the video image captured by the target terminal device.

7. The method according to claim 6, characterized in that The displaying of the video image collected by the target terminal device includes: If there are multiple target terminal devices, a video image captured by one of the target terminal devices is displayed in a main window, and video images captured by other target terminal devices are displayed in a floating sub-window, wherein the size of the main window is larger than the size of the sub-window.

8. The method according to any one of claims 1 to 5, characterized in that: The filtering information includes the pointing direction of the device, and the pointing directions of any two terminal devices matching the filtering information are relative, and the method further includes: A first target file is shared with a target terminal device, and / or a second target file is received from the target terminal device, wherein the target terminal device is a terminal device with which a wireless fidelity point-to-point connection has been established.

9. The method according to claim 1, characterized in that: The method further comprises: In response to a user's sharing operation on a first target file, broadcasting a first notification message corresponding to the first target file; Receiving a response message sent by the at least one second terminal device, wherein each received response message carries a pointing direction of the corresponding second terminal device; Determine a target device from the at least one second terminal device according to the pointing direction of the first terminal device and the pointing directions of each of the second terminal devices, the pointing direction of the target device being opposite to the pointing direction of the first terminal device; If the target device is determined, the first target file is shared with the target device.

10. The method according to claim 9, characterized in that The sharing operation is a touch operation or a gesture operation.

11. The method according to claim 9, characterized in that The target device is located within a first preset range around the first terminal device.

12. The method according to claim 11, characterized in that Each of the received response messages also carries a device position of a corresponding second terminal device, and determining a target device from the at least one second terminal device according to the pointing direction of the first terminal device and the pointing direction of each of the second terminal devices includes: For each response message received, if the device position in the response message is within a first preset range centered on the device position of the first terminal device, and the pointing direction in the response message is relative to the pointing direction of the first terminal device, the second terminal device sending the response message is determined as the target device.

13. The method according to claim 9, characterized in that The sharing of the first target file to the target device includes: Sending a second notification message corresponding to the first target file to the target device; If a resource request message for requesting the first target file returned by the target device is received, the first target file is transmitted to the target device.

14. The method according to claim 9, characterized in that The method further comprises: If the target device is not determined, it will prompt that there is no target device.

15. The method according to claim 9, characterized in that When the target device is located within a second preset range with the pointing line of the first terminal device as the center line, and the azimuth angle between the pointing direction and the reverse direction of the pointing direction of the first terminal device is within a preset angle range, it is determined that the pointing direction of the target device is relative to the pointing direction of the first terminal device.

16. The method according to any one of claims 9 to 15, characterized in that: The method further comprises: If a first notification message corresponding to the second target file is received, a response message is sent to the second terminal device that sent the first notification message, wherein the response message sent carries the pointing direction of the first terminal device; If a second notification message corresponding to the second target file is received, sending a resource request message for requesting the second target file to the second terminal device that sent the second notification message if the second target file is not stored; The second target file is received.

17. A terminal device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method according to any one of claims 1 to 16 when calling the computer program.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.

19. A chip system, characterized in that: The chip system includes a processor, which is coupled to a memory, and the processor executes a computer program stored in the memory to implement the method according to any one of claims 1-16.

Citation Information

Patent Citations

  • One-key connection method and system between mobile terminal and display device

    CN105979307A

  • Data transmission method and device

    CN108377286A

  • Quick connection between customized softap and sta

    US20160270129A1