Method and system for reducing power consumption of WiFi device, device and medium
By adaptively adjusting the listening interval, the target listening interval is dynamically adjusted according to the service interaction and router type, which solves the problem of increased power consumption of WiFi devices in abnormal router environments and achieves compatibility between low power consumption and normal communication.
Patent Information
- Application Number
- CN202510971988.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-11-14
AI Technical Summary
Existing power-saving modes for WiFi devices based on fixed cycles are not effectively compatible with routers that send abnormal unicast packets, leading to increased power consumption and the inability to guarantee normal communication latency.
By adaptively adjusting the listening interval, the target listening interval is dynamically adjusted according to the service interaction and router type to ensure compatibility with abnormal routers that send abnormal unicast packets, thereby reducing the overall power consumption of WiFi devices while ensuring normal communication latency.
It effectively reduces the overall power consumption of WiFi devices while maintaining normal communication latency, even when compatible with faulty routers.
Smart Images

Figure CN120957212A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of WiFi device power consumption technology, and in particular to a method, system, device and medium for reducing the power consumption of WiFi devices. Background Technology
[0002] Battery-powered IoT devices using WiFi technology typically have energy-saving requirements. To achieve this, a fixed-period energy-saving mode is often employed, periodically putting the WiFi device into sleep mode to reduce power consumption. However, in this fixed-period energy-saving mode, a larger listening interval setting results in lower power consumption but higher communication latency; conversely, a smaller listening interval setting results in lower communication latency but higher power consumption. Normally, in a fixed-period energy-saving mode, the router's beacon frame will mark the device as needing to be woken up only when data is forwarded for business interaction, causing the WiFi device to exit sleep mode and enter working mode. However, in real-world environments, routers exhibit different behaviors. For example, some routers may abnormally send unicast packets, which wake up the WiFi device, increasing the proportion of time the WiFi device is in working mode and thus increasing power consumption. In scenarios where routers abnormally send unicast packets, a smaller listening interval is usually set, but this still increases the overall power consumption of the WiFi device. Therefore, the current fixed-period energy-saving mode cannot effectively maintain low overall power consumption of the WiFi device while also being compatible with routers that abnormally send unicast packets. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a method, system, device, and medium for reducing the power consumption of WiFi devices. This method adaptively adjusts the target listening interval based on service interaction and router type, thereby ensuring compatibility with abnormal routers that send unicast packets abnormally, and effectively reducing the overall power consumption of WiFi devices while maintaining normal communication latency.
[0004] In a first aspect, embodiments of this application provide a method for reducing the power consumption of a WiFi device, applied to a WiFi device, the method comprising:
[0005] Connect to the router and enter sleep mode based on the current first listening interval;
[0006] When awakened by a timer, service statistics are performed to obtain the service interaction status with the router within a preset service interaction time; wherein, the preset service interaction time is determined by the timer.
[0007] The router type is determined based on the unicast packets sent by the router within the preset service interaction time.
[0008] The target listening interval is determined based on the service interaction and the router type, so as to enter the next sleep state according to the target listening interval.
[0009] According to some embodiments of this application, the router type includes: normal router and abnormal router; the determination of the target listening interval based on the service interaction status and the router type includes:
[0010] Obtain the business interaction details and the router type;
[0011] In cases where there is business interaction and the router type is either a normal router or an abnormal router, the target listening interval will be maintained at the current first listening interval.
[0012] According to some embodiments of this application, the router type includes: normal router and abnormal router; the determination of the target listening interval based on the service interaction situation and the router type includes:
[0013] If there is no service interaction and the router type is a normal router, the target listening interval will be maintained at the current first listening interval.
[0014] When the service interaction is no service interaction and the router type is an abnormal router, the target listening interval is determined as the second listening interval; wherein the second listening interval is greater than the first listening interval.
[0015] According to some embodiments of this application, the step of performing service statistical processing to obtain the service interaction status with the router within a preset service interaction time includes:
[0016] Statistically analyze the amount of service interactions with the router within the preset service interaction time.
[0017] The business interaction status is determined based on the business interaction volume.
[0018] According to some embodiments of this application, determining the business interaction status based on the business interaction volume includes:
[0019] When the amount of service interaction is 0, it is determined that there is no service interaction with the router.
[0020] If the amount of service interaction is not 0, it is determined that there is service interaction with the router.
[0021] According to some embodiments of this application, the unicast packet information includes: the unicast packet type and the number of unicast packets; determining the router type based on the unicast packet information sent by the router within a preset service interaction time includes:
[0022] After entering sleep mode, the types and number of unicast packets received from the router are recorded.
[0023] The router type is determined based on the unicast packet type and the number of unicast packets.
[0024] According to some embodiments of this application, the router type includes: normal router and abnormal router; determining the router type based on the unicast packet type and the number of unicast packets includes:
[0025] When the unicast packet type is one of several preset exception types, the number of unicast packets is compared with a preset number threshold.
[0026] When the number of unicast packets exceeds a preset threshold, the router type is determined to be an abnormal router.
[0027] If the number of unicast packets is not greater than a preset threshold, the router type is determined to be a normal router.
[0028] Secondly, embodiments of this application provide a WiFi network system, including a WiFi device and a router, wherein the WiFi device is connected to the router, and the WiFi device is used to perform the method for reducing the power consumption of the WiFi device as described in any of the embodiments of the first aspect.
[0029] Thirdly, embodiments of this application provide a WiFi device, including at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform a method for reducing the power consumption of the WiFi device as described in any of the embodiments of the first aspect.
[0030] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform a method for reducing the power consumption of a WiFi device as described in any of the embodiments of the first aspect.
[0031] This application embodiment includes: when a WiFi device is working, firstly, it connects to a router and enters a sleep state based on the current first listening interval; secondly, when woken up by a timer, it performs service statistics processing to obtain the service interaction status with the router within a preset service interaction time; wherein, the preset service interaction time is determined by the timer; determining the service interaction status provides a reliable reference condition for subsequently determining the target listening interval; then, it determines the router type based on the unicast packets sent by the router within the preset service interaction time; determining the router type based on the unicast packet status provides a reliable reference condition for subsequently determining the target listening interval; finally, it determines the target listening interval based on the service interaction status and the router type, and enters the next sleep state based on the target listening interval. Thus, by determining the appropriate target listening interval based on the router type and the service interaction status within the preset service interaction time, it is compatible with both abnormal routers that abnormally send unicast packets and normal routers; then, it enters the next sleep state based on the appropriate target listening interval, effectively reducing the overall power consumption of the WiFi device. In other words, the embodiments of this application can adaptively adjust the target listening interval based on the service interaction situation and the router type, thereby being compatible with abnormal routers that abnormally send unicast packets, and effectively reducing the overall power consumption of WiFi devices while ensuring normal communication latency.
[0032] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the structure of a WiFi network system provided in one embodiment of this application;
[0034] Figure 2 This is a flowchart illustrating the steps of a method for reducing the power consumption of a WiFi device according to an embodiment of this application;
[0035] Figure 3 This is a flowchart illustrating the first judgment logic based on the service interaction between a WiFi device and a router, provided in one embodiment of this application.
[0036] Figure 4 This is a schematic diagram illustrating the specific process of determining the router type based on the unicast packet type and the number of unicast packets, provided in one embodiment of this application.
[0037] Figure 5 This is a flowchart illustrating the second judgment logic based on router type provided in one embodiment of this application;
[0038] Figure 6 This is a schematic diagram of the overall process of a method for reducing the power consumption of a WiFi device according to an embodiment of this application;
[0039] Figure 7 This is a schematic diagram of the hardware structure of a WiFi device provided in one embodiment of this application. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments.
[0041] It should be understood that in the description of this application, the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0042] It should be noted that although a logical order is shown in the flowcharts in this application, in some cases, the steps shown or described may be performed in a different order than that shown in the flowcharts. In the description of this application, "several" means one or more, and "more" means two or more. The terms "first" and "second" are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated, or implicitly indicating the order in which the technical features are indicated.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0044] First, let me explain some of the terms used in this application:
[0045] Battery-powered IoT devices using WiFi technology typically have energy-saving requirements. To achieve this, a fixed-period energy-saving mode is often employed, causing the WiFi device to periodically enter a sleep state to reduce power consumption. Specifically, this fixed-period energy-saving mode works as follows: the WiFi device enters sleep mode after a fixed Listen Interval, then wakes up within the corresponding time to enter receive mode, receiving and parsing beacon packets sent by the router, and determining whether to continue working or remain asleep. Further, after parsing the beacon packets and obtaining a beacon frame, if the Notification Indication Message (TIM) in the parsed beacon frame has no cached data, the WiFi device will re-enter sleep mode until the Listen Interval has elapsed, then re-enter receive mode. If the TIM in the parsed beacon frame indicates that there is cached data, the WiFi device will switch to working mode, interact with the router by sending and receiving packets, process the data, and then re-enter sleep mode; thus achieving energy savings.
[0046] However, in the fixed-period energy-saving mode, a larger listening interval setting results in lower power consumption but higher communication latency; conversely, a smaller listening interval setting results in lower communication latency but higher power consumption. Normally, in the fixed-period energy-saving mode, the router's beacon frame will mark the need for wake-up in the TIM (Notification Indication Message) when data is forwarded for service interaction, causing the WiFi device to exit sleep mode and enter working mode. However, in real-world environments, routers exhibit different behaviors. For example, some routers may abnormally send unicast packets, which wake up the WiFi device, increasing the proportion of time the WiFi device is in working mode and thus increasing power consumption. In scenarios where routers abnormally send unicast packets, a smaller listening interval is usually set, but this still increases the overall power consumption of the WiFi device. Therefore, the current fixed-period energy-saving mode cannot effectively maintain low overall power consumption of the WiFi device while also being compatible with routers that abnormally send unicast packets.
[0047] Based on this, this application provides a method for reducing the power consumption of WiFi devices, a WiFi network system, a WiFi device, and a computer-readable storage medium, relating to the field of WiFi device power consumption technology. The method is applied to a WiFi device and includes: connecting to a router and entering a sleep state based on a current first listening interval; upon being woken up by a timer, performing service statistics processing to obtain the service interaction status with the router within a preset service interaction time; wherein the preset service interaction time is determined by the timer; determining the router type based on the unicast packets sent by the router within the preset service interaction time; determining a target listening interval based on the service interaction status and the router type, and entering the next sleep state based on the target listening interval. This method can effectively reduce the overall power consumption of the WiFi device while ensuring normal communication latency.
[0048] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0049] like Figure 1 As shown, the WiFi network system 100 includes a WiFi device 110 and a router 120, with the WiFi device 110 connected to the router 120.
[0050] It is understood that the number of routers in a WiFi network system can be one or more, and this application does not impose any specific restrictions on this.
[0051] In a WiFi network system, when a WiFi device is active, it performs the following steps: First, it connects to the router and enters a sleep state based on the current first listening interval. Second, when awakened by a timer, it performs service statistics processing to obtain the service interaction information with the router within a preset service interaction time. This preset service interaction time is determined by the timer. Determining the service interaction information provides a reliable reference for subsequently determining the target listening interval. Then, it determines the router type based on the unicast packets sent by the router within the preset service interaction time. This unicast packet information, in turn, provides a reliable reference for determining the target listening interval. Finally, it determines the target listening interval based on the service interaction information and the router type, and then enters the next sleep state accordingly. In this way, by determining the appropriate target listening interval based on the router type and the service interaction information within the preset service interaction time, it is compatible with both abnormal routers that send abnormal unicast packets and normal routers. Then, it enters the next sleep state based on the appropriate target listening interval, effectively reducing the overall power consumption of the WiFi device. Therefore, the WiFi network system of this application embodiment can adaptively adjust the target listening interval based on the service interaction situation and router type, thereby being compatible with abnormal routers that abnormally send unicast packets, and effectively reducing the overall power consumption of WiFi devices while ensuring normal communication latency.
[0052] Those skilled in the art will understand that the system structure shown in the figures does not constitute a limitation on the embodiments of this application, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0053] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0054] It will be understood by those skilled in the art that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. It is known by those skilled in the art that with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0055] Based on the above system architecture, various embodiments of the method for reducing the power consumption of WiFi devices according to this application are proposed below.
[0056] Firstly, such as Figure 2 As shown, this method for reducing the power consumption of WiFi devices can be applied to, for example... Figure 1 In the WiFi device of the WiFi network system shown, the method for reducing the power consumption of the WiFi device may include, but is not limited to, steps S110 to S140.
[0057] Step S110: Connect to the router and enter sleep mode according to the current first listening interval.
[0058] Step S120: When woken up by the timer, perform service statistics processing to obtain the service interaction status with the router within the preset service interaction time; wherein, the preset service interaction time is determined by the timer.
[0059] Step S130: Determine the router type based on the unicast packets sent by the router within the preset service interaction time.
[0060] Step S140: Determine the target listening interval based on the service interaction and router type, and enter the next sleep state according to the target listening interval.
[0061] In some embodiments, step S110 is further described as follows: Initially, when the WiFi device connects to the router, a first listening interval is set, and then the device enters a sleep state according to the first listening interval. When the first listening interval is set to M, it means that the WiFi device is woken up once every M beacon interval period T. Specifically, the first listening interval is any integer from 1 to 30.
[0062] The beacon interval period T is generally set to 100ms by default. However, for routers whose configuration attributes can be changed, the beacon interval period T can be modified as needed. Therefore, this application does not impose specific restrictions on the value of the beacon interval period T.
[0063] Through steps S110 to S140, when the WiFi device is working, firstly, it connects to the router and enters a sleep state based on the current first listening interval. Secondly, when woken up by a timer, it performs service statistics processing to obtain the service interaction status with the router within a preset service interaction time. The preset service interaction time is determined by the timer. Determining the service interaction status provides a reliable reference condition for subsequently determining the target listening interval. Then, the router type is determined based on the unicast packets sent by the router within the preset service interaction time. Determining the router type based on the unicast packet information provides a reliable reference condition for subsequently determining the target listening interval. Finally, the target listening interval is determined based on the service interaction status and the router type, and the device enters the next sleep state based on the target listening interval. In this way, the appropriate target listening interval is determined based on the router type and the service interaction status within the preset service interaction time, thus ensuring compatibility with both abnormal routers that abnormally send unicast packets and normal routers. Then, the device enters the next sleep state based on the appropriate target listening interval, effectively reducing the overall power consumption of the WiFi device. Therefore, the embodiments of this application can adaptively adjust the target listening interval based on the service interaction situation and router type, thereby being compatible with abnormal routers that abnormally send unicast packets, and effectively reducing the overall power consumption of WiFi devices while ensuring normal communication latency.
[0064] It is important to emphasize that the embodiments of this application implement a dynamic adjustment strategy for the listening interval based on the router type and the service interaction situation within a preset service interaction time. Under the premise of meeting normal communication latency, the listening interval value is dynamically adjusted according to the service interaction situation and router type, thereby minimizing the power consumption of the WiFi device. In particular, after identifying an abnormal router, the listening interval value is adjusted to ensure compatibility with abnormal routers that are abnormally sending unicast packets; this effectively reduces the overall power consumption of the WiFi device while maintaining normal communication latency.
[0065] According to some embodiments of this application, step S120 is further described, wherein service statistics processing is performed to obtain the service interaction status with the router within a preset service interaction time, including but not limited to steps S121 to S122.
[0066] Step S121: Calculate the amount of service interaction with the router within the preset service interaction time.
[0067] Step S122: Determine the business interaction status based on the business interaction volume.
[0068] Specifically, the preset service interaction time is achieved by setting a timer for scheduled wake-up. If the timer is set to 60 seconds, then the preset service interaction time in this application is 60 seconds. Before entering sleep mode based on the current first listening interval, a timer for scheduled wake-up is pre-set so that the WiFi device is woken up when the preset service interaction time is reached. Specifically, the preset service interaction time can be set to 60 seconds, 65 seconds, etc., and this application does not impose specific restrictions on the value of the preset service interaction time.
[0069] According to some embodiments of this application, step S122 is further described. Step S122: Determine the service interaction status based on the service interaction volume, including: when the service interaction volume is 0, it is determined that there is no service interaction with the router; when the service interaction volume is not 0, it is determined that there is service interaction with the router.
[0070] By determining the business interaction situation through steps S121 to S122, reliable reference conditions are provided for subsequently determining the target listening interval.
[0071] It should be noted that the communication between the WiFi device and the router is one of the reference conditions for determining the target listening interval. Combined with... Figure 3 To illustrate, for example, the flow of the first judgment logic based on the service interaction between the WiFi device and the router provided in this application is explained in detail.
[0072] Step S301: The WiFi device establishes a connection with the router.
[0073] Step S302: Define a timer and determine the preset business interaction time.
[0074] Step S303: The WiFi device enters sleep mode based on the current first listening interval M.
[0075] Step S304: After a preset service interaction time, the timer wakes up the WiFi device.
[0076] Step S305: Determine whether there is any business interaction within the preset business interaction time; if yes, proceed to step S306; if no, proceed to step S307.
[0077] Step S306: Maintain the target listening interval as the first listening interval M.
[0078] Step S307: Determine the target listening interval as the second listening interval L; and L>M.
[0079] It should be noted that the business interaction situation is one of the reference conditions for determining the target listening interval, but the final determination of the target listening interval also needs to take into account the router type as a reference condition.
[0080] According to some embodiments of this application, the unicast packet information includes: the unicast packet type and the number of unicast packets; further, step S130 is described as follows: step S130: the router type of the router is determined based on the unicast packet information sent by the router within a preset service interaction time, including but not limited to steps S131 to S132.
[0081] Step S131: Count the unicast packet types and the number of unicast packets received from the router after entering the sleep state.
[0082] Step S132: Determine the router type based on the unicast packet type and the number of unicast packets.
[0083] It should be noted that step S130 is executed after being woken up by the timer, that is, steps S131 to S132 are executed after being woken up by the timer.
[0084] Step S131 performs unicast packet statistics processing, which calculates the unicast packet type and number of unicast packets received after entering the sleep state, providing a reliable reference for subsequent router type determination.
[0085] According to some embodiments of this application, the router type includes: normal router and abnormal router; further, step S132 is described, step S132: determine the router type according to the unicast packet type and the number of unicast packets, including but not limited to steps S1321 to S1323.
[0086] Step S1321: When the unicast packet type is one of the multiple preset exception types, the number of unicast packets is compared with the preset number threshold.
[0087] Step S1322: When the number of unicast packets exceeds a preset threshold, determine that the router type is an abnormal router.
[0088] Step S1323: When the number of unicast packets is not greater than the preset threshold, the router type is determined to be a normal router.
[0089] Specifically, in this application, an abnormal router refers to a router that sends a unicast packet with no special meaning to a WiFi device every 2 to 30 seconds, causing the WiFi device to wake up.
[0090] Specifically, a normal router is any router other than an abnormal router. In this application, a normal router refers to a router that does not frequently send unicast packets without special meaning to WiFi devices.
[0091] Specifically, the various preset exception types refer to classic unicast packets without special meaning; specifically, the various preset exception types include: ARP Request packets, Block Acknowledgment Request packets, ICMPv6 Echo Request packets, IGMP Membership Query packets, etc.
[0092] Specifically, the classic value for the preset quantity threshold is 3. However, the preset quantity threshold can also be set according to actual needs; this application does not impose specific restrictions on the value of the preset quantity threshold.
[0093] Combination Figure 4 Here is an example to illustrate the specific process of determining the router type based on the unicast packet type and the number of unicast packets.
[0094] Step S401: The WiFi device enters sleep mode.
[0095] Step S402: Count the number of ARP Request packets received by the WiFi device.
[0096] Step S403: After the WiFi device is woken up by the timer, determine whether the number of ARP Request packets is greater than the preset threshold n. If yes, proceed to step S404; otherwise, proceed to step S405.
[0097] Step S404: Identify it as an abnormal router.
[0098] Step S405: Determine that it is a normal router.
[0099] By determining the router type based on the unicast packet information through steps S131 to S132, a reliable reference condition is provided for subsequently determining the target listening interval.
[0100] It should be noted that router type is one of the reference conditions for determining the target listening interval. Combined with... Figure 5To illustrate, for example, the flow of the second judgment logic based on router type provided in this application is explained in detail.
[0101] Step S501: The WiFi device establishes a connection with the router.
[0102] Step S502: The WiFi device enters sleep mode.
[0103] Step S503: Count the types and number of unicast packets received by the WiFi device from the router.
[0104] Step S504: After the WiFi device is woken up by the timer, determine whether the router is an abnormal router based on the unicast packet type and the number of unicast packets. If yes, proceed to step S505; otherwise, proceed to step S506.
[0105] Step S505: Determine the target listening interval as the second listening interval L; and L>M.
[0106] Step S506: Maintain the target listening interval as the first listening interval M.
[0107] It should be noted that router type is one of the reference conditions for determining the target listening interval, but the final determination of the target listening interval also needs to take into account the reference condition of business interaction.
[0108] According to some embodiments of this application, step S140 is further described, wherein the target listening interval is determined by the service interaction status and the router type, including but not limited to: obtaining the service interaction status and the router type; and maintaining the target listening interval as the current first listening interval in the case where the service interaction status is that there is service interaction and the router type is a normal router or an abnormal router.
[0109] According to some embodiments of this application, step S140 is further described, wherein the target listening interval is determined based on the service interaction status and the router type, including but not limited to: when the service interaction status is no service interaction and the router type is a normal router, the target listening interval is maintained at the current first listening interval; when the service interaction status is no service interaction and the router type is an abnormal router, the target listening interval is determined to be a second listening interval; wherein the second listening interval is greater than the first listening interval.
[0110] Specifically, the second listening interval L is greater than the first listening interval M, and L is any integer from 1 to 30.
[0111] Understandably, when there is business interaction within the preset interaction time, the target listening interval will remain at the current first listening interval regardless of the router type. When there is no business interaction within the preset interaction time, the target listening interval needs to be further determined based on the router type; different router types will require different target listening intervals. This classification and identification of routers allows for more targeted setting of corresponding target listening intervals, resulting in lower power consumption. The ability to dynamically adjust the listening interval for the next stage further reduces the power consumption of WiFi devices without affecting the service experience.
[0112] In step S140, the target listening interval for adaptation is determined based on two reference conditions: router type and service interaction status within a preset service interaction time. This ensures compatibility with both abnormal routers that send abnormal unicast packets and normal routers. Then, based on the adapted target listening interval, the device enters the next sleep state, effectively reducing the overall power consumption of the WiFi device.
[0113] Combination Figure 6 To illustrate further, an example is provided to explain the overall process of the method for reducing the power consumption of WiFi devices provided in the embodiments of this application.
[0114] Step S601: The WiFi device establishes a connection with the router.
[0115] Step S602: The WiFi device enters sleep mode based on the current first listening interval M.
[0116] Step S603: After a preset service interaction time, the timer wakes up the WiFi device.
[0117] Step S604: Determine whether the result of the first judgment logic based on the service interaction between the WiFi device and the router is to set the target listening interval to the second listening interval L. If not, proceed to step S606; if yes, proceed to step S605.
[0118] Step S605: Determine whether the result of the second judgment logic based on the router type is to set the target listening interval to the second listening interval L. If yes, proceed to step S607; otherwise, proceed to step S606.
[0119] Step S606: Maintain the target listening interval as the first listening interval M; proceed to step S608.
[0120] Step S607: Determine the target listening interval as the second listening interval L; and L>M; execute step S608.
[0121] Step S608: Enter the next sleep state based on the target listening interval.
[0122] This application's embodiments distinguish between normal and abnormal routers by identifying the router itself. Then, based on the router type and the service interaction within a preset service interaction time, it dynamically adjusts the listening interval parameter for the next stage, thereby resolving the compatibility issue of abnormal routers abnormally sending unicast packets in WiFi power-saving mode. For example, if it is determined that the current router is an abnormal router abnormally sending unicast packets, the listening interval is adjusted from a small value to a large value (e.g., from 20 to 30), thereby increasing the proportion of time spent in sleep mode to avoid frequent device wake-ups and reduce power consumption.
[0123] like Figure 7 As shown, the present invention also provides a WiFi device, comprising:
[0124] The processor 701 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0125] The memory 702 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 702 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 702 and is called and executed by the processor 701 to implement the method for reducing the power consumption of WiFi devices according to the embodiments of this application.
[0126] The input / output interface 703 is used to implement information input and output;
[0127] The communication interface 704 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0128] Bus 705 transmits information between various components of the device (e.g., processor 701, memory 702, input / output interface 703, and communication interface 704);
[0129] The processor 701, memory 702, input / output interface 703, and communication interface 704 are connected to each other within the device via bus 705.
[0130] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for reducing the power consumption of WiFi devices.
[0131] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0133] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by this application.
Claims
1. A method for reducing the power consumption of a WiFi device, characterized in that, Applied to WiFi devices, the method includes: Connect to the router and enter sleep mode based on the current first listening interval; When awakened by a timer, service statistics are performed to obtain the service interaction status with the router within a preset service interaction time; wherein, the preset service interaction time is determined by the timer. The router type is determined based on the unicast packets sent by the router within the preset service interaction time. The target listening interval is determined based on the service interaction and the router type, so as to enter the next sleep state according to the target listening interval.
2. The method for reducing the power consumption of WiFi devices according to claim 1, characterized in that, The router types include: normal routers and abnormal routers; the service interaction status and the router type determine the target listening interval, including: Obtain the business interaction details and the router type; In cases where there is business interaction and the router type is either a normal router or an abnormal router, the target listening interval will be maintained at the current first listening interval.
3. The method for reducing the power consumption of WiFi devices according to claim 1, characterized in that, Router types include: normal routers and abnormal routers; the service interaction status and the router type determine the target listening interval, including: If there is no service interaction and the router type is a normal router, the target listening interval will be maintained at the current first listening interval. When the service interaction is no service interaction and the router type is an abnormal router, the target listening interval is determined as the second listening interval; wherein the second listening interval is greater than the first listening interval.
4. The method for reducing the power consumption of WiFi devices according to claim 1, characterized in that, The step of performing business statistics processing to obtain the business interaction information with the router within a preset business interaction time includes: Statistically analyze the amount of service interactions with the router within the preset service interaction time. The business interaction status is determined based on the business interaction volume.
5. The method for reducing the power consumption of a WiFi device according to claim 4, characterized in that, Determining the business interaction status based on the business interaction volume includes: When the amount of service interaction is 0, it is determined that there is no service interaction with the router. If the amount of service interaction is not 0, it is determined that there is service interaction with the router.
6. The method for reducing the power consumption of a WiFi device according to claim 1, characterized in that, The unicast packet information includes: the unicast packet type and the number of unicast packets; determining the router type based on the unicast packet information sent by the router within a preset service interaction time includes: After entering sleep mode, the types and number of unicast packets received from the router are recorded. The router type is determined based on the unicast packet type and the number of unicast packets.
7. The method for reducing the power consumption of a WiFi device according to claim 6, characterized in that, The router types include: normal routers and abnormal routers; determining the router type based on the unicast packet type and the number of unicast packets includes: When the unicast packet type is one of several preset exception types, the number of unicast packets is compared with a preset number threshold. When the number of unicast packets exceeds a preset threshold, the router type is determined to be an abnormal router. If the number of unicast packets is not greater than a preset threshold, the router type is determined to be a normal router.
8. A WiFi network system, characterized in that, The device includes a WiFi device and a router, the WiFi device being connected to the router, and the WiFi device being used to perform the method for reducing the power consumption of the WiFi device as described in any one of claims 1 to 7.
9. A WiFi device, characterized in that, The device includes at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for reducing the power consumption of a WiFi device as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method for reducing power consumption of a WiFi device as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for reducing power consumption and electronic equipment
CN114697932A
ZIGBEE-based Wi-Fi module dormancy method
CN120302392A
Power-saving processing method and device, mobile terminal and computer-readable storage medium
US20200192457A1
Application processor wakeup method and apparatus applied to mobile terminal
US20210255691A1
Method for Reducing Power Consumption of Mobile Terminal and Mobile Terminal
US20220353819A1