WO2022222299A1 - Communication method for wifi device, and device and computer-readable storage medium - Google Patents
Communication method for wifi device, and device and computer-readable storage medium Download PDFInfo
- Publication number
- WO2022222299A1 WO2022222299A1 PCT/CN2021/109290 CN2021109290W WO2022222299A1 WO 2022222299 A1 WO2022222299 A1 WO 2022222299A1 CN 2021109290 W CN2021109290 W CN 2021109290W WO 2022222299 A1 WO2022222299 A1 WO 2022222299A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- wifi
- direct connection
- information
- opposite end
- wifi direct
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000004891 communication Methods 0.000 title claims abstract description 30
- 230000000977 initiatory effect Effects 0.000 claims description 121
- 230000003993 interaction Effects 0.000 claims description 43
- 238000004590 computer program Methods 0.000 claims description 30
- 230000006870 function Effects 0.000 claims description 20
- 230000015654 memory Effects 0.000 claims description 19
- 230000004044 response Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000875 corresponding effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010348 incorporation Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 235000019633 pungent taste Nutrition 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present invention requires the priority of the Chinese patent application filed on April 23, 2021 with the application number 202110444125.3 and the title of the invention is "communication method, device and computer-readable storage medium for wifi devices", the entire contents of which are obtained through Reference is incorporated in this application.
- the present invention relates to the field of wireless communication, and in particular, to a communication method, device and computer-readable storage medium of a wifi device.
- a Wifi (Wireless Fidelity, wireless fidelity) device is a variety of terminals that can support a wifi function, for example, a smart phone, etc., which can communicate with a terminal that also supports a wifi function under a wireless network.
- a wifi function for example, a smart phone, etc.
- the premise of communication between two wifi devices is that they are in the same wireless network, and the routing device or access point (Access Point) in the same wireless network Point, AP) as the "transit station" of the two wifi devices, forwarding the interaction information between the two wifi devices.
- AP wireless network Point
- an embodiment of the present application provides a communication method for a wifi device, the method comprising:
- the wifi direct connection messages include the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the capability support of the peer wifi device information;
- the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish a direct connection link with the peer wifi device that supports wifi direct connection;
- the command is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the command.
- an embodiment of the present application provides a device.
- the device includes a memory, a processor, and a computer program stored in the memory and running on the processor.
- the processor implements the following steps when executing the computer program:
- the wifi direct connection messages include the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the capability support of the peer wifi device information;
- the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish a direct connection link with the peer wifi device that supports wifi direct connection;
- the command is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the command.
- an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
- the wifi direct connection messages include the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the capability support of the peer wifi device information;
- the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish a direct connection link with the peer wifi device that supports wifi direct connection;
- the command is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the command.
- the technical solution of the present application makes the It can communicate directly between multiple devices that support wifi direct connection, eliminating the dependence on routing devices or APs, especially suitable for scenarios without a network.
- FIG. 1 is a flowchart of a communication method for a wifi device provided by an embodiment of the present application.
- FIG. 2 is a schematic structural diagram of a communication apparatus of a wifi device provided by an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of a device provided by an embodiment of the present application.
- adjectives such as first and second may only be used to distinguish one element or action from another, and do not necessarily require or imply any actual such relationship or order.
- References to an element or component or step (etc.) should not be construed as limited to only one of the elements, components, or steps, but rather may be one or more of the elements, components, or steps, etc., where the circumstances permit.
- the present application proposes a communication method for a wifi device, as shown in FIG. 1 , which is described with a wifi direct connection initiating device as the execution subject.
- the wifi direct connection initiating device refers to a device that supports wifi direct connection and actively initiates Directly connected wifi device.
- the communication method of the wifi device illustrated in FIG. 1 mainly includes steps S101 to S103, which are described in detail as follows:
- Step S101 Interacting a wifi direct connection message with the peer wifi device, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the peer end Capability support information for wifi devices.
- the device information of the wifi direct connection initiating device includes information such as the identifier and/or MAC address of the wifi direct connection initiating device
- the device information of the opposite end WiFi device includes the identification of the opposite end WiFi device and/or MAC address and other information, wherein, the identifier may be the name and type of the device, etc., and the capability support information of the opposite end WiFi device is used to indicate whether the opposite end WiFi device supports WiFi direct connection.
- the wifi direct connection initiating device scans all WiFi working signals, that is, several channels in the 2.4G frequency band. Then, the wifi direct connection initiating device enters the device stage, and alternately enters the search state and the listening state.
- the initiating device of the wifi direct connection is in the search state, and the peer wifi device is in the listening state, then the two devices complete mutual discovery.
- the wifi direct connection initiating device and the opposite end wifi device exchange wifi direct connection messages may be: enable the direct connection scanning function of the wifi device, broadcast the device information of the wifi direct connection initiating device and the wifi direct connection initiating device's information. Capability support information; receive a response message fed back by a directly connectable wifi device, wherein the directly connectable wifi device is a peer wifi device that supports wifi direct connection, and the response message includes the device information and capability support information of the directly connectable wifi device.
- the peer wifi device can receive the information. If the peer wifi device supports wifi direct connection, the peer wifi device, as a directly connectable wifi device, feeds back a response message to the wifi direct connection initiating device, including the device information and capability support information of the directly connected wifi device. Support wifi direct connection.
- Step S102 If the capability support information of the opposite end WiFi device indicates that the opposite end WiFi device supports WiFi direct connection, then establish a direct connection link with the opposite end WiFi device supporting WiFi direct connection according to the WiFi direct connection message.
- establishing a direct connection link with the opposite end wifi device that supports wifi direct connection may be implemented through the following steps S1021 to S1023:
- Step S1021 Provide group owner connection information to the directly connectable wifi device.
- the group owner is the wifi direct connection initiating device, and the group owner connection information provided to the directly connected wifi device is included in the group owner connection information. It includes at least one or more of the relevant identifier of the basic service set that the Wi-Fi direct connection initiating device can provide, the shared key and the channel identifier of the working channel, which are required when establishing a WiFi direct connection link with the Wi-Fi direct connection initiating device.
- Step S1022 Receive a connection request sent by the directly connectable wifi device.
- the connection request sent by the directly connectable wifi device is that it scans the device according to the connection information of the group owner, and sends it after scanning the directly connectable wifi device, which is used to request to establish a WiFi direct connection with the wifi direct connection initiating device.
- Connection link; the connection request sent by the directly connected wifi device can be sent on the working channel negotiated with the wifi direct connection initiating device.
- Step S1023 Establish a direct link with the directly connectable wifi device according to the connection request sent by the directly connectable wifi device.
- establishing a direct connection link with the opposite end wifi device that supports wifi direct connection can be implemented through the following steps S'1021 to S'1023.
- Step S'1021 Create a head group.
- the wifi direct connection initiating device will automatically scan for wifi devices within its signal range when it is turned on. Initiate a connection to form the first group. If it is not scanned, the user will be prompted whether to use the other group currently stored, if so, the other group currently stored will be used as the first group.
- Step S'1022 According to the WiFi direct connection message, at least one WiFi direct connection device is allowed to join the first group.
- Step S'1023 Save the information about the first group and the device information of all wifi devices that support wifi direct connection in the first group.
- the information of the first group includes connection information of the group formed this time, and the device information includes the device name, MAC address, IP address, security information, signal strength, channel, P2P IE and authentication information, etc.
- the wifi direct connection initiating device obtains other WiFi devices applying to join the group and the device information of the wifi direct connection initiating device itself. These device information are the conditions for forming the first group. After the device information and the group information are saved in the initiating device, the next time the group is rebuilt, the construction can be completed based on the device information and the group information.
- the above embodiments of the present application further include: detecting wifi Whether the direct connection initiating device has locally stored the device information of the historical Wi-Fi device that supports Wi-Fi direct connection and the direct connection record information between the historical Wi-Fi device and the Wi-Fi direct connection initiating device; The device information of the directly connected historical Wi-Fi device and the direct connection record information of the historical Wi-Fi device and the Wi-Fi direct connection initiating device, then enable the Wi-Fi device direct connection scanning function of the Wi-Fi direct connection initiating device to scan the preset range that also supports Wi-Fi Directly connected wifi device; establishes a direct link between the wifi direct connection initiating device and the wifi device existing in the wifi direct connection initiating device according to the device information of the historical wifi device.
- the target device that establishes the wifi direct connection with the wifi
- the method further includes: determining the current wifi historical device that currently establishes a direct link with the wifi direct connection initiating device; acquiring and analyzing the wifi direct connection initiating device within the past preset time period Interaction information with each current historical Wi-Fi device to determine the interaction heat between the Wi-Fi direct connection initiating device and each current historical Wi-Fi device; close the direct connection link between the current historical Wi-Fi device whose interaction heat is less than the first threshold and the Wi-Fi Direct connection initiating device, And/or, the direct connection link between the current historical Wi-Fi device and the Wi-Fi direct connection initiating device whose sleep interaction hotness is less than a second threshold, where the second threshold is greater than the first threshold.
- the interaction information mainly includes the frequency, duration, and data volume of data interaction between the wifi direct connection initiating device and different current historical wifi devices, etc.
- the frequency, duration, and transmission data volume of data interaction are positively correlated with interaction heat , that is, the greater the frequency of data interaction between the wifi direct connection initiating device and a current historical wifi device, the higher the interaction between the wifi direct connection initiating device and the current historical wifi device; in the same way, the wifi direct connection initiating device and the current historical wifi device.
- interaction heat that is, the greater the frequency of data interaction between the wifi direct connection initiating device and a current historical wifi device, the higher the interaction between the wifi direct connection initiating device and the current historical wifi device; in the same way, the wifi direct connection initiating device and the current historical wifi device.
- the frequency, duration of data interaction, and the weight of the amount of transmitted data that is positively related to the interaction heat can be set by yourself according to the reference scenarios or user needs of the Wi-Fi direct connection initiating device and the current historical Wi-Fi device.
- the interaction between the wifi direct connection initiating device and each current historical wifi device is less than the first threshold, it indicates that there is little interaction between the wifi direct connection initiating device and the current historical wifi device, and the wifi between the wifi direct connection initiating device and the current historical wifi device
- the usage rate of the direct connection link is very low. Continuing to enable it will consume too much power of the Wi-Fi direct connection initiating device and the current historical Wi-Fi device.
- the usage rate of the Wi-Fi direct link between the current historical Wi-Fi devices is low, and the continuous activation will consume a lot of power between the Wi-Fi direct connection initiating device and each current historical Wi-Fi device, so the sleep interaction heat is less than the second threshold and greater than or equal to the first
- the Wi-Fi direct connection link between the Wi-Fi direct connection initiating device and each current historical Wi-Fi device at the threshold value will wake up the dormant Wi-Fi Direct connection link when there is an interaction requirement, which further saves the power of the Wi-Fi Direct connection initiating device and each current historical Wi-Fi device.
- Step S103 Send an instruction to the peer wifi device supporting wifi direct connection through the direct link with the peer wifi device supporting wifi direct connection, so that the peer wifi device supporting wifi direct connection executes the instruction.
- the instruction sent to the opposite end wifi device supporting wifi direct connection includes instructing the opposite end wifi device supporting wifi direct connection to play music and/or prompt sound, connect to a designated network such as a home network, and other actions,
- These directives can be encapsulated in a Vendor Specific Attribute (VSA) packet that conforms to the Wi-Fi Direct protocol.
- VSA Vendor Specific Attribute
- the peer wifi device that supports wifi direct connection parses and executes the instructions in the VSA packet according to the wifi direct connection protocol.
- FIG. 2 is a communication device of a wifi device provided by an embodiment of the present application, and the device may be a device supporting wifi direct connection or a functional module therein.
- the apparatus exemplified in FIG. 2 may include an interaction module 201, a link establishment module 202 and a sending module 203, which are described in detail as follows:
- the interaction module 201 is used for exchanging wifi direct connection messages with the peer wifi device, wherein the wifi direct connection message includes device information of the wifi direct connection initiating device, capability support information of the wifi direct connection initiating device, and device information of the peer wifi device and the capability support information of the peer wifi device;
- the link establishment module 202 is configured to establish a direct connection link with the opposite end WiFi device supporting WiFi direct connection according to the WiFi direct connection message if the capability support information of the opposite end WiFi device indicates that the opposite end WiFi device supports WiFi direct connection ;
- the sending module 203 is configured to send an instruction to the opposite end wifi device supporting wifi direct connection through the direct connection link, so that the opposite end wifi device supporting wifi direct connection executes the instruction.
- the interaction module 201 in the example of FIG. 2 above may include a broadcasting unit and a first receiving unit, wherein:
- the broadcast unit is used to enable the direct connection scanning function of Wifi devices, and broadcast the device information of the wifi direct connection initiating device and the capability support information of the wifi direct connection initiating device;
- the first receiving unit is used to receive a response message fed back by the directly connectable wifi device, wherein the directly connectable wifi device is a peer wifi device that supports wifi direct connection, and the response message includes the device information and capability support of the directly connectable wifi device information.
- the link establishment module 202 in the example of FIG. 2 may include a connection information providing unit, a second receiving unit and a direct link connection unit, wherein:
- the connection information providing unit is used to provide the group owner connection information to the directly connected wifi device;
- a second receiving unit configured to receive a connection request sent by a directly connectable wifi device
- the direct link connection unit is used to establish a direct link with the directly connectable wifi device according to the connection request sent by the directly connectable wifi device.
- the link establishment module 202 shown in the above example of FIG. 2 may include a group establishment unit, a group addition determination unit and a storage unit, wherein:
- a group establishment unit used to establish a first group
- a group addition determination unit configured to allow at least one WiFi direct connection device to join the first group according to the WiFi direct connection message
- the saving unit is used to save the information about the first group and the device information of all the wifi devices in the first group that support wifi direct connection
- the apparatus shown in FIG. 2 may further include a detection module, a scanning function enabling module and a direct link establishment module, wherein:
- the detection module is used to detect whether the Wi-Fi direct connection initiating device has stored the device information of the historical Wi-Fi devices that support Wi-Fi direct connection locally and the direct connection record information between the historical Wi-Fi device and the Wi-Fi direct connection initiating device;
- the scanning function enable module is used to enable the Wi-Fi direct connection initiating device if the Wi-Fi direct connection initiating device has stored the device information of the historical Wi-Fi devices supporting Wi-Fi direct connection and the direct connection record information between the historical Wi-Fi device and the Wi-Fi direct connection initiating device.
- the Wifi device direct connection scanning function can scan the wifi devices within the preset range that also support wifi direct connection;
- the direct link establishment module is used to establish a direct link between the wifi direct connection initiating device and the wifi device existing in the wifi direct connection initiating device according to the device information of the historical wifi device.
- the apparatus shown in FIG. 2 may further include a storage module, after the detection module detects the target device that establishes a wifi direct connection with the wifi direct connection initiating device, the target device is stored as a historical wifi that supports wifi direct connection. equipment.
- the apparatus shown in FIG. 2 may further include a first determination module, a second determination module and a link processing module, wherein:
- the first determining module is used to determine the current Wi-Fi historical device that currently establishes a direct connection link with the Wi-Fi direct connection initiating device;
- the second determining module is configured to obtain and analyze the interaction information between the wifi direct connection initiating device and each current historical wifi device within a preset time period in the past, and determine the interaction heat between the wifi direct connection initiating device and each current historical wifi device;
- the link processing module is used to close the direct connection link between the current historical Wi-Fi device whose interaction heat is less than the first threshold and the Wi-Fi direct connection initiating device, and/or the current historical Wi-Fi device whose sleep interaction heat is less than the second threshold and the Wi-Fi Direct connection.
- FIG. 3 is a schematic structural diagram of a device provided by an embodiment of the present application.
- the device 3 in this embodiment mainly includes: a processor 30 , a memory 31 , and a computer program 32 stored in the memory 31 and executable on the processor 30 , such as a program for a communication method of a wifi device.
- the processor 30 executes the computer program 32
- the steps in the above-mentioned embodiment of the communication method for the wifi device are implemented, for example, steps S101 to S103 shown in FIG. 1 .
- the processor 30 executes the computer program 32
- the functions of the modules/units in the above device embodiments such as the functions of the interaction module 201, the link establishment module 202 and the sending module 203 shown in FIG. 2, are implemented.
- the computer program 32 of the communication method of the wifi device mainly includes: interacting with the opposite end wifi device of a wifi direct connection message, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device and the capability of the wifi direct connection initiating device Support information, device information of the peer wifi device, and capability support information of the peer wifi device; if the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish and support wifi Direct link of the directly connected peer wifi device; through the direct link, send instructions to the peer wifi device that supports wifi direct connection, so that the peer wifi device that supports wifi direct connection executes the instruction.
- the computer program 32 may be divided into one or more modules/units, which are stored in the memory 31 and executed by the processor 30 to complete the present application.
- One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, the instruction segments being used to describe the execution process of the computer program 32 in the device 3 .
- the computer program 32 can be divided into the functions of an interaction module 201, a link establishment module 202 and a transmission module 203 (modules in the virtual device), and the specific functions of each module are as follows: the interaction module 201 is used for interacting with the peer wifi device The wifi direct connection message, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device, and the capability support information of the peer wifi device; link The establishment module 202 is used for establishing a direct connection link with the opposite end WiFi device supporting WiFi direct connection according to the WiFi direct connection message if the capability support information of the opposite end WiFi device indicates that the opposite end WiFi device supports WiFi direct connection; sending The module 203 is configured to send an instruction to the opposite end wifi device supporting wifi direct connection through the direct connection link, so that the opposite end wifi device supporting wifi direct connection executes the instruction.
- the interaction module 201 is used for interacting with the peer wifi device
- the wifi direct connection message wherein the wifi direct
- the device 3 may include, but is not limited to, the processor 30 and the memory 31 .
- FIG. 3 is only an example of the device 3, and does not constitute a limitation to the device 3. It may include more or less components than the one shown in the figure, or combine some components, or different components, such as Computing devices may also include input and output devices, network access devices, buses, and the like.
- the so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- CPU Central Processing Unit
- DSP Digital Signal Processor
- ASIC Application Specific Integrated Circuit
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the memory 31 may be an internal storage unit of the device 3 , such as a hard disk or a memory of the device 3 .
- the memory 31 can also be an external storage device of the device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (Secure Digital, SD) card, a flash memory card (Flash Card) equipped on the device 3 Wait.
- the memory 31 may also include both an internal storage unit of the device 3 and an external storage device.
- the memory 31 is used to store computer programs and other programs and data required by the device.
- the memory 31 can also be used to temporarily store data that has been output or is to be output.
- the disclosed apparatus/device and method may be implemented in other manners.
- the apparatus/device embodiments described above are only illustrative.
- the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
- 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.
- Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
- the integrated modules/units may be stored in a non-transitory computer-readable storage medium if implemented in the form of software functional units and sold or used as stand-alone products. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program, and the computer program of the communication method of the wifi device can be stored in a computer-readable storage medium.
- the computer program when executed by the processor, it can implement the steps of the above-mentioned method embodiments, that is, exchange a wifi direct connection message with the opposite end wifi device, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device, The capability support information of the Wi-Fi direct connection initiating device, the device information of the peer Wi-Fi device, and the capability support information of the peer Wi-Fi device; if the capability support information of the peer Wi-Fi device indicates that the peer Wi-Fi device supports Wi-Fi Direct Connect message to establish a direct link with the peer wifi device that supports wifi direct connection; through the direct link, send instructions to the peer wifi device that supports wifi direct connection, so that the peer wifi device that supports wifi direct connection Execute the instruction.
- the wifi direct connection message includes the device information of the wifi direct connection initiating device, The capability support information of the Wi-Fi direct connection initiating device, the device information of the peer Wi-Fi device, and the capability support information of the peer Wi-Fi device; if the capability support information of the peer Wi-Fi device indicates
- Non-transitory computer-readable media may include: any entity or device capable of carrying computer program codes, recording media, USB flash drives, removable hard disks, magnetic disks, optical discs, computer memories, read-only memory (ROM, Read-Only Memory) Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc.
- non-transitory computer-readable media may be modified as appropriate in accordance with the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the non-transitory Computer readable media do not include electrical carrier signals and telecommunication signals.
- 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 foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the application.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
本发明要求于2021年04月23日提交中国专利局、申请号为202110444125.3,发明名称为“wifi设备的通信方法、设备和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present invention requires the priority of the Chinese patent application filed on April 23, 2021 with the application number 202110444125.3 and the title of the invention is "communication method, device and computer-readable storage medium for wifi devices", the entire contents of which are obtained through Reference is incorporated in this application.
本发明涉及无线通信领域,特别涉及一种wifi设备的通信方法、设备和计算机可读存储介质。The present invention relates to the field of wireless communication, and in particular, to a communication method, device and computer-readable storage medium of a wifi device.
Wifi(WirelessFidelity,无线保真)设备是能够支持wifi功能的各种终端,例如,智能手机等,其可以在无线网络下与同样支持wifi功能的终端通信。显然,两个wifi设备之间能够通信的前提是同在一个无线网络下,其中的路由设备或者接入点(Access Point,AP)作为该两个wifi设备的“中转站”,转发两个wifi设备之间的交互信息。A Wifi (Wireless Fidelity, wireless fidelity) device is a variety of terminals that can support a wifi function, for example, a smart phone, etc., which can communicate with a terminal that also supports a wifi function under a wireless network. Obviously, the premise of communication between two wifi devices is that they are in the same wireless network, and the routing device or access point (Access Point) in the same wireless network Point, AP) as the "transit station" of the two wifi devices, forwarding the interaction information between the two wifi devices.
当现场不存在无线网络或无线网络的信号较差时,将使得wifi设备之间不能通信。When there is no wireless network on site or the signal of the wireless network is poor, communication between wifi devices will be impossible.
一方面,本申请实施例提供了一种wifi设备的通信方法,方法包括:On the one hand, an embodiment of the present application provides a communication method for a wifi device, the method comprising:
与对端wifi设备交互wifi直连消息,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;Interact wifi direct connection messages with the peer wifi device. The wifi direct connection messages include the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the capability support of the peer wifi device information;
若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;If the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish a direct connection link with the peer wifi device that supports wifi direct connection;
通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。Through the direct connection link, the command is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the command.
另一方面,本申请实施例提供了一种设备,设备包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:On the other hand, an embodiment of the present application provides a device. The device includes a memory, a processor, and a computer program stored in the memory and running on the processor. The processor implements the following steps when executing the computer program:
与对端wifi设备交互wifi直连消息,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;Interact wifi direct connection messages with the peer wifi device. The wifi direct connection messages include the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the capability support of the peer wifi device information;
若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;If the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish a direct connection link with the peer wifi device that supports wifi direct connection;
通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。Through the direct connection link, the command is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the command.
又一方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In another aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
与对端wifi设备交互wifi直连消息,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;Interact wifi direct connection messages with the peer wifi device. The wifi direct connection messages include the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the capability support of the peer wifi device information;
若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;If the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish a direct connection link with the peer wifi device that supports wifi direct connection;
通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。Through the direct connection link, the command is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the command.
从上述本申请提供的技术方案可知,在与对端wifi设备交互wifi直连消息后,若对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路,再通过该直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令,因此,本申请的技术方案使得可以在多个支持wifi直连的设备之间直接通信,免去对路由设备或AP的依赖,特别适合无网络的场景。It can be seen from the above technical solutions provided in the present application that, after exchanging the wifi direct connection message with the peer wifi device, if the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish the peer wifi that supports wifi direct connection The direct connection link of the device, and then through the direct connection link, an instruction is sent to the opposite end wifi device that supports wifi direct connection, so that the opposite end wifi device that supports wifi direct connection executes the instruction. Therefore, the technical solution of the present application makes the It can communicate directly between multiple devices that support wifi direct connection, eliminating the dependence on routing devices or APs, especially suitable for scenarios without a network.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请实施例提供的wifi设备的通信方法的流程图。FIG. 1 is a flowchart of a communication method for a wifi device provided by an embodiment of the present application.
图2是本申请实施例提供的wifi设备的通信装置的结构示意图。FIG. 2 is a schematic structural diagram of a communication apparatus of a wifi device provided by an embodiment of the present application.
图3是本申请实施例提供的设备的结构示意图。FIG. 3 is a schematic structural diagram of a device provided by an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
在本说明书中,诸如第一和第二这样的形容词仅可以用于将一个元素或动作与另一元素或动作进行区分,而不必要求或暗示任何实际的这种关系或顺序。在环境允许的情况下,参照元素或部件或步骤(等)不应解释为局限于仅元素、部件、或步骤中的一个,而可以是元素、部件、或步骤中的一个或多个等。In this specification, adjectives such as first and second may only be used to distinguish one element or action from another, and do not necessarily require or imply any actual such relationship or order. References to an element or component or step (etc.) should not be construed as limited to only one of the elements, components, or steps, but rather may be one or more of the elements, components, or steps, etc., where the circumstances permit.
在本说明书中,为了便于描述,附图中所示的各个部分的尺寸并不是按照实际的比例关系绘制的。In this specification, for the convenience of description, the dimensions of the various parts shown in the drawings are not drawn in an actual proportional relationship.
本申请提出了一种wifi设备的通信方法,如附图1所示,是以wifi直连发起设备为执行主体来进行说明,此处的wifi直连发起设备是指支持wifi直连并且主动发起直连的wifi设备。图1示例的wifi设备的通信方法主要包括步骤S101至S103,详述如下:The present application proposes a communication method for a wifi device, as shown in FIG. 1 , which is described with a wifi direct connection initiating device as the execution subject. Here, the wifi direct connection initiating device refers to a device that supports wifi direct connection and actively initiates Directly connected wifi device. The communication method of the wifi device illustrated in FIG. 1 mainly includes steps S101 to S103, which are described in detail as follows:
步骤S101:与对端wifi设备交互wifi直连消息,其中,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息。Step S101 : Interacting a wifi direct connection message with the peer wifi device, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device and the peer end Capability support information for wifi devices.
在本申请实施例中,wifi直连发起设备的设备信息包括该wifi直连发起设备的标识和/或MAC地址等信息,对端wifi设备的设备信息包括该对端wifi设备的标识和/或MAC地址等信息,其中,标识可以是设备的名称和类型等,对端wifi设备的能力支持信息用于标明该对端wifi设备是否支持wifi直连。一般而言,wifi直连发起设备通过扫描所有WiFi工作信号即2.4G频段的若干信道,然后,该wifi直连发起设备进入设备阶段,交替进入搜索状态和侦听状态,若某一时刻下,该wifi直连发起设备处于搜索状态,而对端wifi设备处于侦听状态,则两个设备即完成相互发现。在本申请一个实施例中,wifi直连发起设备与对端wifi设备交互wifi直连消息可以是:开启Wifi设备直连扫描功能,广播wifi直连发起设备的设备信息和wifi直连发起设备的能力支持信息;接收可直连wifi设备反馈的响应消息,其中,可直连wifi设备为支持wifi直连的对端wifi设备,响应消息包括可直连wifi设备的设备信息和能力支持信息。当wifi直连发起设备广播wifi直连发起设备的设备信息和wifi直连发起设备的能力支持信息时,对端wifi设备可接收到这些信息。若该对端wifi设备支持wifi直连,则该对端wifi设备作为可直连wifi设备向wifi直连发起设备反馈一个响应消息,其中就包括可直连wifi设备的设备信息和能力支持信息即支持wifi直连。In the embodiment of the present application, the device information of the wifi direct connection initiating device includes information such as the identifier and/or MAC address of the wifi direct connection initiating device, and the device information of the opposite end WiFi device includes the identification of the opposite end WiFi device and/or MAC address and other information, wherein, the identifier may be the name and type of the device, etc., and the capability support information of the opposite end WiFi device is used to indicate whether the opposite end WiFi device supports WiFi direct connection. Generally speaking, the wifi direct connection initiating device scans all WiFi working signals, that is, several channels in the 2.4G frequency band. Then, the wifi direct connection initiating device enters the device stage, and alternately enters the search state and the listening state. The initiating device of the wifi direct connection is in the search state, and the peer wifi device is in the listening state, then the two devices complete mutual discovery. In one embodiment of the present application, the wifi direct connection initiating device and the opposite end wifi device exchange wifi direct connection messages may be: enable the direct connection scanning function of the wifi device, broadcast the device information of the wifi direct connection initiating device and the wifi direct connection initiating device's information. Capability support information; receive a response message fed back by a directly connectable wifi device, wherein the directly connectable wifi device is a peer wifi device that supports wifi direct connection, and the response message includes the device information and capability support information of the directly connectable wifi device. When the wifi direct connection initiating device broadcasts the device information of the wifi direct connection initiating device and the capability support information of the wifi direct connection initiating device, the peer wifi device can receive the information. If the peer wifi device supports wifi direct connection, the peer wifi device, as a directly connectable wifi device, feeds back a response message to the wifi direct connection initiating device, including the device information and capability support information of the directly connected wifi device. Support wifi direct connection.
步骤S102:若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路。Step S102: If the capability support information of the opposite end WiFi device indicates that the opposite end WiFi device supports WiFi direct connection, then establish a direct connection link with the opposite end WiFi device supporting WiFi direct connection according to the WiFi direct connection message.
在本申请一个实施例中,根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路可以通过如下步骤S1021至步骤S1023实现:In an embodiment of the present application, according to the wifi direct connection message, establishing a direct connection link with the opposite end wifi device that supports wifi direct connection may be implemented through the following steps S1021 to S1023:
步骤S1021:向可直连wifi设备提供群主连接信息。Step S1021: Provide group owner connection information to the directly connectable wifi device.
由于wifi直连是由wifi直连发起设备主动发起群组的组网,因此,本申请实施例中,群主是wifi直连发起设备,其向可直连wifi设备提供的群主连接信息中包括与wifi直连发起设备建立WiFi直连链路时所需的wifi直连发起设备能够提供的基础服务集合的相关标识、共享密钥和工作信道的信道标识中的至少一种或多种。Since the wifi direct connection is a networking in which the wifi direct connection initiating device actively initiates the group, in this embodiment of the present application, the group owner is the wifi direct connection initiating device, and the group owner connection information provided to the directly connected wifi device is included in the group owner connection information. It includes at least one or more of the relevant identifier of the basic service set that the Wi-Fi direct connection initiating device can provide, the shared key and the channel identifier of the working channel, which are required when establishing a WiFi direct connection link with the Wi-Fi direct connection initiating device.
步骤S1022:接收可直连wifi设备发送的连接请求。Step S1022: Receive a connection request sent by the directly connectable wifi device.
在本申请实施例中,可直连wifi设备发送的连接请求是其根据群主连接信息进行设备扫描,在扫描到可直连wifi设备后发送,用于请求与wifi直连发起设备建立WiFi直连链路;可直连wifi设备发送的连接请求可在与wifi直连发起设备协商的工作信道上发送。In the embodiment of the present application, the connection request sent by the directly connectable wifi device is that it scans the device according to the connection information of the group owner, and sends it after scanning the directly connectable wifi device, which is used to request to establish a WiFi direct connection with the wifi direct connection initiating device. Connection link; the connection request sent by the directly connected wifi device can be sent on the working channel negotiated with the wifi direct connection initiating device.
步骤S1023:根据可直连wifi设备发送的连接请求,与可直连wifi设备建立直连链路。Step S1023: Establish a direct link with the directly connectable wifi device according to the connection request sent by the directly connectable wifi device.
在本申请另一实施例中,根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路可以通过如下步骤S’1021至步骤S’1023实现。In another embodiment of the present application, according to the wifi direct connection message, establishing a direct connection link with the opposite end wifi device that supports wifi direct connection can be implemented through the following steps S'1021 to S'1023.
步骤S’1021:建立一个首群组。Step S'1021: Create a head group.
作为群组管理终端即群主,wifi直连发起设备在开启时会自动扫描其信号范围内的wifi设备,若扫描到某个群组内原有WiFi设备,则自动向扫描到的原有WiFi设备发起连接,形成首群组。若没有扫描到,则提示用户是否使用当前存储的其他群组,若是,则以当前存储的其他群组作为首群组。As the group management terminal, that is, the group owner, the wifi direct connection initiating device will automatically scan for wifi devices within its signal range when it is turned on. Initiate a connection to form the first group. If it is not scanned, the user will be prompted whether to use the other group currently stored, if so, the other group currently stored will be used as the first group.
步骤S’1022:根据wifi直连消息,允许至少一个WiFi直连设备加入首群组。Step S'1022: According to the WiFi direct connection message, at least one WiFi direct connection device is allowed to join the first group.
步骤S’1023:保存关于首群组的信息以及该首群组中所有支持wifi直连的wifi设备的设备信息。Step S'1023: Save the information about the first group and the device information of all wifi devices that support wifi direct connection in the first group.
在本申请实施例中,首群组的信息包括本次组建群组的连接信息,设备信息包括作为群组客户的WiFi设备的设备名称、MAC地址、IP地址、安全信息、信号强度、信道、P2P IE和认证信息等。In the embodiment of the present application, the information of the first group includes connection information of the group formed this time, and the device information includes the device name, MAC address, IP address, security information, signal strength, channel, P2P IE and authentication information, etc.
从上述本申请实施例可知,wifi直连发起设备获取申请加入群组的其他的WiFi设备以及wifi直连发起设备自身的设备信息,这些设备信息是形成首群组的条件依据,当wifi直连发起设备中保存了这些设备信息以及群组的信息之后,在下一次重新构建群组时,就能够基于这些设备信息以及群组的信息完成构建。It can be seen from the above embodiments of the present application that the wifi direct connection initiating device obtains other WiFi devices applying to join the group and the device information of the wifi direct connection initiating device itself. These device information are the conditions for forming the first group. After the device information and the group information are saved in the initiating device, the next time the group is rebuilt, the construction can be completed based on the device information and the group information.
为了减少用户手动输入设备信息或手动选择设备端,避免wifi直连发起设备和目标wifi设备端建立连接的复杂操作,避免用户输入繁杂的设备信息,在上述本申请实施例中还包括:检测wifi直连发起设备本地是否已存储支持wifi直连的历史wifi设备的设备信息以及该历史wifi设备与所述wifi直连发起设备的直连记录信息;若wifi直连发起设备本地是已存储支持wifi直连的历史wifi设备的设备信息以及该历史wifi设备与wifi直连发起设备的直连记录信息,则开启wifi直连发起设备的Wifi设备直连扫描功能,以扫描预设范围内同样支持wifi直连的wifi设备;根据历史wifi设备的设备信息,建立wifi直连发起设备与wifi直连发起设备中存在的wifi设备之间的直连链路。上述实施例中,在检测到与wifi直连发起设备建立wifi直连的目标设备后,将目标设备存储为支持wifi直连的历史wifi设备。In order to reduce the user's manual input of device information or manual selection of the device, to avoid the complicated operation of establishing a connection between the initiating device and the target WiFi device, and to avoid the user from entering complicated device information, the above embodiments of the present application further include: detecting wifi Whether the direct connection initiating device has locally stored the device information of the historical Wi-Fi device that supports Wi-Fi direct connection and the direct connection record information between the historical Wi-Fi device and the Wi-Fi direct connection initiating device; The device information of the directly connected historical Wi-Fi device and the direct connection record information of the historical Wi-Fi device and the Wi-Fi direct connection initiating device, then enable the Wi-Fi device direct connection scanning function of the Wi-Fi direct connection initiating device to scan the preset range that also supports Wi-Fi Directly connected wifi device; establishes a direct link between the wifi direct connection initiating device and the wifi device existing in the wifi direct connection initiating device according to the device information of the historical wifi device. In the above embodiment, after detecting the target device that establishes the wifi direct connection with the wifi direct connection initiating device, the target device is stored as the historical wifi device supporting the wifi direct connection.
为了减小能量的消耗,在上述本申请实施例中,还包括:确定当前与wifi直连发起设备建立直连链路的当前wifi历史设备;获取并分析过去预设时长内wifi直连发起设备与各当前历史wifi设备的交互信息,确定wifi直连发起设备与各当前历史wifi设备的交互热度;关闭交互热度小于第一阈值的当前历史wifi设备与wifi直连发起设备的直连链路,和/或,休眠交互热度小于第二阈值的当前历史wifi设备与wifi直连发起设备的直连链路,其中,第二阈值大于第一阈值。上述实施例中,交互信息主要包括wifi直连发起设备与不同当前历史wifi设备的数据交互的频率、持续时长和传输数据量等,数据交互的频率、持续时长和传输数据量与交互热度正相关,即wifi直连发起设备与一个当前历史wifi设备的数据交互频率越大,wifi直连发起设备与该当前历史wifi设备的交互热度越高;同理,wifi直连发起设备与当前历史wifi设备的数据交互持续时长越大,交互热度越高,传输数据量越大,交互热度越高。数据交互的频率、持续时长和传输数据量与交互热度正相关的权重,可根据wifi直连发起设备和当前历史wifi设备的引用场景或用户需求,自行设置。当wifi直连发起设备与各当前历史wifi设备的交互热度小于第一阈值,表明wifi直连发起设备和当前历史wifi设备的交互很少,wifi直连发起设备和当前历史wifi设备之间的wifi直连链路使用率很低,持续开启将耗费wifi直连发起设备和当前历史wifi设备过多电量,因此,关闭交互热度小于第一阈值的当前历史wifi设备与wifi直连发起设备的wifi直连链路,节省wifi直连发起设备和当前历史wifi设备的电量。当wifi直连发起设备与各当前历史wifi设备的交互热度小于第二阈值大于或等于第一阈值,表明wifi直连发起设备与各当前历史wifi设备的交互频度适中,wifi直连发起设备与各当前历史wifi设备之间的wifi直连链路使用率偏低,持续开启将耗费wifi直连发起设备和各当前历史wifi设备较多电量,因此休眠交互热度小于第二阈值大于或等于第一阈值的wifi直连发起设备与各当前历史wifi设备之间的wifi直连链路,有交互需求则唤醒休眠的wifi直连链路,进一步节省wifi直连发起设备和各当前历史wifi设备的电量。In order to reduce energy consumption, in the above embodiments of the present application, the method further includes: determining the current wifi historical device that currently establishes a direct link with the wifi direct connection initiating device; acquiring and analyzing the wifi direct connection initiating device within the past preset time period Interaction information with each current historical Wi-Fi device to determine the interaction heat between the Wi-Fi direct connection initiating device and each current historical Wi-Fi device; close the direct connection link between the current historical Wi-Fi device whose interaction heat is less than the first threshold and the Wi-Fi Direct connection initiating device, And/or, the direct connection link between the current historical Wi-Fi device and the Wi-Fi direct connection initiating device whose sleep interaction hotness is less than a second threshold, where the second threshold is greater than the first threshold. In the above embodiment, the interaction information mainly includes the frequency, duration, and data volume of data interaction between the wifi direct connection initiating device and different current historical wifi devices, etc. The frequency, duration, and transmission data volume of data interaction are positively correlated with interaction heat , that is, the greater the frequency of data interaction between the wifi direct connection initiating device and a current historical wifi device, the higher the interaction between the wifi direct connection initiating device and the current historical wifi device; in the same way, the wifi direct connection initiating device and the current historical wifi device The longer the duration of the data interaction, the higher the interaction heat, and the larger the amount of transmitted data, the higher the interaction heat. The frequency, duration of data interaction, and the weight of the amount of transmitted data that is positively related to the interaction heat can be set by yourself according to the reference scenarios or user needs of the Wi-Fi direct connection initiating device and the current historical Wi-Fi device. When the interaction between the wifi direct connection initiating device and each current historical wifi device is less than the first threshold, it indicates that there is little interaction between the wifi direct connection initiating device and the current historical wifi device, and the wifi between the wifi direct connection initiating device and the current historical wifi device The usage rate of the direct connection link is very low. Continuing to enable it will consume too much power of the Wi-Fi direct connection initiating device and the current historical Wi-Fi device. Therefore, turn off the Wi-Fi direct connection between the current historical Wi-Fi device and the Wi-Fi direct connection initiating device whose interaction heat is less than the first threshold. Connect the link to save the power of the wifi direct connection initiating device and the current historical wifi device. When the interaction between the wifi direct connection initiating device and each current historical wifi device is less than the second threshold and greater than or equal to the first threshold, it indicates that the interaction frequency between the wifi direct connection initiating device and each current historical wifi device is moderate, and the wifi direct connection initiating device and each current historical wifi device have a moderate interaction frequency. The usage rate of the Wi-Fi direct link between the current historical Wi-Fi devices is low, and the continuous activation will consume a lot of power between the Wi-Fi direct connection initiating device and each current historical Wi-Fi device, so the sleep interaction heat is less than the second threshold and greater than or equal to the first The Wi-Fi direct connection link between the Wi-Fi direct connection initiating device and each current historical Wi-Fi device at the threshold value will wake up the dormant Wi-Fi Direct connection link when there is an interaction requirement, which further saves the power of the Wi-Fi Direct connection initiating device and each current historical Wi-Fi device. .
步骤S103:通过与支持wifi直连的对端wifi设备的直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。Step S103: Send an instruction to the peer wifi device supporting wifi direct connection through the direct link with the peer wifi device supporting wifi direct connection, so that the peer wifi device supporting wifi direct connection executes the instruction.
在本申请实施例中,向支持wifi直连的对端wifi设备发送的指令包括指示支持wifi直连的对端wifi设备播放音乐和/或提示音、连接到家庭网络等指定网络以及其他动作,这些指令可封装在符合wifi直连协议的供应商特定属性(Vendor Specific Attribute,VSA)包中。支持wifi直连的对端wifi设备收到VSA包之后,按照wifi直连协议解析出VSA包中的指令并执行。In the embodiment of the present application, the instruction sent to the opposite end wifi device supporting wifi direct connection includes instructing the opposite end wifi device supporting wifi direct connection to play music and/or prompt sound, connect to a designated network such as a home network, and other actions, These directives can be encapsulated in a Vendor Specific Attribute (VSA) packet that conforms to the Wi-Fi Direct protocol. After receiving the VSA packet, the peer wifi device that supports wifi direct connection parses and executes the instructions in the VSA packet according to the wifi direct connection protocol.
从上述附图1示例的wifi设备的通信方法可知,在与对端wifi设备交互wifi直连消息后,若对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路,再通过该直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令,因此,本申请的技术方案使得可以在多个支持wifi直连的设备之间直接通信,免去对路由设备或AP的依赖,特别适合无网络的场景。It can be seen from the communication method of the wifi device in the example of FIG. 1 above that after exchanging the wifi direct connection message with the opposite end wifi device, if the opposite end wifi device supports the wifi direct connection, then according to the wifi direct connection message, establish and support the wifi direct connection The direct connection link of the opposite end WiFi device, and then send the command to the opposite end WiFi device that supports WiFi direct connection through the direct connection link, so that the opposite end WiFi device that supports WiFi direct connection executes the command. Therefore, this application The technical solution enables direct communication between multiple devices that support wifi direct connection, eliminating the dependence on routing devices or APs, and is especially suitable for scenarios without a network.
请参阅附图2,是本申请实施例提供的一种wifi设备的通信装置,该装置可以是支持wifi直连的设备或者其中的功能模块。附图2示例的装置可以包括交互模块201、链路建立模块202和发送模块203,详述如下:Please refer to FIG. 2 , which is a communication device of a wifi device provided by an embodiment of the present application, and the device may be a device supporting wifi direct connection or a functional module therein. The apparatus exemplified in FIG. 2 may include an interaction module 201, a link establishment module 202 and a sending module 203, which are described in detail as follows:
交互模块201,用于与对端wifi设备交互wifi直连消息,其中,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;The interaction module 201 is used for exchanging wifi direct connection messages with the peer wifi device, wherein the wifi direct connection message includes device information of the wifi direct connection initiating device, capability support information of the wifi direct connection initiating device, and device information of the peer wifi device and the capability support information of the peer wifi device;
链路建立模块202,用于若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;The link establishment module 202 is configured to establish a direct connection link with the opposite end WiFi device supporting WiFi direct connection according to the WiFi direct connection message if the capability support information of the opposite end WiFi device indicates that the opposite end WiFi device supports WiFi direct connection ;
发送模块203,用于通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。The sending module 203 is configured to send an instruction to the opposite end wifi device supporting wifi direct connection through the direct connection link, so that the opposite end wifi device supporting wifi direct connection executes the instruction.
可选地,上述附图2示例的交互模块201可以包括广播单元和第一接收单元,其中:Optionally, the interaction module 201 in the example of FIG. 2 above may include a broadcasting unit and a first receiving unit, wherein:
广播单元,用于开启Wifi设备直连扫描功能,广播wifi直连发起设备的设备信息和wifi直连发起设备的能力支持信息;The broadcast unit is used to enable the direct connection scanning function of Wifi devices, and broadcast the device information of the wifi direct connection initiating device and the capability support information of the wifi direct connection initiating device;
第一接收单元,用于接收可直连wifi设备反馈的响应消息,其中,可直连wifi设备为支持wifi直连的对端wifi设备,响应消息包括可直连wifi设备的设备信息和能力支持信息。The first receiving unit is used to receive a response message fed back by the directly connectable wifi device, wherein the directly connectable wifi device is a peer wifi device that supports wifi direct connection, and the response message includes the device information and capability support of the directly connectable wifi device information.
可选地,上述附图2示例的链路建立模块202可以包括连接信息提供单元、第二接收单元和直连链路连接单元,其中:Optionally, the link establishment module 202 in the example of FIG. 2 may include a connection information providing unit, a second receiving unit and a direct link connection unit, wherein:
连接信息提供单元,用于向可直连wifi设备提供群主连接信息;The connection information providing unit is used to provide the group owner connection information to the directly connected wifi device;
第二接收单元,用于接收可直连wifi设备发送的连接请求;a second receiving unit, configured to receive a connection request sent by a directly connectable wifi device;
直连链路连接单元,用于根据可直连wifi设备发送的连接请求,与可直连wifi设备建立直连链路。The direct link connection unit is used to establish a direct link with the directly connectable wifi device according to the connection request sent by the directly connectable wifi device.
可选地,上述附图2示例的链路建立模块202可以包括群组建立单元、加群确定单元和保存单元,其中:Optionally, the link establishment module 202 shown in the above example of FIG. 2 may include a group establishment unit, a group addition determination unit and a storage unit, wherein:
群组建立单元,用于建立一个首群组;a group establishment unit, used to establish a first group;
加群确定单元,用于根据wifi直连消息,允许至少一个WiFi直连设备加入首群组;A group addition determination unit, configured to allow at least one WiFi direct connection device to join the first group according to the WiFi direct connection message;
保存单元,用于保存关于首群组的信息以及首群组中所有支持wifi直连的wifi设备的设备信息The saving unit is used to save the information about the first group and the device information of all the wifi devices in the first group that support wifi direct connection
可选地,附图2示例的装置还可以包括检测模块、扫描功能开启模块和直连链路建立模块,其中:Optionally, the apparatus shown in FIG. 2 may further include a detection module, a scanning function enabling module and a direct link establishment module, wherein:
检测模块,用于检测wifi直连发起设备本地是否已存储支持wifi直连的历史wifi设备的设备信息以及历史wifi设备与wifi直连发起设备的直连记录信息;The detection module is used to detect whether the Wi-Fi direct connection initiating device has stored the device information of the historical Wi-Fi devices that support Wi-Fi direct connection locally and the direct connection record information between the historical Wi-Fi device and the Wi-Fi direct connection initiating device;
扫描功能开启模块,用于若wifi直连发起设备本地已存储支持wifi直连的历史wifi设备的设备信息以及历史wifi设备与wifi直连发起设备的直连记录信息,则开启wifi直连发起设备的Wifi设备直连扫描功能,以扫描预设范围内同样支持wifi直连的wifi设备;The scanning function enable module is used to enable the Wi-Fi direct connection initiating device if the Wi-Fi direct connection initiating device has stored the device information of the historical Wi-Fi devices supporting Wi-Fi direct connection and the direct connection record information between the historical Wi-Fi device and the Wi-Fi direct connection initiating device. The Wifi device direct connection scanning function can scan the wifi devices within the preset range that also support wifi direct connection;
直连链路建立模块,用于根据历史wifi设备的设备信息,建立wifi直连发起设备与wifi直连发起设备中存在的wifi设备之间的直连链路。The direct link establishment module is used to establish a direct link between the wifi direct connection initiating device and the wifi device existing in the wifi direct connection initiating device according to the device information of the historical wifi device.
可选地,附图2示例的装置还可以包括存储模块,用于检测模块在检测到与wifi直连发起设备建立wifi直连的目标设备后,将目标设备存储为支持wifi直连的历史wifi设备。Optionally, the apparatus shown in FIG. 2 may further include a storage module, after the detection module detects the target device that establishes a wifi direct connection with the wifi direct connection initiating device, the target device is stored as a historical wifi that supports wifi direct connection. equipment.
可选地,附图2示例的装置还可以包括第一确定模块、第二确定模块和链路处理模块,其中:Optionally, the apparatus shown in FIG. 2 may further include a first determination module, a second determination module and a link processing module, wherein:
第一确定模块,用于确定当前与wifi直连发起设备建立直连链路的当前wifi历史设备;The first determining module is used to determine the current Wi-Fi historical device that currently establishes a direct connection link with the Wi-Fi direct connection initiating device;
第二确定模块,用于获取并分析过去预设时长内所述wifi直连发起设备与各当前历史wifi设备的交互信息,确定wifi直连发起设备与各当前历史wifi设备的交互热度;The second determining module is configured to obtain and analyze the interaction information between the wifi direct connection initiating device and each current historical wifi device within a preset time period in the past, and determine the interaction heat between the wifi direct connection initiating device and each current historical wifi device;
链路处理模块,用于关闭交互热度小于第一阈值的当前历史wifi设备与wifi直连发起设备的直连链路,和/或,休眠交互热度小于第二阈值的当前历史wifi设备与wifi直连发起设备的直连链路,其中,第二阈值大于第一阈值。The link processing module is used to close the direct connection link between the current historical Wi-Fi device whose interaction heat is less than the first threshold and the Wi-Fi direct connection initiating device, and/or the current historical Wi-Fi device whose sleep interaction heat is less than the second threshold and the Wi-Fi Direct connection. A direct link connected to the initiating device, wherein the second threshold is greater than the first threshold.
从上述附图2示例的wifi设备的通信装置可知,在与对端wifi设备交互wifi直连消息后,若对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路,再通过该直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令,因此,本申请的技术方案使得可以在多个支持wifi直连的设备之间直接通信,免去对路由设备或AP的依赖,特别适合无网络的场景。It can be seen from the communication device of the wifi device in the example of FIG. 2 above that after exchanging the wifi direct connection message with the opposite end wifi device, if the opposite end wifi device supports the wifi direct connection, then according to the wifi direct connection message, establish and support the wifi direct connection The direct connection link of the opposite end WiFi device, and then send the command to the opposite end WiFi device that supports WiFi direct connection through the direct connection link, so that the opposite end WiFi device that supports WiFi direct connection executes the command. Therefore, this application The technical solution enables direct communication between multiple devices that support wifi direct connection, eliminating the dependence on routing devices or APs, and is especially suitable for scenarios without a network.
图3是本申请一实施例提供的设备的结构示意图。如图3所示,该实施例的设备3主要包括:处理器30、存储器31以及存储在存储器31中并可在处理器30上运行的计算机程序32,例如wifi设备的通信方法的程序。处理器30执行计算机程序32时实现上述wifi设备的通信方法实施例中的步骤,例如图1所示的步骤S101至S103。或者,处理器30执行计算机程序32时实现上述各装置实施例中各模块/单元的功能,例如图2所示交互模块201、链路建立模块202和发送模块203的功能。FIG. 3 is a schematic structural diagram of a device provided by an embodiment of the present application. As shown in FIG. 3 , the device 3 in this embodiment mainly includes: a processor 30 , a memory 31 , and a computer program 32 stored in the memory 31 and executable on the processor 30 , such as a program for a communication method of a wifi device. When the processor 30 executes the computer program 32 , the steps in the above-mentioned embodiment of the communication method for the wifi device are implemented, for example, steps S101 to S103 shown in FIG. 1 . Alternatively, when the processor 30 executes the computer program 32, the functions of the modules/units in the above device embodiments, such as the functions of the interaction module 201, the link establishment module 202 and the sending module 203 shown in FIG. 2, are implemented.
示例性地,wifi设备的通信方法的计算机程序32主要包括:与对端wifi设备交互wifi直连消息,其中,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。Exemplarily, the computer program 32 of the communication method of the wifi device mainly includes: interacting with the opposite end wifi device of a wifi direct connection message, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device and the capability of the wifi direct connection initiating device Support information, device information of the peer wifi device, and capability support information of the peer wifi device; if the capability support information of the peer wifi device indicates that the peer wifi device supports wifi direct connection, then according to the wifi direct connection message, establish and support wifi Direct link of the directly connected peer wifi device; through the direct link, send instructions to the peer wifi device that supports wifi direct connection, so that the peer wifi device that supports wifi direct connection executes the instruction.
计算机程序32可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器31中,并由处理器30执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述计算机程序32在设备3中的执行过程。例如,计算机程序32可以被分割成交互模块201、链路建立模块202和发送模块203(虚拟装置中的模块)的功能,各模块具体功能如下:交互模块201,用于与对端wifi设备交互wifi直连消息,其中,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;链路建立模块202,用于若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;发送模块203,用于通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。The computer program 32 may be divided into one or more modules/units, which are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, the instruction segments being used to describe the execution process of the computer program 32 in the device 3 . For example, the computer program 32 can be divided into the functions of an interaction module 201, a link establishment module 202 and a transmission module 203 (modules in the virtual device), and the specific functions of each module are as follows: the interaction module 201 is used for interacting with the peer wifi device The wifi direct connection message, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device, the capability support information of the wifi direct connection initiating device, the device information of the peer wifi device, and the capability support information of the peer wifi device; link The establishment module 202 is used for establishing a direct connection link with the opposite end WiFi device supporting WiFi direct connection according to the WiFi direct connection message if the capability support information of the opposite end WiFi device indicates that the opposite end WiFi device supports WiFi direct connection; sending The module 203 is configured to send an instruction to the opposite end wifi device supporting wifi direct connection through the direct connection link, so that the opposite end wifi device supporting wifi direct connection executes the instruction.
设备3可包括但不仅限于处理器30、存储器31。本领域技术人员可以理解,图3仅仅是设备3的示例,并不构成对设备3的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如计算设备还可以包括输入输出设备、网络接入设备、总线等。The device 3 may include, but is not limited to, the processor 30 and the memory 31 . Those skilled in the art can understand that FIG. 3 is only an example of the device 3, and does not constitute a limitation to the device 3. It may include more or less components than the one shown in the figure, or combine some components, or different components, such as Computing devices may also include input and output devices, network access devices, buses, and the like.
所称处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
存储器31可以是设备3的内部存储单元,例如设备3的硬盘或内存。存储器31也可以是设备3的外部存储设备,例如设备3上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器31还可以既包括设备3的内部存储单元也包括外部存储设备。存储器31用于存储计算机程序以及设备所需的其他程序和数据。存储器31还可以用于暂时地存储已经输出或者将要输出的数据。The memory 31 may be an internal storage unit of the device 3 , such as a hard disk or a memory of the device 3 . The memory 31 can also be an external storage device of the device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (Secure Digital, SD) card, a flash memory card (Flash Card) equipped on the device 3 Wait. Further, the memory 31 may also include both an internal storage unit of the device 3 and an external storage device. The memory 31 is used to store computer programs and other programs and data required by the device. The memory 31 can also be used to temporarily store data that has been output or is to be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即,将装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述装置中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。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 process of the units and modules in the above apparatus, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。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.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/设备实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。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/device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, 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.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非临时性计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,wifi设备的通信方法的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤,即,与对端wifi设备交互wifi直连消息,其中,wifi直连消息包括wifi直连发起设备的设备信息、wifi直连发起设备的能力支持信息、对端wifi设备的设备信息和对端wifi设备的能力支持信息;若对端wifi设备的能力支持信息表明对端wifi设备支持wifi直连,则根据wifi直连消息,建立与支持wifi直连的对端wifi设备的直连链路;通过直连链路,向支持wifi直连的对端wifi设备发送指令,以使支持wifi直连的对端wifi设备执行指令。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。非临时性计算机可读介质可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读内存(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,非临时性计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,非临时性计算机可读介质不包括电载波信号和电信信号。以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的具体实施方式而已,并不用于限定本申请的保护范围,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The integrated modules/units may be stored in a non-transitory computer-readable storage medium if implemented in the form of software functional units and sold or used as stand-alone products. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program, and the computer program of the communication method of the wifi device can be stored in a computer-readable storage medium. , when the computer program is executed by the processor, it can implement the steps of the above-mentioned method embodiments, that is, exchange a wifi direct connection message with the opposite end wifi device, wherein the wifi direct connection message includes the device information of the wifi direct connection initiating device, The capability support information of the Wi-Fi direct connection initiating device, the device information of the peer Wi-Fi device, and the capability support information of the peer Wi-Fi device; if the capability support information of the peer Wi-Fi device indicates that the peer Wi-Fi device supports Wi-Fi Direct Connect message to establish a direct link with the peer wifi device that supports wifi direct connection; through the direct link, send instructions to the peer wifi device that supports wifi direct connection, so that the peer wifi device that supports wifi direct connection Execute the instruction. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate forms, and the like. Non-transitory computer-readable media may include: any entity or device capable of carrying computer program codes, recording media, USB flash drives, removable hard disks, magnetic disks, optical discs, computer memories, read-only memory (ROM, Read-Only Memory) Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of the non-transitory computer-readable media may be modified as appropriate in accordance with the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the non-transitory Computer readable media do not include electrical carrier signals and telecommunication signals. 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 foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the application. within the scope of protection. The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above descriptions are only specific embodiments of the present application, and are not intended to limit the Within the scope of protection, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present invention.
Claims (15)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110444125.3A CN113141671B (en) | 2021-04-23 | 2021-04-23 | Communication method and device of wifi device and computer readable storage medium |
CN202110444125.3 | 2021-04-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022222299A1 true WO2022222299A1 (en) | 2022-10-27 |
Family
ID=76812421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/109290 WO2022222299A1 (en) | 2021-04-23 | 2021-07-29 | Communication method for wifi device, and device and computer-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113141671B (en) |
WO (1) | WO2022222299A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113141671B (en) * | 2021-04-23 | 2023-06-20 | Tcl通讯(宁波)有限公司 | Communication method and device of wifi device and computer readable storage medium |
CN114143910A (en) * | 2021-12-09 | 2022-03-04 | 惠州Tcl移动通信有限公司 | Data transmission method, device and computer readable storage medium |
CN114900826A (en) * | 2022-04-26 | 2022-08-12 | 青岛海尔科技有限公司 | Device binding method and device, storage medium and electronic device |
CN115002939B (en) * | 2022-07-18 | 2022-10-04 | 荣耀终端有限公司 | Method and device for joining WiFi group |
CN117156396B (en) * | 2023-09-13 | 2024-05-31 | 中航信移动科技有限公司 | Communication method of networking scene terminal equipment, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050135304A1 (en) * | 2003-01-29 | 2005-06-23 | Globespanvirata, Inc. | Independent direct link protocol |
CN1879364A (en) * | 2003-11-13 | 2006-12-13 | 英特尔公司 | Method, apparatuses and computer to provide secured direct link between two stations |
CN106063363A (en) * | 2014-01-31 | 2016-10-26 | 索尼公司 | Ims/rcs wi-fi direct support |
CN110832932A (en) * | 2017-07-12 | 2020-02-21 | 高通股份有限公司 | User equipment capability discovery in distributed wireless networks |
CN112291742A (en) * | 2019-07-25 | 2021-01-29 | 大唐移动通信设备有限公司 | Direct communication method and device |
CN113141671A (en) * | 2021-04-23 | 2021-07-20 | Tcl通讯(宁波)有限公司 | Communication method and device of wifi device and computer readable storage medium |
Family Cites Families (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101594578B (en) * | 2008-05-30 | 2013-08-28 | 华为终端有限公司 | Establishment method of direct connected link, station device and communication system |
JP5440123B2 (en) * | 2009-11-24 | 2014-03-12 | ソニー株式会社 | Wireless communication apparatus, wireless communication system, wireless communication method, and program |
CN102170639B (en) * | 2011-05-11 | 2015-03-11 | 华南理工大学 | Authentication method of distributed wireless Ad Hoc network |
CN103702291B (en) * | 2012-09-27 | 2017-06-09 | 中兴通讯股份有限公司 | A kind of method and WiFi direct-connected devices that group is set up based on Wi Fi |
US9544782B2 (en) * | 2012-11-02 | 2017-01-10 | Qualcomm Incorporated | Systems, apparatus, and methods for range extension of wireless communication |
CN103067776B (en) * | 2012-12-26 | 2018-03-06 | Tcl集团股份有限公司 | Program push method, system and intelligent display device, cloud server |
US9954679B2 (en) * | 2014-03-05 | 2018-04-24 | Qualcomm Incorporated | Using end-user federated login to detect a breach in a key exchange encrypted channel |
CN105451366A (en) * | 2014-08-21 | 2016-03-30 | Tcl集团股份有限公司 | Method and device for establishing TDLS link and near-field communication system |
US10805781B2 (en) * | 2015-03-05 | 2020-10-13 | Samsung Electronics Co., Ltd. | Method and apparatus for establishing a connection between devices |
US9923715B2 (en) * | 2015-06-09 | 2018-03-20 | Intel Corporation | System, apparatus and method for group key distribution for a network |
CN106657950A (en) * | 2016-09-29 | 2017-05-10 | 努比亚技术有限公司 | Projection device management device, method and projection data sharing device |
CN108684071A (en) * | 2018-04-25 | 2018-10-19 | 东峡大通(北京)管理咨询有限公司 | The power consumption control method and system of the device node of MESH network |
CN110011795B (en) * | 2019-04-12 | 2021-07-30 | 郑州轻工业学院 | Blockchain-based symmetric group key agreement method |
CN112312586B (en) * | 2019-08-02 | 2023-01-17 | Oppo广东移动通信有限公司 | Method, device, equipment and storage medium for establishing WiFi direct connection |
CN110831005B (en) * | 2019-11-11 | 2023-07-11 | 深圳创维数字技术有限公司 | Equipment adding method of Mesh network, gateway equipment and storage medium |
CN111479172B (en) * | 2020-04-30 | 2022-03-01 | 未来穿戴技术有限公司 | Information transmission method, electronic equipment and readable storage medium |
CN111988471B (en) * | 2020-08-27 | 2022-04-19 | 深圳市当智科技有限公司 | Wireless phone system, wireless communication method and readable storage medium |
CN112401838B (en) * | 2020-11-16 | 2023-07-14 | 上海创功通讯技术有限公司 | Method for detecting sleep state by wearable device and wearable device |
-
2021
- 2021-04-23 CN CN202110444125.3A patent/CN113141671B/en active Active
- 2021-07-29 WO PCT/CN2021/109290 patent/WO2022222299A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050135304A1 (en) * | 2003-01-29 | 2005-06-23 | Globespanvirata, Inc. | Independent direct link protocol |
CN1879364A (en) * | 2003-11-13 | 2006-12-13 | 英特尔公司 | Method, apparatuses and computer to provide secured direct link between two stations |
CN106063363A (en) * | 2014-01-31 | 2016-10-26 | 索尼公司 | Ims/rcs wi-fi direct support |
CN110832932A (en) * | 2017-07-12 | 2020-02-21 | 高通股份有限公司 | User equipment capability discovery in distributed wireless networks |
CN112291742A (en) * | 2019-07-25 | 2021-01-29 | 大唐移动通信设备有限公司 | Direct communication method and device |
CN113141671A (en) * | 2021-04-23 | 2021-07-20 | Tcl通讯(宁波)有限公司 | Communication method and device of wifi device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113141671A (en) | 2021-07-20 |
CN113141671B (en) | 2023-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022222299A1 (en) | Communication method for wifi device, and device and computer-readable storage medium | |
US11856498B2 (en) | Bluetooth device connection method and device | |
CN103931264B (en) | Communicate to connect method for building up and terminal | |
US10932313B2 (en) | Wireless connection switching method and terminal | |
US8909197B2 (en) | Method and system for providing Wi-Fi service by Wi-Fi device | |
EP3005822B1 (en) | Mac layer transport for wi-fi direct services application service platform without internet protocol | |
TW201342984A (en) | Shared network access via a peer-to-peer link | |
JP6377761B2 (en) | Method and apparatus for data path based on independent basic service set for neighbor aware network | |
WO2014183404A1 (en) | Data transmission method, apparatus, system and terminal | |
US20150133052A1 (en) | Device selection | |
CN115119190A (en) | Bluetooth connection method, device, computer equipment and readable storage medium | |
WO2024083235A1 (en) | Network configuration method based on wi-fi sensing, embedded chip system, and medium | |
WO2024103640A1 (en) | Ble mesh-based provisioning control method and system, and electronic device | |
CN107820298A (en) | Wireless network management method, wireless network management device and intelligent terminal | |
WO2023116352A1 (en) | Communication method, apparatus and system based on target wake time | |
CN103379587B (en) | A kind of discovery method and device of wireless network | |
TWI462613B (en) | Multicast group management methods and wireless network apparatus using the same | |
WO2025025173A1 (en) | Communication method, and access point device and communication system | |
WO2022089643A1 (en) | Method for adjusting enhanced distributed channel access parameter of real-time application, and communication device | |
CN114698060B (en) | Method and device for quickly discovering wireless access point | |
WO2024174350A1 (en) | Networking method and system, and network access method and system | |
WO2016177037A1 (en) | Network connection method and device | |
CN105409271B (en) | The transmission processing method and system of management frame | |
WO2025147976A1 (en) | Multi-ap coordination establishment method, access point device, and communication system | |
CN114258011B (en) | Information sending method, information receiving method, information sending device, information receiving device and terminal |
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: 21937523 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: 21937523 Country of ref document: EP Kind code of ref document: A1 |