Method and electronic device for determining transmission delay
By carrying transmission time information in wirelessly transmitted beacon frames, electronic devices can quickly and accurately calculate the transmission delay, solve the problem of unknown transmission delay, reduce signaling overhead and delay, and meet high delay requirements.
Patent Information
- Application Number
- CN202011095023.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-13
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-10-13
AI Technical Summary
During the wireless transmission process, electronic devices cannot accurately determine the transmission delay, which results in the inability to meet the data transmission requirements with high latency requirements. Existing methods require additional signaling or dedicated channel detection, which increases overhead and delay.
By carrying the transmission time information in the device discovery beacon frame, synchronization beacon frame or service discovery frame, the receiving end electronic device can calculate the transmission delay based on the reception time and transmission time information, avoiding the overhead of additional signaling and dedicated channel detection. .
It achieves rapid and accurate determination of transmission delay, reduces signaling overhead and delay, meets data transmission delay requirements, and improves resource utilization.
Smart Images

Figure CN114363943B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and more particularly to a method and electronic device for determining a transmission delay in the field of communications. Background Art
[0002] In wireless-fidelity (WIFI) awareness, electronic devices can discover each other, establish connections after discovering each other, and use the established connections to transmit data. However, during the data transmission process, the electronic devices do not know the transmission delay between the two electronic devices, which may result in failure to meet the transmission requirements. For example, if the data delay requirement is high, if the transmission delay between the two electronic devices is large, the transmission requirements will not be met. Therefore, a method for determining the transmission delay is urgently needed. Summary of the invention
[0003] Embodiments of the present application provide a method and electronic device for determining a transmission delay.
[0004] In a first aspect, a method for determining transmission delay is provided, and the method can be performed by a first electronic device, and the first electronic device can be a device capable of supporting the first electronic device to implement the functions required by the method, such as a chip system. The method includes: the first electronic device receives a first frame sent by a second electronic device at a first moment, and a first field in the first frame carries first sending time information of the second electronic device sending the first frame, and the first frame is a device discovery beacon frame or a synchronization beacon frame or a service discovery frame of a proximity awareness network NAN;
[0005] The first electronic device determines a first transmission delay between the first electronic device and the second electronic device according to the first moment and the first sending time information.
[0006] In the above technical solution, the first frame sent by the second electronic device can carry the sending time information of sending the first frame, and the first frame is a device discovery beacon frame for discovering devices in WIFI Aware, or a synchronization beacon frame for synchronization, or a service discovery frame for discovering services. After the first electronic device receives the first frame, it can determine the first transmission delay between the first electronic device and the second electronic device according to the sending time information of the first frame and the first moment of receiving the first frame, thereby providing a method for determining the transmission delay. Avoid the overhead caused by the need to use special signaling or special channels to detect the delay. In addition, if the duration of the transmission delay determined by using special signaling or special channels is long, if the device discovery beacon frame or synchronization beacon frame or service discovery frame provided in the embodiment of the present application carries the sending time information of sending these frames, the duration of the determined transmission delay can be reduced.
[0007] It should be noted that the device discovery beacon frame, synchronization beacon frame, or service discovery frame mentioned in the embodiments of the present application refers to the type of frame, not a specific frame.
[0008] Optionally, the second electronic device may be a master device in the NAN set, and the second electronic device may send a device discovery beacon frame or send a synchronization beacon frame or send a service discovery frame. Optionally, the second electronic device may be a non-master device in the NAN set and the second electronic device is in a synchronization state, and the second electronic device may send a synchronization beacon frame or a service discovery frame. Optionally, the second electronic device may be a non-master device in the NAN set and the second electronic device is in an asynchronous state, and the second electronic device may send a service discovery frame.
[0009] Among them, the device discovery frame is used by the master device in the NAN set to discover devices, the synchronization beacon frame is used for unsynchronized devices to synchronize with synchronized devices in the NAN set, and the service discovery frame is used for unsynchronized devices or synchronized devices in the NAN set to exchange capabilities.
[0010] Optionally, if the second electronic device that sends the first frame is a master device in the NAN set, the first electronic device may be a non-master device in the NAN set or a device that does not belong to the NAN set. If the second electronic device that sends the first frame is a non-master device in the NAN set, the first electronic device may be a master device or a non-master device in the NAN set or a device that does not belong to the NAN set. If the second electronic device that sends the first frame does not belong to the NAN set, the first electronic device may be any device in the NAN set or a device that does not belong to the NAN set, and at this time, the first electronic device and the second electronic device may form a new NAN set.
[0011] It can be understood that the device discovery beacon frame can be replaced by a discovery beacon frame.
[0012] In some possible implementations, the first field is a first reserved field of the NAN attribute field of the first frame.
[0013] In the above solution, the first field is the first reserved field of the NAN attribute field of the first frame, which can improve resource utilization and avoid the need for additional signaling to indicate the first sending time information of the first frame.
[0014] In some possible implementations, the first field includes a first attribute field, a first length field and a sending time field, the bits carried by the first attribute field are used to indicate that the first field is used to carry the first sending time information, the bits carried by the first length field are used to indicate the length occupied by the sending time field, and the bits carried by the sending time field are used to indicate the sending time when the second electronic device sends the first frame.
[0015] Optionally, the first sending time information is used to indicate the sending time when the second electronic device sends the first frame and the length of the sending time domain that carries the sending time.
[0016] Optionally, the positional relationship among the first attribute field, the first length field, and the sending time field is not restricted.
[0017] In some possible implementations, if the first electronic device is not synchronized with the second electronic device;
[0018] The first electronic device determines a first transmission delay between the first electronic device and the second electronic device according to the first moment and the first time information, including:
[0019] The first electronic device determines, according to the first moment and the first time information, a second transmission delay between the first electronic device and the second electronic device;
[0020] After the first electronic device is synchronized with the second electronic device, the first electronic device calibrates the second transmission delay according to clock information calibrated during the synchronization process to obtain the first transmission delay.
[0021] In the above solution, if the first electronic device is not synchronized with the second electronic device, the second transmission delay information obtained needs to be calibrated using the calibrated clock information in the synchronization process, so that a relatively accurate first transmission delay can be obtained.
[0022] In some possible implementations, the method also includes: the first electronic device sends a second frame to a third electronic device, the second field in the second frame carries the first transmission delay, and the second frame is a synchronization beacon frame or a service discovery frame of a proximity awareness network NAN.
[0023] In the above scheme, the third electronic device can determine the first transmission delay between the first electronic device and the second electronic device based on the first transmission delay carried in the second frame sent by the first electronic device. If the third electronic device needs to send data to the second electronic device through the first electronic device, the third electronic device can determine whether the first transmission delay meets the transmission requirements of the data to be transmitted based on the first transmission delay.
[0024] Optionally, the third electronic device can send the first transmission delay between the first electronic device and the second electronic device to the next electronic device, such as the main electronic device in the NAN set. In this way, the main device in the NAN set can send the transmission delay sent by multiple electronic devices to each electronic device in the NAN set. In this way, when each electronic device in the NAN set has the need to transmit data, it can determine whether the data on the path meets the data transmission delay based on each transmission delay.
[0025] Optionally, if the first electronic device can send a synchronization beacon frame or a service discovery frame to a master electronic device in the NAN set, the first electronic device can carry the first transmission delay in the synchronization beacon frame or the service discovery frame and send it to the master electronic device.
[0026] Optionally, the first electronic device may be a master electronic device in the NAN set, and the first electronic device may send the determined first transmission delay to each electronic device in the NAN set.
[0027] Optionally, the third electronic device and the second electronic device may be the same device or a different device.
[0028] In some possible implementations, the second field is a second reserved field of the NAN attribute field of the second frame.
[0029] In some possible implementations, the second field includes a second attribute field, a second length field and a transmission delay field, the bits carried by the second attribute field are used to indicate that the second field is used to carry the first transmission delay, the bits carried by the second length field are used to indicate the length occupied by the transmission delay field, and the bits carried by the transmission delay field are used to indicate the first transmission delay.
[0030] In the above solution, the second field is the second reserved field of the NAN attribute field of the second frame, which can improve resource utilization and avoid the need for additional signaling to indicate the first transmission delay.
[0031] In some possible implementations, the method also includes: the first electronic device sends a third frame to a fourth electronic device, the third field in the third frame carries second sending time information of the first electronic device sending the third frame, and the second sending time information is used by the fourth electronic device to determine a third transmission delay between the fourth electronic device and the first electronic device.
[0032] Optionally, the third frame is a service discovery frame or a synchronization beacon frame or a device discovery beacon frame. Optionally, the third field is a reserved field of an attribute field in the third frame, which is a service discovery frame or a synchronization beacon frame or a device discovery beacon frame.
[0033] In the above scheme, the first electronic device can receive the first frame sent by the second electronic device, carrying the first sending time information of sending the first frame, and the first electronic device determines the first transmission delay between the first electronic device and the second electronic device based on the first sending time information and the first moment of receiving the first frame. The first electronic device can also send a third frame to the fourth electronic device, and the third field in the third frame can carry the second sending time when the first electronic device sends the third frame. In this way, the fourth electronic device can determine the third transmission delay between the fourth electronic device and the first electronic device based on the second sending time and the moment of receiving the third frame.
[0034] In a second aspect, a method for determining transmission delay is provided, including: a second electronic device sends a first frame to a first electronic device, a first field in the first frame carries first sending time information of the second electronic device sending the first frame, the first frame is a device discovery beacon frame or a synchronization beacon frame or a service discovery frame of a proximity awareness network NAN, and the first sending time information is used by the first electronic device to determine a first transmission delay between the first electronic device and the second electronic device.
[0035] In some possible implementations, the first field is a first reserved field of the NAN attribute field of the first frame.
[0036] In some possible implementations, the first field includes a first attribute field, a first length field and a sending time field, the bits carried by the first attribute field are used to indicate that the first field is used to carry the first sending time information, the bits carried by the first length field are used to indicate the length occupied by the sending time field, and the bits carried by the sending time field are used to indicate the sending time when the second electronic device sends the first frame.
[0037] In some possible implementations, the method also includes: the second electronic device receives a second frame sent by the first electronic device, the second field in the second frame carries the first transmission delay, and the second frame is a device synchronization beacon frame or a service discovery frame of a proximity awareness network NAN.
[0038] In some possible implementations, the second field is a second reserved field of the NAN attribute field of the second frame.
[0039] In some possible implementations, the second field includes a second attribute field, a second length field and a transmission delay field, the bits carried by the second attribute field are used to indicate that the second field is used to carry the first transmission delay, the bits carried by the second length field are used to indicate the length occupied by the transmission delay field, and the bits carried by the transmission delay field are used to indicate the first transmission delay.
[0040] In a third aspect, a method for determining transmission delay is provided, including: a third electronic device receives a second frame of a first electronic device, a second field in the second frame carries the first transmission delay, and the second frame is a synchronization beacon frame or a service discovery frame of a proximity awareness network NAN.
[0041] In some possible implementations, the second field is a second reserved field of the NAN attribute field of the second frame.
[0042] In some possible implementations, the second field includes a second attribute field, a second length field and a transmission delay field, the bits carried by the second attribute field are used to indicate that the second field is used to carry the first transmission delay, the bits carried by the second length field are used to indicate the length occupied by the transmission delay field, and the bits carried by the transmission delay field are used to indicate the first transmission delay.
[0043] In a fourth aspect, the present application provides a device, which is included in an electronic device, and the device has the function of realizing the above-mentioned aspects and the behavior of the electronic device in the possible implementation methods of the above-mentioned aspects. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a display module or unit, a detection module or unit, a processing module or unit, etc.
[0044] Optionally, the device may be the first electronic device or the second electronic device or the third electronic device or the fourth electronic device mentioned above.
[0045] In a fifth aspect, the present application provides an electronic device, comprising: one or more processors; a memory; a plurality of applications; and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the method for determining the transmission delay in any possible implementation of any of the above aspects.
[0046] Optionally, the electronic device may further include: a touch display screen and / or a camera, wherein the touch display screen includes a touch-sensitive surface and a display;
[0047] Optionally, the electronic device may be the first electronic device or the second electronic device or the third electronic device or the fourth electronic device mentioned above.
[0048] In a sixth aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method for determining the transmission delay in any possible implementation of any of the above aspects.
[0049] In a seventh aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute any possible method for determining a transmission delay in any of the above aspects.
[0050] In an eighth aspect, the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes any possible method for determining transmission delay in any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a schematic diagram of the NAN set provided in an embodiment of the present application.
[0052] Figure 2 It is a schematic diagram of the WiFi Aware process provided by an embodiment of the present application.
[0053] Figure 3 It is a schematic diagram of the WiFi Aware process sending frames provided in an embodiment of the present application.
[0054] Figure 4 It is a schematic diagram of a method for determining transmission delay provided in an embodiment of the present application.
[0055] Figure 5 and Figure 6 It is a schematic diagram of a sending frame provided in an embodiment of the present application.
[0056] Figure 7 It is a schematic diagram of an application scenario provided in an embodiment of the present application.
[0057] Figure 8 It is a schematic diagram of another method for determining transmission delay provided in an embodiment of the present application.
[0058] Fig. 9 and Fig.10 It is a schematic diagram of a sending frame provided in an embodiment of the present application.
[0059] Fig.11 This is another schematic diagram of a method for determining transmission delay provided in an embodiment of the present application.
[0060] Fig.12 and Fig.13 It is a schematic diagram of a sending frame provided in an embodiment of the present application.
[0061] Fig.14 It is a schematic diagram of a device for determining transmission delay provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0063] It should be understood that the methods, situations, categories and divisions of the embodiments in the present application are only for the convenience of description and should not constitute special limitations. The features of various methods, categories, situations and embodiments can be combined without contradiction.
[0064] It should also be understood that the "first", "second" and "third" in the embodiments of the present application are only for distinction and should not constitute any limitation to the present application. It should also be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0065] like Figure 1 As shown, NAN devices can use WiFi Aware technology to perceive surrounding NAN devices and the services supported by surrounding NAN devices in advance before establishing a connection, so that multiple NAN devices can be associated to form a NAN set, and all NAN devices in the NAN set use the same parameter set. There is a master NAN device and non-master NAN devices in the NAN set. A NAN device can belong to different NAN sets. WiFi Aware is also called neighbor awareness networking (NAN). The process of WiFi devices sensing through WiFi Aware technology will send fewer messages and consume less power. For example, in the scenario of media resource sharing, WiFi devices can discover surrounding WiFi devices through WiFi Aware technology, so that media resources can be shared.
[0066] The NAN devices mentioned in the embodiments of the present application may also be referred to as terminal devices, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. that support WiFi. The terminal devices in the embodiments of the present application may be mobile phones, tablet computers (Pad), computers with wireless transceiver functions, and may also be wireless terminals used in scenarios such as virtual reality (VR), augmented reality (AR), industrial control, self driving, remote medical, smart grid, transportation safety, smart city, and smart home. In this application, the aforementioned terminal devices and chips that can be applied to the aforementioned terminal devices are collectively referred to as terminal devices. It should be understood that the embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal devices. The above Figure 1 The master NAN device may be determined by interaction information between multiple NAN devices.
[0067] like Figure 2 As shown in FIG. 1 , the process of WiFi Aware provided by an embodiment of the present application is shown. It is mainly divided into three processes: device discovery process, synchronization process and service discovery process. All NAN devices in the NAN set use the same transmission parameter set, for example, the transmission parameter set includes the length of the discovery window (DW), the interval between DWs, the frame interval, NAN channel resources, etc. In the device discovery process, such as Figure 2 The NAN set shown includes NAN device 1, NAN device 2, NAN device 3 and NAN device 4. Among them, any electronic device among NAN device 2, NAN device 3 and NAN device 4 as a master NAN device can periodically send the following information outside the DW: Figure 3The discovery beacon frame shown in the figure is also called the device discovery beacon frame. If NAN device 1 receives the discovery beacon frame, it can respond to the main NAN device, so that NAN device 1 will be discovered. At this time, it is called NAN device 1 joining the NAN set. At the same time, the discovery beacon frame can include the transmission parameter set of the NAN set, so that the NAN devices in the NAN set can share the transmission parameter set. It is possible that some NAN devices in the NAN set have completed synchronization and are in a synchronized state, while some NAN devices have not yet completed synchronization and are in an unsynchronized state. NAN devices in the NAN set that are in a synchronized state can be in the following state: Figure 3 A synchronization beacon frame is sent in the discovery window shown. The synchronization beacon frame can carry clock information and received signal strength indication (RSSI) threshold value, so that other unsynchronized NAN devices in the NAN set can determine whether to synchronize with the NAN device that sent the synchronization beacon frame using clock information according to the RRSI threshold value received in the synchronization beacon frame, so as to complete the synchronization with the NAN devices in the NAN set. Of course, the NAN devices in the NAN set that are in a synchronized state can also receive the synchronization beacon frame. Whether it is a NAN device in a synchronized state or a NAN device in an unsynchronized state, it can send a service discovery frame in the discovery window. The service discovery frame is used to carry the capabilities supported by the NAN device, so that capabilities can be exchanged between NAN devices for subsequent communication.
[0068] Any two NAN devices in the NAN set can communicate after synchronization. Before communication, the two NAN devices need to determine the transmission delay between the two NAN devices. The NAN device determines whether the transmission delay meets the transmission requirements. If it does, it sends data. If it does not, it can select other data links that meet the transmission delay to send data. In one possible implementation, the two NAN devices need to add interactive signaling based on the Wifi Aware protocol. Using the newly added interactive signaling, the NAN devices use the newly added interactive signaling to determine the transmission delay between the two NAN devices. This method requires additional signaling, which will increase the signaling overhead and increase the duration of detecting the transmission delay, thereby causing the transmission performance to deteriorate. In another possible implementation, after synchronization, the two NAN devices can establish a dedicated channel to detect the delay. This method of establishing a dedicated channel to detect the delay will increase the duration of determining the transmission delay, and the overhead is large.
[0069] The electronic device mentioned in the embodiments of the present application may be a NAN device. In other words, the electronic device mentioned in the embodiments of the present application may be replaced by a NAN device.
[0070] In view of the above problems, in an embodiment of the present application, two electronic devices can use the electronic device that sends discovery beacon frames or synchronization beacon frames or service discovery frames to carry the sending time information of sending these frames. The electronic device serving as the receiving end can determine the transmission delay between the two electronic devices based on the time when these frames are received and the sending time information carried in these frames.
[0071] The following describes a method for determining transmission delay in an embodiment of the present application in conjunction with the accompanying drawings.
[0072] like Figure 4 As shown, a method 400 for determining transmission delay provided in an embodiment of the present application is shown. The method 400 includes:
[0073] S410, the second electronic device sends a discovery beacon frame between DWs, field 1 of the discovery beacon frame carries the sending time information 1 of the second electronic device sending the discovery beacon frame, and the first electronic device receives the discovery beacon frame at time 1. At this time, the first electronic device can discover the NAN set to which the second electronic device belongs.
[0074] Optionally, the discovery beacon frame may include parameters such as the interval between DWs corresponding to the NAN set to which the second electronic device belongs, the length of the DW, and the channel resources occupied by the electronic devices in the NAN set for transmitting data.
[0075] Exemplarily, the second electronic device may be a master device in the NAN set.
[0076] Optionally, the format of the discovery beacon frame is the 802.11Beacon frame format, as shown in Table 1. Table 1 shows the fields included in the discovery beacon frame, the length of each field, the value of each field, and the meaning represented by each field.
[0077] Table 1
[0078]
[0079]
[0080] Among them, different values of the NAN Attributes field in Table 1 above represent different meanings, as shown in Table 2. Field 1 in method 400 may be a reserved field of the NAN attribute, and the reserved field with the value of Attribute ID of 14-220 or 222-255 in Table 2 may carry the sending time information 1 of sending the discovery beacon frame. The exemplary reserved field of 14-220 or 222-255 may be the aforementioned first reserved field.
[0081] As shown in Table 2, the synchronization beacon frame corresponds to the third column of Table 2, the discovery beacon frame corresponds to the fourth column of Table 2, and the service discovery frame (SDF) corresponds to the fifth column of Table 2. YES / M in Table 2 means that the corresponding attribute ID is mandatory, and YSE / O means that the corresponding attribute ID is optional. NA means that the corresponding attribute ID is optional. NO means that the corresponding attribute ID does not exist.
[0082] Optionally, as shown in Table 3, field 1 may include an attribute field, a length field, and a transmission time field, the bits carried by the attribute field are used to indicate that field 1 is used to carry transmission time information 1, the bits carried by the length field are used to indicate the length occupied by the transmission time field, and the bits carried by the transmission time field are used to indicate the transmission time of the discovery beacon frame. Exemplarily, the attribute field of Table 3 may be the aforementioned first attribute field, and the length field may be the aforementioned first length field.
[0083] Table 2
[0084]
[0085]
[0086] Table 3
[0087]
[0088] S420: The first electronic device determines a transmission delay 1 between the first electronic device and the second electronic device according to the time 1 and the sending time information 1 carried by the field 1.
[0089] The following specifically discusses two cases in which the first electronic device determines the transmission delay 1 between the first electronic device and the second electronic device according to the time 1 and the sending time information 1.
[0090] In case 1, the first electronic device is an electronic device synchronized with the second electronic device, and the transmission delay determined by the first electronic device according to the moment 1 and the transmission time information 1 is the transmission delay 1 between the first electronic device and the second electronic device. For example, the first electronic device can determine the transmission delay 1 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 1 from the moment 1. For another example, the first electronic device first calibrates the moment 1 by processing the time of the discovery beacon frame, and determines the transmission delay 1 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 1 from the calibrated moment 1.
[0091] Case 2: The first electronic device is not synchronized with the second electronic device. In other words, if the second electronic device that sends the discovery beacon frame has been synchronized with other devices in the NAN set, but the first electronic device that receives the discovery beacon frame has not yet been synchronized with other devices in the NAN set. In this case, the first electronic device can determine the transmission delay 2 based on the time information 1 and the moment 1 in the discovery beacon frame. For example, the first electronic device can determine the transmission delay 2 between the first electronic device and the second electronic device by subtracting the sending time indicated by the sending time information 1 from the moment 1. For another example, the first electronic device first calibrates the moment 1 by processing the time calibration of the discovery beacon frame, and subtracts the sending time indicated by the sending time information 1 from the calibrated moment 1 to determine the transmission delay 2 between the first electronic device and the second electronic device. After the first electronic device is synchronized with the second electronic device, the first electronic device calibrates the determined transmission delay 2 using the clock information of the calibration clock in the synchronization process to obtain the transmission delay 1.
[0092] In this way, when the first electronic device transmits data to the second electronic device, it can first determine whether the determined transmission delay meets the transmission requirements, and if so, transmit the data, otherwise, do not transmit the data, or the first electronic device selects a transmission link that meets the data transmission delay requirements from multiple transmission links between the first electronic device and the second electronic device to transmit the data, instead of using the WiFi Aware method for transmission. For example, the multiple links include a cellular transmission link, a Bluetooth transmission link, an NFC transmission link, etc.
[0093] Optionally, method 400 also includes: S430, the first electronic device can send the determined transmission delay 1 to the third electronic device through a synchronization beacon frame or a service discovery frame, and after the third electronic device receives the synchronization beacon frame or the service discovery frame, it obtains the transmission delay 1 in the synchronization beacon frame or the service discovery frame, and the third electronic device can save the transmission delay 1 between the first electronic device and the second electronic device, or the third electronic device can send the transmission delay 1 to the next electronic device or to the main electronic device in the NAN set. If any electronic device that receives the transmission delay 1 needs to transmit data through WiFi Aware, and the path for transmitting the data passes through the first electronic device and the second electronic device, it can determine whether the data needs to pass through the first electronic device and the second electronic device based on the transmission delay 1. If the main device receives multiple transmission delays sent by multiple electronic devices, the multiple transmission delays can be sent to each electronic device in the NAN set, and each electronic device can select a suitable transmission path to transmit data based on the multiple transmission delays.
[0094] Optionally, the first electronic device may carry the determined transmission delay 1 in a reserved field of the NAN attribute of the synchronization beacon frame or the service discovery frame and send it to the third electronic device. Figure 5 As shown, in the process of the second electronic device sending a discovery beacon frame to the first electronic device, the reserved field in the discovery beacon frame carries the sending time information 1 of sending the discovery beacon frame. If the first electronic device is in a synchronized state with other devices in the NAN set, the first electronic device can carry the determined transmission delay 1 in the reserved field of the NAN attribute of the synchronization beacon frame or the service discovery frame and send it to the third electronic device. Optionally, as Figure 6 As shown, in the process of the second electronic device sending a discovery beacon frame to the first electronic device, the reserved field in the discovery beacon frame carries the sending time information 1 of sending the discovery beacon frame. If the first electronic device is not synchronized with other devices in the NAN set, the first electronic device can carry the determined transmission delay 1 in the reserved field of the NAN attribute in the service discovery frame and send it to the third electronic device.
[0095] It is understandable that the third electronic device and the second electronic device may be the same as or different from each other, and this embodiment of the present application is not limited thereto.
[0096] Optionally, the service discovery frame is in 802.11 Public Action frame format, as shown in Table 4, which shows the fields included in the service discovery frame, the length of each field, the value of each field, and the meaning represented by each field. The frame format of the synchronization beacon frame is shown in Table 1.
[0097] The frame format of the synchronization beacon frame and the frame format of the discovery beacon frame in Table 1 and the frame format of the service discovery frame in Table 4 all include the NAN attribute field. Different values of the NAN attribute field represent different meanings. As shown in Table 2, the reserved field of the NAN attribute can carry a transmission delay of 1. The reserved field with a value of 14-220 or 222-255 of Attribute ID in Table 2 can carry a transmission delay of 1 for sending a discovery beacon frame. The exemplary reserved field of 14-220 or 222-255 can be the aforementioned second reserved field.
[0098] Optionally, the reserved field may include an attribute field, a length field, and a transmission delay field, the bits carried by the attribute field are used to indicate that the reserved field is used to carry the transmission delay 1, the bits carried by the length field are used to indicate the length occupied by the transmission delay field, and the bits carried by the transmission delay field are used to indicate the transmission delay 1. As shown in Table 5. Exemplarily, the attribute field of Table 5 may be the aforementioned second attribute field, and the length field may be the aforementioned second length field.
[0099] Table 4
[0100]
[0101]
[0102] Table 5
[0103]
[0104] For example, if Figure 7 As shown, electronic device 3 can determine the transmission delay between electronic device 3 and electronic device 4 according to method 400, and electronic device 3 can send the determined transmission delay to electronic device 2. Electronic device 2 can determine the transmission delay between electronic device 2 and electronic device 4, and the transmission delay between electronic device 2 and electronic device 3 according to method 400. Electronic device 2 can send the transmission delay between electronic device 3 and electronic device 4 from electronic device 3 and the two transmission delays determined by itself (the transmission delay between electronic device 2 and electronic device 3, and the transmission delay between electronic device 2 and electronic device 4) to electronic device 1 as the master device of the NAN set. Of course, electronic device 2 can also save the transmission delay between electronic device 3 and electronic device 4 and the transmission delay determined by itself. Electronic device 1 receives the transmission delay between electronic device 3 and electronic device 4, the transmission delay between electronic device 2 and electronic device 4, and the transmission delay between electronic device 2 and electronic device 3 from electronic device 2, and sends these transmission delays directly or indirectly to electronic device 2, electronic device 3, electronic device 4, and electronic device 5. When any electronic device in the NAN set needs to transmit data to another electronic device, a suitable transmission path can be selected according to different delays on different paths. If electronic device 1 needs to transmit data to electronic device 4, electronic device 1 can compare the transmission delay between electronic device 2 and electronic device 4, and the sum of the transmission delay from electronic device 2 to electronic device 3 and the transmission delay from electronic device 3 to electronic device 4, and find a path with smaller transmission delay to transmit data to electronic device 4.
[0105] Optionally, after the first electronic device receives the discovery beacon frame from the second electronic device, the first electronic device may also send a discovery beacon frame or a service discovery frame or a synchronization beacon frame to the fourth electronic device, and these frames may include the sending time information of the first electronic device sending these frames. The fourth electronic device may determine the transmission delay between the fourth electronic device and the first electronic device based on the time of receiving these frames and the sending time information included in these frames.
[0106] The above method 400 describes that the second electronic device carries the sending time information of the discovery beacon frame in the reserved field of the discovery beacon frame. Figure 8Describes that the second electronic device carries the transmission time information of the synchronization beacon frame in the reserved field of the synchronization beacon frame. Figure 8 As shown, another method 800 for determining transmission delay provided by an embodiment of the present application is shown. The method 800 includes:
[0107] S810, the second electronic device sends a synchronization beacon frame in the DW, field 2 of the synchronization beacon frame carries sending time information 2 of the synchronization beacon frame sent by the second electronic device, and the first electronic device receives the synchronization beacon frame at time 2.
[0108] Exemplarily, the second electronic device may be a master device in the NAN set or a device in a synchronization state in the NAN set.
[0109] Optionally, the format of the synchronization beacon frame is the 802.11Beacon frame format, as shown in Table 1. Table 1 shows the fields included in the synchronization beacon frame, the length of each field, the value of each field, and the meaning represented by each field.
[0110] Among them, different values of the NAN Attributes field in the above Table 1 represent different meanings, as shown in Table 2. As shown in Table 2, the synchronization beacon frame corresponds to the third column of Table 2. As shown in Table 2, field 2 in method 800 can be a reserved field of the NAN attribute, and the reserved field with an Attribute ID value of 14-220 or 222-255 in Table 2 can carry the sending time information 2 of sending the discovery beacon frame.
[0111] Optionally, field 2 may include an attribute field, a length field, and a transmission time field, the bits carried by the attribute field are used to indicate that field 2 is used to carry transmission time information 2, the bits carried by the length field are used to indicate the length occupied by the transmission time field, and the bits carried by the transmission time field are used to indicate the transmission time of the synchronization beacon frame. As shown in Table 3.
[0112] S820: The first electronic device determines the transmission delay 3 between the first electronic device and the second electronic device according to the time 2 and the sending time information 2 carried by the field 2.
[0113] The following specifically discusses two cases in which the first electronic device determines the transmission delay 3 between the first electronic device and the second electronic device based on the moment 2 and the sending time information 2.
[0114] In case 1, the first electronic device is an electronic device synchronized with the second electronic device, and the transmission delay determined by the first electronic device according to the moment 2 and the transmission time information 2 is the transmission delay 2 between the first electronic device and the second electronic device. For example, the first electronic device can determine the transmission delay 3 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 2 from the moment 2. For another example, the first electronic device first calibrates the moment 2 by processing the time of the synchronization beacon frame, and determines the transmission delay 3 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 2 from the calibrated moment 2.
[0115] Case 2: The first electronic device is not synchronized with the second electronic device. In other words, if the second electronic device that sends the synchronization beacon frame has been synchronized with other devices in the NAN set, but the first electronic device that receives the synchronization beacon frame has not yet been synchronized with other devices in the NAN set, in this case, the first electronic device can determine the transmission delay 4 based on the time information 2 and the moment 2 in the discovery beacon frame. For example, the first electronic device can determine the transmission delay 4 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 2 from the moment 2. For another example, the first electronic device first calibrates the moment 2 using the time of processing the synchronization beacon frame, and subtracts the transmission time indicated by the transmission time information 2 from the calibrated moment 2 to determine the transmission delay 4 between the first electronic device and the second electronic device. After the first electronic device is synchronized with the second electronic device, the first electronic device calibrates the determined transmission delay 4 using the clock information of the calibration clock in the synchronization process to obtain the transmission delay 3.
[0116] In this way, when the first electronic device transmits data to the second electronic device, it can first determine whether the determined transmission delay meets the transmission requirements, and if so, transmit the data, otherwise, do not transmit the data, or the first electronic device selects a transmission link that meets the data transmission delay requirements from multiple transmission links between the first electronic device and the second electronic device to transmit the data, instead of using the WiFi Aware method for transmission. For example, the multiple links include a cellular transmission link, a Bluetooth transmission link, a near field communication (NFC) transmission link, etc.
[0117] Optionally, method 800 also includes: S830, the first electronic device can send the determined transmission delay 3 to the third electronic device through a synchronization beacon frame or a service discovery frame, and after the third electronic device receives the synchronization beacon frame or the service discovery frame, it obtains the transmission delay 3 in the synchronization beacon frame or the service discovery frame, and the third electronic device can save the transmission delay 3 between the first electronic device and the second electronic device, or the third electronic device can send the transmission delay 3 to the next electronic device or to the main electronic device in the NAN set. If any electronic device that receives the transmission delay 3 needs to transmit data through WiFi Aware, and the path for transmitting the data passes through the first electronic device and the second electronic device, it can determine whether the data needs to pass through the first electronic device and the second electronic device based on the transmission delay 3. If the main device receives multiple transmission delays sent by multiple electronic devices, the multiple transmission delays can be sent to each electronic device in the NAN set, and each electronic device can select a suitable transmission path to transmit data based on the multiple transmission delays.
[0118] Optionally, the first electronic device may carry the determined transmission delay 3 in a reserved field of the NAN attribute of the synchronization beacon frame or the service discovery frame and send it to the third electronic device. Fig. 9 As shown, in the process of the second electronic device sending a synchronization beacon frame to the first electronic device, the reserved field in the synchronization beacon frame carries the sending time information 2 of sending the synchronization beacon frame. If the first electronic device is in a synchronized state with other devices in the NAN set, the first electronic device can carry the determined transmission delay 3 in the reserved field of the NAN attribute of the synchronization beacon frame or service discovery frame and send it to the third electronic device. Optionally, as Fig.10 As shown, in the process of the second electronic device sending a synchronization beacon frame to the first electronic device, the reserved field in the synchronization beacon frame carries the sending time information 2 of sending the synchronization beacon frame. If the first electronic device is not synchronized with other devices in the NAN set, the first electronic device can carry the determined transmission delay 3 in the reserved field of the NAN attribute in the service discovery frame and send it to the third electronic device.
[0119] It is understandable that the third electronic device and the second electronic device may be the same as or different from each other, and this embodiment of the present application is not limited thereto.
[0120] It can be understood that the frame format of the synchronization beacon frame and the frame format of the discovery beacon frame refer to the description of method 400.
[0121] Similarly, for an example of transmission delay 3, see Figure 7 Description of an example of transmission delay 1.
[0122] Optionally, after the first electronic device receives the synchronization beacon frame from the second electronic device, the first electronic device may also send a discovery beacon frame or a service discovery frame or a synchronization beacon frame to the fourth electronic device, and these frames may include the sending time information when the first electronic device sends these frames. The fourth electronic device may determine the transmission delay between the fourth electronic device and the first electronic device based on the time of receiving these frames and the sending time information included in these frames.
[0123] The above method 400 describes that the second electronic device carries the sending time information of the discovery beacon frame in the reserved field of the discovery beacon frame, and the method 800 describes that the second electronic device carries the sending time information of the synchronization beacon frame in the reserved field of the synchronization beacon frame. Fig.11 Description, the second electronic device carries the sending time information of the service discovery frame in the reserved field of the service discovery frame, such as Fig.11 As shown, another method 1100 for determining transmission delay provided by an embodiment of the present application is shown. The method 1100 includes:
[0124] S1110 , the second electronic device sends a service discovery frame in the DW, field 3 of the service discovery frame carries sending time information 3 of the second electronic device sending the service discovery frame, and the first electronic device receives the service discovery frame at time 3 .
[0125] Exemplarily, the second electronic device may be any electronic device in the NAN set, or the second electronic device may be an electronic device outside the NAN set that has not yet been synchronized with the electronic devices in the NAN set.
[0126] Optionally, the format of the service discovery frame is the 802.11 Public Action frame format, as shown in Table 4. Table 4 shows the fields included in the service discovery frame, the length of each field, the value of each field, and the meaning represented by each field.
[0127] Among them, different values of the NAN Attributes field in the above Table 4 represent different meanings, as shown in Table 2. As shown in Table 2, the service discovery beacon frame corresponds to the fifth column of Table 2. As shown in Table 2, field 3 in method 1100 can be a reserved field of the NAN attribute, and the reserved field with the value of Attribute ID of 14-220 or 222-255 in Table 2 can carry the sending time information 3 of sending the service discovery frame.
[0128] Optionally, field 2 may include an attribute field, a length field, and a transmission time field, the bits carried by the attribute field are used to indicate that field 2 is used to carry transmission time information 2, the bits carried by the length field are used to indicate the length occupied by the transmission time field, and the bits carried by the transmission time field are used to indicate the transmission time of the synchronization beacon frame. As shown in Table 3.
[0129] S1120: The first electronic device determines a transmission delay 5 between the first electronic device and the second electronic device according to the time 3 and the sending time information 3 carried by the field 3.
[0130] The following specifically discusses two cases in which the first electronic device determines the transmission delay 5 between the first electronic device and the second electronic device based on the time 3 and the sending time information 3.
[0131] In case 1, the first electronic device is an electronic device synchronized with the second electronic device, and the transmission delay determined by the first electronic device according to the time 3 and the transmission time information 3 is the transmission delay 3 between the first electronic device and the second electronic device. For example, the first electronic device can determine the transmission delay 5 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 3 from the time 3. For another example, the first electronic device first calibrates the time 3 by processing the time of the service discovery frame, and determines the transmission delay 5 between the first electronic device and the second electronic device by subtracting the transmission time indicated by the transmission time information 3 from the calibrated time 3.
[0132] Case 2: The first electronic device is not synchronized with the second electronic device. In other words, if the second electronic device that sends the service discovery frame has been synchronized with other devices in the NAN set, but the first electronic device that receives the service discovery frame has not yet been synchronized with other devices in the NAN set, in this case, the first electronic device can determine the transmission delay 6 based on the time information 3 and the moment 3 in the service discovery frame. For example, the first electronic device can determine the transmission delay 6 between the first electronic device and the second electronic device by subtracting the sending time indicated by the sending time information 3 from the moment 3. For another example, the first electronic device first calibrates the moment 3 by processing the time of the service discovery frame, and subtracts the sending time indicated by the sending time information 3 from the calibrated moment 3 to determine the transmission delay 6 between the first electronic device and the second electronic device. After the first electronic device is synchronized with the second electronic device, the first electronic device calibrates the determined transmission delay 6 using the clock information of the calibration clock in the synchronization process to obtain the transmission delay 5.
[0133] In this way, when the first electronic device transmits data to the second electronic device, it can first determine whether the determined transmission delay meets the transmission requirements, and if so, transmit the data, otherwise, do not transmit the data, or the first electronic device selects a transmission link that meets the data transmission delay requirements from multiple transmission links between the first electronic device and the second electronic device to transmit the data, instead of using the WiFi Aware method for transmission. For example, the multiple links include a cellular transmission link, a Bluetooth transmission link, an NFC transmission link, etc.
[0134] Optionally, method 1100 also includes: S1130, the first electronic device can send the determined transmission delay 5 to the third electronic device through a synchronization beacon frame or a service discovery frame, and after the third electronic device receives the synchronization beacon frame or the service discovery frame, it obtains the transmission delay 3 in the synchronization beacon frame or the service discovery frame, and the third electronic device can save the transmission delay 5 between the first electronic device and the second electronic device, or the third electronic device can send the transmission delay 5 to the next electronic device or to the main electronic device in the NAN set. If any electronic device that receives the transmission delay 5 needs to transmit data through WiFi Aware, and the path for transmitting the data passes through the first electronic device and the second electronic device, it can determine whether the data needs to pass through the first electronic device and the second electronic device based on the transmission delay 5. If the main device receives multiple transmission delays sent by multiple electronic devices, the multiple transmission delays can be sent to each electronic device in the NAN set, and each electronic device can select a suitable transmission path to transmit data based on the multiple transmission delays.
[0135] Optionally, the first electronic device may carry the determined transmission delay 5 in a reserved field of the NAN attribute of the synchronization beacon frame or the service discovery frame and send it to the third electronic device. Fig.12 As shown, in the process of the second electronic device sending a synchronization beacon frame to the first electronic device, the reserved field in the synchronization beacon frame carries the sending time information 3 of sending the synchronization beacon frame. If the first electronic device is in a synchronized state with other devices in the NAN set, the first electronic device can carry the determined transmission delay 5 in the reserved field of the NAN attribute of the synchronization beacon frame or service discovery frame and send it to the third electronic device. Optionally, as Fig.13 As shown, in the process of the second electronic device sending a synchronization beacon frame to the first electronic device, the reserved field in the synchronization beacon frame carries the sending time information 3 of sending the synchronization beacon frame. If the first electronic device is not synchronized with other devices in the NAN set, the first electronic device can carry the determined transmission delay 5 in the reserved field of the NAN attribute in the service discovery frame and send it to the third electronic device.
[0136] It is understandable that the third electronic device and the second electronic device may be the same as or different from each other, and this embodiment of the present application is not limited thereto.
[0137] It can be understood that the frame format of the synchronization beacon frame and the frame format of the discovery beacon frame refer to the description of method 400.
[0138] Optionally, after the first electronic device receives the discovery beacon frame from the second electronic device, the first electronic device may also send a discovery beacon frame or a service discovery frame or a synchronization beacon frame to the fourth electronic device, and these frames may include the sending time information of the first electronic device sending these frames. The fourth electronic device may determine the transmission delay between the fourth electronic device and the first electronic device based on the time of receiving these frames and the sending time information included in these frames.
[0139] It can be understood that in an embodiment of the present application, if the first electronic device can determine the transmission delay between the first electronic device and the second electronic device, and the second electronic device can also determine the transmission delay between the second electronic device and the first electronic device, when the third electronic device can receive the transmission delay sent by the first electronic device and can also receive the transmission delay sent by the second electronic device, then the third electronic device can calibrate the two different transmission delays, and can perform weighted calculation to determine the transmission delay after weighted calculation as the transmission delay between the first electronic device and the second electronic device. For example, the earlier the received transmission delay, the lower the weight coefficient, and the later the received transmission delay, the higher the weight coefficient.
[0140] Optionally, the aforementioned first frame is a discovery beacon frame of method 400, the aforementioned first field may be field 1 of method 400, the aforementioned first sending time information may be sending time information 1 in method 400, the aforementioned first transmission delay is transmission delay 1 in method 400, the aforementioned first moment is moment 1 in method 400, the aforementioned second transmission delay is transmission delay 2 in method 400, and the aforementioned second frame is a synchronization beacon frame or service discovery frame carrying transmission delay 1 in method 400; or, the aforementioned first frame is a synchronization beacon frame of method 800, the aforementioned first field may be field 2 of method 800, the aforementioned first sending information may be sending time information 2 in method 800, and the aforementioned first transmission delay is moment 1 in method 400. The transmission delay 3 is the aforementioned first moment is the moment 2 in method 800, the aforementioned second transmission delay is the transmission delay 4 in method 800, and the aforementioned second frame is the synchronization beacon frame or service discovery frame carrying the transmission delay 3 in method 800; or the aforementioned first frame is the service discovery frame of method 1100, the aforementioned first field may be the field 3 of method 1100, the aforementioned first sending information may be the sending time information 3 in method 1100, the aforementioned first transmission delay is the transmission delay 5 in method 1100, the aforementioned first moment is the moment 3 in method 1100, the aforementioned second transmission delay is the transmission delay 6 in method 1100, and the aforementioned second frame is the synchronization beacon frame or service discovery frame carrying the transmission delay 5 in method 1100.
[0141] It should be understood that field 1 in method 400, field 2 in method 800, and field 3 in method 1100 may be different fields or different values of the same field. For example, field 1 may be a reserved field of 12-220, and field 2 may be a reserved field of 222-255.
[0142] It should be noted that the sizes of the various fields in Table 3 and Table 5 are only exemplary. In addition, the values and lengths of the attribute field of field 1, the attribute field of field 2, and the attribute field of field 3 may be the same or different, the values and lengths of the length field of field 1, the length field of field 2, and the length field of field 3 may be the same or different, and the values and lengths of the sending time field of field 1, the sending time field of field 2, and the time field of field 3 may be the same or different.
[0143] It should also be noted that the above-mentioned method 400, method 800 and method 1100 are two independent embodiments or can also be embodiments that can be referenced to each other. The second electronic device in method 400, method 800 and method 1100 can be a different electronic device or the same electronic device, and the first electronic device in method 400, method 800 and method 1100 can be a different electronic device or the same electronic device, which is not limited by the embodiments of the present application.
[0144] The above combination Figure 1-Figure 13 A method embodiment for determining transmission delay provided in an embodiment of the present application is described. The following describes an apparatus embodiment for determining transmission delay provided in an embodiment of the present application.
[0145] In this embodiment, each electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0146] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0147] Each electronic device provided in this embodiment is used to execute the above-mentioned method for determining the transmission delay, so the same effect as the above-mentioned implementation method can be achieved. In the case of an integrated unit, each electronic device may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of each electronic device, for example, it can be used to support the electronic device to execute the steps performed by the processing unit. The storage module can be used to support the client and the server to execute the storage program code and data, etc. The communication module can be used to support the communication between the client and the server and other devices.
[0148] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0149] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Fig.14 The device of the structure shown. Exemplary, Fig.14 14 is a schematic diagram of the structure of an electronic device 1400 provided in an embodiment of the present application. The electronic device 1400 may be the first electronic device, the second electronic device, the third electronic device or the fourth electronic device in the method embodiment, and the electronic device 1400 may include a processor 1410, a memory 1420 and a communication module 1430, etc.
[0150] The processor 1410 may include one or more processing units, and the memory 1420 is used to store program codes and data. In the embodiment of the present application, the processor 1410 may execute computer-executable instructions stored in the memory 1420 to control and manage the actions of the electronic device 1400.
[0151] The communication module 1430 can be used for communication between various internal modules of the electronic device 1400, or communication between the electronic device 1400 and other external electronic devices. Exemplarily, if the electronic device 1400 communicates with other electronic devices via a wired connection, the communication module 1430 may include an interface, such as a USB interface. The USB interface may be an interface that complies with USB standard specifications, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge the electronic device 1400, and can also be used to transfer data between the electronic device 1400 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
[0152] Alternatively, the communication module 1430 may include audio devices, radio frequency circuits, Bluetooth chips, wireless fidelity (Wi-Fi) chips, near-field communication technology (NFC) modules, etc., and can achieve interaction between the electronic device 1400 and other electronic devices in a variety of different ways.
[0153] Optionally, the electronic device 1400 may further include a display screen 1440 , and the display screen 1440 may display images or videos in a human-computer interaction interface.
[0154] Optionally, the electronic device 1400 may further include a peripheral device 1450 , such as a mouse, a keyboard, a speaker, a microphone, etc.
[0155] It should be understood that, in addition to Fig.14In addition to the various components or modules listed in the figure, the embodiment of the present application does not specifically limit the structure of the electronic device 1400. In other embodiments of the present application, the electronic device 1400 may also include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0156] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method for determining the transmission delay in the above-mentioned embodiment.
[0157] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for determining the transmission delay in the above-mentioned embodiment.
[0158] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the method for determining the transmission delay in the above-mentioned method embodiments.
[0159] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0160] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0161] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0162] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0163] 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 separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0164] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0165] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for determining a transmission delay, characterized in that: include: A first electronic device receives a first frame sent by a second electronic device at a first moment, where a first field in the first frame carries first sending time information of the second electronic device sending the first frame, and the first frame is a device discovery beacon frame or a synchronization beacon frame or a service discovery frame of a proximity awareness network NAN; The first electronic device determines a first transmission delay between the first electronic device and the second electronic device according to the first moment and the first transmission time information, where the first transmission delay is used to determine whether service data is transmitted between the first electronic device and the second electronic device; The first field is the first reserved field of the NAN attribute field of the first frame.
2. The method according to claim 1, characterized in that The first field includes a first attribute field, a first length field and a sending time field. The bits carried by the first attribute field are used to indicate that the first field is used to carry the first sending time information. The bits carried by the first length field are used to indicate the length occupied by the sending time field. The bits carried by the sending time field are used to indicate the sending time when the second electronic device sends the first frame.
3. The method according to claim 1 or 2, characterized in that: If the first electronic device is not synchronized with the second electronic device; The first electronic device determines a first transmission delay between the first electronic device and the second electronic device according to the first moment and the first time information, including: The first electronic device determines, according to the first moment and the first time information, a second transmission delay between the first electronic device and the second electronic device; After the first electronic device is synchronized with the second electronic device, the first electronic device calibrates the second transmission delay according to clock information calibrated during the synchronization process to obtain the first transmission delay.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: The first electronic device sends a second frame to a third electronic device, the second field in the second frame carries the first transmission delay, and the second frame is a synchronization beacon frame or a service discovery frame of a proximity awareness network NAN.
5. The method according to claim 4, characterized in that The second field is a second reserved field of the NAN attribute field of the second frame.
6. The method according to claim 4, characterized in that The second field includes a second attribute field, a second length field and a transmission delay field. The bits carried by the second attribute field are used to indicate that the second field is used to carry the first transmission delay. The bits carried by the second length field are used to indicate the length occupied by the transmission delay field. The bits carried by the transmission delay field are used to indicate the first transmission delay.
7. The method according to claim 1 or 2, characterized in that: The method further comprises: The first electronic device sends a third frame to a fourth electronic device, and the third field in the third frame carries second sending time information of the first electronic device sending the third frame, and the second sending time information is used by the fourth electronic device to determine a third transmission delay between the fourth electronic device and the first electronic device. The third frame is a service discovery frame, a synchronization beacon frame, or a device discovery beacon frame.
8. A method for determining a transmission delay, characterized in that: include: The second electronic device sends a first frame to the first electronic device, the first field in the first frame carries first sending time information of the second electronic device sending the first frame, the first frame is a device discovery beacon frame or a synchronization beacon frame or a service discovery frame of the proximity awareness network NAN, and the first sending time information is used by the first electronic device to determine a first transmission delay between the first electronic device and the second electronic device, and the first transmission delay is used to determine whether service data is sent between the first electronic device and the second electronic device; The first field is a first reserved field of the NAN attribute field of the first frame.
9. The method according to claim 8, characterized in that The first field includes a first attribute field, a first length field and a sending time field. The bits carried by the first attribute field are used to indicate that the first field is used to carry the first sending time information. The bits carried by the first length field are used to indicate the length occupied by the sending time field. The bits carried by the sending time field are used to indicate the sending time when the second electronic device sends the first frame.
10. The method according to claim 8, characterized in that The method further comprises: The second electronic device receives a second frame sent by the first electronic device, the second field in the second frame carries the first transmission delay, and the second frame is a device synchronization beacon frame or a service discovery frame of a proximity awareness network NAN.
11. The method according to claim 10, characterized in that The second field is a second reserved field of the NAN attribute field of the second frame.
12. The method according to claim 10, characterized in that The second field includes a second attribute field, a second length field and a transmission delay field. The bits carried by the second attribute field are used to indicate that the second field is used to carry the first transmission delay. The bits carried by the second length field are used to indicate the length occupied by the transmission delay field. The bits carried by the transmission delay field are used to indicate the first transmission delay.
13. An electronic device, characterized in that: include: one or more processors; Memory; a module with multiple applications installed; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device executes the method as claimed in any one of claims 1 to 7.
14. An electronic device, characterized in that: include: one or more processors; Memory; a module with multiple applications installed; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device executes the method as described in any one of claims 8 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 8 to 12.
