WO2016177148A1 - Short message interception method and device - Google Patents

Short message interception method and device Download PDF

Info

Publication number
WO2016177148A1
WO2016177148A1 PCT/CN2016/076791 CN2016076791W WO2016177148A1 WO 2016177148 A1 WO2016177148 A1 WO 2016177148A1 CN 2016076791 W CN2016076791 W CN 2016076791W WO 2016177148 A1 WO2016177148 A1 WO 2016177148A1
Authority
WO
WIPO (PCT)
Prior art keywords
short message
spam
template
frequency
intercepting
Prior art date
Application number
PCT/CN2016/076791
Other languages
French (fr)
Chinese (zh)
Inventor
伏晓海
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016177148A1 publication Critical patent/WO2016177148A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/128Anti-malware arrangements, e.g. protection against SMS fraud or mobile malware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud

Abstract

Disclosed is a short message interception method. Receiving a short message and acquiring the characteristic vectors of the short message; according to the characteristic vectors of the short message, searching for a short message spam template matching the short message; according to the short message spam template matching the short message and pre-set filtering conditions, using a corresponding interception frequency scheme to intercept the short message. Also disclosed is a short message interception device. The present invention performs interceptions using different schemes for different types of short messages, thereby implementing differentiated short message interception and satisfying the needs of service providers.

Description

短信拦截方法和装置SMS interception method and device 技术领域Technical field
本发明涉及通信领域,尤其涉及一种短信拦截方法和装置。The present invention relates to the field of communications, and in particular, to a short message intercepting method and apparatus.
背景技术Background technique
随着通信业务的发展,短信业务因价格便宜、形式新颖、方便快捷,赢得了广大用户的青睐。但是,随着短信服务的被广泛使用,垃圾短信问题也愈演愈烈,大量不法用户或商家借助短信平台发送广告信息、诈骗信息和恶意骚扰短信等。垃圾短信的泛滥,不但扰乱了用户正常的通信生活,还可能会给用户带来金钱上的损失。With the development of communication services, SMS services have won the favor of customers because of their low price, novel form, convenient and fast. However, with the widespread use of SMS services, the problem of spam messages has intensified. A large number of unscrupulous users or merchants use SMS platforms to send advertising messages, fraudulent messages and malicious harassment messages. The proliferation of spam messages not only disrupts the normal communication life of users, but also may cause financial losses to users.
为解决垃圾短信给用户带来的困扰,运营商一般使用垃圾短信系统对垃圾短信进行拦截。运营商对不同类型的垃圾短信,实际的拦截需求是不同的。例如,对于诈骗类和谣言传播类等影响恶劣的短信,需严格拦截;对于商业广告类或通知类的短信,可以使用较为宽泛的拦截策略。但是,目前的垃圾短信拦截系统配置单一,针对所有收到的垃圾短信均采用同种拦截策略,不能满足运营商的需求。In order to solve the problem that spam messages bring to users, operators generally use spam messages to intercept spam messages. The actual interception requirements of operators for different types of spam messages are different. For example, for badly-spoken text messages such as fraud and rumor communication, it needs to be strictly intercepted; for commercial advertisements or notifications, you can use a wider interception strategy. However, the current spam message interception system has a single configuration, and all the received spam messages are all adopted the same interception strategy, which cannot meet the needs of operators.
发明内容Summary of the invention
本发明实施例的主要目的在于提供一种短信拦截方法和装置,旨在解决短信拦截策略单一的技术问题。The main purpose of the embodiment of the present invention is to provide a short message intercepting method and device, which aims to solve the single technical problem of the short message intercepting strategy.
为实现上述目的,本发明实施例提供一种短信拦截方法,所述短信拦截方法包括以下步骤:To achieve the above objective, an embodiment of the present invention provides a short message intercepting method, where the short message intercepting method includes the following steps:
接收短信,并获取所述短信的特征向量;Receiving a short message and obtaining a feature vector of the short message;
根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板;Searching for a spam template matching the short message according to the feature vector of the short message;
根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。And according to the spam template matched with the short message, and the preset filtering condition, the short message is intercepted by using a corresponding intercept frequency policy.
在本发明实施例中,所述预设的过滤条件包括:短信的主叫号码、被叫号码和发送时间,所述接收短信,并获取所述短信的特征向量的步骤之前,包括:In the embodiment of the present invention, the preset filtering condition includes: a calling number, a called number, and a sending time of the short message, and the step of receiving the short message and acquiring the feature vector of the short message includes:
获取用户输入的垃圾短信模板和垃圾短信模板的类型;Obtain the type of spam template and spam template input by the user;
根据所述用户输入的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置拦截 频次策略;Intercepting according to the type of the spam template input by the user, the calling number, the called number, and the sending time period Frequency strategy
获取所述用户输入的垃圾短信模板的特征向量;Obtaining a feature vector of the spam template input by the user;
根据所述垃圾短信模板的特征向量,筛选出具有相同特征向量的垃圾短信模板,形成列表供查找。According to the feature vector of the spam message template, the spam message templates with the same feature vector are filtered out to form a list for searching.
在本发明实施例中,所述根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板的步骤包括:In the embodiment of the present invention, the step of searching for a spam message template matching the short message according to the feature vector of the short message includes:
根据所述短信的特征向量,查找具有相同特征向量的垃圾短信模板列表;Finding a list of spam short message templates having the same feature vector according to the feature vector of the short message;
若找到具有相同特征向量的垃圾短信模板列表,则获取所述垃圾短信模板列表中,与所述短信的相似度最大的垃圾短信模板;If a spam short message template list having the same feature vector is found, obtaining a spam short message template having the greatest similarity with the short message in the spam short message template list;
判断所述最大相似度是否满足阈值;Determining whether the maximum similarity meets a threshold;
若所述最大相似度满足阈值,则获取与所述短信的相似度最大的垃圾短信模板,作为与所述短信匹配的垃圾短信模板。If the maximum similarity satisfies the threshold, the spam template with the greatest similarity with the short message is obtained as a spam template matching the short message.
在本发明实施例中,所述根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板的步骤之后,还包括:In the embodiment of the present invention, after the step of searching for the spam message template matching the short message according to the feature vector of the short message, the method further includes:
若未找到与所述短信匹配的垃圾短信模板,则采用默认的垃圾短信模板对所述短信进行拦截处理。If the spam template matching the short message is not found, the default spam template is used to intercept the short message.
在本发明实施例中,所述根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理的步骤包括:In the embodiment of the present invention, the step of intercepting the short message by using a corresponding interception frequency policy according to the spam short message template matched with the short message and the preset filtering condition includes:
获取与所述短信匹配的垃圾短信模板的类型;Obtaining a type of spam template that matches the short message;
将与所述短信匹配的垃圾短信模板的类型作为所述短信的类型;The type of the spam template matched with the short message is used as the type of the short message;
根据所述短信的类型,以及预设的过滤条件,获取相应的拦截频次策略;Obtaining a corresponding interception frequency policy according to the type of the short message and the preset filtering condition;
根据所述短信的类型和主叫号码,获取所述主叫号码发送此类型短信的发送频次;Obtaining, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number;
判断所述主叫号码发送此类型短信的发送频次是否超过所述拦截频次策略的拦截频次;Determining whether the sending frequency of the calling number sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy;
若所述主叫号码发送此类型短信的发送频次超过所述拦截频次策略的拦截频次,则拦截所述短信;If the sending frequency of the calling number sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy, intercepting the short message;
若所述主叫号码发送此类型短信的发送频次未超过所述拦截频次策略的拦截频次,则放 行所述短信。If the sending frequency of the calling number sent by the calling number does not exceed the intercepting frequency of the intercepting frequency policy, Line the message.
此外,为实现上述目的,本发明还提供一种短信拦截装置,所述短信拦截装置包括:In addition, in order to achieve the above object, the present invention further provides a short message intercepting device, where the short message intercepting device includes:
接收模块,设置为接收短信,并获取所述短信的特征向量;a receiving module, configured to receive a short message, and obtain a feature vector of the short message;
匹配模块,设置为根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板;a matching module, configured to search for a spam template matching the short message according to the feature vector of the short message;
拦截模块,设置为根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。The intercepting module is configured to intercept the short message according to the spam template matched with the short message and the preset filtering condition by using a corresponding intercept frequency policy.
在本发明实施例中,所述预设的过滤条件包括:短信的主叫号码、被叫号码和发送时间,所述短信拦截装置还包括:In the embodiment of the present invention, the preset filtering condition includes: a calling number of the short message, a called number, and a sending time, and the short message intercepting device further includes:
获取模块,设置为获取用户输入的垃圾短信模板和垃圾短信模板的类型;根据所述用户输入的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置拦截频次策略;Obtaining a module, configured to obtain a type of the spam message template and the spam message template input by the user; and set an interception frequency policy according to the type of the spam message template input by the user, the calling number, the called number, and the sending time period;
计算模块,设置为获取所述用户输入的垃圾短信模板的特征向量;a calculation module, configured to acquire a feature vector of the spam template input by the user;
列表模块,设置为根据所述垃圾短信模板的特征向量,筛选出具有相同特征向量的垃圾短信模板,形成列表供查找。The list module is configured to filter out spam templates having the same feature vector according to the feature vector of the spam template, and form a list for searching.
在本发明实施例中,所述匹配模块包括:In the embodiment of the present invention, the matching module includes:
查找单元,设置为根据所述短信的特征向量,查找具有相同特征向量的垃圾短信模板列表;a searching unit, configured to search for a spam short message template list having the same feature vector according to the feature vector of the short message;
相似度计算单元,设置为若找到具有相同特征向量的垃圾短信模板列表,则获取所述垃圾短信模板列表中,与所述短信的相似度最大的垃圾短信模板;The similarity calculation unit is configured to obtain a spam short message template having the same similarity as the short message template in the spam short message template list if the spam short message template list having the same feature vector is found;
判断单元,设置为判断所述最大相似度是否满足阈值;a determining unit, configured to determine whether the maximum similarity meets a threshold;
匹配单元,设置为若所述最大相似度满足阈值,则获取与所述短信的相似度最大的垃圾短信模板,作为与所述短信匹配的垃圾短信模板。The matching unit is configured to acquire a spam template having the greatest similarity with the short message as the spam template matched with the short message if the maximum similarity satisfies the threshold.
在本发明实施例中,所述拦截模块还设置为,In the embodiment of the present invention, the intercepting module is further configured to
若未找到与所述短信匹配的垃圾短信模板,则采用默认的垃圾短信模板对所述短信进行拦截处理。 If the spam template matching the short message is not found, the default spam template is used to intercept the short message.
在本发明实施例中,所述拦截模块包括:In the embodiment of the present invention, the intercepting module includes:
类型单元,设置为获取与所述短信匹配的垃圾短信模板的类型;将与所述短信匹配的垃圾短信模板的类型作为所述短信的类型;a type unit, configured to obtain a type of a spam template that matches the short message; and use a type of the spam template that matches the short message as a type of the short message;
策略单元,设置为根据所述短信的类型,以及预设的过滤条件,获取相应的拦截频次策略;The policy unit is configured to obtain a corresponding interception frequency policy according to the type of the short message and a preset filtering condition;
频次单元,设置为根据所述短信的类型和主叫号码,获取所述主叫号码发送此类型短信的发送频次;The frequency unit is configured to obtain, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number;
判断单元,设置为判断所述主叫号码发送此类型短信的发送频次是否超过所述拦截频次策略的拦截频次;a determining unit, configured to determine whether the sending frequency of the type of short message sent by the calling number exceeds an intercepting frequency of the intercepting frequency policy;
拦截单元,设置为若所述主叫号码发送此类型短信的发送频次超过所述拦截频次策略的拦截频次,则拦截所述短信;The intercepting unit is configured to intercept the short message if the sending frequency of the type of short message sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy;
放行单元,设置为若所述主叫号码发送此类型短信的发送频次未超过所述拦截频次策略的拦截频次,则放行所述短信。The release unit is configured to release the short message if the sending frequency of the type of the short message sent by the calling number does not exceed the intercepting frequency of the intercepting frequency policy.
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的短信拦截方法。In the embodiment of the present invention, a computer storage medium is further provided, and the computer storage medium may store an execution instruction, where the execution instruction is used to execute the short message interception method in the foregoing embodiment.
本发明实施例提出的一种短信拦截方法和装置,通过运营商服务器接收短信,获取短信的特征向量,根据短信的特征向量,查找与短信匹配的垃圾短信模板,然后,根据与短信匹配的垃圾短信模板和过滤条件,使用相应的拦截频次策略对短信进行拦截处理。本发明实施例对不同类型的短信进行不同策略的拦截处理,实现了对短信的差异化拦截,满足了运营商的需求。The method and device for intercepting a short message according to an embodiment of the present invention obtains a short message by a carrier server, acquires a feature vector of the short message, searches for a spam message template matching the short message according to the feature vector of the short message, and then, according to the garbage matched with the short message SMS templates and filtering conditions, using the corresponding interception frequency strategy to intercept SMS messages. The embodiments of the present invention perform different types of short message interception processing on different types of short messages, and implement differentiated interception of short messages to meet the needs of operators.
附图说明DRAWINGS
图1为本发明短信拦截方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a short message interception method according to the present invention;
图2为本发明短信拦截方法第二实施例的流程示意图;2 is a schematic flowchart of a second embodiment of a short message interception method according to the present invention;
图3为本发明短信拦截方法第三实施例的流程示意图;3 is a schematic flowchart of a third embodiment of a short message interception method according to the present invention;
图4为本发明短信拦截方法第四实施例的流程示意图;4 is a schematic flowchart of a fourth embodiment of a short message interception method according to the present invention;
图5为本发明短信拦截方法第五实施例的流程示意图;FIG. 5 is a schematic flowchart diagram of a fifth embodiment of a short message interception method according to the present invention; FIG.
图6为本发明短信拦截装置第一实施例的功能模块示意图;6 is a schematic diagram of functional modules of a first embodiment of a short message intercepting apparatus according to the present invention;
图7为本发明短信拦截装置第二实施例的功能模块示意图; 7 is a schematic diagram of functional modules of a second embodiment of a short message intercepting apparatus according to the present invention;
图8为本发明短信拦截装置第三实施例的功能模块示意图;8 is a schematic diagram of functional modules of a third embodiment of a short message intercepting apparatus according to the present invention;
图9为本发明短信拦截装置第五实施例的功能模块示意图。FIG. 9 is a schematic diagram of functional modules of a fifth embodiment of a short message intercepting apparatus according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例的主要解决方案是:接收短信,并获取所述短信的特征向量;根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板;根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。The main solution of the embodiment of the present invention is: receiving a short message, and acquiring a feature vector of the short message; searching for a spam message template matching the short message according to the feature vector of the short message; and spam message matching the short message The template, and the preset filtering conditions, use the corresponding intercept frequency policy to intercept the short message.
由于现有技术的垃圾短信拦截系统配置单一,针对所有收到的垃圾短信均采用同种拦截策略,因此,不能满足运营商对不同类型的垃圾短信的不同拦截需求。Because the prior art spam message interception system has a single configuration, the same interception strategy is adopted for all received spam messages, and therefore, the operator's different interception requirements for different types of spam messages cannot be met.
本发明提供一种解决方案,收到短信后根据短信的类型和过滤条件,按照对应的拦截策略,对短信进行的相应的操作进行拦截处理,满足了运营商对垃圾短信差异化的拦截需求。The present invention provides a solution, after receiving a short message, according to the type of the short message and the filtering condition, according to the corresponding interception strategy, the corresponding operation of the short message is intercepted, which satisfies the operator's interception requirement for the spam short message differentiation.
参照图1,本发明短信拦截方法第一实施例提供一种短信拦截方法,所述短信拦截方法包括:Referring to FIG. 1 , a first embodiment of the short message interception method of the present invention provides a short message intercepting method, where the short message intercepting method includes:
步骤S10、接收短信,并获取所述短信的特征向量。Step S10: Receive a short message, and acquire a feature vector of the short message.
本实施例方案主要应用于运营商服务器,当然也可以应用于其他具有短信拦截需求的服务器。本实施例以运营商服务器进行举例说明。The solution in this embodiment is mainly applied to an operator server, and can of course be applied to other servers having short message interception requirements. This embodiment is exemplified by an operator server.
具体的,作为一种实施方式,首先,运营商服务器接收短信,得到短信的文本内容,和短信的相关信息,例如:短信的主叫号码、被叫号码和发送时间。Specifically, as an implementation manner, first, the operator server receives the short message, obtains the text content of the short message, and the related information of the short message, for example, the calling number, the called number, and the sending time of the short message.
然后,获取短信的特征向量,以便后续获取与该短信匹配的垃圾短信模板。Then, the feature vector of the short message is obtained, so as to obtain the spam template matching the short message.
具体地,在获取短信的特征向量时,可以采用如下方案:Specifically, when acquiring the feature vector of the short message, the following scheme may be adopted:
首先,运营商服务器去除短信文本的噪声,也即去除短信文本中的干扰词,如:标点符号。First, the operator server removes the noise of the text message, that is, removes the interference words in the text of the message, such as punctuation.
然后,对得到的去除噪声后的短信文本进行分词处理,将短信文本拆分为单个的分词,并去除所得到的词组中的停用词。去除的停用词包括:副词、介词、语气助词、连接词等,这些词通常本身并无明确的意义,只有将其放入一个完整的句子中才有一定作用,如常见的 “的”和“在”。Then, the obtained noise-removed short message text is subjected to word segmentation processing, the short message text is split into individual word segments, and the stop words in the obtained phrase are removed. The removed stop words include: adverbs, prepositions, modal particles, conjunctions, etc. These words usually have no clear meaning in themselves, and only have to be put into a complete sentence, such as common "of" and "at".
然后,将得到的单个的分词按照字符的编码顺序进行排序,得到短信的特征向量。在本实施例中,使用UTF-8编码(8-bit Unicode Transformation Format,万国码),将得到的单个的分词转化为UTF-8编码,得到表征所有分词的UTF-8编码;按照UTF-8编码的顺序,将得到的所有UTF-8编码进行排序,得到短信的特征向量。当然,也可以使用其他编码进行排序,可根据实际需要灵活设定。Then, the obtained individual word segments are sorted according to the encoding order of the characters to obtain the feature vector of the short message. In this embodiment, the UTF-8 encoding (8-bit Unicode Transformation Format, Unicode) is used to convert the obtained single word segment into UTF-8 encoding, and UTF-8 encoding for all word segments is obtained; according to UTF-8 The order of the encoding, sorting all the obtained UTF-8 codes to obtain the feature vector of the short message. Of course, other codes can also be used for sorting, which can be flexibly set according to actual needs.
步骤S20、根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板。Step S20: Search for a spam message template matching the short message according to the feature vector of the short message.
本实施例中,运营商服务器预先配置有不同类型的垃圾短信模板,根据与垃圾短信模板的相似度来决定垃圾短信的类型;然后根据不同的垃圾短信类型,结合过滤条件如主叫号码、被叫号码,配置不同的拦截策略,以满足运营商用户对于短信差异化拦截的要求。In this embodiment, the operator server is pre-configured with different types of spam templates, and the type of spam messages is determined according to the similarity with the spam templates. Then, according to different types of spam messages, combined with filtering conditions such as calling number and being Call the number and configure different interception strategies to meet the requirements of the operator's differentiated interception of SMS.
在得到短信的特征向量后,运营商服务器以短信的特征向量为关键词,查找内存中具有相同特征向量的垃圾短信模板,并计算所找到的垃圾短信模板与短信的相似度。After obtaining the feature vector of the short message, the operator server searches for the spam short message template with the same feature vector in the memory by using the feature vector of the short message as a keyword, and calculates the similarity between the found spam short message template and the short message.
然后,判断计算得到的相似度是否满足预设的阈值:若所得到的相似度满足预设的阈值,则所找到的垃圾短息模板与短信匹配,获取此垃圾短信模板。Then, it is determined whether the calculated similarity satisfies a preset threshold: if the obtained similarity satisfies a preset threshold, the found garbage short message template matches the short message, and the spam template is obtained.
若查找到多条与短信具有相同特征向量的垃圾短信模板,则分别计算所有找到的垃圾短信模板与短信的相似度,获取与短信的相似度最大的垃圾短信模板;然后,判断最大相似度是否满足预设的阈值:若最大相似度满足预设的阈值,则判定此垃圾短信模板与短信匹配。If a plurality of spam templates having the same feature vector as the short message are found, the similarity between all the found spam templates and the short messages is calculated, and the spam template with the greatest similarity with the short message is obtained. Then, whether the maximum similarity is determined is The preset threshold is met: if the maximum similarity satisfies the preset threshold, it is determined that the spam template matches the short message.
步骤S30、根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。Step S30: Perform interception processing on the short message according to the spam short message template matched with the short message and the preset filtering condition by using a corresponding intercept frequency policy.
在获取与短信匹配的垃圾短信模板后,以垃圾短信模板的类型为短信的类型。After obtaining the spam template matching the short message, the type of the spam template is the type of the short message.
然后,根据短信的类型和预设的过滤条件,查找并获取相应的拦截频次策略。本实施例所述的拦截频次策略是指同一主叫用户一定时间内,发送同类型的短信的频次达到设定的阈值后,就拦截该短信。因此,可以针对不同类型的短信设置不同的拦截频次。比如诈骗类短信,可以将拦截频次的阈值设置低一点,而商业广告类和通知类的短信可以将拦截频次的阈值设置高一点。Then, according to the type of the short message and the preset filtering condition, find and obtain the corresponding interception frequency policy. The interception frequency policy in this embodiment refers to that the same calling user intercepts the short message after the frequency of sending the same type of short message reaches a set threshold within a certain period of time. Therefore, different interception frequencies can be set for different types of short messages. For example, fraudulent SMS can set the threshold of the interception frequency to a lower level, while the commercial advertisement and notification type SMS can set the threshold of the interception frequency to a higher level.
需要说明的是,预设的过滤条件可以为:短信的主叫号码、被叫号码,也可以为:短信的主叫号码、被叫号码和发送时间,可根据实际需要灵活设置。It should be noted that the preset filtering condition may be: the calling number of the short message, the called number, or the calling number, the called number, and the sending time of the short message, which can be flexibly set according to actual needs.
然后,根据短信的类型和主叫号码,获取该主叫号码发送此类型短信的发送频次。Then, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number is obtained.
然后,判断得到的该主叫号码发送此类型短信的发送频次是否超过此短信相应的拦截频次阈值:若超过,则拦截短信;若未超过,则放行短信。 Then, it is judged whether the frequency of sending the short message sent by the calling number exceeds the interception frequency threshold corresponding to the short message: if it exceeds, the short message is intercepted; if not, the short message is released.
在本实施例中,运营商服务器接收短信,获取短信的特征向量,根据短信的特征向量,查找与短信匹配的垃圾短信模板,然后,根据与短信匹配的垃圾短信模板和预设的过滤条件,使用相应的拦截频次策略对短信进行拦截处理,从而对不同类型的短信进行不同策略的拦截处理,实现了对短信的差异化拦截,满足了运营商用户的需求。In this embodiment, the operator server receives the short message, obtains the feature vector of the short message, searches for the spam short message template matching the short message according to the feature vector of the short message, and then, according to the spam message template matched with the short message and the preset filtering condition, The corresponding interception frequency strategy is used to intercept the short message, so that different types of short messages are intercepted by different strategies, and the differential interception of the short message is realized, which satisfies the needs of the operator users.
进一步的,参照图2,本发明短信拦截方法第二实施例提供一种短信拦截方法,基于上述图1所示的实施例,所述预设的过滤条件包括:短信的主叫号码、被叫号码和发送时间,所述步骤S10之前还包括:Further, referring to FIG. 2, the second embodiment of the short message interception method of the present invention provides a short message interception method. Based on the embodiment shown in FIG. 1, the preset filtering conditions include: a calling number of the short message, and a called party. The number and the sending time, before the step S10, further include:
步骤S40、获取用户输入的垃圾短信模板和垃圾短信模板的类型。Step S40: Obtain a type of the spam template and the spam template input by the user.
运营商用户可根据需要拦截的短信,输入垃圾短信模板,并对输入的每个垃圾短信模板都进行类型的设置。需要说明的是,垃圾短信模板的类型可由用户自定义设置,也可以由用户选择预设的类型,可根据实际需要灵活设置。The operator user can input the spam template according to the short message that needs to be intercepted, and set the type of each spam template that is input. It should be noted that the type of the spam short message template can be set by the user, or the preset type can be selected by the user, and can be flexibly set according to actual needs.
运营商服务器获取运营商用户输入的垃圾短信模板,和垃圾短信模板的类型。The carrier server obtains the spam template input by the operator user and the type of spam template.
步骤S50、根据所述用户输入的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置拦截频次策略。Step S50: Set an interception frequency policy according to the type of the spam message template input by the user, the calling number, the called number, and the sending time period.
运营商服务器获取运营商用户输入的垃圾短信模板后,针对不同的垃圾短信模板类型设置差异化的拦截策略。针对垃圾短信模板的拦截频次策略可以为预设的拦截频次策略,也可以获取运营商用户根据实际需要设置的拦截频次策略,可根据实际需要灵活设置。After the operator server obtains the spam template input by the operator user, a different interception policy is set for different spam template types. The interception frequency policy for the spam template can be a preset interception frequency policy, or an interception frequency policy set by the operator according to actual needs, and can be flexibly set according to actual needs.
具体的,作为一种实施方式,以获取运营商用户设置的拦截频次策略举例,根据垃圾短信模板的类型、主叫号码所属的不同用户组、被叫号码所属的不同用户组和发送的不同时间段,运营商用户可以设置相应的拦截频次策略。Specifically, as an implementation manner, an example of the interception frequency policy set by the operator user is obtained, according to the type of the spam short message template, different user groups to which the calling number belongs, different user groups to which the called number belongs, and different times of sending Segment, the operator user can set the corresponding interception frequency policy.
由此,得到的每个拦截频次策略均包括如下信息:Thus, each interception frequency strategy obtained includes the following information:
短信的类型;Type of text message;
主叫号码所属的用户组;The user group to which the calling number belongs;
被叫号码所属的用户组;The user group to which the called number belongs;
发送的时间段。The time period sent.
得到的拦截频次策略可以是策略树,也即每一个垃圾短信模板,依次根据垃圾短信模板类型、主叫号码所属的用户组、被叫号码所属的用户组和发送的时间段,均有对应的拦截频次策略。 The obtained interception frequency policy may be a policy tree, that is, each spam message template, which is corresponding according to the type of the spam message template, the user group to which the calling number belongs, the user group to which the called number belongs, and the time period to be sent. Intercept frequency strategy.
其中,拦截频次策略为:同一主叫用户一定时间内,发送同类型的短信的频次达到设定的阈值后,就拦截该短信。例如:诈骗类的短信,须严格拦截,拦截频次的阈值可以设置的较低;商业广告类的短信,可放松拦截条件,拦截频次的阈值可以设置的较高。当然,拦截频次策略也可以为其他策略,可根据实际需要灵活设置。The interception frequency policy is: the same calling user intercepts the short message after the frequency of sending the same type of short message reaches a set threshold within a certain period of time. For example, fraudulent SMS messages must be strictly intercepted, and the threshold for intercepting frequencies can be set lower; commercial advertising messages can relax the interception conditions, and the threshold for intercepting frequencies can be set higher. Of course, the interception frequency strategy can also be other strategies, which can be flexibly set according to actual needs.
主叫号码所属的用户组包括本网用户组、外网用户组、本省用户组、外省用户组、不同的号段组和SP(Service Provider,服务提供商)用户组,也可以为其他用户组,可根据实际需要灵活设置。The user group to which the calling number belongs includes the local user group, the external network user group, the local user group, the foreign user group, the different number segment group, and the SP (Service Provider) user group, or other user groups. , can be flexibly set according to actual needs.
被叫号码所属的用户组包括本网用户组、外网用户组、本省用户组、外省用户组、不同的号段组和SP用户组,也可以为其他用户组,可根据实际需要灵活设置。The user group to which the called number belongs includes the local user group, the external network user group, the local user group, the foreign user group, the different number segment group, and the SP user group, or other user groups, which can be flexibly set according to actual needs.
发送时间段可以小时为单位,也可以天为单位,也可以使用其他时间单位,可根据实际需要灵活设置。The sending time period can be in hours or in days, or other time units can be used, which can be flexibly set according to actual needs.
步骤S60、获取所述用户输入的垃圾短信模板的特征向量。Step S60: Acquire a feature vector of the spam template input by the user.
运营商服务器获取运营商用户输入的垃圾短信模板后,获取垃圾短信模板的特征向量,以便后续筛选与短信匹配的垃圾短信模板。After obtaining the spam template input by the operator user, the carrier server obtains the feature vector of the spam template, so as to filter the spam template matching the short message.
具体的,作为一种实施方式,首先,去除垃圾短信模板文本的噪声,也即去除短信文本中的干扰词,如:标点符号。Specifically, as an implementation manner, first, the noise of the spam short message template text is removed, that is, the interference words in the short message text, such as punctuation marks, are removed.
然后,对得到的去除噪声后的垃圾短信模板文本进行分词处理,将垃圾短信模板文本拆分为单个的分词,并去除所得到的词组中的停用词。去除的停用词包括:副词、介词、语气助词、连接词等。Then, the obtained noise-removed spam template text is subjected to word segmentation processing, the spam message template text is split into individual word segments, and the stop words in the obtained phrase are removed. The removed stop words include: adverbs, prepositions, modal particles, conjunctions, and so on.
然后,将得到的单个的分词按照字符的编码顺序进行排序,得到垃圾短信模板的特征向量。在本实施例中,使用UTF-8编码,将得到的单个的分词转化为UTF-8编码,得到表征所有分词的UTF-8编码;按照UTF-8编码的顺序,将得到的所有UTF-8编码进行排序,得到垃圾短信模板的特征向量。Then, the obtained individual word segments are sorted according to the encoding order of the characters to obtain the feature vector of the spam short message template. In this embodiment, UTF-8 encoding is used, and the obtained single word segment is converted into UTF-8 encoding, and UTF-8 encoding for characterizing all word segments is obtained; all UTF-8s obtained in the order of UTF-8 encoding are obtained. The code is sorted to obtain the feature vector of the spam template.
步骤S70、根据所述垃圾短信模板的特征向量,筛选出具有相同特征向量的垃圾短信模板,形成列表供查找。Step S70: Filter out spam templates with the same feature vector according to the feature vector of the spam template, and form a list for searching.
在运营商服务器得到所有垃圾短信模板的特征向量后,以垃圾短信模板的特征向量为关键词,保存所有的垃圾短信模板。After the operator server obtains the feature vectors of all the spam templates, all the spam templates are saved by using the feature vector of the spam template as a keyword.
在保存垃圾短信模板时,将特征向量相同的垃圾短信模板保存到同一列表中,得到具有相同特征向量的垃圾短信模板列表,以特征向量为关键词进行保存。When the spam template is saved, the spam templates with the same feature vector are saved in the same list, and a list of spam templates with the same feature vector is obtained, and the feature vector is saved as a keyword.
由此,得到垃圾短信模板列表,可供后续查找与接收到的短信匹配的垃圾短信模板时使 用。Thus, a list of spam templates is obtained, which can be used for subsequent searching for spam templates matching the received messages. use.
在本实施例中,运营商服务器首先获取用户输入的垃圾短信模板和垃圾短信模板的类型,然后针对获取的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置相应的拦截频次策略,得到差异化的拦截频次策略。运营商服务器获取用户输入的垃圾短信模板的特征向量,得到具有相同特征向量的垃圾短信模板列表,以供后续查找与接收到的短信匹配的垃圾短信模板使用。本实施例中运营商用户可根据实际需要,针对不同的垃圾短信模板设置不同的拦截频次策略,实现了在运营商服务器收到短信时,可使用差异化的拦截频次策略对收到的短信进行拦截处理,满足了运营商用户对不同短信的拦截需求。In this embodiment, the operator server first obtains the type of the spam template and the spam template input by the user, and then sets the corresponding interception frequency for the type of the spam template obtained, the calling number, the called number, and the sending time period. Strategy, get differentiated interception frequency strategy. The operator server obtains the feature vector of the spam template input by the user, and obtains a spam short message template list with the same feature vector for subsequent searching and matching the spam message template that matches the received short message. In this embodiment, the operator user can set different interception frequency policies for different spam short message templates according to actual needs, so that when the operator server receives the short message, the differentiated interception frequency policy can be used to perform the received short message. The interception process satisfies the interception requirements of operators for different SMS messages.
进一步的,参照图3,本发明短信拦截方法第三实施例提供一种短信拦截方法,基于上述图2所示的实施例,所述步骤S20包括:Further, referring to FIG. 3, the third embodiment of the short message interception method of the present invention provides a short message interception method. Based on the embodiment shown in FIG. 2, the step S20 includes:
步骤S21、根据所述短信的特征向量,查找具有相同特征向量的垃圾短信模板列表。Step S21: Search for a spam short message template list having the same feature vector according to the feature vector of the short message.
在得到短信的特征向量后,以短信的特征向量为关键词,查找内存中具有相同特征向量的垃圾短信模板列表。其中,垃圾短信模板列表以特征向量为关键词进行保存。After obtaining the feature vector of the short message, the feature vector of the short message is used as a keyword to search for a list of spam templates having the same feature vector in the memory. The spam template list is saved by using the feature vector as a keyword.
步骤S22、若找到具有相同特征向量的垃圾短信模板列表,则获取所述垃圾短信模板列表中,与所述短信的相似度最大的垃圾短信模板。Step S22: If a spam short message template list having the same feature vector is found, obtain a spam short message template with the greatest similarity with the short message in the spam short message template list.
在查找到与短信具有相同特征向量的垃圾短信模板列表后,分别计算列表中所有垃圾短信模板与短信的相似度。本实施使用最小编辑算法(Minimum edit distance)举例计算垃圾短信模板与短信的相似度,具体的,令短信为字符串a,垃圾短信模板为字符串b,然后:After finding the list of spam templates with the same feature vector as the short message, the similarity between all spam templates and the short messages in the list is calculated. This example uses the minimum edit algorithm (Minimum edit distance) to calculate the similarity between the spam SMS template and the short message. Specifically, the short message is the string a, the spam template is the string b, and then:
计算从字符串a到字符串b需要经过的编辑次数,每次编辑只能增加、删除或替换1个字符,得到从字符串a到字符串b的最小编辑次数c,也即从字符串a到字符串b的最小编辑距离:c。Calculate the number of edits that need to pass from the string a to the string b. Each edit can only add, delete, or replace one character, and get the minimum number of edits c from the string a to the string b, that is, from the string a. The minimum edit distance to the string b: c.
然后,取字符串a的长度为L,垃圾短信模板与短信的相似度为d,则有:Then, the length of the string a is L, and the similarity between the spam template and the short message is d, then:
Figure PCTCN2016076791-appb-000001
Figure PCTCN2016076791-appb-000001
由此,得到垃圾短信模板与短信的相似度。Thereby, the similarity between the spam template and the short message is obtained.
然后,获取与短信的相似度最大的垃圾短信模板,得到最大相似度。Then, the spam template with the greatest similarity with the short message is obtained, and the maximum similarity is obtained.
步骤S23、判断所述最大相似度是否满足阈值。 Step S23: Determine whether the maximum similarity meets a threshold.
在得到垃圾短信模板与短信的最大相似度后,判断所得到的最大相似度是否满足预设的阈值。After obtaining the maximum similarity between the spam short message template and the short message, it is determined whether the obtained maximum similarity satisfies a preset threshold.
具体的,若最大相似度大于或等于预设的阈值,则判定最大相似度满足预设的阈值;Specifically, if the maximum similarity is greater than or equal to the preset threshold, determining that the maximum similarity meets the preset threshold;
若最大相似度小于预设的阈值,则判定最大相似度不满足预设的阈值。If the maximum similarity is less than the preset threshold, it is determined that the maximum similarity does not satisfy the preset threshold.
步骤S24、若所述最大相似度满足阈值,则获取与所述短信的相似度最大的垃圾短信模板,作为与所述短信匹配的垃圾短信模板。Step S24: If the maximum similarity satisfies the threshold, obtain a spam template with the greatest similarity with the short message as a spam template matching the short message.
若垃圾短信模板与短信最大相似度满足预设的阈值,则判定短信为垃圾短信。If the maximum similarity between the spam short message template and the short message meets the preset threshold, the short message is determined to be a spam message.
然后,获取与短信的相似度最大的垃圾短信模板,作为与短信匹配的垃圾短信模板。Then, the spam template with the greatest similarity with the short message is obtained as a spam template matching the short message.
由此,得到与短信匹配的垃圾短信模板。Thereby, a spam template matching the short message is obtained.
在本实施例中,运营商服务器首先获取与接收到的短信特征向量相同的垃圾短信模板列表,然后计算垃圾短信模板列表中各垃圾短信模板与短信的相似度,得到与短信的相似度最大的垃圾短信模板,和最大相似度;判断所得到的最大相似度是否满足阈值;当最大相似度满足阈值时,获取与短信的相似度最大的垃圾短信模,作为与短信匹配的垃圾短信模板。本实施例通过最大相似度与阈值的判定,得到垃圾短信模板列表中与接收到的短信最相似的垃圾短信模板,为后续获取最匹配的拦截频次策略提供了基础。In this embodiment, the operator server first obtains the same spam template list as the received SMS feature vector, and then calculates the similarity between each spam template and the short message in the spam template list, and obtains the greatest similarity with the short message. The spam template, and the maximum similarity; determining whether the obtained maximum similarity satisfies the threshold; when the maximum similarity satisfies the threshold, obtaining the spam template with the greatest similarity with the short message as the spam template matching the short message. In this embodiment, the spam short message template that is most similar to the received short message template in the spam short message template list is obtained by determining the maximum similarity and the threshold value, which provides a basis for obtaining the most matching interception frequency strategy.
进一步的,参照图4,本发明短信拦截方法第四实施例提供一种短信拦截方法,基于上述图1至图3中所示任一实施例(本实施例以图1为例),所述步骤S20之后还包括:Further, referring to FIG. 4, a fourth embodiment of the short message interception method of the present invention provides a short message interception method, which is based on any of the embodiments shown in FIG. 1 to FIG. 3 (the present embodiment is illustrated by using FIG. 1). After step S20, the method further includes:
步骤S80、若未找到与所述短信匹配的垃圾短信模板,则采用默认的垃圾短信模板对所述短信进行拦截处理。Step S80: If the spam template matching the short message is not found, the default spam template is used to intercept the short message.
在运营商服务器根据短信的特征向量,查找具有相同特征向量的垃圾短信模板时,若未找到,则视为未找到与短信匹配的垃圾短信模板;When the operator server searches for the spam template with the same feature vector according to the feature vector of the short message, if it is not found, it is deemed that the spam template matching the short message is not found;
若找到多个与短信具有相同特征向量的垃圾短信模板,则分别计算所有找到的垃圾短信模板与短信的相似度,获取与短信的相似度最大的垃圾短信模板;然后,判断最大相似度是否满足预设的阈值:若最大相似度不满足预设的阈值,则视为未找到与短信匹配的垃圾短信模板。If a plurality of spam templates having the same feature vector as the short message are found, the similarity between all the found spam templates and the short messages is calculated, and the spam template with the greatest similarity with the short message is obtained. Then, it is determined whether the maximum similarity is satisfied. Pre-set threshold: If the maximum similarity does not meet the preset threshold, it is considered that the spam template matching the short message is not found.
当运营商服务器未找到与短信匹配的垃圾短信模板时,采用默认的垃圾短信模板对所述短信进行拦截处理。When the operator server does not find the spam template matching the short message, the default spam template is used to intercept the short message.
具体的,作为一种实施方式,营商服务器可以根据默认的垃圾短信模板和预设的过滤条 件,查找并获取相应的拦截频次策略,对短信进行拦截处理。Specifically, as an implementation manner, the business server may use a default spam template and a preset filter bar. , find and obtain the corresponding interception frequency strategy, intercept the SMS.
作为另一种实施方式,运营商服务器可以采用默认的垃圾短信模板,获取默认的拦截频次策略,对短信进行拦截处理。As another implementation manner, the operator server may adopt a default spam template to obtain a default interception frequency policy and intercept the short message.
在本实施例中,运营商服务器未找到与短信匹配的垃圾短信模板时,采用默认的垃圾短信模板对短信进行拦截处理,使运营商服务器对接收到的短信均能进行拦截处理,实现了对短信的差异化拦截处理,满足了运营商用户的需求。In this embodiment, when the operator server does not find the spam template that matches the short message, the default spam template is used to intercept the short message, so that the operator server can intercept the received short message, and the pair is implemented. The differentiated interception processing of SMS meets the needs of operators.
进一步的,参照图5,本发明短信拦截方法第五实施例提供一种短信拦截方法,基于上述图1至图3中所示任一实施例(本实施例以图1为例),所述步骤S30包括:Further, referring to FIG. 5, a fifth embodiment of the short message intercepting method of the present invention provides a short message intercepting method, which is based on any of the embodiments shown in FIG. 1 to FIG. 3 (the present embodiment is illustrated by using FIG. 1). Step S30 includes:
步骤S31、获取与所述短信匹配的垃圾短信模板的类型。Step S31: Obtain a type of the spam short message template that matches the short message.
本实施例与上述图1至图3所示的任一实施例均可组合实施;本实施例以与图1所示的实施例组合实施,进行举例说明。This embodiment can be implemented in combination with any of the embodiments shown in FIG. 1 to FIG. 3; the embodiment is implemented in combination with the embodiment shown in FIG.
在本实施例中,运营商服务器通过比较短信和垃圾短信模板的相似度,找出一条与该短信相似度最大,且超过设定的相似度阈值的垃圾短信模板,以此条垃圾短信模板的类型做为该短信的类型。然后根据短信不同的类型,结合预设的过滤条件如主叫号码和被叫号码等因素,查找对应的拦截策略,以实现垃圾短信的差异化拦截。In this embodiment, the operator server compares the similarity between the short message and the spam short message template to find a spam short message template that has the highest similarity with the short message and exceeds the set similarity threshold, and the spam template is used. Type as the type of the text message. Then, according to different types of short messages, combined with preset filtering conditions such as calling number and called number, the corresponding intercepting strategy is searched to realize differential interception of spam messages.
具体的,首先,在运营商服务器获取与短信匹配的垃圾短信模板后,获取此垃圾短信模板的类型。需要说明的是,垃圾短信模板的类型为运营商服务器预先设置的。Specifically, first, after the operator server obtains the spam template matched with the short message, the type of the spam template is obtained. It should be noted that the type of the spam template is preset by the operator server.
步骤S32、将与所述短信匹配的垃圾短信模板的类型作为所述短信的类型。Step S32: The type of the spam message template matching the short message is used as the type of the short message.
获取与短信匹配的垃圾短信模板的类型后,将短信视为此垃圾短信模板类型的垃圾短信。After obtaining the type of spam template matching the short message, the short message is regarded as the spam message of the spam template type.
然后,以此垃圾短信模板的类型,作为短信的类型。Then, use the type of spam template as the type of SMS.
步骤S33、根据所述短信的类型,以及预设的过滤条件,获取相应的拦截频次策略。Step S33: Acquire a corresponding interception frequency policy according to the type of the short message and the preset filtering condition.
在运营商服务器获取短信的类型后,根据短信的类型和预设的过滤条件,获取相应的拦截频次策略。After the carrier server obtains the type of the short message, the corresponding interception frequency policy is obtained according to the type of the short message and the preset filtering condition.
具体的,作为一种实施方式,以预设的过滤条件为主叫号码、被叫号码和发送时间为例,运营商服务器依次根据短信的类型、短信的主叫号码、短信的被叫号码和短信的发送时间,查找拦截频次策略。详细查找过程如下说明: Specifically, as an implementation manner, taking the preset filtering condition as the calling number, the called number, and the sending time as an example, the operator server sequentially according to the type of the short message, the calling number of the short message, the called number of the short message, and The sending time of the short message, find the interception frequency strategy. The detailed search process is as follows:
首先,根据短信的类型,获取该类型对应的全部拦截频次策略;First, according to the type of the short message, all the interception frequency policies corresponding to the type are obtained;
然后,根据短信的主叫号码,获取短信的类型对应的全部拦截频次策略中,该主叫号码所属用户组对应的全部拦截频次策略;Then, according to the calling number of the short message, all the interception frequency policies corresponding to the user group to which the calling number belongs are obtained in all the interception frequency policies corresponding to the type of the short message;
然后,根据短信的被叫号码,获取短信的类型和主叫号码所属用户组对应的全部拦截频次策略中,该被叫号码所属用户组对应的全部拦截频次策略;Then, according to the called number of the short message, the interception frequency policy corresponding to the user group to which the called number belongs is obtained in the total interception frequency policy corresponding to the type of the short message and the user group to which the calling number belongs;
然后,根据短信的发送时间,获取短信的类型、主叫号码所属用户组和被叫号码所属用户组应的全部拦截频次策略中,该发送时间所属时间段对应的拦截频次策略。Then, according to the sending time of the short message, the interception frequency policy corresponding to the time zone to which the sending time belongs is obtained in the total interception frequency policy of the type of the short message, the user group to which the calling number belongs, and the user group to which the called number belongs.
若未找到短信的拦截频次策略,则获取默认的拦截频次策略。If the interception frequency policy of the short message is not found, the default intercept frequency policy is obtained.
由此,得到短信的拦截频次策略。Thus, the interception frequency strategy of the short message is obtained.
步骤S34、根据所述短信的类型和主叫号码,获取所述主叫号码发送此类型短信的发送频次。Step S34: Acquire, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number.
在运营商服务器获取短信的拦截频次策略后,根据短信的类型和主叫号码,获取该主叫号码发送此类型短信的频次。After the operator server obtains the interception frequency policy of the short message, the frequency of the short message sent by the calling number is obtained according to the type of the short message and the calling number.
具体的,作为一种实施方式,短信的发送频次采用滑窗的方式进行保存,也即在本实施例中,仅能获取一段时间内该主叫号码发送此类型短信的发送频次。其中,滑窗的大小可由用户根据实际需要灵活设定。Specifically, as an implementation manner, the sending frequency of the short message is saved by using a sliding window. In this embodiment, only the sending frequency of the short message is sent by the calling number within a certain period of time. The size of the sliding window can be flexibly set by the user according to actual needs.
因此,获取存储的该主叫号码发送此类型短信的发送频次后,将所得到的频次加1,得到该主叫号码发送此类型短信的发送频次。Therefore, after the stored calling number is sent to send the frequency of sending the type of short message, the obtained frequency is incremented by one, and the sending frequency of the short message is sent by the calling number.
步骤S35、判断所述主叫号码发送此类型短信的发送频次是否超过所述拦截频次策略的拦截频次。Step S35: Determine whether the sending frequency of the type of short message sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy.
在运营商服务器得到短信的拦截策略,根据短信的类型和主叫号码得到该主叫号码发送此类型短信的发送频次后,判断该主叫号码发送此类型短信的发送频次是否超过拦截频次策略的拦截频次阈值,也即判断短信是否达到被拦截的条件。The interception strategy of obtaining the short message at the operator server, according to the type of the short message and the calling number, the calling number is sent to the sending frequency of the short message, and it is determined whether the sending frequency of the calling number exceeds the intercepting frequency policy. The frequency threshold is intercepted, that is, whether the short message is reached or not.
具体的,若该主叫号码发送此类型短信的发送频次大于或等于拦截频次策略的拦截频次阈值,则判定该主叫号码发送此类型短信的发送频次超过拦截频次策略的拦截频次阈值,该短信达到被拦截的条件;Specifically, if the sending frequency of the calling number sent by the calling number is greater than or equal to the intercepting frequency threshold of the intercepting frequency policy, determining that the sending frequency of the calling number of the calling number exceeds the intercepting frequency threshold of the intercepting frequency policy, the short message Reach the conditions of being intercepted;
若该主叫号码发送此类型短信的发送频次小于拦截频次策略的拦截频次阈值,则判定该主叫号码发送此类型短信的发送频次不超过拦截频次策略的拦截频次阈值,该短信未达到被拦截的条件。 If the sending frequency of the calling number sent by the calling number is less than the intercepting frequency threshold of the intercepting frequency policy, determining that the sending frequency of the sending type of the calling number does not exceed the intercepting frequency threshold of the intercepting frequency policy, the short message does not reach the intercepted conditions of.
步骤S36、若所述主叫号码发送此类型短信的发送频次超过所述拦截频次策略的拦截频次,则拦截所述短信。Step S36: If the sending frequency of the calling number sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy, the short message is intercepted.
若该主叫号码发送此类型短信的发送频次超过拦截频次策略的拦截频次阈值,短信已达到被拦截的条件,则控制拦截该短信。If the calling number of the calling number is more than the interception frequency threshold of the interception frequency policy, and the short message has reached the intercepted condition, the control intercepts the short message.
步骤S37、若所述主叫号码发送此类型短信的发送频次未超过所述拦截频次策略的拦截频次,则放行所述短信。Step S37: If the sending frequency of the calling number sent by the calling number does not exceed the intercepting frequency of the intercepting frequency policy, the short message is released.
若该主叫号码发送此类型短信的发送频次未超过拦截频次策略的拦截频次阈值,短信未达到被拦截的条件,则控制放行该短信。If the sending frequency of the calling number sent by the calling number does not exceed the intercept frequency threshold of the interception frequency policy, and the short message does not reach the intercepted condition, the message is controlled to be released.
在本实施例中,运营商服务器首先以与短信匹配的垃圾短信模板类型作为短信的类型;根据短信的类型和预设的过滤条件,获取相应的拦截频次策略;然后根据短信的类型和主叫号码获取该主叫号码发送此类型短信的发送频次,判断该主叫号码发送此类型短信的发送频次是否超过拦截频次策略的拦截频次:若超过,则拦截短信;若未超过,则放行短信。本实施例实现了针对不同类型的短信和过滤条件,获取相应的拦截频次策略,进行差异化的拦截,满足了运营商用户的需求。In this embodiment, the operator server first uses the type of spam template that matches the short message as the type of the short message; according to the type of the short message and the preset filtering condition, the corresponding interception frequency policy is obtained; and then according to the type of the short message and the calling party The number obtains the sending frequency of the type of short message sent by the calling number, and determines whether the sending frequency of the sending type of the calling number exceeds the intercepting frequency of the intercepting frequency policy: if it exceeds, the short message is intercepted; if not, the short message is released. This embodiment implements different interception frequency policies for different types of short messages and filtering conditions, and performs differentiated interception to meet the needs of the operator users.
本发明进一步提供一种短信拦截装置,参照图6,本发明短信拦截装置第一实施例提供一种短信拦截装置,所述短信拦截装置包括:The present invention further provides a short message intercepting device. Referring to FIG. 6, the first embodiment of the short message intercepting device of the present invention provides a short message intercepting device, and the short message intercepting device includes:
接收模块100,设置为接收短信,并获取所述短信的特征向量。The receiving module 100 is configured to receive a short message and obtain a feature vector of the short message.
本实施例方案主要应用于运营商服务器,当然也可以应用于其他具有短信拦截需求的服务器。The solution in this embodiment is mainly applied to an operator server, and can of course be applied to other servers having short message interception requirements.
具体的,作为一种实施方式,首先,接收模块100接收短信,得到短信的文本内容,和短信的相关信息,例如:短信的主叫号码、被叫号码和发送时间。Specifically, as an implementation manner, first, the receiving module 100 receives the short message, obtains the text content of the short message, and the related information of the short message, for example, the calling number, the called number, and the sending time of the short message.
然后,获取短信的特征向量,以便后续获取与该短信匹配的垃圾短信模板。Then, the feature vector of the short message is obtained, so as to obtain the spam template matching the short message.
具体地,在获取短信的特征向量时,可以采用如下方案:Specifically, when acquiring the feature vector of the short message, the following scheme may be adopted:
首先,接收模块100去除短信文本的噪声,也即去除短信文本中的干扰词,如:标点符号。First, the receiving module 100 removes the noise of the short text, that is, removes the interference words in the short text, such as punctuation.
然后,接收模块100对得到的去除噪声后的短信文本进行分词处理,将短信文本拆分为单个的分词,并去除所得到的词组中的停用词。去除的停用词包括:副词、介词、语气助词、 连接词等,这些词通常本身并无明确的意义,只有将其放入一个完整的句子中才有一定作用,如常见的“的”和“在”。Then, the receiving module 100 performs word segmentation on the obtained noise-removed short message text, splits the short message text into individual word segments, and removes the stop words in the obtained phrase. The stop words removed include: adverbs, prepositions, modal particles, Conjunctions, etc., these words usually have no clear meaning in themselves, and only have to be put into a complete sentence, such as the common "" and "at".
然后,接收模块100将得到的单个的分词按照字符的编码顺序进行排序,得到短信的特征向量。在本实施例中,使用UTF-8编码,将得到的单个的分词转化为UTF-8编码,得到表征所有分词的UTF-8编码;按照UTF-8编码的顺序,将得到的所有UTF-8编码进行排序,得到短信的特征向量。当然,也可以使用其他编码进行排序,可根据实际需要灵活设定。Then, the receiving module 100 sorts the obtained individual word segments according to the encoding order of the characters to obtain the feature vector of the short message. In this embodiment, UTF-8 encoding is used, and the obtained single word segment is converted into UTF-8 encoding, and UTF-8 encoding for characterizing all word segments is obtained; all UTF-8s obtained in the order of UTF-8 encoding are obtained. The code is sorted to obtain the feature vector of the short message. Of course, other codes can also be used for sorting, which can be flexibly set according to actual needs.
匹配模块200,设置为根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板。The matching module 200 is configured to search for a spam template matching the short message according to the feature vector of the short message.
本实施例中,运营商服务器预先配置有不同类型的垃圾短信模板,根据与垃圾短信模板的相似度来决定垃圾短信的类型;然后根据不同的垃圾短信类型,结合过滤条件如主叫号码、被叫号码,配置不同的拦截策略,以满足运营商用户对于短信差异化拦截的要求。In this embodiment, the operator server is pre-configured with different types of spam templates, and the type of spam messages is determined according to the similarity with the spam templates. Then, according to different types of spam messages, combined with filtering conditions such as calling number and being Call the number and configure different interception strategies to meet the requirements of the operator's differentiated interception of SMS.
在接收模块100得到短信的特征向量后,匹配模块200以短信的特征向量为关键词,查找内存中具有相同特征向量的垃圾短信模板,并计算所找到的垃圾短信模板与短信的相似度。After the receiving module 100 obtains the feature vector of the short message, the matching module 200 searches for the spam short message template with the same feature vector in the memory by using the feature vector of the short message as a keyword, and calculates the similarity between the found spam short message template and the short message.
然后,匹配模块200判断计算得到的相似度是否满足预设的阈值:若所得到的相似度满足预设的阈值,则所找到的垃圾短息模板与短信匹配,获取此垃圾短信模板。Then, the matching module 200 determines whether the calculated similarity meets the preset threshold: if the obtained similarity meets the preset threshold, the found junk short message template matches the short message, and the spam template is obtained.
匹配模块200若查找到多条与短信具有相同特征向量的垃圾短信模板,则分别计算所有找到的垃圾短信模板与短信的相似度,获取与短信的相似度最大的垃圾短信模板;然后,判断最大相似度是否满足预设的阈值:若最大相似度满足预设的阈值,则判定此垃圾短信模板与短信匹配。If the matching module 200 finds a plurality of spam templates having the same feature vector as the short message, respectively calculating the similarity between all the spam templates and the short messages, and obtaining the spam template with the greatest similarity with the short message; Whether the similarity satisfies the preset threshold: if the maximum similarity satisfies the preset threshold, it is determined that the spam template matches the short message.
拦截模块300,设置为根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。The intercepting module 300 is configured to intercept the short message according to the spam template matched with the short message and the preset filtering condition by using a corresponding intercept frequency policy.
在匹配模块200获取与短信匹配的垃圾短信模板后,拦截模块300以垃圾短信模板的类型为短信的类型。After the matching module 200 obtains the spam template that matches the short message, the intercepting module 300 uses the type of the spam template as the type of the short message.
然后,拦截模块300根据短信的类型和预设的过滤条件,查找并获取相应的拦截频次策略。本实施例所述的拦截频次策略是指同一主叫用户一定时间内,发送同类型的短信的频次达到设定的阈值后,就拦截该短信。因此,可以针对不同类型的短信设置不同的拦截频次。比如诈骗类短信,可以将拦截频次的阈值设置低一点,而商业广告类和通知类的短信可以将拦截频次的阈值设置高一点。Then, the intercepting module 300 searches for and acquires a corresponding interception frequency policy according to the type of the short message and the preset filtering condition. The interception frequency policy in this embodiment refers to that the same calling user intercepts the short message after the frequency of sending the same type of short message reaches a set threshold within a certain period of time. Therefore, different interception frequencies can be set for different types of short messages. For example, fraudulent SMS can set the threshold of the interception frequency to a lower level, while the commercial advertisement and notification type SMS can set the threshold of the interception frequency to a higher level.
需要说明的是,预设的过滤条件可以为:短信的主叫号码、被叫号码,也可以为:短信的主叫号码、被叫号码和发送时间,可根据实际需要灵活设置。It should be noted that the preset filtering condition may be: the calling number of the short message, the called number, or the calling number, the called number, and the sending time of the short message, which can be flexibly set according to actual needs.
然后,拦截模块300根据短信的类型和主叫号码,获取该主叫号码发送此类型短信的发 送频次。Then, the intercepting module 300 obtains the calling number and sends the short message according to the type of the short message and the calling number. Send frequency.
然后,拦截模块300判断得到的该主叫号码发送此类型短信的发送频次是否超过此短信相应的拦截频次阈值:若超过,则拦截短信;若未超过,则放行短信。Then, the intercepting module 300 determines whether the sending frequency of the type of the short message sent by the calling number exceeds the intercepting frequency threshold corresponding to the short message: if it exceeds, the short message is intercepted; if not, the short message is released.
在本实施例中,接收模块100接收短信,获取短信的特征向量,匹配模块200根据短信的特征向量,查找与短信匹配的垃圾短信模板,然后,拦截模块300根据与短信匹配的垃圾短信模板和预设的过滤条件,使用相应的拦截频次策略对短信进行拦截处理,从而对不同类型的短信进行不同策略的拦截处理,实现了对短信的差异化拦截,满足了运营商用户的需求。In this embodiment, the receiving module 100 receives the short message and obtains the feature vector of the short message, and the matching module 200 searches for the spam short message template that matches the short message according to the feature vector of the short message, and then the intercepting module 300 according to the spam template matched with the short message. The preset filtering conditions use the corresponding interception frequency strategy to intercept the short message, so that different types of short messages are intercepted by different strategies, and the differential interception of the short message is realized, which satisfies the needs of the operator users.
进一步的,参照图7,本发明短信拦截装置第二实施例提供一种短信拦截装置,基于上述图6所示的实施例,所述预设的过滤条件包括:短信的主叫号码、被叫号码和发送时间,所述短信拦截装置还包括:Further, referring to FIG. 7, the second embodiment of the short message intercepting apparatus of the present invention provides a short message intercepting apparatus. Based on the embodiment shown in FIG. 6, the preset filtering condition includes: a calling number of the short message, and a called party. The number and the sending time, the short message intercepting device further includes:
获取模块400,设置为获取用户输入的垃圾短信模板和垃圾短信模板的类型;根据所述用户输入的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置拦截频次策略。The obtaining module 400 is configured to obtain a type of the spam message template and the spam message template input by the user; and set an interception frequency policy according to the type of the spam message template input by the user, the calling number, the called number, and the sending time period.
运营商用户可根据需要拦截的短信,输入垃圾短信模板,并对输入的每个垃圾短信模板都进行类型的设置。需要说明的是,垃圾短信模板的类型可由用户自定义设置,也可以由用户选择预设的类型,可根据实际需要灵活设置。The operator user can input the spam template according to the short message that needs to be intercepted, and set the type of each spam template that is input. It should be noted that the type of the spam short message template can be set by the user, or the preset type can be selected by the user, and can be flexibly set according to actual needs.
获取模块400首先获取运营商用户输入的垃圾短信模板,和垃圾短信模板的类型。The obtaining module 400 first obtains the spam template input by the operator user, and the type of the spam template.
然后,获取模块400针对不同的垃圾短信模板类型设置差异化的拦截策略。针对垃圾短信模板的拦截频次策略可以为预设的拦截频次策略,也可以获取运营商用户根据实际需要设置的拦截频次策略,可根据实际需要灵活设置。The acquisition module 400 then sets a differentiated interception policy for different spam template types. The interception frequency policy for the spam template can be a preset interception frequency policy, or an interception frequency policy set by the operator according to actual needs, and can be flexibly set according to actual needs.
具体的,作为一种实施方式,以获取运营商用户设置的拦截频次策略举例,根据垃圾短信模板的类型、主叫号码所属的不同用户组、被叫号码所属的不同用户组和发送的不同时间段,运营商用户可以设置相应的拦截频次策略。Specifically, as an implementation manner, an example of the interception frequency policy set by the operator user is obtained, according to the type of the spam short message template, different user groups to which the calling number belongs, different user groups to which the called number belongs, and different times of sending Segment, the operator user can set the corresponding interception frequency policy.
由此,获取模块400得到的每个拦截频次策略均包括如下信息:Thus, each interception frequency policy obtained by the acquisition module 400 includes the following information:
短信的类型;Type of text message;
主叫号码所属的用户组;The user group to which the calling number belongs;
被叫号码所属的用户组;The user group to which the called number belongs;
发送的时间段。The time period sent.
获取模块400得到的拦截频次策略可以是策略树,也即每一个垃圾短信模板,依次根据垃圾短信模板类型、主叫号码所属的用户组、被叫号码所属的用户组和发送的时间段,均有 对应的拦截频次策略。The interception frequency policy obtained by the obtaining module 400 may be a policy tree, that is, each spam short message template, according to the type of the spam short message template, the user group to which the calling number belongs, the user group to which the called number belongs, and the time period to be sent. Have Corresponding interception frequency strategy.
其中,拦截频次策略为:同一主叫用户一定时间内,发送同类型的短信的频次达到设定的阈值后,就拦截该短信。例如:诈骗类的短信,须严格拦截,拦截频次的阈值可以设置的较低;商业广告类的短信,可放松拦截条件,拦截频次的阈值可以设置的较高。当然,拦截频次策略也可以为其他策略,可根据实际需要灵活设置。The interception frequency policy is: the same calling user intercepts the short message after the frequency of sending the same type of short message reaches a set threshold within a certain period of time. For example, fraudulent SMS messages must be strictly intercepted, and the threshold for intercepting frequencies can be set lower; commercial advertising messages can relax the interception conditions, and the threshold for intercepting frequencies can be set higher. Of course, the interception frequency strategy can also be other strategies, which can be flexibly set according to actual needs.
主叫号码所属的用户组包括本网用户组、外网用户组、本省用户组、外省用户组、不同的号段组和SP(Service Provider,服务提供商)用户组,也可以为其他用户组,可根据实际需要灵活设置。The user group to which the calling number belongs includes the local user group, the external network user group, the local user group, the foreign user group, the different number segment group, and the SP (Service Provider) user group, or other user groups. , can be flexibly set according to actual needs.
被叫号码所属的用户组包括本网用户组、外网用户组、本省用户组、外省用户组、不同的号段组和SP用户组,也可以为其他用户组,可根据实际需要灵活设置。The user group to which the called number belongs includes the local user group, the external network user group, the local user group, the foreign user group, the different number segment group, and the SP user group, or other user groups, which can be flexibly set according to actual needs.
发送时间段可以小时为单位,也可以天为单位,也可以使用其他时间单位,可根据实际需要灵活设置。The sending time period can be in hours or in days, or other time units can be used, which can be flexibly set according to actual needs.
计算模块500,设置为获取所述用户输入的垃圾短信模板的特征向量。The calculating module 500 is configured to acquire a feature vector of the spam template input by the user.
获取模块400获取运营商用户输入的垃圾短信模板后,计算模块500获取垃圾短信模板的特征向量,以便后续筛选与短信匹配的垃圾短信模板。After the obtaining module 400 obtains the spam short message template input by the operator user, the calculating module 500 obtains the feature vector of the spam short message template, so as to subsequently filter the spam short message template matched with the short message.
具体的,作为一种实施方式,首先,计算模块500去除垃圾短信模板文本的噪声,也即去除短信文本中的干扰词,如:标点符号。Specifically, as an implementation manner, first, the calculation module 500 removes the noise of the spam short message template text, that is, removes the interference words in the short message text, such as punctuation marks.
然后,计算模块500对得到的去除噪声后的垃圾短信模板文本进行分词处理,将垃圾短信模板文本拆分为单个的分词,并去除所得到的词组中的停用词。去除的停用词包括:副词、介词、语气助词、连接词等。Then, the calculation module 500 performs word segmentation on the obtained noise-removed spam template text, splits the spam template template text into individual word segments, and removes the stop words in the obtained phrase. The removed stop words include: adverbs, prepositions, modal particles, conjunctions, and so on.
然后,计算模块500将得到的单个的分词按照字符的编码顺序进行排序,得到垃圾短信模板的特征向量。在本实施例中,使用UTF-8编码,将得到的单个的分词转化为UTF-8编码,得到表征所有分词的UTF-8编码;按照UTF-8编码的顺序,将得到的所有UTF-8编码进行排序,得到垃圾短信模板的特征向量。Then, the calculation module 500 sorts the obtained individual word segments according to the coding order of the characters, and obtains the feature vector of the spam short message template. In this embodiment, UTF-8 encoding is used, and the obtained single word segment is converted into UTF-8 encoding, and UTF-8 encoding for characterizing all word segments is obtained; all UTF-8s obtained in the order of UTF-8 encoding are obtained. The code is sorted to obtain the feature vector of the spam template.
列表模块600,设置为根据所述垃圾短信模板的特征向量,筛选出具有相同特征向量的垃圾短信模板,形成列表供查找。The list module 600 is configured to filter out spam templates having the same feature vector according to the feature vector of the spam template, and form a list for searching.
在计算模块500得到所有垃圾短信模板的特征向量后,列表模块600以垃圾短信模板的特征向量为关键词,保存所有的垃圾短信模板。After the calculation module 500 obtains the feature vectors of all the spam templates, the list module 600 saves all the spam templates by using the feature vectors of the spam templates as keywords.
在保存垃圾短信模板时,列表模块600将特征向量相同的垃圾短信模板保存到同一列表中,得到具有相同特征向量的垃圾短信模板列表,以特征向量为关键词进行保存。 When the spam template is saved, the list module 600 saves the spam templates with the same feature vector to the same list, and obtains a list of spam templates with the same feature vector, and saves the feature vector as a keyword.
由此,列表模块600得到垃圾短信模板列表,可供后续查找与接收到的短信匹配的垃圾短信模板时使用。Thus, the list module 600 obtains a list of spam short message templates, which can be used for subsequent searching for spam templates matching the received short messages.
在本实施例中,获取模块400首先获取用户输入的垃圾短信模板和垃圾短信模板的类型,然后针对获取的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置相应的拦截频次策略,得到差异化的拦截频次策略。计算模块500获取用户输入的垃圾短信模板的特征向量,列表模块600得到具有相同特征向量的垃圾短信模板列表,以供后续查找与接收到的短信匹配的垃圾短信模板使用。本实施例中运营商用户可根据实际需要,针对不同的垃圾短信模板设置不同的拦截频次策略,实现了在运营商服务器收到短信时,可使用差异化的拦截频次策略对收到的短信进行拦截处理,满足了运营商用户对不同短信的拦截需求。In this embodiment, the obtaining module 400 first acquires the type of the spam message template and the spam message template input by the user, and then sets the corresponding interception frequency for the type of the spam message template, the calling number, the called number, and the sending time period. Strategy, get differentiated interception frequency strategy. The calculation module 500 obtains the feature vector of the spam template input by the user, and the list module 600 obtains the spam message template list with the same feature vector for subsequent use to search for the spam message template matched with the received message. In this embodiment, the operator user can set different interception frequency policies for different spam short message templates according to actual needs, so that when the operator server receives the short message, the differentiated interception frequency policy can be used to perform the received short message. The interception process satisfies the interception requirements of operators for different SMS messages.
进一步的,参照图8,本发明短信拦截装置第三实施例提供一种短信拦截装置,基于上述图7所示的实施例,所述匹配模块200包括:Further, referring to FIG. 8, the third embodiment of the short message intercepting apparatus of the present invention provides a short message intercepting apparatus. Based on the embodiment shown in FIG. 7, the matching module 200 includes:
查找单元210,设置为根据所述短信的特征向量,查找具有相同特征向量的垃圾短信模板列表。The searching unit 210 is configured to search for a spam short message template list having the same feature vector according to the feature vector of the short message.
在接收模块100得到短信的特征向量后,查找单元210以短信的特征向量为关键词,查找内存中具有相同特征向量的垃圾短信模板列表。其中,垃圾短信模板列表以特征向量为关键词进行保存。After the receiving module 100 obtains the feature vector of the short message, the searching unit 210 searches for the spam short message template list having the same feature vector in the memory by using the feature vector of the short message as a key. The spam template list is saved by using the feature vector as a keyword.
相似度计算单元220,设置为若找到具有相同特征向量的垃圾短信模板列表,则获取所述垃圾短信模板列表中,与所述短信的相似度最大的垃圾短信模板。The similarity calculation unit 220 is configured to obtain a spam message template having the same similarity as the short message template in the junk message template list if the junk message template list having the same feature vector is found.
在查找单元210查找到与短信具有相同特征向量的垃圾短信模板列表后,相似度计算单元220分别计算列表中所有垃圾短信模板与短信的相似度。本实施使用最小编辑算法(Minimum edit distance)举例计算垃圾短信模板与短信的相似度,具体的,令短信为字符串a,垃圾短信模板为字符串b,然后:After the searching unit 210 finds the spam short message template list having the same feature vector as the short message, the similarity calculating unit 220 calculates the similarity of all the spam short message templates and the short message in the list. This example uses the minimum edit algorithm (Minimum edit distance) to calculate the similarity between the spam SMS template and the short message. Specifically, the short message is the string a, the spam template is the string b, and then:
计算从字符串a到字符串b需要经过的编辑次数,每次编辑只能增加、删除或替换1个字符,得到从字符串a到字符串b的最小编辑次数c,也即从字符串a到字符串b的最小编辑距离:c。Calculate the number of edits that need to pass from the string a to the string b. Each edit can only add, delete, or replace one character, and get the minimum number of edits c from the string a to the string b, that is, from the string a. The minimum edit distance to the string b: c.
然后,取字符串a的长度为L,垃圾短信模板与短信的相似度为d,则有:Then, the length of the string a is L, and the similarity between the spam template and the short message is d, then:
Figure PCTCN2016076791-appb-000002
Figure PCTCN2016076791-appb-000002
由此,得到垃圾短信模板与短信的相似度。 Thereby, the similarity between the spam template and the short message is obtained.
然后,相似度计算单元220获取与短信的相似度最大的垃圾短信模板,得到最大相似度。Then, the similarity calculation unit 220 acquires the spam template with the greatest similarity with the short message, and obtains the maximum similarity.
判断单元230,设置为判断所述最大相似度是否满足阈值。The determining unit 230 is configured to determine whether the maximum similarity satisfies a threshold.
在相似度计算单元220得到垃圾短信模板与短信的最大相似度后,判断单元230判断所得到的最大相似度是否满足预设的阈值。After the similarity calculation unit 220 obtains the maximum similarity between the spam short message template and the short message, the determining unit 230 determines whether the obtained maximum similarity satisfies a preset threshold.
具体的,若最大相似度大于或等于预设的阈值,则判断单元230判定最大相似度满足预设的阈值;Specifically, if the maximum similarity is greater than or equal to the preset threshold, the determining unit 230 determines that the maximum similarity meets the preset threshold;
若最大相似度小于预设的阈值,则判断单元230判定最大相似度不满足预设的阈值。If the maximum similarity is less than the preset threshold, the determining unit 230 determines that the maximum similarity does not satisfy the preset threshold.
匹配单元240,设置为若所述最大相似度满足阈值,则获取与所述短信的相似度最大的垃圾短信模板,作为与所述短信匹配的垃圾短信模板。The matching unit 240 is configured to acquire a spam short message template having the greatest similarity with the short message as the spam short message template matching the short message if the maximum similarity satisfies the threshold.
若垃圾短信模板与短信最大相似度满足预设的阈值,则判定短信为垃圾短信。If the maximum similarity between the spam short message template and the short message meets the preset threshold, the short message is determined to be a spam message.
然后,匹配单元240获取与短信的相似度最大的垃圾短信模板,作为与短信匹配的垃圾短信模板Then, the matching unit 240 obtains the spam template with the greatest similarity with the short message as the spam template matching the short message.
由此,匹配单元240得到与短信匹配的垃圾短信模板。Thereby, the matching unit 240 obtains a spam template that matches the short message.
在本实施例中,首先查找单元210获取与接收到的短信特征向量相同的垃圾短信模板列表,然后相似度计算单元220计算垃圾短信模板列表中各垃圾短信模板与短信的相似度,得到与短信的相似度最大的垃圾短信模板,和最大相似度;判断单元230判断所得到的最大相似度是否满足阈值;最大相似度满足阈值时,匹配单元240获取与短信的相似度最大的垃圾短信模,作为与短信匹配的垃圾短信模板。本实施例通过最大相似度与阈值的判定,得到垃圾短信模板列表中与接收到的短信最相似的垃圾短信模板,为后续获取最匹配的拦截频次策略提供了基础。In this embodiment, the search unit 210 first obtains the same spam message template list as the received short message feature vector, and then the similarity calculation unit 220 calculates the similarity between each spam short message template and the short message in the spam short message template list, and obtains the short message. The spam template with the greatest similarity, and the maximum similarity; the determining unit 230 determines whether the obtained maximum similarity satisfies the threshold; when the maximum similarity satisfies the threshold, the matching unit 240 obtains the spam template with the greatest similarity with the short message. As a spam template that matches the text message. In this embodiment, the spam short message template that is most similar to the received short message template in the spam short message template list is obtained by determining the maximum similarity and the threshold value, which provides a basis for obtaining the most matching interception frequency strategy.
进一步的,参照图6,本发明短信拦截方法第四实施例提供一种短信拦截方法,基于上述图6至图8中所示任一实施例(本实施例以图6为例),所述拦截模块300还设置为,Further, referring to FIG. 6, the fourth embodiment of the short message interception method of the present invention provides a short message interception method, which is based on any of the embodiments shown in FIG. 6 to FIG. 8 (the present embodiment is illustrated by using FIG. 6). The intercepting module 300 is also configured to
若未找到与所述短信匹配的垃圾短信模板,则采用默认的垃圾短信模板对所述短信进行拦截处理。If the spam template matching the short message is not found, the default spam template is used to intercept the short message.
在匹配模块200根据短信的特征向量,查找具有相同特征向量的垃圾短信模板时,若未找到,则视为未找到与短信匹配的垃圾短信模板;When the matching module 200 searches for the spam short message template having the same feature vector according to the feature vector of the short message, if not found, the garbage message template matching the short message is not found;
若匹配模块200找到多个与短信具有相同特征向量的垃圾短信模板,则分别计算所有找 到的垃圾短信模板与短信的相似度,获取与短信的相似度最大的垃圾短信模板;然后,判断最大相似度是否满足预设的阈值:若最大相似度不满足预设的阈值,则视为未找到与短信匹配的垃圾短信模板。If the matching module 200 finds a plurality of spam templates having the same feature vector as the short message, respectively, all the calculations are calculated. The similarity between the spam template and the short message is obtained, and the spam template with the greatest similarity with the short message is obtained; then, it is determined whether the maximum similarity satisfies the preset threshold: if the maximum similarity does not satisfy the preset threshold, it is regarded as No spam template matching the text message was found.
当匹配模块200未找到与短信匹配的垃圾短信模板时,拦截模块300采用默认的垃圾短信模板对所述短信进行拦截处理。When the matching module 200 does not find the spam template that matches the short message, the intercepting module 300 intercepts the short message by using the default spam template.
具体的,作为一种实施方式,拦截模块300可以根据默认的垃圾短信模板和预设的过滤条件,查找并获取相应的拦截频次策略,对短信进行拦截处理。Specifically, as an implementation manner, the intercepting module 300 can find and obtain a corresponding interception frequency policy according to a default spam template and a preset filtering condition, and intercept the short message.
作为另一种实施方式,拦截模块300可以采用默认的垃圾短信模板,获取默认的拦截频次策略,对短信进行拦截处理。As another implementation manner, the intercepting module 300 may adopt a default spam template to obtain a default intercept frequency policy and intercept the short message.
在本实施例中,匹配模块200未找到与短信匹配的垃圾短信模板时,拦截模块300采用默认的垃圾短信模板对短信进行拦截处理,使运营商服务器对接收到的短信均能进行拦截处理,实现了对短信的差异化拦截处理,满足了运营商用户的需求。In this embodiment, when the matching module 200 does not find the spam template that matches the short message, the intercepting module 300 uses the default spam template to intercept the short message, so that the operator server can intercept the received short message. The differentiated interception processing of the short message is realized, which satisfies the needs of the operator user.
进一步的,参照图9,本发明短信拦截方法第四实施例提供一种短信拦截方法,基于上述图6至图8中所示任一实施例(本实施例以图6为例),所述拦截模块300包括:Further, referring to FIG. 9, the fourth embodiment of the short message interception method of the present invention provides a short message interception method, which is based on any of the embodiments shown in FIG. 6 to FIG. 8 (the present embodiment is illustrated by using FIG. 6). The intercepting module 300 includes:
类型单元310,设置为获取与所述短信匹配的垃圾短信模板的类型;将与所述短信匹配的垃圾短信模板的类型作为所述短信的类型。The type unit 310 is configured to obtain a type of the spam template that matches the short message, and use the type of the spam template that matches the short message as the type of the short message.
本实施例与上述图6至图8所示的任一实施例均可组合实施;本实施例以与图6所示的实施例组合实施,进行举例说明。This embodiment can be implemented in combination with any of the above embodiments shown in FIG. 6 to FIG. 8; this embodiment is implemented in combination with the embodiment shown in FIG.
在本实施例中,通过比较短信和垃圾短信模板的相似度,找出一条与该短信相似度最大,且超过设定的相似度阈值的垃圾短信模板,以此条垃圾短信模板的类型做为该短信的类型。然后根据短信不同的类型,结合预设的过滤条件如主叫号码和被叫号码等因素,查找对应的拦截策略,以实现垃圾短信的差异化拦截。In this embodiment, by comparing the similarity between the short message and the spam short message template, a spam short message template with the greatest similarity to the short message and exceeding the set similarity threshold is found, and the type of the spam short message template is used as the The type of SMS. Then, according to different types of short messages, combined with preset filtering conditions such as calling number and called number, the corresponding intercepting strategy is searched to realize differential interception of spam messages.
具体的,首先,在匹配模块200获取与短信匹配的垃圾短信模板后,类型单元310获取此垃圾短信模板的类型,将短信视为此垃圾短信模板类型的垃圾短信。需要说明的是,垃圾短信模板的类型为预先设置的。Specifically, first, after the matching module 200 obtains the spam template that matches the short message, the type unit 310 obtains the type of the spam template, and regards the short message as the spam message of the spam template type. It should be noted that the type of spam template is preset.
然后,类型单元310以此垃圾短信模板的类型,作为短信的类型。Then, the type unit 310 uses the type of the spam template as the type of the short message.
策略单元320,设置为根据所述短信的类型,以及预设的过滤条件,获取相应的拦截频次策略。 The policy unit 320 is configured to obtain a corresponding interception frequency policy according to the type of the short message and the preset filtering condition.
在类型单元310获取短信的类型后,策略单元320根据短信的类型和预设的过滤条件,获取相应的拦截频次策略。After the type unit 310 obtains the type of the short message, the policy unit 320 acquires the corresponding intercept frequency policy according to the type of the short message and the preset filtering condition.
具体的,作为一种实施方式,以预设的过滤条件为主叫号码、被叫号码和发送时间为例,策略单元320依次根据短信的类型、短信的主叫号码、短信的被叫号码和短信的发送时间,查找拦截频次策略。详细查找过程如下说明:Specifically, as an implementation manner, taking the preset filtering condition as the calling number, the called number, and the sending time as an example, the policy unit 320 sequentially according to the type of the short message, the calling number of the short message, the called number of the short message, and The sending time of the short message, find the interception frequency strategy. The detailed search process is as follows:
首先,根据短信的类型,获取该类型对应的全部拦截频次策略;First, according to the type of the short message, all the interception frequency policies corresponding to the type are obtained;
然后,根据短信的主叫号码,获取短信的类型对应的全部拦截频次策略中,该主叫号码所属用户组对应的全部拦截频次策略;Then, according to the calling number of the short message, all the interception frequency policies corresponding to the user group to which the calling number belongs are obtained in all the interception frequency policies corresponding to the type of the short message;
然后,根据短信的被叫号码,获取短信的类型和主叫号码所属用户组对应的全部拦截频次策略中,该被叫号码所属用户组对应的全部拦截频次策略;Then, according to the called number of the short message, the interception frequency policy corresponding to the user group to which the called number belongs is obtained in the total interception frequency policy corresponding to the type of the short message and the user group to which the calling number belongs;
然后,根据短信的发送时间,获取短信的类型、主叫号码所属用户组和被叫号码所属用户组应的全部拦截频次策略中,该发送时间所属时间段对应的拦截频次策略。Then, according to the sending time of the short message, the interception frequency policy corresponding to the time zone to which the sending time belongs is obtained in the total interception frequency policy of the type of the short message, the user group to which the calling number belongs, and the user group to which the called number belongs.
若未找到短信的拦截频次策略,则获取默认的拦截频次策略。If the interception frequency policy of the short message is not found, the default intercept frequency policy is obtained.
由此,策略单元320得到短信的拦截频次策略。Thus, the policy unit 320 obtains the interception frequency policy of the short message.
频次单元330,设置为根据所述短信的类型和主叫号码,获取所述主叫号码发送此类型短信的发送频次。The frequency unit 330 is configured to acquire, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number.
在策略单元320获取短信的拦截频次策略后,频次单元330根据短信的类型和主叫号码,获取该主叫号码发送此类型短信的发送频次。After the policy unit 320 obtains the interception frequency policy of the short message, the frequency unit 330 obtains the transmission frequency of the short message sent by the calling number according to the type of the short message and the calling number.
具体的,作为一种实施方式,短信的发送频次采用滑窗的方式进行保存,也即在本实施例中,仅能获取一段时间内该主叫号码发送此类型短信的发送频次。其中,滑窗的大小可由用户根据实际需要灵活设定。Specifically, as an implementation manner, the sending frequency of the short message is saved by using a sliding window. In this embodiment, only the sending frequency of the short message is sent by the calling number within a certain period of time. The size of the sliding window can be flexibly set by the user according to actual needs.
因此,频次单元330获取存储的该主叫号码发送此类型短信的发送频次后,将所得到的频次加1,得到该主叫号码发送此类型短信的发送频次。Therefore, the frequency unit 330 obtains the stored frequency of the calling number and transmits the type of the short message, and adds 1 to the obtained frequency to obtain the sending frequency of the short message sent by the calling number.
判断单元340,设置为判断所述主叫号码发送此类型短信的发送频次是否超过所述拦截频次策略的拦截频次。The determining unit 340 is configured to determine whether the sending frequency of the calling number of the calling number exceeds the intercepting frequency of the intercepting frequency policy.
在策略单元320得到短信的拦截策略和频次单元330根据短信的类型和主叫号码得到该主叫号码发送此类型短信的发送频次后,判断单元340判断该主叫号码发送此类型短信的发送频次是否超过拦截频次策略的拦截频次阈值,也即判断短信是否达到被拦截的条件。After the interception policy and the frequency unit 330 of the short message obtained by the policy unit 320 obtains the transmission frequency of the short message according to the type of the short message and the calling number, the determining unit 340 determines that the calling number sends the frequency of sending the short message of the type. Whether the interception frequency threshold of the interception frequency policy is exceeded, that is, whether the short message is reached or not is determined.
具体的,若该主叫号码发送此类型短信的发送频次大于或等于拦截频次策略的拦截频次阈值,则判定该主叫号码发送此类型短信的发送频次超过拦截频次策略的拦截频次阈值,该短信达到被拦截的条件; Specifically, if the sending frequency of the calling number sent by the calling number is greater than or equal to the intercepting frequency threshold of the intercepting frequency policy, determining that the sending frequency of the calling number of the calling number exceeds the intercepting frequency threshold of the intercepting frequency policy, the short message Reach the conditions of being intercepted;
若该主叫号码发送此类型短信的发送频次小于拦截频次策略的拦截频次阈值,则判定该主叫号码发送此类型短信的发送频次不超过拦截频次策略的拦截频次阈值,该短信未达到被拦截的条件。If the sending frequency of the calling number sent by the calling number is less than the intercepting frequency threshold of the intercepting frequency policy, determining that the sending frequency of the sending type of the calling number does not exceed the intercepting frequency threshold of the intercepting frequency policy, the short message does not reach the intercepted conditions of.
拦截单元350,设置为若所述主叫号码发送此类型短信的发送频次超过所述拦截频次策略的拦截频次,则拦截所述短信。The intercepting unit 350 is configured to intercept the short message if the sending frequency of the calling number sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy.
若该主叫号码发送此类型短信的发送频次超过拦截频次策略的拦截频次阈值,该短信已达到被拦截的条件,则拦截单元350控制拦截该短信。If the calling number of the calling number is more than the intercepting frequency threshold of the interception frequency policy, and the short message has reached the intercepted condition, the intercepting unit 350 controls to intercept the short message.
放行单元360,设置为若所述主叫号码发送此类型短信的发送频次未超过所述拦截频次策略的拦截频次,则放行所述短信。The releasing unit 360 is configured to release the short message if the sending frequency of the calling number sent by the calling number does not exceed the intercepting frequency of the intercepting frequency policy.
若该主叫号码发送此类型短信的发送频次未超过拦截频次策略的拦截频次阈值,该短信未达到被拦截的条件,则放行单元360控制放行该短信。If the sending frequency of the calling number sent by the calling number does not exceed the intercept frequency threshold of the interception frequency policy, and the short message does not reach the intercepted condition, the release unit 360 controls the release of the short message.
在本实施例中,首先类型单元310以与短信匹配的垃圾短信模板类型作为短信的类型;策略单元320根据短信的类型和过滤条件,获取相应的拦截频次策略;然后频次单元330根据短信的类型和主叫号码获取该主叫号码发送此类型短信的发送频次;判断单元340判断该主叫号码发送此类型短信的发送频次是否超过拦截频次策略的拦截频次:若超过,则拦截单元350拦截短信;若未超过,则放行单元360放行短信。本实施例实现了针对不同类型的短信和过滤条件,获取相应的拦截频次策略,进行差异化的拦截,满足了运营商用户的需求。In this embodiment, the type unit 310 first uses the spam template type matching the short message as the type of the short message; the policy unit 320 acquires the corresponding intercept frequency policy according to the type of the short message and the filtering condition; and then the frequency unit 330 according to the type of the short message. And the calling number obtains the sending frequency of the calling number to send the short message; the determining unit 340 determines whether the sending frequency of the calling number of the calling number exceeds the intercepting frequency of the intercepting frequency policy: if exceeded, the intercepting unit 350 intercepts the short message. If not exceeded, the release unit 360 releases the short message. This embodiment implements different interception frequency policies for different types of short messages and filtering conditions, and performs differentiated interception to meet the needs of the operator users.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.
工业实用性Industrial applicability
本发明实施例提出的一种短信拦截方法和装置,通过运营商服务器接收短信,获取短信的特征向量,根据短信的特征向量,查找与短信匹配的垃圾短信模板,然后,根据与短信匹配的垃圾短信模板和过滤条件,使用相应的拦截频次策略对短信进行拦截处理。本发明实施例对不同类型的短信进行不同策略的拦截处理,实现了对短信的差异化拦截,满足了运营商的需求。 The method and device for intercepting a short message according to an embodiment of the present invention obtains a short message by a carrier server, acquires a feature vector of the short message, searches for a spam message template matching the short message according to the feature vector of the short message, and then, according to the garbage matched with the short message SMS templates and filtering conditions, using the corresponding interception frequency strategy to intercept SMS messages. The embodiments of the present invention perform different types of short message interception processing on different types of short messages, and implement differentiated interception of short messages to meet the needs of operators.

Claims (10)

  1. 一种短信拦截方法,所述短信拦截方法包括以下步骤:A short message intercepting method, the short message intercepting method includes the following steps:
    接收短信,并获取所述短信的特征向量;Receiving a short message and obtaining a feature vector of the short message;
    根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板;Searching for a spam template matching the short message according to the feature vector of the short message;
    根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。And according to the spam template matched with the short message, and the preset filtering condition, the short message is intercepted by using a corresponding intercept frequency policy.
  2. 如权利要求1所述的短信拦截方法,其中,所述预设的过滤条件包括:短信的主叫号码、被叫号码和发送时间,所述接收短信,并获取所述短信的特征向量的步骤之前,包括:The method for intercepting a short message according to claim 1, wherein the preset filtering condition comprises: a calling number of the short message, a called number, and a sending time, and the step of receiving the short message and acquiring the feature vector of the short message Previously, including:
    获取用户输入的垃圾短信模板和垃圾短信模板的类型;Obtain the type of spam template and spam template input by the user;
    根据所述用户输入的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置拦截频次策略;Setting an interception frequency policy according to the type of the spam template input by the user, the calling number, the called number, and the sending time period;
    获取所述用户输入的垃圾短信模板的特征向量;Obtaining a feature vector of the spam template input by the user;
    根据所述垃圾短信模板的特征向量,筛选出具有相同特征向量的垃圾短信模板,形成列表供查找。According to the feature vector of the spam message template, the spam message templates with the same feature vector are filtered out to form a list for searching.
  3. 如权利要求2所述的短信拦截方法,其中,所述根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板的步骤包括:The method for intercepting a short message according to claim 2, wherein the step of searching for a spam template matching the short message according to the feature vector of the short message comprises:
    根据所述短信的特征向量,查找具有相同特征向量的垃圾短信模板列表;Finding a list of spam short message templates having the same feature vector according to the feature vector of the short message;
    若找到具有相同特征向量的垃圾短信模板列表,则获取所述垃圾短信模板列表中,与所述短信的相似度最大的垃圾短信模板;If a spam short message template list having the same feature vector is found, obtaining a spam short message template having the greatest similarity with the short message in the spam short message template list;
    判断所述最大相似度是否满足阈值;Determining whether the maximum similarity meets a threshold;
    若所述最大相似度满足阈值,则获取与所述短信的相似度最大的垃圾短信模板,作为与所述短信匹配的垃圾短信模板。If the maximum similarity satisfies the threshold, the spam template with the greatest similarity with the short message is obtained as a spam template matching the short message.
  4. 如权利要求1、2或3所述的短信拦截方法,其中,所述根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板的步骤之后,还包括:The method for intercepting a short message according to claim 1, 2 or 3, wherein the step of searching for a spam template matching the short message according to the feature vector of the short message further comprises:
    若未找到与所述短信匹配的垃圾短信模板,则采用默认的垃圾短信模板对所述短信进行拦截处理。If the spam template matching the short message is not found, the default spam template is used to intercept the short message.
  5. 如权利要求1、2或3所述的短信拦截方法,其中,所述根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理的步骤包括:The short message interception method according to claim 1, 2 or 3, wherein the SMS is intercepted according to a spam template matched with the short message and a preset filtering condition by using a corresponding intercept frequency policy The steps include:
    获取与所述短信匹配的垃圾短信模板的类型; Obtaining a type of spam template that matches the short message;
    将与所述短信匹配的垃圾短信模板的类型作为所述短信的类型;The type of the spam template matched with the short message is used as the type of the short message;
    根据所述短信的类型,以及预设的过滤条件,获取相应的拦截频次策略;Obtaining a corresponding interception frequency policy according to the type of the short message and the preset filtering condition;
    根据所述短信的类型和主叫号码,获取所述主叫号码发送此类型短信的发送频次;Obtaining, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number;
    判断所述主叫号码发送此类型短信的发送频次是否超过所述拦截频次策略的拦截频次;Determining whether the sending frequency of the calling number sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy;
    若所述主叫号码发送此类型短信的发送频次超过所述拦截频次策略的拦截频次,则拦截所述短信;If the sending frequency of the calling number sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy, intercepting the short message;
    若所述主叫号码发送此类型短信的发送频次未超过所述拦截频次策略的拦截频次,则放行所述短信。If the sending frequency of the calling number sent by the calling number does not exceed the intercepting frequency of the intercepting frequency policy, the short message is released.
  6. 一种短信拦截装置,所述短信拦截装置包括:A short message intercepting device, the short message intercepting device comprising:
    接收模块,设置为接收短信,并获取所述短信的特征向量;a receiving module, configured to receive a short message, and obtain a feature vector of the short message;
    匹配模块,设置为根据所述短信的特征向量,查找与所述短信匹配的垃圾短信模板;a matching module, configured to search for a spam template matching the short message according to the feature vector of the short message;
    拦截模块,设置为根据与所述短信匹配的垃圾短信模板,以及预设的过滤条件,使用相应的拦截频次策略对所述短信进行拦截处理。The intercepting module is configured to intercept the short message according to the spam template matched with the short message and the preset filtering condition by using a corresponding intercept frequency policy.
  7. 如权利要求6所述的短信拦截装置,其中,所述预设的过滤条件包括:短信的主叫号码、被叫号码和发送时间,所述短信拦截装置还包括:The short message intercepting device of claim 6, wherein the preset filtering condition comprises: a calling number of the short message, a called number, and a sending time, and the short message intercepting device further comprises:
    获取模块,设置为获取用户输入的垃圾短信模板和垃圾短信模板的类型;根据所述用户输入的垃圾短信模板的类型、主叫号码、被叫号码和发送时间段设置拦截频次策略;Obtaining a module, configured to obtain a type of the spam message template and the spam message template input by the user; and set an interception frequency policy according to the type of the spam message template input by the user, the calling number, the called number, and the sending time period;
    计算模块,设置为获取所述用户输入的垃圾短信模板的特征向量;a calculation module, configured to acquire a feature vector of the spam template input by the user;
    列表模块,设置为根据所述垃圾短信模板的特征向量,筛选出具有相同特征向量的垃圾短信模板,形成列表供查找。The list module is configured to filter out spam templates having the same feature vector according to the feature vector of the spam template, and form a list for searching.
  8. 如权利要求6所述的短信拦截装置,其中,所述匹配模块包括:The short message intercepting device of claim 6, wherein the matching module comprises:
    查找单元,设置为根据所述短信的特征向量,查找具有相同特征向量的垃圾短信模板列表;a searching unit, configured to search for a spam short message template list having the same feature vector according to the feature vector of the short message;
    相似度计算单元,设置为若找到具有相同特征向量的垃圾短信模板列表,则获取所述垃圾短信模板列表中,与所述短信的相似度最大的垃圾短信模板;The similarity calculation unit is configured to obtain a spam short message template having the same similarity as the short message template in the spam short message template list if the spam short message template list having the same feature vector is found;
    判断单元,设置为判断所述最大相似度是否满足阈值;a determining unit, configured to determine whether the maximum similarity meets a threshold;
    匹配单元,设置为若所述最大相似度满足阈值,则获取与所述短信的相似度最大的垃圾短信模板,作为与所述短信匹配的垃圾短信模板。 The matching unit is configured to acquire a spam template having the greatest similarity with the short message as the spam template matched with the short message if the maximum similarity satisfies the threshold.
  9. 如权利要求6、7或8所述的短信拦截装置,其中,所述拦截模块还设置为,The short message intercepting device according to claim 6, 7 or 8, wherein the intercepting module is further configured to
    若未找到与所述短信匹配的垃圾短信模板,则采用默认的垃圾短信模板对所述短信进行拦截处理。If the spam template matching the short message is not found, the default spam template is used to intercept the short message.
  10. 如权利要求6、7或8所述的短信拦截装置,其中,所述拦截模块包括:The short message intercepting device according to claim 6, 7 or 8, wherein the intercepting module comprises:
    类型单元,设置为获取与所述短信匹配的垃圾短信模板的类型;将与所述短信匹配的垃圾短信模板的类型作为所述短信的类型;a type unit, configured to obtain a type of a spam template that matches the short message; and use a type of the spam template that matches the short message as a type of the short message;
    策略单元,设置为根据所述短信的类型,以及预设的过滤条件,获取相应的拦截频次策略;The policy unit is configured to obtain a corresponding interception frequency policy according to the type of the short message and a preset filtering condition;
    频次单元,设置为根据所述短信的类型和主叫号码,获取所述主叫号码发送此类型短信的发送频次;The frequency unit is configured to obtain, according to the type of the short message and the calling number, the sending frequency of the short message sent by the calling number;
    判断单元,设置为判断所述主叫号码发送此类型短信的发送频次是否超过所述拦截频次策略的拦截频次;a determining unit, configured to determine whether the sending frequency of the type of short message sent by the calling number exceeds an intercepting frequency of the intercepting frequency policy;
    拦截单元,设置为若所述主叫号码发送此类型短信的发送频次超过所述拦截频次策略的拦截频次,则拦截所述短信;The intercepting unit is configured to intercept the short message if the sending frequency of the type of short message sent by the calling number exceeds the intercepting frequency of the intercepting frequency policy;
    放行单元,设置为若所述主叫号码发送此类型短信的发送频次未超过所述拦截频次策略的拦截频次,则放行所述短信。 The release unit is configured to release the short message if the sending frequency of the type of the short message sent by the calling number does not exceed the intercepting frequency of the intercepting frequency policy.
PCT/CN2016/076791 2015-08-18 2016-03-18 Short message interception method and device WO2016177148A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510508118.X 2015-08-18
CN201510508118.XA CN106470405A (en) 2015-08-18 2015-08-18 SMS interception method and device

Publications (1)

Publication Number Publication Date
WO2016177148A1 true WO2016177148A1 (en) 2016-11-10

Family

ID=57217353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076791 WO2016177148A1 (en) 2015-08-18 2016-03-18 Short message interception method and device

Country Status (2)

Country Link
CN (1) CN106470405A (en)
WO (1) WO2016177148A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113840246A (en) * 2020-06-23 2021-12-24 深圳艾派网络科技股份有限公司 Junk short message filtering method and system and computer readable storage medium
CN114786184A (en) * 2022-06-21 2022-07-22 中国信息通信研究院 Method and device for generating phishing message intercepting template

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108064030A (en) * 2017-11-14 2018-05-22 北京百悟科技有限公司 SMS interception method and device
CN109996232A (en) * 2017-12-31 2019-07-09 中国移动通信集团辽宁有限公司 Method, apparatus, equipment and the medium of authentication message legitimacy identification
CN112714447A (en) * 2020-12-22 2021-04-27 南京翼启莱信息技术有限公司 Platform short message purification method based on mobile phone number and short message content dual-mode detection
CN113453231A (en) * 2021-06-25 2021-09-28 亚信创新技术(南京)有限公司 Anti-spam short message device, system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771966A (en) * 2010-03-11 2010-07-07 上海粱江通信系统股份有限公司 Keywords and frequency based method for identifying spam message sources
US7756535B1 (en) * 2006-07-07 2010-07-13 Trend Micro Incorporated Lightweight content filtering system for mobile phones
CN101784022A (en) * 2009-01-16 2010-07-21 北京炎黄新星网络科技有限公司 Method and system for filtering and classifying short messages
US8141152B1 (en) * 2007-12-18 2012-03-20 Avaya Inc. Method to detect spam over internet telephony (SPIT)
CN102547623A (en) * 2010-12-08 2012-07-04 中国电信股份有限公司 Junk short message processing method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7756535B1 (en) * 2006-07-07 2010-07-13 Trend Micro Incorporated Lightweight content filtering system for mobile phones
US8141152B1 (en) * 2007-12-18 2012-03-20 Avaya Inc. Method to detect spam over internet telephony (SPIT)
CN101784022A (en) * 2009-01-16 2010-07-21 北京炎黄新星网络科技有限公司 Method and system for filtering and classifying short messages
CN101771966A (en) * 2010-03-11 2010-07-07 上海粱江通信系统股份有限公司 Keywords and frequency based method for identifying spam message sources
CN102547623A (en) * 2010-12-08 2012-07-04 中国电信股份有限公司 Junk short message processing method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113840246A (en) * 2020-06-23 2021-12-24 深圳艾派网络科技股份有限公司 Junk short message filtering method and system and computer readable storage medium
CN114786184A (en) * 2022-06-21 2022-07-22 中国信息通信研究院 Method and device for generating phishing message intercepting template
CN114786184B (en) * 2022-06-21 2022-09-16 中国信息通信研究院 Method and device for generating fraud-related short message interception template

Also Published As

Publication number Publication date
CN106470405A (en) 2017-03-01

Similar Documents

Publication Publication Date Title
WO2016177148A1 (en) Short message interception method and device
US10375093B1 (en) Suspicious message report processing and threat response
US11470029B2 (en) Analysis and reporting of suspicious email
CN103067896B (en) Method for filtering spam short messages and device
AU2014226654B2 (en) Document classification using multiscale text fingerprints
US11537751B2 (en) Using machine learning algorithm to ascertain network devices used with anonymous identifiers
WO2016082568A1 (en) Short message safe processing method and apparatus
WO2016164844A1 (en) Message report processing and threat prioritization
CN104640092A (en) Spam short message identifying method, client end, cloud server and system
CN103391547A (en) Information processing method and terminal
CN106095789A (en) A kind of message subscribing managing device and method
RU2701040C1 (en) Method and a computer for informing on malicious web resources
US20110123064A1 (en) Method for monitoring a picture or multimedia video pictures in a communication system
US7565445B2 (en) Systems and methods for categorizing network traffic content
CN106470150A (en) Relation chain storage method and device
EP3281144A1 (en) Message report processing and threat prioritization
US11599673B2 (en) Ascertaining network devices used with anonymous identifiers
US8935752B1 (en) System and method for identity consolidation
WO2016037489A1 (en) Method, device and system for monitoring rcs spam messages
CN110019892A (en) A kind of method and its system identifying harmful picture based on User ID
US9467401B1 (en) Enabling conext aware ehancement for automatic electronic mail reply to mitigate risk
CN109922444B (en) Spam message identification method and device
CN106911660B (en) Information management method and device
US20200204573A1 (en) Network security tool
CN105792213A (en) Information security check method, and terminal device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16789142

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16789142

Country of ref document: EP

Kind code of ref document: A1