Communication method and apparatus based on window scheduling, electronic device, and storage medium
By employing a hardware-layer window generation mechanism in the neighbor sensing network and utilizing timer and register configuration parameters through time synchronization functions, the problem of inconsistent time window alignment was solved, achieving higher quality communication.
Patent Information
- Application Number
- CN202610797526.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-03
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2046-06-03
AI Technical Summary
In neighbor-aware networks, existing technologies suffer from inconsistent time window alignment, leading to poor communication quality.
A hardware-based window generation mechanism is adopted. A local time reference is provided by a timer with a timer synchronization function to generate a discovery window. The scheduling control module negotiates with the peer device to determine the communication window. Time matching and channel switching are performed using register configuration parameters to ensure the consistency and accuracy of the window.
This improved the consistency and accuracy of time information within the communication window, thereby enhancing communication quality.
Smart Images

Figure CN122317769B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a communication method, apparatus, electronic device, and storage medium based on window scheduling. Background Technology
[0002] With the development of WiFi technology, new demands and new application scenarios are constantly emerging. Based on the 802.11 protocol, a neighborhood awareness network protocol, namely Neighbor Awareness Networking (NAN), has been developed and adopted.
[0003] The core of a neighbor-aware network is distributed synchronization and periodic generation of discovery windows (DW), which enables devices to use corresponding channel resources to achieve communication without a wireless access point (AP).
[0004] However, in the existing interaction methods, inconsistent window alignment is prone to occur, resulting in poor communication quality.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may contain information that is not part of the prior art known to those skilled in the art. Summary of the Invention
[0006] This application provides a communication method, apparatus, electronic device, and storage medium based on window scheduling, which can improve the accuracy and consistency of time windows, thereby improving communication quality.
[0007] According to a first aspect of the embodiments of this application, a window-based communication method is provided, applied to a first communication device, the communication method comprising: In response to joining the neighbor-aware network cluster, the wireless execution module generates a discovery window based on a local time reference; wherein the local time reference is provided by a timer from the timing synchronization function. Within the discovery window, the scheduling control module interacts with the peer device by sending service discovery frames and exchanging action frames to negotiate and determine the communication window; wherein, the time information of the communication window is defined by relative time offset with reference to the end time of the discovery window; The scheduling control module converts the scheduling information corresponding to the communication window into register configuration parameters and writes them into the window generation unit in the wireless execution module. The window generation unit performs time matching on the register configuration parameters based on the local time base, triggers the communication window at the corresponding time, and performs data transmission and reception operations within the communication window.
[0008] Optionally, the generation of the discovery window by the wireless execution module based on a local time base includes: In response to the first part of the timer of the timed synchronization function satisfying the first preset condition, the start time of the discovery window is determined; Within a preset time range, detect multiple moments when the second part of the timer of the timing synchronization function satisfies the second preset condition; The first time among the multiple times that the condition is met is determined as the end time of the discovery window.
[0009] Optionally, the communication method satisfies one or more of the following: The first preset condition is the moment when the lower 23 bits of the local time base become all 0; The second preset condition is the moment when the lower 13 bits of the local time base are all 1 in the current period.
[0010] Optionally, in response to joining the neighbor sensing network cluster, the scheduling control module configures the cluster ID of the neighbor sensing network cluster; The communication method further includes: the wireless execution module receiving all beacons and uploading them to the scheduling control module, but the wireless execution module only maintains the local time base when it determines that the beacon matches the cluster ID; In response to joining the neighbor-aware network cluster, the wireless execution module receives all beacons but does not update its own local time base.
[0011] Optionally, the scheduling information includes a first configuration parameter of the communication window, wherein the first configuration parameter includes at least: Start time field; Duration field; Working channel field; Valid flag field; Interruption field; Left edge interrupt field; Right edge interrupt field; The index field of the virtual MAC address; Reserved fields.
[0012] Optionally, in response to the configuration parameters including the working channel field and the need to change the working channel indicated by the working channel field, within a preset time before the start of the current communication window, the wireless execution module triggers a channel switching interrupt, causing the scheduling control module to respond to the channel switching interrupt and configure the target working channel according to the channel information in the interrupt status register. In response to the end time of the current communication window, the wireless execution module generates a window end interrupt, causing the scheduling control module to respond to the window end interrupt and adjust the channel switching time after the end of the window according to the configurable register, switching the channel back to the original working channel or the preset working channel; wherein, the window end interrupt is generated in the next clock cycle after the last bit of the signal after the end of the current communication window is output. The working channel is agreed upon by the first communication device and the peer device.
[0013] Optionally, the scheduling control module can also convert the scheduling information corresponding to the discovery window into register configuration parameters and write them into the window generation unit in the wireless execution module; The window generation unit can also adjust the timing information of the discovery window based on the register configuration parameters.
[0014] Optionally, the scheduling information includes a second configuration parameter for the discovery window, the second configuration parameter including at least: Left shift slot field; Right-shift slot field; Window left edge interrupt field; Window right edge interrupt field; Working channel field; Left edge interruption advance field; Right edge interruption lead time field; Reserved fields.
[0015] Optionally, the communication method satisfies one or more of the following: In response to the fact that the scheduling control module does not need to sense the discovery window time of the wireless execution module before the discovery window reaches the time specified in the discovery window, the left edge interrupt field of the window is not enabled. Since the scheduling control module does not need to be aware of the end time of the discovery window of the wireless execution module, the right edge interrupt field of the window is not enabled; In response to a timing error in the arrival of the previous discovery window, or if the scheduling control module needs to prepare data before the arrival of the discovery window, the wireless execution module enables the window left edge interrupt field, and the wireless execution module determines the trigger time of the window left edge interrupt based on the start time of the previous discovery window, so as to send a notification to the scheduling control module before the arrival of the discovery window. In response to the scheduling control module needing to know the end time of the discovery window, the wireless execution module enables the window right edge interrupt field, and the wireless execution module determines the trigger time of the window right edge interrupt based on the start time of the current data window, so as to send a notification to the scheduling control module at the end time of the discovery window.
[0016] Optionally, performing data sending and receiving operations within the communication window includes: In response to triggering the communication window at the corresponding time, determine whether it is necessary to receive the first data from the peer device; In response to the need to receive the first data, the wireless execution module receives the first data and uploads it to the scheduling control module. Upon completion of data reception and / or the end of the communication window, the wireless execution module calculates the time information for the next communication window. In response to the fact that the first data does not need to be received, determine whether the second data needs to be sent to the peer device; In response to the need to send the second data, the wireless execution module sends the second data to the peer device within the communication window, and when the communication window ends and / or the data transmission task is completed, the wireless execution module calculates the time information of the next communication window; In response to the fact that the second data does not need to be sent, the wireless execution module calculates the time information for the next communication window.
[0017] Optionally, in response to the failure of data interaction between the first communication device and the peer device in the current communication window, the data interaction is switched from the current communication window to the next communication window, and the unfinished data interaction continues to be executed in the next communication window.
[0018] Optionally, in response to the first communication device being in normal operation, the wireless execution module executes a local time reference based on the timer of the timing synchronization function; Before the first communication device enters sleep mode, the scheduling control module drives the wireless execution module to enable the normally open clock, and when the first communication device enters sleep mode, the timing synchronization function timer is turned off and the normally open clock is switched to continue timing. When the first communication device needs to be woken up, the wireless execution module triggers the scheduling control module to switch back to the working state driven by the timer of the time synchronization function.
[0019] According to a second aspect of the embodiments of this application, a window-based scheduling communication device is provided, disposed in a first communication device, comprising: The wireless execution module is configured to generate a discovery window based on a local time reference in response to joining a neighbor-aware network cluster, and the window generation unit in the wireless execution module performs time matching on the register configuration parameters based on the local time reference, triggers a communication window at the corresponding time, and performs data transmission and reception operations within the communication window; wherein the local time reference is provided by a timer of the timing synchronization function. The scheduling control module is configured to interact with the peer device within the discovery window by sending service discovery frames and exchanging action frames, negotiate and determine the communication window, and convert the scheduling information corresponding to the communication window into the register configuration parameters and write them into the window generation unit in the wireless execution module; wherein, the time information of the communication window is defined by relative time offset with reference to the end time of the discovery window.
[0020] According to a third aspect of the present application, an electronic device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the communication method described in any of the foregoing embodiments.
[0021] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the communication method described in any of the foregoing embodiments.
[0022] According to a fifth aspect of the present application, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the communication method described in any of the foregoing embodiments.
[0023] The embodiments of this application, by adopting the above technical solutions, have the following technical effects: In response to joining the neighbor-aware network cluster, the hardware-layer wireless execution module generates a discovery window based on a local time reference, provided by a timer from the timing synchronization function, to ensure accuracy. Within this discovery window, the scheduling control module can negotiate and determine the communication window by interacting with the peer device, sending service discovery frames and exchanging action frames. This allows the communication window's time information to be defined with a relative time offset, referencing the end time of the discovery window, further improving the consistency and accuracy of the communication window's time information. Furthermore, upon acquiring a communication window, the scheduling control module converts the corresponding scheduling information into register configuration parameters and writes them to the window generation unit in the wireless execution module. The wireless execution module then determines the corresponding trigger time, enabling data transmission and reception operations to be performed when the communication window is triggered at the appropriate time. In other words, the software-layer scheduling control module determines its own and the peer device's scheduling information and directly configures this information to the wireless execution module, allowing the wireless execution module to generate scheduling opportunities under network-wide synchronization, improving the consistency of window alignment. Through the collaborative work of the wireless execution module and the scheduling control module, the scheduling control module is responsible for strategic tasks such as network management, window negotiation, service scheduling, frame assembly and de-frame assembly, and protocol flow control, while the wireless execution module is responsible for the execution-level work of generating windows and sending and receiving data after the window is reached. This can improve the accuracy and consistency of the time window, thereby improving the communication quality. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a window-based communication method according to an embodiment of this application; Figure 2 This is an interactive schematic diagram of a window-based communication method in an embodiment of this application; Figure 3 This is a schematic diagram of the first fine-tuning mechanism in the embodiments of this application; Figure 4 This is a schematic diagram of the second fine-tuning mechanism in the embodiments of this application; Figure 5 This is a flowchart illustrating a window-based communication method in an embodiment of this application. Figure 6 This is a schematic diagram of the structure of a communication device based on window scheduling in an embodiment of this application; Figure 7 This is a schematic diagram of the framework of a window-based communication device according to an embodiment of this application; Figure 8This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0025] To make the technical solutions and advantages of the embodiments of this application clearer, the exemplary embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0026] The MAC (Media Access Control) layer is the media access control layer in a wireless communication system, located at the data link layer in the OSI (Open Systems Interconnection) seven-layer network model. The MAC layer plays a role in data relay and media control.
[0027] Specifically, the MAC layer is a comprehensive hardware and software entity composed of modules such as data framing, data deframing, channel contention and management, and a data security accelerator. The MAC layer controls and manages the air interface medium, thereby enabling network access and data transmission / reception functions.
[0028] Currently, the various frames flowing through the MAC layer are sent to sub-modules in the upper-layer software protocol stack, where they are used to carry network-related protocol signaling and communication data. The MAC layer's access mechanism is the CSMA / CA (Contactless Message-Alert) mechanism. This mechanism, commonly known as "listen before you speak," is essentially a contention-based, random access and access mechanism for the transmission medium.
[0029] With the development of WiFi technology, the IEEE 802.11 standard has been extended to form the Neighbor Sensing Network protocol, also known as the Neighbor Sensing Network.
[0030] In neighbor-aware networks, MAC communication is based on distributed synchronization, periodic generation of discovery windows, publish / subscribe service discovery, and low-power scheduling for access point-free communication. NAN MAC is essentially a network protocol using a CSMA / CA mechanism constrained by windows.
[0031] Specifically, NAN adds window constraints and channel constraints to CSMA / CA, thus enabling NAN to use the core technology of CSMA / CA in more dimensions.
[0032] More specifically, the timeline of the MAC layer supporting the NAN protocol is planned with a period of 512 TUs (where 1 TU (Time Unit) = 1024 µs, and 512 TU is approximately 1 ms). Within this period, NAN uses a time-division multiplexing window to generate media access opportunities, which are called the NAN communication window.
[0033] In other words, NAN is a media access protocol with Time Division Duplex (TDD) characteristics.
[0034] Since multiple windows can be arranged within a period, and the communication channels in each window can be agreed upon in advance, the communication process of NAN also incorporates the characteristics of Frequency Division Duplex (FDD).
[0035] Based on this, the essence of NAN can be summarized as: an enhanced MAC layer access protocol that extends TDD and FDD access mechanisms on the core basis of CSMA / CA access mechanism.
[0036] Currently, the window time in NAN is usually determined based on a firmware upgrade scheme.
[0037] Specifically, a common approach is to use a timer mechanism (e.g., a SoC system timer or an RTOS software timer) to time interrupt software service routines to calculate and generate discovery windows, further availability windows (FAWs), and unaligned windows (ULWs).
[0038] In other words, DW, FAW, and ULW are all software-defined time states. Because software-generated scheduling windows can jitter, communication windows may become out of sync, resulting in the communication windows negotiated by the communicating parties not being precisely aligned.
[0039] For example, the left edge of the communication window of sender A may fall within the communication window of receiver B. This misalignment of the communication windows is called communication time window error (also known as window jitter). If the jitter increases further, it will cause a situation where the two sides cannot communicate when sender A starts to perform data transmission and reception operations but receiver B's communication window has not yet aligned.
[0040] For example, sender A believes it is currently communication time and can send data; while receiver B believes it is not currently communication time and will not receive data, resulting in communication failure.
[0041] Furthermore, RTOS-based software systems not only need to handle tasks assigned by the scheduling window, but also other software tasks. These include receiving interrupt service routines, sending interrupt service routines, and various tasks from the upper-layer protocol stack.
[0042] Because these tasks have their own priorities, and once running, resource constraints can lead to waiting and queuing among them. Furthermore, since these tasks typically share an RTOS kernel and a CPU with the window scheduling task, the limited RTOS and CPU resources make it impossible to guarantee that the window scheduling task will calculate the precise window arrival time, inevitably causing window jitter. In this situation, at best, communication quality will degrade; at worst, normal communication will fail.
[0043] Based on the jitter and unpredictability of the software-generated NAN communication window in existing solutions, this application proposes and implements a hardware-software co-scheduling architecture for the NAN MAC layer, namely the NANover Hardware Window Software Schedule (NAN-HWSS) architecture.
[0044] Specifically, after obtaining its own transmission requirements and / or the transmission requirements of the other device, the software layer directly configures the window scheduling information to the hardware layer and starts the hardware window generator. The hardware window generator can generate scheduling opportunities under the drive of the network-wide Timing Synchronization Function (TSF) and complete data transmission and reception actions within the communication window.
[0045] In other words, the software layer is responsible for strategic tasks such as network management, window negotiation, service scheduling, frame assembly and deassembly, and protocol flow control, while the hardware layer is responsible for execution-level tasks such as generating windows and sending and receiving data after the window is reached.
[0046] It should be noted that for more standard terminology related to the NAN protocol, please refer to the existing protocols; this application will not repeat them in the embodiments.
[0047] To enable those skilled in the art to better understand and implement this solution, the following detailed description of the specific solution, principles, advantages, and effects of this application is provided with reference to the accompanying drawings and specific embodiments.
[0048] The communication method in this application can be applied to devices that support NAN functionality in various generations of wireless local area network systems and can be deployed in the MAC layer data path of a system-on-a-chip (SoC).
[0049] In short, this solution applies to all Wi-Fi versions that support the NAN mechanism. Additionally, it should be noted that for more details regarding data transmission regulations, please refer to the 802.11 protocol.
[0050] For example, how to send and receive data, how the communication terminals interact with and parse data, and other operations. This application mainly concerns the functional structure and coordination of the software and hardware layers in the NAN mechanism, which will be described in detail below.
[0051] In some embodiments, see Figure 1 The flowchart shown is a window-based scheduling communication method according to an embodiment of this application. This communication method can be applied to a first communication device.
[0052] Accordingly, such as Figure 1 As shown, the communication method includes the following steps: S101, in response to joining the neighbor-aware network cluster, the wireless execution module generates a discovery window based on a local time reference; wherein the local time reference is provided by a timer of the timing synchronization function.
[0053] In some embodiments, when the first communication device joins the NAN cluster, it can interact with other communication devices in the NAN cluster.
[0054] As discussed above, communication devices within a NAN cluster must strictly adhere to communication windows. Therefore, upon joining a NAN cluster, the wireless execution module generates a discovery window based on a local time base. This discovery window is used by the first communication device to perform device discovery and / or communication operations to determine subsequent communication windows, such as FAW and ULW.
[0055] For example, the first communication device actively queries the data queue within this discovery window to send data or receive data within the discovery window.
[0056] In some embodiments, the local time reference is provided by a timer for the time synchronization function. Specifically, the wireless execution module can acquire the time information of the local time synchronization function timer; based on the time reference of the local time synchronization function timer, it divides the time according to a preset period; according to the time division result, the wireless execution module (corresponding to the hardware module) generates a discovery window in the corresponding time interval.
[0057] For example, in response to the first part of the timer of the time synchronization function satisfying the first preset condition, the start time of the discovery window is determined; within a preset time range, multiple times when the second part of the timer of the time synchronization function satisfies the second preset condition are detected; and the first time among the multiple times that the condition is satisfied is determined as the end time of the discovery window.
[0058] The first preset condition is the moment when the lower 23 bits of the local time base become all 0; the second preset condition is the moment when the lower 13 bits of the local time base are all 1 for the first time in the current period.
[0059] Specifically, one cycle corresponds to 512TUs. Based on this, the moment when the lower 23 bits are turned into all 0s is taken as the start time of the discovery window, which is also the starting point of each 512TU.
[0060] Within each 512TU, there are 32 time periods where the lower 13 bits are all 1s. This application uses the first time period within this 512TU where all bits are 1s (i.e., 16383us) as the end time of the discovery window.
[0061] In other words, the end time of DW is 16TU-1, which means that DW ends after 16 TUs within this large window of 512 TUs.
[0062] In some embodiments, in response to joining a neighbor sensing network cluster, the scheduling control module configures the cluster ID of the neighbor sensing network cluster. That is, each neighbor sensing network cluster has an identification information, and the first communication device belongs to one of the neighbor sensing network clusters.
[0063] Accordingly, the communication method also includes: the wireless execution module receiving all beacons and uploading them to the scheduling control module, but the wireless execution module only maintains a local time base when it determines that the beacon matches the cluster ID.
[0064] In other words, when joining a neighbor-aware network cluster, the wireless execution module can receive all beacons, including those from the local neighbor-aware network cluster and those from other neighbor-aware network clusters. The wireless execution module can then send the received beacons to the scheduling and control module. The scheduling and control module is responsible for strategic tasks such as network management, window negotiation, service scheduling, framing and deframing, and protocol flow control.
[0065] During this process, the wireless execution module maintains its local time base only when it determines that the beacon matches the cluster ID.
[0066] The wireless execution module receives beacons and performs cluster ID matching. Upon successful matching, it maintains its local TFS (Timeframe Filter). However, the wireless execution module may also receive beacons from other clusters within its discovery window, which it then uploads to the upper layer. For example, it uploads to the NAN-UMAC (NAN Upper MAC) entity, which makes decisions and handles these decisions (selecting network entry, establishing a network, merging, etc.). The wireless execution module does not update TFS data unrelated to its own cluster ID, further improving the consistency of time windows between communicating devices within the same cluster.
[0067] In some embodiments, in response to joining the neighbor-aware network cluster, the wireless execution module receives all beacons but does not update its own local time base.
[0068] That is, in this application, before joining the neighbor-aware network cluster, the wireless execution module only receives beacons and sends the beacons to the upper-layer scheduling and control module, but does not perform time base synchronization operations.
[0069] The scheduling and control module decides which neighbor-aware network to enter and whether the first communication device should act as an Anchor Master or play another role.
[0070] Once joined to a neighbor-aware network cluster, the wireless execution module is only responsible for the beacons of this neighbor-aware network cluster and maintains the time base.
[0071] In this way, the wireless execution module can provide filtering enablement for incoming neighbor-aware network cluster frames, which facilitates the filtering of unnecessary air packets after joining the network.
[0072] S102, within the discovery window, the scheduling control module interacts with the peer device by sending service discovery frames and exchanging action frames to negotiate and determine the communication window; wherein, the time information of the communication window is defined by relative time offset with reference to the end time of the discovery window.
[0073] The scheduling control module can refer to a program module running on the processor of the first communication device, which is used to perform communication control and scheduling generation.
[0074] In some embodiments, when generating a discovery window, the scheduling control module can broadcast a Service Discovery Frame (SDF) and exchange Action Frames (NAN Action Frames) to determine the peer device from other communication devices in the NAN cluster, and then determine the communication window in a manner specified by the NAN protocol.
[0075] Specifically, SDF is used for service discovery and information exchange between devices and is the core frame type in the NAN mechanism. For example, device A publishes a service, and device B subscribes to the service. When the published information and the subscription information match, device A and device B can exchange information through SDF to achieve service discovery and matching.
[0076] The NAF is used to carry NAN-related control and management information. The NAF encapsulates and transmits SDF and other information elements to support service discovery, parameter negotiation and communication capability exchange between neighboring devices.
[0077] After service discovery and negotiation are completed, device A and device B can further establish a NAN DataPath (NDP) to carry actual business data transmission, thereby realizing point-to-point communication connection between the devices.
[0078] It should be noted that the above processing flow based on SDF, NAF, and NDP belongs to the standard mechanism specified by the existing NAN protocol, and this solution does not involve any improvement to this part of the process.
[0079] Furthermore, since the first communication device performs the negotiation process with the peer device within the discovery window, the time information of the determined communication window must be based on the discovery window.
[0080] For example, this application defines the time information of the communication window by using a relative time offset with reference to the end time of the discovery window. For example, the start time and duration of each communication window.
[0081] See Figure 2 , Figure 2 This is an interactive schematic diagram of a communication method according to an embodiment of this application. Wherein, Figure 2 In this context, "me" refers to the first communication device, and "peer" refers to the other end device.
[0082] Within each 512 TU (Time Unit), the first communication device and the peer device will exchange data within a discovery window (corresponding to a duration of 16 TU).
[0083] For example, within DW0, the first communication device sends a request signal (REQ) to the peer device, carrying the corresponding SDF (Service Discovery Frame) and Confirm signal (CFM) to indicate its own window information to the peer device, i.e., Window to peer by NAF (sending window information to the peer device through NAN action frames), where NAF refers to NAN Action Frame.
[0084] The peer device uses this DW0 to negotiate subsequent communication time windows. For example, using window information (Window form NAF) from the exchange action frame, FAW(X) and FAW(Y) are determined, and FAW(X) and FAW(Y) are time windows with reference to the end time of the synchronized DW0. Here, FAW(X) and FAW(Y) correspond to the uplink communication window and the downlink communication window.
[0085] The response signal (RSP) sent by the peer device to the first communication device carries information about the peer device.
[0086] Thus, within DW0, both parties can freely negotiate a communication channel. Theoretically, the communication channel for each window can be different, as long as the time windows of both parties are aligned and on the same channel.
[0087] S103, the scheduling control module converts the scheduling information corresponding to the communication window into register configuration parameters and writes them into the window generation unit in the wireless execution module.
[0088] In some embodiments, the scheduling control module can establish a communication link with the peer device within the discovery window and determine the scheduling information corresponding to the communication window. This scheduling information indicates when data can be received and when data can be sent, thus enabling data to be sent or received when subsequent window times arrive.
[0089] In this scenario, the scheduling control module can convert scheduling information into register configuration parameters and write them to the window generation unit in the wireless execution module. The window generation unit then generates the start and duration of the corresponding window.
[0090] Since the discovery window in this application is generated in the wireless execution module (corresponding to the hardware module), and the time information of the communication window is also generated in the wireless execution module, this improves the consistency of window time alignment.
[0091] More specifically, see Figure 2The scheduling control module can inform the local window generation unit (i.e., the hardware window generator) of the negotiated FAW(X) and FAW(Y), as well as ULW information, in the form of registers. That is, the scheduling control module configures parameters in the registers, enabling the window generation unit to configure each FAW and ULW based on the registers.
[0092] In some embodiments, the scheduling information includes first configuration parameters of the communication window, the first configuration parameters including at least: a start time field (win_start); a duration field (win_len); a working channel field (chn); a valid flag field (vld); an interrupt field; a left edge interrupt field (win_left_int); a right edge interrupt field (win_right_int); a virtual MAC address index field (vmac_idx); and a reserved field rsv.
[0093] See Table 1 for details. Table 1 contains field information of a first configuration parameter in an embodiment of this application.
[0094]
[0095] Here, vld is an abbreviation for valid, indicating whether the FAW is valid. Simultaneously, the wireless execution module also determines whether the current operating mode is NAN mode. Only when the current operating mode is determined to be NAN mode and the vld indication is valid will the wireless execution module initiate data transmission in this window.
[0096] Accordingly, the wireless execution module obtains data from the virtual MAC indicated by vmac_idx. The virtual MAC contains a corresponding data list (UTG), each data list comprising multiple transport group nodes, with adjacent transport group nodes connected via node connection fields.
[0097] Each transport group node includes multiple transport descriptors, which are connected by a descriptor connection field to form a singly linked list. The singly linked list is used to carry MPDUs, and the descriptor connection field of the last transport descriptor is empty.
[0098] See next Figure 2 The first communication device and the peer device can agree in advance on the working channel they will use. The first communication device and the peer device can perform data interaction on this working channel.
[0099] In some embodiments, the first communication device can perform channel switching within the communication window to better utilize channel resources.
[0100] Accordingly, in response to the configuration parameters including the working channel field and the need to change the working channel indicated by the working channel field, the wireless execution module triggers a channel switching interrupt within a preset time before the start of the current communication window, so that the scheduling control module responds to the channel switching interrupt and configures the target working channel according to the channel information in the interrupt status register.
[0101] In other words, if the first communication device needs to switch channels during the FAW window, the wireless execution module needs to complete the channel switching 300us to 500us before the FAW is opened (i.e., corresponding to the preset time).
[0102] In other words, the wireless execution module needs to generate win_chn_switch_int (window channel switching interrupt) 300us to 500us in advance, and the scheduling control module will help the wireless execution module complete the switching.
[0103] Specifically, the interrupt status register carries the channel information from win_gen_csr. When the scheduling control module receives win_chn_switch_int, it will read the channel information from the interrupt status register and configure the target working channel.
[0104] Correspondingly, the peer device also switches to the same target working channel according to its own logic.
[0105] For example, a first communication device and a peer device communicate on Channel A. When the first communication device switches to Channel B, the peer device also switches to Channel B.
[0106] In response to the end time of the current communication window, the wireless execution module generates a window end interrupt, causing the scheduling control module to respond to the window end interrupt and adjust the channel switching time after the window ends according to the configurable register, switching the channel back to the original working channel or the preset working channel; wherein, the window end interrupt is generated in the next clock cycle after the last bit of the signal after the end of the current communication window is output; wherein, the working channel is agreed upon by the first communication device and the peer device.
[0107] In other words, if the first communication device needs to switch back to the original channel after the FAW ends, the scheduling control module will decide which channel to switch back to.
[0108] Continuing the previous example, if the first communication device switches from Channel A to Channel B, and then performs another channel switch, it may switch back to Channel A or Channel C. That is, the wireless execution module only initiates the switching process; the scheduling and control module executes the decision-making process.
[0109] In this case, the window end interrupt must be sent to the next clock after the window ends, otherwise the tail time of the window may become unusable due to channel switching.
[0110] In one example, the scheduling control module can determine the timing of the window end interruption using a configurable register (e.g., win_end_switch_time). The configurable register has a precision of 50ns; a rough range can be estimated based on actual measurements.
[0111] For example, the scheduling control module can be configured such that the default value of the configurable register is 2 microseconds, corresponding to a value of 40, i.e., 50ns * 40 = 2us.
[0112] Correspondingly, the peer device can also switch to the same target working channel according to its own logic.
[0113] For example, when the first communication device switches to Channel X, the peer device also switches to Channel X.
[0114] By implementing the above channel switching scheme, the first communication device and the peer device can operate on a channel with better communication conditions, thereby improving communication quality.
[0115] Furthermore, by initiating interrupts through the wireless execution module and performing channel switching through the scheduling control module, the wireless execution module is responsible for rapid interrupt triggering and basic hardware operations, while the scheduling control module handles complex decision-making and dynamic adjustments. This simplifies hardware design, enhances system flexibility and scalability, and leverages the flexibility and optimization capabilities of the scheduling control module to make more intelligent decisions in complex environments, balancing hardware efficiency and software flexibility, resulting in a more efficient and reliable channel switching process.
[0116] Similarly, the scheduling control module can also initiate a fine-tuning mechanism for the discovery window based on the actual scenario. This fine-tuning mechanism is controlled by dw_gen_csr.
[0117] Specifically, the scheduling control module can also convert the scheduling information corresponding to the discovery window into register configuration parameters and write them into the window generation unit in the wireless execution module; the window generation unit can also adjust the timing information of the discovery window based on the register configuration parameters.
[0118] In this way, even if window jitter is detected, time window alignment can be achieved, improving the robustness of the communication process.
[0119] In one application scenario, clock drift can cause errors in the communication time windows between the two parties; this error is called "window jitter." As a result, the communication time windows between the two parties will be inconsistent.
[0120] For example, see Figure 2 Due to window jitter, the peer's FAW window lags behind the me's FAW window. Of course, in reality, there are also situations where the peer's FAW window appears before the me's FAW window.
[0121] Therefore, to minimize jitter, the discovery window can be fine-tuned during actual communication by exchanging frame information. This allows for simultaneous adjustments to the actual start time of the local FAW to be as close as possible to the other party's FAW.
[0122] For example, by performing fine-tuning operations, it is possible to align the "peer" window with the "me" window.
[0123] Based on this, the scheduling information includes a second configuration parameter for the discovery window, which includes at least: a left shift slot field (dw_left_mv); a right shift slot field (dw_right_mv); a window left edge interruption field (dw_left_int); a window right edge interruption field (dw_right_int); a working channel field (dw_chn); a left edge interruption advance field (pre_int_offset); a right edge interruption advance field (pos_int_offset); and a reserved field (rsv).
[0124] See Table 2 for field information of a second configuration parameter in an embodiment of this application.
[0125]
[0126] In some embodiments, the field information used to determine the second configuration parameter may satisfy one or more of the following conditions.
[0127] Example 1: In response to the fact that the scheduling control module does not need to sense the discovery window time of the wireless execution module before the discovery window is reached, the left edge interrupt field of the window is not enabled.
[0128] Example 2: In response to the fact that the scheduling control module does not need to be aware of the end time of the discovery window of the wireless execution module, the right edge interrupt field of the window is not enabled.
[0129] See Figure 3 , Figure 3 This is a schematic diagram of the first fine-tuning mechanism in the embodiments of this application.
[0130] Within each 512TU (corresponding to DW-P-512TU, discovery window period 512TU), if the scheduling control module does not need to arrive before the DW arrival time (e.g., Figure 3 The baseline time point REF1 indicates the discovery window (DW-WIN) of the sensing wireless execution module. The wireless execution module does not need to use dw_left_int (window left edge interrupt field) to notify the scheduling control module, which corresponds to INT_WIN_END (window end interrupt).
[0131] Similarly, if the scheduling control module does not need to be aware of the discovery end time of the wireless execution module, the wireless execution module does not need to use dw_right_int (the window right edge interrupt field) to notify the scheduling control module, which corresponds to INT_WIN_END.
[0132] Example 3: In response to a timing error in the arrival of the previous discovery window, or if the scheduling control module needs to prepare data before the arrival of the discovery window, the wireless execution module enables the window left edge interrupt field, and the wireless execution module determines the trigger time of the window left edge interrupt based on the start time of the previous discovery window, so as to send a notification to the scheduling control module before the arrival of the discovery window.
[0133] Example 4: In response to the scheduling control module needing to know the end time of the discovery window, the wireless execution module enables the window right edge interrupt field, and the wireless execution module determines the trigger time of the window right edge interrupt based on the start time of the current data window, so as to send a notification to the scheduling control module at the end time of the discovery window.
[0134] See Figure 4 , Figure 4 This is a schematic diagram of the second fine-tuning mechanism in the embodiments of this application.
[0135] Within each 512TU (corresponding to DW-P-512TU, discovery window period 512TU), if there is an error in the arrival of DW0 (corresponding to the discovery window DW-WIN indicated by the reference time point REF0) or the scheduling control module needs to prepare data in advance, then dw_left_int (window left edge interrupt field) needs to be enabled.
[0136] Since time cannot be reversed, the wireless execution module needs to use the starting point of the previous DW as a reference to calculate the arrival time of dw_left_int.
[0137] For example, the wireless execution module determines the arrival time of dw_left_int of DW1 (corresponding to the discovery window indicated by the reference time point REF1) as 512-dw_left_win (the left edge field of the window) based on the starting point of DW0.
[0138] Similarly, if the scheduling control module needs to know the end time of the discovery window, the scheduling control module will configure dw_right_int (the window right edge interrupt field).
[0139] Since the time from when the wireless execution module generates an interrupt to when the scheduling control module senses the interrupt is approximately tens to hundreds of nanoseconds, this time error is within an acceptable range. After the scheduling control module enters the interrupt service routine, the delay is handled by the scheduling control module. Therefore, DW1's dw_right_int needs to be calculated from the current start time of DW1, that is, the interrupt is given on the first clock after 16 TUs of DW1.
[0140] It should be noted that this application designs dw_gen_csr and 15 win_gen_csr to control various possible windows of DW, FAW(X), FAW(Y), and ULW respectively. Among them, DW is a mandatory window within each 512TU cycle, and the rest are optional windows depending on the application scenario.
[0141] Specifically, the scheduling control module needs to negotiate the FAW (Framework Window) in the DW (Device Window) via NAF (Network Window) and inform itself of its window time via SDF (Software Window) frames. The scheduling control module sets the local window control registers (win_gen_csr, dw_gen_csr) based on the scheduling it initiated or the scheduling attributes in the parsed SDF / NAF (Software Window).
[0142] For example, the scheduling control module can support 16 groups of windows.
[0143] When the local window control register is configured, the wireless execution module will open the local window when the local TSF reaches the window preset point. At the same time, the TSF of the remote device will also reach the window preset point.
[0144] Ideally, if the peer device receives the window and signal invitation, the two windows should be precisely aligned so that communication can begin.
[0145] It should be noted that the reason why the arrival of DW0 is uncertain is that when the wireless execution module updates its local time base, it calculates the difference between the local time base and the time base in the received beacon. If the time difference is greater than zero, it means that the local crystal oscillator is faster than the communication network. This means that the local DW0 is ahead of the standard time window in the communication network, and in this case, dw_right_mv needs to move the window to the right; conversely, if the time difference is less than zero, dw_left_mv needs to move the window to the left.
[0146] Furthermore, whether the scheduling control module needs to prepare data in advance depends on the processing speed of the upper-layer software and the requirements after processing. That is, if it is found during development and debugging that the processing speed of the upper-layer software is not fast enough, then an advance lead and an early interrupt are needed; conversely, when the window ends, the software needs to know that the window has ended and to do some cleanup work, such as switching channels or reclaiming resources. It needs to know the interrupt when the window ends to trigger subsequent actions.
[0147] In some embodiments, see next. Figure 2 Because every communication device experiences clock drift, this will cause window offset. Even with fine-tuning, theoretically, only the most precise alignment can be achieved. Furthermore, due to the randomness of CSMA / CA within the window, normal transmission and reception may not be possible during the window period.
[0148] At this point, channel collisions are handled, and data transmission and reception are postponed to the next window to compensate for this probabilistic failure. This mechanism can be used to compensate for situations such as busy channels, degraded channels, or insufficient transmission time.
[0149] In other words, in response to the failure of data interaction between the first communication device and the peer device in the current communication window, the data interaction is switched from the current communication window to the next communication window, and the unfinished data interaction continues to be executed in the next communication window.
[0150] For example, see Figure 2 Within the first 512TU, communication between the first communication device and the peer device fails. The first communication device and the peer device can continue data interaction within the next 512TU. For example, the first communication device and the peer device may exchange frames within DW1 to negotiate and determine the timing information for subsequent communication windows.
[0151] It should be noted that the next 512TU can be the first 512TU in the vicinity, or it can be the 512TU that the first communication device and the peer device are able to communicate.
[0152] Furthermore, this application also provides a hibernation and wake-up management scheme for the first communication device, wherein the scheduling control module is used to control scheduling-level behaviors such as when it wakes up, when it sends data, and whether it hibernates after sending and receiving data.
[0153] Specifically, in response to the first communication device being in normal operation, the wireless execution module executes a local time reference based on the timer synchronization function timer; before the first communication device enters sleep mode, the scheduling control module drives the wireless execution module to enable a normally open clock, and when the first communication device enters sleep mode, the timer synchronization function timer is turned off and switched to continue timing by the normally open clock; when the first communication device needs to be woken up, the wireless execution module triggers the scheduling control module to switch back to the working state driven by the timer synchronization function timer.
[0154] In other words, when the first communication device is operating normally, the local TSF clock remains on, continuously working and timing. In this case, there is no need to enable TSF_AO for time preservation.
[0155] When the first communication device needs to enter sleep mode and the local TSF clock needs to be turned off, the scheduling control module first initiates a control signal to activate the always_on_clk provided by the wireless execution module. Then, the current TSF value is written to TSF_AO, allowing TSF_AO to store the time state before sleep mode. After writing is complete, the local TSF clock is turned off, stopping the TSF from working. Subsequently, TSF_AO continues to operate under the drive of always_on_clk to maintain time continuity during the first communication device's sleep mode.
[0156] When the first communication device needs to wake up from sleep mode, the wireless execution module first triggers the scheduling control module. After responding to the wake-up trigger, the scheduling control module writes the current value of TSF_AO back to the TSF to restore the TSF's time state. Subsequently, the scheduling control module controls the wireless execution module to switch back to the local TSF working mode and resume normal operation.
[0157] After the first communication device completes wake-up, TSF_AO can either stop working or continue working but no longer participate in the time recovery process. Those skilled in the art can choose based on actual power consumption requirements and system design requirements.
[0158] It should be noted that, in the above embodiments, the write and restore operations between TSF and TSF_AO can be implemented by register assignment, data copying or other equivalent state synchronization methods. As long as the TSF state can be saved before sleep and restored after wake-up, it should fall within the protection scope of this invention.
[0159] S104, the window generation unit performs time matching on the register configuration parameters based on the local time base, triggers the communication window at the corresponding time, and performs data transmission and reception operations within the communication window.
[0160] In some embodiments, since the time information of the discovery window and the communication window are generated by the window generation unit, the window generation unit can know the start and end times of the corresponding window. Thus, when the scheduling information is negotiated and determined, the window generation unit can perform a time matching operation to determine the duration of the communication window, and then perform data transmission and reception operations within this communication window.
[0161] For example, step S104 may include: in response to triggering the communication window at a corresponding time, determining whether it is necessary to receive first data from the peer device; in response to the need to receive the first data, the wireless execution module receives the first data and uploads it to the scheduling control module, and upon completion of data reception and / or the end of the communication window, the wireless execution module calculates the time information of the next communication window; in response to the need not to receive the first data, determining whether it is necessary to send second data to the peer device; in response to the need to send the second data, the wireless execution module sends the second data to the peer device within the communication window, and upon the end of the communication window and / or completion of the data transmission task, the wireless execution module calculates the time information of the next communication window; in response to the need not to send the second data, the wireless execution module calculates the time information of the next communication window.
[0162] It should be noted that the data interaction process between communication devices can be found in the NAN protocol. This application does not impose any restrictions on the data interaction process.
[0163] See Figure 5 , Figure 5 This is a flowchart illustrating a communication method in an embodiment of this application.
[0164] Step S501: Whether to join the neighbor-aware network cluster. If Y, then proceed to step S502, where the wireless execution module generates a discovery window based on the local time base; if N, then proceed to step S503, joining or creating the neighbor-aware network cluster. Furthermore, after executing step S503, continue executing step S502.
[0165] In step S504, the scheduling control module determines the scheduling information based on the interaction process with the peer device, and converts the scheduling information into register configuration parameters for the wireless execution module to read.
[0166] Step S505: Can the data interaction process be started? If N, proceed to step S506 and wait for the data interaction process to start; if Y, proceed to step S507: Has the communication window time been reached? Step S505 is executed after step S506.
[0167] If step S507 is N, then step S508 is executed, where the wireless execution module calculates the arrival time of the next window; if it is Y, then step S509 is executed, determining whether to receive the first data from the peer device. Step S507 is executed after step S508.
[0168] If step S509 is Y, then step S510 is executed, where the wireless execution module receives the first data and uploads it to the scheduling control module. Step S510 can be executed after step S508.
[0169] If step S509 is N, then step S511 is executed to determine whether it is necessary to send the second data to the peer device. If N is N, then step S508 is executed; if Y is Y, then step S512 is executed to start sending transmission descriptors within this communication window. Each transmission descriptor corresponds to one AMPDU (Aggregate MAC Protocol Data Unit).
[0170] After completing step S512, step S508 is executed.
[0171] This application also provides a communication device, which is disposed on a first communication device.
[0172] Accordingly, see Figure 6 , Figure 6 This is a schematic diagram of the structure of a communication device according to an embodiment of this application. The communication device based on window scheduling may include: The wireless execution module 610 is configured to generate a discovery window based on a local time reference in response to joining a neighbor-aware network cluster, and to have a window generation unit in the wireless execution module perform time matching on register configuration parameters based on the local time reference, trigger a communication window at the corresponding time, and perform data transmission and reception operations within the communication window; wherein the local time reference is provided by a timer with a timing synchronization function. The scheduling control module 620 is configured to interact with the peer device within the discovery window by sending service discovery frames and exchanging action frames, negotiate and determine the communication window, and convert the scheduling information corresponding to the communication window into the register configuration parameters and write them into the window generation unit in the wireless execution module; wherein, the time information of the communication window is defined by relative time offset with reference to the end time of the discovery window.
[0173] For further details regarding the wireless execution module 610 and the scheduling control module 620, please refer to the aforementioned examples.
[0174] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0175] In practice, Figure 6 The communication device shown may correspond to a chip with communication function in a communication device; or to a communication device including a chip or chip module with communication function, or to a communication device.
[0176] See Figure 7 , Figure 7 This is a schematic diagram of the framework of a communication device in an embodiment of this application. NAN Stack Data (Neighbor-Aware Network Protocol Stack Data) refers to the signaling data and communication data in the NAN network, which is provided by the upper-layer NAN protocol stack according to protocol standards.
[0177] The NAN Schedule Window refers to the time window of the NAN Schedule negotiated during NAN network access. It is generated by parsing the FAW(X) and FAW(Y) information of the communicating parties and setting it in the HW_SCH_CSR (Hardware Scheduling Control / Status Register). The hardware layer uses this to generate the time window and schedules data out when the window arrives, or opens reception to acquire data from the other party when the window arrives. More details about the time window can be found in Table 1.
[0178] The TXD-LIST-BY-WIN (transmission data list divided by window) module resides in the LMAC layer (i.e., MAC with NAN, the media access control layer supporting neighbor-aware networks) and is used to manage the upper-layer transmission packets TXD (transmission data) related to the window. Its core is to manage the TXD in a chain structure according to different windows. Before the window arrives, the data is handed over to HW-NAN-SCH (i.e., hardware neighbor-aware network scheduler, corresponding to the wireless execution module in this application), i.e., HWMAC with NAN, the hardware media access control layer supporting neighbor-aware networks.
[0179] The NAN-Driver (Neighbor-Aware Network Driver) module resides in the LMAC layer and is used to receive NAN-SCHEDULE-WINDOW from the upper-layer protocol stack, set HW-SCH-CSR, and start the hardware scheduling engine.
[0180] The non-NAN HMAC (Non-Neighbor Aware Network Hardware Media Access Control Layer) module refers to the traditional hardware MAC portion, corresponding to traditional WiFi and its hardware and software protocol stack. Specifically, because the WiFi Alliance did not want to drastically change the existing mechanism when it launched WiFi Aware, it retained the hardware portion of traditional WiFi and allowed the use of the original resources and functional modules to send and receive frame sequences. In other words, non-NAN HMAC is the hardware MAC module of traditional WiFi.
[0181] The HW-NAN-ENGINE (Hardware Neighbor-Aware Network Engine) module consists of HW-SCH-CSR, HW-WIN-GEN (Hardware Window Generator), and HW-NAN-SCH, which are used to manage the start time of HW window generation, the window generation logic, the scheduling within the window, and the state transitions that occur during these processes, respectively. For more details on HW-SCH-CSR, HW-WIN-GEN, and HW-NAN-SCH, please refer to the aforementioned examples.
[0182] The NAN-Filter (Neighbor-Aware Network Filter) module is used to manage the filtering rule logic of the hardware in NAN mode. It is responsible for matching, filtering and policy control of received data frames, and deciding whether to report data according to preset rules, thereby reducing the processing burden of the upper layer and improving the overall processing efficiency of the system.
[0183] The Phy (Physical Layer) module is the underlying digital modulation and demodulation module, responsible for converting bitstreams into physical signals, including physical layer processing functions such as channel coding, modulation mapping, synchronization, demodulation, and bit error checking.
[0184] The RF (Radio Frequency) module is responsible for the transmission and reception of radio frequency signals, including functions such as up-conversion, down-conversion, power amplification, and low-noise amplification, and is used to realize the transmission of wireless signals over the air interface.
[0185] This application also provides an electronic device, including: a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the communication method described in any of the foregoing embodiments when running the computer program.
[0186] See Figure 8 , Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application.
[0187] Figure 8 The illustrated electronic device includes a memory 810, a processor 820, and a transceiver 830. The processor 820 is coupled to the memory 810 and the transceiver 830. The memory 810 can be located inside or outside the terminal. The memory 810, processor 820, and transceiver 830 can be connected via a communication bus. The transceiver 830 is used to communicate with other devices or communication networks.
[0188] Optionally, the transceiver 830 can be a transmitter. The memory 810 stores a computer program that can run on the processor 820, and when the processor 820 runs the computer program, the transceiver 830 performs the steps of any of the methods in the foregoing embodiments provided in the above embodiments.
[0189] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods in the foregoing embodiments.
[0190] Storage media may include read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc. The storage media may also include non-volatile or non-transitory memory, etc.
[0191] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the methods in the foregoing embodiments.
[0192] It should be understood that in the embodiments of this application, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0193] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).
[0194] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0195] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0196] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0197] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0198] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0199] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A communication method based on window scheduling, characterized in that, Applied to a first communication device, the communication method includes: In response to joining the neighbor-aware network cluster, the wireless execution module generates a discovery window based on a local time reference; wherein the local time reference is provided by a timer of the timing synchronization function. Within the discovery window, the scheduling control module interacts with the peer device by sending service discovery frames and exchanging action frames to negotiate and determine the communication window; wherein, the time information of the communication window is defined by relative time offset with reference to the end time of the discovery window; The scheduling control module converts the scheduling information corresponding to the communication window into register configuration parameters and writes them into the window generation unit in the wireless execution module. The window generation unit performs time matching on the register configuration parameters based on the local time base, triggers the communication window at the corresponding time, and performs data transmission and reception operations within the communication window.
2. The communication method according to claim 1, characterized in that, The generation of the discovery window by the wireless execution module based on the local time base includes: In response to the first part of the timer of the timed synchronization function satisfying the first preset condition, the start time of the discovery window is determined; Within a preset time range, detect multiple moments when the second part of the timer of the timing synchronization function satisfies the second preset condition; The first time among the multiple times that the condition is met is determined as the end time of the discovery window.
3. The communication method according to claim 2, characterized in that, Meet one or more of the following conditions: The first preset condition is the moment when the lower 23 bits of the local time base become all 0; The second preset condition is the moment when the lower 13 bits of the local time base are all 1 in the current period.
4. The communication method according to claim 1, characterized in that, In response to joining the neighbor sensing network cluster, the scheduling control module configures the cluster ID of the neighbor sensing network cluster; The communication method further includes: the wireless execution module receiving all beacons and uploading them to the scheduling control module, but the wireless execution module only maintains the local time base when it determines that the beacon matches the cluster ID; In response to joining the neighbor-aware network cluster, the wireless execution module receives all beacons but does not update its own local time base.
5. The communication method according to claim 1, characterized in that, The scheduling information includes a first configuration parameter for the communication window, and the first configuration parameter includes at least: Start time field; Duration field; Working channel field; Valid flag field; Interruption field; Left edge interrupt field; Right edge interrupt field; The index field of the virtual MAC address; Reserved fields.
6. The communication method according to claim 5, characterized in that, In response to the configuration parameters including the working channel field and the need to change the working channel indicated by the working channel field, within a preset time before the start of the current communication window, the wireless execution module triggers a channel switching interruption, causing the scheduling control module to respond to the channel switching interruption and configure the target working channel according to the channel information in the interrupt status register. In response to the end time of the current communication window, the wireless execution module generates a window end interrupt, causing the scheduling control module to respond to the window end interrupt and adjust the channel switching time after the end of the window according to the configurable register, switching the channel back to the original working channel or the preset working channel; wherein, the window end interrupt is generated in the next clock cycle after the last bit of the signal after the end of the current communication window is output. The working channel is agreed upon by the first communication device and the peer device.
7. The communication method according to claim 1, characterized in that, The scheduling control module can also convert the scheduling information corresponding to the discovery window into register configuration parameters and write them into the window generation unit in the wireless execution module. The window generation unit can also adjust the timing information of the discovery window based on the register configuration parameters.
8. The communication method according to claim 7, characterized in that, The scheduling information includes a second configuration parameter for the discovery window, and the second configuration parameter includes at least: Left shift slot field; Right-shift slot field; Window left edge interrupt field; Window right edge interrupt field; Working channel field; Left edge interruption advance field; Right edge interruption lead time field; Reserved fields.
9. The communication method according to claim 8, characterized in that, Meet one or more of the following conditions: In response to the fact that the scheduling control module does not need to sense the discovery window time of the wireless execution module before the discovery window is reached, the window left edge interrupt field is not enabled; Since the scheduling control module does not need to be aware of the end time of the discovery window of the wireless execution module, the right edge interrupt field of the window is not enabled; In response to a timing error in the arrival of the previous discovery window, or if the scheduling control module needs to prepare data before the arrival of the discovery window, the wireless execution module enables the window left edge interrupt field, and the wireless execution module determines the trigger time of the window left edge interrupt based on the start time of the previous discovery window, so as to send a notification to the scheduling control module before the arrival of the discovery window. In response to the scheduling control module needing to know the end time of the discovery window, the wireless execution module enables the window right edge interrupt field, and the wireless execution module determines the trigger time of the window right edge interrupt based on the start time of the current data window, so as to send a notification to the scheduling control module at the end time of the discovery window.
10. The communication method according to claim 1, characterized in that, The data sending and receiving operations performed within the communication window include: In response to triggering the communication window at the corresponding time, determine whether it is necessary to receive the first data from the peer device; In response to the need to receive the first data, the wireless execution module receives the first data and uploads it to the scheduling control module. Upon completion of data reception and / or the end of the communication window, the wireless execution module calculates the time information for the next communication window. In response to the fact that the first data does not need to be received, determine whether the second data needs to be sent to the peer device; In response to the need to send the second data, the wireless execution module sends the second data to the peer device within the communication window, and when the communication window ends and / or the data transmission task is completed, the wireless execution module calculates the time information of the next communication window; In response to the fact that the second data does not need to be sent, the wireless execution module calculates the time information for the next communication window.
11. The communication method according to claim 1 or 10, characterized in that, In response to the failure of data interaction between the first communication device and the peer device in the current communication window, the data interaction is switched from the current communication window to the next communication window, and the unfinished data interaction continues to be executed in the next communication window.
12. The communication method according to claim 1, characterized in that, In response to the first communication device being in normal operation, the wireless execution module executes a local time reference based on the timer of the timing synchronization function. Before the first communication device enters sleep mode, the scheduling control module drives the wireless execution module to enable the normally open clock, and when the first communication device enters sleep mode, the timing synchronization function timer is turned off and the normally open clock is switched to continue timing. When the first communication device needs to be woken up, the wireless execution module triggers the scheduling control module to switch back to the working state driven by the timer of the time synchronization function.
13. A communication device based on window scheduling, characterized in that, The communication device, configured in the first communication device, includes: The wireless execution module is configured to generate a discovery window based on a local time reference in response to joining a neighbor-aware network cluster, and the window generation unit in the wireless execution module performs time matching on the register configuration parameters based on the local time reference, triggers a communication window at the corresponding time, and performs data transmission and reception operations within the communication window; wherein the local time reference is provided by a timer of the timing synchronization function. The scheduling control module is configured to interact with the peer device within the discovery window by sending service discovery frames and exchanging action frames, negotiate and determine the communication window, and convert the scheduling information corresponding to the communication window into the register configuration parameters and write them into the window generation unit in the wireless execution module; wherein, the time information of the communication window is defined by relative time offset with reference to the end time of the discovery window.
14. An electronic device comprising: A memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the communication method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the communication method according to any one of claims 1 to 12; And / or, a computer program product comprising a computer program / instructions, characterized in that, when executed by a processor, the computer program / instructions implement the steps of the communication method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Methods and apparatus for independent basic service set based data paths for neighbor aware networks
CN106165464A
Time-triggered Ethernet scheduling generation and synchronization system based on hardware time axis construction engine
CN121966777A