WO2022068513A1 - Wireless communication method and terminal device - Google Patents

Wireless communication method and terminal device Download PDF

Info

Publication number
WO2022068513A1
WO2022068513A1 PCT/CN2021/116120 CN2021116120W WO2022068513A1 WO 2022068513 A1 WO2022068513 A1 WO 2022068513A1 CN 2021116120 W CN2021116120 W CN 2021116120W WO 2022068513 A1 WO2022068513 A1 WO 2022068513A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
target
message
pointing
information
Prior art date
Application number
PCT/CN2021/116120
Other languages
French (fr)
Chinese (zh)
Inventor
陈刚
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022068513A1 publication Critical patent/WO2022068513A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a wireless communication method and terminal device.
  • Wireless fidelity direct is a peer-to-peer (P2P) connection technology.
  • P2P peer-to-peer
  • terminal devices can be connected without access point (AP) participation.
  • AP access point
  • discover each other and establish a point-to-point connection and then perform data transmission between devices based on the established P2P connection.
  • the current process of data transmission based on the P2P connection is generally complicated.
  • the present application provides a wireless communication method and terminal device for reducing the complexity of a data transmission process based on a P2P connection.
  • an embodiment of the present application provides a wireless communication method, which is applied to a first terminal device, including:
  • the first terminal device searches for the second terminal device that satisfies its own filtering conditions based on the filtering information, it establishes a Wi-Fi P2P connection with the second terminal device.
  • the Wi-Fi direct connection process is simpler, so the complexity of the data transmission process based on P2P connection can be reduced; it can also reduce resource requirements and expand the scope of application; in addition, the terminal equipment can be searched by filtering information. Filter, which can also filter out irrelevant terminal equipment, improve search efficiency and security.
  • the method further includes: if a probe request message carrying filtering information of a third terminal device is received, and the filtering information of the first terminal device is the same as that of the first terminal device If the filtering information of the three terminal devices match, it is determined that the wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and a message containing the first terminal device and the third terminal device is sent to the third terminal device The probe response message of the filter information of the terminal device.
  • 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 message or voice message.
  • account information e.g., account information, group information, user input information, and short-range communication identification information
  • the input information includes text message or voice message.
  • the method further includes:
  • IP Internet Protocol
  • Data transmission is performed with the target terminal device based on the virtual IP address.
  • the first message sent by the first terminal device to the target terminal device and the second message received from the target terminal device excluding IP address information
  • the first terminal device adds virtual IP address information to the data packet corresponding to the second message transmitted to the network layer, and 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.
  • the method further includes:
  • the captured video image is transmitted to a target terminal device, where the target terminal device is a terminal device that has established a Wi-Fi point-to-point connection with the first terminal device;
  • video calls between multiple devices can be easily realized; and this video call method does not rely on base station signals, so in some areas with weak or no mobile communication signals, the above-mentioned method is used to make video calls. It can better meet user needs; in addition, the above video calling method does not occupy mobile data traffic, so it can also save traffic resources.
  • the displaying the video image captured by the target terminal device includes: if the target terminal device includes multiple, displaying in the main window the video image captured by one of the target terminal devices The video image is displayed in the floating sub-window, and the video image collected by other target terminal devices is displayed, wherein the size of the main window is larger than the size of the sub-window.
  • the filtering information includes the pointing orientation of the device, and the pointing orientations of any two terminal devices that match the filtering information are opposite, and the method further includes:
  • an embodiment of the present application provides a wireless communication method, which is applied to a first terminal device, including:
  • each received response message carries the pointing orientation of the corresponding second terminal device
  • a target device is determined from the at least one second terminal device, and the pointing orientation of the target device is different from that of the first terminal device.
  • the pointing direction is relative;
  • the first target file is shared with the target device.
  • the technical solution provided by this embodiment 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 reducing the complexity of the data transmission process based on the P2P connection. Improve the convenience for users to share files.
  • the sharing operation is a touch operation or a gesture operation.
  • the target device is located within a first preset range around the first terminal device. In this way, some devices that are too far away from the first terminal device can be filtered out, thereby improving the accuracy of data sharing.
  • each of the received response messages further carries the device location of the corresponding second terminal device, and the corresponding device location of the second terminal device is also carried in the received response message, and the corresponding device position of the second terminal device is also carried according to the pointing direction of the first terminal device.
  • the pointing azimuth of the second terminal device, and determining the target device from the at least one second terminal device including:
  • the second terminal device that sends the response message is determined as the target device.
  • the sharing of the first target file with the target device includes:
  • the first target file is transmitted to the target device.
  • the second terminal device can inform the first terminal device whether to receive the first target file through whether a resource request message occurs, which can improve the flexibility of file sharing.
  • the method further includes: if the target device is not determined, prompting that there is no target device. In this way, it is convenient for the user to know the determination of the device, and the user experience is improved.
  • the target device when the target device is located in a second preset range with the pointing line of the first terminal device as the center line, and the pointing azimuth is opposite to the pointing direction of the first terminal device
  • the azimuth angle between the azimuths is within a preset angle range, it is determined that the pointing azimuth of the target device is opposite to the pointing azimuth of the first terminal device.
  • the method further includes:
  • a response message is sent to the second terminal device that sent the first notification message, and the sent response message carries the pointing direction of the first terminal device ;
  • the second target file is received.
  • an embodiment of the present application provides a wireless communication apparatus, which is applied to a first terminal device, including:
  • a communication module configured to broadcast a probe request message carrying the filtering information of the first terminal device
  • a processing module configured to, if the communication module receives a probe response message carrying the 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, then It is determined that a Wi-Fi point-to-point connection between the first terminal device and the second terminal device has been established.
  • the processing module is further configured to: if the communication module receives the probe request message carrying the filtering information of the third terminal device, and the first terminal device's If the filtering information matches the filtering information of the third terminal device, it is determined that the wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and the wireless fidelity point-to-point connection is established to the third terminal device.
  • a probe response message carrying the filtering information of the first terminal device.
  • 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 message or voice message.
  • the processing module is further configured to:
  • the target terminal device is a terminal device that has established a wireless fidelity point-to-point connection with the first terminal device
  • Data transmission is performed with the target terminal device based on the virtual IP address.
  • the first message sent by the first terminal device to the target terminal device and the second message received from the target terminal device excluding IP address information
  • the first terminal device adds virtual IP address information to the data packet corresponding to the second message transmitted to the network layer, and 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.
  • the device further includes:
  • a display module configured to display a first interface in response to a user's triggering operation of the video call function before the broadcast of the detection request message carrying the filtering information of the first terminal device;
  • an input module configured to receive a filter information setting operation performed by a user on the first interface
  • the processing module is further configured to: determine the filtering information of the first terminal device in response to the filtering information setting operation;
  • the communication module is further configured to: after the wireless fidelity point-to-point connection is established, transmit the collected video image to a target terminal device, where the target terminal device has established a wireless fidelity point-to-point connection with the first terminal device terminal equipment;
  • the display module is further configured to: display after the communication module receives the video image collected by the target terminal device.
  • the display module is specifically configured to: if the target terminal device includes multiple, display the video image collected by one of the target terminal devices in the main window, and display the video image collected by one of the target terminal devices in the main window, Video images collected by other target terminal devices are displayed in the sub-window, wherein the size of the main window is larger than the size of the sub-window.
  • the filtering information includes the pointing azimuth of the device, and the pointing azimuths of any two terminal devices matching the filtering information are opposite, and the communication module is further configured to:
  • an embodiment of the present application provides a wireless communication apparatus, which is applied to a first terminal device and includes: a communication module, an input module, and a processing module, wherein:
  • the communication module is used for: establishing a wireless communication connection with at least one second terminal device;
  • the input module is used for: receiving a user's sharing operation on the first target file
  • the processing module is configured to: in response to the user's sharing operation on the first target file, broadcast the first notification message corresponding to the first target file through the communication module;
  • the communication module is further configured to: receive a response message sent by the at least one second terminal device, and each received response message carries the pointing azimuth of the corresponding second terminal device;
  • the processing module is further configured to: determine a target device from the at least one second terminal device according to the pointing orientation of the first terminal device and the pointing orientation of each of the second terminal devices; and after determining the target device In the case of the target device, the first target file is shared with the target device through the communication module, and the pointing orientation of the target device is opposite to the pointing orientation of the first terminal device.
  • the sharing operation is a touch operation or a gesture operation.
  • the target device is located within a first preset range around the first terminal device.
  • each of the received response messages also carries the device location of the corresponding second terminal device, and the processing module is specifically configured to:
  • the second terminal device that sends the response message is determined as the target device.
  • the communication module is specifically configured to:
  • the first target file is transmitted to the target device.
  • the processing module is further configured to: if the target device is not determined, prompt that there is no target device.
  • the processing module is specifically configured to: when the target device is located in a second preset range with the pointing line of the first terminal device as the center line, and the pointing azimuth is the same as the first When the azimuth included angle between the opposite azimuths of the pointing direction of a terminal device is within a preset angle range, it is determined that the pointing azimuth of the target device is opposite to the pointing azimuth of the first terminal device.
  • the communication module is further configured to:
  • a response message is sent to the second terminal device that sent the first notification message, and the sent response message carries the pointing direction of the first terminal device ;
  • the second target file is received.
  • an embodiment of the present application provides a terminal device, including: a memory and a processor, where the memory is used to store a computer program; the processor is used to execute the method described in the first aspect or the second aspect when the computer program is invoked.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method described in the first aspect or the second aspect.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a terminal device, enables the terminal device to execute the method described in the first aspect or the second aspect.
  • an embodiment of the present application provides a chip system, including a processor, where the processor is coupled to a memory, and the processor executes a computer program stored in the memory, so as to implement the first aspect or the second aspect above Methods.
  • the chip system may be a single chip or a chip module composed of multiple chips.
  • the methods described in the first aspect and the second aspect can be combined with each other to form a new implementation.
  • the second terminal device described in the second aspect can also include the method in the first aspect.
  • the third terminal device, that is, the second terminal device described in the second aspect may be represented by the target terminal device described in the first aspect; in addition, for the beneficial effects of the third to eighth aspects, reference may be made to the above The relevant descriptions in the first aspect and the second aspect are not repeated here.
  • FIG. 1 is a schematic diagram of a system architecture of a wireless communication method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an application interface provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a device discovery process provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a wireless communication method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another application interface provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another application interface provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of some application interfaces provided by the embodiments of the present application.
  • FIG. 10 is a schematic flowchart of a filtering search provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a frame structure of a probe request frame and a probe response frame provided by an embodiment of the present application;
  • FIG. 12 is a schematic diagram of another application interface provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another application interface provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a message structure provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of another application interface provided by an embodiment of the present application.
  • 16 is a schematic diagram of another application interface provided by an embodiment of the present application.
  • FIG. 17 is a schematic diagram of a file sharing provided by an embodiment of the present application.
  • FIG. 18 is a schematic flowchart of a file sharing process provided by an embodiment of the present application.
  • 19 is a schematic diagram of an application scenario of file sharing provided by an embodiment of the present application.
  • 20 is a schematic diagram of address information of each message in file sharing provided by the embodiment of the present application.
  • 21 is a schematic diagram of determining a location range of a target device according to an embodiment of the present application.
  • FIG. 22 is another schematic diagram of file sharing provided by an embodiment of the present application.
  • FIG. 23 is another schematic diagram of file sharing provided by an embodiment of the present application.
  • FIG. 24 is a schematic structural diagram of a wireless communication apparatus provided by an embodiment of the present application.
  • FIG. 25 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the application scenarios of the embodiments of the present application are introduced.
  • the technical solutions provided in the embodiments of the present application may be applicable to various Wi-Fi P2P connection scenarios.
  • the Wi-Fi direct connection scenario is used as an example for illustrative description in this embodiment.
  • FIG. 1 is a schematic diagram of a system architecture of a wireless communication method provided by an embodiment of the present application.
  • the system may include multiple terminal devices (three are used as an example in the figure for illustration), and each terminal device Wi-Fi direct connection can be established between them, and data can be shared with each other through the established connection.
  • the terminal device may be a mobile phone 1100, a tablet computer (pad) 1200, a TV 1300 shown in FIG. 1, or a large-screen device, a desktop computer, a notebook, or a wearable device that is not shown that supports Wi-Fi Direct connected terminal equipment.
  • a standard Wi-Fi direct connection technology can be used to establish a wireless connection between terminal devices, that is, a group can be established between terminal devices.
  • a group can be established between terminal devices.
  • one of the terminal devices acts as a group owner.
  • GO group owner.
  • GC group clients
  • a Wi-Fi direct connection is established between GO and each GC.
  • 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 the GO negotiation and Exchange security configuration information.
  • FIG. 2 is a schematic diagram of an application interface provided by an embodiment of the present application.
  • the user can click the Wi-Fi direct connection option 101 in the Wi-Fi setting interface 10 Fi Direct interface 20, activate the Wi-Fi Direct function.
  • the terminal device will initiate a device discovery process to search for Wi-Fi Direct devices around, as shown in (b) in Figure 2, the available device bar 202 can display "Searching", etc.
  • a message prompts the user to search for available Wi-Fi Direct devices.
  • the Wi-Fi direct connection interface 20 the user can edit the name of the Wi-Fi direct connection device of the local end through the device name option 2011 in the my device bar 201, as shown in FIG. 2, the Wi-Fi of the mobile phone 1100 The name of the directly connected device is "AAA".
  • the following takes two terminal devices (respectively a first terminal device and a second terminal device) as an example to describe the Wi-Fi Direct connection establishment process.
  • FIG. 3 is a schematic flowchart of a device discovery process provided by an embodiment of the present application.
  • the device discovery process may include: a scan phase (scan phase) and a discovery phase (find phase).
  • the terminal device 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. In this phase, the terminal device sends a probe request (Probe Request) on all frequency bands it supports. ) frame, the terminal device does not process the probe request frame from other devices in this stage, it can receive the probe response (Probe Response) frame, and find other terminal devices in the listening state.
  • Probe Request a probe request
  • Probe Response probe response
  • the terminal device After the scanning phase is completed, the terminal device enters the discovery phase. During this phase, the end device switches back and forth between the listen state and the search state.
  • the terminal device randomly selects a frequency band in the frequency bands 1, 6 and 11 (that is, ch1, ch6 and ch11 in the figure, called social channel) as the listening frequency band (listen channel), and monitors the detection request. frame and reply to the probe response frame accordingly.
  • 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 listening for a period of time.
  • the terminal device will send probe request frames on frequency bands 1, 6 and 11 respectively.
  • the frame sent by one party can be received by the other party.
  • the second terminal device monitors the probe request frame sent by the first terminal device on ch6 on ch6, and sends the frame to the first terminal device on ch6.
  • a terminal device replies with a probe response frame accordingly.
  • the terminal device After the terminal device completes the interaction between the probe request frame and the probe response frame, that is, it discovers the Wi-Fi Direct device, and can store the device information of the peer device, including the media access control (MAC) address, device type (device type) ) and device name, etc.
  • MAC media access control
  • device type device type
  • device name etc.
  • the terminal device searches for a Wi-Fi Direct device, it will update the interface to display the searched Wi-Fi Direct device.
  • BBB the device name of the pad 1200
  • CCC the device name of the TV 1300.
  • the user can select a Wi-Fi Direct device in this interface to establish a connection with it. For example, as shown in (c) and (d) in Figure 2, the user can click "BBB" to establish a connection with it.
  • the terminal device can carry out a group establishment process (starting to establish a group in the corresponding figure) to prepare to construct a Group, and the process can include GO negotiation (GO negotiation, GON) Process and security provisioning process. Among them, the GON process is used to negotiate who will do the GO. After the GON process is executed, the security configuration process is performed. This process mainly uses the Wi-Fi simple configuration (WSC) protocol to negotiate security configuration information.
  • WSC Wi-Fi simple configuration
  • the GC applies to the GO for an internet protocol (IP) address, and the GO starts a dynamic host configuration protocol (DHCP) server to assign an IP address to the GC.
  • IP internet protocol
  • DHCP dynamic host configuration protocol
  • the terminal device can update the connection status and inform the user that the connection is successful. For example, as shown in (d) in FIG. 2 , the connection status of the updated "BBB" is "connected". After the group is disbanded, the IP address of the GC can be released.
  • GO and GC can also invite other terminal devices to join the group through the P2P invitation (P2P invitation) process; during the device discovery process, the terminal device can also activate a previously established permanent through the P2P invitation process.
  • P2P invitation P2P invitation
  • Group persistent group
  • the user can stop the search by clicking the stop icon 203 in the Wi-Fi Direct interface 20 during the search process; as shown in (d) of FIG. 2 , the user can also start the device discovery process again by clicking the search icon 204 in the Wi-Fi Direct interface 20 after the search is over.
  • 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, so the IP addresses of GO in different groups overlap and may interfere with each other, thus A condition that causes an unstable connection to the end device.
  • FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application. For example, as shown in FIG. 4 , A1, B1, and C1 are a group, A2, B2, C2, and D2 are a group, and A1 and A2 are respectively The GO of the respective group, the default IP address of both is 192.168.49.1.
  • FIG. 5 is a schematic diagram of another application scenario provided by the embodiment of the present application.
  • A3, B3 and C3 are a group, and the three share data with each other, wherein A3 is GO; during the sharing process, A3 leaves , D3 wants to join the group. Since A3 is a GO, after it leaves, the group is disbanded, B3 and C3 cannot continue to share data, and D3 cannot obtain an IP address in time, so it cannot participate in data sharing. B3, C3 and D3 need to re-share Form a group to continue sharing data.
  • the device discovery, negotiation and connection process in the Wi-Fi Direct protocol is complex, requires too many resources, and has high system overhead, which is too heavy for thin devices; All the surrounding terminal devices are in the device discovery state, so the search efficiency is low, and the operation interface corresponding to the search results is not simple enough, and if irrelevant terminal devices are searched and connected by mistake, there may be security risks.
  • the embodiments of the present application provide 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 method for group management. , that is, peer-to-peer connection of devices at both ends, cancel the role distinction between GO and GC; and IP address management can also be decentralized, cancel the unified management and allocation of GC IP addresses, virtualize IP addresses, and locally manage this by terminal devices.
  • the virtual IP address of the end and the opposite end, the data is forwarded by the data link layer to solve the problem that the IP address of the GO overlaps and the automatic connection of the terminal device is unstable; in addition, during the device discovery process, the terminal device is searched and filtered to Improve search efficiency and security, and optimize the operation interface.
  • the technical solution will be described in detail below.
  • FIG. 6 is a schematic flowchart of a wireless communication method provided by an embodiment of the present application. As shown in FIG. 6 , the wireless communication method provided by this embodiment may include the following steps:
  • the first terminal device searches for a second terminal device that satisfies the filter condition of the local end in response to the user's connection triggering operation.
  • the first terminal device sets the Wi-Fi direct connection state between it and the searched second terminal device to a connected state.
  • the user can enable the Wi-Fi Direct function through a connection trigger operation, where the connection trigger operation can be a user trigger operation on the target system function.
  • the connection trigger operation can be a user trigger operation on the target system function.
  • the user can, as shown in (a) of FIG. 2, Click the Wi-Fi direct connection option in the Wi-Fi setting interface to enable the Wi-Fi direct connection function;
  • the first terminal device can also provide shortcut options, such as shown in Figure 7, which can be found in A Wi-Fi direct connection icon is provided in the pull-down notification bar, and users can click the icon to enable the Wi-Fi direct connection function.
  • the Wi-Fi direct connection function can only be turned on when the Wi-Fi function is turned on.
  • the terminal device when receiving a connection trigger operation from the user, can automatically turn on the Wi-Fi function when the Wi-Fi function is not turned on.
  • the Wi-Fi direct connection function is enabled; the user may also be prompted to enable the Wi-Fi direct connection function after the user authorizes the Wi-Fi function to be enabled.
  • the target APP or target function when the user starts a target application (application, APP) or target function, the target APP or target function is triggered to automatically enable the Wi-Fi direct connection function. For example, after the user clicks the gallery icon to open the gallery, the gallery automatically enables the Wi-Fi direct connection function; for another example, when the user clicks the video call function to initiate a video call, the video call function automatically enables the Wi-Fi direct connection function to search for available Wi-Fi -Fi Direct device to establish connection.
  • target application is not limited to the above-mentioned gallery, and may also be a file management APP or other instant messaging APP, etc., which is not particularly limited in this embodiment of the present application.
  • the user may enable the Wi-Fi direct connection function by inputting a voice command, which is not particularly limited in this embodiment.
  • the connection trigger operation may also be a click operation of the search icon in the Wi-Fi Direct interface after the user clicks the Wi-Fi Direct option to open the Wi-Fi Direct interface.
  • the first terminal device After the first terminal device detects the user's connection triggering operation, it can respond to the operation and enter the device discovery process to filter and search to search for the second terminal device that satisfies the filter conditions of the local end, where the filter conditions can be preset by the system For example, the first terminal device automatically searches for the second terminal device that is logged into the same system account; in order to improve the flexibility of the user, the first terminal device may also provide a filter condition setting function for the user to independently set the filter condition.
  • the Wi-Fi Direct interface 20 may also include a filter condition option 203 , and the user can click The filter condition option 203 opens the filter condition interface 40; as shown in (b) of FIG.
  • 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 Switch controls 401 to 405 corresponding to each filter condition may be provided, and the user may select to enable one or more filter conditions through these switch controls, that is, the filter conditions may include one or more.
  • the first terminal device can automatically search for a second terminal device that logs into the same system account as the first terminal device during the search process.
  • the embodiment of the present application is not limited to filtering system accounts, and other accounts may also be filtered during specific implementation.
  • the group name editing option 4021 can be set in the column where the group filtering option is located, so that the user can edit the specific conditions of the group filtering.
  • the specific conditions of the group filtering can also be the group number. and other group identification information, which is not particularly limited in this embodiment of the present application.
  • 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 filter to be a family group, and the first terminal device searches the terminal devices (ie, the second terminal device) of each member in the family group.
  • a password editing option 4031 can be set in the column where the password filtering option is located, and the user can set a password through this option while enabling password filtering. If password filtering is enabled, the first terminal device can automatically search for the second terminal device with the same password set during the search process.
  • the embodiment of the present application is not limited to filtering passwords, and during specific implementation, text information may also be filtered.
  • the first terminal device can automatically collect the voice information input by the user after the Wi-Fi direct connection function is enabled, generate filtering information according to the collected voice information, and then automatically search for detection during the search process.
  • the second terminal device carrying the same filtering information in the message.
  • any user around the terminal device can send voice information, and each terminal device can collect the voice information, and generate a filter based on the voice information. Filter information corresponding to the condition.
  • the user can perform a "touch" operation between the first terminal device and the second terminal device that needs to establish a connection; the first terminal device can collect to the NFC information of the second terminal device (for example, it may be an NFC identifier), and then the second terminal device corresponding to the collected NFC information can be searched during the search process.
  • the first terminal device may generate filtering information according to the NFC information of the local end and the collected NFC information.
  • the first terminal device can also perform processes such as device discovery and negotiation according to the standard Wi-Fi Direct protocol to establish a connection.
  • the first terminal device may provide filtering functions corresponding to the above-mentioned various filtering conditions for the target application to invoke, and the target application automatically enables at least one filtering function after enabling the Wi-Fi Direct function, for example , after the user opens the gallery, the gallery activates the system account filtering function while enabling the Wi-Fi direct connection function, and searches for the second terminal device logged in the same system account; for another example, after the user enables the video call function, he can input voice to initiate a video For calls and video calls, when the Wi-Fi direct connection function is enabled, the voice filter function is activated, and the voice input by the user is used as a filter condition to filter and search; alternatively, the target APP or target function can also provide the activation option of the filter function The user can activate the corresponding filtering function by clicking the activation option.
  • the following takes the target function as the video calling function as an example to illustrate the process of enabling the Wi-Fi direct connection function and the filtering function of the user.
  • FIG. 9 is a schematic diagram of some application interfaces provided by the embodiments of the present application.
  • a video call icon 3012 can be provided in the pull-down notification bar, and the user can click the icon to enable the video call function.
  • the Wi-Fi direct connection function can be automatically turned on as described above, or as shown in (b) in Figure 9, the user can be prompted to authorize the Wi-Fi direct connection function and the Wi-Fi function to be turned on. .
  • the video call function can provide various filters corresponding to the filter function Conditional startup options: system account filtering option 001, group filtering option 002, password filtering option 003, voice filtering option 004, and NFC filtering option 005, wherein, for the system account filtering option 001, after the user clicks, the first terminal device is It can search for available Wi-Fi direct devices to establish a connection; for group filter option 002 and password filter option 003, after the user selects, the video call function can provide an input interface for users to enter group information or password information; for voice filter option 004 and NFC filter option 005, after the user selects, the first terminal device may prompt the user to input voice information or perform a "tap" operation.
  • the user can click the password filtering option 003, and then enter a password in the pop-up input interface, where the number of digits of the password can be as shown in the figure
  • the default is 4 bits, and the number of bits is not limited.
  • 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.
  • the search process of the first terminal device and the second terminal device will be described in detail below.
  • the first terminal device may carry the filtering information corresponding to the filtering conditions in the detection message, and the detection message may include a detection request message and a detection request response message, wherein the detection request message may specifically be a detection request frame, and the detection request response
  • the message may specifically be a probe response frame, that is, the first terminal device may carry filter information in the probe request frame and the probe response frame;
  • the filter information may be the system account number, group ID, password, voice information or NFC information in the above filter conditions
  • the filtering information may also be character information generated according to the above-mentioned information such as system account number, group identification, password, voice information or NFC information.
  • FIG. 10 is a schematic flowchart of filtering and searching provided by this embodiment of the application. The method may include the following steps:
  • the first terminal device broadcasts a probe request frame carrying the first filtering information.
  • the filter condition may also be set in the second terminal device, and the specific setting process is similar to the filter condition setting process of the first terminal device, which will not be repeated here.
  • the filtering information corresponding to the filtering condition in the first terminal device is referred to as the first filtering information
  • the filtering information corresponding to the filtering condition in the second terminal device is referred to as the second filtering information.
  • the first terminal device may broadcast the probe request frame on all channels or social channels as described above.
  • the first terminal device may carry the first filter information in the probe request frame, so that the second terminal device can reply with a response message when the filter conditions are satisfied, so as to Inform the first terminal device that it meets the filtering conditions.
  • FIG. 11 is a schematic diagram of a frame structure of a probe request frame and a probe response frame provided by an embodiment of the application.
  • the probe request frame may include a MAC header, a frame body, and a frame check.
  • the sequence (frame check sequence, FCS) field in which the MAC frame header may include some frame control information and address information, etc.; the frame body represents the data field, which is the payload; FCS is used to ensure the integrity of the frame data.
  • the first filtering information may be carried in the frame body.
  • a characteristic parameter (character code) field may be added to the frame body, and the first filtering information may be indicated by this field, wherein the characteristic parameter field may be located in any arbitrary position of the frame body. Location.
  • the second terminal device After receiving the probe request frame, the second terminal device determines whether the first filter information carried in the probe request frame matches the second filter information, and if so, it is determined that the first terminal device satisfies the local filter condition.
  • the second terminal device may be similar to the first terminal device, and responds to the user's connection triggering operation to enable the Wi-Fi direct connection function.
  • the specific process is similar to that of the first terminal device to enable the Wi-Fi direct connection function, which will not be repeated here. .
  • the second terminal device may monitor the probe request frame on the monitor frequency band as described above. If the second terminal device monitors the detection request frame, it can extract the first filter information in it, compare it with the filter information corresponding to the filter conditions of the local end (ie the second filter information), and determine whether the first terminal device complies with the local end's filter information. filter conditions. If the first filtering information matches the second filtering information, it means that the first terminal device complies with the filtering conditions of the second terminal device; if the first filtering information does not match the second filtering information, the second terminal device can discard the detection request frame, refusing to connect with the first terminal device.
  • the second terminal device returns a probe response frame carrying the second filtering information to the first terminal device.
  • the second terminal device may reply to the probe response frame accordingly to inform the first terminal device that the two filter conditions are consistent, that is, the first terminal device and the The second terminal devices meet the filtering conditions of the peer end.
  • confirmation information may also be carried in the probe response frame to inform the first terminal device that the filtering conditions of the two are consistent.
  • the second terminal device may also carry the second filtering information in the frame, so as to inform the first terminal device of the filtering conditions of the local end.
  • the probe response frame may include MAC frame header, frame body and FCS fields. Similar to the first filter information, the second filter information may be carried in the frame body of the probe response frame. Similarly, the probe response frame may contain the second filter information. A feature parameter field is added to the frame body of the frame, through which the second filtering information is indicated, wherein the feature parameter field can be located at any position in the frame body.
  • 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.
  • the first terminal device After receiving the probe response frame, the first terminal device determines whether the second filter information carried in the probe response frame matches the first filter information, and if so, determines that the second terminal device satisfies the local filter condition.
  • the first terminal device may determine that the second terminal device satisfies the filtering conditions of the local end.
  • the probe response frame can carry the second filter information, and correspondingly, the first terminal device can extract the second filter information, the filter information corresponding to the filter conditions of the local end (that is, the first terminal device). filter information) to compare, and based on the comparison result, determine whether the second terminal device complies with the filtering conditions of the local end.
  • the first terminal device may discard the probe response frame and refuse to connect with the second terminal device.
  • the process of the first terminal device judging whether the first filter information matches the second filter information is similar to the process of judging the filter information by the second terminal device, and details are not described herein again.
  • the two 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 transmission is performed between terminal devices, the data packets may not be included in the data packets. Carrying the IP address, it communicates 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.
  • the first terminal device searches for a second terminal device that satisfies the filtering conditions, it can indicate that the connection is established successfully, and the Wi-Fi Direct connection status of the searched second terminal device can be displayed as a connected state. Similarly, The Wi-Fi Direct connection status of the first terminal device may also be displayed as a connected state on the searched second terminal device.
  • the second terminal device searched by the first terminal device may include one or more.
  • the first terminal device and the second terminal device are only for the purpose of distinguishing the description.
  • it can be used as the first terminal device or as the second terminal device, that is, the first terminal device and the second terminal device. Both terminal devices can have the functions of each other.
  • the first terminal device it can also receive probe request frames broadcast by other terminal devices (referred to as third terminal devices). If the information matches, it can be determined that the third terminal device satisfies the filtering conditions of the local end, and can return a probe response frame carrying the first filtering information to the third terminal device; correspondingly, the third terminal device can judge its own filtering information.
  • any terminal device can use the search process performed by the first terminal device shown in FIG. 10 and/or the search process performed by the second terminal device to establish a Wi-Fi direct connection with other terminal devices.
  • the user can also click the file management icon 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 be based on the same
  • the system accounts (filtered information) of the 2s can search each other to establish a connection, and ccc cannot establish a connection with aaa and bbb.
  • the user can view the connected Wi-Fi Direct devices in the other device bar 501 of the file management interface 50 corresponding to the file management icon 5, wherein the user can click the file management interface
  • the browse icon 502 of 50 opens the browse interface to browse files on the local computer and other devices.
  • the other device bar 501 can be located in the browse interface; the file management interface 50 can also provide other functional controls such as a search box.
  • the first terminal device and the second terminal device can locally generate virtual IP addresses for both parties, where the virtual IP address is only valid locally, and when data transmission is performed, the first message sent to the outside The IP address may not be carried in the message.
  • the second terminal device may add the virtual IP address to the data packet transmitted to the network layer for identification by the network layer, wherein the destination IP address is the second message.
  • the virtual IP address of the 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 the second message to the first terminal device, the second message may not carry the IP address, and the first After receiving the second message returned by the second terminal device, a terminal device adds a virtual IP address for identification by the network layer, wherein the destination IP address is the virtual IP address of the first terminal device, and the source virtual IP address is the first virtual IP address. 2. The virtual IP address of the terminal device.
  • FIG. 14 is a schematic diagram of a message structure provided by an embodiment of the present application.
  • the data packet header of the network layer includes an IP address
  • the data of the data link layer The packet header contains the MAC address
  • the Ethernet payload part contains the IP address and the IP payload;
  • the above-mentioned unicast message contains the first terminal device in the data packet corresponding to the network layer and the virtual IP address of the second terminal device
  • the header of the data packet corresponding to the data link layer contains the MAC address
  • the Ethernet payload part does not contain IP address information.
  • the terminal device can add a multicast address to the IP header of the multicast message when sending, where the destination IP address can be the multicast IP address, and the source IP address can be the agreed virtual IP address; optional Yes, multicast messages can also be similar to unicast messages, and do not carry an 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.
  • the terminal device can generate a virtual IP address according to the MAC address or other device information. For example, the terminal device can generate its own virtual IP address according to its own MAC address after the Wi-Fi Direct function is activated. Afterwards, the virtual IP address of the peer device is generated according to the MAC address of the peer device.
  • A1, B1 and C1 can set the same filter condition (for example, enter the same password), so that Wi-Fi can be established between each of the three Fi direct connection to share resources with each other; similarly, A2, B2, C2 and D2 can also set the same filter conditions to establish Wi-Fi direct connection with each other for resource sharing.
  • Each terminal device communicates with each other through their own unique MAC addresses, and the virtual IP address is managed locally, thus reducing the phenomenon of connection errors and effectively improving the connection stability between the terminal devices.
  • A3, B3 and C3 can set the same filter condition (for example, log in to the same system account), and establish a connection between them; if A3 leaves during the sharing process, D3 wants to join, on the one hand , due to the peer-to-peer connection between A3, B3 and C3, the departure of A3 does not affect the connection between B3 and C3; on the other hand, D3 can use the same filter conditions to search for B3 and C3, and establish a connection with B3 and C3, Therefore, data can continue to be shared among B3, C3 and D3, which further improves the connection stability between terminal devices.
  • the same filter condition for example, log in to the same system account
  • connection process of Wi-Fi direct connection is simplified, and the group establishment and P2P invitation process are cut out, thus reducing the complexity of Wi-Fi direct connection, thereby reducing resource requirements and expanding Scope of application;
  • device discovery terminal devices are searched and filtered through filter conditions, which can filter out irrelevant terminal devices, improve search efficiency and security, and only display the searched ones that meet the filter conditions on the interface. terminal equipment, thus also optimizing the operator interface.
  • the first terminal device and the second terminal device After the first terminal device and the second terminal device establish a Wi-Fi direct connection, they can share files with each other, make video calls, edit across devices, wirelessly cast a screen, or remotely control each other through the Wi-Fi direct connection.
  • the following is an exemplary description by taking video calls and file sharing as examples.
  • each user can use the video call process shown in Figure 9 to establish a video call connection, and continue to take password filtering as an example, as shown in (a) in Figure 15, after the user enters the password "1122" and clicks After the confirmation option 0031 is confirmed, the first terminal device starts to search for available Wi-Fi Direct devices to establish a connection; it is assumed that the user of the second terminal device inputs the same password "1122" in the same way, as shown in Figure 15 ( As shown in b), the first terminal device can establish a connection with the second terminal device, and conduct a video call through the connection, that is, transmit the collected video stream based on the established Wi-Fi direct connection.
  • the video call interface can provide the option of hanging up and switching to voice as shown in the figure; or when multiple second terminal devices are connected, the main window can display the data collected by one of the second terminal devices. and display the video images of other second terminal devices in the sub-window, so that the user can switch the video images displayed in the main window, wherein the size of the sub-window is smaller than that of the main window, and it can be suspended on the main window show.
  • the terminal equipment ie the first terminal equipment held by each user can display another Video images collected by terminal devices (ie, second terminal devices) held by two users; among the video images collected by the two second terminal devices, one is displayed in the main window, and the other is displayed in the sub-window. Assuming that the first terminal device shown in FIG.
  • 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, Then as shown in (b) in Figure 15, the first terminal device can display the video image collected by the terminal device held by user 2 in the main window, and the video image collected by the terminal device held by user 3 in the sub-window; Click the sub-window to switch the video image displayed in the main window to the video image collected by the terminal device held by user 3 .
  • the video image (not shown) collected by the first terminal device can also be displayed on the first terminal device in another sub-window, and the user can also click on the sub-window to switch the video image displayed in the main window to the first terminal device.
  • the video image collected by the terminal device; the first terminal device can also display the video image collected by the terminal device that established the connection last by default in the main window, that is, the first terminal device can also display the video image collected by the terminal device held by user 3 in the main window by default. video image.
  • user 1 and user 3 can establish a Wi-Fi direct connection with the terminal devices of user 1 and user 3 respectively.
  • user 1 and user 3 can The communication is performed through the terminal device of the user 2, that is, the terminal device of the user 2 can be used as an intermediate device for communication, so as to realize long-distance communication.
  • the above video call method does not rely on base station signals, and can make video calls anytime and anywhere. Therefore, in some areas with weak or no mobile communication signals, the above methods can be used to make video calls to better meet user needs;
  • the video call method does not occupy mobile data traffic, so it can also save traffic resources.
  • the user can select the terminal device bbb that he wants to access in the other device column 501; as shown in FIG. 16
  • the accessible files may include the latest files, pictures, videos, Audio, document and other types of files
  • the files under each type of file can include multiple folders, for example, as shown in the figure, video files include all video folders, camera folders, screen recording folders, download folders, WeChat folder and QQ folder, etc.
  • FIG. 17 is a schematic diagram of a file sharing provided by an embodiment of the present application.
  • the user can select the target image S to be shared on the first terminal device, and then click the sharing option 6 to open the sharing Interface 60; as shown in (b) of FIG. 17, the sharing interface 60 may include other sharing icons such as WeChat icon 601, Wi-Fi Direct icon 602, Bluetooth icon 603, and QQ icon 604, and the user can select Wi-Fi Direct Connect icon 602, open the Wi-Fi Direct device selection interface 70; as shown in (c) of FIG.
  • the user can select a target from the connected second terminal device device bbb to share the target image S to the selected target device bbb; as shown in (d) of FIG. 17 , after the user selects the target device bbb, the target device bbb can pop up a dialog box 80 asking the user whether to accept it.
  • the accept option 801 in the dialog box 80 may be clicked to accept the target picture S, or the reject option 802 may be clicked to reject the reception of the target picture S.
  • 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 video, audio or documents.
  • An exemplary description is given as an example; in addition, when selecting a target file to be shared, it may be a click operation, or other selection operations such as a long press operation.
  • the embodiment of the present application provides another file sharing method, which mainly automatically determines the target device through an alignment operation, so that the user can quickly share files to the aligned terminal device through a simple sharing operation.
  • the two parties can share files with each other.
  • the first terminal device shares files with the connected second terminal device as an example for description.
  • the first terminal device can detect the user's touch operation on the target file, and 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 orientation of the target device is opposite to the pointing orientation of the first terminal device.
  • FIG. 18 is a schematic diagram of a file sharing process provided by this embodiment of the present application. As shown in FIG. 18 , the process may include the following steps:
  • the first terminal device In response to the user's sharing operation on the selected target file, the first terminal device broadcasts a first notification message corresponding to the target file.
  • the sharing operation may be a touch operation or a gesture operation, wherein the touch operation may be a screen sliding operation, such as an upward sliding operation on a target area of the screen (such as the top of the screen), or other predefined operations such as a combo operation
  • the gesture operation may be a sliding gesture or other predefined gestures, which are not particularly limited in this embodiment of the present application.
  • the target file may include one or more, and the user can select the target file by clicking and/or long-pressing.
  • FIG. 19 is a schematic diagram of an application scenario of file sharing provided by an embodiment of the application.
  • the scenario includes a mobile phone A2100, a mobile phone B2200, a large-screen device 2300, and a pad2400, wherein the mobile phone A2100 represents the first terminal device, which Wi-Fi direct connection is established with mobile phone B2200, large-screen device 2300 and pad2400 (second terminal device) respectively.
  • the user can select a file on the mobile phone, point the mobile phone to the pad2400, and then share the file to the pad2400 through the sharing operation.
  • the user can also point the mobile phone A2100 to the large-screen device 2300 and share files to the large-screen device 2300; and the mobile phone A2100, mobile phone B2200, large-screen device 2300 and pad2400 can all discover each other.
  • the other party establishes a Wi-Fi direct connection, and the user can also share files with other connected terminal devices through the pad2400 or the mobile phone B2200.
  • Figure 19 is just an example of sharing files with the pad2400 through the mobile phone A2100. The interaction process between terminal devices is described below by taking the scenario shown in FIG. 19 as an example.
  • the first terminal device may broadcast a notification message (referred to as a first notification message) to notify each second terminal device.
  • a notification message referred to as a first notification message
  • the first notification message may carry a file identifier of the target file, such as a file name (the file name is also used as an example in the following description) to inform each second terminal device that the first terminal device will share the target file.
  • a file identifier of the target file such as a file name (the file name is also used as an example in the following description) to inform each second terminal device that the first terminal device will share the target file.
  • the first notification message may also carry the pointing direction of the first terminal device to identify the first notification message. For example, if the user has successively performed multiple sharing operations on the same target file, each sharing operation is aimed at a different first notification message.
  • the first terminal device broadcasts a plurality of first notification messages correspondingly, and the first notification messages can be distinguished by the pointing direction of the first terminal device carried in the first notification message.
  • the first notification message may be a broadcast message.
  • the first notification message may also be a multicast message.
  • 20 is a schematic diagram of address information of each message in file sharing provided by the embodiment of the present application.
  • the destination MAC address in the first notification message may be a multicast MAC address
  • the source MAC address is the MAC address of mobile phone A.
  • the second terminal device returns a response message corresponding to the first notification message.
  • each second terminal device may return a response message to the first terminal device.
  • the response message may carry the pointing azimuth of the corresponding second terminal device, so that the first terminal device can determine the pointing relationship with the second terminal device.
  • the pointing azimuth can be measured by the azimuth sensor.
  • the response message may also carry a file name, so that the first terminal device can determine which first notification message the second terminal device replies to. For example, if the user has successively performed multiple sharing operations on the first terminal device to share different target files, the first terminal device correspondingly broadcasts multiple first notification messages, and each second terminal device receives each first notification message after receiving the respective first notification messages. , each first notification message may be responded to, and the file name may be carried in the response message to inform the first terminal device which first notification message it responded to.
  • the response message may also carry the pointing direction of the first terminal device to further identify the response message.
  • the user has successively performed multiple sharing operations on the same target file, and each sharing operation is aimed at a different target file.
  • the second terminal device the first terminal device broadcasts a plurality of first notification messages correspondingly; after each second terminal device receives each first notification message, it can respond to each first notification message, and carry the message in the response message.
  • the above file name and the pointing direction of the first terminal device are used to inform the first terminal device which first notification message it responds to.
  • the target device may be located within a preset range (referred to as the first preset range) around the first terminal device, and the response message may also carry the device location of the corresponding second terminal device, so that The first terminal device determines the target device based on the position, wherein the preset range may 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 a preset distance; the The preset range may also be a columnar area centered on the first terminal device, that is, the position of the target device relative to the first terminal device may be limited in the horizontal and vertical directions respectively.
  • the specific size of the preset range may be set as required, which is not particularly limited in this embodiment; the device location may be obtained through a global positioning system (global positioning system, GPS) module and/or a map application.
  • GPS global positioning system
  • the destination MAC address in the returned reply message is the MAC address of the mobile phone A, and the source MAC address is the MAC address of the mobile phone B;
  • the large-screen device 2300 receives the first notification
  • the destination MAC address in the returned reply message is the MAC address of mobile phone A, and the source MAC address is the MAC address of the large-screen device;
  • the pad2400 receives the first notification message, the destination MAC address in the returned reply message is that of mobile phone A.
  • the source MAC address is the MAC address of the pad.
  • the first terminal device After receiving the response message returned by each second terminal device, the first terminal device determines from the second terminal device according to the pointing bearing of the first terminal device corresponding to the sharing operation and the pointing bearing of the second terminal device in the response message target device.
  • the first terminal device may, according to the pointing orientation of the first terminal device when receiving the user's sharing operation on the target file and the pointing orientation of the second terminal device in the response message, The pointing relationship between the first terminal device and each second terminal device is determined, and the second terminal device opposite to the pointing azimuth of the first terminal device is used as the target device.
  • the pointing direction of the first terminal device may be recorded when the user's sharing operation on the target file is received, and if the response message carries the pointing direction of the first terminal device, the direction of the first terminal device in the response message may be directly
  • the pointing azimuth and the pointing azimuth of the second terminal device are used to determine the pointing relationship between the two.
  • the response message carries the device location of the corresponding second terminal device, when the first terminal device determines the target device, in addition to the above-mentioned determination of the pointing relationship between the first terminal device and each second terminal device, it can also According to the device position of the first terminal device and the device position of the second terminal device, the positional relationship between the first terminal device and each second terminal device is determined; the device position of the second terminal device is located at the device with the first terminal device When the position is within a preset range of the center, and the pointing orientation is opposite to the pointing orientation of the first terminal device, the second terminal device is determined as the target device.
  • the positional relationship between the first terminal device and the second terminal device may be corrected in combination with ranging technologies such as round trip time (round trip time, RTT) ranging.
  • the device positions of the first terminal device and the second terminal device may be used for determination.
  • 21 is a schematic diagram of determining the location range of a target device provided by an embodiment of the present application. As shown in FIG. 21 , point O is the device location of the first terminal device.
  • the second terminal device is located on the pointing line of the first terminal device, and If the pointing azimuth is consistent with the reverse azimuth of the pointing azimuth of the first terminal equipment, it can be considered that the pointing azimuth of the second terminal equipment is opposite to the pointing azimuth of the first terminal equipment, wherein the pointing line of the first terminal equipment is the same as that of the first terminal equipment.
  • the position of the device is the starting point and extends along the pointing azimuth of the first terminal device.
  • a certain pointing error may be allowed.
  • 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 pointing azimuth is opposite to the pointing direction of the first terminal device If the azimuth included angle between the azimuths is within the preset angle range, it can be considered that the pointing azimuth of the second terminal device is opposite to the pointing azimuth of the first terminal device.
  • the second preset range may be a cylindrical area or a square cylindrical area, that is, the position of the target device relative to the pointing line of the first terminal device may be limited in the horizontal and vertical directions.
  • the sizes of the second preset range and the preset angle range can be set as required, which are not particularly limited in this embodiment. It should be noted that, FIG. 21 takes the horizontal direction as an example to illustrate the position range of the target device, and the position range in the vertical direction is not shown.
  • the device positions of each terminal device are on the same horizontal plane, the preset angle range is 15°, and the true north position is 0°.
  • the pointing orientation of the mobile phone A2100 is 30° north by east (ie 30°)
  • the pointing orientation of the mobile phone B2200 is 35° south west (ie 215°)
  • the pointing orientation of the large-screen device 2300 is due south position (ie 180°)
  • the pointing orientation of pad2400 is 40° south-west (ie 220°)
  • the large-screen device 2300 and pad2400 are located in the first preset range around the mobile phone A2100
  • the mobile phone B2200 is located in the first preset range around the mobile phone A2100 Outside the preset range
  • the mobile phone B2200 and pad2400 are located within the second preset range with the pointing line of the mobile phone A2100 as the center line
  • the large-screen device 2300 is located outside the second preset range
  • the pad2400 is located in the first preset range around the mobile phone A2100; the reverse direction of the pointing azimuth of the mobile phone A2100 is 30° west by south (ie 210°), and the pointing azimuth (220°) of the pad2400 is the same as the mobile phone A2100.
  • the azimuth angle (10°) between the reverse azimuth (210°) of the pointing azimuth is less than the preset angle range (15°), and the pad2400 is located in the second preset range with the pointing line of the mobile phone A2100 as the center line , therefore, the mobile phone A2100 can determine the pad2400 as the target device and share the picture A with it.
  • the azimuth angle (5°) between the pointing azimuth (215°) of the mobile phone B2200 and the reverse azimuth (210°) of the mobile phone A2100 is smaller than the preset angle range (15°), and the mobile phone B2200 is located at the same position as the mobile phone A2100.
  • the pointing line is within the second preset range of the center line, but the cell phone B2200 is outside the first preset range around the cell phone A2100, so the cell phone B2200 is not determined as the target device of the cell phone A2100.
  • the large-screen device 2300 is located within the first preset range around the mobile phone A2100, but the large-screen device 2300 is located outside the second preset range with the pointing line of the mobile phone A2100 as the center line, and the pointing azimuth of the large-screen device 2300 (180°) ) and the reverse azimuth (210°) of the pointing azimuth of the mobile phone A2100 (30°) 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 .
  • the above target device determination process can also be performed in the second terminal device, that is, when the first terminal device sends the first notification message to the second terminal device, the device location and Pointing direction, after receiving the second terminal device, it can judge whether the local end is the target device, and then return the judgment result to the first terminal device.
  • the first terminal device may prompt the user that there is no target device, where the prompting manner may be a text prompt or a voice prompt.
  • the first terminal device determines the target device, it sends a second notification message corresponding to the target file to the target device.
  • the first terminal device determines the target device, it can share the target file with the target device.
  • the target device may first check whether the target file is stored locally, and then request resources from the first terminal device if the target file is not stored.
  • the first terminal device may first send a notification message (referred to as a second notification message) to the target device, and the second notification message may carry the file name of the target file to inform the target The target file to be shared by the device, so as to facilitate subsequent viewing operations by the target device.
  • a notification message referred to as a second notification message
  • the target device If the target device receives the second notification message, it checks whether the target file is stored.
  • the target device 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.
  • the target device may load and display the target file for the user to view; or may also display prompt information to prompt the user that the target file to be shared by the first terminal device is locally stored.
  • the target device determines that no target file is stored, it sends a resource request message corresponding to the target file to the first terminal device.
  • the target device may 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 may carry the file name of the target file, so that the first terminal device can identify the target file to be sent.
  • the target device can ask the user whether to receive the target file in a pop-up dialog box as shown in (d) in Figure 17.
  • the target device can also not pop up the above-mentioned dialog box. If the user does not want to receive the target file, The second terminal device may not be aligned with the first terminal device, so that the solution can also be directly applied to other terminal devices that are inconvenient for users to operate, such as large-screen devices. Unified file sharing scheme.
  • the first terminal device After receiving the resource request message, the first terminal device sends the target file to the target device.
  • the target device receives the target file.
  • FIG. 22 is another schematic diagram of file sharing provided by an embodiment of the present application.
  • the mobile phone A2100 shares a picture A (target file) with the pad2400 (target device) as an example for illustration.
  • the pad2400 receives the picture A After that, you can load and display picture A for the user to view; of course, pad2400 can also display a prompt message to remind the user that the target file has been received.
  • FIG. 23 is another schematic diagram of file sharing provided by an embodiment of the present application.
  • the mobile phone A2100 shares multiple pictures (target files) with the pad2400 (target device) as an example for illustration.
  • the pad2400 target device
  • FIG. 23 shows in (a) in Figure 23, after the user opens the picture selection interface by long-pressing, click to select picture A, picture B and picture C, and then share these pictures to the aligned pad2400 by sliding up on the top of the screen ;
  • the pad receives picture A, picture B and picture C, it can load and display a picture finally received, such as picture C, for the user to view;
  • pad2400 also A prompt message can be displayed to inform the user that the target file has been received.
  • the above shows the process of the first terminal device sharing the target file (called the first target file) with the second terminal device.
  • the second terminal device can also share the file with the first terminal device (called the second target file).
  • target file 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 details are not repeated here.
  • the first terminal device and the second terminal device before they can also establish a Wi-Fi direct connection by using an azimuth filtering method, that is, the filtering information carried in the detection message can include the terminal device.
  • the first terminal device can use the above method of determining the target device to search for the second terminal device that satisfies the local filter conditions, and the second terminal device that establishes the connection is the target After the connection is established, the device may directly share the target file with the second terminal device that establishes the connection without performing the above steps of determining the target device (ie, steps S210-S230).
  • 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 Wi-Fi direct connection, but also Bluetooth or other short-range communication. connect.
  • the target device is automatically determined through the alignment operation, so that the user can quickly share the file to the aligned terminal device through a simple sharing operation, thereby effectively improving the convenience for the user to share the file.
  • an embodiment of the present application provides a wireless communication device, which corresponds to the foregoing method embodiment.
  • this device embodiment does not refer to the foregoing method embodiment.
  • the detailed contents are described one by one, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiments.
  • FIG. 24 is a schematic structural diagram of a wireless communication apparatus provided by an embodiment of the present application, and the apparatus may be applied to the terminal equipment involved in the foregoing embodiment.
  • the apparatus provided in this embodiment may include: an input module 201 , a communication module 202 , a processing module 203 , and a display module 204 .
  • the input module 201 is used to receive user input on the display interface of the terminal device, such as touch input, voice input, gesture input, etc.
  • the input module 201 is used to support the terminal device to perform steps S110 and S210 in the above method embodiments Processes related to receiving user actions and/or other processes for the techniques described herein.
  • the input module can be a touch screen or other hardware or a combination of hardware and software.
  • the communication module 202 is configured to support the terminal device to perform operations related to message transmission in steps S110, S111-S114, and S210-S280 in the above method embodiments and/or other processes for the techniques described herein.
  • the processing module 203 is configured to support the terminal device to perform operations related to data processing in steps S110, S120, S111-S114, and S210-S280 in the above method embodiments and/or other processes for the techniques described herein.
  • the display module 204 is configured to support the terminal device to perform operations related to interface display in steps S120, S210, and S280 in the above method embodiments and/or other processes for the techniques described herein.
  • the apparatus provided in this embodiment may execute the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
  • FIG. 25 is a schematic structural diagram of the terminal device provided by an embodiment of the present application.
  • 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device 100 .
  • the terminal device 100 may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (sraphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • application processor application processor, AP
  • modem processor graphics processor
  • GPU graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the terminal device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • 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. This interface can also be used to connect other terminal devices, such as AR devices.
  • 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 of the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
  • the power management module 141 is used for connecting 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 times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify 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 then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellites System
  • frequency modulation frequency modulation, FM
  • NFC near field communication
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves
  • the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with 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), broadband 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, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GNSS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi satellite system) -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GNSS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • 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 (active-matrix organic light).
  • LED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Mini LED Micro LED
  • quantum dot light emitting diode quantum dot light emitting diodes, QLED
  • the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, 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 the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs.
  • the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • 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 realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C.
  • the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals.
  • the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to 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 intensity of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing 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, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 .
  • the angular velocity of the end device 100 about three axes ie, the x, y and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the terminal device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the terminal device 100 can measure the distance through 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.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the terminal device 100 emits infrared light to the outside through the light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using a photodiode. 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 may 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.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense 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, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the terminal device 100 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 caused by the low temperature.
  • the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed 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 a touch operation 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 touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be 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 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the terminal device 100 may 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 card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may 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 is also compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication.
  • the terminal device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
  • the terminal device provided in this embodiment may execute the foregoing method embodiments, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
  • Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in the foregoing method embodiment is implemented.
  • the embodiments of the present application further provide a computer program product, when the computer program product runs on a terminal device, the terminal device executes the method described in the above method embodiments.
  • An embodiment of the present application further provides a chip system, including a processor, where 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 embodiments.
  • the chip system may be a single chip or a chip module composed of multiple chips.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server or data center to another website site, computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, or a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)), and the like.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium may include: ROM or random storage memory RAM, magnetic disks or optical disks and other mediums that can store program codes.
  • the disclosed apparatus/device and method may be implemented in other manners.
  • the apparatus/equipment embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • plural 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.
  • at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present application relates to the technical field of communications, and provides a wireless communication method and a terminal device. The method comprises: a first terminal device broadcasting a probe request message carrying filtering information of the first terminal device; if a probe 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, determining that a wireless fidelity (Wi-Fi) peer to peer (P2P) connection between the first terminal device and the second terminal device is established; and in response to a sharing operation of a user on a target file, sharing the target file with a target device in a connected terminal device, wherein the pointing direction of the target device is opposite to the pointing direction of the first terminal device. According to the technical solution provided by the present application, the Wi-Fi P2P connection process is simple, and a user can quickly share a file to a targeted terminal device by means of a simple sharing operation, such that the complexity of a P2P connection-based data transmission process is reduced.

Description

无线通信方法和终端设备Wireless communication method and terminal device
本申请要求于2020年09月30日提交国家知识产权局、申请号为202011063160.2、申请名称为“无线通信方法和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011063160.2 and the application name "Wireless Communication Method and Terminal Equipment" filed with the State Intellectual Property Office on September 30, 2020, the entire contents of which are incorporated into this application by reference .
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种无线通信方法和终端设备。The present application relates to the field of communication technologies, and in particular, to a wireless communication method and terminal device.
背景技术Background technique
无线保真直连(wireless fidelitydirect,Wi-Fi Direct)是一种点对点(peer to peer,P2P)连接技术,通过该技术,终端设备可以在不需要接入点(access point,AP)参与的情况下,相互发现对方并建立点对点连接,然后可以基于建立的P2P连接进行设备间的数据传输。但是,目前的基于P2P连接进行数据传输的过程总体来说比较复杂。Wireless fidelity direct (Wi-Fi Direct) is a peer-to-peer (P2P) connection technology. Through this technology, terminal devices can be connected without access point (AP) participation. , discover each other and establish a point-to-point connection, and then perform data transmission between devices based on the established P2P connection. However, the current process of data transmission based on the P2P connection is generally complicated.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供一种无线通信方法和终端设备,用于降低基于P2P连接的数据传输过程的复杂性。In view of this, the present application provides a wireless communication method and terminal device for reducing the complexity of a data transmission process based on a P2P connection.
为了实现上述目的,第一方面,本申请实施例提供一种无线通信方法,应用于第一终端设备,包括:In order to achieve the above purpose, in a first aspect, an embodiment of the present application provides a wireless communication method, which is applied to a first terminal device, including:
广播携带有所述第一终端设备的过滤信息的探测请求消息;broadcasting a probe request message carrying the filtering information of the first terminal device;
若接收到携带有第二终端设备的过滤信息的探测响应消息,且所述第一终端设备的过滤信息与所述第二终端设备的过滤信息相匹配,则确定所述第一终端设备与所述第二终端设备之间的无线保真点对点连接已建立。If a probe 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 the first terminal device is compatible with the filtering information of the second terminal device. The wireless fidelity point-to-point connection between the second terminal devices has been established.
本实施例提供的技术方案,第一终端设备在基于过滤信息搜索到满足自身过滤条件的第二终端设备后,即建立了与第二终端设备之间的Wi-Fi P2P连接,相比于标准的Wi-Fi直连连接过程,该连接过程更加简单,因而可以降低基于P2P连接的数据传输过程的复杂性;而且也可以降低资源需求,扩大适用范围;此外,通过过滤信息对终端设备进行搜索过滤,这样也可以过滤掉不相干的终端设备,提高搜索效率和安全性。In the technical solution provided in this embodiment, after the first terminal device searches for the second terminal device that satisfies 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 The Wi-Fi direct connection process is simpler, so the complexity of the data transmission process based on P2P connection can be reduced; it can also reduce resource requirements and expand the scope of application; in addition, the terminal equipment can be searched by filtering information. Filter, which can also filter out irrelevant terminal equipment, improve search efficiency and security.
在第一方面的一种可能的实施方式中,所述方法还包括:若接收到携带有第三终端设备的过滤信息的探测请求消息,且所述第一终端设备的过滤信息与所述第三终端设备的过滤信息相匹配,则确定所述第一终端设备与所述第三终端设备之间的无线保真点对点连接已建立,并向所述第三终端设备发送携带有所述第一终端设备的过滤信息的探测响应消息。In a possible implementation manner of the first aspect, the method further includes: if a probe request message carrying filtering information of a third terminal device is received, and the filtering information of the first terminal device is the same as that of the first terminal device If the filtering information of the three terminal devices match, it is determined that the wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and a message containing the first terminal device and the third terminal device is sent to the third terminal device The probe response message of the filter information of the terminal device.
在第一方面的一种可能的实施方式中,所述过滤信息包括下列中的至少一种信息:账号信息、群组信息、用户的输入信息和近距离通信标识信息,所述输入信息包括文本信息或语音信息。该实施方式中,用户可以根据需要设置所需的过滤信息,灵活性高。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 message or voice message. In this implementation manner, the user can set the required filtering information as required, and the flexibility is high.
在第一方面的一种可能的实施方式中,所述方法还包括:In a possible implementation of the first aspect, the method further includes:
生成所述第一终端设备的虚拟因特网互联协议(internet protocol,IP)地址和目标终端设备的虚拟IP地址,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对 点连接的终端设备;Generating a virtual internet protocol (Internet Protocol, IP) address of the first terminal device and a virtual IP address of a target terminal device, where the target terminal device has established a wireless fidelity point-to-point connection with the first terminal device terminal equipment;
基于所述虚拟IP地址与所述目标终端设备进行数据传输。Data transmission is performed with the target terminal device based on the virtual IP address.
通过采用虚拟IP地址,可以兼容网络层等上层应用,这样无需对上层应用进行改动,因而可以降低开发成本。By using a virtual IP address, it can be compatible with upper-layer applications such as the network layer, so that there is no need to change the upper-layer application, thereby reducing development costs.
在第一方面的一种可能的实施方式中,在数据传输的过程中,所述第一终端设备向所述目标终端设备发送的第一消息和从所述目标终端设备接收的第二消息中,均不包括IP地址信息;In a possible implementation manner of the first aspect, in the process of data transmission, the first message sent by the first terminal device to the target terminal device and the second message received from the target terminal device , excluding IP address information;
所述第一终端设备在处理所述第二消息的过程中,传递至网络层的所述第二消息对应的数据包中添加有虚拟IP地址信息,所述虚拟IP地址信息中的目的IP地址为所述第一终端设备的虚拟IP地址,所述虚拟IP地址信息中的源IP地址为发送所述第二消息的所述目标终端设备的虚拟IP地址。In 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 transmitted to the network layer, and 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.
在第一方面的一种可能的实施方式中,所述方法还包括:In a possible implementation of the first aspect, the method further includes:
在所述广播携带有所述第一终端设备的过滤信息的探测请求消息之前,响应于用户对视频通话功能的触发操作,显示第一界面;Before the broadcast of the detection request message carrying the filtering information of the first terminal device, in response to the user's triggering operation of the video call function, displaying a first interface;
响应于用户在所述第一界面上进行的过滤信息设置操作,确定所述第一终端设备的过滤信息;determining the filtering information of the first terminal device in response to the filtering information setting operation performed by the user on the first interface;
在建立了无线保真点对点连接之后,向目标终端设备传输采集的视频图像,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备;After the Wi-Fi point-to-point connection is established, the captured video image is transmitted to a target terminal device, where the target terminal device is a terminal device that has established a Wi-Fi point-to-point connection with the first terminal device;
接收并显示所述目标终端设备采集的视频图像。Receive and display the video image collected by the target terminal device.
通过上述实施方式,可以方便的实现多设备之间的视频通话;且该视频通话方式,不依赖基站信号,因而在一些移动通信信号弱或无移动通信信号的区域,采用上述方式进行视频通话,可以更好的满足用户需求;另外,上述视频通话方式不占用移动数据流量,因而也可以节省流量资源。Through the above-mentioned embodiments, video calls between multiple devices can be easily realized; and this video call method does not rely on base station signals, so in some areas with weak or no mobile communication signals, the above-mentioned method is used to make video calls. It can better meet user needs; in addition, the above video calling method does not occupy mobile data traffic, so it can also save traffic resources.
在第一方面的一种可能的实施方式中,所述显示所述目标终端设备采集的视频图像,包括:若所述目标终端设备包括多个,则在主窗口中显示其中一个目标终端设备采集的视频图像,在悬浮的子窗口中显示其他目标终端设备采集的视频图像,其中,主窗口的尺寸大于子窗口的尺寸。In a possible implementation manner of the first aspect, the displaying the video image captured by the target terminal device includes: if the target terminal device includes multiple, displaying in the main window the video image captured by one of the target terminal devices The video image is displayed in the floating sub-window, and the video image collected by other target terminal devices is displayed, wherein the size of the main window is larger than the size of the sub-window.
在第一方面的一种可能的实施方式中,所述过滤信息中包括设备的指向方位,过滤信息相匹配的任意两个终端设备的指向方位相对,所述方法还包括:In a possible implementation manner of the first aspect, the filtering information includes the pointing orientation of the device, and the pointing orientations of any two terminal devices that match the filtering information are opposite, and the method further includes:
向目标终端设备分享第一目标文件,和/或,接收所述目标终端设备分享的第二目标文件,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备。通过上述实施方式,可以方便的进行多设备之间的文件分享。Share the first target file with the target terminal device, and/or receive the second target file shared by the target terminal device, where the target terminal device has established a wireless fidelity point-to-point connection with the first terminal device. Terminal Equipment. Through the above-mentioned embodiments, file sharing among multiple devices can be conveniently performed.
第二方面,本申请实施例提供一种无线通信方法,应用于第一终端设备,包括:In a second aspect, an embodiment of the present application provides a wireless communication method, which is applied to a first terminal device, including:
与至少一个第二终端设备建立无线通信连接;establishing a wireless communication connection with at least one second terminal device;
响应于用户对第一目标文件的分享操作,广播所述第一目标文件对应的第一通知消息;In response to the user's sharing operation on the 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, and each received response message carries the pointing orientation of the corresponding second terminal device;
根据所述第一终端设备的指向方位与各所述第二终端设备的指向方位,从所述至少一 个第二终端设备中确定目标设备,所述目标设备的指向方位与所述第一终端设备的指向方位相对;According to the pointing orientation of the first terminal device and the pointing orientation of each of the second terminal devices, a target device is determined from the at least one second terminal device, and the pointing orientation of the target device is different from that of the first terminal device. The pointing direction is relative;
若确定出目标设备,则向所述目标设备分享所述第一目标文件。If the target device is determined, the first target file is shared with the target device.
本实施例提供的技术方案,通过对准操作来自动确定目标设备,使得用户可以通过简单的分享操作快速向对准的终端设备分享文件,从而可以降低基于P2P连接的数据传输过程的复杂性,提高用户分享文件的便利性。The technical solution provided by this embodiment 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 reducing the complexity of the data transmission process based on the P2P connection. Improve the convenience for users to share files.
在第二方面的一种可能的实施方式中,所述分享操作为触控操作或手势操作。In a possible implementation manner of the second aspect, the sharing operation is a touch operation or a gesture operation.
在第二方面的一种可能的实施方式中,所述目标设备位于所述第一终端设备周围的第一预设范围内。这样可以过滤掉一些距离第一终端设备过远的设备,从而提高数据分享的准确性。In a possible implementation manner of the second aspect, the target device is located within a first preset range around the first terminal device. In this way, some devices that are too far away from the first terminal device can be filtered out, thereby improving the accuracy of data sharing.
在第二方面的一种可能的实施方式中,接收的每个所述应答消息中还携带有对应的第二终端设备的设备位置,所述根据所述第一终端设备的指向方位与各所述第二终端设备的指向方位,从所述至少一个第二终端设备中确定目标设备,包括:In a possible implementation manner of the second aspect, each of the received response messages further carries the device location of the corresponding second terminal device, and the corresponding device location of the second terminal device is also carried in the received response message, and the corresponding device position of the second terminal device is also carried according to the pointing direction of the first terminal device. The pointing azimuth of the second terminal device, and determining the target device from the at least one second terminal device, including:
对于接收的每个应答消息,若所述应答消息中的设备位置位于以所述第一终端设备的设备位置为中心的第一预设范围内,且所述应答消息中的指向方位与所述第一终端设备的指向方位相对,则将发送所述应答消息的第二终端设备确定为目标设备。For each response message received, if the device location in the response message is within a first preset range centered on the device location of the first terminal device, and the pointing azimuth in the response message is the same as the If the pointing directions of the first terminal device are opposite, the second terminal device that sends the response message is determined as the target device.
在第二方面的一种可能的实施方式中,所述向所述目标设备分享所述第一目标文件,包括:In a possible implementation manner of the second aspect, the sharing of the first target file with 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.
上述实施方式中,第二终端设备可以通过是否发生资源请求消息来告知第一终端设备是否接收第一目标文件,这样可以提高文件分享的灵活性。In the above embodiment, the second terminal device can inform the first terminal device whether to receive the first target file through whether a resource request message occurs, which can improve the flexibility of file sharing.
在第二方面的一种可能的实施方式中,所述方法还包括:若未确定出目标设备,则提示无目标设备。这样可以方便用户了解设备确定情况,提高用户体验。In a possible implementation manner of the second aspect, the method further includes: if the target device is not determined, prompting that there is no target device. In this way, it is convenient for the user to know the determination of the device, and the user experience is improved.
在第二方面的一种可能的实施方式中,当所述目标设备位于以第一终端设备的指向线为中线的第二预设范围内,且指向方位与第一终端设备的指向方向的反向方位之间的方位夹角在预设角度范围内时,确定所述目标设备的指向方位与所述第一终端设备的指向方位相对。In a possible implementation of the second aspect, when the target device is located in a second preset range with the pointing line of the first terminal device as the center line, and the pointing azimuth is opposite to the pointing direction of the first terminal device When the azimuth angle between the azimuths is within a preset angle range, it is determined that the pointing azimuth of the target device is opposite to the pointing azimuth of the first terminal device.
上述实施方式中,在确定两设备的指向方位是否相对时,允许一定的指向误差,这样可以方便用户使用。In the above embodiment, when determining whether the pointing directions of the two devices are opposite, a certain pointing error is allowed, which is convenient for the user to use.
在第二方面的一种可能的实施方式中,所述方法还包括:In a possible implementation of the second aspect, the method further includes:
若接收到第二目标文件对应的第一通知消息,则向发送所述第一通知消息的第二终端设备发送应答消息,发送的所述应答消息中携带有所述第一终端设备的指向方位;If the 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, and the sent response message carries the pointing direction of the first terminal device ;
若接收到所述第二目标文件对应的第二通知消息,则在未存储有所述第二目标文件的情况下,向发送所述第二通知消息的第二终端设备发送用于请求所述第二目标文件的资源请求消息;If a second notification message corresponding to the second target file is received, in the case where the second target file is not stored, send a message to the second terminal device that sent the second notification message to request the The resource request message of the second target file;
接收所述第二目标文件。The second target file is received.
第三方面,本申请实施例提供一种无线通信装置,应用于第一终端设备,包括:In a third aspect, an embodiment of the present application provides a wireless communication apparatus, which is applied to a first terminal device, including:
通信模块,用于广播携带有所述第一终端设备的过滤信息的探测请求消息;a communication module, configured to broadcast a probe request message carrying the filtering information of the first terminal device;
处理模块,用于若所述通信模块接收到携带有第二终端设备的过滤信息的探测响应消息,且所述第一终端设备的过滤信息与所述第二终端设备的过滤信息相匹配,则确定所述第一终端设备与所述第二终端设备之间的无线保真点对点连接已建立。A processing module, configured to, if the communication module receives a probe response message carrying the 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, then It is determined that a Wi-Fi point-to-point connection between the first terminal device and the second terminal device has been established.
在第三方面的一种可能的实施方式中,所述处理模块还用于:若所述通信模块接收到携带有第三终端设备的过滤信息的探测请求消息,且所述第一终端设备的过滤信息与所述第三终端设备的过滤信息相匹配,则确定所述第一终端设备与所述第三终端设备之间的无线保真点对点连接已建立,并向所述第三终端设备发送携带有所述第一终端设备的过滤信息的探测响应消息。In a possible implementation manner of the third aspect, the processing module is further configured to: if the communication module receives the probe request message carrying the filtering information of the third terminal device, and the first terminal device's If the filtering information matches the filtering information of the third terminal device, it is determined that the wireless fidelity point-to-point connection between the first terminal device and the third terminal device has been established, and the wireless fidelity point-to-point connection is established to the third terminal device. A probe response message carrying the filtering information of the first terminal device.
在第三方面的一种可能的实施方式中,所述过滤信息包括下列中的至少一种信息:账号信息、群组信息、用户的输入信息和近距离通信标识信息,所述输入信息包括文本信息或语音信息。In a possible implementation manner 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 message or voice message.
在第三方面的一种可能的实施方式中,所述处理模块还用于:In a possible implementation manner of the third aspect, the processing module is further configured to:
生成所述第一终端设备的虚拟IP地址和目标终端设备的虚拟IP地址,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备;generating a virtual IP address of the first terminal device and a virtual IP address of a target terminal device, where the target terminal device is a terminal device that has established a wireless fidelity point-to-point connection with the first terminal device;
基于所述虚拟IP地址与所述目标终端设备进行数据传输。Data transmission is performed with the target terminal device based on the virtual IP address.
在第三方面的一种可能的实施方式中,在数据传输的过程中,所述第一终端设备向所述目标终端设备发送的第一消息和从所述目标终端设备接收的第二消息中,均不包括IP地址信息;In a possible implementation manner of the third aspect, in the process of data transmission, the first message sent by the first terminal device to the target terminal device and the second message received from the target terminal device , excluding IP address information;
所述第一终端设备在处理所述第二消息的过程中,传递至网络层的所述第二消息对应的数据包中添加有虚拟IP地址信息,所述虚拟IP地址信息中的目的IP地址为所述第一终端设备的虚拟IP地址,所述虚拟IP地址信息中的源IP地址为发送所述第二消息的所述目标终端设备的虚拟IP地址。In 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 transmitted to the network layer, and 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.
在第三方面的一种可能的实施方式中,所述装置还包括:In a possible implementation manner of the third aspect, the device further includes:
显示模块,用于在所述广播携带有所述第一终端设备的过滤信息的探测请求消息之前,响应于用户对视频通话功能的触发操作,显示第一界面;a display module, configured to display a first interface in response to a user's triggering operation of the video call function before the broadcast of the detection request message carrying the filtering information of the first terminal device;
输入模块,用于接收用户在所述第一界面上进行的过滤信息设置操作;an input module, configured to receive a filter information setting operation performed by a user on the first interface;
所述处理模块还用于:响应于所述过滤信息设置操作,确定所述第一终端设备的过滤信息;The processing module is further configured to: determine the filtering information of the first terminal device in response to the filtering information setting operation;
所述通信模块还用于:在建立了无线保真点对点连接之后,向目标终端设备传输采集的视频图像,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备;The communication module is further configured to: after the wireless fidelity point-to-point connection is established, transmit the collected video image to a target terminal device, where the target terminal device has established a wireless fidelity point-to-point connection with the first terminal device terminal equipment;
所述显示模块还用于:在所述通信模块接收到所述目标终端设备采集的视频图像后进行显示。The display module is further configured to: display after the communication module receives the video image collected by the target terminal device.
在第三方面的一种可能的实施方式中,所述显示模块具体用于:若所述目标终端设备包括多个,则在主窗口中显示其中一个目标终端设备采集的视频图像,在悬浮的子窗口中显示其他目标终端设备采集的视频图像,其中,主窗口的尺寸大于子窗口的尺寸。In a possible implementation manner of the third aspect, the display module is specifically configured to: if the target terminal device includes multiple, display the video image collected by one of the target terminal devices in the main window, and display the video image collected by one of the target terminal devices in the main window, Video images collected by other target terminal devices are displayed in the sub-window, wherein the size of the main window is larger than the size of the sub-window.
在第三方面的一种可能的实施方式中,所述过滤信息中包括设备的指向方位,过滤信息相匹配的任意两个终端设备的指向方位相对,所述通信模块还用于:In a possible implementation manner of the third aspect, the filtering information includes the pointing azimuth of the device, and the pointing azimuths of any two terminal devices matching the filtering information are opposite, and the communication module is further configured to:
向目标终端设备分享第一目标文件,和/或,接收所述目标终端设备分享的第二目标文件,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备。Share the first target file with the target terminal device, and/or receive the second target file shared by the target terminal device, where the target terminal device has established a wireless fidelity point-to-point connection with the first terminal device. Terminal Equipment.
第四方面,本申请实施例提供一种无线通信装置,应用于第一终端设备,包括:通信模块、输入模块和处理模块,其中:In a fourth aspect, an embodiment of the present application provides a wireless communication apparatus, which is applied to a first terminal device and includes: a communication module, an input module, and a processing module, wherein:
所述通信模块用于:与至少一个第二终端设备建立无线通信连接;The communication module is used for: establishing a wireless communication connection with at least one second terminal device;
所述输入模块用于:接收用户对第一目标文件的分享操作;The input module is used for: receiving a user's sharing operation on the first target file;
所述处理模块用于:响应于用户对第一目标文件的分享操作,通过所述通信模块广播所述第一目标文件对应的第一通知消息;The processing module is configured to: in response to the user's sharing operation on the first target file, broadcast the first notification message corresponding to the first target file through the communication module;
所述通信模块还用于:接收所述至少一个第二终端设备发送的应答消息,接收的每个应答消息中携带有对应的第二终端设备的指向方位;The communication module is further configured to: receive a response message sent by the at least one second terminal device, and each received response message carries the pointing azimuth of the corresponding second terminal device;
所述处理模块还用于:根据所述第一终端设备的指向方位与各所述第二终端设备的指向方位,从所述至少一个第二终端设备中确定目标设备;并在确定出目标设备的情况下,通过所述通信模块向所述目标设备分享所述第一目标文件,所述目标设备的指向方位与所述第一终端设备的指向方位相对。The processing module is further configured to: determine a target device from the at least one second terminal device according to the pointing orientation of the first terminal device and the pointing orientation of each of the second terminal devices; and after determining the target device In the case of the target device, the first target file is shared with the target device through the communication module, and the pointing orientation of the target device is opposite to the pointing orientation of the first terminal device.
在第四方面的一种可能的实施方式中,所述分享操作为触控操作或手势操作。In a possible implementation manner of the fourth aspect, the sharing operation is a touch operation or a gesture operation.
在第四方面的一种可能的实施方式中,所述目标设备位于所述第一终端设备周围的第一预设范围内。In a possible implementation manner of the fourth aspect, the target device is located within a first preset range around the first terminal device.
在第四方面的一种可能的实施方式中,接收的每个所述应答消息中还携带有对应的第二终端设备的设备位置,所述处理模块具体用于:In a possible implementation manner of the fourth aspect, each of the received response messages also carries the device location of the corresponding second terminal device, and the processing module is specifically configured to:
对于接收的每个应答消息,若所述应答消息中的设备位置位于以所述第一终端设备的设备位置为中心的第一预设范围内,且所述应答消息中的指向方位与所述第一终端设备的指向方位相对,则将发送所述应答消息的第二终端设备确定为目标设备。For each response message received, if the device location in the response message is within a first preset range centered on the device location of the first terminal device, and the pointing azimuth in the response message is the same as the If the pointing directions of the first terminal device are opposite, the second terminal device that sends the response message is determined as the target device.
在第四方面的一种可能的实施方式中,所述通信模块具体用于:In a possible implementation manner of the fourth aspect, the communication module is specifically configured to:
向所述目标设备发送所述第一目标文件对应的第二通知消息;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.
在第四方面的一种可能的实施方式中,所述处理模块还用于:若未确定出目标设备,则提示无目标设备。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.
在第四方面的一种可能的实施方式中,所述处理模块具体用于:当所述目标设备位于以第一终端设备的指向线为中线的第二预设范围内,且指向方位与第一终端设备的指向方向的反向方位之间的方位夹角在预设角度范围内时,确定所述目标设备的指向方位与所述第一终端设备的指向方位相对。In a possible implementation manner of the fourth aspect, the processing module is specifically configured to: when the target device is located in a second preset range with the pointing line of the first terminal device as the center line, and the pointing azimuth is the same as the first When the azimuth included angle between the opposite azimuths of the pointing direction of a terminal device is within a preset angle range, it is determined that the pointing azimuth of the target device is opposite to the pointing azimuth of the first terminal device.
在第四方面的一种可能的实施方式中,所述通信模块还用于:In a possible implementation manner of the fourth aspect, the communication module is further configured to:
若接收到第二目标文件对应的第一通知消息,则向发送所述第一通知消息的第二终端设备发送应答消息,发送的所述应答消息中携带有所述第一终端设备的指向方位;If the 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, and the sent response message carries the pointing direction of the first terminal device ;
若接收到所述第二目标文件对应的第二通知消息,则在未存储有所述第二目标文件的情况下,向发送所述第二通知消息的第二终端设备发送用于请求所述第二目标文件的资源请求消息;If a second notification message corresponding to the second target file is received, in the case where the second target file is not stored, send a message to the second terminal device that sent the second notification message to request the The resource request message of the second target file;
接收所述第二目标文件。The second target file is received.
第五方面,本申请实施例提供一种终端设备,包括:存储器和处理器,存储器用于存储计算机程序;处理器用于在调用计算机程序时执行上述第一方面或第二方面所述的方法。In a fifth aspect, an embodiment of the present application provides a terminal device, including: a memory and a processor, where the memory is used to store a computer program; the processor is used to execute the method described in the first aspect or the second aspect when the computer program is invoked.
第六方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述第一方面或第二方面所述的方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method described in the first aspect or the second aspect.
第七方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面或第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on a terminal device, enables the terminal device to execute the method described in the first aspect or the second aspect.
第八方面,本申请实施例提供一种芯片系统,包括处理器,所述处理器与存储器耦合,所述处理器执行存储器中存储的计算机程序,以实现上述第一方面或第二方面所述的方法。其中,所述芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。In an eighth aspect, an embodiment of the present application provides a chip system, including a processor, where the processor is coupled to a memory, and the processor executes a computer program stored in the memory, so as to implement the first aspect or the second aspect above Methods. Wherein, the chip system may be a single chip or a chip module composed of multiple chips.
可以理解的是,上述第一方面和第二方面所述的方法可以相互结合形成新的实施方式,当两者结合时,第二方面中所述的第二终端设备还可以包括第一方面中所述的第三终端设备,即第二方面中所述的第二终端设备可以用第一方面中所述的目标终端设备表示;另外,上述第三方面至第八方面的有益效果可以参见上述第一方面和第二方面中的相关描述,在此不再赘述。It can be understood that the methods described in the first aspect and the second aspect can be combined with each other to form a new implementation. When the two are combined, the second terminal device described in the second aspect can also include the method in the first aspect. The third terminal device, that is, the second terminal device described in the second aspect may be represented by the target terminal device described in the first aspect; in addition, for the beneficial effects of the third to eighth aspects, reference may be made to the above The relevant descriptions in the first aspect and the second aspect are not repeated here.
附图说明Description of drawings
图1为本申请实施例提供的无线通信方法的系统架构示意图;FIG. 1 is a schematic diagram of a system architecture of a wireless communication method provided by an embodiment of the present application;
图2为本申请实施例提供的一种应用界面示意图;2 is a schematic diagram of an application interface provided by an embodiment of the present application;
图3为本申请实施例提供的设备发现过程的流程示意图;3 is a schematic flowchart of a device discovery process provided by an embodiment of the present application;
图4为本申请实施例提供的一种应用场景示意图;FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图5为本申请实施例提供的另一种应用场景示意图;FIG. 5 is a schematic diagram of another application scenario provided by an embodiment of the present application;
图6为本申请实施例提供的无线通信方法的流程示意图;6 is a schematic flowchart of a wireless communication method provided by an embodiment of the present application;
图7为本申请实施例提供的另一种应用界面示意图;FIG. 7 is a schematic diagram of another application interface provided by an embodiment of the present application;
图8为本申请实施例提供的又一种应用界面示意图;FIG. 8 is a schematic diagram of another application interface provided by an embodiment of the present application;
图9为本申请实施例提供的一些应用界面示意图;9 is a schematic diagram of some application interfaces provided by the embodiments of the present application;
图10为本申请实施例提供的过滤搜索的流程示意图;10 is a schematic flowchart of a filtering search provided by an embodiment of the present application;
图11为本申请实施例提供的探测请求帧和探测响应帧的帧结构示意图;11 is a schematic diagram of a frame structure of a probe request frame and a probe response frame provided by an embodiment of the present application;
图12为本申请实施例提供的又一种应用界面示意图;FIG. 12 is a schematic diagram of another application interface provided by an embodiment of the present application;
图13为本申请实施例提供的又一种应用界面示意图;13 is a schematic diagram of another application interface provided by an embodiment of the present application;
图14为本申请实施例提供的消息结构示意图;FIG. 14 is a schematic diagram of a message structure provided by an embodiment of the present application;
图15为本申请实施例提供的又一种应用界面示意图;FIG. 15 is a schematic diagram of another application interface provided by an embodiment of the present application;
图16为本申请实施例提供的又一种应用界面示意图;16 is a schematic diagram of another application interface provided by an embodiment of the present application;
图17为本申请实施例提供的一种文件分享示意图;17 is a schematic diagram of a file sharing provided by an embodiment of the present application;
图18为本申请实施例提供的文件分享流程示意图;FIG. 18 is a schematic flowchart of a file sharing process provided by an embodiment of the present application;
图19为本申请实施例提供的文件分享的应用场景示意图;19 is a schematic diagram of an application scenario of file sharing provided by an embodiment of the present application;
图20为本申请实施例提供的文件分享中各消息的地址信息示意图;20 is a schematic diagram of address information of each message in file sharing provided by the embodiment of the present application;
图21为本申请实施例提供的确定目标设备的位置范围示意图;21 is a schematic diagram of determining a location range of a target device according to an embodiment of the present application;
图22为本申请实施例提供的另一种文件分享示意图;FIG. 22 is another schematic diagram of file sharing provided by an embodiment of the present application;
图23为本申请实施例提供的又一种文件分享示意图;FIG. 23 is another schematic diagram of file sharing provided by an embodiment of the present application;
图24为本申请实施例提供的无线通信装置的结构示意图;FIG. 24 is a schematic structural diagram of a wireless communication apparatus provided by an embodiment of the present application;
图25为本申请实施例提供的终端设备的结构示意图。FIG. 25 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请实施例中的附图对本申请实施例进行描述。本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the implementation 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.
首先介绍本申请实施例的应用场景。本申请实施例提供的技术方案可以适用于各种Wi-Fi P2P连接场景,为了便于说明,本实施例中以Wi-Fi直连场景为例进行示例性说明。First, the application scenarios of the embodiments of the present application are introduced. The technical solutions provided in the embodiments of the present application may be applicable to various Wi-Fi P2P connection scenarios. For the convenience of description, the Wi-Fi direct connection scenario is used as an example for illustrative description in this embodiment.
图1为本申请实施例提供的无线通信方法的系统架构示意图,如图1所示,该系统中可以包括多个终端设备(图中是以三个为例进行示例性说明),各个终端设备之间可以建立Wi-Fi直连连接,通过建立的连接互相分享数据。其中,终端设备可以是图1中所示的手机1100、平板电脑(pad)1200、电视1300,也可以是未示出的大屏设备、台式电脑、笔记本或可穿戴设备等支持Wi-Fi直连功能的终端设备。FIG. 1 is a schematic diagram of a system architecture of a wireless communication method provided by an embodiment of the present application. As shown in FIG. 1 , the system may include multiple terminal devices (three are used as an example in the figure for illustration), and each terminal device Wi-Fi direct connection can be established between them, and data can be shared with each other through the established connection. The terminal device may be a mobile phone 1100, a tablet computer (pad) 1200, a TV 1300 shown in FIG. 1, or a large-screen device, a desktop computer, a notebook, or a wearable device that is not shown that supports Wi-Fi Direct connected terminal equipment.
具体的,终端设备之间可以采用标准的Wi-Fi直连技术建立无线连接,即终端设备之间可以建立群组(group),该群组中,其中一个终端设备扮演组拥有者(group owner,GO),其他终端设备扮演组客户端(group client,GC),GO与每个GC之间建立Wi-Fi直连连接。Specifically, a standard Wi-Fi direct connection technology can be used to establish a wireless connection between terminal devices, that is, a group can be established between terminal devices. In the group, one of the terminal devices acts as a group owner. , GO), other terminal devices act as group clients (GC), and a Wi-Fi direct connection is established between GO and each GC.
其中,GO与任一GC之间的连接建立流程可以包括设备发现(device discovery)和群组建立(group formation)等过程,两设备通过设备发现过程发现对方,通过群组建立过程进行GO协商和交换安全配置信息。Among them, 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 the GO negotiation and Exchange security configuration information.
图2为本申请实施例提供的一种应用界面示意图,如图2中的(a)所示,用户可以点击手机1100上Wi-Fi设置界面10中的Wi-Fi直连选项101打开Wi-Fi直连界面20,启动Wi-Fi直连功能。Wi-Fi直连功能启动后,终端设备会发起设备发现流程,搜索周围的Wi-Fi直连设备,如图2中的(b)所示,可用设备栏202中可以显示“正在搜索”等提示信息,提示用户正在搜索可用的Wi-Fi直连设备。其中,在Wi-Fi直连界面20中,用户可以通过我的设备栏201中的设备名称选项2011编辑本端的Wi-Fi直连设备名称,如图2中所示的手机1100的Wi-Fi直连设备名称为“AAA”。FIG. 2 is a schematic diagram of an application interface provided by an embodiment of the present application. As shown in (a) of FIG. 2 , the user can click the Wi-Fi direct connection option 101 in the Wi-Fi setting interface 10 Fi Direct interface 20, activate the Wi-Fi Direct function. After the Wi-Fi Direct function is activated, the terminal device will initiate a device discovery process to search for Wi-Fi Direct devices around, as shown in (b) in Figure 2, the available device bar 202 can display "Searching", etc. A message prompts the user to search for available Wi-Fi Direct devices. Among them, in the Wi-Fi direct connection interface 20, the user can edit the name of the Wi-Fi direct connection device of the local end through the device name option 2011 in the my device bar 201, as shown in FIG. 2, the Wi-Fi of the mobile phone 1100 The name of the directly connected device is "AAA".
下面以两个终端设备(分别为第一终端设备和第二终端设备)为例说明Wi-Fi直连连接建立过程。The following takes two terminal devices (respectively a first terminal device and a second terminal device) as an example to describe the Wi-Fi Direct connection establishment process.
图3为本申请实施例提供的设备发现过程的流程示意图,如图3所示,设备发现流程可以包括:扫描阶段(scan phase)和发现阶段(find phase)。FIG. 3 is a schematic flowchart of a device discovery process provided by an embodiment of the present application. As shown in FIG. 3 , the device discovery process may include: a scan phase (scan phase) and a discovery phase (find phase).
扫描阶段:设备发现流程启动后,终端设备(包括第一终端设备和第二终端设备)会首先进入扫描阶段,在这一阶段中,终端设备在其支持的所有频段上发送探测请求(Probe Request)帧,终端设备在该阶段中不处理来自其他设备的探测请求帧,其可以接收探测响应(Probe Response)帧,发现其他处于监听状态的终端设备。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. In this phase, the terminal device sends a probe request (Probe Request) on all frequency bands it supports. ) frame, the terminal device does not process the probe request frame from other devices in this stage, it can receive the probe response (Probe Response) frame, and find other terminal devices in the listening state.
发现阶段:扫描阶段完成后,终端设备进入发现阶段。在这一阶段中,终端设备在监听状态(listen state)和搜索状态(search state)之间来回切换。Discovery phase: After the scanning phase is completed, the terminal device enters the discovery phase. During this phase, the end device switches back and forth between the listen state and the search state.
在监听状态中,终端设备在1、6和11频段(即图中的ch1、ch6和ch11,称为社会信道(social channel))中随机选择一个频段作为监听频段(listen channel),监听探测请 求帧并相应回复探测响应帧。例如,图2中第一终端设备的监听频段是1,第二终端设备的监听频段是6。终端设备监听一段时间后进入搜索状态。In the listening state, the terminal device randomly selects a frequency band in the frequency bands 1, 6 and 11 (that is, ch1, ch6 and ch11 in the figure, called social channel) as the listening frequency band (listen channel), and monitors the detection request. frame and reply to the probe response frame accordingly. For example, in FIG. 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 listening for a period of time.
在搜索状态中,终端设备将在1、6和11频段上分别发送探测请求帧。当两个终端设备处于同一频段时,一方发送的帧可以被对方接收到,例如,图2中第二终端设备在ch6上监听到第一终端设备在ch6上发送的探测请求帧,并向第一终端设备相应回复探测响应帧。In the search state, the terminal device will send probe request frames on frequency bands 1, 6 and 11 respectively. When two terminal devices are in the same frequency band, the frame sent by one party can be received by the other party. For example, in Figure 2, the second terminal device monitors the probe request frame sent by the first terminal device on ch6 on ch6, and sends the frame to the first terminal device on ch6. A terminal device replies with a probe response frame accordingly.
终端设备完成探测请求帧和探测响应帧的交互,即发现Wi-Fi直连设备,则可以存储对端设备的设备信息,包括媒体访问控制(media access control,MAC)地址、设备类型(device type)和设备名(device name)等。After the terminal device completes the interaction between the probe request frame and the probe response frame, that is, it discovers the Wi-Fi Direct device, and can store the device information of the peer device, including the media access control (MAC) address, device type (device type) ) and device name, etc.
如图2中的(c)所示,终端设备一旦搜索到Wi-Fi直连设备,则更新界面,显示搜索到的Wi-Fi直连设备,如图中可用设备栏202显示搜索到的“BBB”(pad1200的设备名称)和“CCC”(电视1300的设备名称)。用户可以在该界面中选择某个Wi-Fi直连设备与之建立连接,例如,如图2中的(c)和(d)所示,用户可以点击“BBB”与之建立连接。As shown in (c) in Figure 2, once the terminal device searches for a Wi-Fi Direct device, it will update the interface to display the searched Wi-Fi Direct device. BBB" (the device name of the pad 1200) and "CCC" (the device name of the TV 1300). The user can select a Wi-Fi Direct device in this interface to establish a connection with it. For example, as shown in (c) and (d) in Figure 2, the user can click "BBB" to establish a connection with it.
在用户选择了待连接的Wi-Fi直连设备后,终端设备可以开展群组建立过程(对应图中开始建立群组)以准备构造一个Group,该过程可以包括GO协商(GO negotiation,GON)流程和安全配置(provisioning)流程。其中,GON流程用于协商由谁来做GO,GON流程执行完毕后,进行安全配置流程,该流程主要是利用Wi-Fi简易配置(Wi-Fi simple configuration,WSC)协议来协商安全配置信息。After the user selects the Wi-Fi Direct device to be connected, the terminal device can carry out a group establishment process (starting to establish a group in the corresponding figure) to prepare to construct a Group, and the process can include GO negotiation (GO negotiation, GON) Process and security provisioning process. Among them, the GON process is used to negotiate who will do the GO. After the GON process is executed, the security configuration process is performed. This process mainly uses the Wi-Fi simple configuration (WSC) protocol to negotiate security configuration information.
群组建立流程结束后,GC向GO申请因特网互联协议(internet protocol,IP)地址,GO启动一个动态主机配置协议(dynamic host configuration protocol,DHCP)服务器,为GC分配IP地址,分配完IP地址后,终端设备即可以更新连接状态,告知用户连接成功,例如图2中的(d)所示的,更新“BBB”的连接状态为“已连接”。群组解散后,可以释放GC的IP地址。After the group establishment process is over, the GC applies to the GO for an internet protocol (IP) address, and the GO starts a dynamic host configuration protocol (DHCP) server to assign an IP address to the GC. , the terminal device can update the connection status and inform the user that the connection is successful. For example, as shown in (d) in FIG. 2 , the connection status of the updated "BBB" is "connected". After the group is disbanded, the IP address of the GC can be released.
在建立了群组后,GO和GC也可以通过P2P邀请(P2P invitation)流程邀请其他终端设备加入群组;在设备发现过程中,终端设备也可以通过P2P邀请流程激活一个之前建立过的永久性群组(persistent group)。After the group is established, GO and GC can also invite other terminal devices to join the group through the P2P invitation (P2P invitation) process; during the device discovery process, the terminal device can also activate a previously established permanent through the P2P invitation process. Group (persistent group).
另外,如图2中的(b)和(c)所示,用户可以在搜索过程中通过点击Wi-Fi直连界面20中的停止图标203停止搜索;如图2中的(d)所示,用户也可以在搜索结束后,通过点击Wi-Fi直连界面20中的搜索图标204再次启动设备发现过程。In addition, as shown in (b) and (c) of FIG. 2, the user can stop the search by clicking the stop icon 203 in the Wi-Fi Direct interface 20 during the search process; as shown in (d) of FIG. 2 , the user can also start the device discovery process again by clicking the search icon 204 in the Wi-Fi Direct interface 20 after the search is over.
按照Wi-Fi直连协议,GO的IP地址缺省为192.168.49.1,即任意群组中GO的IP地址均为192.168.49.1,这样不同组的GO的IP地址重叠,可能会相互干扰,从而导致终端设备连接不稳定的情况。图4为本申请实施例提供的一种应用场景示意图,例如图4中所示的,A1、B1和C1是一个群组,A2、B2、C2和D2是一个群组,A1和A2分别是各自组的GO,两者的缺省IP地址均为192.168.49.1。在相对小的空间中(比如同一个地铁车厢中),两个群组同时希望内部分享音频、视频或图片等数据;在通信过程中,由于A1和A2的IP地址相同,各GC:B1、C1、B2、C2和D2,无法自动判断连接哪个GO,也无法人工干预;并且在连接错误的GO后,即使错误的GO离开,GC仍需要较长时间才能恢复初始状态,重新连接新的GO,这些都会影响终端设备的连接稳定性。According to the Wi-Fi Direct connection 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, so the IP addresses of GO in different groups overlap and may interfere with each other, thus A condition that causes an unstable connection to the end device. FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application. For example, as shown in FIG. 4 , A1, B1, and C1 are a group, A2, B2, C2, and D2 are a group, and A1 and A2 are respectively The GO of the respective group, the default IP address of both is 192.168.49.1. In a relatively small space (such as in the same subway car), two groups want to share data such as audio, video or pictures at the same time; during the communication process, since the IP addresses of A1 and A2 are the same, each GC: B1, C1, B2, C2 and D2 cannot automatically determine which GO is connected, nor can they manually intervene; and after connecting the wrong GO, even if the wrong GO leaves, the GC still needs a long time to restore the initial state and reconnect the new GO , which will affect the connection stability of the terminal device.
另外,GC的地址由GO动态分配,也可能会影响终端设备的连接稳定性。图5为本申请实施例提供的另一种应用场景示意图,如图5中所示的,A3、B3和C3是一个Group,三者互相分享数据,其中,A3是GO;分享过程中A3离开,D3希望加入群组,由于A3是GO,其离开后,群组解散,B3和C3无法继续分享数据,且D3无法及时获得IP地址,因而也无法参与数据分享,B3、C3和D3需要重新建组才能继续分享数据。In addition, the address of the GC is dynamically allocated by GO, which may also affect the connection stability of the terminal device. FIG. 5 is a schematic diagram of another application scenario provided by the embodiment of the present application. As shown in FIG. 5 , A3, B3 and C3 are a group, and the three share data with each other, wherein A3 is GO; during the sharing process, A3 leaves , D3 wants to join the group. Since A3 is a GO, after it leaves, the group is disbanded, B3 and C3 cannot continue to share data, and D3 cannot obtain an IP address in time, so it cannot participate in data sharing. B3, C3 and D3 need to re-share Form a group to continue sharing data.
此外,Wi-Fi直连协议中的设备发现、协商和连接过程复杂,所需资源过多,系统开销大,对于瘦设备来说,过于厚重;并且,在设备发现过程中,缺省扫描到周围所有处于设备发现状态的终端设备,因此搜索效率较低,搜索结果对应的操作界面也不够简洁,而且若搜索到不相干的终端设备并误连接上,还可能存在安全风险。In addition, the device discovery, negotiation and connection process in the Wi-Fi Direct protocol is complex, requires too many resources, and has high system overhead, which is too heavy for thin devices; All the surrounding terminal devices are in the device discovery state, so the search efficiency is low, and the operation interface corresponding to the search results is not simple enough, and if irrelevant terminal devices are searched and connected by mistake, there may be security risks.
为此,本申请实施例提供一种轻量化的无线通信方法,该方法主要对Wi-Fi直连协议和流程进行简化,裁剪掉群组建立和P2P邀请流程,群组管理采用去中心化方式,即两端设备对等连接,取消GO、GC角色区分;并且IP地址管理也可以采用去中心化方式,取消GC的IP地址统一管理和分配,将IP地址虚拟化,由终端设备本地管理本端和对端的虚拟IP地址,数据由数据链路层转发,以解决GO的IP地址重叠而导致终端设备自动连接不稳定的问题;另外,在设备发现过程中,对终端设备进行搜索过滤,以提高搜索效率和安全性,优化操作界面。下面对该技术方案进行详细说明。To this end, the embodiments of the present application provide 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 method for group management. , that is, peer-to-peer connection of devices at both ends, cancel the role distinction between GO and GC; and IP address management can also be decentralized, cancel the unified management and allocation of GC IP addresses, virtualize IP addresses, and locally manage this by terminal devices. The virtual IP address of the end and the opposite end, the data is forwarded by the data link layer to solve the problem that the IP address of the GO overlaps and the automatic connection of the terminal device is unstable; in addition, during the device discovery process, the terminal device is searched and filtered to Improve search efficiency and security, and optimize the operation interface. The technical solution will be described in detail below.
图6为本申请实施例提供的无线通信方法的流程示意图,如图6所示,本实施例提供的无线通信方法可以包括如下步骤:FIG. 6 is a schematic flowchart of a wireless communication method provided by an embodiment of the present application. As shown in FIG. 6 , the wireless communication method provided by this embodiment may include the following steps:
S110、第一终端设备响应于用户的连接触发操作,搜索满足本端的过滤条件的第二终端设备。S110. The first terminal device searches for a second terminal device that satisfies the filter condition of the local end in response to the user's connection triggering operation.
S120、第一终端设备将其与搜索到的第二终端设备之间的Wi-Fi直连连接状态置为已连接状态。S120. The first terminal device sets the Wi-Fi direct connection state between it and the searched second terminal device to a connected state.
具体的,用户可以通过连接触发操作开启Wi-Fi直连功能,其中,该连接触发操作可以是用户对目标系统功能的触发操作,例如,用户可以如图2中的(a)所示的,点击Wi-Fi设置界面中的Wi-Fi直连选项开启Wi-Fi直连功能;作为另一种实现方式,第一终端设备上也可以提供快捷选项,例如图7中所示的,可以在下拉通知栏中提供Wi-Fi直连图标,用户可以通过点击该图标开启Wi-Fi直连功能。其中,Wi-Fi直连功能需要在Wi-Fi功能开启的情况下才可以开启,因此,在接收到用户的连接触发操作时,终端设备可以在Wi-Fi功能未开启的情况下,自动开启Wi-Fi功能后再开启Wi-Fi直连功能;也可以提示用户,在用户授权开启Wi-Fi功能后开启Wi-Fi直连功能。Specifically, the user can enable the Wi-Fi Direct function through a connection trigger operation, where the connection trigger operation can be a user trigger operation on the target system function. For example, the user can, as shown in (a) of FIG. 2, Click the Wi-Fi direct connection option in the Wi-Fi setting interface to enable the Wi-Fi direct connection function; as another implementation method, the first terminal device can also provide shortcut options, such as shown in Figure 7, which can be found in A Wi-Fi direct connection icon is provided in the pull-down notification bar, and users can click the icon to enable the Wi-Fi direct connection function. Among them, the Wi-Fi direct connection function can only be turned on when the Wi-Fi function is turned on. Therefore, when receiving a connection trigger operation from the user, the terminal device can automatically turn on the Wi-Fi function when the Wi-Fi function is not turned on. After the Wi-Fi function is enabled, the Wi-Fi direct connection function is enabled; the user may also be prompted to enable the Wi-Fi direct connection function after the user authorizes the Wi-Fi function to be enabled.
为了提高用户使用的便利性,本实施例中,也可以是在用户启动目标应用程序(application,APP)或者目标功能时,触发目标APP或目标功能自动开启Wi-Fi直连功能。例如:用户点击图库图标打开图库后,图库自动开启Wi-Fi直连功能;又例如,用户点击视频通话功能,发起视频通话时,视频通话功能自动开启Wi-Fi直连功能,搜索可用的Wi-Fi直连设备建立连接。In order to improve user convenience, in this embodiment, when the user starts a target application (application, APP) or target function, the target APP or target function is triggered to automatically enable the Wi-Fi direct connection function. For example, after the user clicks the gallery icon to open the gallery, the gallery automatically enables the Wi-Fi direct connection function; for another example, when the user clicks the video call function to initiate a video call, the video call function automatically enables the Wi-Fi direct connection function to search for available Wi-Fi -Fi Direct device to establish connection.
可以理解的是,目标应用程序不限于上述的图库,其还可以是文件管理APP或其他即时通讯APP等,本申请实施例对此不做特别限定。It can be understood that the target application is not limited to the above-mentioned gallery, and may also be a file management APP or other instant messaging APP, etc., which is not particularly limited in this embodiment of the present application.
当然,用户可以通过输入语音指令开启Wi-Fi直连功能,本实施例对此不做特别限定。另外,连接触发操作也可以是用户点击Wi-Fi直连选项打开Wi-Fi直连界面后,对Wi-Fi 直连界面中搜索图标的点击操作。Certainly, the user may enable the Wi-Fi direct connection function by inputting a voice command, which is not particularly limited in this embodiment. In addition, the connection trigger operation may also be a click operation of the search icon in the Wi-Fi Direct interface after the user clicks the Wi-Fi Direct option to open the Wi-Fi Direct interface.
第一终端设备检测到用户的连接触发操作后,可以响应该操作,进入设备发现流程进行过滤搜索,以搜索满足本端的过滤条件的第二终端设备,其中,该过滤条件可以是系统预设的,例如:第一终端设备自动搜索与其登录同一系统账号的第二终端设备;为了提高用户使用的灵活性,第一终端设备也可以提供过滤条件设置功能供用户自主设置过滤条件。After the first terminal device detects the user's connection triggering operation, it can respond to the operation and enter the device discovery process to filter and search to search for the second terminal device that satisfies the filter conditions of the local end, where the filter conditions can be preset by the system For example, the first terminal device automatically searches for the second terminal device that is logged into the same system account; in order to improve the flexibility of the user, the first terminal device may also provide a filter condition setting function for the user to independently set the filter condition.
在具体实现时,如图8中的(a)所示的,除了图2中所示的各种功能选项之外,Wi-Fi直连界面20中还可以包括过滤条件选项203,用户可以点击过滤条件选项203打开过滤条件界面40;如图8中的(b)所示,过滤条件界面40中可以包括各种过滤条件的选项,用户可以在过滤条件界面40中设置所需的过滤条件。During specific implementation, as shown in (a) of FIG. 8 , in addition to the various functional options shown in FIG. 2 , the Wi-Fi Direct interface 20 may also include a filter condition option 203 , and the user can click The filter condition option 203 opens the filter condition interface 40; as shown in (b) of FIG.
具体的,如图8中的(b)所示,过滤条件可以包括系统账号过滤、群组过滤、密码过滤、语音过滤和近场通信(near field communication,NFC)过滤等,过滤条件界面40中可以提供各过滤条件对应的开关控件401~405,用户可以通过这些开关控件选择开启一个或多个过滤条件,即过滤条件可以包括一个或多个。Specifically, as shown in (b) in FIG. 8 , the filtering conditions may include system account filtering, group filtering, password filtering, voice filtering, and near field communication (NFC) filtering, etc. In the filtering condition interface 40 Switch controls 401 to 405 corresponding to each filter condition may be provided, and the user may select to enable one or more filter conditions through these switch controls, that is, the filter conditions may include one or more.
对于系统账号过滤,若被用户开启,第一终端设备则可以在搜索过程中自动搜索与第一终端设备登录同一系统账号的第二终端设备。可选的,本申请实施例中不限于对系统账号进行过滤,在具体实现时,也可以对其他账号进行过滤。For system account filtering, if enabled by the user, the first terminal device can automatically search for a second terminal device that logs into the same system account as the first terminal device during the search process. Optionally, the embodiment of the present application is not limited to filtering system accounts, and other accounts may also be filtered during specific implementation.
对于群组过滤,用户若预先建立了目标群组,比如家庭群(包含家庭所有成员的终端设备的相关信息)和成人群(不包含家庭成员中的未成年人所持的终端设备的相关信息),则在进行终端搜索过滤时,也可以开启群组过滤,添加群组过滤条件。其中,如图所示,群组过滤选项所在栏中可以设置群组名的编辑选项4021,供用户编辑群组过滤的具体条件,可选的,群组过滤的具体条件也可以是群组号等其他群组标识信息,本申请实施例对此不做特别限定。群组过滤若被开启,第一终端设备则可以在搜索过程中自动搜索用户选择的目标群组中的第二终端设备。比如,用户设置群组过滤中的群组名为家庭群,第一终端设备则搜索家庭群中各成员的终端设备(即第二终端设备)。For group filtering, if the user has pre-established target groups, such as family group (including information about terminal equipment of all family members) and adult group (excluding information about terminal equipment held by minors in family members) , you can also enable group filtering and add group filtering conditions when performing terminal search filtering. Among them, as shown in the figure, the group name editing option 4021 can be set in the column where the group filtering option is located, so that the user can edit the specific conditions of the group filtering. Optionally, the specific conditions of the group filtering can also be the group number. and other group identification information, which is not particularly limited in this embodiment of the present application. If group filtering is enabled, 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 filter to be a family group, and the first terminal device searches the terminal devices (ie, the second terminal device) of each member in the family group.
对于密码过滤(亦可称为口令过滤),如图中所示的,密码过滤选项所在栏中可以设置密码编辑选项4031,用户可以在开启密码过滤的同时,通过该选项设置密码。密码过滤若被开启,第一终端设备则可以在搜索过程中自动搜索设置了相同密码的第二终端设备。可选的,本申请实施例中不限于对密码进行过滤,在具体实现时,也可以对文本信息进行过滤。For password filtering (also called 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 a password through this option while enabling password filtering. If password filtering is enabled, 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 during specific implementation, text information may also be filtered.
对于语音过滤,若被用户开启,第一终端设备则可以在Wi-Fi直连功能开启后,自动采集用户输入的语音信息,根据采集的语音信息生成过滤信息,然后在搜索过程中自动搜索探测消息中携带相同过滤信息的第二终端设备。对于该过滤条件,在具体应用时,由于终端设备之间距离较近,可以由终端设备周围的任一用户发出语音信息,各终端设备则均可以采集到该语音信息,根据该语音信息生成过滤条件对应的过滤信息。For voice filtering, if enabled 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 enabled, generate filtering information according to the collected voice information, and then automatically search for detection during the search process. The second terminal device carrying the same filtering information in the message. For this filter condition, in the specific application, due to the short distance between terminal devices, any user around the terminal device can send voice information, and each terminal device can collect the voice information, and generate a filter based on the voice information. Filter information corresponding to the condition.
对于NFC过滤,用户可以在开启第一终端设备的Wi-Fi直连功能后,将第一终端设备与需要建立连接的第二终端设备进行“碰一碰”操作;第一终端设备则可以采集到第二终端设备的NFC信息(例如可以是NFC标识),然后可以在搜索过程中搜索与采集的NFC信息相对应的第二终端设备。在具体实现时,第一终端设备可以根据本端的NFC信息和采 集到的NFC信息生成过滤信息。For NFC filtering, after enabling the Wi-Fi direct connection function of the first terminal device, the user can perform a "touch" operation between the first terminal device and the second terminal device that needs to establish a connection; the first terminal device can collect to the NFC information of the second terminal device (for example, it may be an NFC identifier), and then the second terminal device corresponding to the collected NFC information can be searched during the search process. During specific implementation, the first terminal device may generate filtering information according to the NFC information of the local end and the collected NFC information.
可以理解的是,若用户不开启任何过滤条件,第一终端设备也可以按照标准的Wi-Fi直连协议执行设备发现和协商等过程来建立连接。It can be understood that, if the user does not enable any filtering conditions, the first terminal device can also perform processes such as device discovery and negotiation according to the standard Wi-Fi Direct protocol to establish a connection.
作为另一种实现方式,第一终端设备可以提供上述各种过滤条件对应的过滤功能供目标应用程序调用,目标应用程序在开启Wi-Fi直连功能后,自动启用至少一种过滤功能,例如,用户打开图库后,图库在开启Wi-Fi直连功能的同时,启动系统账号过滤功能,搜索登录同一系统账号的第二终端设备;又例如,用户打开视频通话功能后,可以输入语音发起视频通话,视频通话功能则在开启Wi-Fi直连功能的同时,启动语音过滤功能,将用户输入的语音作为过滤条件进行过滤搜索;或者,目标APP或目标功能也可以提供过滤功能的启动选项,用户可以通过点击启动选项启动对应的过滤功能,下面以目标功能为视频通话功能为例,示例性说明用户开启Wi-Fi直连功能和启动过滤功能的过程。As another implementation manner, the first terminal device may provide filtering functions corresponding to the above-mentioned various filtering conditions for the target application to invoke, and the target application automatically enables at least one filtering function after enabling the Wi-Fi Direct function, for example , after the user opens the gallery, the gallery activates the system account filtering function while enabling the Wi-Fi direct connection function, and searches for the second terminal device logged in the same system account; for another example, after the user enables the video call function, he can input voice to initiate a video For calls and video calls, when the Wi-Fi direct connection function is enabled, the voice filter function is activated, and the voice input by the user is used as a filter condition to filter and search; alternatively, the target APP or target function can also provide the activation option of the filter function The user can activate the corresponding filtering function by clicking the activation option. The following takes the target function as the video calling function as an example to illustrate the process of enabling the Wi-Fi direct connection function and the filtering function of the user.
图9为本申请实施例提供的一些应用界面示意图,如图9中的(a)所示,下拉通知栏中可以提供视频通话图标3012,用户可以通过点击该图标开启视频通话功能。视频通话功能开启后,可以如前所述的自动开启Wi-Fi直连功能,也可以如图9中的(b)所示的,提示用户授权开启Wi-Fi直连功能和Wi-Fi功能。用户可以选择开启选项开启Wi-Fi直连功能和Wi-Fi功能,如图9中的(c)所示,Wi-Fi直连功能开启后,视频通话功能可以提供过滤功能对应的各种过滤条件的启动选项:系统账号过滤选项001、群组过滤选项002、密码过滤选项003、语音过滤选项004和NFC过滤选项005,其中,对于系统账号过滤选项001,用户在点击后第一终端设备即可搜索可用的Wi-Fi直连设备建立连接;对于群组过滤选项002和密码过滤选项003,用户选择后,视频通话功能可以提供输入界面供用户输入群组信息或密码信息;对于语音过滤选项004和NFC过滤选项005,用户选择后,第一终端设备可以提示用户输入语音信息或者进行“碰一碰”操作。以密码过滤为例,如图9中的(c)和(d)所示,用户可以点击密码过滤选项003,然后可以在弹出的输入界面中输入密码,其中,密码的位数可以如图示的预设为4位,也可以不限定位数。FIG. 9 is a schematic diagram of some application interfaces provided by the embodiments of the present application. As shown in (a) of FIG. 9 , a video call icon 3012 can be provided in the pull-down notification bar, and the user can click the icon to enable the video call function. After the video call function is turned on, the Wi-Fi direct connection function can be automatically turned on as described above, or as shown in (b) in Figure 9, the user can be prompted to authorize the Wi-Fi direct connection function and the Wi-Fi function to be turned on. . The user can select the enable option to enable the Wi-Fi direct connection function and the Wi-Fi function, as shown in (c) in Figure 9, after the Wi-Fi direct connection function is enabled, the video call function can provide various filters corresponding to the filter function Conditional startup options: system account filtering option 001, group filtering option 002, password filtering option 003, voice filtering option 004, and NFC filtering option 005, wherein, for the system account filtering option 001, after the user clicks, the first terminal device is It can search for available Wi-Fi direct devices to establish a connection; for group filter option 002 and password filter option 003, after the user selects, the video call function can provide an input interface for users to enter group information or password information; for voice filter option 004 and NFC filter option 005, after the user selects, the first terminal device may prompt the user to input voice information or perform a "tap" operation. Taking password filtering as an example, as shown in (c) and (d) in Figure 9, the user can click the password filtering option 003, and then enter a password in the pop-up input interface, where the number of digits of the password can be as shown in the figure The default is 4 bits, and the number of bits is not limited.
可以理解的是,视频通话功能也可以采用APP的形式展示给用户,具体的实现形式本实施例不做特别限定。It can be understood 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.
下面对第一终端设备与第二终端设备的搜索过程进行详细说明。The search process of the first terminal device and the second terminal device will be described in detail below.
如上所述,第一终端设备可以在探测消息中携带过滤条件对应的过滤信息,该探测消息可以包括探测请求消息和探测请求响应消息,其中,探测请求消息具体可以是探测请求帧,探测请求响应消息具体可以是探测响应帧,即第一终端设备可以在探测请求帧和探测响应帧中携带过滤信息;过滤信息可以是上述过滤条件中的系统账号、群组标识、密码、语音信息或NFC信息等信息,为了提高数据传输的安全性,过滤信息也可以是根据上述的系统账号、群组标识、密码、语音信息或NFC信息等信息生成的字符信息。对应的,第一终端设备和第二终端设备在互相搜索对方时,可以采用图10所示的方法实现,图10为本申请实施例提供的过滤搜索的流程示意图,如图10所示,该方法可以包括如下步骤:As described above, the first terminal device may carry the filtering information corresponding to the filtering conditions in the detection message, and the detection message may include a detection request message and a detection request response message, wherein the detection request message may specifically be a detection request frame, and the detection request response The message may specifically be a probe response frame, that is, the first terminal device may carry filter information in the probe request frame and the probe response frame; the filter information may be the system account number, group ID, password, voice information or NFC information in the above filter conditions In order to improve the security of data transmission, the filtering information may also be character information generated according to the above-mentioned information such as system account number, group identification, password, voice information or NFC information. Correspondingly, when the first terminal device and the second terminal device search each other for each other, the method shown in FIG. 10 can be used to realize. FIG. 10 is a schematic flowchart of filtering and searching provided by this embodiment of the application. The method may include the following steps:
S111、第一终端设备广播携带有第一过滤信息的探测请求帧。S111. The first terminal device broadcasts a probe request frame carrying the first filtering information.
具体的,第二终端设备中也可以设置过滤条件,具体设置过程与第一终端设备的过滤条件设置过程类似,此处不再赘述。为了便于区分,将第一终端设备中的过滤条件对应的过滤信息称为第一过滤信息,将第二终端设备中的过滤条件对应的过滤信息称为第二过滤 信息。Specifically, the filter condition may also be set in the second terminal device, and the specific setting process is similar to the filter condition setting process of the first terminal device, which will not be repeated here. For convenience 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.
第一终端设备在Wi-Fi直连功能开启后,可以如前所述的,在所有信道或者社会信道上广播探测请求帧。为了便于对端设备获知第一终端设备的过滤条件,第一终端设备可以在探测请求帧中携带第一过滤信息,这样第二终端设备可以在满足该过滤条件的情况下再回复响应消息,以告知第一终端设备其符合过滤条件。After the Wi-Fi direct connection function is enabled, the first terminal device may broadcast the probe request frame on all channels or social channels as described above. In order to facilitate the peer device to know the filter conditions of the first terminal device, the first terminal device may carry the first filter information in the probe request frame, so that the second terminal device can reply with a response message when the filter conditions are satisfied, so as to Inform the first terminal device that it meets the filtering conditions.
图11为本申请实施例提供的探测请求帧和探测响应帧的帧结构示意图,如图11所示,探测请求帧可以包括MAC帧头(MAC header)、帧主体(frame body)和帧校验序列(frame check sequence,FCS)字段,其中,MAC帧头中可以包括一些帧控制信息和地址信息等;帧主体表示数据域,为有效载荷;FCS用于保障帧数据完整性。FIG. 11 is a schematic diagram of a frame structure of a probe request frame and a probe response frame provided by an embodiment of the application. As shown in FIG. 11 , the probe request frame may include a MAC header, a frame body, and a frame check. The sequence (frame check sequence, FCS) field, in which the MAC frame header may include some frame control information and address information, etc.; the frame body represents the data field, which is the payload; FCS is used to ensure the integrity of the frame data.
第一过滤信息可以携带在帧主体中,在具体实现时,可以在帧主体中增加特征参数(character code)字段,通过该字段指示第一过滤信息,其中,特征参数字段可以位于帧主体的任意位置。The first filtering information may be carried in the frame body. In the specific implementation, a characteristic parameter (character code) field may be added to the frame body, and the first filtering information may be indicated by this field, wherein the characteristic parameter field may be located in any arbitrary position of the frame body. Location.
S112、第二终端设备接收到探测请求帧后,判断探测请求帧中携带的第一过滤信息与第二过滤信息是否匹配,若匹配,则确定第一终端设备满足本端的过滤条件。S112. After receiving the probe request frame, the second terminal device determines whether the first filter information carried in the probe request frame matches the second filter information, and if so, it is determined that the first terminal device satisfies the local filter condition.
第二终端设备可以与第一终端设备类似,响应用户的连接触发操作,开启Wi-Fi直连功能,具体过程与第一终端设备开启Wi-Fi直连功能的过程类似,此处不再赘述。The second terminal device may be similar to the first terminal device, and responds to the user's connection triggering operation to enable the Wi-Fi direct connection function. The specific process is similar to that of the first terminal device to enable the Wi-Fi direct connection function, which will not be repeated here. .
第二终端设备在开启Wi-Fi直连功能后,可以如前所述的,在监听频段上监听探测请求帧。第二终端设备若监听到探测请求帧,则可以提取其中的第一过滤信息,与本端的过滤条件对应的过滤信息(即第二过滤信息)进行比对,确定第一终端设备是否符合本端的过滤条件。若第一过滤信息与第二过滤信息匹配,则说明第一终端设备符合第二终端设备的过滤条件;若第一过滤信息与第二过滤信息不匹配,第二终端设备则可以丢弃该探测请求帧,拒绝与第一终端设备连接。After enabling the Wi-Fi direct connection function, the second terminal device may monitor the probe request frame on the monitor frequency band as described above. If the second terminal device monitors the detection request frame, it can extract the first filter information in it, compare it with the filter information corresponding to the filter conditions of the local end (ie the second filter information), and determine whether the first terminal device complies with the local end's filter information. filter conditions. If the first filtering information matches the second filtering information, it means that the first terminal device complies with the filtering conditions of the second terminal device; if the first filtering information does not match the second filtering information, the second terminal device can discard the detection request frame, refusing to connect with the first terminal device.
在具体判断时,对于账号、群组、密码和NFC等过滤条件,可以比对第一过滤信息与第二过滤信息是否一致,若一致,则认为两者匹配;对于语音过滤,可以比对第一过滤信息与第二过滤信息的相似度,若相似度满足预设相似度,则可以认为两者匹配,其中,预设相似度的大小可以根据实际需要设置。When making a specific judgment, for filter conditions such as account number, group, password, and NFC, it is possible to compare whether the first filtering information is consistent with the second filtering information. If they are consistent, the two are considered to match; for voice filtering, the The similarity between the first filtering information and the second filtering information, if the similarity meets the preset similarity, it can be considered that the two match, wherein the size of the preset similarity can be set according to actual needs.
S113、第二终端设备向第一终端设备返回携带有第二过滤信息的探测响应帧。S113. The second terminal device returns a probe response frame carrying the second filtering information to the first terminal device.
第二终端设备若确定探测请求帧中携带的第一过滤信息与第二过滤信息匹配,则可以相应回复探测响应帧,以告知第一终端设备两者的过滤条件一致,即第一终端设备和第二终端设备互相符合对端的过滤条件。或者也可以在探测响应帧中携带确认信息,以告知第一终端设备两者的过滤条件一致。If the second terminal device determines that the first filter information carried in the probe request frame matches the second filter information, it may reply to the probe response frame accordingly to inform the first terminal device that the two filter conditions are consistent, that is, the first terminal device and the The second terminal devices meet the filtering conditions of the peer end. Alternatively, confirmation information may also be carried in the probe response frame to inform the first terminal device that the filtering conditions of the two are consistent.
为了提高可靠性,第二终端设备也可以在该帧中携带第二过滤信息,以告知第一终端设备本端的过滤条件。In order to improve reliability, the second terminal device may also carry the second filtering information in the frame, so as to inform the first terminal device of the filtering conditions of the local end.
如图11所示,探测响应帧可以包括MAC帧头、帧主体和FCS字段,与第一过滤信息类似,第二过滤信息可以携带在探测响应帧的帧主体中,同样的,可以在探测响应帧的帧主体中增加特征参数字段,通过该字段指示第二过滤信息,其中,特征参数字段可以位于帧主体的任意位置。As shown in Figure 11, the probe response frame may include MAC frame header, frame body and FCS fields. Similar to the first filter information, the second filter information may be carried in the frame body of the probe response frame. Similarly, the probe response frame may contain the second filter information. A feature parameter field is added to the frame body of the frame, through which the second filtering information is indicated, wherein the feature parameter field can be located at any position in the frame body.
可以理解的是,探测请求帧和探测响应帧也可以携带本端设备的设备标识、设备名、设备类型和MAC地址等设备信息,以供对端设备识别。It can be understood 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.
S114、第一终端设备接收到探测响应帧后,判断探测响应帧中携带的第二过滤信息与第一过滤信息是否匹配,若匹配,则确定第二终端设备满足本端的过滤条件。S114: After receiving the probe response frame, the first terminal device determines whether the second filter information carried in the probe response frame matches the first filter information, and if so, determines that the second terminal device satisfies the local filter condition.
具体的,第一终端设备接收到第二终端设备回复的探测响应帧,可以确定第二终端设备满足本端的过滤条件。Specifically, after receiving the probe response frame replied by the second terminal device, the first terminal device may determine that the second terminal device satisfies the filtering conditions of the local end.
如前所述,为提高可靠性,探测响应帧可以携带第二过滤信息,则对应的,第一终端设备可以提取其中的第二过滤信息,与本端的过滤条件对应的过滤信息(即第一过滤信息)进行比对,基于比对结果确定第二终端设备是否符合本端的过滤条件。As mentioned above, in order to improve reliability, the probe response frame can carry the second filter information, and correspondingly, the first terminal device can extract the second filter information, the filter information corresponding to the filter conditions of the local end (that is, the first terminal device). filter information) to compare, and based on the comparison result, determine whether the second terminal device complies with the filtering conditions of the local end.
具体的,若第一过滤信息与第二过滤信息匹配,则说明第二终端设备符合第一终端设备的过滤条件;若第一过滤信息与第二过滤信息不匹配,则说明第二终端设备不符合第一终端设备的过滤条件,第一终端设备则可以丢弃该探测响应帧,拒绝与第二终端设备连接。其中,第一终端设备判断第一过滤信息与第二过滤信息是否匹配的过程与第二终端设备的过滤信息判断过程类似,此处不再赘述。Specifically, if the first filtering information matches the second filtering information, it means that the second terminal device complies with the filtering conditions 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 match. If the filtering conditions of the first terminal device are met, the first terminal device may discard the probe response frame and refuse to connect with the second terminal device. The process of the first terminal device judging whether the first filter information matches the second filter information is similar to the process of judging the filter information by the second terminal device, and details are not described herein again.
在近场通信场景中,通信双方在同一局域网中,可以直接通过物理层和数据链路层进行相互通信,因此,本实施例中,终端设备之间在进行数据传输时,数据包中可以不携带IP地址,通过物理层和数据链路层进行通信。对应的,可以裁减掉IP地址分配过程,进而可以裁剪掉群组建立流程和P2P邀请流程。这样,第一终端设备搜索到满足过滤条件的第二终端设备,即可以表示连接建立成功,搜索到的第二终端设备的Wi-Fi直连连接状态则可以显示为已连接状态,同样的,搜索到的第二终端设备上也可以将第一终端设备的Wi-Fi直连连接状态显示为已连接状态。其中,第一终端设备搜索到的第二终端设备可以包括一个或者多个。In the near field communication scenario, the two 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 transmission is performed between terminal devices, the data packets may not be included in the data packets. Carrying the IP address, it communicates 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 satisfies the filtering conditions, it can indicate that the connection is established successfully, and the Wi-Fi Direct connection status of the searched second terminal device can be displayed as a connected state. Similarly, The Wi-Fi Direct connection status of the first terminal device may also be displayed as a connected state on the searched second terminal device. Wherein, the second terminal device searched by the first terminal device may include one or more.
可以理解的是,第一终端设备和第二终端设备只是为了区分描述,对于某个终端设备来说,其可以作为第一终端设备也可以作为第二终端设备,即第一终端设备和第二终端设备都可以具备对方的功能。例如:对于第一终端设备来说,其也可以接收其他终端设备(称为第三终端设备)广播的探测请求帧,在判断第一过滤信息与探测请求帧中携带的第三终端设备的过滤信息匹配的情况下,可以确定第三终端设备满足本端的过滤条件,并可以向第三终端设备返回携带第一过滤信息的探测响应帧;对应的,第三终端设备可以在判断自身的过滤信息与探测响应帧中的第一过滤信息匹配时,确定第一终端设备满足第三终端设备的过滤条件。即任意一个终端设备都可以采用图10中所示的第一终端设备执行的搜索过程,和/或,第二终端设备执行的搜索过程来与其他终端设备建立Wi-Fi直连连接。It can be understood that the first terminal device and the second terminal device are only for the purpose of distinguishing the description. For a certain terminal device, it can be used as the first terminal device or as the second terminal device, that is, the first terminal device and the second terminal device. Both terminal devices can have the functions of each other. For example, for the first terminal device, it can also receive probe request frames broadcast by other terminal devices (referred to as third terminal devices). If the information matches, it can be determined that the third terminal device satisfies the filtering conditions of the local end, and can return a probe response frame carrying the first filtering information to the third terminal device; correspondingly, the third terminal device can judge its own filtering information. When matching with the first filtering information in the probe response frame, it is determined that the first terminal device satisfies the filtering condition of the third terminal device. That is, any terminal device can use the search process performed by the first terminal device shown in FIG. 10 and/or the search process performed by the second terminal device to establish a Wi-Fi direct connection with other terminal devices.
以三个终端设备aaa、bbb和ccc互相搜索建立连接为例,假设aaa和bbb的过滤条件相同,都登录的同一系统账号,ccc登录的系统账号与aaa、bbb的不同。如图12中的(a)所示,用户分别点击这三个终端设备的Wi-Fi直连选项启动Wi-Fi直连功能;如图12中的(b)所示,三个终端设备开始搜索周围可用的Wi-Fi直连设备,如图12中的(c)所示,aaa和bbb可以互相搜索到对方建立连接,ccc不满足aaa和bbb的过滤条件,在aaa和bbb的搜索过程中被过滤掉,其无法与aaa和bbb建立连接。Take three terminal devices aaa, bbb, and ccc to search for each other to establish a connection as an example. Assuming that aaa and bbb have the same filter conditions, they both log in to the same system account, and the system account logged in by ccc is different from that of aaa and bbb. As shown in (a) of Figure 12, the user clicks the Wi-Fi Direct option of the three terminal devices to activate the Wi-Fi Direct function; as shown in (b) of Figure 12, the three terminal devices start Search for available Wi-Fi direct devices around, as shown in (c) in Figure 12, aaa and bbb can search for each other to establish a connection, ccc does not meet the filter conditions of aaa and bbb, in the search process of aaa and bbb is filtered out, it cannot establish a connection with aaa and bbb.
如图13中的(a)所示,用户也可以分别点击这三个终端设备的文件管理图标5打开文件管理APP,文件管理APP自动启动Wi-Fi直连功能;aaa和bbb则可以基于相同的系统账号(过滤信息)互相搜索到对方建立连接,ccc无法与aaa和bbb建立连接。如图13中的(b)所示,用户可以在文件管理图标5对应的文件管理界面50的其他设备栏501中, 查看已连接的Wi-Fi直连设备,其中,用户可以点击文件管理界面50的浏览图标502,打开浏览界面,以浏览本机和其他设备上的文件,其他设备栏501可以位于该浏览界面中;文件管理界面50中还可以提供搜索框等其他功能控件。As shown in (a) of Figure 13, the user can also click the file management icon 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 be based on the same The system accounts (filtered information) of the 2s can search each other to establish a connection, and ccc cannot establish a connection with aaa and bbb. As shown in (b) of FIG. 13 , the user can view the connected Wi-Fi Direct devices in the other device bar 501 of the file management interface 50 corresponding to the file management icon 5, wherein the user can click the file management interface The browse icon 502 of 50 opens the browse interface to browse files on the local computer and other devices. The other device bar 501 can be located in the browse interface; the file management interface 50 can also provide other functional controls such as a search box.
为了兼容网络层等上层应用,第一终端设备和第二终端设备可以本地生成双方的虚拟IP地址,其中,该虚拟IP地址只在本地有效,在进行数据传输时,向外发送的第一消息中可以不携带IP地址,第二终端设备接收到第一消息后,可以在传递给网络层的数据包中,将虚拟IP地址添加进去,以供网络层识别,其中,目的IP地址为第二终端设备的虚拟IP地址,源虚拟IP地址为第一终端设备的虚拟IP地址;同样的,第二终端设备向第一终端设备返回第二消息时,第二消息中可以不携带IP地址,第一终端设备接收到第二终端设备返回的第二消息后,将虚拟IP地址添加进去,以供网络层识别,其中,目的IP地址为第一终端设备的虚拟IP地址,源虚拟IP地址为第二终端设备的虚拟IP地址。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, where the virtual IP address is only valid locally, and when data transmission is performed, the first message sent to the outside The IP address may not be carried in the message. After receiving the first message, the second terminal device may add the virtual IP address to the data packet transmitted to the network layer for identification by the network layer, wherein the destination IP address is the second message. The virtual IP address of the 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 the second message to the first terminal device, the second message may not carry the IP address, and the first After receiving the second message returned by the second terminal device, a terminal device adds a virtual IP address for identification by the network layer, wherein the destination IP address is the virtual IP address of the first terminal device, and the source virtual IP address is the first virtual IP address. 2. The virtual IP address of the terminal device.
图14为本申请实施例提供的消息结构示意图,如图14中的(a)所示,标准的Wi-Fi直连协议中,网络层的数据包头部包含IP地址,数据链路层的数据包头部包含MAC地址,以太有效载荷部分包含IP地址和IP有效载荷;如图14中的(b)所示,本方案中,上述单播消息在网络层对应的数据包中包含第一终端设备和第二终端设备的虚拟IP地址,在数据链路层对应的数据包中头部包含MAC地址,以太有效载荷部分不包含IP地址信息。FIG. 14 is a schematic diagram of a message structure provided by an embodiment of the present application. As shown in (a) of FIG. 14 , in the standard Wi-Fi Direct protocol, the data packet header of the network layer includes an IP address, and the data of the data link layer The packet header contains the MAC address, and the Ethernet payload part contains the IP address and the IP payload; as shown in (b) in Figure 14, in this solution, the above-mentioned unicast message contains the first terminal device in the data packet corresponding to the network layer and the virtual IP address of the second terminal device, the header of the data packet corresponding to the data link layer contains the MAC address, and the Ethernet payload part does not contain IP address information.
对于组播消息,终端设备在发送时,可以在组播消息的IP头中添加组播地址,其中,目的IP地址可以为组播IP地址,源IP地址可以为约定的虚拟IP地址;可选的,组播消息也可以与单播消息类似,向外发送时不携带IP地址。广播消息的设置方法与组播消息类似,此处不再赘述。For a multicast message, the terminal device can add a multicast address to the IP header of the multicast message when sending, where the destination IP address can be the multicast IP address, and the source IP address can be the agreed virtual IP address; optional Yes, multicast messages can also be similar to unicast messages, and do not carry an 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.
其中,终端设备可以根据MAC地址或其他设备信息生成虚拟IP地址,例如,终端设备可以在Wi-Fi直连功能启动后根据自身的MAC地址生成本机的虚拟IP地址,在搜索到对端设备后,根据对端设备的MAC地址生成对端设备的虚拟IP地址。The terminal device can generate a virtual IP address according to the MAC address or other device information. For example, the terminal device can generate its own virtual IP address according to its own MAC address after the Wi-Fi Direct function is activated. Afterwards, the virtual IP address of the peer device is generated according to the MAC address of the peer device.
下面说明本方案的有益效果:对于图4所示的场景,本方案中,A1、B1和C1可以设置同一过滤条件(例如输入同一密码),这样三者中两两之间均可以建立Wi-Fi直连连接,互相分享资源;同样的,A2、B2、C2和D2也可以设置相同的过滤条件,互相建立Wi-Fi直连连接进行资源分享。各终端设备之间通过各自唯一的MAC地址互相通信,虚拟IP地址本地管理,因而可以减少连接错误的现象,有效提高终端设备之间的连接稳定性。The beneficial effects of this scheme are described below: For the scenario shown in Figure 4, in this scheme, A1, B1 and C1 can set the same filter condition (for example, enter the same password), so that Wi-Fi can be established between each of the three Fi direct connection to share resources with each other; similarly, A2, B2, C2 and D2 can also set the same filter conditions to establish Wi-Fi direct connection with each other for resource sharing. Each terminal device communicates with each other through their own unique MAC addresses, and the virtual IP address is managed locally, thus reducing the phenomenon of connection errors and effectively improving the connection stability between the terminal devices.
对于图5所示的场景,A3、B3和C3之间可以设置同一过滤条件(例如登录同一系统账号),两两之间互相建立连接;如果在分享过程中A3离开,D3希望加入,一方面,由于A3、B3和C3之间对等连接,A3的离开不影响B3和C3之间的连接;另一方面,D3可以采用相同的过滤条件搜索到B3和C3,与B3和C3建立连接,因此,B3、C3和D3之间可以继续分享数据,这进一步提高了终端设备之间的连接稳定性。For the scenario shown in Figure 5, A3, B3 and C3 can set the same filter condition (for example, log in to the same system account), and establish a connection between them; if A3 leaves during the sharing process, D3 wants to join, on the one hand , due to the peer-to-peer connection between A3, B3 and C3, the departure of A3 does not affect the connection between B3 and C3; on the other hand, D3 can use the same filter conditions to search for B3 and C3, and establish a connection with B3 and C3, Therefore, data can continue to be shared among B3, C3 and D3, which further improves the connection stability between terminal devices.
另外,本方案中,对Wi-Fi直连的连接过程进行了简化,裁剪掉了群组建立和P2P邀请流程,因而可以降低Wi-Fi直连连接的复杂性,从而可以降低资源需求,扩大适用范围;此外,在设备发现过程中,通过过滤条件对终端设备进行搜索过滤,这样可以过滤掉不相干的终端设备,提高搜索效率和安全性,且界面上只显示搜索到的满足过滤条件的终端设备,因而也可以优化操作界面。In addition, in this solution, the connection process of Wi-Fi direct connection is simplified, and the group establishment and P2P invitation process are cut out, thus reducing the complexity of Wi-Fi direct connection, thereby reducing resource requirements and expanding Scope of application; in addition, in the process of device discovery, terminal devices are searched and filtered through filter conditions, which can filter out irrelevant terminal devices, improve search efficiency and security, and only display the searched ones that meet the filter conditions on the interface. terminal equipment, thus also optimizing the operator interface.
第一终端设备与第二终端设备建立Wi-Fi直连连接后,就可以通过Wi-Fi直连连接相互分享文件、进行视频通话、跨设备编辑、无线投屏或远程控制等。下面分别以视频通话和文件分享为例进行示例性说明。After the first terminal device and the second terminal device establish a Wi-Fi direct connection, they can share files with each other, make video calls, edit across devices, wirelessly cast a screen, or remotely control each other through the Wi-Fi direct connection. The following is an exemplary description by taking video calls and file sharing as examples.
基于Wi-Fi直连连接进行视频通话:To make a video call over a Wi-Fi Direct connection:
例如,在一些移动通信信号弱或无移动通信信号,并且无无线局域网络的区域,比如郊区,用户之间不能进行较佳质量的通信,此时则可以通过终端设备上基于Wi-Fi直连连接的视频通话功能互相进行通信。For example, in some areas with weak or no mobile communication signal and no wireless local area network, such as suburban areas, users cannot communicate with better quality. The connected video calling features communicate with each other.
具体的,每个用户可以采用上述图9中所示的视频通话过程建立视频通话连接,继续以密码过滤为例,如图15中的(a)所示,用户输入完密码“1122”并点击确认选项0031确认后,第一终端设备则开始搜索可用的Wi-Fi直连设备建立连接;假设第二终端设备的用户采用同样的方式输入了相同的密码“1122”,如图15中的(b)所示,第一终端设备则可以与第二终端设备建立连接,并通过该连接进行视频通话,即基于建立的Wi-Fi直连连接传输采集的视频流。Specifically, each user can use the video call process shown in Figure 9 to establish a video call connection, and continue to take password filtering as an example, as shown in (a) in Figure 15, after the user enters the password "1122" and clicks After the confirmation option 0031 is confirmed, the first terminal device starts to search for available Wi-Fi Direct devices to establish a connection; it is assumed that the user of the second terminal device inputs the same password "1122" in the same way, as shown in Figure 15 ( As shown in b), the first terminal device can establish a connection with the second terminal device, and conduct a video call through the connection, that is, transmit the collected video stream based on the established Wi-Fi direct connection.
其中,视频通话界面中可以如图中所示的提供挂断选项和转为语音选项等;也可以在连接多个第二终端设备的情况下,在主窗口中显示其中一个第二终端设备采集的视频图像,并在子窗口中显示其他第二终端设备的视频图像,以供用户切换主窗口中显示的视频图像,其中,子窗口的尺寸小于主窗口的尺寸,其可以在主窗口上悬浮显示。Among them, the video call interface can provide the option of hanging up and switching to voice as shown in the figure; or when multiple second terminal devices are connected, the main window can display the data collected by one of the second terminal devices. and display the video images of other second terminal devices in the sub-window, so that the user can switch the video images displayed in the main window, wherein the size of the sub-window is smaller than that of the main window, and it can be suspended on the main window show.
例如:用户1、用户2和用户3分别通过上述密码过滤方式与对方的终端设备建立视频通话连接,则对于每个用户来说,其所持的终端设备(即第一终端设备)上可以显示另外两个用户所持的终端设备(即第二终端设备)采集的视频图像;两个第二终端设备采集的视频图像中,其中一个在主窗口中显示,另一个在子窗口中显示。假设图15所示的第一终端设备为用户1的终端设备,该第一终端设备先与用户2所持的终端设备建立了视频通话连接,然后与用户3所持的终端设备建立了视频通话连接,则如图15中的(b)所示,该第一终端设备上可以在主窗口中显示用户2所持终端设备采集的视频图像,在子窗口中用户3所持终端设备采集的视频图像;用户可以点击子窗口,使主窗口中显示的视频图像切换为用户3所持终端设备采集的视频图像。For example, if user 1, user 2 and user 3 respectively establish a video call connection with each other's terminal equipment through the above-mentioned password filtering method, then for each user, the terminal equipment (ie the first terminal equipment) held by each user can display another Video images collected by terminal devices (ie, second terminal devices) held by two users; among the video images collected by the two second terminal devices, one is displayed in the main window, and the other is displayed in the sub-window. Assuming that the first terminal device shown in FIG. 15 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, Then as shown in (b) in Figure 15, the first terminal device can display the video image collected by the terminal device held by user 2 in the main window, and the video image collected by the terminal device held by user 3 in the sub-window; Click the sub-window to switch the video image displayed in the main window to the video image collected by the terminal device held by user 3 .
当然,第一终端设备上还可以在另一子窗口中显示第一终端设备采集的视频图像(未示出),用户也可以点击该子窗口,使主窗口中显示的视频图像切换为第一终端设备采集的视频图像;第一终端设备也可以在主窗口中默认显示最后建立连接的终端设备采集的视频图像,即上述第一终端设备也可以在主窗口中默认显示用户3所持终端设备采集的视频图像。Of course, the video image (not shown) collected by the first terminal device can also be displayed on the first terminal device in another sub-window, and the user can also click on the sub-window to switch the video image displayed in the main window to the first terminal device. The video image collected by the terminal device; the first terminal device can also display the video image collected by the terminal device that established the connection last by default in the main window, that is, the first terminal device can also display the video image collected by the terminal device held by user 3 in the main window by default. video image.
需要说明的是,上述图15中主窗口和子窗口的位置和大小只是一种示例,其并非用于限定本申请,具体实现时都可以根据需要设置,本实施例对此不做特别限定。It should be noted that the positions and sizes of the main window and the sub-windows in FIG. 15 above are just examples, which are not used to limit the present application, and can be set as required during specific implementation, which is not particularly limited in this embodiment.
在一些场景中,如果其中两个用户(例如用户1和用户3)之间距离过远,另一用户(例如用户2)与这两个用户之间的距离较近,则用户1和用户3的终端设备之间无法建立Wi-Fi直连连接,用户2的终端设备可以分别与用户1和用户3的终端设备建立Wi-Fi直连连接,此种情况下,用户1和用户3则可以通过用户2的终端设备进行通信,即用户2的终端设备可以作为通信的中间设备,以实现较远距离的通信。In some scenarios, if two users (eg, user 1 and user 3) are too far apart, and another user (eg, user 2) is close to the two users, then user 1 and user 3 A Wi-Fi direct connection cannot be established between the terminal devices of user 2, and 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 The communication is performed through the terminal device of the user 2, that is, the terminal device of the user 2 can be used as an intermediate device for communication, so as to realize long-distance communication.
上述视频通话方式,不依赖基站信号,随时随地进行视频通话,因而可以在一些移动 通信信号弱或无移动通信信号的区域,采用上述方式进行视频通话,以更好的满足用户需求;另外,上述视频通话方式不占用移动数据流量,因而也可以节省流量资源。The above video call method does not rely on base station signals, and can make video calls anytime and anywhere. Therefore, in some areas with weak or no mobile communication signals, the above methods can be used to make video calls to better meet user needs; The video call method does not occupy mobile data traffic, so it can also save traffic resources.
基于Wi-Fi直连连接进行文件分享:File sharing over Wi-Fi Direct connection:
以图13中的(b)所示的终端设备aaa为例,如图16中的(a)所示,用户可以在其他设备栏501中选择想要访问的终端设备bbb;如图16中的(b)所示,用户选择终端设备bbb后,可以访问终端bbb上的文件,对终端bbb上的文件进行编辑和管理,其中,可访问的文件可以包括图示的最近文件、图片、视频、音频、文档和其他类型的文件,每类文件下的文件可以包括多个文件夹,例如图中所示的,视频文件包括所有视频文件夹、相机文件夹、录屏文件夹、下载文件夹、微信文件夹和QQ文件夹等。Taking the terminal device aaa shown in (b) in FIG. 13 as an example, as shown in (a) in FIG. 16 , the user can select the terminal device bbb that he wants to access in the other device column 501; as shown in FIG. 16 As shown in (b), after the user selects the terminal device bbb, he can access the files on the terminal bbb, and edit and manage the files on the terminal bbb, wherein the accessible files may include the latest files, pictures, videos, Audio, document and other types of files, the files under each type of file can include multiple folders, for example, as shown in the figure, video files include all video folders, camera folders, screen recording folders, download folders, WeChat folder and QQ folder, etc.
图17为本申请实施例提供的一种文件分享示意图,如图17中的(a)所示,用户可以在第一终端设备上选择要分享的目标图片S,然后点击分享选项6,打开分享界面60;如图17中的(b)所示,分享界面60可以包括微信图标601、Wi-Fi直连图标602、蓝牙图标603和QQ图标604等其他分享图标,用户可以选择Wi-Fi直连图标602,打开Wi-Fi直连设备选择界面70;如图17中的(c)所示,在Wi-Fi直连设备选择界面70中,用户可以从连接的第二终端设备里选择目标设备bbb,以将目标图片S分享给选择的目标设备bbb;如图17中的(d)所示,用户选择了目标设备bbb后,目标设备bbb可以弹出询问用户是否接收的对话框80,用户可以点击对话框80中的接收选项801以接收目标图片S,或者点击拒绝选项802以拒绝接收目标图片S。FIG. 17 is a schematic diagram of a file sharing provided by an embodiment of the present application. As shown in (a) of FIG. 17 , the user can select the target image S to be shared on the first terminal device, and then click the sharing option 6 to open the sharing Interface 60; as shown in (b) of FIG. 17, the sharing interface 60 may include other sharing icons such as WeChat icon 601, Wi-Fi Direct icon 602, Bluetooth icon 603, and QQ icon 604, and the user can select Wi-Fi Direct Connect icon 602, open the Wi-Fi Direct device selection interface 70; as shown in (c) of FIG. 17, in the Wi-Fi Direct device selection interface 70, the user can select a target from the connected second terminal device device bbb to share the target image S to the selected target device bbb; as shown in (d) of FIG. 17 , after the user selects the target device bbb, the target device bbb can pop up a dialog box 80 asking the user whether to accept it. The accept option 801 in the dialog box 80 may be clicked to accept the target picture S, or the reject option 802 may be clicked to reject the reception of the target picture S.
可以理解的是,用户也可以通过第二终端设备向第一终端设备分享文件,分享的文件不限于图片,还可以是视频、音频或文档等其他类型的文件,为了便于说明,后续均以图片为例进行示例性说明;另外,在选择待分享的目标文件时,可以是点击操作,也可以是长按操作等其他选择操作。It can be understood 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 video, audio or documents. An exemplary description is given as an example; in addition, when selecting a target file to be shared, it may be a click operation, or other selection operations such as a long press operation.
为了提高用户使用的便利性,本申请实施例提供另一种文件分享方法,主要通过对准操作来自动确定目标设备,使得用户可以通过简单的分享操作快速向对准的终端设备分享文件。In order to improve user convenience, the embodiment of the present application provides another file sharing method, which mainly automatically determines the target device through an alignment operation, so that the user can quickly share files to the aligned terminal device through a simple sharing operation.
可以理解的是,第一终端设备与第二终端设备建立连接后,双方可以互相分享文件,为了便于说明,下面以第一终端设备向连接的第二终端设备分享文件为例进行说明。It can be understood that after the first terminal device and the second terminal device establish a connection, the two parties can share files with each other. For the convenience of description, the first terminal device shares files with the connected second terminal device as an example for description.
在具体实现时,第一终端设备可以检测用户对目标文件的触控操作,若检测到该操作,则可以响应该操作,向连接的第二终端设备中的目标设备分享该目标文件,其中,目标设备的指向方位与第一终端设备的指向方位相对。During specific implementation, the first terminal device can detect the user's touch operation on the target file, and 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 orientation of the target device is opposite to the pointing orientation of the first terminal device.
第一终端设备向目标设备分享目标文件的具体过程可以参见图18,图18为本申请实施例提供的文件分享流程示意图,如图18所示,该流程可以包括如下步骤:The specific process of the first terminal device sharing the target file with the target device may refer to FIG. 18 . FIG. 18 is a schematic diagram of a file sharing process provided by this embodiment of the present application. As shown in FIG. 18 , the process may include the following steps:
S210、第一终端设备响应于用户对选择的目标文件的分享操作,广播目标文件对应的第一通知消息。S210. In response to the user's sharing operation on the selected target file, the first terminal device broadcasts a first notification message corresponding to the target file.
具体的,分享操作可以是触控操作或者手势操作,其中,触控操作可以是滑屏操作,比如在屏幕目标区域(比如屏幕顶部)的上滑操作,也可以是连击操作等其他预定义的触控操作;手势操作可以是滑动手势或其他预定义的手势,本申请实施例对此均不作特别限定。目标文件可以包括一个或多个,用户可以通过点击和/或长按操作选择目标文件。Specifically, the sharing operation may be a touch operation or a gesture operation, wherein the touch operation may be a screen sliding operation, such as an upward sliding operation on a target area of the screen (such as the top of the screen), or other predefined operations such as a combo operation The gesture operation may be a sliding gesture or other predefined gestures, which are not particularly limited in this embodiment of the present application. The target file may include one or more, and the user can select the target file by clicking and/or long-pressing.
图19为本申请实施例提供的文件分享的应用场景示意图,如图19所示,该场景中包 括手机A2100、手机B2200、大屏设备2300和pad2400,其中,手机A2100表示第一终端设备,其分别与手机B2200、大屏设备2300和pad2400(第二终端设备)建立了Wi-Fi直连连接。如图19所示,用户可以选择手机上的文件,将手机对准pad2400,然后通过分享操作将文件分享给pad2400。FIG. 19 is a schematic diagram of an application scenario of file sharing provided by an embodiment of the application. As shown in FIG. 19 , the scenario includes a mobile phone A2100, a mobile phone B2200, a large-screen device 2300, and a pad2400, wherein the mobile phone A2100 represents the first terminal device, which Wi-Fi direct connection is established with mobile phone B2200, large-screen device 2300 and pad2400 (second terminal device) respectively. As shown in Figure 19, the user can select a file on the mobile phone, point the mobile phone to the pad2400, and then share the file to the pad2400 through the sharing operation.
可以理解的是,用户也可以将手机A2100对准大屏设备2300,将文件分享给大屏设备2300;并且,手机A2100、手机B2200、大屏设备2300和pad2400,两两之间均可以相互发现对方,建立Wi-Fi直连连接,用户也可以通过pad2400或手机B2200,向连接的其他终端设备分享文件,图19只是以用户通过手机A2100向pad2400分享文件为例进行示例性说明。下面以图19所示的场景为例说明终端设备之间的交互过程。It can be understood that the user can also point the mobile phone A2100 to the large-screen device 2300 and share files to the large-screen device 2300; and the mobile phone A2100, mobile phone B2200, large-screen device 2300 and pad2400 can all discover each other. The other party establishes a Wi-Fi direct connection, and the user can also share files with other connected terminal devices through the pad2400 or the mobile phone B2200. Figure 19 is just an example of sharing files with the pad2400 through the mobile phone A2100. The interaction process between terminal devices is described below by taking the scenario shown in FIG. 19 as an example.
在具体实现时,第一终端设备检测到用户的分享操作后,可以广播一通知消息(称为第一通知消息),以通知各第二终端设备。During specific implementation, after detecting the user's sharing operation, the first terminal device may broadcast a notification message (referred to as a first notification message) to notify each second terminal device.
其中,第一通知消息中可以携带目标文件的文件标识,例如文件名(后续也以文件名为例进行说明),以告知各第二终端设备,第一终端设备将要分享该目标文件。The first notification message may carry a file identifier of the target file, such as a file name (the file name is also used as an example in the following description) to inform each second terminal device that the first terminal device will share the target file.
第一通知消息中也可以携带第一终端设备的指向方位,以对第一通知消息进行标识,比如:用户对同一目标文件先后连续执行了多次分享操作,每次分享操作对准不同的第二终端设备,第一终端设备则对应广播多个第一通知消息,通过第一通知消息中携带的第一终端设备的指向方位,可以对第一通知消息进行区分。The first notification message may also carry the pointing direction of the first terminal device to identify the first notification message. For example, if the user has successively performed multiple sharing operations on the same target file, each sharing operation is aimed at a different first notification message. Two terminal devices, the first terminal device broadcasts a plurality of first notification messages correspondingly, and the first notification messages can be distinguished by the pointing direction of the first terminal device carried in the first notification message.
第一通知消息具体可以是广播消息,为了节省资源,第一通知消息也可以是组播消息。图20为本申请实施例提供的文件分享中各消息的地址信息示意图,如图20所示,第一通知消息中目的MAC地址可以为组播MAC地址,源MAC地址为手机A的MAC地址。Specifically, the first notification message may be a broadcast message. In order to save resources, the first notification message may also be a multicast message. 20 is a schematic diagram of address information of each message in file sharing provided by the embodiment of the present application. As shown in FIG. 20 , the destination MAC address in the first notification message may be a multicast MAC address, and the source MAC address is the MAC address of mobile phone A.
S220、第二终端设备返回第一通知消息对应的应答消息。S220. The second terminal device returns a response message corresponding to the first notification message.
具体的,各第二终端设备接收到第一通知消息后,可以向第一终端设备返回应答消息。Specifically, after receiving the first notification message, each second terminal device may return a response message to the first terminal device.
应答消息中可以携带对应的第二终端设备的指向方位,以便于第一终端设备确定与第二终端设备之间的指向关系。其中,指向方位可以通过方位传感器测得。The response message may carry the pointing azimuth of the corresponding second terminal device, so that the first terminal device can determine the pointing relationship with the second terminal device. Among them, the pointing azimuth can be measured by the azimuth sensor.
应答消息中还可以携带文件名,以便于第一终端设备确定第二终端设备回复的是哪个第一通知消息。比如,用户在第一终端设备上先后连续执行了多次分享操作分享不同的目标文件,第一终端设备则对应广播多个第一通知消息,各第二终端设备接收到各个第一通知消息后,则可以对每个第一通知消息进行应答,在应答消息中携带上文件名,以告知第一终端设备其应答的是哪个第一通知消息。The response message may also carry a file name, so that the first terminal device can determine which first notification message the second terminal device replies to. For example, if the user has successively performed multiple sharing operations on the first terminal device to share different target files, the first terminal device correspondingly broadcasts multiple first notification messages, and each second terminal device receives each first notification message after receiving the respective first notification messages. , each first notification message may be responded to, and the file name may be carried in the response message to inform the first terminal device which first notification message it responded to.
另外,应答消息中也可以携带第一终端设备的指向方位,以进一步对应答消息进行标识,例如前述的,用户对同一目标文件先后连续执行了多次分享操作,每次分享操作对准不同的第二终端设备,第一终端设备则对应广播多个第一通知消息;各第二终端设备接收到各个第一通知消息后,则可以对每个第一通知消息进行应答,在应答消息中携带上文件名和第一终端设备的指向方位,以告知第一终端设备其应答的是哪个第一通知消息。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 has successively performed multiple sharing operations on the same target file, and each sharing operation is aimed at a different target file. The second terminal device, the first terminal device broadcasts a plurality of first notification messages correspondingly; after each second terminal device receives each first notification message, it can respond to each first notification message, and carry the message in the response message. The above file name and the pointing direction of the first terminal device are used to inform the first terminal device which first notification message it responds to.
为了提高数据分享的准确性,目标设备可以位于第一终端设备周围的预设范围(称为第一预设范围)内,则应答消息中还可以携带对应的第二终端设备的设备位置,以便于第一终端设备基于该位置确定目标设备,其中,该预设范围可以是以第一终端设备为中心的球形区域,即目标设备与第一终端设备之间的距离不超过预设距离;该预设范围也可以是以第一终端设备为中心的柱形区域,即可以分别在水平和垂直方向上对目标设备相对于第 一终端设备的位置进行限制。其中,预设范围的具体大小可以根据需要设定,本实施例对此不做特别限定;设备位置可以通过全球定位系统(global positioning system,GPS)模块和/或地图应用获得。In order to improve the accuracy of data sharing, the target device may be located within a preset range (referred to as the first preset range) around the first terminal device, and the response message may also carry the device location of the corresponding second terminal device, so that The first terminal device determines the target device based on the position, wherein the preset range may 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 a preset distance; the The preset range may also be a columnar area centered on the first terminal device, that is, the position of the target device relative to the first terminal device may be limited in the horizontal and vertical directions respectively. The specific size of the preset range may be set as required, which is not particularly limited in this embodiment; the device location may be obtained through a global positioning system (global positioning system, GPS) module and/or a map application.
如图20所示,手机B2200接收到第一通知消息后,返回的应答消息中目的MAC地址为手机A的MAC地址,源MAC地址为手机B的MAC地址;大屏设备2300接收到第一通知消息后,返回的应答消息中目的MAC地址为手机A的MAC地址,源MAC地址为大屏设备的MAC地址;pad2400接收到第一通知消息后,返回的应答消息中目的MAC地址为手机A的MAC地址,源MAC地址为pad的MAC地址。As shown in Figure 20, after the mobile phone B2200 receives the first notification message, the destination MAC address in the returned reply message is the MAC address of the mobile phone A, and the source MAC address is the MAC address of the mobile phone B; the large-screen device 2300 receives the first notification After the message, the destination MAC address in the returned reply message is the MAC address of mobile phone A, and the source MAC address is the MAC address of the large-screen device; after the pad2400 receives the first notification message, the destination MAC address in the returned reply message is that of mobile phone A. MAC address, the source MAC address is the MAC address of the pad.
S230、第一终端设备接收到各个第二终端设备返回的应答消息后,根据分享操作对应的第一终端设备的指向方位和应答消息中第二终端设备的指向方位,从第二终端设备中确定目标设备。S230: After receiving the response message returned by each second terminal device, the first terminal device determines from the second terminal device according to the pointing bearing of the first terminal device corresponding to the sharing operation and the pointing bearing of the second terminal device in the response message target device.
具体的,第一终端设备接收到各个第二终端设备返回的应答消息后,可以根据接收用户对目标文件的分享操作时第一终端设备的指向方位和应答消息中第二终端设备的指向方位,确定第一终端设备与各个第二终端设备之间的指向关系,将与第一终端设备指向方位相对的第二终端设备作为目标设备。其中,第一终端设备的指向方位可以在接收到用户对目标文件的分享操作时记录下来,若应答消息中携带有第一终端设备的指向方位,则可以直接根据应答消息中第一终端设备的指向方位和第二终端设备的指向方位,确定两者的指向关系。Specifically, after receiving the response message returned by each second terminal device, the first terminal device may, according to the pointing orientation of the first terminal device when receiving the user's sharing operation on the target file and the pointing orientation of the second terminal device in the response message, The pointing relationship between the first terminal device and each second terminal device is determined, and the second terminal device opposite to the pointing azimuth of the first terminal device is used as the target device. The pointing direction of the first terminal device may be recorded when the user's sharing operation on the target file is received, and if the response message carries the pointing direction of the first terminal device, the direction of the first terminal device in the response message may be directly The pointing azimuth and the pointing azimuth of the second terminal device are used to determine the pointing relationship between the two.
若应答消息中携带有对应的第二终端设备的设备位置,则第一终端设备在确定目标设备时,除上述确定第一终端设备与各个第二终端设备之间的指向关系之外,还可以根据第一终端设备的设备位置和第二终端设备的设备位置,确定第一终端设备与各第二终端设备之间的位置关系;在第二终端设备的设备位置位于以第一终端设备的设备位置为中心的预设范围内,且指向方位与第一终端设备的指向方位相对的情况下,将该第二终端设备确定为目标设备。其中,为了提高确定的位置关系的准确性,可以结合往返时间(round trip time,RTT)测距等测距技术校正第一终端设备与第二终端设备之间的位置关系。If the response message carries the device location of the corresponding second terminal device, when the first terminal device determines the target device, in addition to the above-mentioned determination of the pointing relationship between the first terminal device and each second terminal device, it can also According to the device position of the first terminal device and the device position of the second terminal device, the positional relationship between the first terminal device and each second terminal device is determined; the device position of the second terminal device is located at the device with the first terminal device When the position is within a preset range of the center, and the pointing orientation is opposite to the pointing orientation of the first terminal device, the second terminal device is determined as the target device. Wherein, in order to improve the accuracy of the determined positional relationship, the positional relationship between the first terminal device and the second terminal device may be corrected in combination with ranging technologies such as round trip time (round trip time, RTT) ranging.
在确定第二终端设备的指向方位与第一终端设备的指向方位是否相对时,为了提高确定结果的准确性,可以结合第一终端设备和第二终端设备的设备位置进行确定。图21为本申请实施例提供的确定目标设备的位置范围示意图,如图21所示,O点为第一终端设备的设备位置,若第二终端设备位于第一终端设备的指向线上,且指向方位与第一终端设备的指向方位的反向方位一致,则可以认为第二终端设备的指向方位与第一终端设备的指向方位相对,其中,第一终端设备的指向线以第一终端设备的设备位置为起点,沿第一终端设备的指向方位延伸。When determining whether the pointing azimuth of the second terminal device is opposite to the pointing azimuth of the first terminal device, in order to improve the accuracy of the determination result, the device positions of the first terminal device and the second terminal device may be used for determination. 21 is a schematic diagram of determining the location range of a target device provided by an embodiment of the present application. As shown in FIG. 21 , point O is the device location of the first terminal device. If the second terminal device is located on the pointing line of the first terminal device, and If the pointing azimuth is consistent with the reverse azimuth of the pointing azimuth of the first terminal equipment, it can be considered that the pointing azimuth of the second terminal equipment is opposite to the pointing azimuth of the first terminal equipment, wherein the pointing line of the first terminal equipment is the same as that of the first terminal equipment. The position of the device is the starting point and extends along the pointing azimuth of the first terminal device.
为了方便用户使用,在确定第二终端设备的指向方位与第一终端设备的指向方位是否相对时,可以允许一定的指向误差。如图21所示,若第二终端设备位于以第一终端设备的指向线为中线的预设范围(称为第二预设范围)内,且指向方位与第一终端设备的指向方向的反向方位之间的方位夹角在预设角度范围内,则可以认为第二终端设备的指向方位与第一终端设备的指向方位相对。其中,第二预设范围可以是圆柱状,也可以是方柱状区域,即可以在水平和垂直方向上对目标设备相对于第一终端设备的指向线的位置进行限制。第二预设范围和预设角度范围的大小均可以根据需要设置,本实施例对此不做特别限 定。需要说明的是,图21是以水平方向为例说明目标设备的位置范围,垂直方向的位置范围未示出。For the convenience of the user, when determining whether the pointing orientation of the second terminal device is opposite to the pointing orientation of the first terminal device, a certain pointing error may be allowed. As shown in FIG. 21 , 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 pointing azimuth is opposite to the pointing direction of the first terminal device If the azimuth included angle between the azimuths is within the preset angle range, it can be considered that the pointing azimuth of the second terminal device is opposite to the pointing azimuth of the first terminal device. Wherein, the second preset range may be a cylindrical area or a square cylindrical area, that is, the position of the target device relative to the pointing line of the first terminal device may be limited in the horizontal and vertical directions. The sizes of the second preset range and the preset angle range can be set as required, which are not particularly limited in this embodiment. It should be noted that, FIG. 21 takes the horizontal direction as an example to illustrate the position range of the target device, and the position range in the vertical direction is not shown.
继续以图19为例,为了便于说明,假设各终端设备的设备位置在同一水平面上,预设角度范围为15°,正北方位作为0°。如图19所示,手机A2100的指向方位为北偏东30°(即30°),手机B2200的指向方位为南偏西35°(即215°),大屏设备2300的指向方位为正南方位(即180°),pad2400的指向方位为南偏西40°(即220°),大屏设备2300和pad2400位于手机A2100周围的第一预设范围内,手机B2200位于手机A2100周围的第一预设范围外,手机B2200和pad2400位于以手机A2100的指向线为中线的第二预设范围内,大屏设备2300位于以手机A2100的指向线为中线的第二预设范围外。其中,简洁起见,第一预设范围示出了上半部分,下半部分未示出。Continuing to take FIG. 19 as an example, for the convenience of description, it is assumed that the device positions of each terminal device are on the same horizontal plane, the preset angle range is 15°, and the true north position is 0°. As shown in Figure 19, the pointing orientation of the mobile phone A2100 is 30° north by east (ie 30°), the pointing orientation of the mobile phone B2200 is 35° south west (ie 215°), and the pointing orientation of the large-screen device 2300 is due south position (ie 180°), the pointing orientation of pad2400 is 40° south-west (ie 220°), the large-screen device 2300 and pad2400 are located in the first preset range around the mobile phone A2100, and the mobile phone B2200 is located in the first preset range around the mobile phone A2100 Outside the preset range, the mobile phone B2200 and pad2400 are located within the second preset range with the pointing line of the mobile phone A2100 as the center line, and the large-screen device 2300 is located outside the second preset range with the pointing line of the mobile phone A2100 as the center line. Wherein, for the sake of brevity, the upper half of the first preset range is shown, and the lower half is not shown.
基于上述信息可知,pad2400位于手机A2100周围的第一预设范围内;手机A2100的指向方位的反向方位为南偏西30°(即210°),pad2400的指向方位(220°)与手机A2100的指向方位的反向方位(210°)之间的方位夹角(10°)小于预设角度范围(15°),并且,pad2400位于以手机A2100的指向线为中线的第二预设范围内,因此,手机A2100可以将pad2400确定为目标设备,向其分享图片A。Based on the above information, it can be seen that the pad2400 is located in the first preset range around the mobile phone A2100; the reverse direction of the pointing azimuth of the mobile phone A2100 is 30° west by south (ie 210°), and the pointing azimuth (220°) of the pad2400 is the same as the mobile phone A2100. The azimuth angle (10°) between the reverse azimuth (210°) of the pointing azimuth is less than the preset angle range (15°), and the pad2400 is located in the second preset range with the pointing line of the mobile phone A2100 as the center line , therefore, the mobile phone A2100 can determine the pad2400 as the target device and share the picture A with it.
手机B2200指向方位(215°)与手机A2100的指向方位的反向方位(210°)之间的方位夹角(5°)小于预设角度范围(15°),且手机B2200位于以手机A2100的指向线为中线的第二预设范围内,但是,手机B2200位于手机A2100周围的第一预设范围外,因此,手机B2200未被确定为手机A2100的目标设备。The azimuth angle (5°) between the pointing azimuth (215°) of the mobile phone B2200 and the reverse azimuth (210°) of the mobile phone A2100 is smaller than the preset angle range (15°), and the mobile phone B2200 is located at the same position as the mobile phone A2100. The pointing line is within the second preset range of the center line, but the cell phone B2200 is outside the first preset range around the cell phone A2100, so the cell phone B2200 is not determined as the target device of the cell phone A2100.
大屏设备2300位于手机A2100周围的第一预设范围内,但是,大屏设备2300位于以手机A2100的指向线为中线的第二预设范围外,且大屏设备2300的指向方位(180°)与手机A2100的指向方位的反向方位(210°)之间的方位夹角(30°)大于预设角度范围(15°),因此,大屏设备2300未被确定为手机A2100的目标设备。The large-screen device 2300 is located within the first preset range around the mobile phone A2100, but the large-screen device 2300 is located outside the second preset range with the pointing line of the mobile phone A2100 as the center line, and the pointing azimuth of the large-screen device 2300 (180°) ) and the reverse azimuth (210°) of the pointing azimuth of the mobile phone A2100 (30°) 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 .
可以理解的是,上述目标设备确定过程也可以在第二终端设备中执行,即第一终端设备在向第二终端设备发送第一通知消息时,可以在其中携带第一终端设备的设备位置和指向方位,第二终端设备接收到之后可以据此判断本端是否为目标设备,然后向第一终端设备返回判断结果。It can be understood that the above target device determination process can also be performed in the second terminal device, that is, when the first terminal device sends the first notification message to the second terminal device, the device location and Pointing direction, after receiving the second terminal device, it can judge whether the local end is the target device, and then return the judgment result to the first terminal device.
第一终端设备如果未确定出目标设备,则可以提示用户没有目标设备,其中,提示方式可以是文本提示或者语音提示。If the first terminal device does not determine the target device, it may prompt the user that there is no target device, where the prompting manner may be a text prompt or a voice prompt.
S240、第一终端设备若确定出目标设备,则向目标设备发送目标文件对应的第二通知消息。S240. If the first terminal device determines the target device, it sends a second notification message corresponding to the target file to the target device.
第一终端设备如果确定出目标设备,则可以向该目标设备分享目标文件。为了节省资源,目标设备可以先查看本地是否存储有该目标文件,在未存储的情况下再向第一终端设备请求资源。If the first terminal device determines the target device, it can share the target file with the target device. In order to save resources, the target device may first check whether the target file is stored locally, and then request resources from the first terminal device if the target file is not stored.
在具体实现时,第一终端设备在确定出目标设备后,可以先向目标设备发送通知消息(称为第二通知消息),该第二通知消息中可以携带目标文件的文件名,以告知目标设备待分享的目标文件,从而便于目标设备进行后续的查看操作。In specific implementation, after determining the target device, the first terminal device may first send a notification message (referred to as a second notification message) to the target device, and the second notification message may carry the file name of the target file to inform the target The target file to be shared by the device, so as to facilitate subsequent viewing operations by the target device.
S250、目标设备若接收到第二通知消息,则查看是否存储有目标文件。S250. If the target device receives the second notification message, it checks whether the target file is stored.
目标设备接收到第二通知消息后,可以根据第二通知消息中携带的文件名查看本地是 否存储有目标文件。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.
目标设备如果确定本地存储有目标文件,则可以加载显示该目标文件,以供用户查看;或者也可以显示提示信息,提示用户本地存储有第一终端设备要分享的目标文件。If the target device determines that the target file is stored locally, it may load and display the target file for the user to view; or may also display prompt information to prompt the user that the target file to be shared by the first terminal device is locally stored.
S260、目标设备若确定未存储有目标文件,则向第一终端设备发送目标文件对应的资源请求消息。S260. If the target device determines that no target file is stored, it sends a resource request message corresponding to the target file to the first terminal device.
目标设备如果确定本地未存储有目标文件,则可以向第一终端设备发送资源请求消息,请求第一终端设备传输目标文件。其中,该资源请求消息中可以携带目标文件的文件名,以便于第一终端设备识别待发送的目标文件。If the target device determines that the target file is not stored locally, it may 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 may carry the file name of the target file, so that the first terminal device can identify the target file to be sent.
可选的,目标设备可以如图17中的(d)所示的弹出对话框询问用户是否接收目标文件,为了方便用户操作,目标设备也可以不弹出上述对话框,用户若不想接收目标文件,可以将第二终端设备不对准第一终端设备,这样也可以直接将该方案应用于大屏设备等其他不便于用户操作的终端设备,扩大文件分享的适用范围,使各种终端设备之间的文件分享方案统一。Optionally, the target device can ask the user whether to receive the target file in a pop-up dialog box as shown in (d) in Figure 17. In order to facilitate the user's operation, the target device can also not pop up the above-mentioned dialog box. If the user does not want to receive the target file, The second terminal device may not be aligned with the first terminal device, so that the solution can also be directly applied to other terminal devices that are inconvenient for users to operate, such as large-screen devices. Unified file sharing scheme.
S270、第一终端设备接收到资源请求消息后,向目标设备发送目标文件。S270. After receiving the resource request message, the first terminal device sends the target file to the target device.
S280、目标设备接收目标文件。S280, the target device receives the target file.
图22为本申请实施例提供的另一种文件分享示意图,图中是以手机A2100向pad2400(目标设备)分享图片A(目标文件)为例进行说明。如图22中的(a)所示,用户打开图片A后,通过在屏幕顶部的上滑操作向对准的pad2400分享该图片;如图22中的(b)所示,pad2400接收完图片A后,可以加载显示图片A,以供用户查看;当然,pad2400也可以显示提示信息,提示用户已收到目标文件。FIG. 22 is another schematic diagram of file sharing provided by an embodiment of the present application. In the figure, the mobile phone A2100 shares a picture A (target file) with the pad2400 (target device) as an example for illustration. As shown in (a) of Figure 22, after the user opens the picture A, the user shares the picture with the aligned pad2400 by sliding up on the top of the screen; as shown in (b) of Figure 22, the pad2400 receives the picture A After that, you can load and display picture A for the user to view; of course, pad2400 can also display a prompt message to remind the user that the target file has been received.
图23为本申请实施例提供的又一种文件分享示意图,图中是以手机A2100向pad2400(目标设备)分享多张图片(目标文件)为例进行说明。如图23中的(a)所示,用户通过长按操作打开图片选择界面后,点击选择图片A、图片B和图片C,然后通过在屏幕顶部的上滑操作向对准的pad2400分享这些图片;如图23中的(b)所示,pad接收完图片A、图片B和图片C后,可以加载显示最后接收到的一张图片,比如图片C,以供用户查看;同样的,pad2400也可以显示提示信息,提示用户已收到目标文件。FIG. 23 is another schematic diagram of file sharing provided by an embodiment of the present application. In the figure, the mobile phone A2100 shares multiple pictures (target files) with the pad2400 (target device) as an example for illustration. As shown in (a) in Figure 23, after the user opens the picture selection interface by long-pressing, click to select picture A, picture B and picture C, and then share these pictures to the aligned pad2400 by sliding up on the top of the screen ; As shown in (b) in Figure 23, after the pad receives picture A, picture B and picture C, it can load and display a picture finally received, such as picture C, for the user to view; Similarly, pad2400 also A prompt message can be displayed to inform the user that the target file has been received.
本领域技术人员可以理解,以上实施例是示例性的,并非用于限定本申请。在可能的情况下,以上步骤中的一个或者几个步骤的执行顺序可以进行调整,也可以进行选择性组合,得到一个或多个其他实施例。本领域技术人员可以根据需要从上述步骤中任意进行选择组合,凡是未脱离本申请方案实质的,都落入本申请的保护范围。Those skilled in the art can understand that the above embodiments are exemplary and not intended to limit the present application. If possible, the execution order of one or more of the above steps may be adjusted, and may also be selectively combined to obtain one or more other embodiments. Those skilled in the art can arbitrarily select and combine the above steps as required, and all those that do not depart from the essence of the solution of the present application fall into the protection scope of the present application.
上述示出了第一终端设备向第二终端设备分享目标文件(称为第一目标文件)的过程,如前所述,第二终端设备也可以向第一终端设备分享文件(称为第二目标文件),具体的分享过程与第一终端设备向第二终端设备分享第一目标文件的过程类似,此处不再赘述。The above shows the process of the first terminal device sharing the target file (called the first target file) with the second terminal device. As mentioned above, the second terminal device can also share the file with the first terminal device (called the second target file). target file), 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 details are not repeated here.
作为一种可选的实施方式,第一终端设备和第二终端设备在进行文件分享前,也可以采用方位过滤方式建立Wi-Fi直连连接,即探测消息中携带的过滤信息可以包括终端设备的位置和指向方位,第一终端设备在搜索可用的WiFi直连设备时,可以采用上述确定目标设备的方法搜索满足本端过滤条件的第二终端设备,建立连接的第二终端设备即为目标设备,在建立连接后则可以无需执行上述确定目标设备的步骤(即步骤S210-S230),直接向建立连接的第二终端设备分享目标文件。As an optional implementation manner, before the first terminal device and the second terminal device share files, they can also establish a Wi-Fi direct connection by using an azimuth filtering method, that is, the filtering information carried in the detection message can include the terminal device. When searching for available WiFi direct connection devices, the first terminal device can use the above method of determining the target device to search for the second terminal device that satisfies the local filter conditions, and the second terminal device that establishes the connection is the target After the connection is established, the device may directly share the target file with the second terminal device that establishes the connection without performing the above steps of determining the target device (ie, steps S210-S230).
另外,上述文件分享方法也可以应用于其他无线通信场景,即第一终端设备和第二终端设备之间建立的无线通信连接不限于Wi-Fi直连连接,也可以是蓝牙或其他近距离通信连接。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 Wi-Fi direct connection, but also Bluetooth or other short-range communication. connect.
上述无线通信方法,通过对准操作来自动确定目标设备,使得用户可以通过简单的分享操作快速向对准的终端设备分享文件,从而可以有效提高用户分享文件的便利性。In the above wireless communication method, the target device is automatically determined through the alignment operation, so that the user can quickly share the file to the aligned terminal device through a simple sharing operation, thereby effectively improving the convenience for the user to share the file.
基于同一发明构思,作为对上述方法的实现,本申请实施例提供了一种无线通信装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的装置能够对应实现前述方法实施例中的全部内容。Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application provides a wireless communication device, which corresponds to the foregoing method embodiment. For ease of reading, this device embodiment does not refer to the foregoing method embodiment. The detailed contents are described one by one, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiments.
图24为本申请实施例提供的无线通信装置的结构示意图,该装置可以应用于上述实施例中所涉及的终端设备。如图24所示,本实施例提供的装置可以包括:输入模块201、通信模块202、处理模块203和显示模块204。FIG. 24 is a schematic structural diagram of a wireless communication apparatus provided by an embodiment of the present application, and the apparatus may be applied to the terminal equipment involved in the foregoing embodiment. As shown in FIG. 24 , the apparatus provided in this embodiment may include: an input module 201 , a communication module 202 , a processing module 203 , and a display module 204 .
其中,输入模块201用于接收用户在终端设备的显示界面上的输入,如触摸输入、语音输入和手势输入等,输入模块201用于支持终端设备执行上述方法实施例中的步骤S110、步骤S210中与接收用户操作相关的过程和/或用于本文所描述的技术的其它过程。输入模块可以是触摸屏或其他硬件或硬件与软件的综合体。The input module 201 is used to receive user input on the display interface of the terminal device, such as touch input, voice input, gesture input, etc. The input module 201 is used to support the terminal device to perform steps S110 and S210 in the above method embodiments Processes related to receiving user actions and/or other processes for the techniques described herein. The input module can be a touch screen or other hardware or a combination of hardware and software.
通信模块202用于支持终端设备执行上述方法实施例中的步骤S110、S111~S114、S210~S280中与消息传输相关的操作和/或用于本文所描述的技术的其它过程。The communication module 202 is configured to support the terminal device to perform operations related to message transmission in steps S110, S111-S114, and S210-S280 in the above method embodiments and/or other processes for the techniques described herein.
处理模块203用于支持终端设备执行上述方法实施例中的步骤S110、S120、S111~S114、S210~S280中与数据处理相关的操作和/或用于本文所描述的技术的其它过程。The processing module 203 is configured to support the terminal device to perform operations related to data processing in steps S110, S120, S111-S114, and S210-S280 in the above method embodiments and/or other processes for the techniques described herein.
显示模块204用于支持终端设备执行上述方法实施例中的步骤S120、S210、S280中与界面显示相关的操作和/或用于本文所描述的技术的其它过程。The display module 204 is configured to support the terminal device to perform operations related to interface display in steps S120, S210, and S280 in the above method embodiments and/or other processes for the techniques described herein.
本实施例提供的装置可以执行上述方法实施例,其实现原理与技术效果类似,此处不再赘述。The apparatus provided in this embodiment may execute the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art 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. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized 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 from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
本申请实施例还提供一种终端设备,图25为本申请实施例提供的终端设备的结构示意图。An embodiment of the present application further provides a terminal device, and FIG. 25 is a schematic structural diagram of the terminal device provided by an embodiment of the present application.
终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指 示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structures illustrated in the embodiments of the present invention do 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 less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(sraphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (sraphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是终端设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the terminal device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(serail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模 块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with 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 audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。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 may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. 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. This interface can also be used to connect other terminal devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood 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 of the terminal device 100 . In other embodiments of the present application, the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。The charging management module 140 is used to receive charging input from the 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 the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting 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 times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify 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 then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近场通信(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GNSS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with 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), broadband 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, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GNSS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi satellite system) -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode, OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Mini LED,Micro LED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. 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 (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Mini LED, Micro LED, quantum dot light emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, 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 the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may 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 transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。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 realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳 机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The 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 make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测所述触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to 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 intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 may also calculate the touched 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 may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing 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, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 . In some embodiments, the angular velocity of the end device 100 about three axes (ie, the x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。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 in positioning and navigation.
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器 180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the terminal device 100 is a flip machine, the terminal device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The terminal device 100 can measure the distance through 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.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The terminal device 100 emits infrared light to the outside through the light emitting diode. The terminal device 100 detects infrared reflected light from nearby objects using a photodiode. 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 may 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. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense 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, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as 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 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed 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 a touch operation 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 touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。 终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be 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 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The terminal device 100 may 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 card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may 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 is also compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the terminal device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
本实施例提供的终端设备可以执行上述方法实施例,其实现原理与技术效果类似,此处不再赘述。The terminal device provided in this embodiment may execute the foregoing method embodiments, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述方法实施例所述的方法。Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in the foregoing method embodiment is implemented.
本申请实施例还提供一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行时实现上述方法实施例所述的方法。The embodiments of the present application further provide a computer program product, when the computer program product runs on a terminal device, the terminal device executes the method described in the above method embodiments.
本申请实施例还提供一种芯片系统,包括处理器,所述处理器与存储器耦合,所述处理器执行存储器中存储的计算机程序,以实现上述方法实施例所述的方法。其中,所述芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。An embodiment of the present application further provides a chip system, including a processor, where 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 embodiments. Wherein, the chip system may be a single chip or a chip module composed of multiple chips.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如软盘、硬盘或磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in 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, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server or data center to another website site, computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, or a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)), and the like.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以 由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质可以包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented. The process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed , which may include the processes of the foregoing method embodiments. The aforementioned storage medium may include: ROM or random storage memory RAM, magnetic disks or optical disks and other mediums that can store program codes.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
在本申请所提供的实施例中,应该理解到,所揭露的装置/设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/device and method may be implemented in other manners. For example, the apparatus/equipment embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or Components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.
在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。In the description of this application, unless otherwise stated, "/" indicates that the object associated with it is an "or" relationship, for example, A/B can indicate A or B; "and/or" in this application is only It is an association relationship that describes an associated object, indicating that there can be three kinds of relationships, for example, A and/or B, which can be expressed as: A alone exists, A and B exist at the same time, and B exists alone, among which A, B Can be singular or plural.
并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项”或其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b,或c中的至少一项,可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。Also, in the description of the present application, unless stated otherwise, "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 represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application. scope.

Claims (19)

  1. 一种无线通信方法,应用于第一终端设备,其特征在于,包括:A wireless communication method, applied to a first terminal device, characterized by comprising:
    广播携带有所述第一终端设备的过滤信息的探测请求消息;broadcasting a probe request message carrying the filtering information of the first terminal device;
    若接收到携带有第二终端设备的过滤信息的探测响应消息,且所述第一终端设备的过滤信息与所述第二终端设备的过滤信息相匹配,则确定所述第一终端设备与所述第二终端设备之间的无线保真点对点连接已建立。If a probe 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 the first terminal device is compatible with the filtering information of the second terminal device. The wireless fidelity point-to-point connection between the second terminal devices has been established.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    若接收到携带有第三终端设备的过滤信息的探测请求消息,且所述第一终端设备的过滤信息与所述第三终端设备的过滤信息相匹配,则确定所述第一终端设备与所述第三终端设备之间的无线保真点对点连接已建立,并向所述第三终端设备发送携带有所述第一终端设备的过滤信息的探测响应消息。If a probe request message carrying the filtering information of the 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 the first terminal device is compatible with the filtering information of the third terminal device. The wireless fidelity point-to-point connection between the third terminal devices has been established, and a probe response message carrying the filtering information of the first terminal device is sent to the third terminal device.
  3. 根据权利要求1所述的方法,其特征在于,所述过滤信息包括下列中的至少一种信息:账号信息、群组信息、用户的输入信息和近距离通信标识信息,所述输入信息包括文本信息或语音信息。The method according to claim 1, wherein 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 message or voice message.
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    生成所述第一终端设备的虚拟因特网互联协议IP地址和目标终端设备的虚拟IP地址,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备;generating a virtual IP address of the first terminal device and a virtual IP address of a target terminal device, where the target terminal device is a terminal device that has established a wireless fidelity point-to-point connection with the first terminal device;
    基于所述虚拟IP地址与所述目标终端设备进行数据传输。Data transmission is performed with the target terminal device based on the virtual IP address.
  5. 根据权利要求4所述的方法,其特征在于,在数据传输的过程中,所述第一终端设备向所述目标终端设备发送的第一消息和从所述目标终端设备接收的第二消息中,均不包括IP地址信息;The method according to claim 4, wherein in the process of data transmission, the first message sent by the first terminal device to the target terminal device and the second message received from the target terminal device are among the , excluding IP address information;
    所述第一终端设备在处理所述第二消息的过程中,传递至网络层的所述第二消息对应的数据包中添加有虚拟IP地址信息,所述虚拟IP地址信息中的目的IP地址为所述第一终端设备的虚拟IP地址,所述虚拟IP地址信息中的源IP地址为发送所述第二消息的所述目标终端设备的虚拟IP地址。In 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 transmitted to the network layer, and 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. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    在所述广播携带有所述第一终端设备的过滤信息的探测请求消息之前,响应于用户对视频通话功能的触发操作,显示第一界面;Before the broadcast of the detection request message carrying the filtering information of the first terminal device, in response to the user's triggering operation of the video call function, displaying a first interface;
    响应于用户在所述第一界面上进行的过滤信息设置操作,确定所述第一终端设备的过滤信息;determining the filtering information of the first terminal device in response to the filtering information setting operation performed by the user on the first interface;
    在建立了无线保真点对点连接之后,向目标终端设备传输采集的视频图像,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备;After the Wi-Fi point-to-point connection is established, the captured video image is transmitted to a target terminal device, where the target terminal device is a terminal device that has established a Wi-Fi point-to-point connection with the first terminal device;
    接收并显示所述目标终端设备采集的视频图像。Receive and display the video image collected by the target terminal device.
  7. 根据权利要求6所述的方法,其特征在于,所述显示所述目标终端设备采集的视频图像,包括:The method according to claim 6, wherein the displaying the video image collected by the target terminal device comprises:
    若所述目标终端设备包括多个,则在主窗口中显示其中一个目标终端设备采集的视频图像,在悬浮的子窗口中显示其他目标终端设备采集的视频图像,其中,主窗口的尺寸大于子窗口的尺寸。If there are multiple target terminal devices, the video image collected by one of the target terminal devices is displayed in the main window, and the video images collected by the other target terminal devices are displayed in the floating sub-window, wherein the size of the main window is larger than that of the sub-window. The size of the window.
  8. 根据权利要求1-5任一项所述的方法,其特征在于,所述过滤信息中包括设备的指 向方位,过滤信息相匹配的任意两个终端设备的指向方位相对,所述方法还包括:The method according to any one of claims 1-5, wherein the filtering information includes the pointing orientation of the device, and the pointing orientations of any two terminal devices matched by the filtering information are relative, and the method also includes:
    向目标终端设备分享第一目标文件,和/或,接收所述目标终端设备分享的第二目标文件,所述目标终端设备为与所述第一终端设备之间已建立无线保真点对点连接的终端设备。Share the first target file with the target terminal device, and/or receive the second target file shared by the target terminal device, where the target terminal device has established a wireless fidelity point-to-point connection with the first terminal device. Terminal Equipment.
  9. 一种无线通信方法,应用于第一终端设备,其特征在于,包括:A wireless communication method, applied to a first terminal device, characterized by comprising:
    与至少一个第二终端设备建立无线通信连接;establishing a wireless communication connection with at least one second terminal device;
    响应于用户对第一目标文件的分享操作,广播所述第一目标文件对应的第一通知消息;In response to the user's sharing operation on the 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, and each received response message carries the pointing orientation of the corresponding second terminal device;
    根据所述第一终端设备的指向方位与各所述第二终端设备的指向方位,从所述至少一个第二终端设备中确定目标设备,所述目标设备的指向方位与所述第一终端设备的指向方位相对;According to the pointing orientation of the first terminal device and the pointing orientation of each of the second terminal devices, a target device is determined from the at least one second terminal device, and the pointing orientation of the target device is different from that of the first terminal device. The pointing direction is relative;
    若确定出目标设备,则向所述目标设备分享所述第一目标文件。If the target device is determined, the first target file is shared with the target device.
  10. 根据权利要求9所述的方法,其特征在于,所述分享操作为触控操作或手势操作。The method according to claim 9, wherein the sharing operation is a touch operation or a gesture operation.
  11. 根据权利要求9所述的方法,其特征在于,所述目标设备位于所述第一终端设备周围的第一预设范围内。The method according to claim 9, wherein the target device is located within a first preset range around the first terminal device.
  12. 根据权利要求11所述的方法,其特征在于,接收的每个所述应答消息中还携带有对应的第二终端设备的设备位置,所述根据所述第一终端设备的指向方位与各所述第二终端设备的指向方位,从所述至少一个第二终端设备中确定目标设备,包括:The method according to claim 11, wherein each of the received response messages further carries the device location of the corresponding second terminal device, and the corresponding device position of the second terminal device is also carried in the received response message, and the device position according to the pointing direction of the first terminal device and each The pointing azimuth of the second terminal device, and determining the target device from the at least one second terminal device, including:
    对于接收的每个应答消息,若所述应答消息中的设备位置位于以所述第一终端设备的设备位置为中心的第一预设范围内,且所述应答消息中的指向方位与所述第一终端设备的指向方位相对,则将发送所述应答消息的第二终端设备确定为目标设备。For each response message received, if the device location in the response message is within a first preset range centered on the device location of the first terminal device, and the pointing azimuth in the response message is the same as the If the pointing directions of the first terminal device are opposite, the second terminal device that sends the response message is determined as the target device.
  13. 根据权利要求9所述的方法,其特征在于,所述向所述目标设备分享所述第一目标文件,包括:The method according to claim 9, wherein the sharing the first target file with the target device comprises:
    向所述目标设备发送所述第一目标文件对应的第二通知消息;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. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, wherein the method further comprises:
    若未确定出目标设备,则提示无目标设备。If the target device is not determined, it will prompt that there is no target device.
  15. 根据权利要求9所述的方法,其特征在于,当所述目标设备位于以第一终端设备的指向线为中线的第二预设范围内,且指向方位与第一终端设备的指向方向的反向方位之间的方位夹角在预设角度范围内时,确定所述目标设备的指向方位与所述第一终端设备的指向方位相对。The method according to claim 9, wherein when the target device is located in a second preset range with the pointing line of the first terminal device as the center line, and the pointing azimuth is opposite to the pointing direction of the first terminal device When the azimuth angle between the azimuths is within a preset angle range, it is determined that the pointing azimuth of the target device is opposite to the pointing azimuth of the first terminal device.
  16. 根据权利要求9-15任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9-15, wherein the method further comprises:
    若接收到第二目标文件对应的第一通知消息,则向发送所述第一通知消息的第二终端设备发送应答消息,发送的所述应答消息中携带有所述第一终端设备的指向方位;If the 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, and the sent response message carries the pointing direction of the first terminal device ;
    若接收到所述第二目标文件对应的第二通知消息,则在未存储有所述第二目标文件的情况下,向发送所述第二通知消息的第二终端设备发送用于请求所述第二目标文件的资源 请求消息;If a second notification message corresponding to the second target file is received, in the case where the second target file is not stored, send a message to the second terminal device that sent the second notification message to request the The resource request message of the second target file;
    接收所述第二目标文件。The second target file is received.
  17. 一种终端设备,其特征在于,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在调用所述计算机程序时执行如权利要求1-16任一项所述的方法。A terminal device, characterized in that it comprises: a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the method according to any one of claims 1-16 when the computer program is invoked method.
  18. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-16任一项所述的方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the method according to any one of claims 1-16 is implemented.
  19. 一种芯片系统,其特征在于,所述芯片系统包括处理器,所述处理器与存储器耦合,所述处理器执行存储器中存储的计算机程序,以实现如权利要求1-16任一项所述的方法。A chip system, characterized in that the chip system includes a processor, the processor is coupled with a memory, and the processor executes a computer program stored in the memory, so as to realize the method according to any one of claims 1-16 Methods.
PCT/CN2021/116120 2020-09-30 2021-09-02 Wireless communication method and terminal device WO2022068513A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011063160.2 2020-09-30
CN202011063160.2A CN114339709A (en) 2020-09-30 2020-09-30 Wireless communication method and terminal device

Publications (1)

Publication Number Publication Date
WO2022068513A1 true WO2022068513A1 (en) 2022-04-07

Family

ID=80949612

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116120 WO2022068513A1 (en) 2020-09-30 2021-09-02 Wireless communication method and terminal device

Country Status (2)

Country Link
CN (1) CN114339709A (en)
WO (1) WO2022068513A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928900A (en) * 2022-07-18 2022-08-19 荣耀终端有限公司 Method and apparatus for transmission over a WiFi direct connection
CN115002939A (en) * 2022-07-18 2022-09-02 荣耀终端有限公司 Method and device for joining WiFi group
CN116684517A (en) * 2022-09-29 2023-09-01 荣耀终端有限公司 Method and device for sending response message
CN117615466A (en) * 2023-01-04 2024-02-27 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826591A (en) * 2022-05-26 2022-07-29 京东方科技集团股份有限公司 Cross-device data transmission method, system and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105682182A (en) * 2014-11-19 2016-06-15 中国移动通信集团公司 Device discovery and device connection method, device and system
CN105979307A (en) * 2015-11-06 2016-09-28 乐视致新电子科技(天津)有限公司 One-key connection method and system between mobile terminal and display device
CN106535301A (en) * 2016-12-30 2017-03-22 珠海赛纳打印科技股份有限公司 Method, device and system for establishing communication connection
CN108377286A (en) * 2016-10-28 2018-08-07 中兴通讯股份有限公司 A kind of method and device of data transmission
CN111328051A (en) * 2020-02-25 2020-06-23 上海银基信息安全技术股份有限公司 Digital key sharing method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111373713B (en) * 2018-08-30 2021-07-09 华为技术有限公司 Message transmission method and device
CN111314400B (en) * 2018-12-11 2023-05-19 中兴通讯股份有限公司 Vehicle data processing method, device, computer equipment and storage medium
CN110995665B (en) * 2019-11-15 2023-04-18 北京小米移动软件有限公司 Network distribution method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105682182A (en) * 2014-11-19 2016-06-15 中国移动通信集团公司 Device discovery and device connection method, device and system
CN105979307A (en) * 2015-11-06 2016-09-28 乐视致新电子科技(天津)有限公司 One-key connection method and system between mobile terminal and display device
CN108377286A (en) * 2016-10-28 2018-08-07 中兴通讯股份有限公司 A kind of method and device of data transmission
CN106535301A (en) * 2016-12-30 2017-03-22 珠海赛纳打印科技股份有限公司 Method, device and system for establishing communication connection
CN111328051A (en) * 2020-02-25 2020-06-23 上海银基信息安全技术股份有限公司 Digital key sharing method and device, electronic equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928900A (en) * 2022-07-18 2022-08-19 荣耀终端有限公司 Method and apparatus for transmission over a WiFi direct connection
CN115002939A (en) * 2022-07-18 2022-09-02 荣耀终端有限公司 Method and device for joining WiFi group
CN114928900B (en) * 2022-07-18 2022-10-04 荣耀终端有限公司 Method and apparatus for transmission over a WiFi direct connection
CN115002939B (en) * 2022-07-18 2022-10-04 荣耀终端有限公司 Method and device for joining WiFi group
CN116684517A (en) * 2022-09-29 2023-09-01 荣耀终端有限公司 Method and device for sending response message
CN117615466A (en) * 2023-01-04 2024-02-27 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal
CN117615466B (en) * 2023-01-04 2024-05-03 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal

Also Published As

Publication number Publication date
CN114339709A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
WO2021027616A1 (en) Terminal device, method and system for realizing one-touch screen projection through remote control
WO2020224486A1 (en) Calling method, device and system
WO2022068513A1 (en) Wireless communication method and terminal device
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
US20220039179A1 (en) Bluetooth Connection Method and Device
WO2021175268A1 (en) Method and apparatus for sharing mobile network hotspot, and hotspot sharing device
WO2020042119A1 (en) Message transmission method and device
CN110198362B (en) Method and system for adding intelligent household equipment into contact
EP4250075A1 (en) Content sharing method, electronic device, and storage medium
WO2022042265A1 (en) Communication method, terminal device, and storage medium
WO2021197071A1 (en) Wireless communication system and method
EP4247030A1 (en) Device network distribution method, and mobile terminal and storage medium
WO2021027623A1 (en) Device capability discovery method and p2p device
CN113498108A (en) Chip, equipment and method for adjusting data transmission strategy based on service type
WO2022089515A1 (en) Dual wifi connection method and electronic device
CN113365274B (en) Network access method and electronic equipment
CN113038627A (en) File sharing method, mobile device and computer storage medium
JP2022501968A (en) File transfer method and electronic device
WO2021218544A1 (en) Wireless connection providing system, method, and electronic apparatus
WO2022160967A1 (en) Communication method, mobile device, electronic device, and computer-readable storage medium
WO2023051204A1 (en) Cross-device connection method, electronic device and storage medium
US12041026B2 (en) Reverse address resolution method and electronic device
EP4362507A1 (en) Communication system and communication method
WO2023024889A1 (en) First electronic device, second electronic device, and method for screen-casting
WO2022267917A1 (en) Bluetooth communication method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21874174

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21874174

Country of ref document: EP

Kind code of ref document: A1