Wireless terminal adaptive dormancy management method, apparatus, and wireless network terminal

By adjusting the wake-up time using the adaptive beacon frame arrival offset sequence, the problem of unstable beacon wake-up in complex wireless environments of substations is solved, improving communication stability and battery life.

CN123145672APending Publication Date: 2026-11-20MEIZHOU POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611516744.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The existing fixed beacon periodic wake-up method causes terminals to wait too early or miss beacons too late in the complex wireless environment of substations, making it difficult to balance communication stability and energy efficiency.

Method used

By acquiring the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card, the beacon arrival offset sequence is determined, and the early wake-up protection duration is determined based on the offset sequence. A wake-up control command is then generated to instruct the wireless network interface card to enter the wake-up state at an appropriate time.

Benefits of technology

It reduces beacon waiting time and missed reception, improves wireless communication stability and extends terminal battery life, adapting to the complex wireless environment of substations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145672A_ABST
    Figure CN123145672A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a wireless terminal adaptive dormancy management method, device and wireless network terminal. The method comprises the following steps: acquiring actual arrival time, nominal sending period and wireless network interface card wake-up time consumption of a plurality of continuous beacon frames; determining the nominal arrival time of each beacon frame based on the actual arrival time and the nominal sending period of the first beacon frame; determining the beacon arrival offset sequence according to the difference between the actual arrival time and the corresponding nominal arrival time, and determining the early wake-up protection time length based on the sequence; taking the beacon frame to be received after the plurality of continuous beacon frames as a target beacon frame, and determining the nominal arrival time of the target beacon frame according to the actual arrival time and the nominal sending period of the first beacon frame; determining the target wake-up time and generating a wake-up control instruction according to the nominal arrival time of the target beacon frame, the early wake-up protection time length and the wireless network interface card wake-up time consumption. The method improves the beacon frame receiving stability and the device energy efficiency utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal energy-saving management technology, and in particular to a wireless terminal adaptive sleep management method, device and wireless network terminal. Background Technology

[0002] With the continuous advancement of intelligent power system construction, substations, as core nodes of the power system, deploy a large number of intelligent monitoring electronic devices, such as relay protection room monitoring terminals, switchgear online monitoring terminals, and inspection robot communication terminals. These terminal devices typically maintain a connection with access points via wireless networks and undertake key functions such as transmitting telemetry and control commands within the substation, real-time reporting of equipment status, and alarm linkage message transmission. This wireless network can employ a Wireless Local Area Network Authentication and Privacy Infrastructure (WAPI). Due to the complex environment of substations, with factors such as electromagnetic interference and signal obstruction causing wireless link instability, terminal devices need to maintain stable network connections while reducing power consumption through efficient sleep management strategies to extend battery life. Therefore, terminal sleep management technology has become a crucial element in ensuring the communication stability and battery life of intelligent monitoring equipment in substations.

[0003] In existing technologies, terminal sleep management typically employs a wake-up strategy based on a fixed beacon period. After completing WAPI network association, the terminal presets a fixed wake-up period according to the beacon interval field in the access point beacon frame. Before the start of each beacon period, the terminal wakes up the wireless network interface card, receives and parses the beacon frame sent by the access point, and checks the bitmap bit in the traffic indication mapping field corresponding to its own terminal identifier to determine whether there is data to be received. If the bitmap bit is zero, the terminal assumes that the access point has no cached data and immediately enters a low-power state; if the bitmap bit is non-zero, the terminal remains awake and sends a cached data request frame.

[0004] However, the existing fixed beacon periodic wake-up method has problems such as terminals waiting too early or missing beacons too late in complex wireless environments, making it difficult to balance the communication stability and energy efficiency of substation intelligent monitoring equipment. Summary of the Invention

[0005] The wireless terminal adaptive sleep management method, device and wireless network terminal provided in this application are used to solve the problem that the existing fixed beacon periodic wake-up method causes the terminal to wait for the beacon too early or miss the beacon too late in the complex wireless environment of the substation, making it difficult to balance communication stability and energy efficiency.

[0006] In a first aspect, embodiments of this application provide a wireless terminal adaptive sleep management method, applied to a wireless network terminal in a substation intelligent monitoring device. The wireless network terminal includes a wireless network interface card, and the method includes:

[0007] Obtain the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card;

[0008] The nominal arrival time of each beacon frame is determined based on the actual arrival time of the first beacon frame in a series of consecutive beacon frames and the nominal transmission period of the beacon frame.

[0009] The beacon arrival offset sequence is determined based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame.

[0010] The early wake-up protection duration is determined based on the beacon arrival offset sequence;

[0011] The beacon frame to be received after a series of consecutive beacon frames is taken as the target beacon frame. The nominal arrival time of the target beacon frame is determined based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame.

[0012] Based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, the target wake-up time is determined, and a wake-up control command is generated. The wake-up control command is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

[0013] In one possible implementation, obtaining the actual arrival time of multiple consecutive beacon frames includes: obtaining the receiving timestamp generated by the terminal's local clock when the wireless network interface card receives the access point beacon frame; comparing the receiving timestamp with the timestamp field parsed from the access point beacon frame to obtain the timestamp difference; and determining the receiving timestamp as the actual arrival time of the corresponding beacon frame when the timestamp difference is less than or equal to a preset synchronization deviation threshold.

[0014] In one possible implementation, the beacon arrival offset sequence is determined based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame, including: for each beacon frame, determining the difference between the actual arrival time and the corresponding nominal arrival time as a candidate difference; removing candidate differences that are greater than a preset single-frame abnormal deviation threshold to obtain valid differences; when the change in the valid difference between adjacent beacon frames is greater than a preset continuous offset change threshold, removing the valid difference corresponding to the next beacon frame; and arranging the remaining valid differences after removal according to the beacon frame reception order to obtain the beacon arrival offset sequence.

[0015] In one possible implementation, determining the early wake-up protection duration based on the beacon arrival offset sequence includes: extracting a preset number of beacon arrival offsets at the end of the beacon arrival offset sequence; calculating the difference between the maximum and minimum values ​​among the preset number of offset values ​​to obtain the offset amplitude; and determining the early wake-up protection duration based on the offset amplitude.

[0016] In one possible implementation, the method further includes: acquiring a received signal strength value; accordingly, determining an early wake-up protection duration based on a beacon arrival offset sequence, including: determining a corresponding offset amplitude based on the beacon arrival offset sequence; determining a fluctuation amplitude based on the maximum degree of change of the received signal strength value within the reception window of multiple consecutive beacon frames; and determining an early wake-up protection duration based on the offset amplitude and the fluctuation amplitude.

[0017] In one possible implementation, the method further includes: after the wake-up control command instructs the wireless network interface card to enter the wake-up state, parsing the traffic indication mapping field in the beacon frame to obtain the target bitmap value; when the target bitmap value is non-zero, generating a keep-wake command and a cached data request send command, wherein the keep-wake command is used to instruct the wireless network interface card to maintain the wake-up state, and the cached data request send command is used to request the access point to send cached data associated with the wireless network interface card; and after the wireless network interface card completes the reception of the corresponding cached data, clearing the continuous idle count value maintained locally by the terminal.

[0018] In one possible implementation, the method further includes: when the target bitmap value is zero, obtaining the continuous idle count value maintained locally by the terminal; comparing the continuous idle count value with the idle count segment table to obtain a candidate value for the number of skippable beacon frames; obtaining the remaining battery power and comparing the remaining battery power with the power range configuration table to obtain the power constraint upper limit; determining the smaller of the candidate value for the number of skippable beacon frames and the power constraint upper limit as the actual number of skipped beacon frames; calculating the candidate sleep span duration based on the actual number of skipped beacon frames and the nominal beacon frame transmission period; subtracting the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep span duration to obtain the low power duration; when the low power duration is greater than the minimum effective sleep duration, generating a segmented low power instruction and a low power timer write instruction, wherein the segmented low power instruction is used to instruct the wireless network interface card to enter a low power state, and the low power timer write instruction is used to write the low power duration into the low power timer.

[0019] In one possible implementation, comparing the continuous idle count value with an idle count segment table to obtain candidate values ​​for the number of skippable beacon frames includes: obtaining an incrementing record of the continuous idle count value over multiple consecutive beacon periods; matching the number of consecutive periods in the incrementing record where no buffered data reception occurred with the idle count segment table to obtain idle stable segments; obtaining the maintenance level of the communication service; when the maintenance level is a high maintenance level, determining the candidate values ​​corresponding to adjacent segments in the idle count segment table that are smaller than the idle stable segments as candidate values ​​for the number of skippable beacon frames; when the maintenance level is a low maintenance level, determining the candidate values ​​corresponding to the idle stable segments as candidate values ​​for the number of skippable beacon frames.

[0020] Secondly, embodiments of this application provide a wireless terminal adaptive sleep management device, comprising:

[0021] The parameter acquisition module is used to acquire the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card.

[0022] The first determining module is used to determine the nominal arrival time of each beacon frame based on the actual arrival time of the first beacon frame in a series of consecutive beacon frames and the nominal transmission period of the beacon frame.

[0023] The second determining module is used to determine the beacon arrival offset sequence based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame;

[0024] The third determining module is used to determine the early wake-up protection duration based on the beacon arrival offset sequence;

[0025] The fourth determination module is used to take the beacon frame to be received after multiple consecutive beacon frames as the target beacon frame, and determine the nominal arrival time of the target beacon frame based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame.

[0026] The instruction generation module is used to determine the target wake-up time based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, and to generate a wake-up control instruction. The wake-up control instruction is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

[0027] Thirdly, embodiments of this application provide a wireless network terminal, including: a memory and a processor;

[0028] The memory stores instructions that the computer executes;

[0029] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0030] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0031] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed, implements the first aspect and / or various possible implementations of the first aspect.

[0032] The wireless terminal adaptive sleep management method, device, and wireless network terminal provided in this application obtain the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card. Based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frames, the nominal arrival time of each beacon frame is determined. The beacon arrival offset sequence is determined according to the difference between the actual arrival time of each beacon frame and the corresponding nominal arrival time. Then, the early wake-up protection duration is determined by combining the beacon arrival offset sequence. This enables the terminal to comprehensively adapt to beacon arrival jitter and the interface card wake-up process. By further determining the nominal arrival time of the target beacon frame and generating a corresponding wake-up control command based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, the wireless network interface card can enter the wake-up state at an appropriate time. This reduces idle waiting, missed reception, and invalid wake-up, improves wireless communication stability, and extends the terminal's battery life. This adapts to complex wireless environments such as electromagnetic interference and signal obstruction in substations, ensuring the communication stability and battery life of intelligent monitoring equipment in substations. Attached Figure Description

[0033] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0034] Figure 1 Flowchart of the wireless terminal adaptive sleep management method provided in this application Figure 1 ;

[0035] Figure 2 Flowchart of the wireless terminal adaptive sleep management method provided in this application Figure 2 ;

[0036] Figure 3 A schematic diagram of the structure of the wireless terminal adaptive sleep management device provided in this application;

[0037] Figure 4 A schematic diagram of the structure of the electronic device provided in this application.

[0038] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0039] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.

[0040] In the field of intelligent substation monitoring, wireless terminals (such as relay protection room monitoring terminals, switchgear online monitoring terminals, inspection robot communication terminals, and operation and maintenance interaction terminals) maintain association with access points through the WAPI network and undertake key functions such as transmitting telemetry and remote control commands within the station, real-time reporting of equipment status, and alarm linkage message transmission. Their hibernation management directly affects communication stability and battery life.

[0041] In existing technologies, terminals typically wake up according to the nominal period of beacon frames and determine whether to remain awake based on the received traffic indication information. This approach assumes that beacon frames arrive on time according to the nominal period and that a single traffic indication is sufficient to represent the service status. However, in the complex wireless environment of substations, electromagnetic interference, metal cabinet obstructions, and multipath reflections exist, causing the actual arrival time of beacon frames to fluctuate and shift relative to the nominal arrival time. If the terminal still wakes up at a fixed time, the wake-up time is prone to misalignment with the actual arrival time of the beacon frames. If the wake-up is too early, the interface card has been powered on but the beacon frame has not yet arrived, resulting in idle waiting; if the wake-up is too late, the beacon frame has already been sent, causing missed reception. Furthermore, link jitter, signal fluctuations, and clock deviations further exacerbate the above misalignment, and a single traffic indication can only reflect the buffer status of the current beacon period, failing to reflect the service idle trend over multiple consecutive beacon periods. This leads to the terminal frequently waking up when the service is actually idle, or prematurely entering a long sleep state just before the service arrives. For continuously running monitoring terminals, this increases interface card control overhead, reduces available battery life, and affects the timeliness of cached data reception and the stability of wireless connections.

[0042] Therefore, existing terminal sleep methods rely on fixed beacon periodic wake-up and single traffic indication judgment, which makes it difficult to balance the stability of beacon acquisition with the requirements of low power sleep. They cannot adapt to the operating scenarios in the complex wireless environment of substations where beacon arrival jitter and changes in service idle state coexist, and cannot meet the high reliability requirements of substation intelligent monitoring equipment for communication stability and endurance.

[0043] To address the aforementioned issues, this application provides a wireless terminal adaptive sleep management method, apparatus, and wireless network terminal. The method uses the actual arrival times of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card as the basis for analysis. Based on the actual arrival time of the first beacon frame and its nominal transmission period, the nominal arrival time of each beacon frame is determined. A beacon arrival offset sequence is determined based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame. This beacon arrival offset sequence is then used to determine the early wake-up protection duration. The beacon frame to be received after multiple consecutive beacon frames is then used as the target beacon frame. The target wake-up time is calculated based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card. A wake-up control command is then generated, causing the wireless network interface card to enter a wake-up state at the target wake-up time. Therefore, the wake-up control of the beacon frame no longer relies on a fixed beacon period, but is adaptively adjusted according to the actual arrival offset of the beacon, so that the network card can complete the wake-up before the target beacon frame arrives. This helps to reduce idle waiting, missed reception and invalid wake-up, improve the communication stability in the complex wireless environment of the substation and extend the terminal's battery life.

[0044] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0045] The execution entity of the wireless terminal adaptive hibernation management method provided in this application embodiment can be a wireless terminal in a substation intelligent monitoring device, or a server or server cluster storing the wireless terminal adaptive hibernation management method. For example, the execution entity can be a hibernation management platform server deployed at the substation integrated monitoring master station, an edge computing node connected to the substation intelligent monitoring device, or an in-station operation and maintenance management server.

[0046] This application does not impose any particular restrictions on the implementation method of the execution subject, as long as the execution subject can obtain the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card; determine the nominal arrival time of each beacon frame based on the actual arrival time of the first beacon frame in the multiple consecutive beacon frames and the nominal transmission period of the beacon frames; determine the beacon arrival offset sequence based on the difference between the actual arrival time of each beacon frame and the corresponding nominal arrival time; determine the early wake-up protection duration based on the beacon arrival offset sequence; take the beacon frame to be received after the multiple consecutive beacon frames as the target beacon frame, determine the nominal arrival time of the target beacon frame based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame; determine the target wake-up time based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, and generate a wake-up control command, which is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

[0047] Figure 1 Flowchart of the wireless terminal adaptive sleep management method provided in this application Figure 1 ,like Figure 1 As shown, the method may include:

[0048] S101. Obtain the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card.

[0049] A beacon frame can refer to a management frame broadcast by an access point to terminals within its coverage area at a set period. Terminals obtain access point information, network parameters, beacon intervals, and buffer indications by receiving beacon frames. The actual arrival time refers to the moment when a wireless terminal actually receives a beacon frame. This can be recorded by the terminal's local clock, the wireless network interface card clock, or a clock maintained by the terminal's operating system when beacon frame reception is complete or the arrival of a beacon frame begins. The nominal beacon frame transmission period refers to the theoretical transmission interval between two adjacent beacon frames. This can be calculated from the beacon interval field in the beacon frame or obtained by the terminal from the access point configuration information during the association process. The wireless network interface card wake-up time refers to the time required for the wireless network interface card to recover from a low-power state to a state capable of receiving and parsing beacon frames. This can include one or more of the following: network card power-on time, RF circuit stabilization time, clock recovery time, firmware loading time, and channel switching time.

[0050] In this embodiment, the wireless terminal can continuously receive multiple beacon frames while maintaining association with the access point, and record the actual arrival time of each beacon frame; at the same time, it reads the beacon interval field in the access point beacon frame, converts the beacon interval field into the nominal transmission period of the beacon frame, and obtains the wireless network interface card wake-up time from the wireless network interface card driver, power management chip, or terminal operating system records.

[0051] Furthermore, the timing for acquiring multiple consecutive beacon frames can be determined based on the terminal's service status. For example, the terminal can begin continuously receiving multiple beacon frames immediately after completing WAPI association; it can also begin continuously receiving multiple beacon frames when service idle is detected; or it can receive the current beacon frame each time it wakes up from a low-power state and combine the most recent beacon frames into multiple consecutive beacon frames. The number of consecutive beacon frames can be set as needed, for example, 3, 5, or 8; this embodiment does not impose any particular limitation.

[0052] In one example, the determination of the actual arrival time can be implemented in several ways. For instance, a local timestamp can be recorded at the start time of the beacon frame reception by the wireless network interface card, serving as the actual arrival time of the beacon frame. Another example is recording a local timestamp after the beacon frame has been successfully received and parsed, also serving as the actual arrival time. Yet another example is comparing the received timestamp with the timestamp field parsed from the beacon frame; if the comparison result meets set conditions, the received timestamp is determined as the actual arrival time. For example, if the terminal's local clock records a received timestamp of a beacon frame as T1, and the timestamp field parsed from the beacon frame is T2, then if the difference between T1 and T2 does not exceed a preset synchronization deviation threshold, T1 is determined as the actual arrival time of the beacon frame.

[0053] The nominal transmission period of a beacon frame can also be obtained in different ways. For example, it can be obtained by directly reading the beacon interval field in the beacon frame and converting the value of that field into a time period; it can also be determined based on the beacon interval parameters issued in the access point configuration information; or it can be determined based on the interval between the nominal arrival times of adjacent beacon frames in a series of consecutive beacon frames. For example, if the beacon interval field has 100 time units, and each time unit is 1.024 milliseconds, then the nominal transmission period of the beacon frame is 102.4 milliseconds.

[0054] The wake-up time of the wireless network interface card can be determined by the wake-up start and end time recorded by the terminal power management chip, by the wake-up completion event reported by the wireless network interface card driver, or by statistics from the historical wake-up records of the wireless network interface card. For example, the terminal records the time between the moment the wireless network interface card issues the exit command from the low-power state and the moment the interface card reports the receptive state, and uses this time as the wake-up time of the wireless network interface card.

[0055] S102. Based on the actual arrival time of the first beacon frame in a series of consecutive beacon frames and the nominal transmission period of the beacon frame, determine the nominal arrival time of each beacon frame.

[0056] The first beacon frame can refer to the beacon frame received first in a series of consecutive beacon frames. The nominal arrival time can refer to the theoretically expected arrival time of each beacon frame, calculated based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frames. Using the actual arrival time of the first beacon frame as the time reference avoids the additional errors introduced by the asynchronous clocks between the terminal and the access point when using an absolute clock as the reference.

[0057] In this embodiment, the wireless terminal can take the actual arrival time of the first beacon frame as the starting point and accumulate the nominal arrival times of subsequent beacon frames according to the nominal transmission period of the beacon frames. For example, if multiple consecutive beacon frames include frames 1 to N, the actual arrival time of frame 1 is T1, and the nominal transmission period of the beacon frame is P, then the nominal arrival time of frame i can be T1 + (i-1) × P. Here, i is the frame sequence number, and i is an integer greater than or equal to 1 and less than or equal to N.

[0058] In this step, there is no single way to determine the nominal arrival time of each beacon frame. In one example, the actual arrival time of the first beacon frame can be clock-calibrated and used as a reference, then accumulated according to the nominal transmission period of the beacon frames. In another example, the actual arrival times of multiple consecutive beacon frames can be fitted to obtain a reference time and a period estimate, and then the nominal arrival time of each beacon frame can be determined accordingly. In yet another example, the actual arrival time of the first beacon frame can be directly used as a reference, and the arrival time can be accumulated frame by frame according to the nominal transmission period of the beacon frames. Any method that can obtain the nominal arrival time corresponding to each beacon frame is acceptable, and this embodiment does not impose any particular restrictions.

[0059] S103. Determine the beacon arrival offset sequence based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame.

[0060] The beacon arrival offset refers to the deviation of the actual arrival time of a beacon frame from its nominal arrival time, characterizing the degree to which the beacon frame's arrival time is ahead or behind the nominal transmission period. The beacon arrival offset sequence refers to a sequence of multiple beacon arrival offsets arranged in the order of beacon frame reception. This sequence is used to express the fluctuation of the arrival times of multiple consecutive beacon frames relative to the theoretical time. It not only includes single offsets but also retains the offset changes between adjacent periods, thus reflecting the impact of link jitter, clock drift, or changes in reception delay on the beacon arrival time.

[0061] In this embodiment, the wireless terminal can subtract the actual arrival time from the corresponding nominal arrival time for each beacon frame to obtain the arrival time difference for that beacon frame. Then, the arrival time differences for multiple consecutive beacon frames are arranged in the receiving order to obtain a beacon arrival offset sequence. For example, if the actual arrival time of the i-th frame is Ai and the nominal arrival time is Bi, then the arrival time difference for that frame can be Ai-Bi. If the difference is positive, it indicates that the actual arrival time is later than the nominal arrival time; if the difference is negative, it indicates that the actual arrival time is earlier than the nominal arrival time.

[0062] In this step, the method for determining the beacon arrival offset sequence can be flexibly set. For example, the difference between the actual arrival time and the nominal arrival time of each beacon frame can be directly arranged in the receiving order to obtain the beacon arrival offset sequence; alternatively, the difference can be arranged after anomaly removal, for example, removing differences exceeding a preset single-frame anomaly deviation threshold, or removing differences where the difference between adjacent frames exceeds a preset continuous offset change threshold; or the difference can be smoothed, absolute valued, or normalized before being arranged to obtain the beacon arrival offset sequence. Different methods are acceptable as long as they reflect the arrival offset trend of multiple consecutive beacon frames; this embodiment does not impose any particular limitations.

[0063] S104. Determine the early wake-up protection duration based on the beacon arrival offset sequence.

[0064] Among them, the early wake-up protection time can refer to the time margin reserved to compensate for beacon arrival jitter and the wake-up process of the wireless network interface card. It can be used to enable the wireless network interface card to complete the state switch before the target beacon frame arrives, thereby reducing the risk of missed reception and avoiding premature wake-up causing idle waiting.

[0065] In this step, the wireless terminal can determine the offset amplitude based on the beacon arrival offset sequence and determine the early wake-up protection duration based on the offset amplitude. The offset amplitude can refer to the degree of change in the offsets in the beacon arrival offset sequence, such as the difference between the maximum and minimum values ​​in the sequence, the range of several subsequent offsets in the sequence, the variance or standard deviation of the offsets in the sequence, etc. The early wake-up protection duration can be positively correlated with the offset amplitude; that is, the larger the offset amplitude, the more pronounced the beacon arrival jitter, and the longer the early wake-up protection duration can be set; the smaller the offset amplitude, the more stable the beacon arrival, and the shorter the early wake-up protection duration can be set.

[0066] In some examples, there can be multiple ways to determine the early wake-up protection duration based on the beacon arrival offset sequence. For instance, a predetermined number of offsets at the end of the beacon arrival offset sequence can be extracted, the difference between the maximum and minimum values ​​among these predetermined number of offsets can be calculated to obtain the offset amplitude, and then the early wake-up protection duration can be determined based on the mapping relationship between the offset amplitude and the protection duration. Another example is that the early wake-up protection duration can be determined based on the statistical characteristics of the beacon arrival offset sequence, such as the mean, variance, standard deviation, or root mean square error. Yet another example is that the beacon arrival offset sequence can be input into a predetermined mapping table or a predetermined function to obtain the early wake-up protection duration.

[0067] Furthermore, other parameters can be combined when determining the early wake-up protection duration. For example, the received signal strength value can be obtained, and the fluctuation amplitude can be determined based on the maximum change in the received signal strength value within multiple consecutive beacon frame reception windows. The early wake-up protection duration can then be determined jointly based on the offset amplitude and the fluctuation amplitude. Alternatively, the early wake-up protection duration can be determined by combining parameters such as channel occupancy rate, retransmission count, and beacon frame parsing success rate. Different methods are acceptable as long as a suitable early wake-up protection duration can be obtained based on the beacon arrival offset sequence; this embodiment does not impose any particular limitations.

[0068] Optionally, the early wake-up protection duration can be set with an upper and lower limit. For example, a maximum protection duration can be set to prevent the network card from being in a wake-up state for an extended period due to an excessively long protection duration; a minimum protection duration can also be set to prevent the beacon arrival jitter from being uncovered due to an excessively short protection duration. For example, the early wake-up protection duration can be set to 1 to 2 times the offset amplitude, or it can be set to the sum of the offset amplitude and a fixed margin.

[0069] In this embodiment, the early wake-up protection duration is not independent of the wireless network interface card wake-up time, but rather constitutes the wake-up preparation window together with the wireless network interface card wake-up time. The protection duration reflects the uncertainty of beacon arrival, while the wireless network interface card wake-up time reflects the hardware state switching overhead. This method ensures that the subsequently determined wake-up time simultaneously covers both the link offset and the interface card recovery process, thereby enabling the wireless terminal to be in a receptive state before the target beacon frame arrives.

[0070] S105. Take the beacon frame to be received after a series of consecutive beacon frames as the target beacon frame, and determine the nominal arrival time of the target beacon frame based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame.

[0071] The target beacon frame can refer to the next beacon frame that the terminal needs to receive after a series of consecutive beacon frames. The nominal arrival time of the target beacon frame can refer to the time when the target beacon frame should theoretically arrive, calculated based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frames.

[0072] In this step, after determining the beacon arrival offset sequence and the early wake-up protection duration, the wireless terminal can use the beacon frames to be received after a series of consecutive beacon frames as the target beacon frame, and calculate the nominal arrival time of the target beacon frame based on the actual arrival time of the first beacon frame and according to the nominal transmission period of the beacon frames. For example, if the series of consecutive beacon frames includes frames 1 to N, and the target beacon frame is frame N+1, then the nominal arrival time of the target beacon frame can be T1+N×P.

[0073] In some examples, the method for determining the target beacon frame can be configured according to actual needs. For instance, the target beacon frame can be the immediately following beacon frame after several consecutive beacon frames; another example is that the target beacon frame can be the next beacon frame after several beacon frames that need to be skipped; yet another example is that the target beacon frame can be determined based on service status, buffer indication, or sleep decision. For example, when the terminal decides to skip several beacon frames, the target beacon frame can be the beacon frame to be received after skipping those beacon frames.

[0074] Correspondingly, the method for determining the nominal arrival time of the target beacon frame can also be flexibly set. For example, it can be obtained by directly using the actual arrival time of the first beacon frame as the benchmark, and accumulating it according to the nominal transmission period of the beacon frames and the number of frame intervals between the target beacon frame and the first beacon frame; it can also be obtained by using the nominal arrival time of the last beacon frame among multiple consecutive beacon frames as the benchmark, and accumulating it according to the nominal transmission period of the beacon frames; or it can be obtained by fitting the actual arrival times of multiple consecutive beacon frames. Different methods are acceptable as long as the nominal arrival time of the target beacon frame can be obtained, and this embodiment does not impose any particular restrictions.

[0075] S106. Based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, determine the target wake-up time and generate a wake-up control command. The wake-up control command is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

[0076] The target wake-up time can refer to the time set to ensure that the wireless network interface card wakes up before the arrival of the target beacon frame. The wake-up control command can refer to the command used to control the wireless network interface card to enter the wake-up state from a low-power state; it can be generated by the terminal operating system, power management module, wireless network interface card driver, or sleep management module.

[0077] In this step, the wireless terminal can advance the nominal arrival time of the target beacon frame by the early wake-up protection duration and the wake-up time of the wireless network interface card to obtain the target wake-up time. For example, if the nominal arrival time of the target beacon frame is B, the early wake-up protection duration is G, and the wake-up time of the wireless network interface card is W, then the target wake-up time can be BGW. After determining the target wake-up time, the terminal can generate a wake-up control command and send the wake-up control command to the wireless network interface card or power management module to cause the wireless network interface card to enter the wake-up state at the target wake-up time.

[0078] In this embodiment, there are several ways to determine the target wake-up time. In one example, the target wake-up time can be obtained by directly subtracting the early wake-up protection time and the wireless network interface card wake-up time from the nominal arrival time of the target beacon frame. In another example, clock calibration time, channel switching time, or RF stabilization time can be added to the above. In yet another example, an earliest wake-up time limit can be set to prevent the target wake-up time from being too early. Any method that enables the wireless network interface card to complete wake-up before the arrival of the target beacon frame is acceptable; this embodiment does not impose any special restrictions.

[0079] The method for generating wake-up control commands can also be flexibly configured. For example, the wake-up control command can be a wake-up timer command written to the wireless network interface card register; it can also be a low-power exit command written to the terminal power management module; or it can be a timed wake-up task set by the operating system scheduler. The wake-up control command can be generated and written before the terminal enters a low-power state, or it can be triggered by a timer by the terminal in a low-power state.

[0080] By jointly considering the theoretical arrival time of the target beacon frame, the link offset protection window, and the wake-up time of the wireless network interface card, the terminal can trigger wake-up at a time closer to the actual link state. This allows the wireless network interface card to complete state recovery and enter a receptive state before the target beacon frame arrives. Furthermore, after entering the wake-up state at the target wake-up time, the wireless network interface card can also receive the target beacon frame and parse the traffic indication mapping field in the target beacon frame to determine whether the access point has cached data associated with the terminal. If cached data exists, the terminal can remain awake and request the cached data; if no cached data exists, the terminal can re-enter a low-power state.

[0081] The adaptive sleep management method for wireless terminals provided in this application performs timing analysis based on the actual arrival time, nominal transmission period, and wireless network interface card wake-up time of multiple consecutive beacon frames. First, the nominal arrival time of each beacon frame and the target beacon frame is recursively obtained based on the actual arrival time of the first beacon frame. Then, a beacon arrival offset sequence is formed based on the difference between the actual arrival time and the nominal arrival time, and the early wake-up protection duration is determined accordingly. Finally, a wake-up control command is generated by combining the nominal arrival time of the target beacon frame, the protection duration, and the wireless network interface card wake-up time. Through this implementation, the terminal can use the arrival offset of consecutive historical beacons as a timing basis to match the next wake-up time with the current link state, thereby enabling the wireless network interface card to complete wake-up preparation before the arrival of the target beacon frame. This reduces the problems of early waiting, delayed reception, and frequent state switching caused by fixed-period wake-ups, and maintains a more stable reception timing for wireless communication in substation intelligent monitoring equipment.

[0082] However, in practical applications, the received timestamp recorded by the wireless network interface card may be affected by factors such as asynchronous local clock and access point clock, beacon frame parsing errors, or channel interference. If the received timestamp is directly used as the actual arrival time, it may lead to inaccurate calculation of subsequent beacon arrival offset sequences. Therefore, based on the above embodiments, a method for obtaining the actual arrival time of multiple consecutive beacon frames may include: obtaining the received timestamp generated by the terminal's local clock when the wireless network interface card receives the access point beacon frame; comparing the received timestamp with the timestamp field parsed from the access point beacon frame to obtain the timestamp difference; when the timestamp difference is less than or equal to a preset synchronization deviation threshold, determining the received timestamp as the actual arrival time of the corresponding beacon frame.

[0083] In this embodiment, the received timestamp can refer to the time information generated by the terminal's local clock when the wireless network interface card receives the access point beacon frame, used to characterize the arrival time of the beacon frame at the terminal side. The terminal's local clock can refer to a clock maintained by the wireless terminal itself, such as the system clock maintained by the terminal's operating system, the network card clock maintained internally by the wireless network interface card, or the timer clock maintained by the terminal's power management chip. The timestamp field can refer to the time information carried in the access point beacon frame, used to characterize the time the access point side sends the beacon frame, such as the timestamp field, TSF field, or similar time synchronization field in the WAPI beacon frame. The timestamp difference can refer to the difference between the received timestamp and the timestamp field parsed from the beacon frame, which can be used to determine whether the terminal's local clock and the access point clock are synchronized, and to determine whether the reception of the beacon frame is reliable. The preset synchronization deviation threshold can refer to a pre-set tolerance threshold used to determine whether the received timestamp and the beacon frame timestamp field are consistent.

[0084] Furthermore, when receiving access point beacon frames, the wireless terminal can generate a received timestamp using its local clock. For example, it can record a local timestamp when the wireless network interface card detects the initial arrival of the beacon frame, or after the beacon frame has been successfully received and parsed. Simultaneously, the wireless terminal parses the received access point beacon frame to obtain the timestamp field. Then, it compares the received timestamp with the timestamp field to obtain the timestamp difference. When the timestamp difference is less than or equal to a preset synchronization deviation threshold, it indicates that the terminal's local clock is basically synchronized with the access point clock, and the reception time of the beacon frame is reliable. In this case, the received timestamp is determined as the actual arrival time of the corresponding beacon frame.

[0085] In one example, when the wireless network interface card receives a beacon frame, a received timestamp T1 can be generated by the terminal's local clock. The terminal parses the beacon frame to obtain a timestamp field T2. The terminal calculates the difference between T1 and T2 as ΔT. If ΔT is less than or equal to a preset synchronization deviation threshold, then T1 is determined as the actual arrival time of the beacon frame. If ΔT is greater than the preset synchronization deviation threshold, it indicates that the beacon frame may have a parsing error, clock out of sync, or channel interference. In this case, the received timestamp of the beacon frame can be discarded, or the beacon frame can be re-received and parsed.

[0086] There are several ways to generate the receive timestamp. For example, a local timestamp can be recorded when the wireless network interface card detects the beacon frame preamble; a local timestamp can also be recorded after the beacon frame reception is completed and verified; or a local timestamp can be recorded when the terminal operating system receives the beacon frame reception event reported by the wireless network interface card. Any receive timestamp generated in any of these ways is acceptable as long as it represents the time the beacon frame arrives at the terminal; this embodiment does not impose any particular restrictions.

[0087] There are several ways to parse the timestamp field. For example, the timestamp field can be read directly from the beacon frame during the beacon frame parsing process; it can also be read after verifying the integrity of the beacon frame; or the beacon frame can be skipped if the parsing fails and not participate in subsequent consistency comparisons. For example, when the beacon frame verification fails, the terminal can discard the beacon frame and wait for the next beacon frame.

[0088] Furthermore, the setting method for the preset synchronization deviation threshold can be flexibly selected. For example, the preset synchronization deviation threshold can be determined based on the allowable deviation between the terminal's local clock and the access point clock; it can also be determined based on the length of the beacon frame reception window; or it can be dynamically adjusted based on the statistical results of historical timestamp differences. For instance, the preset synchronization deviation threshold can be set to 1%, 5%, or 10% of the nominal transmission period of the beacon frame, or it can be set to a fixed duration, such as 1 millisecond, 2 milliseconds, or 5 milliseconds.

[0089] Optionally, there can be multiple methods for consistency comparison. In one example, the difference between the received timestamp and the timestamp field can be directly calculated, and this difference can be compared with a preset synchronization deviation threshold. In another example, the received timestamp and the timestamp field can be normalized separately before calculating the difference. In yet another example, the trend of the difference between the received timestamp and the timestamp field can be calculated, and the received timestamp is determined to be valid when the trend of the difference is stable and the difference is less than or equal to the preset synchronization deviation threshold. Different methods are acceptable as long as they can determine whether the received timestamp and the timestamp field are consistent; this embodiment does not impose any particular restrictions.

[0090] For example, for a wireless terminal in a substation intelligent monitoring electronic device, when the wireless network interface card receives an access point beacon frame, the terminal's local clock generates a receiving timestamp. This receiving timestamp is then compared with the timestamp field parsed from the beacon frame. If the timestamp difference does not exceed a preset synchronization deviation threshold, the actual arrival time of the beacon frame is determined. This method improves the accuracy and reliability of the actual arrival time, providing a reliable data foundation for determining the subsequent beacon arrival offset sequence.

[0091] By comparing the received timestamp generated by the local clock with the timestamp field of the beacon frame and constraining the difference range with a threshold, the determined actual arrival time can be made to correspond with the real reception time of the beacon frame. This provides a reliable time reference for determining the subsequent beacon arrival offset sequence and makes the calculation of the target wake-up time based on the reliable arrival time. This reduces waiting time, missed reception, and invalid wake-up, improves the communication stability in the complex wireless environment of substations, and extends the terminal's endurance.

[0092] However, in practical applications, beacon frames may be affected by factors such as sudden interference, instantaneous clipping, channel contention, or parsing errors during transmission, causing abnormal jumps in the actual arrival time of individual beacon frames. If all the differences are directly used to determine the beacon arrival offset sequence, the sequence may be contaminated by outliers, leading to an overestimation or underestimation of the early wake-up protection duration.

[0093] Based on this, and building upon the above embodiments, a method for determining the beacon arrival offset sequence based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame may include: for each beacon frame, determining the difference between the actual arrival time and the corresponding nominal arrival time as a candidate difference; eliminating candidate differences that are greater than a preset single-frame abnormal deviation threshold to obtain valid differences; when the change in the valid differences between adjacent beacon frames is greater than a preset continuous offset change threshold, eliminating the valid difference corresponding to the next beacon frame; and arranging the remaining valid differences after elimination according to the beacon frame reception order to obtain the beacon arrival offset sequence.

[0094] In this embodiment, the candidate difference can refer to the difference obtained by subtracting the actual arrival time from the corresponding nominal arrival time for each beacon frame. This difference can be used to preliminarily characterize the degree to which the arrival time of the beacon frame is ahead or behind the nominal transmission period. The preset single-frame abnormal deviation threshold can refer to a pre-set tolerance threshold used to determine whether the candidate difference of a single beacon frame belongs to an abnormal jump. The effective difference can refer to the difference among the candidate differences that has not been eliminated and is used to participate in the construction of the beacon arrival offset sequence. The preset continuous offset change threshold can refer to a pre-set threshold used to determine whether the change between the effective differences of two adjacent beacon frames is too large.

[0095] Furthermore, the wireless terminal can calculate the difference between the actual arrival time and the corresponding nominal arrival time for each of the multiple consecutive beacon frames to obtain candidate differences for that beacon frame. Then, each candidate difference is compared with a preset single-frame abnormal deviation threshold. If a candidate difference is greater than the preset single-frame abnormal deviation threshold, it indicates that the arrival time of the beacon frame may have an abnormal jump, and the candidate difference is eliminated; if a candidate difference is less than or equal to the preset single-frame abnormal deviation threshold, the candidate difference is determined as a valid difference.

[0096] Next, the wireless terminal can determine the change in the effective difference between adjacent beacon frames. When the change in the effective difference between two adjacent beacon frames is greater than a preset continuous offset change threshold, it indicates that the arrival time of the later beacon frame has a discontinuous offset jump relative to the earlier beacon frame, and the effective difference corresponding to the later beacon frame is discarded. When the change in the effective difference between two adjacent beacon frames is less than or equal to the preset continuous offset change threshold, the effective difference corresponding to the later beacon frame is retained. Finally, the remaining effective differences after discarding are arranged according to the beacon frame reception order to obtain the beacon arrival offset sequence.

[0097] In one example, multiple consecutive beacon frames, including frames 1 to 5, are processed. The wireless terminal calculates five candidate differences for each frame and removes those exceeding a preset single-frame abnormal deviation threshold, obtaining the valid differences. Subsequently, the wireless terminal compares the changes in the valid differences between adjacent beacon frames. If the change in the valid difference between frame 3 and frame 2 exceeds a preset continuous offset change threshold, the valid difference for frame 3 is removed. If the change in the valid difference between frame 4 and frame 3 does not exceed the preset continuous offset change threshold, the valid difference for frame 4 is retained. Finally, the remaining valid differences are arranged in the receiving order to obtain the beacon arrival offset sequence.

[0098] There are several ways to set the preset single-frame abnormal deviation threshold. For example, the preset single-frame abnormal deviation threshold can be determined based on the proportion of the nominal transmission period of the beacon frame, such as 5%, 10%, or 20% of the nominal transmission period; it can also be determined based on the statistical results of historical candidate differences, such as 2 or 3 times the standard deviation of historical candidate differences; or it can be set to a fixed duration, such as 1 millisecond, 2 milliseconds, or 5 milliseconds. Different settings are acceptable as long as they can identify abnormal jumps in a single beacon frame, and this embodiment does not impose any particular restrictions.

[0099] There are several ways to set the preset continuous offset change threshold. For example, the preset continuous offset change threshold can be determined based on the maximum allowable offset change between adjacent beacon frames; it can also be determined based on the proportion of the nominal transmission period of the beacon frames; or it can be dynamically adjusted based on the statistical results of historical effective difference changes. For example, if the historical effective difference changes are generally small, the preset continuous offset change threshold can be set to a smaller value to improve the sensitivity of identifying continuous offset jumps.

[0100] Furthermore, the arrangement of the remaining valid differences after elimination can be flexibly configured. For example, they can be arranged directly according to the beacon frame reception order; alternatively, they can be arranged according to the beacon frame reception order and then the sequence can be smoothed or normalized; alternatively, the frame sequence position corresponding to each valid difference can be marked after arrangement to facilitate subsequent calculation of the offset magnitude of the beacon arrival offset sequence. Different methods are acceptable as long as they reflect the arrival offset trend of multiple consecutive beacon frames; this embodiment does not impose any particular limitations.

[0101] In some examples, for wireless terminals in substation intelligent monitoring electronic equipment, a series of consecutive access point beacon frames received under the keep-alive state of mobile data communication service can be acquired. Frame sequence bits are configured for each access point beacon frame according to the receiving order. Based on the actual arrival time of the first access point beacon frame and the nominal transmission period of the beacon frame, the nominal arrival time corresponding to each frame sequence bit is calculated. The difference between the actual arrival time and the nominal arrival time corresponding to each frame sequence bit is calculated. When the difference between adjacent frame sequence bits exceeds a preset continuous offset change threshold, the difference corresponding to the sequence bit of the next frame is deleted, resulting in an effective arrival time difference sequence. This method reduces the interference of abnormal beacon frames on the offset sequence, providing a more stable data foundation for determining the subsequent early wake-up protection duration.

[0102] This processing method is based on single-frame anomaly removal combined with continuous offset mutation removal. It separates occasional errors and continuous anomalies from the offset data, retaining only the offset results that match the actual link state. This allows the offset sequence to stably represent the arrival pattern of beacon frames, avoiding interference from abnormal differences in subsequent calculations. Based on this sequence, the early wake-up protection duration can be determined more accurately, and wake-up control commands for the wireless network interface card can be generated accordingly. This ensures a higher consistency between the terminal wake-up time and the actual arrival time of the beacon frame, helping to reduce idle waiting, missed reception, and invalid wake-ups, improving communication stability in complex wireless environments in substations, and extending terminal endurance.

[0103] Furthermore, in practical applications, the offsets in the beacon arrival offset sequence are arranged according to the beacon frame reception order, and the degree to which offsets at different positions reflect the actual jitter state of the current wireless link is not the same. If the early wake-up protection duration is determined indiscriminately based on the entire offset sequence, the protection duration may not match the current link state. Therefore, based on the above embodiments, the method for determining the early wake-up protection duration according to the beacon arrival offset sequence may include: extracting a preset number of beacon arrival offsets at the end of the beacon arrival offset sequence; calculating the difference between the maximum and minimum values ​​among the preset number of offset values ​​to obtain the offset amplitude; and determining the early wake-up protection duration based on the offset amplitude.

[0104] The preset quantity can refer to the number of offsets selected in advance to determine the early wake-up protection duration, such as 3, 5, or 8. The end can refer to the last offset in the beacon arrival offset sequence arranged in the beacon frame reception order, i.e., the end later in the time sequence. The offset magnitude can refer to the difference between the maximum and minimum values ​​among the preset quantity of offset values, which can be used to characterize the degree of change in recent beacon arrival offsets. The early wake-up protection duration can refer to the time margin reserved to compensate for beacon arrival jitter.

[0105] Furthermore, the wireless terminal can extract a preset number of beacon arrival offsets from the end of the beacon arrival offset sequence, such as the last 3, 5, or 8 offsets. Then, it determines the maximum and minimum values ​​among these preset number of offsets and calculates the difference between them to obtain the offset amplitude. Next, it determines the early wake-up protection duration based on the offset amplitude. For example, a larger offset amplitude indicates more significant recent beacon arrival jitter, allowing for a longer early wake-up protection duration; a smaller offset amplitude indicates more stable recent beacon arrivals, allowing for a shorter early wake-up protection duration.

[0106] In one example, the beacon arrival offset sequence includes 10 offsets, with a preset quantity of 5. The wireless terminal extracts the last 5 offsets from the sequence, which are -0.5 ms, 0.3 ms, 0.8 ms, -0.2 ms, and 0.6 ms, respectively. The maximum value is 0.8 ms, the minimum value is -0.5 ms, and the offset range is 1.3 ms. The wireless terminal determines the early wake-up protection duration based on this offset range, for example, setting the early wake-up protection duration to 1.5 times the offset range, i.e., 1.95 ms.

[0107] In some embodiments, the preset quantity can be selected in several ways. For example, it can be determined based on the nominal transmission period of the beacon frame, such as taking the offset corresponding to the most recent 3 beacon periods; it can also be determined based on the terminal service status, such as taking a larger preset quantity when the service is idle and a smaller preset quantity when the service is active; it can also be dynamically adjusted based on the beacon frame parsing success rate, such as taking a smaller preset quantity when the parsing success rate is low to avoid the influence of abnormal data. Any method that allows the preset quantity of offsets to reflect recent beacon arrival jitter is acceptable, and this embodiment does not impose any particular limitations.

[0108] There are several ways to calculate the offset magnitude. For example, the difference between the maximum and minimum values ​​among a preset number of offset values ​​can be calculated; the range, standard deviation, or variance of a preset number of offset values ​​can also be calculated; or the offset with the largest absolute value among a preset number of offset values ​​can be calculated. Any method that can characterize the degree of change in the recent beacon arrival offset is acceptable, and this embodiment does not impose any particular limitations.

[0109] Furthermore, the method for determining the early wake-up protection duration based on the offset amplitude can be flexibly set. In one example, it can be determined according to a preset proportional relationship, such as the early wake-up protection duration equal to the offset amplitude multiplied by a set coefficient; in another example, it can be determined according to a segmented mapping relationship, such as different early wake-up protection durations corresponding to different offset amplitude ranges; in yet another example, it can be determined by a lookup table, such as by pre-establishing a mapping table between offset amplitude and early wake-up protection duration. Any method that can yield a suitable early wake-up protection duration based on the offset amplitude is acceptable, and this embodiment does not impose any particular limitations.

[0110] In some examples, for wireless terminals in substation intelligent monitoring electronic equipment, the beacon arrival offset can be determined based on multiple arrival time differences that are later in the effective arrival time difference sequence. The offset amplitude is then determined based on the maximum deviation of the beacon arrival offset, and an early wake-up protection duration is generated according to the offset amplitude. This method allows the early wake-up protection duration to match the recent beacon arrival jitter level, avoiding situations where the protection duration is too long, causing waiting in vain, or too short, causing missed reception.

[0111] By establishing a correlation between the protection duration and the nearest beacon arrival offset range, the wake-up control quantity can be updated according to link fluctuations, avoiding the impact of early offset data on the protection duration. This makes the terminal's wake-up preparation more aligned with the current beacon arrival status, reducing the timing deviation caused by the fixed protection duration and improving the matching of beacon reception timing. This helps reduce idle waiting, missed reception, and invalid wake-ups, improves communication stability in complex wireless environments in substations, and extends the terminal's battery life.

[0112] In the complex wireless environment of substations, factors such as electromagnetic interference, metal cabinet obstruction, and multipath reflection can simultaneously cause jitter at the arrival time of beacon frames and fluctuations in received signal strength. During the reception of access point beacon frames, the wireless network interface card can typically report the received signal strength value, which reflects the current state of the wireless link between the terminal and the access point. Therefore, based on the above embodiments, the method may further include: acquiring the received signal strength value; accordingly, determining the early wake-up protection duration based on the beacon arrival offset sequence, including: determining the corresponding offset amplitude based on the beacon arrival offset sequence; determining the fluctuation amplitude based on the maximum change in the received signal strength value within the reception window of multiple consecutive beacon frames; and determining the early wake-up protection duration based on the offset amplitude and the fluctuation amplitude.

[0113] The received signal strength value can refer to the signal strength information reported by the wireless network interface card during the reception of access point beacon frames, such as the RSSI (Received Signal Strength Indication) value, which can be used to characterize the signal strength of the wireless link between the terminal and the access point. The reception window can refer to the time window set for each beacon frame for receiving that beacon frame, which can start after the wireless network interface card enters the wake-up state and end when the beacon frame reception is completed or a timeout occurs. The fluctuation amplitude can refer to the maximum degree of change of the received signal strength value within the reception window of multiple consecutive beacon frames, which can be used to characterize the stability of the wireless link. The offset amplitude can refer to the degree of change determined by the beacon arrival offset sequence, such as the difference between the maximum and minimum values ​​in the sequence, the range, variance, or standard deviation of the last preset number of offsets, etc. The early wake-up protection duration can refer to the time margin reserved to compensate for beacon arrival jitter and link fluctuations.

[0114] Furthermore, the wireless terminal can report the received signal strength (RSSI) value via the wireless network interface card during the reception of access point beacon frames. For example, the wireless network interface card can report the RSSI value during the reception of each beacon frame received; it can also report the RSSI value multiple times within a reception window. Subsequently, the wireless terminal determines the offset amplitude based on the beacon arrival offset sequence and determines the fluctuation amplitude based on the maximum change in the received signal strength value within the reception window of multiple consecutive beacon frames. Finally, the early wake-up protection duration is determined jointly based on the offset amplitude and the fluctuation amplitude. For example, a larger offset amplitude indicates more significant beacon arrival jitter; a larger fluctuation amplitude indicates a more unstable wireless link. When both are large, the early wake-up protection duration can be set longer; when both are small, the early wake-up protection duration can be set shorter.

[0115] In one example, the wireless terminal acquires the RSSI values ​​of five consecutive beacon frames, which are -60dBm, -62dBm, -70dBm, -65dBm, and -68dBm, respectively. Within the corresponding reception window, the maximum RSSI value is -60dBm, the minimum value is -70dBm, and the fluctuation range is 10dBm. Simultaneously, the wireless terminal determines the offset range as 1.3 milliseconds based on the beacon arrival offset sequence. The wireless terminal determines the early wake-up protection duration based on both the offset range and the fluctuation range. For example, it can use a weighted summation method, with the offset range weighted at 0.6 and the fluctuation range weighted at 0.4. Therefore, the early wake-up protection duration can increase as the offset range and fluctuation range increase.

[0116] In this embodiment, there are several ways to obtain the received signal strength value. For example, it can be directly reported by the wireless network interface card during beacon frame reception; it can also be read by the terminal operating system from the wireless network interface card driver; or it can be actively queried by the terminal after the beacon frame is parsed. Any method that can obtain the received signal strength value is acceptable, and this embodiment does not impose any particular restrictions.

[0117] There are several ways to determine the fluctuation amplitude. For example, the difference between the maximum and minimum RSSI values ​​within multiple consecutive beacon frame reception windows can be calculated; the standard deviation or variance of RSSI can also be calculated; or the rate of change or trend of RSSI can be calculated. Any method that can characterize the maximum degree of change in received signal strength within multiple consecutive beacon frame reception windows is acceptable, and this embodiment does not impose any particular limitations.

[0118] Furthermore, the method for determining the early wake-up protection duration based on the offset amplitude and fluctuation amplitude can be flexibly set. In one example, weights can be assigned to the offset amplitude and fluctuation amplitude respectively, and the early wake-up protection duration can be determined by weighted summation. In another example, the offset amplitude and fluctuation amplitude can be divided into intervals, and the early wake-up protection duration can be determined by looking up a table based on the combination of the two intervals. In yet another example, the larger of the protection duration corresponding to the offset amplitude and the protection duration corresponding to the fluctuation amplitude can be taken as the early wake-up protection duration. Different methods are acceptable as long as they can comprehensively reflect beacon arrival jitter and link fluctuation; this embodiment does not impose any particular restrictions.

[0119] Furthermore, the weights of offset and fluctuation amplitudes can optionally be adjusted according to the actual scenario. For example, in substation scenarios with strong electromagnetic interference, the weight of fluctuation amplitude can be appropriately increased; in scenarios with significant clock deviation, the weight of offset amplitude can be appropriately increased. This approach allows the early wake-up protection duration to better reflect the actual link status.

[0120] In some examples, for wireless terminals in substation intelligent monitoring electronic equipment, the early wake-up protection duration can be determined by combining the offset amplitude of beacon arrival and the fluctuation amplitude of received signal strength. This approach allows the protection duration to simultaneously account for beacon arrival jitter and wireless link stability, improving the match between the protection duration and the actual link status.

[0121] This implementation method eliminates the reliance on a single offset information for the early wake-up protection duration. Instead, it combines the received signal strength variation for joint determination, which enhances adaptability to the complex wireless link environment of substations. This makes the early wake-up protection duration more closely match the actual link status and reduces the risk of missed reception due to beacon arrival offset or signal fluctuations. It also reduces unnecessary premature and invalid wake-ups, improves the accuracy of wireless network interface card wake-up control, and ultimately enhances communication stability and extends terminal battery life in the complex wireless environment of substations.

[0122] Furthermore, in practical applications, during the WAPI association period, the access point may cache service data to be sent to the wireless terminal in the substation intelligent monitoring equipment. If the terminal directly enters the low power state after waking up to receive the beacon frame, it may cause a delay in receiving the cached service data, and the terminal's judgment of the service idle state may be inconsistent with the actual situation, thus affecting the subsequent sleep decision.

[0123] Based on this problem, and building upon the above embodiments, the method may further include: after the wake-up control command instructs the wireless network interface card to enter a wake-up state, parsing the traffic indication mapping field in the beacon frame to obtain the target bitmap value; when the target bitmap value is non-zero, generating a keep-wake command and a cached data request sending command, wherein the keep-wake command is used to instruct the wireless network interface card to maintain the wake-up state, and the cached data request sending command is used to request the access point to send cached data associated with the wireless network interface card; and after the wireless network interface card completes the reception of the corresponding cached data, clearing the continuous idle count value maintained locally by the terminal.

[0124] In this embodiment, the Traffic Indication Mapping field can refer to a field in the Access Point Beacon frame used to indicate the presence of cached data, such as the TIM field in a WAPI beacon frame. The Target Bitmap Value can refer to the value of the bitmap bit in the Traffic Indication Mapping field that matches the current terminal association identifier. The Keep-Wake Instruction can refer to an instruction used to instruct the wireless network interface card to remain in a wake-up state after completing the reception of the current beacon frame. The Cache Data Request Send Instruction can refer to an instruction used to request the access point to send cached data associated with the wireless network interface card. The Continuous Idle Count Value can refer to a count value maintained locally by the terminal to record the number of consecutive beacon periods in which no cached data reception has occurred.

[0125] Furthermore, after the wireless network interface card enters the wake-up state and receives the beacon frame at the target wake-up time, the terminal parses the traffic indication mapping field in the beacon frame, extracts the bitmap bits that match the current terminal's associated identifier, and obtains the target bitmap value. When the target bitmap value is non-zero, it indicates that the access point has cached data associated with the terminal. The terminal generates a keep-wake command and a cached data request send command, causing the wireless network interface card to maintain the wake-up state and request the access point to send the cached data. After the wireless network interface card completes the reception of the corresponding cached data, the terminal clears the continuous idle count value to zero, indicating that cached data reception has occurred within this beacon cycle, and the continuous idle state has been interrupted.

[0126] In one example, the terminal parses the traffic indication mapping field of the target beacon frame and obtains a target bitmap value of 1. It then generates a keep-wake command to keep the wireless network interface card in a wake-up state and generates a cached data request to send a cached data sent command to request the access point to send the cached data associated with the terminal. After the cached data is received, the terminal clears the continuous idle count value from 3 to 0.

[0127] In another example, there are multiple ways to parse the traffic indication mapping field. For instance, it can be read directly by the terminal during beacon frame parsing; it can be reported by the wireless network interface card after receiving the beacon frame; or it can be read from the cache by the terminal after the beacon frame parsing is complete. Any method that can obtain the target bitmap value is acceptable, and this embodiment does not impose any particular restrictions.

[0128] In another example, there are multiple ways to determine the target bitmap value. For instance, the corresponding bitmap bit can be found in the traffic indication mapping field based on the terminal association identifier; it can also be determined based on the association identifier mapping relationship configured in the access point; or, when the terminal supports multiple service associations, the bitmap bit corresponding to each service can be extracted separately. Any method that can determine whether the access point has cached data associated with the terminal is acceptable, and this embodiment does not impose any particular restrictions.

[0129] Furthermore, the generation methods for the keep-wake command and the cached data request send command can be flexibly configured. In one example, the terminal can generate the keep-wake command first when the target bitmap value is non-zero, and then generate the cached data request send command; in another example, the terminal can combine the two into a single command; in yet another example, the terminal can write the keep-wake flag to the wireless network interface card while generating the cached data request send command. Any method that enables the wireless network interface card to maintain its wake-up state and request the access point to send cached data is acceptable, and this embodiment does not impose any particular restrictions.

[0130] Alternatively, the timing for clearing the continuous idle count can vary. For example, it can be cleared after the wireless network interface card receives the end-of-buffered data marker; it can be cleared after multiple consecutive buffered data frames are received and verified; or it can be cleared after the terminal confirms that the buffered data reception is complete. Any method that triggers clearing after the buffered data reception is complete is acceptable, and this embodiment does not impose any particular restrictions.

[0131] In some examples, for wireless terminals in substation intelligent monitoring electronic equipment, when the bitmap value of the flow indication mapping field is non-zero, the service connection persistence identifier of the mobile data communication service and the current power status of the wireless network interface card can be read. The service connection persistence identifier is matched with the access point cache service identifier, and a hold-and-wake command is generated when the match is successful and the current power status of the wireless network interface card is in a low-power exit state. A cache data request frame sending command is constructed based on the service connection persistence identifier, terminal association identifier, and cache read sequence number. After receiving a cache data end identifier that matches the cache read sequence number, the cache data reception completion status is determined, and the continuous idle count value is cleared to zero. In this way, the cache data request can be matched with the service association status, and the continuous idle count value can be reset in a timely manner after the cache data reception is completed.

[0132] By maintaining the wake-up state and initiating a cached data request while the target bitmap value is non-zero, the terminal can continuously receive the corresponding cached content when there is data to be received, avoiding delays in receiving cached service data. After receiving the data, the continuous idle count value is cleared to zero, so that subsequent idle judgment and sleep control are updated based on the latest service status. This ensures the consistency between the wake-up maintenance logic and the idle statistics, improves the accuracy of sleep decisions in subsequent beacon cycles, helps reduce idle waiting, missed reception, and invalid wake-ups, improves communication stability in complex wireless environments in substations, and extends the terminal's battery life.

[0133] Furthermore, in practical applications, since the wireless terminals in the substation intelligent monitoring equipment still need to continuously listen for beacon frames when services are idle, waking up the wireless network interface card every beacon cycle would cause unnecessary wake-up overhead; while skipping too many beacon frames might lead to delays in receiving cached service data or missing service bursts. At the same time, the requirements for battery life and service response capabilities vary depending on the remaining battery power of the terminal.

[0134] Therefore, based on the above embodiments, the method may further include: when the target bitmap value is zero, obtaining the continuous idle count value maintained locally by the terminal; comparing the continuous idle count value with the idle count segment table to obtain a candidate value for the number of skippable beacon frames; obtaining the remaining battery power and comparing the remaining battery power with the power range configuration table to obtain the power constraint upper limit; determining the smaller of the candidate value for the number of skippable beacon frames and the power constraint upper limit as the actual number of skipped beacon frames; calculating the candidate sleep span duration based on the actual number of skipped beacon frames and the nominal beacon frame transmission period; subtracting the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep span duration to obtain the low power duration; when the low power duration is greater than the minimum effective sleep duration, generating a segmented low power instruction and a low power timer write instruction, wherein the segmented low power instruction is used to instruct the wireless network interface card to enter a low power state, and the low power timer write instruction is used to write the low power duration into the low power timer.

[0135] In this embodiment, the continuous idle count value can refer to a count value locally maintained by the terminal, used to record the number of cached data receptions that have not occurred within multiple consecutive beacon cycles. The idle count segmentation table can refer to a pre-set mapping table used to determine candidate values ​​for the number of skippable beacon frames based on the continuous idle count value. The candidate value for the number of skippable beacon frames can refer to the number of skippable beacon frames initially determined based on the continuous idle count value. The remaining battery power can refer to the current remaining battery power of the terminal, which can be sampled by the terminal's power management chip or battery management module. The power range configuration table can refer to a pre-set mapping table used to determine the upper limit of power constraints based on the remaining battery power. The upper limit of power constraints can refer to the maximum number of allowed skippable beacon frames determined based on the remaining battery power. The actual number of skipped beacon frames can refer to the final number of skipped beacon frames determined after comprehensively considering the service idle trend and power constraints.

[0136] The candidate sleep span duration can refer to the theoretical sleep span duration calculated based on the actual number of skipped beacon frames and the nominal beacon frame transmission period. The low-power duration can refer to the actual sleep duration written to the low-power timer, obtained by subtracting the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep span duration. The minimum valid sleep duration can refer to the pre-set minimum sleep duration used to determine whether sleep has actual energy-saving significance. The segmented low-power instruction can refer to the instruction used to instruct the wireless network interface card to enter a low-power state. The low-power timer write instruction can refer to the instruction used to write the low-power duration to the low-power timer.

[0137] Furthermore, when the target bitmap value is zero, it indicates that the access point currently has no cached data associated with the terminal, and the terminal can enter a low-power state. At this time, the terminal obtains the locally maintained continuous idle count value and compares it with the idle count segment table to obtain a candidate value for the number of skippable beacon frames. Simultaneously, the terminal obtains the remaining battery power and compares it with the power range configuration table to obtain the upper limit of the power constraint. Then, the terminal determines the smaller of the candidate value for the number of skippable beacon frames and the upper limit of the power constraint as the actual number of skipped beacon frames, thus determining the number of skipped beacon frames within the allowable range of service idle trend and power constraint.

[0138] Next, the terminal calculates the candidate sleep span duration based on the actual number of skipped beacon frames and the nominal beacon frame transmission period. For example, the candidate sleep span duration equals the product of the actual number of skipped beacon frames and the nominal beacon frame transmission period. Then, the terminal subtracts the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep span duration to obtain the low-power duration. When the low-power duration is greater than the minimum effective sleep duration, it indicates that this sleep mode has actual energy-saving significance. The terminal generates a segmented low-power instruction and a low-power timer write instruction to put the wireless network interface card into a low-power state and write the low-power duration to the low-power timer. When the low-power duration is less than or equal to the minimum effective sleep duration, it indicates that the energy-saving benefit of this sleep mode is limited. The terminal may choose not to enter the low-power state or maintain the current wake-up state.

[0139] In one example, the continuous idle count is 5, and the candidate value for the number of skippable beacon frames corresponding to 3 to 5 in the idle count segmentation table is 3; the remaining battery power is 40%, and the upper limit of the power constraint corresponding to 20% to 50% in the power range configuration table is 4. The terminal takes the smaller of the candidate value 3 and the upper limit of the power constraint 4, which is 3, to determine the actual number of skipped beacon frames. If the nominal beacon frame transmission period is 100 milliseconds, then the candidate sleep span duration is 300 milliseconds; if the early wake-up protection duration is 2 milliseconds, and the wireless network interface card wake-up time is 5 milliseconds, then the low power duration is 293 milliseconds; if the minimum effective sleep duration is 20 milliseconds, then the low power duration is longer than the minimum effective sleep duration, and the terminal generates segmented low power instructions and low power timer write instructions.

[0140] In some examples, the idle count segmentation table can be configured in several ways. For instance, it can be segmented according to the consecutive idle count values ​​in ascending order, with each segment corresponding to a candidate value for the number of skippable beacon frames; it can also be segmented according to the nominal transmission period of the beacon frames, making the candidate values ​​proportional to the beacon period; or it can be segmented according to the service hold-up level, so that higher hold-up level services correspond to smaller candidate values. Any method that can determine the candidate value for the number of skippable beacon frames based on the consecutive idle count values ​​is acceptable, and this embodiment does not impose any particular restrictions.

[0141] There are several ways to set up the power range configuration table. For example, multiple ranges can be divided according to the remaining battery power, with each range corresponding to a power constraint upper limit; ranges can also be divided according to the terminal's power supply method, such as using different configurations for battery-powered terminals and energy-harvested terminals; or ranges can be divided according to the importance of the service, for example, important monitoring services correspond to smaller power constraint upper limits. Any method that can determine the power constraint upper limit based on the remaining battery power is acceptable, and this embodiment does not impose any particular restrictions.

[0142] The method for determining the actual number of skipped beacon frames can be flexibly set. In one example, the smaller of the candidate value for the number of skippable beacon frames and the upper limit of the power constraint can be determined as the actual number of skipped beacon frames. In another example, the smaller of the two can be taken first, and then downgraded based on the service availability level. In yet another example, a maximum skip limit can be set based on the smaller of the two. Different methods are acceptable as long as they achieve a balance between service idle trend and power constraint; this embodiment does not impose any special restrictions.

[0143] Alternatively, there can be multiple ways to calculate the low-power duration. For example, the early wake-up protection time and the wireless network interface card wake-up time can be directly subtracted from the candidate sleep span duration to obtain the low-power duration; clock calibration time or channel switching time can be further subtracted on top of the subtraction; or a minimum low-power duration limit can be set after subtraction. Different methods are acceptable as long as they can yield a low-power duration suitable for writing to the low-power timer, and this embodiment does not impose any particular restrictions.

[0144] In some examples, for wireless terminals in substation intelligent monitoring electronic equipment, the continuous idle count value corresponding to the mobile data communication service can be read. This continuous idle count value is then matched with an idle count segment table. Based on the matched count segment, candidate values ​​for the number of skippable beacon frames are read. The remaining battery power is compared with a power range configuration table to determine the upper limit of the power constraint. The smaller value between the candidate value for the number of skippable beacon frames and the upper limit of the power constraint is determined as the actual number of skipped beacon frames. This method allows the sleep decision to simultaneously consider both service idle trends and battery power constraints.

[0145] In this way, when the target bitmap value is zero, the terminal can determine the frame skipping length based on the continuous idle count value and the remaining battery power, avoiding frequent wake-ups when the service is idle or excessive sleep when the battery is low. After deducting the wake-up overhead, it judges whether the duration of low power consumption meets the threshold, so that the timing of low power consumption entry is consistent with the current service status and energy status, improving the matching degree between sleep decision and service status and power status, reducing the probability of invalid wake-ups and short-term repeated switching, and matching the low power timer control with the actual sleep duration. This helps to improve the communication stability and extend the terminal's battery life in the complex wireless environment of substations.

[0146] Furthermore, in specific applications, the requirements for real-time communication and sleep depth vary among different substation intelligent monitoring services. For example, services such as alarm linkage message transmission and telemetry and remote control command transmission have high real-time requirements. If the terminal determines the number of beacon frames to be skipped based solely on the continuous idle count value, it may skip too many beacon frames when the service maintains a high level, leading to service response delays. On the other hand, if a small number of skippable beacon frames is used for all services, low real-time services may not be able to obtain the expected energy-saving benefits.

[0147] Therefore, based on the above embodiments, the continuous idle count value is compared with the idle count segment table to obtain candidate values ​​for the number of skippable beacon frames. This includes: obtaining an incrementing record of the continuous idle count value within multiple consecutive beacon periods; matching the number of consecutive periods in the incrementing record where no buffered data reception occurred with the idle count segment table to obtain idle stable segments; obtaining the maintenance level of the communication service; when the maintenance level is a high maintenance level, determining the candidate values ​​corresponding to adjacent segments in the idle count segment table that are smaller than the idle stable segments as candidate values ​​for the number of skippable beacon frames; when the maintenance level is a low maintenance level, determining the candidate values ​​corresponding to the idle stable segments as candidate values ​​for the number of skippable beacon frames.

[0148] The incrementing record refers to a record where the continuous idle count value increases with the progress of the beacon cycle over multiple consecutive beacon cycles. This reflects whether the terminal remains in an idle state for several consecutive beacon cycles. The number of consecutive cycles without buffered data reception refers to the number of cycles in the incrementing record where no buffered data reception occurred within multiple consecutive beacon cycles. The idle stable segment refers to the segment matched by the number of consecutive cycles without buffered data reception against the idle count segment table. The communication service hold-up level refers to the level information used to characterize the communication service's requirements for connection hold-up and real-time response, such as high hold-up level and non-high hold-up level. High hold-up level refers to a service level with higher requirements for service response real-time, buffered data reception timeliness, or connection stability. Adjacent segments refer to segments in the idle count segment table that are adjacent to the idle stable segment and whose corresponding candidate value is lower than the corresponding candidate value of the idle stable segment.

[0149] Furthermore, the terminal can record the increment of the continuous idle count value over multiple consecutive beacon periods, obtaining an increment record. If no buffered data reception occurs within multiple consecutive beacon periods in the increment record, the terminal matches the number of consecutive periods without buffered data reception with the idle count segment table to obtain an idle stable segment. Subsequently, the terminal obtains the hold-up level of the current communication service and determines the candidate value for the number of skippable beacon frames based on the hold-up level. When the hold-up level is high, it indicates that the service has high real-time response requirements, and the terminal determines the candidate value corresponding to the adjacent segment in the idle count segment table that is smaller than the idle stable segment as the candidate value for the number of skippable beacon frames, that is, appropriately reducing the number of skippable beacon frames under a high hold-up level; when the hold-up level is not high, it indicates that the service has relatively low real-time response requirements, and the terminal determines the candidate value corresponding to the idle stable segment as the candidate value for the number of skippable beacon frames.

[0150] In one example, the consecutive idle count values ​​increment over multiple beacon periods as 0, 1, 2, 3, 4, 5, with 6 consecutive periods without buffered data reception. The idle stable segments matched against the idle count segment table are segments 3 to 5, with a corresponding candidate value of 3. If the current communication service is alarm linkage message transmission with a high maintenance level, the terminal determines the candidate value corresponding to the adjacent segment in the idle count segment table that is smaller than the idle stable segment, for example, 2, as the candidate value for the number of beacon frames that can be skipped. If the current communication service is inspection communication data interaction with a low maintenance level, the terminal determines the candidate value 3 corresponding to the idle stable segment as the candidate value for the number of beacon frames that can be skipped.

[0151] In this embodiment, there are several ways to obtain the incrementing record. For example, the continuous idle count value can be read and recorded after each beacon cycle ends; the time of change and the changed value can be recorded when the continuous idle count value changes; or an incrementing counter can be maintained locally on the terminal and incremented when no buffered data is received in each beacon cycle. Any method that can reflect the idle incrementing situation within multiple consecutive beacon cycles is acceptable, and this embodiment does not impose any particular restrictions.

[0152] There are several ways to determine a stable idle segment. For example, the number of consecutive periods without buffered data reception can be directly matched with the idle count segment table to obtain a matching segment; alternatively, the consecutive idle count values ​​themselves can be matched with the idle count segment table to obtain a matching segment; or the trend of consecutive idle count values ​​in the incrementing record can be used to determine a stable idle segment. Any method that can determine a segment matching the current idle state is acceptable, and this embodiment does not impose any particular limitations.

[0153] The method for obtaining the retention level of communication services can be flexibly set. In one example, it can be determined based on the type of communication service; for example, alarm linkage message transmission services correspond to a high retention level, while inspection communication data interaction services correspond to a low retention level. In another example, it can be determined based on the service quality parameters of the service. In yet another example, it can be determined based on the service configuration information issued by the access point. Different methods are acceptable as long as they can determine the requirements of the communication service for connection retention and real-time response; this embodiment does not impose any particular restrictions.

[0154] Furthermore, there are multiple ways to select adjacent segments under a high preservation level. For example, the segment immediately preceding the idle stable segment in the idle count segment table can be selected; the lower-level candidate position preceding the candidate value of the idle stable segment can be selected; or any segment in the idle stable segment table whose corresponding candidate value is less than the candidate value of the idle stable segment can be selected. Any method that can appropriately reduce the number of skipped beacon frames under a high preservation level is acceptable, and this embodiment does not impose any particular restrictions.

[0155] In some examples, for wireless terminals in substation intelligent monitoring electronic equipment, the increasing record of continuous idle count values ​​over multiple consecutive beacon cycles and the service maintenance level of mobile data communication services can be obtained. The number of consecutive cycles in the increasing record where no buffered data reception occurred is matched with the idle count segment table to obtain idle stable segments. When the service maintenance level is high, the candidate value of the number of skippable beacon frames is read according to the previous lower-level candidate value of the corresponding candidate value of the idle stable segment; otherwise, the candidate value of the number of skippable beacon frames is directly read according to the idle stable segment. In this way, the candidate value of the number of skippable beacon frames can be matched with the service maintenance level, avoiding the impact on real-time response of high-maintenance-level services due to skipping too many beacon frames.

[0156] By determining idle stability segments based on incremental records and selecting different candidate value sources in combination with the hold level, the terminal can form a candidate value for the number of skippable beacon frames that matches the service hold requirements when the idle duration is strong. This avoids high hold level services from affecting real-time response due to skipping too many beacon frames, and also avoids low hold level services from losing energy-saving benefits due to excessive conservatism. This ensures that subsequent low-power control is consistent with communication hold requirements, and reduces invalid wake-ups and unnecessary beacon reception.

[0157] The wireless terminal adaptive sleep management method provided in this application dynamically collects and analyzes multi-dimensional operating parameters of WAPI network terminals in substation scenarios (such as actual beacon frame arrival offset, received signal strength fluctuation, service idle trend, battery level, and interface card wake-up time). It correlates wireless link status, service characteristics, and terminal hardware features in multiple dimensions, and dynamically determines sleep parameters such as early wake-up protection duration, actual number of skipped beacon frames, and low-power duration. This enables the terminal wake-up and sleep strategies to adaptively adjust according to link status, service idle trend, and battery level, rather than relying on a fixed beacon period or a single traffic indication. This method can be applied to intelligent monitoring and communication systems within power system substations, such as relay protection room monitoring terminals, switchgear online monitoring terminals, and inspection robot communication terminals. These WAPI network terminals maintain a connection with the access point via a wireless network, undertaking functions such as telemetry and remote control command transmission, real-time equipment status reporting, and alarm linkage message transmission. Therefore, it can solve the problems that existing fixed-period wake-up strategies are difficult to adapt to the beacon arrival jitter and service idle state changes in the complex wireless environment of substations, resulting in terminals frequently waiting idly or missing beacons, a large number of invalid wake-ups, battery power being out of sync with the sleep strategy, and wake-up time offsetting energy-saving benefits. It can reduce invalid energy consumption and extend the equipment's battery life while maintaining network connection stability.

[0158] Figure 2 Flowchart of the wireless terminal adaptive sleep management method provided in this application Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiments, the adaptive sleep management process of wireless terminals is described in detail. The method includes:

[0159] S201. Obtain the actual arrival time of the access point beacon frame, the nominal transmission period of the beacon frame, the bitmap value of the traffic indication mapping field, the received signal strength value, the wake-up time of the wireless network interface card, and the remaining battery power.

[0160] Furthermore, in this step, the receiving timestamp generated by the terminal's local clock when the wireless network interface card in the substation's intelligent monitoring electronic equipment receives the access point beacon frame can be obtained first. The receiving timestamp is then compared with the timestamp field obtained from parsing the beacon frame. The actual arrival time of the beacon frame is determined when the timestamp difference does not exceed the preset synchronization deviation threshold.

[0161] The beacon interval field and traffic indication mapping field in the access point beacon frame are parsed, the beacon interval field is converted into the nominal transmission period of the beacon frame, and the bitmap bit that matches the terminal association identifier corresponding to the mobile data communication service is extracted from the traffic indication mapping field to determine the bitmap value of the traffic indication mapping field.

[0162] Read the received signal strength value reported by the wireless network interface card during the reception of access point beacon frames, call the interface card wake-up start and end time and battery power sampling value recorded by the terminal power management chip, and determine the wireless network interface card wake-up time and remaining battery power respectively.

[0163] S202. Determine the beacon arrival offset based on the difference between the actual arrival time of several consecutive beacon frames and the nominal arrival time of the beacon frames, and determine the early wake-up protection duration based on the offset amplitude of the beacon arrival offset and the fluctuation amplitude of the received signal strength value.

[0164] In some examples, the steps of determining the beacon arrival offset and the early wake-up protection duration may include: obtaining the actual arrival times of several consecutive beacon frames and the nominal arrival times of beacon frames calculated according to the nominal transmission period of the beacon frames; calculating the arrival time difference between the actual arrival time of each beacon frame and the nominal arrival time of the beacon frame, and removing arrival time differences that exceed a preset single-frame abnormal deviation threshold to obtain an effective arrival time difference sequence; determining the beacon arrival offset based on multiple arrival time differences that are later in the time sequence of the effective arrival time difference sequence; determining the offset amplitude based on the maximum deviation of the beacon arrival offset; determining the fluctuation amplitude by combining the maximum change of the received signal strength value within the corresponding receiving window; and generating the early wake-up protection duration.

[0165] Furthermore, the process of determining the effective time-of-arrival difference sequence may include: acquiring a series of consecutive access point beacon frames received by the substation intelligent monitoring electronic equipment in the mobile data communication service keep-associated state; configuring a frame sequence bit for each access point beacon frame according to the receiving order; and calculating the nominal arrival time of the beacon frame corresponding to each frame sequence bit based on the actual arrival time of the first access point beacon frame and the nominal transmission period of the beacon frame; calculating the difference between the actual arrival time of the beacon frame corresponding to each frame sequence bit and the nominal arrival time of the beacon frame; and deleting the difference corresponding to the sequence bit of the next frame when the difference between adjacent frame sequence bits exceeds a preset continuous offset change threshold, thereby obtaining the effective time-of-arrival difference sequence.

[0166] S203. When the bitmap value of the flow indicator mapping field is non-zero, generate a hold-up wake-up instruction and a buffered data request frame sending instruction, and clear the continuous idle count value after the buffered data is received.

[0167] In some embodiments, the steps of generating a hold-up wake-up command and a cached data request frame transmission command, and clearing the continuous idle count value after the cached data reception is completed, may include: when the bitmap value of the flow indicator mapping field is non-zero, reading the service connection hold identifier of the mobile data communication service and the current power status of the wireless network interface card in the substation intelligent monitoring electronic equipment, matching the service connection hold identifier with the access point cached service identifier, and generating a hold-up wake-up command when the match is successful and the current power status of the wireless network interface card is in a low-power exit state; constructing a cached data request frame transmission command based on the service connection hold identifier, the terminal association identifier, and the cache read sequence number, and determining the cached data reception completion state after receiving a cached data end identifier that matches the cache read sequence number, clearing the continuous idle count value to zero, and outputting the count reset result.

[0168] Specifically, the process of determining the completion status of cached data reception may include: obtaining the cached data frame returned by the access point, performing consistency verification on the terminal association identifier, mobile data communication service identifier and cache read sequence number in the cached data frame, and reading the data indicator bit and frame sequence number in the cached data frame when the verification passes, to obtain the cached frame verification result; when the cached frame verification result is in the pass state, the data indicator bit is in the no-cache state and the frame sequence number is continuous with the received frame sequence record, the cached data reception completion status is determined, and the cached data reception completion status is used as the trigger condition for clearing the continuous idle count value.

[0169] S204. When the bitmap value of the flow indication mapping field is zero, determine the candidate value of the number of skippable beacon frames based on the continuous idle count value, determine the upper limit of the power constraint based on the range of the remaining battery power, and determine the actual number of skippable beacon frames based on the candidate value of the number of skippable beacon frames and the upper limit of the power constraint.

[0170] In this step, the determination of the actual number of skipped beacon frames may specifically include: when the bitmap value of the flow indication mapping field is zero, reading the continuous idle count value corresponding to the mobile data communication service in the substation intelligent monitoring electronic equipment, matching the continuous idle count value with the idle count segment table, and reading the candidate value of the number of skippable beacon frames according to the matched count segment; comparing the remaining battery power with the power range configuration table, determining the upper limit of the power constraint, and determining the smaller value between the candidate value of the number of skippable beacon frames and the upper limit of the power constraint as the actual number of skipped beacon frames.

[0171] In some examples, the process of reading the candidate value of the number of skippable beacon frames may include: obtaining the incrementing record of the continuous idle count value over multiple consecutive beacon periods and the service maintenance level of the mobile data communication service; matching the number of consecutive periods in the incrementing record where no buffered data reception occurred with the idle count segment table to obtain the idle stable segment; when the service maintenance level is a high maintenance level, reading the candidate value of the number of skippable beacon frames according to the previous lower-level candidate value of the candidate value corresponding to the idle stable segment; otherwise, directly reading the candidate value of the number of skippable beacon frames according to the idle stable segment.

[0172] S205. Based on the actual number of skipped beacon frames, the nominal beacon frame transmission period, the early wake-up protection duration, and the wake-up time of the wireless network interface card, determine the low-power duration. When the low-power duration exceeds the minimum valid sleep duration, generate the wireless network interface card segmented low-power instruction and the low-power timer write instruction.

[0173] Specifically, the steps for generating segmented low-power instructions and low-power timer write instructions for the wireless network interface card may include: obtaining the actual number of skipped beacon frames and the nominal transmission period of the beacon frames corresponding to the mobile data communication service in the substation intelligent monitoring electronic equipment; converting the spanning beacon period corresponding to the actual number of skipped beacon frames into the nominal transmission period of the beacon frames to obtain the candidate sleep spanning duration; subtracting the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep spanning duration to obtain the low-power duration; and generating segmented low-power instructions and low-power timer write instructions for the wireless network interface card when the low-power duration exceeds the minimum effective sleep duration.

[0174] The wireless terminal adaptive sleep management method provided in this application adaptively determines the early wake-up protection duration, the actual number of skipped beacon frames, and the low power duration by comprehensively considering the actual arrival offset of access point beacon frames, the fluctuation of received signal strength, the status of traffic indication mapping field, the continuous idle count, the remaining battery power, and the wake-up time of the wireless network interface card. Specifically, the early wake-up protection duration is determined by combining continuous beacon arrival offset with received signal strength fluctuations, ensuring that the wake-up time aligns with changes in the substation wireless link caused by link jitter, signal fluctuations, and clock deviations, reducing the risk of missed beacon reception due to premature wake-up or late wake-up. By keeping the wireless network interface card awake and sending buffered data request frames when the flow indicator mapping field is non-zero, the substation's intelligent monitoring electronic equipment can promptly acquire access point buffered data, ensuring the continuity of reception of telemetry and control commands, equipment status reporting messages, alarm linkage messages, and inspection communication data within the substation. Furthermore, by combining continuous idle counts, battery remaining power range, and service retention level when the flow indicator mapping field is zero, the actual number of skipped beacon frames is determined, allowing the sleep interval to be dynamically adjusted according to the substation's service idle trend, terminal battery life requirements, and service retention requirements, reducing the number of invalid wake-ups.

[0175] Furthermore, this method uses the actual number of skipped beacon frames, the nominal beacon frame transmission period, the early wake-up protection duration, and the wireless network interface card wake-up time in the calculation of low-power duration. When the low-power duration exceeds the minimum valid sleep duration, segmented low-power instructions and low-power timer write instructions are generated, preventing frequent short-term switching during the sleep process and reducing wake-up overhead. Simultaneously, by judging the completion status of buffered data reception at the access point and verifying and clearing the continuous idle count after buffered data reception, the continuous idle count accurately reflects the service idle status, providing a reliable basis for subsequent sleep decisions. Therefore, this method can adaptively reduce the energy consumption of invalid wake-ups and sleep switching while maintaining the wireless link and buffered data reception capabilities of the substation WAPI terminal, improving beacon acquisition stability, endurance, and association maintenance stability, and ensuring the communication continuity of substation intelligent monitoring electronic equipment in on-site telemetry and control, equipment status reporting, alarm linkage, and inspection communication services.

[0176] In addition, this application also provides a wireless terminal adaptive sleep management system, including:

[0177] The parameter acquisition module is used to acquire the actual arrival time of the access point beacon frame, the nominal transmission period of the beacon frame, the bitmap value of the traffic indication mapping field, the received signal strength value, the wake-up time of the wireless network interface card, and the remaining battery power.

[0178] The protection duration determination module is used to determine the beacon arrival offset based on the difference between the actual arrival time of several consecutive beacon frames and the nominal arrival time of the beacon frames, and to determine the early wake-up protection duration based on the offset amplitude of the beacon arrival offset and the fluctuation amplitude of the received signal strength value.

[0179] The wake-up and request control module is used to generate a keep-wake-up instruction and a cached data request frame sending instruction when the bitmap value of the flow indicator mapping field is non-zero, and to clear the continuous idle count value after the cached data is received.

[0180] The frame skipping quantity determination module is used to determine the candidate value of the number of beacon frames that can be skipped based on the continuous idle count value when the bitmap value of the flow indication mapping field is zero, determine the upper limit of the power constraint based on the range of the remaining battery power, and determine the actual number of beacon frames skipped based on the candidate value of the number of beacon frames that can be skipped and the upper limit of the power constraint.

[0181] The low-power instruction generation module is used to determine the low-power duration based on the actual number of skipped beacon frames, the nominal beacon frame transmission period, the early wake-up protection duration, and the wake-up time of the wireless network interface card. When the low-power duration exceeds the minimum effective sleep duration, it generates segmented low-power instructions for the wireless network interface card and low-power timer write instructions.

[0182] The wireless terminal adaptive sleep management system provided in this embodiment can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0183] Figure 3 This is a schematic diagram of the structure of the wireless terminal adaptive sleep management device provided in this application, as shown below. Figure 3 As shown, the wireless terminal adaptive sleep management device 30 provided in this embodiment includes:

[0184] The parameter acquisition module 301 is used to acquire the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card.

[0185] The first determining module 302 is used to determine the nominal arrival time of each beacon frame based on the actual arrival time of the first beacon frame in a series of consecutive beacon frames and the nominal transmission period of the beacon frame.

[0186] The second determining module 303 is used to determine the beacon arrival offset sequence based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame.

[0187] The third determining module 304 is used to determine the early wake-up protection duration based on the beacon arrival offset sequence;

[0188] The fourth determining module 305 is used to take the beacon frame to be received after a series of consecutive beacon frames as the target beacon frame, and determine the nominal arrival time of the target beacon frame based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame.

[0189] The instruction generation module 306 is used to determine the target wake-up time based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, and to generate a wake-up control instruction. The wake-up control instruction is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

[0190] In one possible implementation, the parameter acquisition module 301 can also be used to: acquire the receiving timestamp generated by the terminal's local clock when the wireless network interface card receives the access point beacon frame; compare the receiving timestamp with the timestamp field parsed from the access point beacon frame to obtain the timestamp difference; when the timestamp difference is less than or equal to a preset synchronization deviation threshold, determine the receiving timestamp as the actual arrival time of the corresponding beacon frame.

[0191] In one possible implementation, the second determining module 303 can also be used to: for each beacon frame, determine the difference between the actual arrival time and the corresponding nominal arrival time as a candidate difference; remove candidate differences that are greater than a preset single-frame abnormal deviation threshold to obtain effective differences; when the change in the effective difference between adjacent beacon frames is greater than a preset continuous offset change threshold, remove the effective difference corresponding to the next beacon frame; and arrange the remaining effective differences after removal according to the beacon frame reception order to obtain a beacon arrival offset sequence.

[0192] In one possible implementation, the third determining module 304 can also be used to: extract a preset number of beacon arrival offsets at the end of the beacon arrival offset sequence; calculate the difference between the maximum and minimum values ​​among the preset number of offset values ​​to obtain the offset amplitude; and determine the early wake-up protection duration based on the offset amplitude.

[0193] In one possible implementation, the parameter acquisition module 301 can also be used to: acquire the received signal strength value; correspondingly, the third determination module 304 can also be used to: determine the corresponding offset amplitude according to the beacon arrival offset sequence; determine the fluctuation amplitude according to the maximum change of the received signal strength value within the receiving window of multiple consecutive beacon frames; and determine the early wake-up protection duration according to the offset amplitude and the fluctuation amplitude.

[0194] In one possible implementation, the instruction generation module 306 can also be used to: after the wake-up control instruction instructs the wireless network interface card to enter the wake-up state, parse the traffic indication mapping field in the beacon frame to obtain the target bitmap value; when the target bitmap value is non-zero, generate a keep-wake instruction and a cached data request to send instruction, the keep-wake instruction instructing the wireless network interface card to maintain the wake-up state, and the cached data request to send instruction requesting the access point to send cached data associated with the wireless network interface card; after the wireless network interface card completes the reception of the corresponding cached data, clear the continuous idle count value maintained locally by the terminal.

[0195] In one possible implementation, the instruction generation module 306 can also be used to: when the target bitmap value is zero, obtain the continuous idle count value maintained locally by the terminal; compare the continuous idle count value with the idle count segment table to obtain a candidate value for the number of skippable beacon frames; obtain the remaining battery power, compare the remaining battery power with the power range configuration table to obtain the power constraint upper limit; determine the smaller value between the candidate value for the number of skippable beacon frames and the power constraint upper limit as the actual number of skipped beacon frames; calculate the candidate sleep span duration based on the actual number of skipped beacon frames and the nominal beacon frame transmission period; subtract the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep span duration to obtain the low power duration; when the low power duration is greater than the minimum effective sleep duration, generate a segmented low power instruction and a low power timer write instruction, wherein the segmented low power instruction is used to instruct the wireless network interface card to enter a low power state, and the low power timer write instruction is used to write the low power duration into the low power timer.

[0196] In one possible implementation, the instruction generation module 306 can also be used to: obtain an incrementing record of the continuous idle count value over multiple consecutive beacon periods; match the number of consecutive periods in the incrementing record where no buffered data reception has occurred with the idle count segment table to obtain an idle stable segment; obtain the maintenance level of the communication service; when the maintenance level is a high maintenance level, determine the candidate values ​​corresponding to adjacent segments in the idle count segment table that are smaller than the idle stable segment as candidate values ​​for the number of skippable beacon frames; when the maintenance level is a low maintenance level, determine the candidate values ​​corresponding to the idle stable segment as candidate values ​​for the number of skippable beacon frames.

[0197] The wireless terminal adaptive sleep management device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0198] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application, which can be a wireless network terminal. Figure 4As shown, the electronic device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the device 40 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0199] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.

[0200] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0201] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0202] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0203] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0204] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0205] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0206] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0207] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0208] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0209] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0210] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0211] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0212] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0213] It should be understood that the terms “comprising” and “having” and any variations thereof used in this application are intended to cover but not exclude inclusion. For example, a product or device that includes a series of components is not necessarily limited to those components that are explicitly listed, but may include other components that are not explicitly listed or that are inherent to such product or device.

[0214] As used in this application, the term "module" means any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that element.

[0215] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A wireless terminal adaptive sleep management method, characterized in that, A wireless terminal used in intelligent monitoring equipment for substations, the wireless terminal including a wireless network interface card, the method comprising: Obtain the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card; The nominal arrival time of each beacon frame is determined based on the actual arrival time of the first beacon frame in the series of consecutive beacon frames and the nominal transmission period of the beacon frame. The beacon arrival offset sequence is determined based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame. The early wake-up protection duration is determined based on the beacon arrival offset sequence; The beacon frame to be received after the consecutive beacon frames is taken as the target beacon frame. The nominal arrival time of the target beacon frame is determined based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame. Based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, the target wake-up time is determined, and a wake-up control command is generated. The wake-up control command is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

2. The method according to claim 1, characterized in that, The process of obtaining the actual arrival times of multiple consecutive beacon frames includes: Obtain the receiving timestamp generated by the terminal's local clock when the wireless network interface card receives access point beacon frames; The received timestamp is compared with the timestamp field parsed from the access point beacon frame to obtain the timestamp difference. When the timestamp difference is less than or equal to a preset synchronization deviation threshold, the received timestamp is determined as the actual arrival time of the corresponding beacon frame.

3. The method according to claim 1, characterized in that, The step of determining the beacon arrival offset sequence based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame includes: For each beacon frame, the difference between the actual arrival time and the corresponding nominal arrival time is determined as a candidate difference. Candidate differences exceeding the preset single-frame abnormal deviation threshold are removed to obtain valid differences; When the change in the effective difference between adjacent beacon frames is greater than the preset continuous offset change threshold, the effective difference corresponding to the next beacon frame is removed. The remaining valid differences after elimination are arranged in the beacon frame reception order to obtain the beacon arrival offset sequence.

4. The method according to claim 3, characterized in that, The step of determining the early wake-up protection duration based on the beacon arrival offset sequence includes: Extract a predetermined number of beacon arrival offsets from the end of the beacon arrival offset sequence; Calculate the difference between the maximum and minimum values ​​among the preset number of offset values ​​to obtain the offset magnitude; The early wake-up protection duration is determined based on the offset magnitude.

5. The method according to claim 1 or 3, characterized in that, The method further includes: Obtain the received signal strength value; Accordingly, determining the early wake-up protection duration based on the beacon arrival offset sequence includes: Based on the beacon arrival offset sequence, determine the corresponding offset magnitude; The fluctuation amplitude is determined based on the maximum variation of the received signal strength value within the receiving window of the multiple consecutive beacon frames; The early wake-up protection duration is determined based on the offset amplitude and the fluctuation amplitude.

6. The method according to any one of claims 1-4, characterized in that, The method further includes: After the wake-up control command instructs the wireless network interface card to enter the wake-up state, the traffic indication mapping field in the beacon frame is parsed to obtain the target bitmap value; When the target bitmap value is non-zero, a keep-wake instruction and a cached data request send instruction are generated. The keep-wake instruction is used to instruct the wireless network interface card to maintain the wake-up state, and the cached data request send instruction is used to request the access point to send cached data associated with the wireless network interface card. After the wireless network interface card completes the reception of the corresponding buffered data, the continuous idle count value maintained locally by the terminal is cleared.

7. The method according to claim 6, characterized in that, The method further includes: When the target bitmap value is zero, obtain the continuous idle count value maintained locally by the terminal; The continuous idle count value is compared with the idle count segment table to obtain candidate values ​​for the number of skippable beacon frames; Obtain the remaining battery power and compare it with the power range configuration table to obtain the upper limit of the power constraint. The smaller of the candidate value for the number of skippable beacon frames and the upper limit of the power constraint is determined as the actual number of skipped beacon frames; Calculate the candidate sleep span duration based on the actual number of skipped beacon frames and the nominal transmission period of the beacon frames; The low-power duration is obtained by subtracting the early wake-up protection duration and the wireless network interface card wake-up time from the candidate sleep span duration; When the duration of low power consumption exceeds the minimum valid sleep duration, a segmented low power consumption instruction and a low power timer write instruction are generated. The segmented low power consumption instruction is used to instruct the wireless network interface card to enter a low power consumption state, and the low power timer write instruction is used to write the duration of low power consumption into the low power timer.

8. The method according to claim 7, characterized in that, The step of comparing the continuous idle count value with the idle count segmentation table to obtain candidate values ​​for the number of skippable beacon frames includes: Obtain the incrementing record of the continuous idle count value over multiple consecutive beacon periods; The number of consecutive periods in the incrementing record where no cached data reception has occurred is matched with the idle count segment table to obtain the idle stable segment; Maintain the level of access to communication services; When the maintenance level is high maintenance level, the candidate value corresponding to the adjacent segment in the idle count segment table that is smaller than the idle stable segment is determined as the candidate value for the number of skippable beacon frames; When the maintenance level is not a high maintenance level, the candidate value corresponding to the idle stable segment is determined as the candidate value for the number of skippable beacon frames.

9. A wireless terminal adaptive sleep management device, characterized in that, include: The parameter acquisition module is used to acquire the actual arrival time of multiple consecutive beacon frames, the nominal transmission period of the beacon frames, and the wake-up time of the wireless network interface card. The first determining module is used to determine the nominal arrival time of each beacon frame based on the actual arrival time of the first beacon frame in the consecutive multiple beacon frames and the nominal transmission period of the beacon frame; The second determining module is used to determine the beacon arrival offset sequence based on the difference between the actual arrival time and the corresponding nominal arrival time of each beacon frame; The third determining module is used to determine the early wake-up protection duration based on the beacon arrival offset sequence; The fourth determining module is used to take the beacon frame to be received after the consecutive multiple beacon frames as the target beacon frame, and determine the nominal arrival time of the target beacon frame based on the actual arrival time of the first beacon frame and the nominal transmission period of the beacon frame; The instruction generation module is used to determine the target wake-up time based on the nominal arrival time of the target beacon frame, the early wake-up protection duration, and the wake-up time of the wireless network interface card, and generate a wake-up control instruction. The wake-up control instruction is used to instruct the wireless network interface card to enter the wake-up state at the target wake-up time.

10. A wireless network terminal, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.