Wireless communication method, apparatus and performing device based on competition mechanism
Patent Information
- Application Number
- CN202611312782.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]有鉴于此,本申请提供物联网设备向业务接入集群的接入方法、装置和执行设备,能够克服因固定时隙划分导致大块数据传输碎片化、信道利用率低及多节点冲突严重的问题
[0016]本申请所公开方法中,通过竞争报文承载待传输数据总量与自适应预估信道占用时长,使主机得以在分配决策前精准掌握各从设备的实际数据需求,从而按需分配精确匹配数据体量的连续信道窗口,彻底摒弃传统超帧固定时隙的强制分割模式。大容量数据无需拆分适配固定时隙长度,可在单一连续窗口内一次性完成传输,消除了因固定时隙划分导致的数据碎片化传输与频繁帧切换开销,数据传输效率获得根本性提升。
Smart Images

Figure CN122970658A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of Internet of Things (IoT) communication, and more particularly to wireless communication methods, apparatuses, and execution devices based on a competition mechanism. Background Technology
[0002] The large-scale deployment of the Internet of Things (IoT) has spurred applications such as industrial equipment condition monitoring, precision agricultural environmental sensing, and mobile monitoring for security alarms. These scenarios require the aggregation of sensor data from dozens to hundreds of nodes on a single network, with single batches of data reaching hundreds of KB to MB. Their communication is characterized by low real-time performance (tolerating latency of hundreds of milliseconds to tens of seconds) and low data rates (tens of KBps to hundreds of Kbps), but also demands high throughput and high stability.
[0003] Existing MAC protocols have significant shortcomings in supporting such scenarios: For pure CSMA / CA, multi-node concurrent conflicts are severe, large blocks of data are repeatedly fragmented and retransmitted, and latency deteriorates sharply. For static TDMA, time slots are fixed, resulting in waste under low load and forced fragmented transmission of large data under high load, leading to a surge in control overhead. For hybrid MAC, although time slots are differentiated, the business time slots remain fixed, and the lack of global synchronization means that hidden terminal issues persist.
[0004] In summary, the fixed time slot division in related technologies leads to fragmentation of large data transmissions, low channel utilization, and severe conflicts among multiple nodes. Summary of the Invention
[0005] In view of this, this application provides a method, apparatus and execution device for IoT devices to access a service access cluster, which can overcome the problems of fragmentation of large data transmission, low channel utilization and severe multi-node conflicts caused by fixed time slot division.
[0006] In a first aspect, this application provides a wireless communication method based on a contention mechanism, applied to a wireless communication system, the wireless communication system comprising a master device and multiple slave devices; The method includes: In response to the local cached data volume reaching a preset threshold or the channel being idle for a continuous period of time exceeding the idle threshold, the slave device generates a contention message to be sent out. The contention message carries at least the device ID, the total length of data to be transmitted, the service priority score, and the channel occupancy time estimated based on the total length of data to be transmitted and the historical channel bit error rate. When the master device detects that the channel is idle after receiving a contention message from the slave device, it generates an allocation message containing window information and is to be sent out based on a preset scheduling strategy that includes network load status. The window information is used to indicate the continuous channel occupancy window without fixed time slot constraints allocated to the slave device of the contention message. After receiving the allocation message sent by the master device, the slave device performs data transmission based on the window information of the allocation message.
[0007] Optionally, the estimated channel occupancy time is dynamically determined based on the total amount of data to be transmitted, the current transmission bit rate, the historical channel bit error rate, and the protocol control overhead.
[0008] Optionally, the preset scheduling strategy that includes network load status specifically includes: The network load factor is determined based on the number of slave devices currently requesting access and the total amount of data to be transmitted. When the load factor is higher than the first threshold, a large-capacity data priority scheduling is adopted, and the channel window is allocated to the slave device with the largest amount of data to be transmitted. When the load factor is lower than the second threshold, first-come-first-served scheduling is adopted, and channel windows are allocated according to the arrival order of competing packets. When the load factor is between the first threshold and the second threshold, a hybrid weighted scheduling is adopted. The scheduling weight is calculated by comprehensively considering the amount of data to be transmitted by the slave device and the waiting time, and the channel window is allocated according to the weight.
[0009] Optionally, the slave device sends contention packets based on a load-aware adaptive backoff contention algorithm; Specifically, the load-aware adaptive backoff contention algorithm includes: The network load coefficient is determined based on the number of historical contention conflicts and channel occupancy rate, and the network load coefficient is used to divide the area into low load, medium load, and high load zones. In the low-load range, the operations of "reducing the backoff window, shortening the waiting time, and quickly seizing the channel" are performed; During the aforementioned load range, the "basic binary exponent backoff rule" operation is executed; In the high-load range, the operation of "expanding the overall backoff window and simultaneously reducing the preset value of the backoff window scaling factor for high-priority devices with large data volumes" is performed.
[0010] Optionally, the master device detects that the channel is idle based on a sliding window dynamic threshold algorithm; Specifically, the sliding window dynamic threshold algorithm involves sampling the channel state at a fixed period of N, recording the sampled channel state data using a sliding window of length M, and weighting the channel occupancy markers within the window to a weighted average. A dynamic idle threshold is set, which is adaptively adjusted according to channel noise and historical interference intensity. Channels whose sampled channel state is idle for K consecutive records of the sliding window are determined to be idle.
[0011] Optionally, after receiving the allocation message sent by the master device, the slave device performs data transmission based on the window information of the allocation message, specifically including: After receiving the allocation message from the master device, the slave device broadcasts a channel occupancy notification message to the entire network to enable all slave devices to synchronously update their local channel status and to stop channel contention during the continuous channel occupancy window. The slave device completes data transmission within the continuous channel occupancy window; The device broadcasts a release message to the entire network to signal the end of transmission, so that the entire network can synchronously update the channel status to idle.
[0012] Optionally, the method further includes multi-frequency channel interference backup; specifically, the multi-frequency channel interference backup involves the host monitoring the current channel quality in real time, and when the interference index exceeds the threshold, broadcasting a channel switching command, and all devices synchronously switching to a preset backup frequency. The method also includes hierarchical energy consumption optimization; specifically, the hierarchical energy consumption optimization involves the device switching power consumption modes according to the contention state and network load; short sleep during contention idle intervals, deep sleep during high-load scenarios after contention failure, and full-device sleep during periods without data acquisition; and adaptive reduction of RF transmission power during high-capacity data transmission phases based on communication distance. The method also includes end-to-end anomaly self-healing, which specifically includes: If the device does not receive the allocation message within the preset first timeout period, it will retransmit the contention request at an exponentially increasing interval, and enter sleep mode after reaching the maximum number of retries. During transmission, if it is predicted that the allocated window is insufficient to carry the remaining data, a duration extension request is sent to the host, and the host dynamically adds channel windows; If a device in the network does not receive a release broadcast within the preset second timeout period, it is determined that the current channel occupancy is abnormal, and the channel status is forcibly updated to idle.
[0013] Secondly, this application provides a wireless communication device based on a competition mechanism, comprising: This is applied to a wireless communication system, which includes a master device and multiple slave devices. The device includes: The first generation and transmission module is used to generate a contention message to be sent out in response to the local cached data volume reaching a preset threshold or the channel continuous idle time exceeding the idle threshold. The contention message carries at least the device ID, the total length of data to be transmitted, the service priority score, and the channel occupancy time estimated based on the total length of data to be transmitted and the historical channel bit error rate. The second generation and transmission module is used to generate an allocation message containing window information and to be sent out based on a preset scheduling strategy containing network load status when the master device detects that the channel is idle after receiving a contention message from the slave device. The window information is used to indicate the continuous channel occupancy window without fixed time slot constraints allocated to the slave device of the contention message. The transmission module is used by the slave device to perform data transmission based on the window information of the allocation message after receiving the allocation message sent by the master device.
[0014] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0015] Fourthly, this application provides an execution device, the execution device including a processor and a memory, wherein the processor is coupled to the memory; Memory, used to store computer programs; A processor is used to execute computer programs in memory, causing execution devices to perform the methods described above.
[0016] The method disclosed in this application uses contention messages to carry the total amount of data to be transmitted and adaptively estimated channel occupancy time. This allows the host to accurately grasp the actual data needs of each slave device before making allocation decisions, thereby allocating continuous channel windows that precisely match the data volume on demand. This completely eliminates the forced segmentation mode of traditional superframe fixed time slots. Large-capacity data does not need to be split to adapt to fixed time slot lengths and can be transmitted in one go within a single continuous window. This eliminates the data fragmentation transmission and frequent frame switching overhead caused by fixed time slot division, fundamentally improving data transmission efficiency. Attached Figure Description
[0017] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0018] Figure 1 A flowchart of a competition-based wireless communication method provided by an exemplary embodiment is shown.
[0019] Figure 2 A block diagram illustrating the configuration of a competition-based wireless communication device provided in an exemplary embodiment is shown.
[0020] Figure 3 A block diagram illustrating the configuration of an execution device provided in an exemplary embodiment is shown. Detailed Implementation
[0021] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.
[0022] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved. The division of units in this application is a logical division. In practical applications, there may be other division methods. For example, multiple units may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the shown or discussed mutual coupling, direct coupling, or communication connection may be through some interface, and the indirect coupling or communication connection between units may be electrical or other similar forms, none of which are limited in this application. Furthermore, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed among multiple circuit units. Some or all of the units can be selected to achieve the purpose of the solution in this application according to actual needs.
[0023] First, it is necessary to explain the process of creating the technical solution of this application.
[0024] Among related technologies, the following are the mainstream solutions for MAC protocol-related technologies: A. Traditional CSMA / CA random competition mechanism; Without a central scheduling unit, each device independently preempts the channel, and there is no unified channel allocation process; when multiple nodes simultaneously report large amounts of data, continuous message conflicts occur, there is no priority protection for large-capacity data transmission, and small data packets continuously occupy the channel, causing long-term blockage of large-capacity data; there is no global channel synchronization mechanism, the local channel status of each node is inconsistent, and the hidden terminal problem is prominent.
[0025] B. Static / Semi-static TDMA time slot allocation scheme; The superframe architecture pre-divides fixed-duration time slots, and the time slot resources are pre-allocated to each slave device. It is impossible to dynamically adjust the transmission window according to the real-time data volume. Large-capacity data must be split to adapt to the time slot length, and multiple segmented transmissions bring a lot of frame header and verification control overhead. When the network load fluctuates, the problem of idle or insufficient time slot resources cannot be adaptively adjusted, and the upper limit of channel utilization is low.
[0026] C. There is an existing master-slave hybrid MAC communication scheme; The existing master-slave scheduling protocol only supports timed reporting of small data packets and does not have a supporting mechanism for caching, fragmentation, and duration estimation for large data of MB level. Channel occupancy relies solely on local NAV vector marking and lacks a network-wide broadcast synchronization process, so other nodes cannot perceive the channel occupancy status in real time. The scheduling strategy only adopts a single first-come-first-served or fixed priority approach and cannot dynamically switch the scheduling logic according to network load, so fairness and transmission efficiency cannot be balanced in high-concurrency scenarios.
[0027] D. Distributed cognitive radio, terahertz LAN MAC protocol; Without a centralized host to coordinate resource allocation, spectrum competition is fragmented, and it is impossible to uniformly plan continuous long channel windows; it is not optimized for low-latency real-time services and is not adapted to scenarios of large-capacity data batch transmission, and supporting optimizations such as buffer capacity and channel duration prediction are lacking.
[0028] In summary, the fixed time slot division in related technologies leads to fragmentation of large data transmissions, low channel utilization, and severe conflicts among multiple nodes.
[0029] Through exploration, the inventors discovered that, on the one hand, contention methods, typically represented by CSMA / CA, only address the issue of "who occupies the channel first," and the contention message itself does not contain payload information, making it impossible for the host device or receiver to predict subsequent transmission needs. The inventors transformed the contention message into a request form carrying complete transmission requirement parameters, including key fields such as device ID, total amount of data to be transmitted, adaptive estimated channel occupancy duration, service priority score, and number of fragments. The contention process simultaneously completes the dual tasks of "channel access request" and "resource requirement declaration," enabling the host to grasp the actual transmission needs of each node before making allocation decisions, providing a data-driven decision-making basis for subsequent continuous window allocation without fixed time slots. Without this information-bearing contention mechanism, the host would have no way of determining "who to allocate to," "how long to allocate," or "whether it is continuous," making dynamic allocation without fixed time slots ineffective.
[0030] On the other hand, the inventors abandoned fixed time slots and instead allocated continuously variable duration channel windows. However, "variable" does not mean "arbitrary." The window duration must precisely match the actual data transmission needs; too short a window leads to transmission truncation, while too long a window results in wasted bandwidth. The contention mechanism not only initiates access but also maps "data volume - channel quality - protocol overhead" into specific resource requirement values through a duration prediction model, enabling the host to allocate a continuous window of precise duration as needed. The contention mechanism is a prerequisite for achieving "no fixed time slots"—without the precise reporting of data volume during the contention phase, the host cannot dynamically prune the window outside the fixed time slot framework.
[0031] Based on the aforementioned inventive findings, this application proposes a method that uses contention messages to carry the total amount of data to be transmitted and adaptively estimates the channel occupancy time. This allows the host to accurately grasp the actual data needs of each slave device before making allocation decisions, thereby allocating continuous channel windows that precisely match the data volume on demand. This completely eliminates the forced segmentation mode of traditional superframe fixed time slots. Large-capacity data does not need to be split to adapt to fixed time slot lengths and can be transmitted in one go within a single continuous window. This eliminates the data fragmentation transmission and frequent frame switching overhead caused by fixed time slot division, fundamentally improving data transmission efficiency. Thus, this invention is established.
[0032] A competition-based wireless communication method is applied to wireless communication systems. The system architecture of this wireless communication system is described below. The system architecture mainly includes host hardware, slave device hardware, master device software module, and slave device software module.
[0033] The host hardware includes the following components: a. Main control processing unit: ARM architecture high-performance processor, equipped with hardware computing acceleration unit, used to perform channel idle detection, hybrid allocation algorithm, and contention packet parsing; b. Wireless radio frequency communication module: Multi-band adjustable radio frequency chip, supports switching between multiple backup frequency points, and has high anti-interference and adaptive power adjustment functions; c. Storage unit: Large-capacity RAM caches contention messages and transmission records, and Flash stores network configuration and historical channel performance data; d. Power management module: Wide voltage supply, supports steady-state output, and adapts to industrial field power supply environments; e. Auxiliary peripherals: status indicator lights, debugging serial port, used for on-site operation and maintenance debugging.
[0034] The hardware components of the device are as follows: a. Microcontroller MCU: Low-power single-chip processor, used to control sensor acquisition, channel contention, and data fragmentation transmission; b. Sensor acquisition unit (optional): Various monitoring sensors such as temperature and humidity, light intensity, and equipment vibration, supporting sleep and wake-up; c. Radio frequency communication module: Matches the wireless chip of the host and supports channel contention and broadcast message transmission and reception; d. Multi-level cache storage: high-speed RAM temporary cache and large-capacity Flash persistent cache to store massive amounts of collected data; e. Low-power power supply unit: Battery-powered management, supports sleep power consumption control, and is suitable for unattended outdoor scenarios.
[0035] The host software module is composed as follows: a) Channel monitoring module: Slide window sampling of channel status, dynamic threshold determination of channel idleness, and output of channel status data; b. Contention Message Parsing Module: Receives and parses contention messages from devices, extracting device ID, data length, priority, and estimated duration; c. Allocation Decision Core Module: Built-in three-level load judgment logic, large-capacity data priority / FCFS hybrid scheduling algorithm, outputting continuous channel window allocation instructions; d. Communication Broadcast Management Module: Broadcast message allocation, network-wide channel switching commands, and verification of message transmission status; e. Abnormal Operation and Maintenance Module: Records channel conflicts, transmission failures, and device offline logs, and performs channel switching and retransmission scheduling.
[0036] f. Each module interacts with other modules through a message queue, and the status is synchronized in real time. The modules are decoupled and can be iteratively optimized individually.
[0037] The device software modules are composed as follows: a. Data acquisition and caching module: Reads sensor data, stores it in a two-level cache, and determines the cache threshold to trigger contention. b. Channel contention module: Load-aware adaptive backoff algorithm execution unit, which assembles and sends contention messages; c. Channel synchronization broadcast module: After receiving the allocation message, broadcasts a occupancy notification; after the transmission ends, broadcasts a release message; and maintains a local global channel occupancy table. d. Large-capacity data fragmentation and transmission module: data splitting, adaptive bitrate adjustment, FEC / ARQ error control, and breakpoint resume management; e. Power management module: Automatically switches between sleep, working, and monitoring power consumption modes based on network load and transmission status.
[0038] Based on the above system architecture, the actual process of building a test system can be demonstrated.
[0039] a. Hardware network topology; One main unit (ARM Cortex-M4 processor + SUB 1G RF module), eight PIR infrared motion detection detectors with CMOS cameras. When the main unit is in armed mode, the PIR detectors will activate the cameras to take three photos after detecting human movement, and then transmit the photos to the alarm main unit via the RF module.
[0040] b. Software implementation; After the host arm is armed, the PIR detects human movement and activates the camera to take three 320 x 240 photos. The PIR first reports an alarm message that human movement has been detected via the SUB 1G RF module, then requests a large data transmission channel and an estimated channel occupancy time to prepare for uploading the photos. If the channel is idle, the host responds to the successful channel request and allocates a channel number and maximum channel occupancy time. The PIR broadcasts the occupied channel number and channel occupancy time. Upon receiving the broadcast, the host switches to the allocated channel. After the PIR finishes broadcasting, it also switches to the allocated channel and sends data messages to the host, including the length of each frame, the total number of frames, and data verification. Upon receiving the messages, the host starts to acquire the first frame of data. The PIR sends the first frame, and the host acquires the next frame sequentially until the data acquisition is complete. After sending the last frame and receiving a message from the host indicating that reception is complete, the PIR returns to the standby channel and broadcasts a message indicating that channel usage is complete again.
[0041] Specifically, the wireless communication method based on the competition mechanism disclosed herein is implemented through S110-S130.
[0042] In S110, in response to the local cached data volume reaching a preset threshold or the channel continuous idle time exceeding the idle threshold, the slave device generates a contention message to be sent out. The contention message carries at least the device ID, the total length of data to be transmitted, the service priority score, and the channel occupancy time estimated based on the total length of data to be transmitted and the historical channel error rate.
[0043] As used in this text, "local cache" refers to a storage area within a device (such as a sensor node) used for temporary storage of collected data. In IoT devices, wireless communication can be affected by factors such as signal interference and network congestion, making it impossible to guarantee that every piece of data can be uploaded in real time. Therefore, a local cache needs to be established on the device to temporarily store the collected data and send it all at once when channel conditions permit. The local cache is the core carrier of the "store first, send later" mechanism, and its size directly affects the amount of offline data the device can handle.
[0044] The local buffer can be implemented as a two-tier storage system consisting of a high-speed RAM cache and a persistent Flash cache. The RAM cache (Level 1 cache) resides in random access memory, offering fast read / write speeds and is suitable for temporarily storing real-time acquired data; however, this data is lost upon power failure. The Flash cache (Level 2 cache) resides in flash memory, ensuring data integrity even after power loss. It stores data that has overflowed from RAM or has not yet been successfully uploaded, providing persistent data protection. This two-tier cache forms a complementary structure of "high-speed temporary storage + secure persistence": daily acquired data is first written to RAM, and when RAM is nearly full or data requires long-term storage, it is then transferred to Flash.
[0045] The preset threshold for the amount of locally cached data can be a percentage or an absolute value of the cache capacity (such as 80% of the total cache). When the amount of data in the cache reaches or exceeds this threshold, the preset action is triggered.
[0046] The detection process for local cache data reaching a preset threshold can be as follows: The device's sensing and acquisition units (such as temperature and humidity sensors, PIR infrared detectors, etc.) continuously acquire environmental data at a predetermined acquisition frequency. Each acquired data entry is first written to the RAM cache. This writing process is controlled by the device's microcontroller (MCU), and the data is organized in a queue or linked list for easy subsequent unified packaging and processing. Simultaneously, the device's built-in data acquisition cache module continuously monitors the total data volume of both cache levels. Monitoring methods typically include active polling and interrupt triggering. Active polling involves the MCU reading the cache usage register or maintained write pointer position at fixed intervals (e.g., every 100ms) to calculate the currently used space. Interrupt triggering involves checking whether the currently used space has reached the threshold after each data write to the cache; if so, an interrupt signal is immediately triggered.
[0047] As used in this article, "channel idle" refers to a state where there is no valid radio frequency signal energy or the signal energy is below the carrier sense threshold (CCA threshold) at a specific frequency. From a physical perspective, the receiver's radio frequency chip continuously measures the Received Signal Strength Indication (RSSI) or preamble detection at the current frequency. If the measured value is below a preset threshold (e.g., -85dBm), the channel is determined to be idle and available for data transmission. It is important to note that "idle" is a relative concept: when other devices are transmitting data (even with weak signals) or when there is ambient noise (such as interference from industrial motors), the RSSI may increase, causing the channel to be judged as "busy".
[0048] As used in this article, "continuous idle duration" refers to the cumulative duration during which each channel sampling result is idle within a continuous observation period. The key difference between this and "cumulative idle duration" is that once any channel "busy" is detected within the sampling period, the continuous idle timer is immediately reset and restarted. For example, with a sampling period of 1ms / sample: if 100 consecutive samples (i.e., 100ms) are all determined to be idle, the continuous idle duration is 100ms; if busy is suddenly detected on the 101st sample, the timer resets to zero and needs to be accumulated again.
[0049] As used in this article, the term "idle threshold" refers to a preset time threshold (such as 50ms, 200ms, etc.) used to determine whether the channel is idle enough to initiate contention.
[0050] To achieve continuous idle detection, the slave device can periodically sample the channel state at fixed time intervals (e.g., 500 μs or 1 ms). Multiple samples constitute an observation window. In this invention, it is required that idle is detected for "N consecutive sampling periods," which essentially transforms temporal continuity into the continuity of the sampling sequence. Discretization enables real-time and reliable idle detection.
[0051] The specific execution process for detecting when the channel's continuous idle time exceeds the idle threshold may include the following steps: A1. Channel state sampling and physical layer detection; Both energy detection and preamble detection can be performed. Energy detection refers to the RF chip measuring the RSSI value at the current frequency. If it is lower than the preset CCA threshold (e.g., -80dBm), it is marked as idle. Preamble detection means that if a preamble conforming to the protocol format (e.g., LoRa's Chirp signal) is detected, the channel is directly determined to be occupied by another device, regardless of the RSSI value. In actual engineering, the two are usually combined (first detecting the preamble, and if not, detecting the energy value), which reduces the risk of misjudgment. The MCU actively reads the status register of the RF chip at a fixed period (e.g., T_s = 1ms) to obtain the busy / idle flag (Flag) at the current moment.
[0052] A2. Logic maintenance of the continuous idle timer; The MCU internally maintains a continuous idle counter, Count_Idle, and a corresponding timing variable. After each sample, the following state machine logic is executed: If the current sample result is idle: Count_Idle += 1, Duration_Idle = Count_Idle × T_s; If the current sample result is busy: immediately execute Count_Idle = 0, Duration_Idle = 0 (timer reset). This ensures "continuity"—if any sample determines that the device is busy, all previously accumulated idle records are invalidated and must be re-accumulated.
[0053] A3. Comparison trigger (reaching the idle threshold) Set the preset idle threshold to TH_IDLE (e.g., 200ms). Perform a comparison immediately after each update of Duration_Idle. To avoid frequent and repeated triggering, a trigger lock is usually set: once the trigger is successful, no new threshold judgment will be responded to until the contention process is completed (or at least all contention packets have been sent), even if the channel is still idle.
[0054] A4. Secondary confirmation before triggering; Because wireless channels are susceptible to sudden pulse interference (such as motor brush sparks, microwave oven leaks, etc.), extremely brief periods of false idle or false busy activity may occur. To ensure robust judgment, this invention can incorporate anti-jitter filtering in its engineering implementation. Before the continuous idle count reaches a threshold, a short confirmation window (e.g., an additional 2-3 sampling periods) can be added; or a "majority decision" mechanism can be introduced: if the percentage of idle times exceeds, for example, 90% in N consecutive samples, the channel is considered effectively idle.
[0055] As used in this text, the term "device unique ID" refers to a globally unique logical address of a device within the network (such as a 2-byte short address after MAC address compression, or the last 4 bytes of IEEE EUI-64). The device unique ID is used for addressing and authentication, ensuring that the allocated channel window is not mistakenly occupied by other devices; at the same time, the host records the historical transmission records of this ID, providing an index for updating the device's channel quality parameters (such as historical bit error rate).
[0056] The term “total data length to be transmitted” as used in this text refers to the total number of bytes of the original payload of all data to be transmitted from the device’s current two-level cache (RAM+Flash) (excluding additional overhead such as physical layer frame headers and check bits).
[0057] The term "business priority score" used in the text refers to a comprehensive quantitative indicator used to characterize the urgency and importance of this transmission, rather than a simple static priority.
[0058] As used in the text, “channel occupancy time” refers to the absolute wall-clock time that a device expects to exclusively occupy the channel from the time it sends the first frame of data until it receives the acknowledgment of the last frame (including all frame intervals and retransmission waits).
[0059] The channel occupancy time estimated based on the total length of data to be transmitted and the historical channel bit error rate can be performed according to the following model: T est = (L total / R bit ) × (1 + α × P err ) + T ctrl × N split ; Among them, T est L is the channel occupancy time. total P is the total length of data bits to be transmitted. err P is the historical average bit error rate (i.e., the historical channel bit error rate). err For adaptive transmission rate, T ctrl For single-slice control overhead duration, N split α represents the total number of data fragments, and α is the retransmission redundancy correction coefficient.
[0060] As used in this article, "historical average bit error rate" refers to the average bit error rate of the most recent N transmissions, which is maintained by statistically analyzing the bit error rate of each data transmission from the slave device. The window length can be dynamically adjusted according to the network load—the window is appropriately shortened under high load to quickly respond to channel changes, and the window is extended under low load to obtain a more stable statistical value.
[0061] As used in this article, "adaptive transmission rate" refers to the process by which a device continuously monitors channel quality metrics (signal-to-noise ratio, received signal strength, RSSI, etc.) during operation and dynamically selects the optimal transmission rate under the current channel conditions based on a preset modulation and coding scheme (MCS) table. This rate is determined in real time before each transmission and dynamically adjusted as channel conditions change.
[0062] As used in this article, "single fragment control overhead duration" refers to a fixed constant that is pre-calculated by the protocol stack based on parameters such as the currently used frame format and verification mechanism (FEC / ARQ).
[0063] As used in this article, "total number of data shards" refers to the total number of shards after a large amount of data has been evenly divided. The more shards there are, the more significant the cumulative effect of control overhead.
[0064] As used in this article, the "retransmission redundancy correction factor" refers to a weighted coefficient that is dynamically adjusted by the slave device based on historical transmission records. It is used to quantify the amplification effect of channel quality on transmission duration. In scenarios with strong interference and high historical bit error rates, α is automatically amplified to provide more time for the estimated duration and avoid transmission interruptions caused by insufficient host allocation window.
[0065] As used in this document, the term "contention message" refers to the core signaling carrier initiating a channel resource request from a slave device to a host. After meeting the contention triggering conditions, the slave device does not immediately begin transmitting large amounts of data. Instead, it first generates a short message containing its own resource requirement information and sends it to the host through a contention mechanism. The host then makes a unified decision and allocates channel resources. Essentially, it is a channel resource request frame—the slave device uses this message to "report" to the host the amount of data it needs to transmit, its priority, and the estimated transmission time, which the host uses to make scheduling decisions. Unlike the traditional CSMA / CA protocol where nodes directly compete to transmit data payloads, the contention message in this application only carries control information (not service data). The message is short and has low overhead; even if a collision occurs, the retransmission cost is far lower than the retransmission cost of large-capacity data fragmentation.
[0066] In one possible implementation, the slave device sends contention packets based on a load-aware adaptive backoff contention algorithm; Specifically, the load-aware adaptive backoff contention algorithm includes: The network load coefficient is determined based on the number of historical contention conflicts and channel occupancy rate, and the network load coefficient is used to divide the area into low load, medium load, and high load zones. In the low-load range, the operations of "reducing the backoff window, shortening the waiting time, and quickly seizing the channel" are performed; During the aforementioned load range, the "basic binary exponent backoff rule" operation is executed; In the high-load range, the operation of "expanding the overall backoff window and simultaneously reducing the preset value of the backoff window scaling factor for high-priority devices with large data volumes" is performed.
[0067] As used in the text, "backoff" refers to the process in wireless communication where, when a device detects a busy channel or a message collision, it randomly waits for a period of time before retrying to send the message. The purpose is to stagger the sending times of different devices and reduce the probability of another collision.
[0068] As used in the text, the term "backoff window" refers to the range of values for the backoff time. The specific backoff duration is usually a randomly selected integer (representing the number of time slots) within the interval [0, CW]. A larger window provides a wider selection range, a longer average waiting time, and a lower probability of collision, but also results in a greater channel access delay.
[0069] The term "binary exponential backoff" used in this text refers to the standard algorithm of traditional MAC protocols (such as CSMA / CA). Whenever a transmission fails (a collision occurs), the backoff window CW doubles (i.e., multiplies by 2); when a transmission succeeds, the CW resets to its minimum value.
[0070] As used in the text, the term "network load factor" describes the current level of network congestion. It is calculated from the combined statistics of "historical contention collision count" and "channel occupancy rate" from the devices, and is used to classify the current network into three load ranges: low, medium, and high.
[0071] As used in this article, the "scaling factor" is a core adjustment parameter that distinguishes it from the traditional BEB algorithm. It allows the device to multiply the base backoff window by a factor less than 1 (acceleration) or greater than 1 (deceleration) to differentiate between different priority services (such as large volumes of data).
[0072] It can be understood that the "load-aware adaptive backoff contention algorithm" can be viewed as an intelligent "queuing" mechanism. Its core is to allow slave devices to perceive the current network congestion level before sending contention packets and dynamically adjust their "queuing" strategy accordingly. The execution process of sending contention packets based on the load-aware adaptive backoff contention algorithm can include the following steps: B1. Real-time statistics and load factor calculation (perception layer). Before each attempt to send a contention message, the device must first assess the current macroscopic state of the network.
[0073] The device continuously maintains a sliding time window, counting the number of times it fails to compete (reflecting collision intensity) and the percentage of time it detects busy channels (reflecting channel occupancy). These two metrics are then weighted to generate the network load coefficient for the current moment. This coefficient is a numerical value (e.g., 0.0~1.0) that dynamically fluctuates based on the real-time network status.
[0074] B2. Load range determination (decision level); Based on the calculated network load coefficient, it is mapped to a three-level load state from the device's internal logic, and the baseline value of the base backoff window (Base_CW) is determined: Low load range (lower coefficient): If channel resources are deemed sufficient, a window shrinking strategy is implemented. The basic backoff window is reduced to a minimum value below the standard BEB, with the aim of allowing devices to "get ahead" and quickly send contention packets to fully utilize idle bandwidth.
[0075] Medium load range (medium coefficient): Maintain the conventional competition strategy, implement the standard binary exponential backoff rule, and the window increases by a power of 2 with the number of conflicts.
[0076] High load range (higher coefficient): Determined to be in a severe congestion state, a window expansion strategy is implemented. The basic backoff window is expanded as a whole (e.g., forcibly expanded several times), forcing all devices to enter a longer waiting period, macroscopically suppressing frequent collisions and preventing the wireless channel from collapsing due to disordered preemption.
[0077] B3. Weighting of large-capacity data (priority correction layer). This is the key to solving the "starvation" problem of large-capacity data in this patent. After determining the load range, the algorithm introduces a weight correction mechanism: Check the service priority score (Score) and total amount of data to be transmitted for the currently pending competitive packets. total ).
[0078] If the device is identified as a high-priority, high-capacity data device, the scaling factor will be reduced. Specifically, regardless of the current load range, the actual backoff window for this device will be multiplied by a scaling factor of 0.5 (i.e., reduced by 50%) from the base window mentioned above.
[0079] Under high load, ordinary devices wait 100ms, while high-capacity devices only need to wait 50ms; under low load, ordinary devices wait 10ms, while high-capacity devices only wait 5ms. This ensures that massive amounts of data do not need to queue repeatedly and can obtain the right to speak on the channel first.
[0080] B4. Random backoff waiting (execution layer); After the above steps, the device finally determines the actual backoff window (Final_CW) for this transmission = base window × priority scaling factor. An integer value is randomly selected from the range [0, Final_CW] as the backoff duration before this transmission. The device suspends the transmission operation, and after the counter countdown reaches zero, it immediately initiates the physical layer transmission of the contention packet.
[0081] B5. Competition Result Feedback and Dynamic Window Evolution (Adaptive Layer); After sending the contention message, different evolutionary logics are executed based on the channel feedback results, that is, If transmission is successful: Upon receiving an ACK confirmation from the host, the contention ends, and the backoff window is reset to the minimum value corresponding to the load range. If transmission fails (collision occurs): An adaptive exponential growth mechanism is triggered. Here, "adaptive" means the growth rate is strictly limited by the current load factor—the growth rate is steeper under high load (but does not exceed the hard upper limit), while the growth is relatively gentler under low load. Simultaneously, the algorithm sets a maximum window threshold (CW_max) to prevent a single device from experiencing an exponentially explosive increase in backoff time due to continuous collisions, leading to an infinite waiting state. If no response is received within a timeout: Retransmission is performed at intervals according to the exception handling logic, and a deep sleep mechanism is activated to save power.
[0082] In S120, when the master device detects that the channel is idle after receiving a contention message from the slave device, it generates an allocation message containing window information and is to be sent out based on a preset scheduling strategy that includes network load status. The window information is used to indicate the continuous channel occupancy window without fixed time slot constraints allocated to the slave device of the contention message.
[0083] It should be noted that the "host determines the channel is idle" step S120 and the "device detects continuous channel idleness" step S110 together constitute a "dual protection" mechanism. Specifically, the device detection is a "gatekeeper initial screening," using an intuitive "watchdog" timer to ensure that the device does not blindly transmit data when the channel is extremely busy. The host determination is a "central system final inspection," utilizing a sliding window with memory function and intelligent floating thresholds to eliminate transient interference at the physical layer and ensure that the continuous window allocated to large-capacity data is absolutely reliable.
[0084] Although both use the phrase "channel idle," they differ significantly in their triggering phase, detection granularity, algorithm logic, target role, and subsequent actions. The following is an in-depth comparative analysis based on the patent text: (1) The triggering phase and the process position are different (time dimension); Slave idle listening: This occurs at the very beginning of the communication process and is considered a "contention initiation condition." Before sending a contention message, the slave device must confirm that the current channel at least "appears to be idle," otherwise it is not even eligible to send a message. Host idle determination occurs after receiving the contention message but before issuing the allocation message, and is considered a "final security check before resource allocation." The host has received the slave device's request, but before officially "making a decision" on channel allocation, it must again confirm that the physical channel is indeed not interfered with or occupied.
[0085] (2) The detection granularity and algorithm complexity are different (technical dimension); Device-based listening (coarse-grained): Employs simple counting-based listening. It relies solely on a local timer to detect whether the channel remains idle for "N consecutive sampling periods" and whether the idle duration exceeds a preset time threshold. This is a basic, non-intelligent "silent detection." Host-based decision-making (fine-grained): Employs a sliding window dynamic threshold mechanism. The host maintains a sliding window of length M, storing historical sampling data, rather than only considering the current moment. Weighted averaging: The data within the window is weighted and averaged to filter out occasional burst noise. Threshold adaptation: The idle threshold is not fixed but dynamically and adaptively adjusted based on channel noise and historical interference intensity. Continuous confirmation: Allocation is only allowed after K consecutive samples within the sliding window are determined to be idle.
[0086] (3) The purpose and role positioning are different (functional dimension); The purpose of device listening is "preemption." It aims to find an opportunity window to send contention packets, representing a primary awareness of the shared medium by "edge nodes," triggering subsequent request processes. The host's judgment aims for "adjudication and protection." As the core scheduler of the network, the host bears the responsibility of preventing misjudgments. Even if the slave device considers the channel idle, the host must use more sophisticated algorithms to eliminate sudden interference (such as brief electromagnetic pulses) to ensure that the subsequently allocated "long continuous window" is never unexpectedly interrupted, thereby guaranteeing the stability of continuous transmission of large volumes of data.
[0087] (4) The subsequent actions are different (result dimension); After a slave device determines it is idle: the action is "initiation"—starting the load-aware adaptive backoff algorithm and sending a contention message. After a master device determines it is idle: the action is "termination and allocation"—formally executing the three-level load balancing scheduling algorithm, allocating a continuous channel window without fixed time slots for the slave device, and broadcasting allocation messages.
[0088] In one possible implementation, the master device detects that the channel is idle based on a sliding window dynamic threshold algorithm; Specifically, the sliding window dynamic threshold algorithm involves sampling the channel state at a fixed period of N, recording the sampled channel state data using a sliding window of length M, and weighting the channel occupancy markers within the window to a weighted average. A dynamic idle threshold is set, which is adaptively adjusted according to channel noise and historical interference intensity. Channels whose sampled channel state is idle for K consecutive records of the sliding window are determined to be idle.
[0089] Specifically, the execution process of the sliding window dynamic threshold algorithm includes the following: C1. Fixed-period channel sampling; After the host starts up, it continuously triggers channel sampling operations at a fixed period of N (e.g., every 1ms): the host reads the current channel RSSI (Received Signal Strength Indicator) value through the radio frequency module; each sampling obtains a value (e.g., a signed integer value) reflecting the current channel signal energy; the sampling operation continues uninterrupted, unaffected by network load status, forming an uninterrupted channel monitoring data stream.
[0090] C2. Sliding window storage and updating; The master device maintains a sliding window (FIFO queue) of length M to store the data from the most recent M samples. Each time new sampled data arrives, the oldest sampled data is removed from the window, and the new data is moved into the window. The window always holds the data from the most recent M samples, forming a "historical record of the most recent M samples." The choice of window length M requires a trade-off: too small a value results in insufficient smoothing, while too large a value leads to lag. The optimal value of M is determined through actual testing, balancing anti-interference capability and response speed.
[0091] C3. Channel occupancy marker generation; After each sampling, the master device compares the current sampled value with the current dynamic idle threshold: if the sampled value is greater than or equal to the current idle threshold, the sampling point is marked as "Busy," indicating that the channel is occupied; if the sampled value is less than the current idle threshold, the sampling point is marked as "Idle," indicating that the channel is idle. These "Busy / Idle" markings are stored in the sliding window as the raw data for the weighted average.
[0092] C4. Weighted average calculation; The master device performs a weighted average of the channel occupancy markers of M sampling points within the sliding window: The weighting principle is that sampling points from more recent times have higher weights, and sampling points from more distant times have lower weights; for example, the newest sampling point has a weight of W1 (the highest), the second newest has a weight of W2 (the second highest), ..., and the oldest has a weight of W... M (Minimum); Calculate the weighted average: Weighted_Avg = (W1×Mark1+ W2×Mark2+ … + W M ×Mark M ) / (W1+W2+…+W M ); The Mark value is a numerical representation of "busy = 1, idle = 0". Therefore, the weighted average value actually reflects the proportion of busy channels within the window (the closer the value is to 1, the busier it is, and the closer it is to 0, the more idle it is).
[0093] By using weighted averaging, the occasional fluctuations in a single sample (such as the instantaneous "busy" markers caused by sudden pulse interference) are smoothed out by the "inertia" of historical data, making the channel state judgment more robust.
[0094] C5. Dynamic idle threshold adaptive update; The dynamic idle threshold is not static, but continuously and adaptively adjusted based on the channel noise level and historical interference intensity. (1) Real-time tracking of noise level The host continuously monitors the signal strength (i.e., noise floor) during channel idle periods. Since the noise signal strength is relatively stable, the host maintains a dynamic noise baseline value using methods such as exponentially weighted moving averages. noise level new = α × noiseLevel old + (1-α) × noiseRSSI current ; Where α is a smoothing coefficient (e.g., 0.75), the threshold update tracks noise changes while avoiding drastic fluctuations.
[0095] (2) Historical statistics on interference intensity; The master device statistically analyzes the signal strength distribution during "busy" states in historical sampling and maintains a busy signal strength statistic, avgSignal. This statistic reflects the minimum strength level of a valid signal in the current environment.
[0096] (3) Bidirectional adaptive adjustment of threshold; The threshold is lowered when it is too high. Specifically, if all sampling results within a period of time are "idle" (all sampled values are lower than the current threshold), it indicates that the current threshold may be set too high, misjudging valid signals as noise, and the threshold should be appropriately lowered. The threshold is raised when it is too low. If all monitoring results within a long period of time are "busy" (frequently judging the channel as occupied), it indicates that the current threshold may be set too low, misjudging noise as signal, and the threshold should be appropriately raised. Through this two-way closed-loop feedback, the dynamic idle threshold always converges to the true critical value of the current channel environment—slightly higher than the noise floor and slightly lower than the valid signal strength.
[0097] (4) Adaptive weighting of interference intensity In environments with strong interference, the dynamic threshold will also adjust the judgment standard upward based on historical interference intensity statistics, making the channel idle determination more stringent and avoiding misjudging noise interference signals as valid transmissions in strong interference environments; in environments with weak interference, the threshold will be appropriately lowered to improve the sensitivity of channel utilization.
[0098] C6. K consecutive idle confirmations (final determination); Even if the weighted average is lower than the dynamic idle threshold, the host does not immediately perform channel allocation, but instead initiates a final security review: checking the original judgment results of the most recent K samples (K ≤ M) within the sliding window; requiring that all K samples are marked as "idle" (no "busy" marks appear for K consecutive times); the host only finally confirms that the channel is idle and allows channel allocation to be performed when both of the following conditions are met: the window weighted average is < the dynamic idle threshold (idle at the macroscopic statistical level); and all of the most recent K samples are consecutively "idle" (continuously stable idle at the microscopic temporal level).
[0099] Here, the requirement of "K consecutive times" completely eliminates misjudgments caused by sudden interference pulses (such as instantaneous signal spikes caused by motor start-up and shutdown, lightning, etc.) - even if a sample is mistakenly marked as "busy" due to sudden interference, the judgment will fail because it will disrupt the "continuity" and K consecutive idle times must be accumulated before allocation can be performed.
[0100] C7. Assignment execution and state reset; When both conditions of C7 are met, the host confirms that the channel is truly available and idle, and then enters the channel allocation process—executing the three-level load balancing scheduling algorithm to allocate a continuous channel window to the successfully contested slave device and broadcasting the allocation message. After allocation, the sliding window continues to sample, providing data support for the next round of channel idle detection.
[0101] Here, the term "no fixed time slot constraint" means that the system does not pre-set any periodic, fixed-length time slices (slots). Traditional TDMA protocols divide the time axis into small segments of equal length or preset proportions, and devices can only transmit within their own segments. This application breaks this limitation, with the allocated time window having a flexible start point and variable length, entirely determined by the actual amount of data to be transmitted, thus eliminating "time fragmentation".
[0102] The term "continuous channel occupancy window" refers to a period of wireless channel usage that is completely continuous, uninterrupted, and undivided in time, allocated by a master device to a single slave device. Within this window, the slave device can continuously transmit data as if it were "occupying a dedicated line," without having to frequently switch or wait between multiple time slots, significantly reducing frame header switching and synchronization overhead.
[0103] In one possible approach, the preset scheduling strategy that includes network load status specifically includes: The network load factor is determined based on the number of slave devices currently requesting access and the total amount of data to be transmitted. When the load factor is higher than the first threshold, a large-capacity data priority scheduling is adopted, and the channel window is allocated to the slave device with the largest amount of data to be transmitted. When the load factor is lower than the second threshold, first-come-first-served scheduling is adopted, and channel windows are allocated according to the arrival order of competing packets. When the load factor is between the first threshold and the second threshold, a hybrid weighted scheduling is adopted. The scheduling weight is calculated by comprehensively considering the amount of data to be transmitted by the slave device and the waiting time, and the channel window is allocated according to the weight.
[0104] It is important to note that the aforementioned preset scheduling strategy in this application can be summarized as a three-level load hybrid scheduling: triggering first-come, first-served scheduling, ensuring complete fairness and rapid response under light loads; triggering big data priority, concentrating bandwidth to clear congestion and reducing the overall system overflow risk; triggering hybrid weighting, dynamically adjusting γ and δ for a smooth transition; and employing fully automatic closed-loop scheduling, reassessing the load and potentially switching algorithms after each window allocation. This balances high throughput (efficiency) with starvation prevention (fairness), achieving Pareto optimality.
[0105] As used in this text, the term "allocation message" refers to a control frame generated by the host and broadcast to all slave devices in the network. It does not carry service data, but rather instructions for allocating channel resources. Its main function is to inform the entire network (especially the selected target slave device) "when, on which channel, and in what manner" data transmission should take place next.
[0106] Referencing the contention message, the allocation message's core content encapsulates the following key information: a. Target device ID, used to clearly identify the unique recipient of this channel allocation; b. Channel window start time, which specifies the precise moment when the target device can begin transmitting data; c. The total duration of continuous occupation specifies the total length of time during which the target device can continuously occupy the channel; d. Recommended transmission rate: Suggest the physical layer transmission rate used by the target device; e. Backup channel number is used for backup channel indication in multi-frequency interference backup; f. Error control information, such as CRC checksum and redundancy coding, is used to ensure the reliable transmission of the message itself.
[0107] In S130, after receiving the allocation message sent by the master device, the slave device performs data transmission based on the window information of the allocation message.
[0108] In one possible implementation, after receiving the allocation message sent by the master device, data transmission is performed based on the window information of the allocation message, specifically including: First segment of synchronous broadcast: After receiving the allocation message sent by the master device, the slave device broadcasts a channel occupancy notification message to the entire network so that all slave devices can synchronously update their local channel status and stop channel contention during the continuous channel occupancy window; The slave device completes data transmission within the continuous channel occupancy window; The second stage of synchronous broadcast release: The device broadcasts the end release message to the entire network so that the channel status is synchronously updated to idle.
[0109] It's important to note that the core purpose of the first synchronous broadcast is to inform all slave devices in the network in advance that a continuous channel window will soon be occupied by a certain device, and other devices should actively cease competing during this period. This mechanism directly solves the classic "hidden terminal problem" in wireless communication—in traditional CSMA / CA protocols, due to the limited range of wireless signal propagation, some slave devices may not be able to detect the target device's transmission behavior, but can still detect the host (receiver), thus misjudging the channel as idle during the target device's transmission and initiating contention, causing data collisions. This patent, through mandatory network-wide broadcast notification, ensures that all slave devices (regardless of whether they can detect the target device) are clearly aware of the time period during which the channel will be occupied, thereby eliminating collisions caused by hidden terminals at the source.
[0110] When the device sends the first synchronization broadcast (and the second release broadcast), it does not send it only once, but repeats the same broadcast message three times within a certain time interval. The purpose is to ensure that even in weak signal scenarios, if some broadcast messages are lost due to interference or attenuation, other nodes still have a sufficient chance to receive at least one complete broadcast notification. The choice of the three retransmissions is a trade-off between reliability and transmission overhead—too few retransmissions result in insufficient reception probability for weak signal nodes, while too many retransmissions increase unnecessary channel occupancy overhead. This patent has determined through actual testing that three retransmissions are the optimal value.
[0111] The core content of the control frames sent from the device in the first segment of synchronous broadcast includes: The device's own ID is used to identify the device that will soon occupy the channel; The channel window start and end time is used to clearly inform the entire network of the precise start and end times when the device occupies the channel; The fragment number indicates the total number of data fragments transmitted in this transfer, which helps other devices assess the duration of the transfer. The control frame carried in the second segment of the synchronous broadcast contains the following: The actual transmission duration report shows the actual channel time used, which is used for reference by the host and other devices. Transmission success rate, used to reflect the integrity of this transmission; Fragment loss statistics record the number of lost fragments, which is used to assist in network quality assessment.
[0112] Each slave device maintains a local data structure (such as a bitmap or list) to record information about all currently occupied channel windows in the network. Whenever a slave device receives the first synchronization broadcast (occupancy notification) or the second synchronization broadcast (release notification), it updates this table: upon receiving an occupancy notification, it marks the corresponding time period as "busy" in the table; upon receiving a release notification, it marks the corresponding time period as "idle". This table is the direct basis for each slave device to decide whether to initiate channel contention—before initiating contention, the slave device queries this table; if the target time period is already marked as "busy", it voluntarily relinquishes the contention.
[0113] This is an automatic exception recovery logic triggered when other slave devices in the network do not receive a second broadcast (release broadcast) within a preset timeout period. Its core rule is: if a slave device does not receive a release broadcast within the timeout period, it automatically determines that the current channel occupancy is abnormal and forcibly updates its local channel status to idle. This mechanism prevents the network-wide paralysis caused by the target device's abnormality (such as sudden power outage, system crash, or disconnection from the network) leading to "permanent channel occupancy," and is a crucial guarantee of system robustness.
[0114] The comprehensive transmission strategy employed by a device when performing data transmission after obtaining a continuous channel window includes the following core sub-mechanisms: (1) Data fragmentation: The ultra-large capacity data is equally divided into fragments of fixed length. Each fragment carries a fragment sequence number and a total fragment identifier, and supports breakpoint resume. (2) Adaptive rate adjustment: Real-time acquisition of channel signal-to-noise ratio and bit error rate, and dynamic adjustment of radio frequency transmission rate - if the channel quality is good, the rate is increased to shorten the occupation time, and if the interference is severe, the rate is reduced to reduce packet loss. (3) Multi-threaded concurrent transmission: Combined with a sliding window flow control mechanism to prevent buffer overflow and packet loss at the receiving end; (4) Joint Error Control: A joint mechanism is adopted, employing Forward Error Correction (FEC, where the sender adds redundant information to the data, allowing the receiver to directly correct some errors without retransmission) and Automatic Repeat Request (ARQ, where the receiver requests retransmission from the sender after detecting an error). FEC is used to correct a small number of errors to reduce the number of retransmissions, while ARQ is used to handle serious errors that FEC cannot correct. The two complement each other to improve transmission reliability in complex industrial environments. In one possible implementation, the method further includes multi-frequency channel interference backup; specifically, the multi-frequency channel interference backup involves the host monitoring the current channel quality in real time, and when the interference index exceeds the threshold, broadcasting a channel switching command, and all devices synchronously switching to a preset backup frequency. The method also includes hierarchical energy consumption optimization; specifically, the hierarchical energy consumption optimization involves the device switching power consumption modes according to the contention state and network load; short sleep during contention idle intervals, deep sleep during high-load scenarios after contention failure, and full-device sleep during periods without data acquisition; and adaptive reduction of RF transmission power during high-capacity data transmission phases based on communication distance. The method also includes end-to-end anomaly self-healing, which specifically includes: If the device does not receive the allocation message within the preset first timeout period, it will retransmit the contention request at an exponentially increasing interval, and enter sleep mode after reaching the maximum number of retries. During transmission, if it is predicted that the allocated window is insufficient to carry the remaining data, a duration extension request is sent to the host, and the host dynamically adds channel windows; If a device in the network does not receive a release broadcast within the preset second timeout period, it is determined that the current channel occupancy is abnormal, and the channel status is forcibly updated to idle.
[0115] The method described in this application has the following technical advantages: Abandoning the traditional fixed-slot architecture of superframes, it dynamically allocates continuously variable channel windows to adapt to the one-time transmission of MB-level massive data; it pioneers a two-stage broadcast synchronization mechanism to unify the channel status across the entire network, significantly reducing hidden terminal conflicts; it establishes a mathematical model for predicting the adaptive channel occupancy time of large-capacity data, accurately allocating channel resources and avoiding bandwidth waste; a three-level load hybrid scheduling strategy dynamically balances the efficiency of large-capacity data transmission with the fairness of access for small devices; and it optimizes energy consumption, anti-interference, and anomaly self-healing capabilities through software and hardware collaboration, adapting to the complex field environments of industrial IoT and smart agriculture.
[0116] This method can be widely applied to scenarios such as online monitoring of industrial equipment status, multi-dimensional environmental data collection in smart farmland, massive sensor tracking in logistics and warehousing, and urban pipeline network monitoring. It can be ported to mainstream IoT wireless solutions such as ZigBee, LoRa, and private 2.4G radio frequency, with low hardware modification costs and low barriers to industrialization. With the large-scale deployment of massive IoT sensor nodes, this invention has broad promotional value and can also be extended to extended scenarios such as low latency tolerance edge data backhaul and unmanned monitoring networks in the wild.
[0117] Please refer to Figure 3 The diagram illustrates a block diagram of a wireless communication device based on a contention mechanism, according to this application. This device 200 is used in a wireless communication system comprising a master device and multiple slave devices. The device includes: The first generation and transmission module 210 is used to generate a contention message to be sent out in response to the local cache data volume reaching a preset threshold or the channel continuous idle time exceeding the idle threshold. The contention message carries at least the device ID, the total length of data to be transmitted, the service priority score, and the channel occupancy time estimated based on the total length of data to be transmitted and the historical channel bit error rate. The second generation and transmission module 220 is used to generate an allocation message containing window information and to be sent out based on a preset scheduling strategy containing network load status when the master device detects that the channel is idle after receiving a contention message from the slave device. The window information is used to indicate the continuous channel occupancy window without fixed time slot constraints allocated to the slave device of the contention message. The transmission module 230 is used by the slave device to perform data transmission based on the window information of the allocation message after receiving the allocation message sent by the master device.
[0118] Since the methods mentioned above have already been discussed in detail, the specific execution of the above modules will not be repeated here.
[0119] The following describes an execution device provided by an embodiment of this application. Please refer to... Figure 3 , Figure 3 This is a schematic diagram of an execution device provided in an embodiment of this application. Specifically, the execution device 300 includes: a receiver 301, a transmitter 302, a processor 303, and a memory 304 (wherein the touchscreen oscilloscope 300 may contain one or more processors 303). Figure 3 (Taking a processor as an example), processor 303 may include application processor 3031 and communication processor 3032. In some embodiments of this application, receiver 301, transmitter 302, processor 303 and memory 304 may be connected via bus or other means.
[0120] Memory 304 may include read-only memory and random access memory, and provides instructions and data to processor 303. A portion of memory 304 may also include non-volatile random access memory (NVRAM). Memory 304 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0121] Processor 303 controls the operation of the touchscreen oscilloscope. In specific applications, the various components of the touchscreen oscilloscope are coupled together through a bus system. This bus system includes not only the data bus but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.
[0122] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 303. Processor 303 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 303 or by instructions in software form. Processor 303 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 303 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 304. The processor 303 reads the information from memory 304 and, in conjunction with its hardware, completes the steps of the above method.
[0123] Receiver 301 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the touchscreen oscilloscope. Transmitter 302 can be used to output digital or character information through the first interface; transmitter 302 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 302 may also include a display device such as a display screen.
[0124] In this embodiment of the application, the processor 303 is used to execute... Figure 1 The method in the corresponding embodiment. The specific manner in which the application processor 3031 in processor 303 executes the above steps is the same as that in this application. Figure 1 The various method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figure 1 The corresponding method embodiments are the same, and for details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0125] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A wireless communication method based on a contention mechanism, characterized in that, This is applied to a wireless communication system, which includes a master device and multiple slave devices. The method includes: In response to the local cached data volume reaching a preset threshold or the channel being idle for a continuous period of time exceeding the idle threshold, the slave device generates a contention message to be sent out. The contention message carries at least the device ID, the total length of data to be transmitted, the service priority score, and the channel occupancy time estimated based on the total length of data to be transmitted and the historical channel bit error rate. When the master device detects that the channel is idle after receiving a contention message from the slave device, it generates an allocation message containing window information and is to be sent out based on a preset scheduling strategy that includes network load status. The window information is used to indicate the continuous channel occupancy window without fixed time slot constraints allocated to the slave device of the contention message. After receiving the allocation message sent by the master device, the slave device performs data transmission based on the window information of the allocation message.
2. The method according to claim 1, characterized in that, The estimated channel occupancy time is dynamically determined based on the total amount of data to be transmitted, the current transmission bit rate, the historical channel bit error rate, and the protocol control overhead.
3. The method according to claim 1, characterized in that, The preset scheduling strategy, which includes network load status, is specifically as follows: The network load factor is determined based on the number of slave devices currently requesting access and the total amount of data to be transmitted; When the load factor is higher than the first threshold, large-capacity data priority scheduling is adopted, and channel windows are allocated to the slave device with the largest amount of data to be transmitted. When the load factor is lower than the second threshold, first-come-first-served scheduling is adopted, and channel windows are allocated according to the arrival order of competing packets. When the load factor is between the first threshold and the second threshold, a hybrid weighted scheduling is adopted. The scheduling weight is calculated by comprehensively considering the amount of data to be transmitted by the slave device and the waiting time, and the channel window is allocated according to the weight.
4. The method according to claim 1, characterized in that, The sending of contention messages from the device is based on a load-aware adaptive backoff contention algorithm. Specifically, the load-aware adaptive backoff contention algorithm includes: The network load coefficient is determined based on the number of historical contention conflicts and channel occupancy rate, and the network load coefficient is used to divide the area into low load, medium load, and high load zones. In the low-load range, the operations of "reducing the backoff window, shortening the waiting time, and quickly preempting the channel" are performed; During the aforementioned load range, the "basic binary exponent backoff rule" operation is executed; In the high-load range, the operation of "expanding the overall backoff window and simultaneously reducing the preset value of the backoff window scaling factor for high-priority devices with large data volumes" is performed.
5. The method according to claim 1, characterized in that, The master device detects that the channel is idle based on a sliding window dynamic threshold algorithm. Specifically, the sliding window dynamic threshold algorithm involves sampling the channel state at a fixed period of N, recording the sampled channel state data using a sliding window of length M, and weighting the channel occupancy markers within the window to a weighted average. A dynamic idle threshold is set, which is adaptively adjusted according to channel noise and historical interference intensity. Channels whose sampled channel state is idle for K consecutive records of the sliding window are determined to be idle.
6. The method according to claim 1, characterized in that, After receiving the allocation message sent by the master device, the slave device performs data transmission based on the window information of the allocation message, specifically including: After receiving the allocation message from the master device, the slave device broadcasts a channel occupancy notification message to the entire network to enable all slave devices to synchronously update their local channel status and to stop channel contention during the continuous channel occupancy window. The slave device completes data transmission within the continuous channel occupancy window; The device broadcasts a release message to the entire network to indicate the end of transmission, so that the entire network can synchronously update the channel status to idle.
7. The method according to claim 1, characterized in that, The method also includes multi-frequency channel interference backup; specifically, the multi-frequency channel interference backup involves the host monitoring the current channel quality in real time, and when the interference index exceeds the threshold, broadcasting a channel switching command, and all devices synchronously switching to the preset backup frequency. The method also includes hierarchical energy consumption optimization; specifically, the hierarchical energy consumption optimization involves the device switching power consumption modes according to the contention state and network load; short sleep during contention idle intervals, deep sleep during high-load scenarios after contention failure, and full-machine sleep during periods without data acquisition. During high-capacity data transmission, the radio frequency transmission power is adaptively reduced based on the communication distance. The method also includes end-to-end anomaly self-healing, which specifically includes: If the device does not receive the allocation message within the preset first timeout period, it will retransmit the contention request at an exponentially increasing interval, and enter sleep mode after reaching the maximum number of retries; During transmission, if it is predicted that the allocated window is insufficient to carry the remaining data, a duration extension request is sent to the host, and the host dynamically adds channel windows; If a device in the network does not receive a release broadcast within the preset second timeout period, it is determined that the current channel occupancy is abnormal, and the channel status is forcibly updated to idle.
8. A wireless communication device based on a competition mechanism, characterized in that, This is applied to a wireless communication system, which includes a master device and multiple slave devices. The device includes: The first generation and transmission module is used to generate a contention message to be sent out in response to the local cached data volume reaching a preset threshold or the channel continuous idle time exceeding the idle threshold. The contention message carries at least the device ID, the total length of data to be transmitted, the service priority score, and the channel occupancy time estimated based on the total length of data to be transmitted and the historical channel bit error rate. The second generation and transmission module is used to generate an allocation message containing window information and to be sent out based on a preset scheduling strategy containing network load status when the master device detects that the channel is idle after receiving a contention message from the slave device. The window information is used to indicate the continuous channel occupancy window without fixed time slot constraints allocated to the slave device of the contention message. The transmission module is used by the slave device to perform data transmission based on the window information of the allocation message after receiving the allocation message sent by the master device.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When a computer program is executed by a processor, it implements the method as claimed in any one of claims 1 to 7.
10. An execution device, characterized in that, The execution device includes a processor and a memory, with the processor coupled to the memory; Memory, used to store computer programs; A processor for executing a computer program in memory, causing an execution device to perform the method as claimed in any one of claims 1 to 7.
