Detailed Description
In order to make the technical solutions of the present application better understood, 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, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic devices involved in the embodiments of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal equipment (terminal device), and so on. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
The following describes embodiments of the present application in detail.
Firstly, a NAN mechanism is briefly introduced, a Neighbor Awareness Network (NAN) mechanism is a standard formulated by a wireless fidelity Wi-Fi alliance, the standard is used for synchronizing all devices (namely NAN devices) participating in the NAN mechanism under the condition that no central node exists, maintaining work and Service Discovery work of the NAN mechanism are performed in a Discovery Window (DW) agreed by the NAN mechanism, Service Discovery is realized by sending a Service Discovery Frame (SDF) message, and the Service Discovery Frame message comprises an inquiry message or a broadcast message. The device may establish a corresponding connection based on the information obtained in the service discovery and then perform data transmission.
Specifically, in the standard specified by the Wi-Fi alliance, channel 6 may be used as the discovery channel in the NAN mechanism, and on channel 6, the duration of the discovery time window DW is fixed for each cluster, and the time interval between any two DWs adjacent to the cluster is also fixed.
In the NAN mechanism, a Discovery Window (DW) is set, and NAN devices perform service discovery in the DW. In the NAN mechanism, a DW is generally set in each 512 TUs (time unit), wherein the duration of one TU is about 1024 μ s, and the duration of the DW is generally 16 TUs, that is, in the NAN mechanism, a DW is generally set every 496 TUs. In the NAN mechanism, one or more NAN devices form a Cluster (also called a neighbor awareness network), when a Cluster enters a DW, a NAN device in the Cluster in a master node (master), an anchor master node (AM), a master node (non-master synchronization, non-master sync) state and the like sends a synchronization beacon frame (sync beacon) message, where the message carries information of the AM in the Cluster, and the NAN device receiving the message synchronizes with the AM in the Cluster.
For example, as shown in fig. 1, which is a schematic diagram of a DW of a cluster, according to a standard established by the Wi-Fi alliance, in the DW, NAN devices in the cluster may send a service discovery frame SDF message in the DW to perform service discovery, and in a time other than the DW, NAN devices in the cluster may send a discovery beacon (discovery beacon) message to announce the existence of the cluster. Each NAN device in the cluster may perform service discovery in the DW to discover other NAN devices with which data transmission can be performed. After service discovery, at least two NAN devices which need to perform data transmission with each other may agree on a time frequency resource and a network connection mode in the DW, and after the DW is finished, assemble a corresponding NAN network without a center node on the agreed time frequency resource according to the agreed network connection mode.
The flow of completing service discovery by the NAN device is as follows:
1. after a device activates the NAN function (i.e., becomes a NAN device), it may set itself as an AM, create a Cluster, set a Cluster Identity (Identity, ID) value of the Cluster based on its MAC (Media Access Control) address, and set the TSF as an integer multiple of 512 TU.
2. Once the NAN device receives a Beacon frame (i.e., a sync Beacon, hereinafter, referred to as Beacon frame) sent by a NAN device from one or more other clusters, it may determine whether the NAN device wants to join the Cluster of the other peer.
In the Beacon frame, information of the corresponding Cluster is generally carried, and specifically, information of an AM in the corresponding Cluster may be specifically carried, and may include one or more of an Anchor Master node rank (AMR), a Master node rank (MR), a Master node priority (Master priority, MP), an Anchor Master node priority (AMP), a Random Factor (RF), an Anchor Master node signal Transmission Time (AMBTT), a Time Synchronization Function (TSF), a Cluster ID, and a Cluster rank (CG).
One NAN device may send information of the AM of the Cluster to which the NAN device belongs to other NAN devices by sending the Beacon frame, and similarly, one NAN device may also receive the Beacon frame sent by the Cluster or the NAN devices in other clusters.
After receiving a Beacon frame, the NAN device may determine whether the Beacon frame is from a NAN device in the Cluster to which the NAN device belongs or from NAN devices in other clusters, if the Beacon frame is from NAN devices in other clusters, the NAN device may determine whether a value of Cluster level CG in the received Beacon frame is greater than a value of Cluster level CG of the NAN device, if the value is greater than the value, the NAN device adds the Cluster corresponding to the received Beacon frame, otherwise, the NAN device does not perform processing. This completes the aggregation of NAN devices, i.e., NAN devices will join Cluster with a higher value of Cluster level CG.
3. If the determination is made that the other party's Cluster is to be added, the synchronization is achieved with the AM in the added Cluster after the other party's Cluster is added, specifically, each item of parameter information in the AM of the self is synchronized with the AM in the added Cluster, for example, the TSF of the AM in the Cluster is updated to the TSF of the AM in the added Cluster.
4. After synchronization, when a DW of a joined Cluster arrives, the NAN device sends an SDF (Service Discovery frame) message in the DW to perform Service Discovery, where the SDF message may carry, for example, Service Discovery (Service Subscription) information for querying a required Service or may carry, for example, Service publication (Service Publish) information for publishing a Service that the NAN device can provide, and after receiving the SDF message sent by the NAN device, other NAN devices may reply the SDF message to the NAN device in the DW if it is determined that the SDF message is satisfied, that is, Service matching can be performed.
Similarly, in the DW, the NAN device may also receive an SDF message sent by another NAN device for service discovery, and if the NAN device determines that the received SDF message is satisfied, the NAN device may also reply the SDF message to the corresponding NAN device in the DW.
Various types of information contained in the AM are explained below.
The anchor master node level AMR, which is generally a maximum value of 8 bytes (byte), is the MR value of AM.
The master node level MR, which generally takes a maximum value of 8 bytes, is calculated according to the MP value, the RF value, and the MAC address of the NAN device, and indicates the will of the NAN device to act as a master. The larger the value of MR, the higher will the NAN device want to be master. MR can also be considered as an alternative expression of MP.
The master node priority MP, which generally takes a maximum value of 1 byte, indicates the willingness of the NAN device to act as a master. The larger the value of MP, the higher will the NAN device want to be master.
The anchor master node priority AMP, which generally takes a maximum value of 1 byte, is the value of the MP of the AM.
The random factor RF, which generally takes a maximum value of 1 byte, is a random number selected by the NAN device.
The anchor master node signal transmission time AMBTT generally takes a maximum value of 4 bytes, and shows the sending time of the Beacon frame of the AM. Generally, a NAN device sending a Beacon frame carries an AMBTT, and is used for synchronizing the time of other NAN devices with an AM corresponding to the AMBTT.
The time synchronization function TSF, which generally takes a maximum value of 8 bytes, indicates a synchronization function of the NAN device, so that a timer (timer) of the NAN device receiving the TSF is synchronized with a time of the AM corresponding to the NAN device sending the TSF. The TSF may also represent time information.
The Cluster identity identifier Cluster ID generally takes a maximum value of 6 bytes, and is carried in an Address (Address) 3 field in the Beacon frame.
The Cluster level CG generally takes a maximum value of 8 bytes, represents the level of Cluster, is used for comparing different Clusters during combination, and the Cluster with a small CG value is combined into the Cluster with a large CG value.
The service discovery frame SDF message is introduced below.
The SDF message is an Action Frame (Action Frame) specially defined for service discovery, and can be roughly divided into three types according to different functions: the SDF issues a Publish message, subscribes to a Subscribe message, and replies to a Follow-Up message, and generally, an indication bit is included in the SDF message to indicate which SDF message the SDF message is.
SDF Publish message: the NAN equipment is used for publishing services which can be provided by the NAN equipment or replying to the received SDF Subscribe messages sent by other NAN equipment;
SDF Subscribe message: for finding the service to be used;
SDF Follow-Up message: for replying to received SDF Publish messages or for negotiating more information.
The following describes embodiments of the present application in detail.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application, where the data transmission method described in the embodiment includes:
the method includes the steps of S201, sending a first Service Discovery Frame (SDF) message to a plurality of second NAN devices in a first cluster, where the first SDF message includes a preset first corresponding relationship set, the first corresponding relationship set includes a plurality of first corresponding relationships, each first corresponding relationship includes a first corresponding relationship between each sub-data of a plurality of sub-data and a time window, the plurality of sub-data are sub-data divided according to target data, and the first cluster includes the first NAN device and the plurality of second NAN devices.
The first SDF message may specifically be an SDF Subscribe message.
S202, receiving a second SDF message from at least one second NAN device of the plurality of second NAN devices, where the second SDF message of each second NAN device of the at least one second NAN device includes feedback information for the first mapping set, where the feedback information is used to indicate that each second NAN device has a capability of supporting transmission of sub data of a target first mapping in a time window of the target first mapping, and the target first mapping is a first mapping in the plurality of first mapping.
The second SDF message may specifically be an SDF Publish message.
S203, determining second NAN devices associated with each first corresponding relationship in the first corresponding relationship set according to the feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relationship between each first corresponding relationship and the associated second NAN devices.
The second correspondence may be one-to-one, one-to-many, and many-to-many, and is not limited herein.
S204, the operation of obtaining the subdata is completed according to the established second corresponding relation.
It can be seen that the data transmission method and related products described in the embodiments of the present application, applied to a first neighbor aware network NAN, first send a first service discovery frame SDF message to a plurality of second NAN devices in a first cluster, second, receiving a second SDF message from at least one of the plurality of second NAN devices, the second SDF message of each of the at least one second NAN device comprises feedback information for the first set of correspondences, then, determining a second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relation between each first corresponding relation and the associated second NAN equipment, and finally, finishing the operation of obtaining the subdata according to the established second corresponding relation. Therefore, in the NAN network, the transmission data with large data volume is divided into a plurality of subdata, a time window is allocated, the opposite-end device is further allowed to assign the time window, and the local-end device allocates corresponding subdata to the plurality of devices at the opposite end in the assigned window according to the time window assigned by the opposite-end device, so that resources are utilized to the maximum, the data processing efficiency is improved, and the data transmission quality and the data transmission safety of the electronic device are improved.
In a possible example, the completing, according to the established second corresponding relationship, an operation of obtaining sub-data includes: determining a second corresponding relation of a target to which the current time window belongs; negotiating a data transmission channel with a second NAN device in the target second correspondence; instructing a second NAN device in the target second corresponding relation to transmit subdata in the target second corresponding relation; receiving the sub-data from the second NAN device through the negotiated data transmission channel.
In a specific implementation, for a channel between the first NAN device and other NAN devices, the negotiation process may be that the first NAN device performs channel negotiation with other NAN devices through an SDF Follow-Up message; for a channel between any two NAN devices other than the first NAN device, the other NAN devices may be first grouped by the first NAN device, and a target NAN device may be selected for each group, and notified to negotiate a channel with the other devices within the group.
In this example, in the NAN network, the corresponding second NAN is found through the time window, and the channel is further negotiated for data transmission, which is beneficial to improving the efficiency of processing data and improving the data transmission quality and security of the electronic device for data transmission.
In one possible example, the determining the second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each second NAN device of the at least one second NAN device comprises: analyzing the feedback information, and if a plurality of second NAN devices are associated with reference to a first corresponding relation in the first corresponding relation set, detecting the distances between the plurality of second NAN devices and the first NAN device associated with reference to the first corresponding relation to form a distance set; screening out a target distance smaller than a preset distance from the distance set; and determining a target second NAN device corresponding to the target distance.
The preset distance may be one meter, two meters, three meters, etc., and is not limited herein.
In this example, when a plurality of second NAN devices correspond to the same time window in the NAN network, the second NAN device with the shortest distance is selected by detecting the distance between each second NAN device and the first NAN device, so that a fast transmission channel can be obtained, and the efficiency of data transmission is improved.
In one possible example, before determining the target distance corresponding to the target second NAN device, the method further comprises: screening out a target distance smaller than a preset distance from the distance set; if a plurality of target distances exist, determining a plurality of second NAN devices corresponding to the plurality of target distances; and inquiring the ongoing transmission data volume of the plurality of second NAN devices, and screening out target second NAN devices with the transmission data volume lower than the preset transmission data volume.
The transmission data amount may be data in other networks, and is not limited to the data amount in the current NAN network.
In this example, when there are a plurality of second NAN devices with the shortest distance in the NAN network, the second NAN device with the smallest transmission data amount is found out by comparing the transmission data amounts between the plurality of second NAN devices to perform data transmission, so that a fast transmission channel can be obtained, and the efficiency of data transmission is improved.
In one possible example, prior to the sending the first service discovery frame, SDF, message to the plurality of second NAN devices in the first cluster, the method further comprises: dividing the target data into at least one subdata; performing priority sequencing on the at least one subdata to obtain a priority sequence; time division is carried out on the at least one subdata according to the priority sequence to obtain a time window of each subdata; and forming the first corresponding relation set according to the first corresponding relation between each subdata and the time window.
The prioritization may be, but is not limited to, based on memory size, based on importance, based on historical occurrence rate, etc., and is not limited herein.
In this example, in the NAN network, a plurality of small data volumes are obtained by disassembling the large data volume, and the first NAN device is assisted to complete processing of the AI large data, so that the efficiency of processing data is improved, and the data transmission quality and the security of data transmission performed by the electronic device are improved.
In one possible example, prior to the sending the first service discovery frame, SDF, message to the plurality of second NAN devices in the first cluster, the method further comprises: enabling a NAN function; and forming the first cluster with a plurality of second NAN devices through the NAN function, and completing synchronization of the NAN devices in the first cluster.
As can be seen, in this example, the first NAN device triggers the NAN function based on the request, and keeps the NAN function off in a normal state, thereby saving power.
In a possible example, after the obtaining operation of the sub data is completed according to the established second corresponding relationship, the method further includes: receiving transmission completion information, and detecting a buffer area in the mapping table, wherein the buffer area is used for representing data which is being transmitted; disconnecting the connection with the at least one second NAN device if the data being transmitted is absent from the buffer.
In this example, in the NAN network, whether there is data that is not transmitted currently is determined by detecting the buffer area, so that a situation of data loss caused by closing a transmission channel in advance is avoided, and data transmission quality and integrity of data transmission performed by the electronic device are improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of a data transmission method according to an embodiment of the present application, and the data transmission method is applied to a first neighbor aware network NAN device. As shown in the figure, the data transmission method includes:
s301, sending a first service discovery frame, SDF, message to a plurality of second NAN devices in the first cluster.
S302, receiving a second SDF message from at least one of the plurality of second NAN devices.
S303, determining, according to the feedback information of each second NAN device in the at least one second NAN device, a second NAN device associated with each first corresponding relationship in the first corresponding relationship set, and establishing a second corresponding relationship between each first corresponding relationship and the associated second NAN device.
S304, determining a second corresponding relation of the target to which the current time window belongs.
S305, negotiating a data transmission channel with a second NAN device in the target second correspondence.
And S306, indicating the second NAN equipment in the target second corresponding relation to transmit the subdata in the target second corresponding relation.
S307, receiving the sub data from the second NAN device through the negotiated data transmission channel.
It can be seen that the data transmission method and related products described in the embodiments of the present application, applied to a first neighbor aware network NAN, first send a first service discovery frame SDF message to a plurality of second NAN devices in a first cluster, second, receiving a second SDF message from at least one of the plurality of second NAN devices, the second SDF message of each of the at least one second NAN device comprises feedback information for the first set of correspondences, then, determining a second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relation between each first corresponding relation and the associated second NAN equipment, and finally, finishing the operation of obtaining the subdata according to the established second corresponding relation. Therefore, in the NAN network, the transmission data with large data volume is divided into a plurality of subdata, a time window is allocated, the opposite-end device is further allowed to assign the time window, and the local-end device allocates corresponding subdata to the plurality of devices at the opposite end in the assigned window according to the time window assigned by the opposite-end device, so that resources are utilized to the maximum, the data processing efficiency is improved, and the data transmission quality and the data transmission safety of the electronic device are improved.
In addition, in the NAN network, the corresponding second NAN is found through the time window, and further the channel is negotiated to perform data transmission, so that the efficiency of processing data is improved, and the data transmission quality and the security of data transmission performed by the electronic device are improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a data transmission method provided in an embodiment of the present application, and the data transmission method is applied to a first neighbor aware network NAN device, consistent with the embodiment shown in fig. 2. As shown in the figure, the data transmission method includes:
s401, a first service discovery frame SDF message is sent to a plurality of second NAN devices in a first cluster.
S402, receiving a second SDF message from at least one of the plurality of second NAN devices.
S403, analyzing the feedback information, and if a plurality of second NAN devices are associated with reference to a first correspondence in the first correspondence set, detecting distances between the plurality of second NAN devices and the first NAN device associated with reference to the first correspondence, to form a distance set.
S404, screening out a target distance smaller than a preset distance from the distance set.
And S405, determining a target second NAN device corresponding to the target distance.
S406, determining a second target corresponding relation to which the current time window belongs.
S407, negotiating a data transmission channel with the second NAN device in the target second correspondence.
S408, instructing a second NAN device in the target second mapping to transmit the sub-data in the target second mapping.
S409, receiving the sub data from the second NAN device through the negotiated data transmission channel.
It can be seen that the data transmission method and related products described in the embodiments of the present application, applied to a first neighbor aware network NAN, first send a first service discovery frame SDF message to a plurality of second NAN devices in a first cluster, second, receiving a second SDF message from at least one of the plurality of second NAN devices, the second SDF message of each of the at least one second NAN device comprises feedback information for the first set of correspondences, then, determining a second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relation between each first corresponding relation and the associated second NAN equipment, and finally, finishing the operation of obtaining the subdata according to the established second corresponding relation. Therefore, in the NAN network, the transmission data with large data volume is divided into a plurality of subdata, a time window is allocated, the opposite-end device is further allowed to assign the time window, and the local-end device allocates corresponding subdata to the plurality of devices at the opposite end in the assigned window according to the time window assigned by the opposite-end device, so that resources are utilized to the maximum, the data processing efficiency is improved, and the data transmission quality and the data transmission safety of the electronic device are improved.
In addition, in the NAN network, when a plurality of second NAN devices correspond to the same time window, the shortest distance is selected as the second NAN device by detecting the distance between each second NAN device and the first NAN device, so that a fast transmission channel can be obtained, and the efficiency of data transmission is improved.
In accordance with the embodiments shown in fig. 2, fig. 3, and fig. 4, please refer to fig. 5, and fig. 5 is a schematic structural diagram of an electronic device 500 according to an embodiment of the present application, as shown in the figure, the electronic device 500 includes an application processor 510, a memory 520, acommunication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and the one or more programs 521 include instructions for performing the following steps;
sending a first Service Discovery Frame (SDF) message to a plurality of second NAN devices in a first cluster, wherein the first SDF message includes a preset first corresponding relationship set, the first corresponding relationship set includes a plurality of first corresponding relationships, each first corresponding relationship includes a first corresponding relationship between each subdata of a plurality of subdata and a time window, the subdata are divided according to target data, and the first cluster includes the first NAN device and the second NAN devices;
receiving a second SDF message from at least one of the plurality of second NAN devices, the second SDF message of each of the at least one second NAN device including feedback information for the set of first correspondences, the feedback information being indicative of each second NAN device having a capability to support transmission of sub-data of a target first correspondence at a time window of the target first correspondence, the target first correspondence being a first correspondence of the plurality of first correspondences;
determining second NAN devices associated with each first corresponding relationship in the first corresponding relationship set according to feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relationship between each first corresponding relationship and the associated second NAN devices;
and finishing the operation of obtaining the subdata according to the established second corresponding relation.
It can be seen that the data transmission method and related products described in the embodiments of the present application, applied to a first neighbor aware network NAN, first send a first service discovery frame SDF message to a plurality of second NAN devices in a first cluster, second, receiving a second SDF message from at least one of the plurality of second NAN devices, the second SDF message of each of the at least one second NAN device comprises feedback information for the first set of correspondences, then, determining a second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relation between each first corresponding relation and the associated second NAN equipment, and finally, finishing the operation of obtaining the subdata according to the established second corresponding relation. Therefore, in the NAN network, the transmission data with large data volume is divided into a plurality of subdata, a time window is allocated, the opposite-end device is further allowed to assign the time window, and the local-end device allocates corresponding subdata to the plurality of devices at the opposite end in the assigned window according to the time window assigned by the opposite-end device, so that resources are utilized to the maximum, the data processing efficiency is improved, and the data transmission quality and the data transmission safety of the electronic device are improved.
In one possible example, in terms of the operation of obtaining the sub data according to the established second correspondence, the program includes instructions for performing the following steps: determining a second corresponding relation of a target to which the current time window belongs; negotiating a data transmission channel with a second NAN device in the target second correspondence; instructing a second NAN device in the target second corresponding relation to transmit subdata in the target second corresponding relation; receiving the sub-data from the second NAN device through the negotiated data transmission channel.
In one possible example, in the determining the second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each of the at least one second NAN device, the program comprises instructions for: analyzing the feedback information, and if a plurality of second NAN devices are associated with reference to a first corresponding relation in the first corresponding relation set, detecting the distances between the plurality of second NAN devices and the first NAN device associated with reference to the first corresponding relation to form a distance set; screening out a target distance smaller than a preset distance from the distance set; and determining a target second NAN device corresponding to the target distance.
In one possible example, in a preceding aspect of the determining the target distance corresponding to the target second NAN device, the program comprises instructions to: screening out a target distance smaller than a preset distance from the distance set; if a plurality of target distances exist, determining a plurality of second NAN devices corresponding to the plurality of target distances; and inquiring the ongoing transmission data volume of the plurality of second NAN devices, and screening out target second NAN devices with the transmission data volume lower than the preset transmission data volume.
In one possible example, prior to the sending the first service discovery frame, SDF, message to the plurality of second NAN devices in the first cluster, the program further comprises instructions for: dividing the target data into at least one subdata; performing priority sequencing on the at least one subdata to obtain a priority sequence; time division is carried out on the at least one subdata according to the priority sequence to obtain a time window of each subdata; and forming the first corresponding relation set according to the first corresponding relation between each subdata and the time window.
In one possible example, prior to the sending the first service discovery frame, SDF, message to the plurality of second NAN devices in the first cluster, the program includes instructions further to: enabling a NAN function; and forming the first cluster with a plurality of second NAN devices through the NAN function, and completing synchronization of the NAN devices in the first cluster.
The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
The following is an embodiment of the apparatus of the present invention, which is used to perform the method implemented by the embodiment of the method of the present invention. The datatransmission generating apparatus 600 shown in fig. 6 is applied to a first neighbor aware network NAN device, and the datatransmission generating apparatus 600 includes a sendingunit 601, a receivingunit 602, an establishingunit 603, and an obtainingunit 604, wherein,
the sendingunit 601 is configured to send a first service discovery frame SDF message to a plurality of second NAN devices in a first cluster, where the first SDF message includes a preset first mapping relationship set, the first mapping relationship set includes a plurality of first mapping relationships, each first mapping relationship includes a first mapping relationship between each sub-data of a plurality of sub-data and a time window, the plurality of sub-data are sub-data divided according to target data, and the first cluster includes the first NAN device and the plurality of second NAN devices;
the receivingunit 602 is configured to receive a second SDF message from at least one second NAN device of the plurality of second NAN devices, where the second SDF message of each of the at least one second NAN device includes feedback information for the first set of correspondences, where the feedback information is used to indicate that each second NAN device has a capability of supporting transmission of sub-data of a target first corresponding relation in a time window of the target first corresponding relation, and the target first corresponding relation is a first corresponding relation of the plurality of first corresponding relations;
the establishingunit 603 is configured to determine, according to the feedback information of each second NAN device in the at least one second NAN device, a second NAN device associated with each first corresponding relationship in the first corresponding relationship set, and establish a second corresponding relationship between each first corresponding relationship and the associated second NAN device;
the obtainingunit 604 is configured to complete obtaining operation of the sub data according to the established second corresponding relationship.
It can be seen that the data transmission method and related products described in the embodiments of the present application, applied to a first neighbor aware network NAN, first send a first service discovery frame SDF message to a plurality of second NAN devices in a first cluster, second, receiving a second SDF message from at least one of the plurality of second NAN devices, the second SDF message of each of the at least one second NAN device comprises feedback information for the first set of correspondences, then, determining a second NAN device associated with each first correspondence in the first set of correspondences according to the feedback information of each second NAN device in the at least one second NAN device, and establishing a second corresponding relation between each first corresponding relation and the associated second NAN equipment, and finally, finishing the operation of obtaining the subdata according to the established second corresponding relation. Therefore, in the NAN network, the transmission data with large data volume is divided into a plurality of subdata, a time window is allocated, the opposite-end device is further allowed to assign the time window, and the local-end device allocates corresponding subdata to the plurality of devices at the opposite end in the assigned window according to the time window assigned by the opposite-end device, so that resources are utilized to the maximum, the data processing efficiency is improved, and the data transmission quality and the data transmission safety of the electronic device are improved.
In a possible example, in terms of the operation of obtaining the sub data according to the established second corresponding relationship, the obtainingunit 604 is specifically configured to: determining a second corresponding relation of a target to which the current time window belongs; negotiating a data transmission channel with a second NAN device in the target second correspondence; instructing a second NAN device in the target second corresponding relation to transmit subdata in the target second corresponding relation; receiving the sub-data from the second NAN device through the negotiated data transmission channel.
In a possible example, in the aspect that the second NAN device associated with each first correspondence in the first set of correspondences is determined according to the feedback information of each second NAN device in the at least one second NAN device, the establishingunit 603 is specifically configured to: analyzing the feedback information, and if a plurality of second NAN devices are associated with reference to a first corresponding relation in the first corresponding relation set, detecting the distances between the plurality of second NAN devices and the first NAN device associated with reference to the first corresponding relation to form a distance set; screening out a target distance smaller than a preset distance from the distance set; and determining a target second NAN device corresponding to the target distance.
In a possible example, before the determining of the target second NAN device corresponding to the target distance, the establishingunit 603 is further specifically configured to: screening out a target distance smaller than a preset distance from the distance set; if a plurality of target distances exist, determining a plurality of second NAN devices corresponding to the plurality of target distances; and inquiring the ongoing transmission data volume of the plurality of second NAN devices, and screening out target second NAN devices with the transmission data volume lower than the preset transmission data volume.
In a possible example, before the sending the first service discovery frame SDF message to the plurality of second NAN devices in the first cluster, the establishingunit 603 is further specifically configured to: dividing the target data into at least one subdata; performing priority sequencing on the at least one subdata to obtain a priority sequence; time division is carried out on the at least one subdata according to the priority sequence to obtain a time window of each subdata; and forming the first corresponding relation set according to the first corresponding relation between each subdata and the time window.
In one possible example, before sending the first service discovery frame SDF message to the plurality of second NAN devices in the first cluster, the sendingunit 601 is further specifically configured to: enabling a NAN function; and forming the first cluster with a plurality of second NAN devices through the NAN function, and completing synchronization of the NAN devices in the first cluster.
As shown in fig. 7, for convenience of description, only the portions related to the embodiments of the present application are shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a point of sale (POS), a vehicle-mounted computer, and the like.
Fig. 7 is a block diagram illustrating a partial structure of an electronic device provided in an embodiment of the present invention. As shown in fig. 7, theelectronic device 710 may include control circuitry, which may include storage andprocessing circuitry 720. The storage andprocessing circuit 720 may be a memory, such as a hard disk drive memory, a non-volatile memory (e.g., a flash memory or other electronically programmable read only memory used to form a solid state drive, etc.), a volatile memory (e.g., a static or dynamic random access memory, etc.), etc., and the embodiments of the present application are not limited thereto. Processing circuitry in the storage andprocessing circuitry 720 may be used to control the operation of theelectronic device 710. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage andprocessing circuit 720 may be used to run software in theelectronic device 710, such as an internet browsing application, a Voice Over Internet Protocol (VOIP) phone call application, an email application, a media playing application, operating system functions, and so forth. Such software may be used to perform control operations such as, for example, camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality implemented based on a status indicator such as a status indicator light of a light emitting diode, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) displays, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in theelectronic device 710, to name a few.
Theelectronic device 710 may also include input-output circuitry 730. The input-output circuitry 730 may be used to enable theelectronic device 710 to input and output data, i.e., to allow theelectronic device 710 to receive data from external devices and also to allow theelectronic device 710 to output data from theelectronic device 710 to external devices. The input-output circuit 730 may further include asensor 731. Thesensors 731 may include ambient light sensors, proximity sensors based on light and capacitance, touch sensors (e.g., based on optical touch sensors and/or capacitive touch sensors, ultrasonic sensors, where the touch sensors may be part of a touch display screen or used independently as a touch sensor structure), acceleration sensors, and other sensors, etc.
Input-output circuitry 730 may also include one or more displays, such asdisplay 732.Display 732 may include one or a combination of liquid crystal displays, organic light emitting diode displays, electronic ink displays, plasma displays, displays using other display technologies.Display 732 may include an array of touch sensors (i.e.,display 732 may be a touch-sensitive display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
Theelectronic device 710 may also include anaudio component 733. Theaudio component 733 may be used to provide audio input and output functionality for theelectronic device 710. Theaudio components 733 in theelectronic device 710 may include speakers, microphones, buzzers, tone generators, and other components for generating and detecting sound.
Communication circuitry 734 may be used to provideelectronic device 710 with the ability to communicate with external devices. Thecommunication circuitry 734 may include analog and digital input-output interface circuits, and wireless communication circuitry based on radio frequency signals and/or optical signals. The wireless communication circuitry incommunication circuitry 734 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless communication circuitry incommunication circuitry 734 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving near field coupled electromagnetic signals. For example,communications circuitry 734 may include a near field communications antenna and a near field communications transceiver. Thecommunications circuitry 734 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuit and antenna, and so forth.
Theelectronic device 710 may further include a battery, power management circuitry, and other input-output units 735. The input-output unit 735 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, and the like.
A user may input commands through the input-output circuitry 730 to control the operation of theelectronic device 710, and may use the output data of the input-output circuitry 730 to enable receipt of status information and other outputs from theelectronic device 710.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the data transmission methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the data transmission methods as recited in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.