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

Message filtering method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN113840358A
CN113840358A CN202010591632.5A CN202010591632A CN113840358A CN 113840358 A CN113840358 A CN 113840358A CN 202010591632 A CN202010591632 A CN 202010591632A CN 113840358 A CN113840358 A CN 113840358A
Authority
CN
China
Prior art keywords
mobile terminal
message information
message
filtering
standby state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010591632.5A
Other languages
Chinese (zh)
Inventor
罗伟平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010591632.5A priority Critical patent/CN113840358A/en
Publication of CN113840358A publication Critical patent/CN113840358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a message filtering method of a mobile terminal, the mobile terminal and a computer storage medium, wherein the method comprises the following steps: acquiring message information; if the mobile terminal is in the standby state, judging whether the message information interrupts the standby state of the mobile terminal; and if so, filtering the message information. Through the mode, the power consumption of the mobile terminal can be reduced.

Description

Message filtering method, mobile terminal and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for filtering a packet of a mobile terminal, and a computer storage medium.
Background
With the development of communication technology, network transmission information is developed more and more. The message is not used as a unit for network transmission, and can be continuously encapsulated into packets, packets and frames for transmission in the transmission process. That is, the message is a data unit exchanged and transmitted in the network, that is, a data block to be sent by the station at one time.
When the mobile terminal is in a standby state, the mobile terminal wake-up event is often triggered by receiving a message. Due to the conditions of irregular sending of the message and the like, the standby state of the mobile terminal is interrupted, so that the mobile terminal is awakened, and the mobile terminal in the standby state cannot enter the real standby state, thereby causing the problem of high power consumption of the mobile terminal.
Disclosure of Invention
A first aspect of an embodiment of the present application provides a method for filtering a packet of a mobile terminal, where the method includes: acquiring message information; if the mobile terminal is in the standby state, judging whether the message information interrupts the standby state of the mobile terminal; and if so, filtering the message information.
A second aspect of an embodiment of the present application provides a mobile terminal, including: the acquisition module is used for acquiring message information; the judging module is connected with the obtaining module and is used for judging whether the message information interrupts the standby state of the mobile terminal when the mobile terminal is in the standby state; and the filtering module is connected with the judging module and is used for filtering the message information when the message information interrupts the standby state of the mobile terminal.
A third aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, where the computer program is capable of implementing, when executed by a processor, the method provided by the first aspect of embodiments of the present application.
The beneficial effect of this application is: different from the situation in the prior art, the message information which can interrupt the standby state of the mobile terminal is filtered under the standby state of the mobile terminal. Because the mobile terminal is generally in a low-power-consumption working state in a standby state, in the low-power-consumption state, the general bluetooth and WiFi functions are all in an on state, some functions are forbidden, but the message receiving function is still effective, while the bluetooth, WiFi and the like can receive some messages sent by a router or other network equipment or bluetooth equipment in the on state, and part of the messages can wake up the mobile terminal to interrupt the standby state of the mobile terminal, namely interrupt the low-power-consumption working state of the mobile terminal. Therefore, by the mode, messages which can wake up the mobile terminal from the standby state are filtered, so that the mobile terminal can be effectively prevented from being woken up in the standby state, the mobile terminal can be kept in a low power consumption state when the screen is turned off, and the power consumption of the mobile terminal is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an embodiment of a message filtering method of a mobile terminal according to the present application;
FIG. 2 is a flowchart illustrating one embodiment of step S12 shown in FIG. 1;
FIG. 3 is a schematic flow chart diagram illustrating one embodiment of the method before step S11 shown in FIG. 1;
FIG. 4 is a schematic flow chart diagram illustrating one embodiment of the method before step S31 shown in FIG. 3;
FIG. 5 is a schematic flow chart diagram illustrating another embodiment of step S12 shown in FIG. 1;
FIG. 6 is a flow chart illustrating a configuration of a filtered message table for a mobile terminal;
FIG. 7 is a schematic block diagram of an embodiment of a mobile terminal of the present application;
FIG. 8 is a schematic block diagram of another embodiment of a mobile terminal of the present application;
FIG. 9 is a schematic block diagram of one embodiment of a computer-readable storage medium of the present application;
fig. 10 is a schematic block diagram of a hardware architecture of a mobile terminal of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of a method for applying for message filtering of a mobile terminal. The method provided by the embodiment specifically comprises the following steps:
s11: acquiring message information;
generally, a mobile terminal is provided with a message information receiving protocol, and when message information is sent to the mobile terminal, the version, header, identifier, data length, protocol, and the like of the message information can be obtained. The mobile terminal has different connected devices, and the message information obtained by the mobile terminal is correspondingly different. Taking a wifi (wireless fidelity) hotspot as an example, the message information that the mobile terminal can obtain at least includes one of Internet Protocol Version four multicast (IPv 4 multicast) message information, Internet Protocol Version six multicast (IPv 6 multicast) message information, and Internet Group Management Protocol Version three multicast (Internet Group Management Protocol Version 3 Membership Query, IGMPv3 Membership Query) message information.
Additionally, when a mobile terminal connects to a router, such as a Rough WS83 router, message information may be obtained in accordance with the Rough WS83 router's protocol. Of course, those skilled in the art may obtain the message information in other ways known in the art.
S12: if the mobile terminal is in the standby state, judging whether the message information interrupts the standby state of the mobile terminal;
the mobile terminal is preset with a standby state and is used for executing a standby mode when the mobile terminal is switched from a bright screen to a sleep mode. How the mobile terminal switches from the bright screen state to the standby state will be described in detail below. Of course, it is fully conceivable for those skilled in the art to set the handover state of the mobile terminal according to actual needs in the light of the teachings of the present application.
If the mobile terminal is in the standby state, determining whether the message information interrupts the standby state of the mobile terminal, if the message information interrupts the standby state of the mobile terminal, entering step S13, if the message information does not interrupt the standby state of the mobile terminal, returning to step S11. Further, after determining that the standby state of the mobile terminal is interrupted, a corresponding control signal may be generated to notify the mobile terminal to perform a corresponding operation.
S13: and filtering the message information.
For the message information that may interrupt the standby state of the mobile terminal, the message information may be shielded in a filtering manner, may be filtered in a deleting manner, and may also be filtered in other manners, which is not limited herein.
By the mode, the message information which can interrupt the standby state of the mobile terminal is filtered under the standby state of the mobile terminal. By the method, frequent triggering of awakening the mobile terminal by the message information in the standby state of the mobile terminal can be effectively avoided, so that the power consumption of the mobile terminal is reduced.
Different from the situation in the prior art, the message information which can interrupt the standby state of the mobile terminal is filtered under the standby state of the mobile terminal. Because the mobile terminal is generally in a low-power-consumption working state in a standby state, in the low-power-consumption state, the general bluetooth and WiFi functions are all in an on state, some functions are forbidden, but the message receiving function is still effective, while the bluetooth, WiFi and the like can receive some messages sent by a router or other network equipment or bluetooth equipment in the on state, and part of the messages can wake up the mobile terminal to interrupt the standby state of the mobile terminal, namely interrupt the low-power-consumption working state of the mobile terminal. Therefore, by the mode, messages which can wake up the mobile terminal from the standby state are filtered, so that the mobile terminal can be effectively prevented from being woken up in the standby state, the mobile terminal can be kept in a low power consumption state when the screen is turned off, and the power consumption of the mobile terminal is reduced.
Referring to fig. 2, fig. 2 is a schematic flowchart of an embodiment of step S12 shown in fig. 1, which specifically includes the following steps:
s21: monitoring the identifier of the message information;
as shown in step S11 in fig. 1, the identities of the message information monitored by the mobile terminal are different due to different connected devices and different protocols for receiving the message information. Therefore, it is important to monitor the message information with different identifiers, which means different levels of waking up the mobile terminal.
S22: judging whether the message information can awaken a kernel bottom layer of the mobile terminal or not according to the identifier;
for the identifier of the message information obtained by monitoring, the mobile terminal in the standby state is not necessarily awakened, and the identifier of the message information required for awakening the mobile terminal can reach the kernel layer of the mobile terminal, that is, the kernel bottom layer of the mobile terminal.
After actual verification, when the monitored identifier at least comprises any one of a connection operation (connection _ activity) identifier, a WiFi STATE ENABLED (WiFi _ STATE _ ENABLED) identifier and a WiFi STATE DISABLED (WiFi _ STATE _ disable) identifier, it can be determined that the mobile terminal is awakened, so that the mobile terminal cannot be really in a standby STATE.
If the message information is determined to awaken the kernel bottom layer of the mobile terminal, the step S23 is carried out; and if the message information is determined not to awaken the kernel bottom layer of the mobile terminal, returning to the step S21, and continuing to monitor the identifier of the acquired message information.
S23: determining that the message information interrupts the standby state of the mobile terminal.
Therefore, whether the message information can wake up the kernel bottom layer of the mobile terminal is judged through the identifier of the message information, the standby state of the mobile terminal can be interrupted by the message information, and the implementation of the scheme can be improved. Of course, those skilled in the art can determine whether the message information will wake up the kernel bottom layer of the mobile terminal through other ways known in the art.
Referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment before step S11 shown in fig. 1, including the following steps:
s31: monitoring whether the mobile terminal is switched from a bright screen state to a standby state;
generally, a mobile terminal has a power-on state, a standby state, a screen-on state, a sleep state, and an operating state. The standby state refers to a state in which the mobile terminal is turned on but does not perform any substantial work, that is, various operations are not performed on files and programs.
The standby state is to store the data in the running state in the memory, the mobile terminal only supplies power to the memory, and the hard disk, the screen, the CPU and other parts stop supplying power. Since the data is stored in the fast memory, the waiting state is entered and the waking speed is fast.
Before the message information is acquired, whether the mobile terminal is in a standby state is particularly important for determining whether the message information interrupts the standby state of the mobile terminal. Therefore, it is necessary to monitor whether the mobile terminal is switched from the bright screen state to the standby state; the standby state at least comprises a screen-off state or a sleep state.
S32: and modifying the state attribute value of the message filtering script, and configuring the message filtering script so as to enable the message filtering script to start running.
If the mobile terminal is switched from the bright screen state to the standby state, the state attribute value of the message filtering script can be modified, and the message filtering script is configured so that the message filtering script starts to run.
If the mobile terminal is in the bright screen state, the process proceeds to step S33.
S33: and judging that the triggering condition for modifying the message filtering script is not met.
When the mobile terminal is in the bright screen state, the condition that the message filtering script is not required to be modified is indicated, and the executable operation in the bright screen state can be continuously executed.
Referring to fig. 4, fig. 4 is a flowchart illustrating an embodiment before step S31 shown in fig. 3, including the following steps:
s41: when the mobile terminal is turned off, a broadcasting mechanism is triggered;
and when the mobile terminal is switched from the bright screen state to the standby state, namely the mobile terminal is turned off, triggering a broadcasting mechanism. Even if the mobile terminal notifies other internal operating devices to perform corresponding operations, for example, data of the current state is stored in the memory, so that the mobile terminal quickly enters the sleep state.
S42: monitoring broadcast broadcasted based on a broadcast mechanism;
and each running device receives a screen-off signal based on the broadcast broadcasted by the broadcast monitoring mechanism.
S43: changing the setting attribute in the init.rc script into a standby attribute based on the monitored broadcast;
when the mobile terminal init.rc script receives the screen-off signal, the setting attribute in the init.rc script can be changed into the standby attribute.
S44: switching the mobile terminal to a standby state based on the standby attribute.
And when the setting attribute in the init.rc script is changed into the standby attribute, the screen of the mobile terminal is turned off and switched into a standby state.
Referring to fig. 5, fig. 5 is a schematic flowchart of another embodiment of step S12 shown in fig. 1, including the following steps:
s51: judging the message information category based on the message filtering script;
based on the filtering script run in fig. 4, it is described that the mobile terminal may filter the message information that may occasionally interrupt the standby state of the mobile terminal, and as can be seen from step S11 shown in fig. 1, based on the difference of the receiving protocols, the header and the identifier of the message information are different, and the message information type is also different, so that the message information type may be determined and determined based on the message filtering script.
S52: if the message information can awaken the kernel bottom layer, inquiring a preset filtering message table based on the message information category;
if the message information can wake up the kernel bottom layer, the type of the message information is considered to meet the message information in the filtering script and needs to be filtered, whether the message information needs to be filtered or not needs to be compared and retrieved, and before the message information is obtained, the mobile terminal is configured with a filtering message table which records most of the message information needing to be filtered when the mobile terminal is in a standby state.
Therefore, the preset filtering message table is inquired based on the message information category to judge whether the acquired message information is overlapped with the message information of the filtering message table, namely, whether the acquired message information meets the requirement of filtering.
S53: judging whether the acquired message information is superposed with the message information of the filtered message table;
by inquiring a preset filtering message table, retrieving and comparing the acquired message information, whether the acquired message information is overlapped with the message information of the filtering message table can be judged, if so, the step S54 is carried out, and if not, the standby state of the mobile terminal is not interrupted by the message information.
S54: determining that the message information interrupts the standby state of the mobile terminal.
Referring to fig. 6, fig. 6 is a schematic flow chart of configuring a filtered message table for a mobile terminal, including the following steps:
s61: acquiring a plurality of message information based on a filtering message form specified by a protocol; the protocol at least comprises one of a router protocol or a WiFi hotspot protocol, and the message information at least comprises at least one of IPv4, IPv6 and IGMPv3 multicast messages;
as can be seen in step S52 shown in fig. 5, before the message information is acquired, the mobile terminal is configured with a filtered message table. The filtering message table is formed by uniformly summarizing and summarizing the information based on a plurality of messages acquired previously.
Because the connected devices are different and the protocols are different, the message information obtained based on the protocol specification is also different, and therefore, for the formation of the filtering message table, a plurality of message information can be obtained based on the filtering message table specified by the protocol; the protocol at least comprises one of a router protocol or a WiFi hotspot protocol, and the message information at least comprises at least one of IPv4, IPv6 and IGMPv3 multicast messages.
In addition, when the mobile terminal is connected to another device, such as a Customer Premise Equipment (CPE), a plurality of message information may be acquired according to a protocol of the CPE to collectively form a filtering message table. Of course, those skilled in the art may obtain the plurality of message information through other protocols or manners known in the art.
S62: putting a plurality of message information into a filtering message table in an enumeration mode;
for the obtained multiple pieces of message information, the multiple pieces of message information may be placed in the filtering message table in an enumeration manner, may be placed in the filtering message table in a comparison and matching manner, and may be placed in the filtering message table in a retrieval and replacement manner, which is not limited herein.
S63: and updating the filtering message table through deep learning and training.
With the technical development of network communication and the updating and promotion of communication protocols, the forms of the messages are more and more diversified and personalized, so that the updating of the filtering message table through deep learning and training is particularly important. How to deeply learn and train to update the filtering message table is described in detail below, and includes the following steps:
1. establishing a deep learning model in advance;
according to the general template of the filtering message form, a deep learning model is established in advance, and the deep learning model has data and logic expressed by the general template of the filtering message form and also has the learning capability of personalized learning so as to meet the increasingly developed message communication technology.
2. Inputting the messages in the filtering message table into a deep learning model for learning training;
based on a pre-established deep learning model, the messages in the filtering message table can be input into the deep learning model, so that the model learns what types of messages can be shielded, and what types of messages cannot be shielded.
3. When a new message comes, the new message is input into the deep learning model, the model can automatically judge whether the message needs to be shielded according to the previous learning, and if so, the message is added into the filtering message table to complete the updating of the filtering message table.
The following describes the message filtering method in detail with reference to a specific application scenario.
Currently, a WiFi routing hotspot is selected to be connected to obtain message information, and operations such as waking up a mobile terminal in a standby state are performed based on a Kernel bottom layer. Because some messages of the WiFi routing hot spot are sent irregularly, if the WiFi consumes 23% of electricity in standby for 8 hours, the average electricity consumption is 2.875%. Starting from log analysis, it is found that the kernel bottom layer frequently interrupts to wake up, as follows:
02-13 03:57:01.381 0 0 W gic_show_resume_irq:178 triggered wcnss_wlan。
the upper android (android) logs were reanalyzed: WiFi log similar for two minutes at a time, as follows:
02-13 03:57:01.500 704 762 I WifiService:requestActivityInfo uid=1000
02-13 03:57:01.500 704 762 I WifiService:reportActivityInfo uid=1000
02-13 03:57:01.501 704 762 I WifiService:getSupportedFeatures uid=1000
through further analysis, the positioning is caused by connecting a Royal WS83 Royal router, the hot spot of the mobile phone does not reappear, the routing of the 2 watches (W3/W5) has problems, and the hot spot has no problem. Further log-grabbing and positioning problems: it is found that Membership Query is a unicast message on the WLAN side (the destination address is the MAC address of the DUT) and it does wake up the whole system. kernel log: // SN is sequence number, kernel log shows awakening by a message with SN 26, where the code of SN [26] and nearby kernel logs are as follows:
02-18 13:39:29.704 0 0 W gic_show_resume_irq:178triggered wcnss_wlan
02-18 13:39:29.718 0 0 I:[qca]>>>WDTS_RxPacket:type 2subtype8SN=[26]
02-18 13:41:34.750 0 0 W gic_show_resume_irq:178 triggered wcnss_wlan
02-18 13:41:34.765 0 0 I:[qca]>>>WDTS_RxPacket:type 2 subtype8SN=[27]
02-18 13:43:39.788 0 0 W gic_show_resume_irq:178 triggered wcnss_wlan
02-18 13:43:39.805 0 0 I:[qca]>>>WDTS_RxPacket:type 2 subtype8SN=[36]
02-18 13:45:44.798 0 0W gic_show_resume_irq:178 triggered wcnss_wlan
02-18 13:45:44.813 0 0 I:[qca]>>>WDTS_RxPacket:type 2 subtype8SN=[37]
02-18 14:00:19.713 0 0W gic_show_resume_irq:178 triggered wcnss_wlan
02-18 14:00:19.727 0 0 I:[qca]>>>WDTS_RxPacket:type 2 subtype8SN=[44]
in conjunction with the air interface sniff log, the following is:
223684 2020-02-18 13:39:33.611870 192.168.3.1 224.0.0.1 IGMPv3 120 26Membership Query,general
261935 2020-02-18 13:41:38.654821 192.168.3.1 224.0.0.1 IGMPv3 120 27Membership Query,general
302872 2020-02-18 13:43:43.689287 192.168.3.1 224.0.0.1 IGMPv3 120 36Membership Query,general
338801 2020-02-18 13:45:48.696723 192.168.3.1 224.0.0.1 IGMPv3 120 37Membership Query,general
575619 2020-02-18 14:00:23.588175 192.168.3.1 224.0.0.1 IGMPv3 120 44Membership Query,general
therefore, the mobile terminal is awakened because of the existence of the batch of pulling-up devices with the IGMPv3 Membership Query message period, so that the mobile terminal cannot really sleep.
For the commands of filtering the IPv4, IPv6 and IGMPv3 multicast messages, the commands are as follows:
1.IPv6 multicast
iwpriv wlan0 setPktFilter 1 1 3 1 5 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 255 0 0 0 0 0 0 0
2.IPv4 multicast
iwpriv wlan0 setPktFilter 1 2 3 1 5 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0
3.IGMPV3
iwpriv wlan0 setPktFilter 1 6 3 1 5 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0
understanding the analysis of the filter message command:
iwporv wlan0 setPktFilter 1(filterAction)6(filterId, which is not limited, and may be set to 1 or 1) 3(numParams)
1(protocol layer,1for MAC header)5(cmpFlag)0(dataOffset)1(datalength) 10000000 (compleData) 00000000 (dataMask)// filtering unicast messages
3(Protocol layer,3for IPV4 header)3(cmpFlag)9(dataOffset, offset 9 bytes, just the Protocol field of the IPV4 header) 1(datalength) 20000000 (compleData, 2 stands for IGMP message) 000000000000 (dataMask)// filtering unicast IGMP message
3(protocol layer,3for IPV4 header)3(cmpFlag)24(dataOffset, 24 bytes offset from the IPV4 header, just the Type field of the IGMP header) 1(datalength) 170000000 (compleData, 17 stands for Membership Query) 00000000 (dataMask)// filtering unicast Membership Query messages.
In practical engineering, the message information cannot be well shielded by using the command. Through repeated tests, after the mobile terminal is connected with the hot spot, the messages can be really shielded only by inputting the command for filtering the messages, so that the mobile terminal cannot be awakened by the irregular message information under the conditions that the mobile terminal is in a sleep state and is connected with WiFi, the power consumption is reduced, and the utilization efficiency of the battery is improved. Therefore, when the fact that the connection _ ACTION, the WIFI _ STATE _ ENABLED and the WIFI _ STATE _ DISABLED do corresponding attribute change is monitored in the codes, another autochmod process is called to carry out command setting through the init.
Specifically, firstly, the change of states of a mobile phone, such as screen on, screen off, sleep and the like, is dynamically monitored through the relevant operation of the mobile terminal, when the state changes, the execution of relevant configuration scripts is dynamically executed through the modification of attribute values, namely, the screen off triggers a broadcast mechanism, broadcasts broadcasted based on the broadcast mechanism are monitored, the set attribute of an init.
Similar to the operation of the iwvariv command with numbers, the iwvariv command is provided with corresponding operation to find a message and then carries out self-adaptation, and the script operation of the relevant self-adaptation is triggered by the change of the attribute to readjust the existing method, which comprises the following steps:
lo no private commands ioctls
eth2 no private commands private ioctls-eth 2
eth3 no private commands private ioctls-eth 3
ra0 Available private commands ioctls-ra 0 has private commands
In addition, the iwpriv command is set as follows:
set(8BE2):set 1024char&get 0
ipv4_matinfo(0001):set 1024 char&get 2047 char
ipv6_matinfo(0002):set 1024 char&get 2047 char
cloneMAC(0003):set 1024 char&get 2047 char
connStatus(0004):set 1024 char&get 2047 char
driverVer(0005):set 1024 char&get 2047 char
bainfo(0006):set 1024 char&get 2047 char
descinfo(0007):set 1024 char&get 2047 char
get_wps_pin_ap(0008):set 1024 char&get 2047 char
during execution, the acquired messages are found, and a filtering message table which can process useless messages needing to be filtered is configured before the acquired messages are acquired through executing the script. And inquiring the acquired message. And when the message in the filtered message table is overlapped with the acquired message, starting filtering.
Therefore, the message information can be filtered through dynamic configuration, and the purpose of shielding the periodic messages which are generated by connecting certain routers is achieved. Therefore, the device can quickly enter the sleep state and really enter the low-power-consumption standby state.
In addition, the related selinux authority problem needs to be changed, and the ioctl authority operation commands for udp _ socket and socket are as follows:
allowxperm autochmod self:udp_socket ioctl priv_sock_ioctls;
allowxperm autochmod self:udp_socket ioctl SIOCIWFIRSTPRIV_17;
allow autochmod autochmod:udp_socket{create ioctl};
allow autochmod autochmod:socket{create ioctl};
allow autochmod autochmod:appletalk_socket{create ioctl};
by the setting method, the aim of dynamically filtering the message is fulfilled, namely, message information can be filtered when a hotspot or a router is connected, and the normal state can be recovered when a link-breaking hotspot is connected.
And when the WiFi is connected and enters standby, the power consumption is reduced by more than 3%. Therefore, filtering of the Wifi message is dynamically set through a command, and unnecessary hot spot messages are filtered, especially periodic wake-up messages. Therefore, the battery use efficiency can be better achieved, the mobile terminal can also quickly enter a sleep state, and the mobile terminal cannot be awakened because the WiFi routing equipment irregularly sends some unnecessary message information, such as periodic messages and hot spot messages. In addition, the service life of the battery and the service life of the mobile terminal can be prolonged, and the situation that the mobile terminal cannot enter the real sleep low-power consumption condition under the condition of connecting certain hot spots is avoided.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The embodiment of the present application provides a mobile terminal 7, including:
an obtaining module 71, configured to obtain message information;
the judging module 72 is connected to the acquiring module 71, and is configured to judge whether the message information interrupts the standby state of the mobile terminal 7 when the mobile terminal 7 is in the standby state;
the filtering module 73 is connected to the determining module 72, and is configured to filter the message information when the message information interrupts the standby state of the mobile terminal 7.
In this way, the message information that interrupts the standby state of the mobile terminal 7 is filtered for the standby state of the mobile terminal 7. Because the mobile terminal 7 is generally in a low power consumption operating state in the standby state, in this low power consumption state, the general bluetooth and WiFi functions are all in an on state, some functions are prohibited, but the receiving function of the message is still valid, and the bluetooth and WiFi and the like receive some messages sent by the router or other network devices or bluetooth devices in the on state, and some of the messages wake up the mobile terminal 7, and interrupt the standby state of the mobile terminal 7, that is, interrupt the low power consumption operating state of the mobile terminal 7. Therefore, by the above manner, those messages which can wake up the mobile terminal 7 from the standby state are filtered, so that the mobile terminal 7 can be effectively prevented from being woken up in the standby state, and the mobile terminal 7 can be kept in a low power consumption state when the screen is turned off, thereby reducing the power consumption of the mobile terminal 7.
Further, please refer to fig. 8, where fig. 8 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application. The embodiment of the present application provides a mobile terminal 8, including: the processor 81, the memory 82, and the computer program 821 stored in the memory and running on the processor, the processor 81 is configured 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, and details are not described herein again.
Referring to fig. 9, fig. 9 is a schematic block diagram of an embodiment of a computer-readable storage medium of the present application. The computer program 201 may be stored in the computer-readable storage medium 200 if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage device and includes instructions (computer program 201) for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. The aforementioned storage device includes: various media such as a usb disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and electronic devices such as a computer, a mobile phone, a notebook computer, a tablet computer, and a camera having the storage medium.
For the description of the execution process of the program data in the device with a storage function, reference may be made to the above description of the embodiment of the message filtering method of the mobile terminal in the present application, and details are not described here again.
Referring to fig. 10, fig. 10 is a schematic block diagram of a hardware architecture of a mobile terminal according to the present application, where the mobile terminal device may be a smart watch, a mobile phone, a tablet computer, a notebook computer, a wearable device, and the like, and the smart watch is taken as an example in the embodiment. The terminal apparatus 900 may have a structure including 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, a power supply 190, and the like. Wherein 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 supply power to the entire terminal apparatus 900.
Specifically, the RF circuit 910 is used for transmitting and receiving signals; the memory 920 is used for storing data instruction information; the input unit 930 is used for inputting information, and may specifically include a touch screen 931 and other input devices 932 such as operation keys; the display unit 940 may include a display panel or the like; the sensor 950 includes an infrared sensor, a laser sensor, etc. for detecting a user approach signal, a distance signal, etc.; a speaker 961 and a microphone 962 are connected to the processor 980 through the audio circuit 960 for emitting and receiving sound signals; the WiFi module 970 is configured to receive and transmit WiFi signals, and the processor 980 is configured to process data information of the mobile terminal device.
The above description is only a part of the embodiments of the present application, and not intended to limit the scope of the present application, and all equivalent devices or equivalent processes performed by the content of the present application and the attached drawings, or directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A message filtering method of a mobile terminal is characterized by comprising the following steps:
acquiring message information;
if the mobile terminal is in a standby state, judging whether the message information interrupts the standby state of the mobile terminal;
and if so, filtering the message information.
2. The method of claim 1,
the judging whether the message information interrupts the standby state of the mobile terminal includes:
monitoring the identifier of the message information;
judging whether the message information can awaken a kernel bottom layer of the mobile terminal or not according to the identifier;
and if the message information can awaken the kernel bottom layer, determining that the message information can interrupt the standby state of the mobile terminal.
3. The method of claim 2,
the identification at least comprises any one of a connection operation identification, a WiFi state enabled identification and a WiFi state disabled identification.
4. The method of claim 1, further comprising, prior to said obtaining message information:
monitoring whether the mobile terminal is switched from a bright screen state to a standby state;
and if so, modifying the state attribute value of the message filtering script, and configuring the message filtering script so as to enable the message filtering script to start running.
5. The method according to claim 4, wherein before monitoring whether the mobile terminal is switched from the bright screen state to the standby state, the method further comprises:
when the mobile terminal is turned off, triggering a broadcasting mechanism;
monitoring the broadcast broadcasted based on the broadcast mechanism;
changing a setting attribute in an init.rc script to be a standby attribute based on the monitored broadcast;
and switching the mobile terminal to a standby state based on the standby attribute.
6. The method of claim 4,
the judging whether the message information interrupts the standby state of the mobile terminal includes:
judging the message information category based on the message filtering script;
if the message information can wake up the kernel bottom layer, inquiring a preset filtering message table based on the message information category;
judging whether the acquired message information is superposed with the message information of the filtered message table;
and if so, determining that the message information interrupts the standby state of the mobile terminal.
7. The method of claim 6, wherein prior to said obtaining message information, the method further comprises:
acquiring a plurality of message information based on a filtering message form specified by a protocol; the protocol at least comprises one of a router protocol or a WiFi hotspot protocol, and the message information at least comprises at least one of IPv4, IPv6 and IGMPv3 multicast messages;
placing the message information into the filtering message table in an enumeration mode;
and updating the filtering message table through deep learning and training.
8. A mobile terminal, comprising:
the acquisition module is used for acquiring message information;
the judging module is connected with the obtaining module and is used for judging whether the message information interrupts the standby state of the mobile terminal when the mobile terminal is in the standby state;
and the filtering module is connected with the judging module and is used for filtering the message information when the message information interrupts the standby state of the mobile terminal.
9. A mobile terminal, comprising: a processor and a memory, the memory having stored therein a computer program for executing the computer program to implement the message filtering method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, implements the message filtering method according to any one of claims 1-7.
CN202010591632.5A 2020-06-24 2020-06-24 Message filtering method, mobile terminal and computer readable storage medium Pending CN113840358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010591632.5A CN113840358A (en) 2020-06-24 2020-06-24 Message filtering method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010591632.5A CN113840358A (en) 2020-06-24 2020-06-24 Message filtering method, mobile terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113840358A true CN113840358A (en) 2021-12-24

Family

ID=78964766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010591632.5A Pending CN113840358A (en) 2020-06-24 2020-06-24 Message filtering method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113840358A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063946A (en) * 2022-03-28 2022-09-16 北京小米移动软件有限公司 Earthquake information reminding method and device, router, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624566A (en) * 2012-03-20 2012-08-01 华为技术有限公司 Method, device and system for waking up calling terminal
CN104221445A (en) * 2013-11-15 2014-12-17 华为终端有限公司 Method for waking up terminal system and terminal
CN105338177A (en) * 2015-09-30 2016-02-17 小米科技有限责任公司 Information delayed broadcasting method and device
CN105979088A (en) * 2016-05-06 2016-09-28 北京小米移动软件有限公司 Message pushing method and device
CN106055073A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Processing method and device based on screen-lighting lock
CN107231679A (en) * 2017-06-20 2017-10-03 维沃移动通信有限公司 A kind of data package processing method and mobile terminal
CN107734610A (en) * 2017-09-15 2018-02-23 维沃移动通信有限公司 Message treatment method, mobile terminal and computer-readable recording medium
WO2020029568A1 (en) * 2018-08-09 2020-02-13 华为技术有限公司 Sleep method and apparatus for terminal device
CN110881212A (en) * 2019-12-09 2020-03-13 Oppo广东移动通信有限公司 Method and device for saving power of equipment, electronic equipment and medium
CN113453321A (en) * 2020-03-27 2021-09-28 北京小米移动软件有限公司 Terminal wake-up processing method, device and medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624566A (en) * 2012-03-20 2012-08-01 华为技术有限公司 Method, device and system for waking up calling terminal
CN104221445A (en) * 2013-11-15 2014-12-17 华为终端有限公司 Method for waking up terminal system and terminal
WO2015070428A1 (en) * 2013-11-15 2015-05-21 华为终端有限公司 Method for waking up terminal system and terminal
CN105338177A (en) * 2015-09-30 2016-02-17 小米科技有限责任公司 Information delayed broadcasting method and device
US20170090683A1 (en) * 2015-09-30 2017-03-30 Xiaomi Inc. Method for reducing power consumption in electronic devices
CN105979088A (en) * 2016-05-06 2016-09-28 北京小米移动软件有限公司 Message pushing method and device
CN106055073A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Processing method and device based on screen-lighting lock
CN107231679A (en) * 2017-06-20 2017-10-03 维沃移动通信有限公司 A kind of data package processing method and mobile terminal
CN107734610A (en) * 2017-09-15 2018-02-23 维沃移动通信有限公司 Message treatment method, mobile terminal and computer-readable recording medium
WO2020029568A1 (en) * 2018-08-09 2020-02-13 华为技术有限公司 Sleep method and apparatus for terminal device
CN110881212A (en) * 2019-12-09 2020-03-13 Oppo广东移动通信有限公司 Method and device for saving power of equipment, electronic equipment and medium
CN113453321A (en) * 2020-03-27 2021-09-28 北京小米移动软件有限公司 Terminal wake-up processing method, device and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
M. JIMENO, K. CHRISTENSEN AND B. NORDMAN: "A Network Connection Proxy to Enable Hosts to Sleep and Save Energy", 《2008 IEEE INTERNATIONAL PERFORMANCE, COMPUTING AND COMMUNICATIONS CONFERENCE》, 9 January 2009 (2009-01-09) *
佚名: "一种报文过滤方法及装置、终端和可读存储介质与流程", Retrieved from the Internet <URL:《http://www.xjishu.com/zhuanli/62/201711105232.html》> *
田阳: "无线终端设备低功耗唤醒方法的研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, 15 February 2018 (2018-02-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063946A (en) * 2022-03-28 2022-09-16 北京小米移动软件有限公司 Earthquake information reminding method and device, router, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20220394610A1 (en) Power Consumption Control Method and Device
US11337151B2 (en) Low-power activation of accessory in sleep state
US10285128B2 (en) Method and apparatus for waking up devices in batches, and device
WO2018000134A1 (en) Bluetooth connection method and terminal
US8059570B2 (en) Mobile network device battery conservation system and methods
WO2021012714A1 (en) Bluetooth connection method and television
CN106874077A (en) process operation method and device
CN111935517B (en) Awakening method and device of intelligent set top box, electronic equipment and storage medium
WO2017076331A1 (en) Startup method and device
US10945207B2 (en) Beacon signal processing system and filtering method of reducing wake-up frequency
CN110602771A (en) Power consumption control method and device and vehicle networking terminal
CN113099521A (en) Dormancy awakening method and device of station, storage medium and electronic equipment
JP2004206580A (en) Electronic apparatus and power supply control method in it
CN113840358A (en) Message filtering method, mobile terminal and computer readable storage medium
CN112272332B (en) Awakening method and device of intelligent set top box, electronic equipment and storage medium
EP3666039B1 (en) Power saving in a computing device that includes multiple radios
CN113014898B (en) Projector wake-up control method, projector and readable storage medium
US10772041B2 (en) Beacon signal processing system
WO2021103893A1 (en) Wireless fidelity (wifi) chip control method and related device thereof
CN109379449B (en) Data connection method, device, terminal and storage medium
CN104093043B (en) Pushing video code stream terminal device power-economizing method based on cloud center and system
CN112118470A (en) Awakening method, device and system of set top box and electronic equipment
WO2024012275A1 (en) Notification processing method and apparatus, notification method and apparatus, and terminal and network-side device
WO2022111530A1 (en) Paging indication method and apparatus, terminal, network device and readable storage medium
WO2024002071A1 (en) Lp-wus-based paging method and apparatus, device, system, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination