Method and device for determining mode of terminal device and terminal device

By receiving beacon frames to determine the status of the terminal device and perform analysis processing, the high power consumption problem caused by frequent wake-up in the sleep mode of the terminal device is solved, and more effective power consumption management is achieved.

CN119052905BActive Publication Date: 2025-08-12RDA MICROELECTRONICS BEIJING
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411261896.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-08-12
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

In sleep mode, the terminal device frequently wakes up to process unprocessed data, resulting in high power consumption.

Method used

The current state is determined by receiving the beacon frame. If it is a ready state, it is determined whether to receive the target beacon frame within the preset period and parsed to determine the target mode to avoid unnecessary wake-up.

Benefits of technology

Reduces the power consumption of terminal devices in sleep mode and avoids invalid power consumption caused by frequent wake-up.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052905B_ABST
    Figure CN119052905B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method, apparatus, and terminal device for determining a mode of a terminal device. The method comprises: when the wireless network function of the terminal device is enabled, responding to a sleep mode enable instruction, receiving a current beacon frame; determining the current state of the terminal device based on the current beacon frame; if the current state is a ready state, determining whether a target beacon frame has been received within a preset time period; if so, parsing the target signal frame to obtain a target mode of the terminal device, and controlling the terminal device to be in the target mode. This reduces the power consumption of the terminal device in sleep mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method and apparatus for determining a mode of a terminal device, and the terminal device. Background Art

[0002] The terminal device can turn on the sleep mode according to the application scenario or user settings to save power consumption of the terminal device.

[0003] When a terminal device is in sleep mode and the wireless network function is turned on, the terminal device can determine whether to wake up the terminal device based on the received beacon frame. In actual application, the hardware of the terminal device will count the received beacon frames. When the count reaches a preset value, the terminal device will wake up the software for processing. At this point, the terminal device changes from sleep mode to non-sleep mode. In the above process, since the terminal device will be awakened at regular intervals, there may be situations where data processing or data transmission is not required after awakening, resulting in higher power consumption of the terminal device in sleep mode. Summary of the Invention

[0004] Embodiments of the present application provide a method and apparatus for determining a mode of a terminal device, and a terminal device, to solve the problem of high power consumption of the terminal device in sleep mode.

[0005] In a first aspect, an embodiment of the present application provides a method for determining a mode of a terminal device, including:

[0006] When the wireless network function of the terminal device is turned on, responding to the sleep mode turn-on instruction, receiving the current beacon frame;

[0007] Determining a current state of the terminal device according to the current beacon frame;

[0008] If the current state is the preparation state, determining whether a target beacon frame is received within a preset time period;

[0009] If so, the target signal frame is parsed and processed to obtain the target mode of the terminal device, and the terminal device is controlled to be in the target mode.

[0010] In a possible implementation, parsing the target signal frame to obtain the target mode of the terminal device includes:

[0011] Parsing the target signal frame to obtain a bitmap field and at least one element field;

[0012] A target mode of the terminal device is determined according to the bitmap field and the at least one element field.

[0013] In a possible implementation, determining the target mode of the terminal device according to the bitmap field and the at least one element field includes:

[0014] Get at least one preset element field;

[0015] For any element field, if there is a preset element field that matches the element field, the element field is determined as the target element field;

[0016] A target mode of the terminal device is determined according to the bitmap field and the at least one target element field.

[0017] In a possible implementation, determining the target mode of the terminal device according to the bitmap field and the at least one target element field includes:

[0018] If the bitmap field is used to indicate that there is data to be processed, and / or at least one target element field exists in the at least one element field, determining that the target mode of the terminal device is a non-sleep mode;

[0019] If the bitmap field is used to indicate that there is no data to be processed, and there is no at least one target element field in the at least one element field, it is determined that the target mode of the terminal device is the sleep mode.

[0020] In a possible implementation, determining the current state of the terminal device according to the current beacon frame includes:

[0021] Acquire a delivery transmission indication information DTIM count according to the current beacon frame;

[0022] If the DTIM count is a preset value, it is determined that the current state of the terminal device is the ready state.

[0023] In a possible implementation, controlling the terminal device to be in the target mode includes:

[0024] Determining whether the target mode of the terminal device is the sleep mode;

[0025] If yes, controlling the terminal device to be in the sleep mode;

[0026] If not, the terminal device is woken up to put the terminal device into the non-sleep mode.

[0027] In one possible implementation, the method further includes:

[0028] If the current state is the preparation state and no target beacon frame is received within a preset time period, it is determined that the target mode of the terminal device is the sleep mode.

[0029] In one possible implementation, the method further includes:

[0030] Get field configuration instructions;

[0031] Displaying a configuration page according to an instruction corresponding to the configuration request, the configuration page including selection boxes corresponding to a plurality of fields;

[0032] Displaying a configuration page, wherein the configuration request is used to request configuration of at least one preset element field;

[0033] In response to an input selection operation of at least one element field in the configuration page, at least one preset element field is determined.

[0034] In a second aspect, an embodiment of the present application provides a mode determination apparatus for a terminal device, the apparatus comprising:

[0035] a receiving module, configured to receive a current beacon frame in response to a sleep mode start instruction when the wireless network function of the terminal device is turned on;

[0036] A first determining module, configured to determine a current state of a terminal device according to the current beacon frame;

[0037] a second determining module, configured to determine whether a target beacon frame is received within a preset time period if the current state is a preparation state;

[0038] The processing module is configured to: if so, parse and process the target signal frame to obtain the target mode of the terminal device, and control the terminal device to be in the target mode.

[0039] In a possible implementation, the processing module is specifically configured to:

[0040] Parsing the target signal frame to obtain a bitmap field and at least one element field;

[0041] A target mode of the terminal device is determined according to the bitmap field and the at least one element field.

[0042] In a possible implementation, the processing module is specifically configured to:

[0043] Get at least one preset element field;

[0044] For any element field, if there is a preset element field that matches the element field, the element field is determined as the target element field;

[0045] A target mode of the terminal device is determined according to the bitmap field and the at least one target element field.

[0046] In a possible implementation, the processing module is specifically configured to:

[0047] If the bitmap field is used to indicate that there is data to be processed, and / or at least one target element field exists in the at least one element field, determining that the target mode of the terminal device is a non-sleep mode;

[0048] If the bitmap field is used to indicate that there is no data to be processed, and there is no at least one target element field in the at least one element field, it is determined that the target mode of the terminal device is the sleep mode.

[0049] In a possible implementation manner, the first determining module is specifically configured to:

[0050] Acquire a delivery transmission indication information DTIM count according to the current beacon frame;

[0051] If the DTIM count is a preset value, it is determined that the current state of the terminal device is the ready state.

[0052] In a possible implementation, the processing module is specifically configured to:

[0053] Determining whether the target mode of the terminal device is the sleep mode;

[0054] If yes, controlling the terminal device to be in the sleep mode;

[0055] If not, the terminal device is woken up to put the terminal device into the non-sleep mode.

[0056] In a possible implementation, the apparatus further includes a third determining module and a configuring module.

[0057] The third determining module is used for:

[0058] If the current state is the preparation state and no target beacon frame is received within a preset time period, it is determined that the target mode of the terminal device is the sleep mode.

[0059] The configuration module is used to:

[0060] Get field configuration instructions;

[0061] Displaying a configuration page according to an instruction corresponding to the configuration request, the configuration page including selection boxes corresponding to a plurality of fields;

[0062] Displaying a configuration page, wherein the configuration request is used to request configuration of at least one preset element field;

[0063] In response to an input selection operation of at least one element field in the configuration page, at least one preset element field is determined.

[0064] In a third aspect, the present application provides a chip having a computer program stored thereon, wherein when the computer program is executed by the chip, the method as described in any one of the first aspects is implemented.

[0065] In a fourth aspect, the present application provides a chip module having a computer program stored thereon, and when the computer program is executed by the chip module, the method as described in any one of the first aspects is implemented.

[0066] In a fifth aspect, an embodiment of the present application provides a terminal device, including:

[0067] at least one processor; and

[0068] a memory communicatively connected to the at least one processor; wherein,

[0069] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any method described in the first aspect.

[0070] In a sixth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the methods in the first aspect.

[0071] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer program, which implements any one of the methods in the first aspect when executed by a processor.

[0072] The mode determination method, device and terminal device of the terminal device provided in the embodiment of the present application can determine the current state of the terminal device according to the current beacon frame after the terminal device receives the current beacon frame. When the current state of the terminal device is the ready state, it is determined whether the target beacon frame is received within a preset time period. The target signal frame is parsed and processed to obtain the target mode of the terminal device to determine whether to wake up the terminal device. Instead of directly waking up the software for processing when it is determined that the count number corresponding to the current beacon frame is a preset value. This avoids the terminal device being woken up at regular intervals, and there may be a situation where data processing or data transmission is not required after waking up, thereby reducing the power consumption of the terminal device in sleep mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0074] Figure 2 A flowchart of a method for determining a mode of a terminal device provided in an embodiment of the present application;

[0075] Figure 3 A schematic diagram of the process of obtaining a sleep start instruction provided in an embodiment of the present application;

[0076] Figure 4 A flowchart of another method for determining a mode of a terminal device provided in an embodiment of the present application;

[0077] Figure 5 A schematic diagram of the process of configuring at least one preset element field provided in an embodiment of the present application;

[0078] Figure 6 A schematic diagram of a process for receiving a beacon frame according to an embodiment of the present application;

[0079] Figure 7 A schematic diagram of a mode determination process of a terminal device provided in an embodiment of the present application;

[0080] Figure 8 A schematic diagram of the structure of a mode determination device of a terminal device provided in an embodiment of the present application;

[0081] Figure 9 A schematic structural diagram of another mode determination device for a terminal device provided in an embodiment of the present application;

[0082] Figure 10 A schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0084] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0085] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0086] For ease of understanding, below, combined with Figure 1 , describes the application scenarios to which the embodiments of the present application are applicable.

[0087] Figure 1 This is a schematic diagram of the application scenario provided by the embodiment of this application. Figure 1 , includes a terminal device 101 and a network device 102. Terminal device 101 can be a mobile phone, tablet computer, computer, etc. Network device 102 can be a router. Terminal device 101 can enable the wireless network function to access the wireless network through network device 102. When terminal device 101 accesses the wireless network, if terminal device 101 is in sleep mode, terminal device 101 can determine whether to wake up terminal device 101 based on the beacon frame sent by network device 102.

[0088] In actual use, the terminal device's hardware counts received beacon frames. When the count reaches a preset value, the terminal device wakes up the software for processing. At this point, the terminal device transitions from sleep mode to non-sleep mode. During this process, since the terminal device wakes up periodically, there may be situations where no data processing or data transmission is required after waking up, resulting in higher power consumption in sleep mode.

[0089] In an embodiment of the present application, after receiving the current beacon frame, the terminal device can determine the current state of the terminal device based on the current beacon frame. When the current state of the terminal device is the ready state, it determines whether the target beacon frame has been received within a preset time period. The target signal frame is parsed and processed to obtain the target mode of the terminal device to determine whether to wake up the terminal device. Instead of directly waking up the software for processing when the count number corresponding to the current beacon frame is determined to be a preset value, this avoids the terminal device being woken up at regular intervals, and there may be situations where data processing or data transmission is not required after waking up, thereby reducing the power consumption of the terminal device in sleep mode.

[0090] The method of the present application is described below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be repeated in different embodiments.

[0091] Figure 2 This is a flow chart of a method for determining a mode of a terminal device provided in an embodiment of the present application. Figure 2 , the method may include:

[0092] S201: When the wireless network function of the terminal device is turned on, in response to a sleep mode turn-on instruction, a current beacon frame is received.

[0093] The execution subject of the embodiments of the present application may be a terminal device, or may be a chip, chip module, or mode determination device of the terminal device provided in the terminal device. The mode determination device of the terminal device may be implemented through software or a combination of software and hardware. The terminal device may be a mobile phone, tablet computer, computer, etc.

[0094] The sleep mode activation instruction can be set by the user or generated by the terminal device according to the current running status of each application program. This application does not impose any restrictions.

[0095] When the sleep mode is turned on, at least one function of each application of the terminal device is turned off to save power consumption of the terminal device.

[0096] Next, combine Figure 3 , describes the process of obtaining the sleep mode start instruction. Figure 3 This is a schematic diagram of the process of obtaining the sleep start instruction provided in the embodiment of this application. Figure 3 , including interfaces 301 and 302. Interfaces 301 and 302 may be pages provided by the terminal device. Referring to interface 301, a user clicks the icon corresponding to the settings application on the terminal device's home page. In response to the user's click, the terminal device opens the settings application and displays the mode settings page.

[0097] Referring to interface 302, the mode settings page includes switch icons corresponding to multiple modes. On the mode settings page, the user clicks the switch icon corresponding to sleep mode. In response to the user's click, the terminal device receives a sleep mode activation instruction and, based on the sleep mode activation instruction, controls the terminal device to enter sleep mode.

[0098] The beacon frame may be a Beacon frame. The network device may periodically send the beacon frame to the terminal device in a broadcast or multicast manner.

[0099] The current beacon frame may be received through hardware (eg, a chip, etc.) in the terminal device.

[0100] S202. Determine the current state of the terminal device according to the current beacon frame.

[0101] The current state of the terminal device may be determined based on the current beacon frame in the following manner: obtaining a Delivery Traffic Indication Message (DTIM) count based on the current beacon frame; if the DTIM count is a preset value, determining that the current state of the terminal device is a ready state.

[0102] A preset value can be set in advance and stored in a preset storage space of the terminal device. The preset value can be 0.

[0103] Each time a terminal device receives a beacon frame, it decrements the DTIM count. When it is determined that the DTIM count has decremented to 0, the terminal device can be woken up.

[0104] If the DTIM count is not the preset value, the current state of the terminal device is determined to be the unready state. At this time, the terminal device continues to receive the next beacon frame until the DTIM count corresponding to the received beacon frame reaches the preset value, and the current state of the terminal device is determined to be the ready state.

[0105] For example, after a terminal device activates its wireless network function, it controls the terminal device to enter a sleep mode in response to a user-input sleep mode activation command. At this point, at least one function corresponding to each application on the terminal device is disabled. The current beacon frame received by the terminal device's hardware is beacon frame A1. Based on beacon frame A1, the DTIM count is 3, indicating that the DTIM count is not the preset value of 0. Therefore, the terminal device's current state is determined to be unready. The terminal device continues to receive the next beacon frame A2. Based on beacon frame A2, the DTIM count is 2, indicating that the DTIM count is not the preset value of 0. Therefore, the terminal device's current state is determined to be unready. The terminal device continues to receive the next beacon frame A3. Based on beacon frame A3, the DTIM count is 1, indicating that the DTIM count is not the preset value of 0. Therefore, the terminal device's current state is determined to be unready. The terminal device continues to receive the next beacon frame A4. Based on beacon frame A4, the DTIM count is 0, indicating that the DTIM count is the preset value of 0. Therefore, the terminal device's current state is determined to be ready.

[0106] S203: If the current state is the preparation state, determine whether a target beacon frame is received within a preset period of time.

[0107] The start time of the preset period is the time when the current state is determined to be the ready state, and the duration of the preset period can be a preset duration. The preset duration can be set in advance and stored in a preset storage space of the terminal device. The preset duration is less than the duration between sending two beacon frames.

[0108] For example, if a beacon frame is sent every 100 ms, it can be determined that the time between sending two beacon frames is 100 ms. Therefore, the preset time is less than 100 ms.

[0109] The target beacon frame may be the next beacon frame corresponding to the current beacon frame.

[0110] For example, according to the above example, the current beacon frame is determined to be beacon frame A1. Assuming that the DTIM count corresponding to beacon frame A1 is 0, it can be determined that the current state of the terminal device is the ready state. The moment when the terminal device's current state is the ready state is determined to be moment A1, and the preset duration is determined to be 20ms. Then, the preset time period can be determined to be moment A1 to moment A11, and the duration between moment A1 and moment A11 is 20ms. Therefore, if beacon frame A2 is received between moment A1 and moment A11, it can be determined that the target beacon frame has been received.

[0111] Waiting to receive and determine whether a target beacon frame exists within a preset time period can prevent the terminal device from malfunctioning and missing a beacon frame. Furthermore, if the missed beacon frame indicates that the terminal device needs to be awakened, this can prevent the terminal from waking up due to missed beacon frames. This improves the accuracy of the terminal device's determination of the target mode.

[0112] S204: If yes, parse the target signal frame to obtain the target mode of the terminal device, and control the terminal device to be in the target mode.

[0113] The target signal frame can be parsed and processed to obtain the target mode of the terminal device in the following manner: the target signal frame is parsed and processed to obtain a bitmap field and at least one element field; the target mode of the terminal device is determined based on the bitmap field and at least one element field.

[0114] The target mode can be either sleep mode or non-sleep mode. Sleep mode disables at least one function corresponding to each application on the terminal device. Non-sleep mode enables at least one function corresponding to each application on the terminal device. In non-sleep mode, the terminal device can use the application to perform the corresponding function.

[0115] The bitmap field may be a Traffic Indication Map (TIM) field. The value corresponding to the bitmap field may be used to determine whether the terminal device has data to be processed.

[0116] The element field is used to indicate at least one function corresponding to each application in the terminal device. For example, the element field can be a Channel Switch Announcement (CSA) element, an Extended Channel Switch Announcement (ECSA), an Enhanced Distributed Channel Access (EDCA), a Quiet, a DSSS Parameter Set Modification of the CF Parameter Set, a Modification of the HT Operation, a Wide Bandwidth Channel Switch, a Channel Switch Wrapper, an Operating Mode Notification, a Quiet Channel, a VHT Operation, an HE Operation clement Insertion of a Broadcast TWT, a BSS Color Change Announcement clement, a MU EDCA Parameter Set, a Spatial Reuse Parameter Set clement D, a UORA Parameter Set element, etc.

[0117] Based on the bitmap field and at least one element field, it can be determined whether there is data to be processed and whether the function of the application in the terminal device needs to be enabled, thereby determining the target mode of the terminal device, that is, whether the application in the terminal device needs to be awakened.

[0118] The present application provides a method for determining the mode of a terminal device. When the wireless network function of the terminal device is enabled, the method receives a current beacon frame in response to a sleep mode activation instruction. Based on the current beacon frame, the terminal device's current state is determined. If the current state is the ready state, the method determines whether a target beacon frame has been received within a preset period. If so, the target signal frame is parsed and processed to obtain the terminal device's target mode, and the terminal device is controlled to be in the target mode. In the above process, upon receiving the current beacon frame and determining that the terminal device's current state is the ready state, the terminal device determines whether a target beacon frame has been received within a preset period. The target signal frame is then parsed and processed to obtain the terminal device's target mode to determine whether to wake up the terminal device. This method does not directly wake up the software for processing when the count corresponding to the current beacon frame reaches a preset value. This avoids the terminal device being woken up at intervals, which may result in situations where no data processing or data transmission is required after waking up, thereby reducing the power consumption of the terminal device in sleep mode.

[0119] Based on any of the above embodiments, Figure 4 , the detailed process of determining the mode of the terminal device is explained.

[0120] Figure 4 This is a flow chart of another method for determining the mode of a terminal device provided in an embodiment of the present application. Figure 4 , the method comprising:

[0121] S401: When the wireless network function of the terminal device is turned on, in response to a sleep mode turn-on instruction, a current beacon frame is received.

[0122] It should be noted that the execution process of S401 can refer to S201 and will not be repeated here.

[0123] S402: Determine the current state of the terminal device according to the current beacon frame.

[0124] For example, after a terminal device activates its wireless network function, it responds to a user-input sleep mode activation command and controls the terminal device to enter a sleep state. At this point, at least one function corresponding to each application on the terminal device is disabled. The current beacon frame received by the terminal device's hardware is beacon frame B1. Based on beacon frame B1, the DTIM count is 0, and the DTIM count can be set to a preset value of 0. Therefore, the terminal device is determined to be in a ready state.

[0125] S403: If the current state is the preparation state, determine whether a target beacon frame is received within a preset period of time.

[0126] For example, according to the above example, after determining that the terminal device receives beacon frame B1, the current state of the terminal device is the ready state. Then, within the preset time period, the terminal device receives the target beacon frame B2 through hardware.

[0127] S404: If yes, parse the target signal frame to obtain a bitmap field and at least one element field.

[0128] The target signal frame may be parsed and processed using a preset algorithm to obtain a bitmap field and at least one element field. The preset algorithm may be set in advance and stored in a preset storage space of the terminal device.

[0129] For example, according to the above example, it is determined that within the preset time period, the terminal device receives the target beacon frame as beacon frame B2. The terminal device parses beacon frame B2 using a preset algorithm to obtain a bitmap field as field B1 and at least one element field including field Y1, field B2, field B3, and field B4.

[0130] S405: Obtain at least one preset element field.

[0131] The user can set at least one preset element field based on the application scenario. The terminal device stores the at least one preset element field set by the user in the preset storage space. The preset element field is used to indicate that the corresponding function needs to be implemented by running the corresponding application on the terminal device.

[0132] The preset element fields can be configured in the following manner: obtaining field configuration instructions; displaying a configuration page according to the instructions corresponding to the configuration request, the configuration page including selection boxes corresponding to multiple fields; displaying the configuration page, the configuration request being used to request configuration of at least one preset element field; and determining at least one preset element field from multiple element fields in the configuration file in response to an input selection operation of at least one element field in the configuration page.

[0133] Next, combine Figure 5 , describes the process of configuring at least one preset element field. Figure 5 A schematic diagram of the process of configuring at least one preset element field provided in an embodiment of the present application. Figure 5 , including interfaces 501 and 502. Interfaces 501 and 502 may be pages provided by the terminal device. Referring to interface 501, a user clicks an icon corresponding to a configuration page in the terminal device's configuration application. In response to the user's click, the terminal device generates an instruction corresponding to a configuration request. Based on the instruction corresponding to the configuration request, the terminal device displays a configuration page, which includes selection boxes and text input boxes corresponding to multiple fields. The configuration request is used to request configuration of at least one preset element field.

[0134] Referring to interface 502, the user selects field Y1 as the preset element field in the selection box corresponding to element field 1, selects field Y2 as the preset element field in the selection box corresponding to element field 2, selects field Y3 as the preset element field in the selection box corresponding to element field 3, and selects field Y4 as the preset element field in the selection box corresponding to element field 4, and clicks the OK icon. In response to the input selection operation of at least one element field on the configuration page, the terminal device determines that the at least one preset element field includes field Y1, field Y2, field Y3, and field Y4. The terminal device stores field Y1, field Y2, field Y3, and field Y4 in the preset storage space of the terminal device.

[0135] For example, according to Figure 5 As shown, it is determined that at least one preset element field includes field Y1, field Y2, field Y3 and field Y4. Therefore, the at least one preset element field acquired by the terminal device includes field Y1, field Y2, field Y3 and field Y4.

[0136] It should be noted that the user can set at least one preset element field as needed, or use at least one preset element field set by default in the terminal device. This application does not impose any restrictions.

[0137] S406: For any element field, if there is a preset element field that matches the element field, the element field is determined as the target element field.

[0138] If there is a mismatch between the preset element field and the element field, it is determined that the element field is not the target element field.

[0139] For example, according to the above example, it is determined that at least one element field includes field Y1, field B2, field B3, and field B4, and at least one preset element field includes field Y1, field Y2, field Y3, and field Y4. For field Y1, it is determined that there is a preset element field in at least one preset element field that matches field Y1. Therefore, field Y1 is determined to be the target element field. For field B2, it is determined that there is no preset element field in at least one preset element field that matches field B2. Therefore, it is determined that field B2 is not the target element field. For field B3, it is determined that there is no preset element field in at least one preset element field that matches field B3. Therefore, it is determined that field B3 is not the target element field. For field B4, it is determined that there is no preset element field in at least one preset element field that matches field B4. Therefore, it is determined that field B4 is not the target element field.

[0140] S407: Determine the target mode of the terminal device according to the bitmap field and at least one target element field.

[0141] The target mode of the terminal device can be determined based on the bitmap field and at least one target element field in the following manner: if the bitmap field is used to indicate that there is data to be processed, and / or there is at least one target element field in at least one element field, then the target mode of the terminal device is determined to be a non-sleep mode; if the bitmap field is used to indicate that there is no data to be processed, and there is no at least one target element field in at least one element field, then the target mode of the terminal device is determined to be a sleep mode.

[0142] If the value corresponding to the bitmap field is a preset value, it can be determined that the bitmap field is used to indicate that there is no data to be processed. If the value corresponding to the bitmap field is not a preset value, it can be determined that the bitmap field is used to indicate that there is data to be processed. The preset value can be 0.

[0143] For example, assuming that the value corresponding to the bitmap field shown in the above example is 1, it can be determined that the value corresponding to the bitmap field is not a preset value. Therefore, the terminal device determines that the bitmap field is used to indicate the presence of data to be processed. Based on the above example, it can be determined that a target element field exists in at least one element field. It can be determined that the bitmap field is used to indicate the presence of data to be processed, and at least one target element field exists in at least one element field. Therefore, the terminal device determines that the target mode is a non-sleep mode.

[0144] S408: If the current state is the preparation state and no target beacon frame is received within a preset period of time, determine that the target mode of the terminal device is the sleep mode.

[0145] If the current state is the preparation state and the target beacon frame is not received within the preset period, the terminal device continues to be in the sleep mode and continues to wait for receiving the next beacon frame. When the DTIM count corresponding to the received beacon frame reaches the preset value, S402 to S407 can be executed.

[0146] S409: Control the terminal device to be in target mode.

[0147] The terminal device can be controlled to be in the target mode in the following manner: determine whether the target mode of the terminal device is the sleep mode; if so, control the terminal device to be in the sleep mode; if not, wake up the terminal device to put the terminal device in the non-sleep mode.

[0148] If the terminal device is in sleep mode, at least one function corresponding to each application of the terminal device is in a closed state. If the terminal device is in non-sleep mode, at least one function corresponding to each application of the terminal device is in an open state.

[0149] For example, according to the above example, the target mode of the terminal device is determined to be a non-sleep mode. At this point, the terminal device determines that the target mode is not a sleep mode. Therefore, the terminal device is awakened to be in a non-sleep mode. That is, at least one function corresponding to each application on the terminal device is enabled.

[0150] Next, combine Figure 6 , describes the process of a terminal device receiving a beacon frame. Figure 6 This is a schematic diagram of the process of receiving a beacon frame according to an embodiment of the present application. Figure 6 , including 6 moments and the current values of the terminal device receiving beacon frames during the corresponding time periods of the 6 moments. The 6 moments are Time A, Time B, Time E, Time F, Time G, and Time H. From Time A to Time B, the terminal device begins to receive beacon frames. From Time B to Time E, the terminal device is powered on. From Time E to Time F is a preset period, during which it is determined whether the target beacon frame has been received. From Time F to Time G, data to be processed is received. From Time G to Time H, the terminal device is powered off.

[0151] according to Figure 6 As shown, when the terminal device is in sleep mode, most of the process of receiving beacon frames is in a low current state. It is only when receiving the target beacon frame (between time E and time F) and receiving the data to be processed (time F to time G) that it is in a high current state. Therefore, in the sleep state, when a beacon frame is received and the target mode is determined to be sleep mode according to the method provided in the embodiment of the present application, it can avoid the terminal device being awakened every once in a while, causing the terminal device to consume invalid power.

[0152] An embodiment of the present application provides a method for determining a mode of a terminal device. When the wireless network function of the terminal device is enabled, the method receives a current beacon frame in response to a sleep mode activation instruction. Based on the current beacon frame, the terminal device's current state is determined. If the current state is the ready state, the method determines whether a target beacon frame has been received within a preset period. If so, the target signal frame is parsed to obtain a bitmap field and at least one element field. The method obtains at least one preset element field. For any element field, if a preset element field matches the element field, the element field is determined as the target element field. Based on the bitmap field and the at least one target element field, the terminal device's target mode is determined. If the current state is the ready state and no target beacon frame has been received within a preset period, the terminal device's target mode is determined to be sleep mode. The terminal device is controlled to be in the target mode. In the above process, upon receiving the current beacon frame and determining that the terminal device's current state is the ready state, the method determines whether a target beacon frame has been received within a preset period. The method then parses the target signal frame to obtain the terminal device's target mode, thereby determining whether to wake up the terminal device. Instead of waking up the software directly for processing when the number of counts corresponding to the current beacon frame reaches the preset value, this avoids the terminal device being woken up at regular intervals, which may result in no data processing or data transmission being required after waking up, and reduces the power consumption of the terminal device in sleep mode.

[0153] Based on any of the above embodiments, Figure 7 , the process of determining the mode of the terminal device is explained with an example.

[0154] Figure 7 This is a schematic diagram of the mode determination process of the terminal device provided in the embodiment of the present application. Figure 7 , including a terminal device 701. The terminal device 701 can be a mobile phone, a tablet computer, a computer, etc. The terminal device 701 includes multiple hardware, and the hardware can be a chip. Various applications are set in the hardware. After the terminal device 701 turns on the wireless network function, in response to the sleep mode start instruction input by the user, the terminal device 701 is controlled to be in a sleep state. At this time, at least one function corresponding to each application of the terminal device 701 is in a disabled state. The hardware of the terminal device 701 can periodically receive beacon frames.

[0155] The hardware of terminal device 701 receives the current beacon frame, beacon frame C1. Based on beacon frame C1, the DTIM count is 0, which can be the preset value 0. Therefore, the current state of terminal device 701 is determined to be the ready state. At this time, terminal device 701 receives the target beacon frame, beacon frame C2, within the preset time period. Terminal device 701 parses beacon frame C2 and obtains a bitmap field, field C1, and at least one element field, including fields C2 and C3.

[0156] The terminal device 701 obtains at least one preset element field including field Y1, field Y2, field Y3 and field Y4. The terminal device 701 determines that there is no preset element field in at least one preset element field that matches field C2 and field C3. Therefore, the terminal device 701 determines that field C2 and field C3 are not target element fields. The terminal device 701 determines that the value corresponding to field C1 is 1, then it can be determined that the value corresponding to the bitmap field is not the preset value 0. Therefore, the terminal device 701 determines that the bitmap field is used to indicate the presence of data to be processed. In summary, the terminal device 701 determines that the target mode is non-sleep mode.

[0157] The terminal device 701 determines that the target mode is not the sleep mode. Therefore, the terminal device 701 wakes up each application to enable at least one function corresponding to each application of the terminal device. In this way, the terminal device 701 changes from the sleep mode to the non-sleep mode and can perform data processing.

[0158] The terminal device mode determination process provided in an embodiment of the present application includes receiving a current beacon frame in response to a sleep mode activation instruction when the wireless network function of the terminal device is enabled. Based on the current beacon frame, the terminal device's current state is determined. If the current state is the ready state, the terminal device determines whether a target beacon frame has been received within a preset period. If so, the target signal frame is parsed to obtain a bitmap field and at least one element field. The at least one preset element field is obtained. For any element field, if a preset element field matches the element field, the element field is determined as the target element field. Based on the bitmap field and the at least one target element field, the terminal device's target mode is determined. If the current state is the ready state and no target beacon frame has been received within a preset period, the terminal device's target mode is determined to be sleep mode. The terminal device is then controlled to be in the target mode. In the above process, upon receiving the current beacon frame and determining that the terminal device's current state is the ready state, the terminal device determines whether a target beacon frame has been received within a preset period. The target signal frame is then parsed to obtain the terminal device's target mode to determine whether to wake up the terminal device. Instead of waking up the software directly for processing when the number of counts corresponding to the current beacon frame reaches the preset value, this avoids the terminal device being woken up at regular intervals, which may result in no data processing or data transmission being required after waking up, and reduces the power consumption of the terminal device in sleep mode.

[0159] Figure 8 This is a schematic diagram of the structure of a mode determination device of a terminal device provided in an embodiment of the present application. The mode determination device of the terminal device can be a chip or a chip module. Figure 8 , the mode determination device 10 of the terminal device may include:

[0160] The receiving module 11 is configured to receive a current beacon frame in response to a sleep mode start instruction when the wireless network function of the terminal device is turned on;

[0161] A first determining module 12 is configured to determine a current state of a terminal device according to the current beacon frame;

[0162] A second determining module 13 is configured to determine whether a target beacon frame is received within a preset time period if the current state is a preparation state;

[0163] The processing module 14 is configured to, if yes, parse the target signal frame to obtain the target mode of the terminal device, and control the terminal device to be in the target mode.

[0164] In a possible implementation, the processing module 14 is specifically configured to:

[0165] Parsing the target signal frame to obtain a bitmap field and at least one element field;

[0166] A target mode of the terminal device is determined according to the bitmap field and the at least one element field.

[0167] In a possible implementation, the processing module 14 is specifically configured to:

[0168] Get at least one preset element field;

[0169] For any element field, if there is a preset element field that matches the element field, the element field is determined as the target element field;

[0170] A target mode of the terminal device is determined according to the bitmap field and the at least one target element field.

[0171] In a possible implementation, the processing module 14 is specifically configured to:

[0172] If the bitmap field is used to indicate that there is data to be processed, and / or at least one target element field exists in the at least one element field, determining that the target mode of the terminal device is a non-sleep mode;

[0173] If the bitmap field is used to indicate that there is no data to be processed, and there is no at least one target element field in the at least one element field, it is determined that the target mode of the terminal device is the sleep mode.

[0174] In a possible implementation, the first determining module 12 is specifically configured to:

[0175] Acquire a delivery transmission indication information DTIM count according to the current beacon frame;

[0176] If the DTIM count is a preset value, it is determined that the current state of the terminal device is the ready state.

[0177] In a possible implementation, the processing module 14 is specifically configured to:

[0178] Determining whether the target mode of the terminal device is the sleep mode;

[0179] If yes, controlling the terminal device to be in the sleep mode;

[0180] If not, the terminal device is woken up to put the terminal device into the non-sleep mode.

[0181] The mode determination device of the terminal device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.

[0182] Figure 9 This is a schematic diagram of the structure of another mode determination device of a terminal device provided in an embodiment of the present application. Figure 8 Based on the examples shown, see Figure 9 The mode determination device 10 of the terminal device further includes a third determination module 15 and a configuration module 16.

[0183] The third determining module 15 is configured to:

[0184] If the current state is the preparation state and no target beacon frame is received within a preset time period, it is determined that the target mode of the terminal device is the sleep mode.

[0185] The configuration module 16 is used to:

[0186] Get field configuration instructions;

[0187] Displaying a configuration page according to an instruction corresponding to the configuration request, the configuration page including selection boxes corresponding to a plurality of fields;

[0188] Displaying a configuration page, wherein the configuration request is used to request configuration of at least one preset element field;

[0189] In response to an input selection operation of at least one element field in the configuration page, at least one preset element field is determined.

[0190] The mode determination device of the terminal device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.

[0191] Figure 10 This is a schematic diagram of the structure of the terminal device provided in the embodiment of this application. Figure 10 The terminal device 20 may include a memory 21 and a processor 22. For example, the memory 21 and the processor 22 are interconnected via a bus 23.

[0192] The memory 21 is used to store program instructions;

[0193] The processor 22 is configured to execute the program instructions stored in the memory, so as to enable the terminal device 20 to execute the method shown in the above method embodiment.

[0194] The terminal device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principles and beneficial effects are similar and will not be repeated here.

[0195] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the above method when executed by a processor.

[0196] The embodiment of the present application may also provide a computer program product, including a computer program, which can implement the above method when executed by a processor.

[0197] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-mentioned method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc, and any combination thereof.

[0198] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0199] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0201] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations.

[0202] In this application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". In this application, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In this application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.

Claims

1. A method for determining a mode of a terminal device, characterized in that: include: When the wireless network function of the terminal device is turned on, responding to the sleep mode turn-on instruction, receiving the current beacon frame; Every time the current beacon frame is obtained, the delivery transmission indication information DTIM count is decremented to obtain the current DTIM count; If the DTIM count is a preset value, determining that the current state of the terminal device is a ready state; If the current state is the preparation state, determining whether a target beacon frame is received within a preset time period; If yes, the target beacon frame is parsed to obtain a bitmap field and at least one element field; According to the bitmap field and the at least one element field, the target mode of the terminal device is determined, and the terminal device is controlled to be in the target mode, wherein the element field is used to indicate at least one function corresponding to each application in the terminal device.

2. The method according to claim 1, characterized in that Determining a target mode of the terminal device according to the bitmap field and the at least one element field includes: Get at least one preset element field; For any element field, if there is a preset element field that matches the element field, the element field is determined as the target element field; A target mode of the terminal device is determined according to the bitmap field and the at least one target element field.

3. The method according to claim 2, characterized in that Determining a target mode of the terminal device according to the bitmap field and the at least one target element field includes: If the bitmap field is used to indicate that there is data to be processed, and / or at least one target element field exists in the at least one element field, determining that the target mode of the terminal device is a non-sleep mode; If the bitmap field is used to indicate that there is no data to be processed, and there is no at least one target element field in the at least one element field, it is determined that the target mode of the terminal device is the sleep mode.

4. The method according to claim 3, characterized in that Controlling the terminal device to be in the target mode includes: Determining whether the target mode of the terminal device is the sleep mode; If yes, controlling the terminal device to be in the sleep mode; If not, the terminal device is woken up to put the terminal device into the non-sleep mode.

5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: If the current state is the preparation state and no target beacon frame is received within a preset time period, it is determined that the target mode of the terminal device is the sleep mode.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Get field configuration instructions; Displaying a configuration page according to an instruction corresponding to the configuration request, the configuration page including selection boxes corresponding to a plurality of fields; Displaying a configuration page, wherein the configuration request is used to request configuration of at least one preset element field; In response to an input selection operation of at least one element field in the configuration page, at least one preset element field is determined.

7. A mode determination device for a terminal device, characterized in that: The device comprises: a receiving module, configured to receive a current beacon frame in response to a sleep mode start instruction when the wireless network function of the terminal device is turned on; A first determining module, configured to determine a current state of a terminal device according to the current beacon frame; a second determining module, configured to determine whether a target beacon frame is received within a preset time period if the current state is a preparation state; a processing module, configured to, if yes, parse the target beacon frame to obtain a target mode of the terminal device, and control the terminal device to be in the target mode; The first determining module is specifically configured to decrement the delivery transmission indication information DTIM count each time a current beacon frame is obtained to obtain a current DTIM count; if the DTIM count is a preset value, determine that the current state of the terminal device is a ready state; The processing module is specifically used to parse the target beacon frame to obtain a bitmap field and at least one element field; determine the target mode of the terminal device based on the bitmap field and the at least one element field, and control the terminal device to be in the target mode, wherein the element field is used to indicate at least one function corresponding to each application in the terminal device.

8. A terminal device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Working mode determination method and device of wifi receiver, equipment and storage medium

    CN114650625A