Message filtering method, mobile terminal and computer-readable storage medium

By obtaining and judging message information in the mobile terminal, and filtering those messages that will interrupt the standby state, the problem of frequent message wake-up in the standby state is solved, the terminal's low power consumption state is realized, and the power consumption is reduced.

CN113840358BActive Publication Date: 2024-10-29OPPO CHONGQING INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010591632.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2024-10-29
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

When the mobile terminal is in standby mode, it wakes up frequently due to received packets, which prevents it from truly entering a low-power state and increases power consumption.

Method used

When the mobile terminal is in the standby state, the message information is obtained and judged whether the standby state will be interrupted. If so, the messages are filtered to avoid waking up the terminal.

Benefits of technology

This effectively prevents the mobile terminal from being woken up in the standby state, maintains a low power consumption state, and reduces the terminal's power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113840358B_ABST
    Figure CN113840358B_ABST
Patent Text Reader

Abstract

The present application discloses a message filtering method for a mobile terminal, a mobile terminal and a computer storage medium, the method comprising: obtaining message information; if the mobile terminal is in a standby state, determining whether the message information will interrupt the standby state of the mobile terminal; if so, filtering the message information. By the above method, the present application can reduce the power consumption of the mobile terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message filtering method for a mobile terminal, a mobile terminal and a computer storage medium. Background Art

[0002] With the development of communication technology, network transmission of information is becoming more and more advanced. Messages are not used as the unit of network transmission. During the transmission process, they are continuously encapsulated into groups, packets, and frames for transmission. That is, messages are the data units exchanged and transmitted in the network, that is, the data blocks that a station wants to send at one time.

[0003] When the mobile terminal is in standby mode, a wake-up event of the mobile terminal is often triggered by receiving a message. Due to irregular message sending, the standby state of the mobile terminal is interrupted, thereby waking up the mobile terminal, and then the mobile terminal in the standby state cannot enter the real standby state, resulting in high power consumption of the mobile terminal. Summary of the invention

[0004] A first aspect of an embodiment of the present application provides a message filtering method for a mobile terminal, the method comprising: obtaining message information; if the mobile terminal is in a standby state, determining whether the message information will interrupt the standby state of the mobile terminal; if so, filtering the message information.

[0005] The second aspect of an embodiment of the present application provides a mobile terminal, including: an acquisition module, used to acquire message information; a judgment module, connected to the acquisition module, used to judge whether the message information will interrupt the standby state of the mobile terminal when the mobile terminal is in a standby state; a filtering module, connected to the judgment module, used to filter the message information when the message information will interrupt the standby state of the mobile terminal.

[0006] A third aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program can implement the method provided by the first aspect of the embodiment of the present application when executed by a processor.

[0007] The beneficial effect of the present application is that, different from the prior art, the present application filters the message information that will interrupt the standby state of the mobile terminal when the mobile terminal is in standby state. Since the mobile terminal is generally in a low-power working state in the standby state, in this low-power state, the general Bluetooth and WiFi functions are in the on state, some functions are disabled, but the message receiving function is still valid, and Bluetooth, WiFi, etc. will receive some messages sent by routers or other network devices or Bluetooth devices when they are turned on, and some of the messages will wake up the mobile terminal and interrupt the standby state of the mobile terminal, that is, interrupt the low-power working state of the mobile terminal. Therefore, through the above method, those messages that will wake up the mobile terminal from the standby state are filtered out, which can effectively prevent the mobile terminal from being awakened in the standby state, so that the mobile terminal can maintain a low-power state when the screen is turned off, thereby reducing the power consumption of the mobile terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0009] Figure 1 It is a flow chart of an embodiment of a message filtering method of a mobile terminal of the present application;

[0010] Figure 2 yes Figure 1 A schematic flow chart of a specific implementation of step S12 is shown;

[0011] Figure 3 yes Figure 1 A flowchart of a specific implementation method before step S11 is shown;

[0012] Figure 4 yes Figure 3 A flowchart of a specific implementation method before step S31 is shown;

[0013] Figure 5 yes Figure 1 A flowchart of another specific implementation of step S12 is shown;

[0014] Figure 6 It is a flowchart of configuring a filtering message table for a mobile terminal;

[0015] Figure 7 is a schematic block diagram of an embodiment of a mobile terminal of the present application;

[0016] Figure 8is a schematic block diagram of another embodiment of a mobile terminal of the present application;

[0017] Fig. 9 is a schematic block diagram of an embodiment of a computer-readable storage medium of the present application;

[0018] Fig.10 It is a schematic block diagram of a hardware architecture of the mobile terminal of the present application. DETAILED DESCRIPTION

[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0020] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0021] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0022] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0023] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0024] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0025] See also Figure 1 , Figure 11 is a flow chart of a first embodiment of a method for filtering a message in a mobile terminal. The method provided in this embodiment specifically includes the following steps:

[0026] S11: Obtain message information;

[0027] Generally speaking, mobile terminals are provided with a message information receiving protocol. When the message information is sent to the mobile terminal, the version, header, identifier, data length and protocol of the message information can be obtained. The message information obtained by the mobile terminal is different depending on the device connected to the mobile terminal. Taking the connection to a WiFi (wireless fidelity) hotspot as an example, the message information that the mobile terminal can obtain includes at least one of Internet Protocol Version 4 multicast (IPv4 multicast) message information, Internet Protocol Version 6 multicast (IPv6 multicast) message information and Internet Group Management Protocol Version 3 Membership Query (IGMPv3 Membership Query) message information.

[0028] In addition, when the mobile terminal is connected to a router, such as the Honor WS83 router, the message information can be obtained according to the protocol of the Honor WS83 router. Of course, those skilled in the art can obtain the message information by other methods known in the art.

[0029] S12: If the mobile terminal is in a standby state, determining whether the message information will interrupt the standby state of the mobile terminal;

[0030] The mobile terminal is preset with a standby state, which is used to execute the standby mode when the mobile terminal switches from the bright screen state to the sleep state. How the mobile terminal switches from the bright screen state to the standby state will be described in detail below. Of course, those skilled in the art can fully think of setting the switching state of the mobile terminal according to actual needs under the technical enlightenment of this application.

[0031] If the mobile terminal is in a standby state, it is determined whether the message information will interrupt the standby state of the mobile terminal. If it is determined that the standby state of the mobile terminal will be interrupted, the process proceeds to step S13. If it is determined that the standby state of the mobile terminal will not be interrupted, the process returns to step S11. Further, after it is determined that the standby state of the mobile terminal will be interrupted, a corresponding control signal may be generated to notify the mobile terminal to perform a corresponding operation.

[0032] S13: Filter the message information.

[0033] For message information that interrupts the standby state of the mobile terminal, the message information can be shielded by filtering, or filtered by deleting, or filtered by other methods, which are not limited here.

[0034] By the above method, the present application filters the message information that will interrupt the standby state of the mobile terminal in the standby state of the mobile terminal. By the above method, the frequent triggering of the message information waking up the mobile terminal in the standby state of the mobile terminal can be effectively avoided, thereby reducing the power consumption of the mobile terminal.

[0035] Different from the prior art, the present application filters the message information that will interrupt the standby state of the mobile terminal when the mobile terminal is in standby state. Since the mobile terminal is generally in a low-power working state in the standby state, in this low-power state, the general Bluetooth and WiFi functions are in the turned-on state, some functions are disabled, but the message receiving function is still valid, and Bluetooth, WiFi, etc. will receive some messages sent by routers or other network devices or Bluetooth devices when they are turned on, and some of the messages will wake up the mobile terminal and interrupt the standby state of the mobile terminal, that is, interrupt the low-power working state of the mobile terminal. Therefore, through the above method, those messages that will wake up the mobile terminal from the standby state are filtered out, which can effectively prevent the mobile terminal from being awakened in the standby state, so that the mobile terminal can maintain a low-power state when the screen is turned off, thereby reducing the power consumption of the mobile terminal.

[0036] See also Figure 2 , Figure 2 yes Figure 1 The flowchart of a specific implementation of step S12 shown in FIG. 1 specifically includes the following steps:

[0037] S21: Identification of monitored message information;

[0038] exist Figure 1 As shown in step S11, the mobile terminal has different identifiers of monitored message information because of different connected devices and different protocols for receiving message information. Therefore, it is particularly important to monitor the identifier of message information. Different identifiers of message information mean different levels of waking up the mobile terminal.

[0039] S22: judging whether the message information will wake up the kernel bottom layer of the mobile terminal according to the identifier;

[0040] The identifiers of the message information obtained by monitoring may not necessarily wake up the mobile terminal in the standby state. To wake up the mobile terminal, the identifier of the message information needs to reach the kernel layer of the mobile terminal, that is, the kernel bottom layer of the mobile terminal.

[0041] After actual testing, when the monitored identification includes at least any one of the connection operation (CONNECTIVITY_ACTION) identification, the WiFi state is enabled (WIFI_STATE_ENABLED) identification and the WiFi state is disabled (WIFI_STATE_DISABLED) identification, it can be determined that the mobile terminal will be awakened, so that the mobile terminal cannot be truly in standby mode.

[0042] If it is determined that the message information will wake up the kernel bottom layer of the mobile terminal, then enter step S23; if it is determined that the message information will not wake up the kernel bottom layer of the mobile terminal, then return to step S21 and continue to monitor the identifier of the acquired message information.

[0043] S23: Determine that the message information will interrupt the standby state of the mobile terminal.

[0044] Therefore, by judging whether the message information will wake up the kernel bottom layer of the mobile terminal through the identifier of the message information, it is determined that the message information will interrupt the standby state of the mobile terminal, which can improve the feasibility of the solution. Of course, those skilled in the art can judge whether the message information will wake up the kernel bottom layer of the mobile terminal through other methods known in the art.

[0045] See also Figure 3 , Figure 3 yes Figure 1 The flowchart of a specific implementation method before step S11 shown includes the following steps:

[0046] S31: monitoring whether the mobile terminal switches from a screen-on state to a standby state;

[0047] Generally speaking, a mobile terminal has a power-on state, a standby state, a screen-on state, a sleep state, and a working state. Among them, the standby state refers to a state where the mobile terminal is powered on but does not perform any substantial work, that is, does not perform various operations on files and programs.

[0048] The standby state is to save the data in the current running state in the memory. The mobile terminal only supplies power to the memory, while the hard disk, screen, CPU and other components are powered off. Since the data is stored in the fast memory, the speed of entering the standby state and waking up is relatively fast.

[0049] Before acquiring the message information, whether the mobile terminal is in the standby state is particularly important for determining whether the message information will interrupt the standby state of the mobile terminal. Therefore, it is necessary to monitor whether the mobile terminal switches from the screen-on state to the standby state; wherein the standby state at least includes the screen-off state or the sleep state.

[0050] S32: modify the state attribute value of the message filtering script, and configure the message filtering script to enable the message filtering script to start running.

[0051] If the mobile terminal switches from the screen-on state to the standby state, the state attribute value of the message filtering script can be modified, and the message filtering script can be configured to enable the message filtering script to start running.

[0052] If the mobile terminal is in the screen-on state, proceed to step S33.

[0053] S33: It is determined that the triggering condition for modifying the message filtering script is not met.

[0054] When the mobile terminal is in the screen-on state, it means that there is no need to trigger the conditions for modifying the message filtering script, and the operations that can be performed in the screen-on state can continue to be performed.

[0055] See also Figure 4 , Figure 4 yes Figure 3 The flowchart of a specific implementation method before step S31 shown includes the following steps:

[0056] S41: When the screen of the mobile terminal is turned off, the broadcast mechanism is triggered;

[0057] When the mobile terminal switches from the screen-on state to the standby state, that is, when the mobile terminal turns off the screen, the broadcast mechanism is triggered. The mobile terminal will immediately notify other internal running devices to perform corresponding operations, such as saving the current state data in the memory, so that the mobile terminal quickly enters the sleep state.

[0058] S42: monitoring broadcasts based on the broadcast mechanism;

[0059] Based on the broadcasts broadcasted by the monitoring broadcast mechanism, each operating device receives a screen-off signal.

[0060] S43: based on the monitored broadcast, change the setting attribute in the init.rc script to the standby attribute;

[0061] When the mobile terminal init.rc script receives a screen-off signal, the setting attribute in the init.rc script can be changed to a standby attribute.

[0062] S44: Switching the mobile terminal to a standby state based on the standby attribute.

[0063] When the setting attribute in the init.rc script is changed to the standby attribute, the mobile terminal turns off the screen and switches to the standby state.

[0064] See also Figure 5 , Figure 5 yes Figure 1 The flowchart of another specific implementation of step S12 shown in FIG. 1 includes the following steps:

[0065] S51: Determine the message information category based on the message filtering script;

[0066] based on Figure 4 The running filtering script indicates that the mobile terminal can filter the message information that will interrupt the standby state of the mobile terminal from time to time. Figure 1 As shown in step S11 , it can be seen that based on different receiving protocols, the headers and identifiers of the message information are different, and the message information categories are also different. Therefore, the message information category can be judged and determined based on the message filtering script.

[0067] S52: If the message information will wake up the kernel bottom layer, query the pre-set filtering message table based on the message information category;

[0068] If the message information will wake up the kernel bottom layer, it is considered that the type of the message information meets the message information in the filtering script and needs to be filtered. Whether the message information needs to be filtered requires comparison and retrieval. Before obtaining the message information, the mobile terminal is configured with a filtering message table, which records most of the message information that needs to be filtered when the mobile terminal is in standby mode.

[0069] Therefore, the pre-set filtering message table can be queried based on the message information category to determine whether the acquired message information coincides with the message information in the filtering message table, that is, to query whether the acquired message information meets the requirements for filtering.

[0070] S53: Determine whether the acquired message information coincides with the message information in the filtering message table;

[0071] By querying the pre-set filtering message table, retrieving and comparing the obtained message information, it can be determined whether the obtained message information coincides with the message information in the filtering message table. If so, enter step S54. If not, it is determined that the message information will not interrupt the standby state of the mobile terminal.

[0072] S54: Determine that the message information will interrupt the standby state of the mobile terminal.

[0073] See also Figure 6 , Figure 6 The flowchart of configuring a filtering message table for a mobile terminal includes the following steps:

[0074] S61: Acquire multiple message information based on the filtering message table specified by the protocol; wherein the protocol includes at least one of a router protocol or a WiFi hotspot protocol, and the multiple message information includes at least one of IPv4, IPv6 and IGMPv3 multicast messages;

[0075] In such Figure 5 As shown in step S52, before acquiring the message information, the mobile terminal is configured with a filtering message table. The formation of the filtering message table is based on a unified summary of a plurality of message information previously acquired.

[0076] Because the connected devices are different and the protocols are different, the message information obtained based on the protocol regulations is also different. Therefore, for the formation of a filtering message table, multiple message information can be obtained based on the filtering message table specified by the protocol; wherein the protocol includes at least one of a router protocol or a WiFi hotspot protocol, and the multiple message information includes at least one of IPv4, IPv6 and IGMPv3 multicast messages.

[0077] In addition, when the mobile terminal is connected to other devices, such as customer premise equipment (CPE), multiple message information can be obtained according to the protocol of the CPE to form a filtering message table. Of course, those skilled in the art can obtain multiple message information through other protocols or methods known in the art.

[0078] S62: Put multiple message information into the filtering message table in an enumerated manner;

[0079] For the multiple message information obtained, the multiple message information can be put into the filtering message table in an enumerated manner, or in a comparison and matching manner, or in a search and replacement manner, which is not limited here.

[0080] S63: Update the filtering message table through deep learning and training.

[0081] With the development of network communication technology, the update and advancement of communication protocols, the form of messages will become more diverse and personalized, so it is particularly important to update the filter message table through deep learning and training. The following is a detailed description of how to update the filter message table through deep learning and training, including the following steps:

[0082] 1. Build a deep learning model in advance;

[0083] According to the general template of the filtering message table, a deep learning model is pre-established. The deep learning model has the data and logic expressed by the general template of the filtering message table, and also has the learning ability of personalized learning to meet the growing message communication technology.

[0084] 2. Input the messages in the filtered message table into the deep learning model for learning and training;

[0085] Based on the pre-established deep learning model, the messages in the filtering message table can be input into the deep learning model to allow the model to learn what types of messages can be blocked and what types of messages cannot be blocked.

[0086] 3. When a new message comes, it is input into the deep learning model. The model can judge whether the message needs to be blocked based on previous learning. If necessary, it is added to the filtering message table to complete the update of the filtering message table.

[0087] The message filtering method of the present application will be described in detail below in conjunction with specific application scenarios.

[0088] At present, we select to connect to the WiFi router hotspot to obtain message information, and wake up the mobile terminal in standby state based on the kernel bottom layer. Because some messages of the WiFi router hotspot are sent irregularly, if the WiFi standby consumes 23% of power for 8 hours, the average power consumption is 2.875%. From the log analysis, we found that the kernel bottom layer often interrupts and wakes up, as follows:

[0089] 02-13 03:57:01.381 0 0 W gic_show_resume_irq:178 triggered wcnss_wlan.

[0090] Analyze the upper-level Android log: WiFi logs similar to the one every two minutes, as follows:

[0091] 02-13 03:57:01.500 704 762 I WifiService:requestActivityInfo uid=1000

[0092] 02-13 03:57:01.500 704 762 I WifiService:reportActivityInfo uid=1000

[0093] 02-13 03:57:01.501 704 762 I WifiService:getSupportedFeatures uid=1000

[0094] After further analysis, it was determined that the problem was caused by connecting to the Honor WS83 router, but the problem did not reoccur with the mobile phone hotspot. The two watches (W3 / W5) had problems with the router, but not with the hotspot. Further log tracking to locate the problem: Membership Query was found to be a unicast message on the WLAN side (the destination address is the MAC address of the DUT), and it does wake up the entire system. kernel log: / / SN is the sequence number, and the kernel log shows that it was awakened by a message with sn=26, where the code for SN=

[26] and the nearby kernel logs are as follows:

[0095] 02-18 13:39:29.704 0 0 W gic_show_resume_irq:178triggered wcnss_wlan

[0096] 02-18 13:39:29.718 0 0 I:[qca]>>>>WDTS_RxPacket:type 2subtype8SN=

[26]

[0097] …

[0098] 02-18 13:41:34.750 0 0 W gic_show_resume_irq:178 triggered wcnss_wlan

[0099] 02-18 13:41:34.765 0 0 I:[qca]>>>>WDTS_RxPacket:type 2 subtype8SN=

[27]

[0100] …

[0101] 02-18 13:43:39.788 0 0 W gic_show_resume_irq:178 triggered wcnss_wlan

[0102] 02-18 13:43:39.805 0 0 I:[qca]>>>>WDTS_RxPacket:type 2 subtype8SN=

[36]

[0103] …

[0104] 02-18 13:45:44.798 0 0W gic_show_resume_irq:178 triggered wcnss_wlan

[0105] 02-18 13:45:44.813 0 0 I:[qca]>>>WDTS_RxPacket: type 2 subtype8SN=

[37]

[0106] …

[0107] 02-18 14:00:19.713 0 0W gic_show_resume_irq:178 triggered wcnss_wlan

[0108] 02-18 14:00:19.727 0 0 I:[qca]>>>WDTS_RxPacket: type 2 subtype8SN=

[44]

[0109] Combined with the air interface sniff log, as follows:

[0110] 223684 2020-02-18 13:39:33.611870 192.168.3.1 224.0.0.1 IGMPv3 12026Membership Query,general

[0111] 261935 2020-02-18 13:41:38.654821 192.168.3.1 224.0.0.1 IGMPv3 12027Membership Query,general

[0112] …

[0113] 302872 2020-02-18 13:43:43.689287 192.168.3.1 224.0.0.1 IGMPv3 12036Membership Query,general

[0114] 338801 2020-02-18 13:45:48.696723 192.168.3.1 224.0.0.1 IGMPv3 12037Membership Query,general

[0115] …

[0116] 575619 2020-02-18 14:00:23.588175 192.168.3.1 224.0.0.1 IGMPv3 12044Membership Query,general

[0117] Therefore, because there are batches of IGMPv3 Membership Query messages periodically pulling up the device and waking up the mobile terminal, it is impossible to truly go to sleep.

[0118] The commands for filtering IPv4, IPv6, and IGMPv3 multicast messages are as follows:

[0119] 1.IPv6 multicast

[0120] iwpriv wlan0 setPktFilter 1 1 3 1 5 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 00 2 3 6 2 134 221 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 24 2 255 0 0 0 0 0 0 0 2550 0 0 0 0 0 0

[0121] 2.IPv4 multicast

[0122] iwpriv wlan0 setPktFilter 1 2 3 1 5 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 00 2 3 6 2 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 16 1 224 0 0 0 0 0 0 0 240 0 00 0 0 0 0

[0123] 3.IGMPV3

[0124] iwpriv wlan0 setPktFilter 1 6 3 1 5 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 00 3 3 9 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 24 1 17 0 0 0 0 0 0 0 0 0 0 0 00 0 0

[0125] Understanding the analysis of filtering message commands:

[0126] iwpriv wlan0 setPktFilter 1(filterAction)6(filterId, there is no limit for this setting, you can also set it to 1)3(numParams)

[0127] 1(protocolLayer,1for MAC header)5(cmpFlag)0(dataOffset)1(datalength)10 0 0 0 0 0 0(compareData)0 0 0 0 0 0 0 0(dataMask) / / Filter unicast messages

[0128] 3(protocolLayer,3for IPV4 header)3(cmpFlag)9(dataOffset, offset 9 bytes, which is exactly the Protocol field of the IPV4 message header)1(datalength)2 0 0 0 0 0 0 0(compareData, 2 represents IGMP message)0 0 0 0 0 0 0 0(dataMask) / / Filter unicast IGMP messages

[0129] 3(protocolLayer,3for IPV4 header)3(cmpFlag)24(dataOffset, offset 24 bytes from the IPV4 message header, which is exactly the Type field of the IGMP message header)1(datalength)17 0 0 0 0 0 0 0(compareData, 17 represents Membership Query)0 0 0 0 0 0 0 0(dataMask) / / Filter unicast Membership Query messages.

[0130] In actual projects, the above commands cannot effectively block message information. After repeated experiments, it was found that after connecting to the hotspot, only by entering such a command to filter messages can these messages be truly blocked, so that when the mobile terminal is in sleep mode and connected to WiFi, irregular message information will not wake up the mobile terminal, thereby reducing power consumption and improving battery utilization efficiency. Therefore, in the code, when monitoring CONNECTIVITY_ACTION and WIFI_STATE_ENABLED, WIFI_STATE_DISABLED, corresponding attribute changes are implemented, so that through the init.rc script file, because of the attribute change, another autochmod process is called to set the command, so as to achieve the purpose of filtering messages.

[0131] Specifically, first, through operations related to the mobile terminal, the changes in the status of the mobile phone, such as screen on, screen off, and sleep, are dynamically monitored. When the status changes, the execution of related configuration scripts is dynamically executed by modifying the attribute value, that is, the screen off triggers the broadcast mechanism, and the broadcast based on the broadcast mechanism is listened to. Based on the listened broadcast, the setting attribute of the init.rc script is changed to the standby attribute, and the mobile terminal switches to the standby state. The standby attribute changes the filtering script based on the standby state.

[0132] Similar to the operation with numbers in the iwpriv command, set the corresponding operation in the iwpriv command to find the message and then do self-adaptation. Trigger the related self-adaptation script to run through the change of attributes and then adjust the existing method, as follows:

[0133] lo no private ioctls.----lo no private commands

[0134] eth2 no private ioctls..----eth2 no private commands

[0135] eth3 no private ioctls..----eth3 no private commands

[0136] ra0 Available private ioctls:.----ra0 has private commands

[0137] Additionally, the iwpriv command is set as follows:

[0138] set(8BE2):set 1024char&get 0

[0139] ipv4_matinfo(0001):set 1024 char&get 2047 char

[0140] ipv6_matinfo(0002):set 1024 char&get 2047 char

[0141] cloneMAC(0003):set 1024 char&get 2047 char

[0142] connStatus(0004):set 1024 char&get 2047 char

[0143] driverVer(0005):set 1024 char&get 2047 char

[0144] bainfo(0006):set 1024 char&get 2047 char

[0145] descinfo(0007):set 1024 char&get 2047 char

[0146] get_wps_pin_ap(0008):set 1024 char&get 2047 char

[0147] When executing, find the acquired message, and configure the filtering message table before acquiring by executing the script. The filtering message table can handle useless messages that need to be filtered. Query the acquired message. When the message in the filtering message table coincides with the acquired message, filtering begins.

[0148] In this way, the message information can be filtered through dynamic configuration to shield the periodic messages caused by connecting to certain routers. This allows the device to quickly enter sleep mode and truly enter a low-power standby state.

[0149] In addition, it is also necessary to change the relevant selinux permission issues. The ioctl permission operation commands for udp_socket and socket are as follows:

[0150] allowxperm autochmod self:udp_socket ioctl priv_sock_ioctls;

[0151] allowxperm autochmod self:udp_socket ioctl SIOCIWFIRSTPRIV_17;

[0152] allow autochmod autochmod:udp_socket{create ioctl};

[0153] allow autochmod autochmod:socket{create ioctl};

[0154] allow autochmod autochmod:appletalk_socket{create ioctl};

[0155] It is through this setting method that the purpose of dynamic message filtering is achieved, that is, when connecting to a hotspot or router, message filtering information can be executed, and when the hotspot is disconnected, it will return to normal.

[0156] When connected to WiFi and entering standby mode, power consumption is reduced by more than 3%. Therefore, the filtering of Wifi messages is dynamically set through commands to filter unnecessary hotspot messages, especially periodic wake-up messages. This can better achieve battery efficiency, and the mobile terminal can quickly enter the sleep state without waking up the mobile terminal due to the WiFi routing device sending some unnecessary message information from time to time, such as periodic messages and hotspot messages. In addition, it can also improve the service life of the battery and the life of the mobile terminal, so that it will not be unable to enter the real sleep low power consumption state due to connecting to certain hotspots.

[0157] See also Figure 7 , Figure 7 Schematic diagram of a mobile terminal according to an embodiment of the present application. The present application provides a mobile terminal 7, including:

[0158] An acquisition module 71 is used to acquire message information;

[0159] The judgment module 72 and the connection acquisition module 71 are used to judge whether the message information will interrupt the standby state of the mobile terminal 7 when the mobile terminal 7 is in the standby state;

[0160] The filtering module 73 and the connection determination module 72 are used to filter the message information when the message information will interrupt the standby state of the mobile terminal 7 .

[0161] Through the above method, for the standby state of the mobile terminal 7, the message information that will interrupt the standby state of the mobile terminal 7 is filtered. Since the mobile terminal 7 is generally in a low-power working state in the standby state, in this low-power state, the general Bluetooth and WiFi functions are in the on state, some functions are disabled, but the message receiving function is still valid, and Bluetooth, WiFi, etc. will receive some messages sent by the router or other network devices or Bluetooth devices when they are turned on, and some of the messages will wake up the mobile terminal 7, interrupt the standby state of the mobile terminal 7, that is, interrupt the low-power working state of the mobile terminal 7. Therefore, through the above method, those messages that will wake up the mobile terminal 7 from the standby state are filtered out, which can effectively prevent the mobile terminal 7 from being awakened in the standby state, so that the mobile terminal 7 can maintain a low-power state when the screen is turned off, thereby reducing the power consumption of the mobile terminal 7.

[0162] For further information, see Figure 8 , Figure 81 is a schematic diagram of the structure of another mobile terminal of an embodiment of the present application. The embodiment of the present application provides a mobile terminal 8, including: a processor 81, a memory 82, and a computer program 821 stored in the memory and running on the processor, the processor 81 is used to execute the computer program 821 to implement the steps of the method provided in the first aspect of the embodiment of the present application, which will not be repeated here.

[0163] See also Fig. 9 , Fig. 9 It is a schematic block diagram of an embodiment of a computer-readable storage medium of the present application. If implemented in the form of a software functional unit and sold or used as an independent product, the computer program 201 can be stored in a computer-readable storage medium 200. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage device, including a number of instructions (computer program 201) to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage device includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and electronic devices such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above storage media.

[0164] The description of the execution process of the program data in the device with storage function can refer to the description in the above-mentioned embodiment of the message filtering method of the mobile terminal of the present application, which will not be repeated here.

[0165] See also Fig.10 , Fig.10 It is a schematic block diagram of a hardware architecture of a mobile terminal of the present application. The mobile terminal device can be a smart watch, a mobile phone, a tablet computer, a laptop computer, a wearable device, etc. The diagram of this embodiment takes a smart watch as an example. The structure of the terminal device 900 may include a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a WiFi (wireless fidelity) module 970, a processor 180, and a power supply 190. Among them, the RF circuit 910, the memory 920, the input unit 930, the display unit 940, the sensor 950, the audio circuit 960, and the WiFi module 970 are respectively connected to the processor 980; the power supply 990 is used to provide power to the entire terminal device 900.

[0166] Specifically, the RF circuit 910 is used to receive and send signals; the memory 920 is used to store data instruction information; the input unit 930 is used to input information, which may specifically include a touch screen 931 and other input devices 932 such as operation buttons; the display unit 940 may include a display panel, etc.; the sensor 950 includes an infrared sensor, a laser sensor, etc., for detecting user approach signals, distance signals, etc.; the speaker 961 and the microphone (or microphone) 962 are connected to the processor 980 through the audio circuit 960 for receiving and sending sound signals; the WiFi module 970 is used to receive and transmit WiFi signals, and the processor 980 is used to process data information of the mobile terminal device.

[0167] The above descriptions are only some embodiments of the present application, and do not limit the protection scope of the present application. Any equivalent device or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A message filtering method for a mobile terminal, characterized in that: The method comprises: Get message information; If the mobile terminal is in a standby state, determining whether the message information will interrupt the standby state of the mobile terminal; including: determining the message information category based on a message filtering script; if the message information will wake up the kernel bottom layer, querying a pre-set filtering message table based on the message information category; determining whether the acquired message information coincides with the message information in the filtering message table; if so, determining that the message information will interrupt the standby state of the mobile terminal; Before obtaining the message information, the method further includes: Acquire multiple message information based on the filtering message table specified by the protocol; wherein the protocol includes at least one of a router protocol or a WiFi hotspot protocol, and the multiple message information includes at least one of IPv4, IPv6 and IGMPv3 multicast messages; put the multiple message information into the filtering message table in an enumerated manner; update the filtering message table through deep learning and training; If yes, the message information is filtered.

2. The method according to claim 1, characterized in that: Before obtaining the message information, the method further includes: Monitoring whether the mobile terminal switches from a screen-on state to a standby state; If so, modify the state attribute value of the message filtering script, and configure the message filtering script so that the message filtering script starts running.

3. The method according to claim 2, characterized in that Before monitoring whether the mobile terminal switches from the screen-on state to the standby state, the method further includes: When the screen of the mobile terminal is turned off, a broadcast mechanism is triggered; Monitoring broadcasts based on the broadcast mechanism; Based on the monitored broadcast, change the setting attribute in the init.rc script to the standby attribute; The mobile terminal is switched to a standby state based on the standby attribute.

4. A mobile terminal, characterized in that: include: An acquisition module, used to obtain message information; A judgment module, connected to the acquisition module, is used to judge whether the message information will interrupt the standby state of the mobile terminal when the mobile terminal is in the standby state; specifically comprising: judging the message information category based on the message filtering script; if the message information will wake up the kernel bottom layer, querying a pre-set filtering message table based on the message information category; judging whether the acquired message information coincides with the message information in the filtering message table; if so, determining that the message information will interrupt the standby state of the mobile terminal; Before obtaining the message information, the method further includes: Acquire multiple message information based on the filtering message table specified by the protocol; wherein the protocol includes at least one of a router protocol or a WiFi hotspot protocol, and the multiple message information includes at least one of IPv4, IPv6 and IGMPv3 multicast messages; put the multiple message information into the filtering message table in an enumerated manner; update the filtering message table through deep learning and training; A filtering module is connected to the judging module and is used to filter the message information when the message information will interrupt the standby state of the mobile terminal.

5. A mobile terminal, characterized in that: include: A processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the message filtering method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can implement the message filtering method according to any one of claims 1 to 3 when executed by a processor.

Citation Information

Patent Citations

  • Processing method and device based on screen-lighting lock

    CN106055073A