CN107708194A - A kind of message filtering method and device, terminal and readable storage medium storing program for executing - Google Patents

A kind of message filtering method and device, terminal and readable storage medium storing program for executing Download PDF

Info

Publication number
CN107708194A
CN107708194A CN201711105232.3A CN201711105232A CN107708194A CN 107708194 A CN107708194 A CN 107708194A CN 201711105232 A CN201711105232 A CN 201711105232A CN 107708194 A CN107708194 A CN 107708194A
Authority
CN
China
Prior art keywords
data message
link layer
application program
message
unicast
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
CN201711105232.3A
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.)
Meizu Technology Co Ltd
Original Assignee
Meizu 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 Meizu Technology Co Ltd filed Critical Meizu Technology Co Ltd
Priority to CN201711105232.3A priority Critical patent/CN107708194A/en
Publication of CN107708194A publication Critical patent/CN107708194A/en
Pending legal-status Critical Current

Links

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
    • H04W52/0238Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is an unwanted signal, e.g. interference or idle 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/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0229Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a wanted signal
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to communication technical field, more particularly to a kind of message filtering method and device, terminal and readable storage medium storing program for executing.This method is:Data message is received, and judges the type of message of the data message in a link layer;When it is determined that the data message is unicast data message, it is based on default filtering rule in link layer and filtration treatment is carried out to the data message, and according to filter result, it is determined whether by the data message forwarding to corresponding application program.Using the above method, the judgement of type of message is carried out to the data message received on end link layer, and judge data message for unicast data message when, filtration treatment is carried out to unicast data message using default filtering rule, terminal system is avoided to be waken up by useless unicast data message, so as to reduce terminal CPU processing loads, terminal system power consumption is reduced.

Description

A kind of message filtering method and device, terminal and readable storage medium storing program for executing
Technical field
The present invention relates to communication technical field, more particularly to a kind of message filtering method and device, terminal and readable storage Medium.
Background technology
With the rapid development of information technology, the mobile Internet epoch bring, mobile phone, tablet personal computer etc. has become people A necessity in daily life, it is living that people can carry out social, shopping, office etc. by using mobile phone/tablet personal computer It is dynamic.Such as, people can receive mail by using mobile phone/tablet personal computer.Intelligent terminal greatly improves people's daily life Convenience.
At present, in mobile phone/panel computer system, not multicast data message, broadcasting data messages to receiving Or unicast data message etc. carries out filtration treatment, or, only in link layer to the multicast data message received and/or broadcast Data message carries out the filtering based on medium access control (Media Access Control, MAC) address, i.e., in a link layer Whether the target MAC (Media Access Control) address for judging the multicast data message and/or broadcasting data messages carrying received is mobile phone/tablet personal computer The MAC Address of itself, if so, then receiving the multicast data message and/or broadcasting data messages, and it is based on the multicast data message And/or the destination interface that broadcasting data messages carry transmits the multicast data message and/or broadcasting data messages to corresponding Application program (Application, APP);Otherwise, the multicast data message and/or broadcasting data messages are abandoned.
However, in current mobile phone/panel computer system, do not received for the WIFI chips of mobile phone/tablet personal computer The unicast data message arrived carries out filtration treatment, then, when WIFI chips often receive a unicast data message, it is both needed to wake up Mobile phone/panel computer system carries out subsequent treatment, and has some unicast data messages without corresponding APP receptions, to It is insignificant unicast data message for family, so, may result in mobile phone/panel computer system by insignificant unicast data Message wakes up, and increases mobile phone/tablet personal computer CPU processing load, adds system power dissipation.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of message filtering method and device, terminal and readable storage medium storing program for executing, uses The problem of load is big, and system power dissipation is high is handled to solve mobile phone CPU present in prior art.
The concrete technical scheme provided in the embodiment of the present invention is as follows:
A kind of message filtering method, including:
Data message is received, and judges the type of message of the data message in a link layer;
When it is determined that the data message is unicast data message, default filtering rule is based on to the number in link layer Filtration treatment is carried out according to message, and according to filter result, it is determined whether by the data message forwarding to corresponding application program.
Preferably, judging the type of message of the data message in a link layer, specifically include:
The purpose IP address and/or MAC Address carried in a link layer based on the data message received, determines the number According to the type of message of message, wherein, the type of message is multicast data message, broadcasting data messages or unicast data message.
Preferably, the mode for presetting the filtering rule comprises at least following one kind:
White list map listing is set in the link layer in advance, wherein, it is stored with the white list map listing Allow to receive the mapping relations between the application program and its used port numbers of unicast data message;Or
Blacklist map listing is set in the link layer in advance, wherein, it is stored with the blacklist map listing Forbid receiving the mapping relations between the application program and its used port numbers of unicast data message.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether by the data message forwarding to corresponding application program, specifically include:
If being provided with white list map listing in the link layer, the destination interface that the data message carries is obtained Number;And
Judge whether to be stored with the destination slogan in the white list map listing with using the destination slogan The mapping relations between the application program of data message are received, if judged result is no, abandon the data message;
If the determination result is YES, then continue to judge whether the destination slogan has activated, if the determination result is YES, then will The data message forwarding is to the corresponding application program of the destination slogan;
Otherwise, the data message is abandoned.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether by the data message forwarding to corresponding application program, specifically include:
If being provided with blacklist map listing in the link layer, the destination interface that the data message carries is obtained Number;And
Judge whether to be stored with the destination slogan in the blacklist map listing with using the destination slogan The mapping relations between the application program of data message are received, if the determination result is YES, then abandon the data message, otherwise, By the data message forwarding to the corresponding application program of the destination slogan.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether by the data message forwarding to corresponding application program, specifically include:
Whether the number for the unicast data message for judging to receive in preset duration is more than or equal to the first given threshold, If the determination result is YES, then the data message is abandoned, otherwise, the destination slogan carried based on the data message, by institute Data message forwarding is stated to corresponding application program;And/or
Judge whether the number that terminal system is waken up in preset duration is more than or equal to the second given threshold, if judging As a result it is yes, then abandons the data message, otherwise, the destination slogan carried based on the data message, by the data Message is forwarded to corresponding application program.
A kind of packet filtering device, including:
Judging unit, for receiving data message, and the type of message of the data message is judged in a link layer;
Filter element, for when it is determined that the data message is unicast data message, default mistake to be based in link layer Filter rule carries out filtration treatment to the data message, and according to filter result, it is determined whether by the data message forwarding extremely Corresponding application program.
Preferably, when judging the type of message of the data message in a link layer, the judging unit is specifically used for:
The purpose IP address and/or MAC Address carried in a link layer based on the data message received, determines the number According to the type of message of message, wherein, the type of message is multicast data message, broadcasting data messages or unicast data message.
Preferably, the mode for presetting the filtering rule comprises at least following one kind:
White list map listing is set in the link layer in advance, wherein, it is stored with the white list map listing Allow to receive the mapping relations between the application program and its used port numbers of unicast data message;Or
Blacklist map listing is set in the link layer in advance, wherein, it is stored with the blacklist map listing Forbid receiving the mapping relations between the application program and its used port numbers of unicast data message.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether during by the data message forwarding to corresponding application program, the filter element is specifically used for:
If being provided with white list map listing in the link layer, the destination interface that the data message carries is obtained Number;And
Judge whether to be stored with the destination slogan in the white list map listing with using the destination slogan The mapping relations between the application program of data message are received, if judged result is no, abandon the data message;
If the determination result is YES, then continue to judge whether the destination slogan has activated, if the determination result is YES, then will The data message forwarding is to the corresponding application program of the destination slogan;
Otherwise, the data message is abandoned.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether during by the data message forwarding to corresponding application program, the filter element is specifically used for:
If being provided with blacklist map listing in the link layer, the destination interface that the data message carries is obtained Number;And
Judge whether to be stored with the destination slogan in the blacklist map listing with using the destination slogan The mapping relations between the application program of data message are received, if the determination result is YES, then abandon the data message, otherwise, By the data message forwarding to the corresponding application program of the destination slogan.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether during by the data message forwarding to corresponding application program, the filter element is specifically used for:
Whether the number for the unicast data message for judging to receive in preset duration is more than or equal to the first given threshold, If the determination result is YES, then the data message is abandoned, otherwise, the destination slogan carried based on the data message, by institute Data message forwarding is stated to corresponding application program;And/or
Judge whether the number that described device system is waken up in preset duration is more than or equal to the second given threshold, if Judged result is yes, then abandons the data message, otherwise, the destination slogan carried based on the data message, by described in Data message forwarding is to corresponding application program.
A kind of terminal, the terminal include processor, and the processor is used to perform the computer journey stored in memory Realized during sequence such as the step of above-mentioned any one method.
A kind of readable storage medium storing program for executing, is stored thereon with computer program (instruction), and the computer program (instruction) is located Manage when device performs and realize such as the step of above-mentioned any one method.
The present invention has the beneficial effect that:
In summary, in the embodiment of the present invention, during packet filtering is carried out, data message is received, and in link The type of message of the data message is judged in layer;When it is determined that the data message is unicast data message, in link layer base Filtration treatment is carried out to the data message in default filtering rule, and according to filter result, it is determined whether by the data Message is forwarded to corresponding application program.
Using the above method, the judgement of type of message is carried out to the data message received on end link layer, and Judge data message for unicast data message when, using default filtering rule to unicast data message carry out filtration treatment, keep away Exempt from terminal system to be waken up by useless unicast data message, so as to reduce terminal CPU processing loads, reduce terminal system Power consumption.
Brief description of the drawings
Fig. 1 is a kind of detail flowchart of message filtering method in the embodiment of the present invention;
Fig. 2 is a kind of structural representation of packet filtering device in the embodiment of the present invention.
Embodiment
The problem of load is big, and system power dissipation is high is handled in order to solve mobile phone CPU present in prior art, the present invention is implemented A kind of new message filtering method and device are provided in example, this method is:Data message is received, and judges institute in a link layer State the type of message of data message;When it is determined that the data message is unicast data message, default mistake is based in link layer Filter rule carries out filtration treatment to the data message, and according to filter result, it is determined whether by the data message forwarding extremely Corresponding application program.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, is not whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
The solution of the present invention will be described in detail by specific embodiment below, certainly, the present invention be not limited to Lower embodiment.
As shown in fig.1, in the embodiment of the present invention, a kind of detailed process of message filtering method is as follows:
Step 100:Data message is received, and judges the type of message of above-mentioned data message in a link layer.
Specifically, in the embodiment of the present invention, when performing step 100, terminal passes through local communication chip (e.g., Wifi Module) reception data message, and the purpose IP address carried in a link layer based on the data message received and/or MAC Location, determine the type of message of above-mentioned data message, wherein, above-mentioned type of message be multicast data message, broadcasting data messages or Unicast data message.
In practical application, IP network data transfer mode includes unicast transmission, multicast transmission and broadcast three kinds of modes of transmission, Wherein, source terminal uses the data message that unicast transmission mode is sent accordingly, source terminal uses multicast for unicast data message The data message that transmission means is sent is multicast data message, and the data message that source terminal uses broadcast transmission methods to send is wide Multicast data message.At least carried in any one data message that source terminal is sent by IP network data transfer mode corresponding The information such as source port number, source IP address, destination slogan, purpose IP address and target MAC (Media Access Control) address.So, the present invention is implemented In example, purpose terminal is when receiving data message, you can according to the purpose IP address of data message carrying and/or MAC Determine that the data type of the data message is unicast data message, multicast data message or broadcasting data messages in location.
For example, it is assumed that the IP address of terminal 1 is IP1, terminal 1 obtains data message 1 and taken when receiving data message 1 The purpose IP address of band, if it is determined that above-mentioned purpose IP address is IP1, then the data type for judging data message 1 is unicast data Message.
In another example, it is assumed that the multicast ip address of the multicast group where terminal 1 is IP2, and terminal 1 is receiving data message 2 When, the purpose IP address that data message 2 carries is obtained, if it is determined that above-mentioned purpose IP address is IP2, then judges data message 2 Data type is multicast data message.
In another example, it is assumed that after the data message 3 that terminal 1 receives, the purpose IP that is carried in the data message 3 got Location is a broadcast address, then the data type for judging data message 3 is broadcasting data messages.
Step 110:When it is determined that above-mentioned data message is unicast data message, default filtering rule is based in link layer Filtration treatment is carried out to above-mentioned data message, and according to filter result, it is determined whether by above-mentioned data message forwarding to corresponding Application program.
In the embodiment of the present invention, for unicast data message, terminal is preset with corresponding unicast data report in a link layer Literary filtering rule, specifically, the mode for presetting the filtering rule includes but is not limited to any one in the following manner or combination:
First way is:White list map listing is set in above-mentioned link layer in advance, wherein, above-mentioned white list mapping The mapping relations being stored with list between the application program and its used port numbers that allow reception unicast data message.
If being preset with the filtering rule of above-mentioned first way in end link layer, terminal is it is determined that the data received When the type of message of message is unicast data message, above-mentioned data message was carried out based on default filtering rule in link layer Filter is handled, and according to filter result, it is determined whether the detailed process by above-mentioned data message forwarding to corresponding application program is: If being provided with white list map listing in above-mentioned link layer, the destination slogan that above-mentioned data message carries is obtained;And judge Whether above-mentioned purpose port numbers are stored with above-mentioned white list map listing with receiving data message using above-mentioned purpose port numbers Application program between mapping relations, if judged result is no, abandon above-mentioned data message;If the determination result is YES, then Continue to judge whether above-mentioned purpose port numbers have activated, if the determination result is YES, then by above-mentioned data message forwarding to above-mentioned mesh The corresponding application program of port numbers;Otherwise, above-mentioned data message is abandoned.
In practical application, the transmitting-receiving of different port progress data messages can be used in the different application in terminal, that , you can determine to need by the datagram by the destination slogan for judging to carry in the data message that receives in link layer Text is forwarded to specific application program, preferably, in the embodiment of the present invention, is preset with corresponding white list mapping in a link layer List, the mapping characterized between port used in each application program for allowing to receive unicast data message and each application program are closed System.
Further, source terminal to purpose terminal send unicast data message before, it is necessary to first establish one individually Data channel, now, it is waiting that port in purpose terminal corresponding to the application program of the unicast data message to be received is in etc. Receive the state of data, i.e. state of activation, then, in the embodiment of the present invention, when receiving a unicast data message, according to this The destination slogan that one unicast data message carries, determines whether a unicast data message is useless unicast data Message (judge whether that corresponding application program is to be received, it is useful if to be received in the presence of corresponding application program;If It is to be received in the absence of corresponding application program, then useless), if it is determined that being useful unicast data message, then by a unicast Data message forwarding is to corresponding application program;Otherwise, a unicast data message is abandoned.
Carried specifically, a unicast data message in default white list map listing in judging link layer be present Destination slogan and data message is received using the destination slogan application program between mapping relations, and the destination When mouth is active, it is useful data message to determine a unicast data message.
The second way is:Blacklist map listing is set in above-mentioned link layer in advance, wherein, above-mentioned blacklist mapping The mapping relations being stored with list between the application program and its used port numbers of forbidding reception unicast data message.
If being preset with the filtering rule of above-mentioned first way in end link layer, terminal is it is determined that the data received When the type of message of message is unicast data message, above-mentioned data message was carried out based on default filtering rule in link layer Filter is handled, and according to filter result, it is determined whether the detailed process by above-mentioned data message forwarding to corresponding application program is: If being provided with blacklist map listing in above-mentioned link layer, the destination slogan that above-mentioned data message carries is obtained;And judge Whether above-mentioned purpose port numbers are stored with above-mentioned blacklist map listing with receiving data message using above-mentioned purpose port numbers Application program between mapping relations, if the determination result is YES, then above-mentioned data message is abandoned, otherwise, by above-mentioned datagram Text is forwarded to the corresponding application program of above-mentioned purpose port numbers.
In practical application, it can be filtered out in a link layer by way of blacklist map listing is set in a link layer The unicast data message of some in terminal/multiple application programs is sent to, i.e., is made said one/multiple application programs with it Mapping relations between port are stored in the blacklist map listing into link layer, and terminal is receiving any carrying When destination slogan is the unicast data message of a port in blacklist map listing, any unicast data report is abandoned Text.
For example, it is assumed that application program 1 and its port 1 used are stored with link layer in default blacklist map listing Between mapping relations, then, terminal when receiving a unicast data message, judge its carry destination slogan be Port 1, then directly abandon a unicast data message.
Certainly, in the embodiment of the present invention, the setting of filtering rule can be according to different user and/or different application scene not Relative set is carried out with demand, in the embodiment of the present invention, is not specifically limited herein.
Optionally, in order to avoid terminal communicates too frequent in dormancy, terminal system is waken up often and caused end Hold power consumption big, corresponding filtering rule can also be set in the embodiment of the present invention in end link layer, to avoid power consumption of terminal The problem of big.
Preferably, the unicast data message that end link layer receives in preset duration can be judged by statistical result Number whether be more than or equal to the first given threshold, if the determination result is YES, then abandon above-mentioned data message, otherwise, be based on The destination slogan that above-mentioned data message carries, by above-mentioned data message forwarding to corresponding application program.
Certainly, in the embodiment of the present invention, the number of unicast data message that terminal receives can be directed to and set corresponding the One given threshold, it can also be directed to the number difference for the unicast data message for being respectively sent to each application program that terminal receives Set corresponding first given threshold, in the embodiment of the present invention, be not specifically limited herein.
For example, it is assumed that default first given threshold is 100 in a link layer, then, judging in a nearest hour When the number of the unicast data message received is 100, subsequently received unicast data message is directly abandoned.
In another example, it is assumed that for default first given threshold of application program 1 be 20, then, judge it is nearest one small When the interior transmission received to application program 1 unicast data message number be 20 when, by subsequently received transmission to apply The unicast data packet loss of program 1;Assuming that it is 15 for default first given threshold of application program 2, then, judging most When the transmission received in a nearly hour to the unicast data message number of application program 1 is 16, by subsequently received hair Deliver to the unicast data packet loss of application program 2.
Preferably, in the embodiment of the present invention, it can judge that in preset duration terminal system is waken up by statistical result Whether number is more than or equal to the second given threshold, if the determination result is YES, then above-mentioned data message is abandoned, otherwise, based on upper The destination slogan of data message carrying is stated, by above-mentioned data message forwarding to corresponding application program.
For example, it is assumed that default second given threshold is 50 in a link layer, then, judging in a nearest hour eventually When the number that end system is waken up is 50, subsequently received unicast data message is directly abandoned, to avoid terminal system frequency Numerous be waken up and cause power consumption big.
Based on above-described embodiment, as shown in fig.2, in the embodiment of the present invention, a kind of packet filtering device, including at least sentencing Disconnected unit 20 and filter element 21, wherein,
Judging unit 20, for receiving data message, and the type of message of the data message is judged in a link layer;
Filter element 21, for when it is determined that the data message is unicast data message, being based in link layer default Filtering rule carries out filtration treatment to the data message, and according to filter result, it is determined whether by the data message forwarding To corresponding application program.
Preferably, when judging the type of message of the data message in a link layer, the judging unit 20 is specifically used for:
The purpose IP address and/or MAC Address carried in a link layer based on the data message received, determines the number According to the type of message of message, wherein, the type of message is multicast data message, broadcasting data messages or unicast data message.
Preferably, the mode for presetting the filtering rule comprises at least following one kind:
White list map listing is set in the link layer in advance, wherein, it is stored with the white list map listing Allow to receive the mapping relations between the application program and its used port numbers of unicast data message;Or
Blacklist map listing is set in the link layer in advance, wherein, it is stored with the blacklist map listing Forbid receiving the mapping relations between the application program and its used port numbers of unicast data message.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether during by the data message forwarding to corresponding application program, the filter element 21 is specifically used for:
If being provided with white list map listing in the link layer, the destination interface that the data message carries is obtained Number;And
Judge whether to be stored with the destination slogan in the white list map listing with using the destination slogan The mapping relations between the application program of data message are received, if judged result is no, abandon the data message;
If the determination result is YES, then continue to judge whether the destination slogan has activated, if the determination result is YES, then will The data message forwarding is to the corresponding application program of the destination slogan;
Otherwise, the data message is abandoned.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether during by the data message forwarding to corresponding application program, the filter element 21 is specifically used for:
If being provided with blacklist map listing in the link layer, the destination interface that the data message carries is obtained Number;And
Judge whether to be stored with the destination slogan in the blacklist map listing with using the destination slogan The mapping relations between the application program of data message are received, if the determination result is YES, then abandon the data message, otherwise, By the data message forwarding to the corresponding application program of the destination slogan.
Preferably, be based on default filtering rule in link layer carries out filtration treatment to the data message, and according to mistake Filter result, it is determined whether during by the data message forwarding to corresponding application program, the filter element 21 is specifically used for:
Whether the number for the unicast data message for judging to receive in preset duration is more than or equal to the first given threshold, If the determination result is YES, then the data message is abandoned, otherwise, the destination slogan carried based on the data message, by institute Data message forwarding is stated to corresponding application program;And/or
Judge whether the number that described device system is waken up in preset duration is more than or equal to the second given threshold, if Judged result is yes, then abandons the data message, otherwise, the destination slogan carried based on the data message, by described in Data message forwarding is to corresponding application program.
In summary, in the embodiment of the present invention, during packet filtering is carried out, data message is received, and in link The type of message of the data message is judged in layer;When it is determined that the data message is unicast data message, in link layer base Filtration treatment is carried out to the data message in default filtering rule, and according to filter result, it is determined whether by the data Message is forwarded to corresponding application program.
Using the above method, the judgement of type of message is carried out to the data message received on end link layer, and Judge data message for unicast data message when, using default filtering rule to unicast data message carry out filtration treatment, keep away Exempt from terminal system to be waken up by useless unicast data message, so as to reduce terminal CPU processing loads, reduce terminal system Power consumption.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without departing from this hair to the embodiment of the present invention The spirit and scope of bright embodiment.So, if these modifications and variations of the embodiment of the present invention belong to the claims in the present invention And its within the scope of equivalent technologies, then the present invention is also intended to comprising including these changes and modification.

Claims (10)

  1. A kind of 1. message filtering method, it is characterised in that including:
    Data message is received, and judges the type of message of the data message in a link layer;
    When it is determined that the data message is unicast data message, default filtering rule is based on to the datagram in link layer Text carries out filtration treatment, and according to filter result, it is determined whether by the data message forwarding to corresponding application program.
  2. 2. the method as described in claim 1, it is characterised in that the type of message of the data message is judged in a link layer, Specifically include:
    The purpose IP address and/or MAC Address carried in a link layer based on the data message received, determines the datagram The type of message of text, wherein, the type of message is multicast data message, broadcasting data messages or unicast data message.
  3. 3. method as claimed in claim 1 or 2, it is characterised in that preset the mode of the filtering rule including at least following It is a kind of:
    White list map listing is set in the link layer in advance, wherein, it is stored with permission in the white list map listing Receive the mapping relations between the application program and its used port numbers of unicast data message;Or
    Blacklist map listing is set in the link layer in advance, wherein, it is stored with and forbids in the blacklist map listing Receive the mapping relations between the application program and its used port numbers of unicast data message.
  4. 4. method as claimed in claim 3, it is characterised in that be based on default filtering rule to the datagram in link layer Text carries out filtration treatment, and according to filter result, it is determined whether by the data message forwarding to corresponding application program, specifically Including:
    If being provided with white list map listing in the link layer, the destination slogan that the data message carries is obtained;And
    Judge whether to be stored with the destination slogan in the white list map listing with being received using the destination slogan Mapping relations between the application program of data message, if judged result is no, abandon the data message;
    If the determination result is YES, then continue to judge whether the destination slogan has activated, if the determination result is YES, then by described in Data message forwarding is to the corresponding application program of the destination slogan;
    Otherwise, the data message is abandoned.
  5. 5. method as claimed in claim 3, it is characterised in that be based on default filtering rule to the datagram in link layer Text carries out filtration treatment, and according to filter result, it is determined whether by the data message forwarding to corresponding application program, specifically Including:
    If being provided with blacklist map listing in the link layer, the destination slogan that the data message carries is obtained;And
    Judge whether to be stored with the destination slogan in the blacklist map listing with being received using the destination slogan Mapping relations between the application program of data message, if the determination result is YES, then the data message is abandoned, otherwise, by institute Data message forwarding is stated to the corresponding application program of the destination slogan.
  6. 6. method as claimed in claim 1 or 2, it is characterised in that be based on default filtering rule to the number in link layer Filtration treatment is carried out according to message, and according to filter result, it is determined whether by the data message forwarding to corresponding application program, Specifically include:
    Whether the number for the unicast data message for judging to receive in preset duration is more than or equal to the first given threshold, if sentencing Disconnected result is yes, then abandons the data message, otherwise, the destination slogan carried based on the data message, by the number Corresponding application program is forwarded to according to message;And/or
    Judge whether the number that terminal system is waken up in preset duration is more than or equal to the second given threshold, if judged result It is yes, then abandons the data message, otherwise, the destination slogan carried based on the data message, by the data message It is forwarded to corresponding application program.
  7. A kind of 7. packet filtering device, it is characterised in that including:
    Judging unit, for receiving data message, and the type of message of the data message is judged in a link layer;
    Filter element, for when it is determined that the data message is unicast data message, being based on default filtering in link layer and advising Filtration treatment then is carried out to the data message, and according to filter result, it is determined whether by the data message forwarding to corresponding Application program.
  8. 8. device as claimed in claim 7, it is characterised in that the mode for presetting the filtering rule is comprised at least with next Kind:
    White list map listing is set in the link layer in advance, wherein, it is stored with permission in the white list map listing Receive the mapping relations between the application program and its used port numbers of unicast data message;Or
    Blacklist map listing is set in the link layer in advance, wherein, it is stored with and forbids in the blacklist map listing Receive the mapping relations between the application program and its used port numbers of unicast data message.
  9. 9. a kind of terminal, it is characterised in that the terminal includes processor, and the processor is used to perform what is stored in memory The step of any one methods described in such as claim 1-6 is realized during computer program.
  10. 10. a kind of readable storage medium storing program for executing, it is stored thereon with computer program (instruction), it is characterised in that:The computer program The step of any one methods described in such as claim 1-6 is realized when (instruction) is executed by processor.
CN201711105232.3A 2017-11-10 2017-11-10 A kind of message filtering method and device, terminal and readable storage medium storing program for executing Pending CN107708194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711105232.3A CN107708194A (en) 2017-11-10 2017-11-10 A kind of message filtering method and device, terminal and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711105232.3A CN107708194A (en) 2017-11-10 2017-11-10 A kind of message filtering method and device, terminal and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN107708194A true CN107708194A (en) 2018-02-16

Family

ID=61179008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711105232.3A Pending CN107708194A (en) 2017-11-10 2017-11-10 A kind of message filtering method and device, terminal and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN107708194A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600110A (en) * 2018-04-24 2018-09-28 新华三技术有限公司 A kind of PIM message processing methods and device
CN108984319A (en) * 2018-06-25 2018-12-11 广州视源电子科技股份有限公司 Method, device, computer equipment and storage medium for solving operation instruction conflict
CN109714716A (en) * 2019-02-01 2019-05-03 Oppo广东移动通信有限公司 Data packet forwarding method, device and mobile terminal
CN112261618A (en) * 2020-09-29 2021-01-22 南京航空航天大学 ZigBee-based communication method between multiple four-rotor aircrafts
CN114258044A (en) * 2020-09-25 2022-03-29 华为技术有限公司 Standby method, system and terminal equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474563A (en) * 2002-08-06 2004-02-11 ��Ϊ�������޹�˾ Repeating method for multi-broadcast message in network communication
CN101321072A (en) * 2008-07-21 2008-12-10 华为技术有限公司 Network awakening method, device and equipment
WO2009072721A1 (en) * 2007-12-03 2009-06-11 Electronics And Telecommunications Research Institute Apparatus and method for broadcasting data, and apparatus and method for broadcasting response data, of sensor node in wireless sensor network system
CN103368850A (en) * 2013-07-16 2013-10-23 杭州华三通信技术有限公司 Method and device for processing unicast message with unknown destination
CN103428108A (en) * 2013-08-07 2013-12-04 大唐移动通信设备有限公司 Data frame processing method and device
CN104221445A (en) * 2013-11-15 2014-12-17 华为终端有限公司 Method for waking up terminal system and terminal
CN105530179A (en) * 2014-09-29 2016-04-27 杭州华三通信技术有限公司 Data message processing method and network equipment
CN106385450A (en) * 2016-09-13 2017-02-08 宇龙计算机通信科技(深圳)有限公司 Data filtering method and system
CN107294863A (en) * 2017-06-22 2017-10-24 深圳市泰信通信息技术有限公司 Network data stream forwarding method, device, system and readable storage medium storing program for executing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474563A (en) * 2002-08-06 2004-02-11 ��Ϊ�������޹�˾ Repeating method for multi-broadcast message in network communication
WO2009072721A1 (en) * 2007-12-03 2009-06-11 Electronics And Telecommunications Research Institute Apparatus and method for broadcasting data, and apparatus and method for broadcasting response data, of sensor node in wireless sensor network system
CN101321072A (en) * 2008-07-21 2008-12-10 华为技术有限公司 Network awakening method, device and equipment
CN103368850A (en) * 2013-07-16 2013-10-23 杭州华三通信技术有限公司 Method and device for processing unicast message with unknown destination
CN103428108A (en) * 2013-08-07 2013-12-04 大唐移动通信设备有限公司 Data frame processing method and device
CN104221445A (en) * 2013-11-15 2014-12-17 华为终端有限公司 Method for waking up terminal system and terminal
CN105530179A (en) * 2014-09-29 2016-04-27 杭州华三通信技术有限公司 Data message processing method and network equipment
CN106385450A (en) * 2016-09-13 2017-02-08 宇龙计算机通信科技(深圳)有限公司 Data filtering method and system
CN107294863A (en) * 2017-06-22 2017-10-24 深圳市泰信通信息技术有限公司 Network data stream forwarding method, device, system and readable storage medium storing program for executing

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600110A (en) * 2018-04-24 2018-09-28 新华三技术有限公司 A kind of PIM message processing methods and device
CN108600110B (en) * 2018-04-24 2020-12-29 新华三技术有限公司 PIM message processing method and device
CN108984319A (en) * 2018-06-25 2018-12-11 广州视源电子科技股份有限公司 Method, device, computer equipment and storage medium for solving operation instruction conflict
CN108984319B (en) * 2018-06-25 2021-10-15 广州视源电子科技股份有限公司 Method, device, computer equipment and storage medium for solving operation instruction conflict
CN109714716A (en) * 2019-02-01 2019-05-03 Oppo广东移动通信有限公司 Data packet forwarding method, device and mobile terminal
CN114258044A (en) * 2020-09-25 2022-03-29 华为技术有限公司 Standby method, system and terminal equipment
CN112261618A (en) * 2020-09-29 2021-01-22 南京航空航天大学 ZigBee-based communication method between multiple four-rotor aircrafts
CN112261618B (en) * 2020-09-29 2022-04-08 南京航空航天大学 ZigBee-based communication method between multiple four-rotor aircrafts

Similar Documents

Publication Publication Date Title
CN107708194A (en) A kind of message filtering method and device, terminal and readable storage medium storing program for executing
EP3627863B1 (en) Cell reselection method and related device
CN109792684A (en) UE is set to keep waking up
CN103782527B (en) A kind of serve the base station of one or more groups of machine to machine device, machine to machine device and information processing system
US11240640B2 (en) Multicast bearer management method and terminal device
US8892137B2 (en) Method and apparatus for optimizing CBS service in a multiple SIM environment
CN107613576B (en) Method and system for configuring receiving state parameters of terminal of Internet of things
CN107113586A (en) For improving the system and method that the SIM of many SIM devices recovers from non-service state based on User Activity
CN103491511B (en) A kind of method for sending information and device
US20120202492A1 (en) Method and apparatus for enabling identification of a rejecting network in connection with registration area updating
US8948131B2 (en) Radio communication system, radio communication method, and gateway
WO2017201931A1 (en) Method and device for reducing power consumption of terminal, and smart card
CN105163374B (en) The processing of mobile-terminated data over signaling message
KR20150094756A (en) Device discovery method, apparatus and system
WO2010118357A1 (en) Paging groups of access terminals in a wireless communications system
WO2017219508A1 (en) Communication method and apparatus for multi-mode terminal
CN106961727A (en) A kind of paging and its control method and device
CN102882763A (en) Method and device for implementing community union
CN109587677A (en) Restoration methods, terminal, base station and the equipment of the core network of Data Radio Bearer
CN108810927A (en) A kind of processing method and system of scheduling request
CN106961688B (en) A kind of transmission method and device of paging message
CN102264118A (en) Method and device for realizing accessing MTC (machine-type communication) terminal
CN102868819B (en) A kind of process the method and device of communication service under common account
CN101877885B (en) The control method of terminal work mode
US11700189B2 (en) Method for performing task processing on common service entity, common service entity, apparatus and medium for task processing

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180216