WO2018107953A1 - 智能终端及其应用程序的自动分类方法 - Google Patents

智能终端及其应用程序的自动分类方法 Download PDF

Info

Publication number
WO2018107953A1
WO2018107953A1 PCT/CN2017/113012 CN2017113012W WO2018107953A1 WO 2018107953 A1 WO2018107953 A1 WO 2018107953A1 CN 2017113012 W CN2017113012 W CN 2017113012W WO 2018107953 A1 WO2018107953 A1 WO 2018107953A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
probability
features
classified
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/113012
Other languages
English (en)
French (fr)
Inventor
叶锌尧
王兵
冯科
赖一骏
胡亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Publication of WO2018107953A1 publication Critical patent/WO2018107953A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • G06F18/24155Bayesian classification

Definitions

  • the present invention relates to the field of intelligent electronic devices, and in particular, to an intelligent terminal and an automatic classification method thereof.
  • the embodiment of the present invention provides an automatic classification method for an intelligent terminal and an application program thereof, which does not need to rely on the big data support of the cloud server, and does not need to be built into the smart terminal, and the maintenance is simple and the portability is relatively simple. Strong, and the classification results are accurate.
  • An automatic classification method for an application includes: extracting valid features from profiles of a plurality of applications that have been divided into at least two categories; calculating a probability that each effective feature appears in each category; The probability of occurrence of each effective feature in each category and the naive Bayesian algorithm training to generate a naive Bayes classifier; extracting features from the profile of the application to be classified, and calculating the probability of occurrence of features in each category; The probability that the feature appears in each category is used as an input parameter of the naive Bayes classifier to obtain the largest one of the probabilities of the applications to be classified when the feature has the feature, thereby the application to be classified Divided into the most probable classification.
  • An intelligent terminal includes a processor and a memory connected to the processor, the memory is configured to store program instructions, and the processor is configured to:
  • the embodiment of the present invention only needs to sample the characteristics of the configuration files of multiple applications in the intelligent terminal, and combines the Naive Bayes algorithm to classify the applications to be classified, without relying on the big data support of the cloud server. There is no need to embed this part of big data in the intelligent terminal, and it can be represented as a pure software algorithm for classification, simple maintenance, strong portability, and accurate classification results.
  • FIG. 1 is a flow chart of an embodiment of an automatic classification method for an application of the present invention
  • FIG. 3 is a flow chart of an embodiment of an extraction method of initial features of the present invention.
  • FIG. 4 is a flow chart of an embodiment of a method for acquiring a probability of occurrence of an effective feature of the present invention in classification
  • FIG. 5 is a flow chart of an embodiment of a method for training a naive Bayes classifier according to the present invention
  • FIG. 6 is a flow chart of an embodiment of a classification identification method for an unknown application of the present invention.
  • FIG. 7 is a flow chart of another embodiment of an automatic classification method of an application of the present invention.
  • FIG. 8 is a schematic block diagram of an embodiment of a smart terminal according to the present invention.
  • FIG. 9 is a schematic diagram showing the hardware structure of an embodiment of the smart terminal of the present invention.
  • FIG. 1 illustrates an automatic classification method of an application according to an embodiment of the present invention.
  • the automatic classification method of the application may include steps S11 to S15.
  • S11 Extract valid features from profiles of multiple applications that have been divided into at least two categories.
  • S13 Generate a naive Bayes classifier according to the probability that each effective feature appears in each category and the naive Bayesian algorithm training.
  • S14 Extract features from the profile of the application to be classified, and calculate the probability that the features appear in each category.
  • the embodiment of the invention is equivalent to adding a function of automatically classifying an unknown application to the smart terminal, and the unknown application can be understood as an application downloaded from the Internet and installed.
  • the way to implement this function includes but is not limited to: taking a smart phone as an example, first, pre-programming a script or a program to add "unknown in the setting interface of the smart phone" The program is automatically classified" option; then, the user opens the option by sliding the slider. That is, the embodiment of the present invention can automatically perform the above steps S11 to S15 through a script or a program that can be run on the operating system of the smart terminal.
  • the above method can be divided into three phases: a first phase, a feature library is established, including steps S11 and S12; a second phase, training generates a naive Bayes classifier, including step S13; and a third phase, identifying a classification of an unknown application , including steps S14 and S15.
  • This embodiment can extract valid features from profiles of multiple applications.
  • a method of extracting valid features may include steps S21 and S22.
  • the classified plurality of applications include, but are not limited to, PMS (Plant Management System) acquired applications that have been downloaded and installed by the terminal, and these applications can be regarded as known classified applications.
  • PMS Plant Management System
  • the configuration file includes ID (Identification) information of each application, such as labelRes (application name address) and descriptionRes (application description information address), and obtains a reference address (also referred to as a first address) of the application. And use it as a valid address. In the case that the reference address cannot be obtained from the ID, the terminal can traverse the possible address of the application according to the operating system address rule, thereby obtaining a valid address.
  • ID Identity
  • labelRes application name address
  • descriptionRes application description information address
  • the effective address is actually a string of characters, and the terminal extracts the characters therein as an initial feature.
  • the terminal can adopt a corresponding extraction method for different languages. Specifically, the terminal can identify the difference between English and other languages by using ASCII (American Standard Code for Information Interchange) to filter out the effective addresses of the same language in the configuration file. Then, different word segmentation algorithms are used for different languages, and the initial features can be obtained after segmentation. That is to say, the language of the initial feature of the embodiment includes at least one of a plurality of types of languages.
  • FIG. 3 is a specific application example of the initial feature of the present invention.
  • the specific application implements the entire process of the foregoing embodiment of the present invention, and details are not described herein.
  • S22 Acquire an initial feature with the largest ratio of the forward probability to the reverse probability in each classification, and use the initial feature with the largest ratio as the effective feature.
  • this embodiment can create a plurality of folders, each folder is named as the package name of the application, and a one-to-one mapping relationship between the plurality of folders and each category is established.
  • the present embodiment calculates the probability that each classified application has a certain initial feature, that is, the probability that each effective feature appears in each category as the initial feature.
  • the forward probability, and the probability that the application that is not the classification possesses the initial feature is calculated as the inverse probability of the initial feature.
  • the initial feature is song as an example
  • the forward probability can be understood as the probability of having the character song in the classification Music
  • the inverse probability can be understood as having the character song in the classification other than the classification Music.
  • the probability The forward probability and the reverse probability are commonly used in the field of statistics. The calculation principle and process can be referred to the prior art, and will not be described here.
  • the present embodiment calculates the ratio of the forward probability to the inverse probability of each initial feature, and selects the initial feature with the largest ratio as the effective feature of the classification. This step avoids the repetition of a string as a valid feature in multiple categories to reduce subsequent impact on the classification of unknown applications.
  • FIG. 4 is a specific application example of calculating the probability that each effective feature appears in each category according to the present invention.
  • the specific application takes the positive probability of each effective feature as its probability of occurrence in each classification.
  • the present embodiment can display the aforementioned effective features in a list form, and the probability that each valid feature of the statistics appears in each category.
  • F 1 , F 2 , ... F n represent the respective effective features
  • C represents one of the classifications
  • F 1 F 2 ... F n ) represents when an unknown application owns F 1 , F 2 , ... F n these features are the probability of class C
  • C) represents the probability that class C has valid features F 1 , F 2 , ... F n
  • P(C) represents the probability of classification C in all classifications
  • P(F 1 F 2 ... F n ) represents the probability that all classifications have valid features F 1 , F 2 , . . .
  • C) indicates the probability of having the effective feature F 1 in the classification C
  • C) indicates the probability of having the effective feature F 2 in the classification C
  • C) indicates that the classification C has the effective feature F n The probability.
  • the probability that each effective feature appears in each classification is preferably converted to Logarithmic form. That is to say, the above-mentioned naive Bayesian relation is logarithmically transformed to obtain the following logarithmic relation:
  • This logarithmic relationship can be regarded as a naive Bayes classifier.
  • the log(P(C)) and the log(P(F 1 F 2 ... F n )) of each of the plurality of classifications are equal, so that only the logarithmic representation is required
  • Each of the classifications has the probability that the effective features F 1 , F 2 , ... F n are added separately, and the one with the largest sum is obtained, and the unknown application can be divided into the sum of the sum and the largest.
  • the present embodiment can obtain a forward probability that the unknown application is the sum of the sums of the sums when the effective features F 1 , F 2 , ...
  • F n are possessed, in other words, the relationship
  • the classification C in the formula is replaced with other classifications in the plurality of classifications, and the probability that the classification having the largest sum is not the sum of the effective features F 1 , F 2 , . . . F n , that is, the sum of the sum of the sums is obtained The inverse probability.
  • the feature is extracted from the configuration file of the application to be classified, and the extraction method of the feature is the same as the extraction method of the initial feature of the first stage, for example, the ID of the application first included in the configuration file.
  • the effective address is extracted from the information, and then the language is identified. Finally, the word segmentation algorithm corresponding to the recognized language is used to segment the character string of the effective address, thereby obtaining at least one feature.
  • the feature extracted in this stage belongs to a part of the effective feature of the first stage sampling, and the probability of occurrence of each feature extracted in each stage in each category can be obtained by combining the forward probability of the above effective feature.
  • the logarithmic relationship of the above-mentioned naive Bayes classifier can be expressed as:
  • FIG. 7 is a specific application example of an automatic classification method of an application program according to the present invention. This application example implements the entire process of the foregoing embodiments of the present invention, and details are not described herein.
  • the embodiment of the present invention only needs to sample the characteristics of the configuration files of multiple applications in the intelligent terminal, and combines the Naive Bayes algorithm to classify the applications to be classified, without relying on the big data support of the cloud server.
  • the above steps can be implemented by pure software algorithms, that is, The software-only algorithm implements classification, is simple to maintain, and has strong portability.
  • the above functions may be stored in an electronic device readable storage medium if implemented in the form of a software functional unit and sold or used as a separate product, that is, the embodiment of the present invention may be embodied in the form of a software product. It includes a number of instructions for causing a smart terminal to perform all or part of the steps of the method of the various embodiments of the present invention.
  • the terminal 80 may include an extraction module 81, a calculation module 82, a training generation module 83, and an application management module 84.
  • the extraction module 81 is configured to extract valid features from profiles of a plurality of applications that have been divided into at least two categories.
  • the calculation module 82 is configured to calculate the probability that each valid feature appears in each category.
  • the training generation module 83 is configured to generate a naive Bayes classifier based on the probability that each effective feature appears in each category and the naive Bayesian algorithm.
  • the extraction module 81 is also used to extract features from a configuration file of the application to be classified.
  • the calculation module 82 is also used to calculate the probability of occurrence of the feature in each category.
  • the application management module 84 is configured to use the probability that the feature appears in each category as an input parameter of the naive Bayes classifier to obtain the largest one of the probabilities of the applications to be classified when the feature has the feature. , thereby dividing the application to be classified into the most probable classification.
  • the extraction module 81 may be from multiple classified Initial features are extracted from the configuration file of the program, and initial features with the largest ratio of forward probability to reverse probability in each classification are obtained, so that the initial feature with the largest ratio is taken as an effective feature.
  • the language of the initial feature includes at least one of a plurality of languages.
  • the extraction module 81 can adopt a corresponding extraction method for different languages. Specifically, the language recognition unit 811 of the extraction module 81 performs language recognition on the configuration files of the plurality of applications, and then the extraction module 81 obtains initial features by using a corresponding word segmentation algorithm. . Based on this, the language recognition unit 811 can perform language recognition on the profile of the application to be classified, and the extraction module 81 applies the same feature extraction method to the recognized same language to obtain the feature.
  • the preferred training generation module 83 of the present embodiment presents each valid feature in each category.
  • the application management module 84 obtains the probability that the feature in logarithm form appears in each category, and adds the probability that the logarithmic form of the feature appears in each category, and compares The largest sum of the sums is obtained, thereby obtaining the largest one of the probabilities of the applications to be classified when the feature has the characteristics.
  • the above modules of the smart terminal 80 of the embodiment of the present invention correspond to the automatic classification method for executing the application programs of the above embodiments, and have the same technical effects.
  • the division of the above modules is a logical function division, and the actual implementation may have another division manner, for example, two modules may be integrated into another system, or some features may be ignored or not executed.
  • the connections between the modules may be through some interfaces, or may be electrical or other forms.
  • the above modules may be implemented in the form of a software function box or in the form of hardware such as shown in FIG.
  • the intelligent terminal 80 includes at least one processor 91, at least one memory 92, and at least one communication bus 93 for the processor 91 to call various data, and the memory 92 for storing program instructions.
  • the number of the processor 91, the memory 92, and the communication bus 93 shown in FIG. 9 is one.
  • the processor 91 is configured to:
  • the processor 91 may extract initial features from the profiles of the plurality of applications that have been classified, and The initial features with the largest ratio of forward probability to reverse probability in each classification are obtained, so that the initial feature with the largest ratio is taken as the effective feature.
  • the language of the initial feature includes at least one of a plurality of languages.
  • the processor 91 can adopt a corresponding extraction method for different languages. Specifically, the processor 91 performs language identification on the configuration files of the plurality of applications, and then uses the corresponding word segmentation algorithm to obtain initial features. Based on this, the processor 91 can perform language recognition on the profile of the application to be classified, and adopt the same feature extraction method for the identified same language to obtain the feature.
  • the preferred processor 91 of the embodiment presents each valid feature in each category.
  • the probability is transformed into a logarithmic form.
  • the processor 91 obtains the probability that the feature in logarithm form appears in each category, and adds the probability that the logarithmic form of the feature appears in each category, and compares and obtains The largest one of the sums is added, thereby obtaining the largest one of the probabilities of the applications to be classified when the feature has the characteristics.
  • the terminal may be a mobile terminal such as a smart phone, a PDA (Personal Digital Assistant, or a personal digital assistant), or may be worn on a limb or embedded in clothing or jewelry.
  • the wearable device in the accessory can also be other intelligent electronic devices with application download and installation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开一种智能终端及其应用程序的自动分类方法,只需采样智能终端中多个应用程序的配置文件的特征,并结合朴素贝叶斯算法即可对待分类的应用程序进行分类,无需依赖于云端服务器的大数据支持,也无需将这部分大数据内置于智能终端,并且可表现为纯软件算法实现分类,维护简单,可移植性较强,且分类结果准确。

Description

智能终端及其应用程序的自动分类方法 【技术领域】
本发明涉及智能电子设备技术领域,具体涉及一种智能终端及其应用程序的自动分类方法。
【背景技术】
随着电子技术的快速发展以及智能终端的大规模普及应用,可被智能终端安装的应用程序达到了百亿量级,因此如何对所要下载及安装的应用程序进行有效的分类与管理显得越来越重要。当前市场上的应用程序分类方法一般是基于云端服务器的大数据支持,或者将这部分大数据内置于智能终端。不过这类方法运算量大,维护复杂,可移植性较弱。
【发明内容】
鉴于此,本发明实施例提供一种智能终端及其应用程序的自动分类方法,无需依赖于云端服务器的大数据支持,也无需将这部分大数据内置于智能终端,维护简单,可移植性较强,且分类结果准确。
本发明一实施例的应用程序的自动分类方法,包括:
从已分类的多个应用程序的配置文件中提取初始特征;
获取每个分类中正向概率与逆向概率比值最大的初始特征,并将所述比值最大的初始特征作为有效特征;
计算每个有效特征在所述各个分类中出现的概率;
根据每个有效特征在所述各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器;
从待分类的应用程序的配置文件中提取特征,并计算所述特征在所述各个分类中出现的概率,并将每个有效特征在所述各个分类中出现的概率转变为对数形式;
将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以获取对数形式的所述特征在各个分类中出现的概率,并将对数形式的所述特征在各个分类中出现的概率相加,比较得到相加之和最大的一个, 从而将待分类的应用程序划分为概率最大的分类。
本发明一实施例的应用程序的自动分类方法,包括:从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征;计算每个有效特征在各个分类中出现的概率;根据每个有效特征在各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器;从待分类的应用程序的配置文件中提取特征,并计算特征在各个分类中出现的概率;将特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
本发明一实施例的智能终端,包括处理器以及与所述处理器连接的存储器,所述存储器用于存储程序指令,所述处理器用于:
执行程序指令以从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征;
执行程序指令以计算每个有效特征在所述各个分类中出现的概率;
执行程序指令以根据每个有效特征在所述各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器;
执行程序指令以从待分类的应用程序的配置文件中提取特征,所述计算模块还用于计算所述特征在所述各个分类中出现的概率;
执行程序指令以将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时所述待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
有益效果:本发明实施例只需采样智能终端中多个应用程序的配置文件的特征,并结合朴素贝叶斯算法即可对待分类的应用程序进行分类,无需依赖于云端服务器的大数据支持,也无需将这部分大数据内置于智能终端,并且可表现为纯软件算法实现分类,维护简单,可移植性较强,且分类结果准确。
【附图说明】
图1是本发明的应用程序的自动分类方法一实施例的流程图;
图2是本发明的有效特征的提取方法一实施例的流程图;
图3是本发明的初始特征的提取方法一实施例的流程图;
图4是本发明的有效特征在分类中出现的概率的获取方法一实施例的流程图;
图5是本发明训练生成朴素贝叶斯分类器方法一实施例的流程图;
图6是本发明的未知应用程序的分类识别方法一实施例的流程图;
图7是本发明的应用程序的自动分类方法另一实施例的流程图;
图8是本发明的智能终端一实施例的原理框示意图;
图9是本发明的智能终端一实施例的硬件结构示意图。
【具体实施方式】
下面将结合本发明实施例中的附图,对本发明所提供的各个示例性的实施例的技术方案进行清楚、完整地描述。在不冲突的情况下,下述各个实施例以及实施例中的特征可以相互组合。
请参阅图1,为本发明一实施例的应用程序的自动分类方法。所述应用程序的自动分类方法可以包括步骤S11~S15。
S11:从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征。
S12:计算每个有效特征在各个分类中出现的概率。
S13:根据每个有效特征在各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器。
S14:从待分类的应用程序的配置文件中提取特征,并计算特征在各个分类中出现的概率。
S15:将特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
本发明实施例相当于为智能终端增加了一项未知应用程序自动分类的功能,所述未知应用程序可理解为从互联网上下载及所要安装的应用程序。在现实应用场景中,实现该功能的方式包括但不限于:以智能手机为例,首先,预先编程一脚本或程序,以在智能手机的设置界面中增加“未知应 用程序自动分类”选项;然后,用户通过滑动滑块开启该选项。也就是说,本发明实施例可以通过能够在智能终端的操作系统上运行的脚本或程序自动进行上述步骤S11~S15。
上述方法可以分为三个阶段:第一阶段,建立特征库,包括步骤S11和S12;第二阶段,训练生成朴素贝叶斯分类器,包括步骤S13;第三阶段,识别未知应用程序的分类,包括步骤S14和S15。
第一阶段
本实施例可以从多个应用程序的配置文件中提取有效特征。参阅图2,提取有效特征的方法可以包括步骤S21和S22。
S21:从已分类的多个应用程序的配置文件中提取初始特征。
所述已分类的多个应用程序包括但不限于PMS(Plant Management System,设备管理系统)获取的终端已经下载及安装的应用程序,这些应用程序可视为已知分类的应用程序。
所述配置文件中包含有各个应用程序的ID(Identification,身份标识号)信息,例如labelRes(应用名地址)、descriptionRes(应用描述信息地址),从中获取应用程序的基准地址(又称首地址),并将其作为有效地址。而对于未能从ID中获取基准地址的情况,终端可以根据操作系统地址规则遍历该应用程序可能的地址,从而获取有效地址。
所述有效地址实际上就是一段字符串,终端提取其中的字符以作为初始特征。在提取过程中,终端可以对不同语种采用相对应的提取方法。具体地,终端可以采用ASCII(American Standard Code for Information Interchange,美国信息交换标准代码)识别英语与其他语种的区别,以此筛选出配置文件中相同语种的有效地址。而后,针对不同语种使用不同的分词算法,分词后即可得到所述初始特征。也就是说,本实施例的初始特征的语种包括多类语种中的至少一类。
请结合图3,为本发明的提取初始特征一具体应用例,该具体应用实现本发明前述实施例的整个过程,在此不作赘述。
S22:获取每个分类中正向概率与逆向概率比值最大的初始特征,并将所述比值最大的初始特征作为有效特征。
鉴于采样的为已知分类的多个应用程序,即多个应用程序已经提前分 类,本实施例可以建立多个文件夹,各个文件夹的命名为应用程序的包名,并建立多个文件夹与各个分类的一一映射关系。
对于通过分词算法得到的初始特征(字符串),本实施例计算每个分类的应用程序拥有某一初始特征的概率,即每个有效特征在各个分类中出现的概率,以作为该初始特征的正向概率,并且,计算不是该分类的应用程序拥有该初始特征的概率,以作为该初始特征的逆向概率。举例而言,以分类为Music的应用程序、初始特征为song为例,正向概率可理解为分类Music中拥有字符song的概率,逆向概率可理解为除分类Music之外的分类中拥有字符song的概率。正向概率和逆向概率是统计学领域普遍采用的概率统计方式,其计算原理及过程可参阅现有技术,此处不予以赘述。
进一步,对于各个分类中的各个初始特征,本实施例计算每一初始特征的正向概率与逆向概率的比值,并选取其中比值最大的初始特征作为该分类的有效特征。此步骤能够避免某一字符串作为有效特征在多个分类中重复出现,以减少后续对未知应用程序的分类的影响。
请结合图4,为本发明的计算每个有效特征在各个分类中出现的概率一具体应用例。在前述步骤S22之后,该具体应用将每个有效特征的正向概率作为其在各个分类中出现的概率。
第二阶段
结合图5所示,本实施可以以列表形式显示前述有效特征,以及统计的每个有效特征在各个分类中出现的概率。
结合朴素贝叶斯算法的关系式如下:
P(C|F1 F2 ... Fn)=P(F1 F2 ... Fn|C)*P(C)/P(F1 F2 ... Fn)
P(F1 F2 ... Fn|C)=P(F1|C)*P(F2|C)...P(Fn|C)
结合上述关系式,即可得到如下朴素贝叶斯关系式:
P(C|F1 F2 ... Fn)=P(F1|C)*P(F2|C)...P(Fn|C)*P(C)/P(F1 F2 ... Fn)
其中,F1,F2,...Fn表示各个有效特征,C表示其中一个分类,P(C|F1 F2 ... Fn)表示当一个未知应用程序拥有F1,F2,...Fn这些特征时它是分类C的概率,P(F1 F2 ... Fn|C)表示分类C拥有有效特征F1,F2,...Fn的概率,P(C)表示所有分类中为分类C的概率,P(F1 F2 ... Fn)表示所有分类拥有有效特征F1,F2,...Fn的概率,P(F1|C)表示分类C中拥有有效特征F1的概率,P(F2 |C)表示分类C中拥有有效特征F2的概率,P(Fn|C)表示分类C中拥有有效特征Fn的概率。
由于采样的有效特征较多,且计算得到的上述概率均小于1,上述多个概率相乘会出现尾数丢失的问题,因此本实施例优选将每个有效特征在各个分类中出现的概率转变为对数形式。也就是说,将上述朴素贝叶斯关系式进行对数转换,以得到如下对数关系式:
log(P(C|F1 F2 ... Fn))=log(P(F1|C))+log(P(F2|C))...+log(P(Fn|C))+log(P(C))-log(P(F1 F2 ... Fn))
该对数关系式即可视为朴素贝叶斯分类器。在该对数关系式中,多个分类中的各分类的log(P(C))和log(P(F1 F2 ... Fn))相等,因此只需将以对数形式表示的各个分类中分别拥有有效特征F1,F2,...Fn的概率相加,并比较得到相加之和最大的一个,即可将未知应用程序划分为相加之和最大的分类。换言之,通过该关系式,本实施例可以得到在拥有有效特征F1,F2,...Fn时未知应用程序为相加之和最大的分类的正向概率,反言之,将关系式中的分类C换为多个分类中的其他分类,得到不是该相加之和最大的分类拥有有效特征F1,F2,...Fn的概率,即相加之和最大的分类的逆向概率。
第三阶段
结合图6所示,从待分类的应用程序的配置文件中提取特征,所述特征的提取方法与第一阶段的初始特征的提取方法相同,例如,首先从配置文件中包含的应用程序的ID信息中提取有效地址,而后对其进行语种识别,最后采用与识别的语种相对应的分词算法对有效地址的字符串进行分词,从而得到至少一个特征。进一步地,本阶段提取的特征属于第一阶段采样的有效特征的一部分,通过结合上述有效特征的正向概率即可得到本阶段提取的每个特征在各个分类中出现的概率。
如果本阶段提取的特征为F1,F3,F6,Fn,多个分类C包括A,B,D,则上述朴素贝叶斯分类器的对数关系式即可表示为:
log(P(C|F1 F3 F6 Fn))=log(P(F1|C))+log(P(F3|C))+log(P(F6|C))+log(P(Fn|C))+log(P(C))-log(P(F1 F3 F6 Fn))
将已知的特征在各个分类A,B,D中出现的概率log(P(F1|C))、log(P(F3|C))、log(P(F6|C))、log(P(Fn|C)),作为参数输入朴素贝叶斯分类器, 基于前述中log(P(C))-log(P(F1 F2 ... Fn))相等,因此只需比较log(P(F1|A))+log(P(F3|A))+log(P(F6|A))+log(P(Fn|A))、log(P(F1|B))+log(P(F3|B))+log(P(F6|B))+log(P(Fn|B))、log(P(F1|D))+log(P(F3|D))+log(P(F6|D))+log(P(Fn|D))中最大的一个,即可将待分类的应用程序划分为该相加之和最大的分类。
请参阅图7,为本发明的应用程序的自动分类方法一具体应用例。该应用例实现本发明前述实施例的整个过程,在此不作赘述。
由上述可知,本发明实施例只需采样智能终端中多个应用程序的配置文件的特征,并结合朴素贝叶斯算法即可对待分类的应用程序进行分类,无需依赖于云端服务器的大数据支持,也无需将这部分大数据内置于智能终端,也可以实现准确分类,维护方便,成本较低,并且可以适用于不同语种,通用性很高,另外上述各个步骤可由纯软件算法实现,即通过纯软件算法实现分类,维护简单,可移植性较强。
应该理解到,上述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可存储在一个电子设备可读取存储介质中,即本发明实施例可以以软件产品的形式体现出来,其包括若干指令用以使得一台智能终端执行本发明各实施例所述方法的全部或部分步骤。
请参阅图8,为本发明一实施例的智能终端。所述终端80可以包括提取模块81、计算模块82、训练生成模块83和应用管理模块84。提取模块81用于从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征。计算模块82用于计算每个有效特征在各个分类中出现的概率。训练生成模块83用于根据每个有效特征在各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器。提取模块81还用于从待分类的应用程序的配置文件中提取特征。计算模块82还用于计算所述特征在各个分类中出现的概率。应用管理模块84用于将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
为了避免某一字符串作为有效特征在多个分类中重复出现,以减少后续对未知应用程序的分类的影响,所述提取模块81可以从已分类的多个应 用程序的配置文件中提取初始特征,并获取每个分类中正向概率与逆向概率比值最大的初始特征,从而将所述比值最大的初始特征作为有效特征。
其中,初始特征的语种包括多类语种中的至少一类。提取模块81可以对不同语种采用相对应的提取方法,具体地,提取模块81的语言识别单元811对多个应用程序的配置文件进行语种识别,而后提取模块81采用相对应的分词算法得到初始特征。基于此,语言识别单元811可以对待分类的应用程序的配置文件进行语种识别,所述提取模块81对识别出的同一语种采用相同特征提取方法以得到特征。
由于采样的有效特征较多,且计算得到的上述概率均小于1,上述多个概率相乘会出现尾数丢失的问题,因此本实施例优选训练生成模块83将每个有效特征在各个分类中出现的概率转变为对数形式。对应地,在对未知应用程序进行分类时,应用管理模块84获取对数形式的所述特征在各个分类中出现的概率,并将对数形式的特征在各个分类中出现的概率相加,比较得到相加之和最大的一个,从而得到在具有所述特征时待分类的应用程序为各个分类的概率中最大的一个。
本发明实施例的智能终端80的上述模块对应执行上述各个实施例的应用程序的自动分类方法,具有与其相同的技术效果。
应该理解到,上述模块的划分为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如两个模块可以集成到另一个系统中,或一些特征可以忽略,或不执行。另外,模块相互之间的连接可以通过一些接口,也可以是电性或其它形式。上述模块既可以采用软件功能框的形式实现,也可以采用例如图9所示的硬件的形式实现。
参阅图9,所述智能终端80包括至少一个处理器91、至少一个存储器92以及至少一个通信总线93,通信总线93用于处理器91调用各种数据,存储器92用于存储程序指令。为了方便说明,图9所示处理器91、存储器92以及通信总线93的数量为一个。
其中,所述处理器91用于:
执行程序指令以从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征,并计算每个有效特征在各个分类中出现的概率;
执行程序指令以根据每个有效特征在各个分类中出现的概率以及朴素 贝叶斯算法训练生成朴素贝叶斯分类器;
执行程序指令以从待分类的应用程序的配置文件中提取特征,并计计算所述特征在各个分类中出现的概率;
执行程序指令以将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
为了避免某一字符串作为有效特征在多个分类中重复出现,以减少后续对未知应用程序的分类的影响,处理器91可以从已分类的多个应用程序的配置文件中提取初始特征,并获取每个分类中正向概率与逆向概率比值最大的初始特征,从而将比值最大的初始特征作为有效特征。
其中,初始特征的语种包括多类语种中的至少一类。处理器91可以对不同语种采用相对应的提取方法,具体地,处理器91对多个应用程序的配置文件进行语种识别,而后采用相对应的分词算法得到初始特征。基于此,处理器91可以对待分类的应用程序的配置文件进行语种识别,并对识别出的同一语种采用相同特征提取方法以得到特征。
由于采样的有效特征较多,且计算得到的上述概率均小于1,上述多个概率相乘会出现尾数丢失的问题,因此本实施例优选处理器91将每个有效特征在各个分类中出现的概率转变为对数形式。对应地,在对未知应用程序进行分类时,处理器91获取对数形式的所述特征在各个分类中出现的概率,并将对数形式的特征在各个分类中出现的概率相加,比较得到相加之和最大的一个,从而得到在具有所述特征时待分类的应用程序为各个分类的概率中最大的一个。
本发明实施例全文所述的终端(包括智能终端80)可以为智能手机、PDA(Personal Digital Assistant,个人数字助理或平板电脑)等移动终端,也可以是佩戴于肢体或者嵌入于衣物、首饰、配件中的可穿戴设备,还可以是其他具有应用程序下载及安装的智能电子设备。
需要说明,以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,例如各实施例之间技术特征的相互结合,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (19)

  1. 一种应用程序的自动分类方法,其中,所述方法包括:
    从已分类的多个应用程序的配置文件中提取初始特征;
    获取每个分类中正向概率与逆向概率比值最大的初始特征,并将所述比值最大的初始特征作为有效特征;
    计算每个有效特征在所述各个分类中出现的概率;
    根据每个有效特征在所述各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器;
    从待分类的应用程序的配置文件中提取特征,并计算所述特征在所述各个分类中出现的概率,并将每个有效特征在所述各个分类中出现的概率转变为对数形式;
    将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以获取对数形式的所述特征在各个分类中出现的概率,并将对数形式的所述特征在各个分类中出现的概率相加,比较得到相加之和最大的一个,从而将待分类的应用程序划分为概率最大的分类。
  2. 根据权利要求1所述的方法,其中,所述从已分类的多个应用程序的配置文件中提取初始特征,包括:
    从已分类的多个应用程序的配置文件中获取所述应用程序的基准地址,并将所述基准地址作为有效地址;
    从所述有效地址中提取字符并作为初始特征。
  3. 根据权利要求1所述的方法,其中,所述从已分类的多个应用程序的配置文件中提取初始特征,包括:
    遍历所述应用程序的地址并将其作为有效地址;
    从所述有效地址中提取字符并作为初始特征。
  4. 根据权利要求1所述的方法,其中,所述初始特征的语种包括多类语种中的至少一类。
  5. 根据权利要求4所述的方法,其中,所述从待分类的应用程序的配置文件中提取特征的步骤,包括:
    对待分类的应用程序的配置文件进行语种识别,并对识别出的同一语 种采用相同特征提取方法以得到特征。
  6. 一种应用程序的自动分类方法,其中,所述方法包括:
    从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征;
    计算每个有效特征在所述各个分类中出现的概率;
    根据每个有效特征在所述各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器;
    从待分类的应用程序的配置文件中提取特征,并计算所述特征在所述各个分类中出现的概率;
    将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时所述待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
  7. 根据权利要求6所述的方法,其中,所述从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征的步骤,包括:
    从已分类的多个应用程序的配置文件中提取初始特征;
    获取每个分类中正向概率与逆向概率比值最大的初始特征,并将所述比值最大的初始特征作为有效特征。
  8. 根据权利要求7所述的方法,其中,所述从已分类的多个应用程序的配置文件中提取初始特征,包括:
    从已分类的多个应用程序的配置文件中获取所述应用程序的基准地址,并将所述基准地址作为有效地址;
    从所述有效地址中提取字符并作为初始特征。
  9. 根据权利要求7所述的方法,其中,所述从已分类的多个应用程序的配置文件中提取初始特征,包括:
    遍历所述应用程序的地址并将其作为有效地址;
    从所述有效地址中提取字符并作为初始特征。
  10. 根据权利要求7所述的方法,其中,所述初始特征的语种包括多类语种中的至少一类。
  11. 根据权利要求10所述的方法,其中,所述从待分类的应用程序的配置文件中提取特征的步骤,包括:
    对待分类的应用程序的配置文件进行语种识别,并对识别出的同一语 种采用相同特征提取方法以得到特征。
  12. 根据权利要求6所述的方法,其中,
    所述根据每个有效特征在所述各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器的步骤,包括:
    将每个有效特征在所述各个分类中出现的概率转变为对数形式;
    所述得到在具有所述特征时所述待分类的应用程序为各个分类的概率中最大的一个的步骤,包括:
    获取对数形式的所述特征在各个分类中出现的概率;
    将对数形式的所述特征在各个分类中出现的概率相加,并比较得到相加之和最大的一个。
  13. 一种智能终端,其中,所述智能终端包括处理器以及与所述处理器连接的存储器,所述存储器用于存储程序指令,所述处理器用于:
    执行程序指令以从已划分为至少两个分类的多个应用程序的配置文件中提取有效特征;
    执行程序指令以计算每个有效特征在所述各个分类中出现的概率;
    执行程序指令以根据每个有效特征在所述各个分类中出现的概率以及朴素贝叶斯算法训练生成朴素贝叶斯分类器;
    执行程序指令以从待分类的应用程序的配置文件中提取特征,所述计算模块还用于计算所述特征在所述各个分类中出现的概率;
    执行程序指令以将所述特征在各个分类中出现的概率作为朴素贝叶斯分类器的输入参数,以得到在具有所述特征时所述待分类的应用程序为各个分类的概率中最大的一个,从而将待分类的应用程序划分为概率最大的分类。
  14. 根据权利要求13所述的智能终端,其中,所述处理器从已分类的多个应用程序的配置文件中提取初始特征,并获取每个分类中正向概率与逆向概率比值最大的初始特征,从而将所述比值最大的初始特征作为所述有效特征。
  15. 根据权利要求14所述的智能终端,其中,所述处理器从已分类的多个应用程序的配置文件中获取所述应用程序的基准地址,将所述基准地址作为有效地址,并从所述有效地址中提取字符并作为初始特征。
  16. 根据权利要求14所述的智能终端,其中,所述处理器遍历所述应用程序的地址并将其作为有效地址,以及从所述有效地址中提取字符并作为初始特征。
  17. 根据权利要求14所述的智能终端,其中,所述初始特征的语种包括多类语种中的至少一类。
  18. 根据权利要求17所述的智能终端,其中,所述提取模块包括语言识别单元,所述语言识别单元用于对待分类的应用程序的配置文件进行语种识别,所述提取模块对识别出的同一语种采用相同特征提取方法以得到特征。
  19. 根据权利要求13所述的智能终端,其中,所述训练生成模块将每个有效特征在所述各个分类中出现的概率转变为对数形式;所述应用管理模块获取对数形式的所述特征在各个分类中出现的概率,并将对数形式的所述特征在各个分类中出现的概率相加,比较得到相加之和最大的一个,从而得到在具有所述特征时所述待分类的应用程序为各个分类的概率中最大的一个。
PCT/CN2017/113012 2016-12-12 2017-11-27 智能终端及其应用程序的自动分类方法 Ceased WO2018107953A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611139789.4 2016-12-12
CN201611139789.4A CN106681716B (zh) 2016-12-12 2016-12-12 智能终端及其应用程序的自动分类方法

Publications (1)

Publication Number Publication Date
WO2018107953A1 true WO2018107953A1 (zh) 2018-06-21

Family

ID=58868050

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113012 Ceased WO2018107953A1 (zh) 2016-12-12 2017-11-27 智能终端及其应用程序的自动分类方法

Country Status (2)

Country Link
CN (1) CN106681716B (zh)
WO (1) WO2018107953A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214445A (zh) * 2018-08-27 2019-01-15 陆柒(北京)科技有限公司 一种基于人工智能的多标签分类方法
CN113656801A (zh) * 2021-08-19 2021-11-16 建信金融科技有限责任公司 Android恶意应用家族分类方法、服务器、终端

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106681716B (zh) * 2016-12-12 2020-05-22 捷开通讯(深圳)有限公司 智能终端及其应用程序的自动分类方法
CN109144956A (zh) * 2018-08-27 2019-01-04 Tcl移动通信科技(宁波)有限公司 移动终端多文件分类处理方法、移动终端及存储介质
CN111597947A (zh) * 2020-05-11 2020-08-28 浙江大学 一种基于电源功率因数矫正噪声的应用程序推断方法
CN111880872A (zh) 2020-06-28 2020-11-03 华为技术有限公司 一种管理应用程序app的方法、终端设备、服务器和系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8023974B1 (en) * 2007-02-15 2011-09-20 Trend Micro Incorporated Lightweight SVM-based content filtering system for mobile phones
CN102591983A (zh) * 2012-01-10 2012-07-18 凤凰在线(北京)信息技术有限公司 一种广告过滤系统及其过滤方法
CN105956083A (zh) * 2016-04-29 2016-09-21 广州优视网络科技有限公司 应用软件分类系统、应用软件分类方法及服务器
CN106156120A (zh) * 2015-04-07 2016-11-23 阿里巴巴集团控股有限公司 对字符串进行分类的方法和装置
CN106681716A (zh) * 2016-12-12 2017-05-17 捷开通讯(深圳)有限公司 智能终端及其应用程序的自动分类方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424307B (zh) * 2013-09-04 2019-02-05 腾讯科技(深圳)有限公司 一种智能终端应用程序分类方法、系统及智能终端
CN104361141A (zh) * 2014-12-11 2015-02-18 北京邮电大学 软件标识库的建立方法
CN105468977A (zh) * 2015-12-14 2016-04-06 厦门安胜网络科技有限公司 一种基于朴素贝叶斯的Android恶意软件分类方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8023974B1 (en) * 2007-02-15 2011-09-20 Trend Micro Incorporated Lightweight SVM-based content filtering system for mobile phones
CN102591983A (zh) * 2012-01-10 2012-07-18 凤凰在线(北京)信息技术有限公司 一种广告过滤系统及其过滤方法
CN106156120A (zh) * 2015-04-07 2016-11-23 阿里巴巴集团控股有限公司 对字符串进行分类的方法和装置
CN105956083A (zh) * 2016-04-29 2016-09-21 广州优视网络科技有限公司 应用软件分类系统、应用软件分类方法及服务器
CN106681716A (zh) * 2016-12-12 2017-05-17 捷开通讯(深圳)有限公司 智能终端及其应用程序的自动分类方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214445A (zh) * 2018-08-27 2019-01-15 陆柒(北京)科技有限公司 一种基于人工智能的多标签分类方法
CN113656801A (zh) * 2021-08-19 2021-11-16 建信金融科技有限责任公司 Android恶意应用家族分类方法、服务器、终端
CN113656801B (zh) * 2021-08-19 2023-06-09 建信金融科技有限责任公司 Android恶意应用家族分类方法、服务器、终端

Also Published As

Publication number Publication date
CN106681716A (zh) 2017-05-17
CN106681716B (zh) 2020-05-22

Similar Documents

Publication Publication Date Title
WO2018107953A1 (zh) 智能终端及其应用程序的自动分类方法
US11062698B2 (en) Image-based approaches to identifying the source of audio data
US11727053B2 (en) Entity recognition from an image
US10796224B2 (en) Image processing engine component generation method, search method, terminal, and system
CN113515662B (zh) 一种相似歌曲检索方法、装置、设备以及存储介质
US10417285B2 (en) Corpus generation based upon document attributes
US10621471B2 (en) Signal classification using sparse representation
CN113920406B (zh) 神经网络训练及分类方法、装置、设备及存储介质
CN112800919A (zh) 一种检测目标类型视频方法、装置、设备以及存储介质
WO2021135603A1 (zh) 意图识别方法、服务器及存储介质
CN111460214B (zh) 分类模型训练方法、音频分类方法、装置、介质及设备
WO2018121145A1 (zh) 段落向量化的方法和装置
CN112988753B (zh) 一种数据搜索方法和装置
CN112149389A (zh) 简历信息结构化处理方法、装置、计算机设备和存储介质
CN114860667B (zh) 文件分类方法、装置、电子设备及计算机可读存储介质
CN117421641A (zh) 一种文本分类的方法、装置、电子设备及可读存储介质
CN109492117A (zh) 专利数据分析系统
CN114882334B (zh) 用于生成预训练模型的方法、模型训练方法及装置
US10803115B2 (en) Image-based domain name system
WO2021159668A1 (zh) 机器人对话方法、装置、计算机设备和存储介质
CN117788904A (zh) 图像分类方法、装置、电子设备和介质
CN113076485B (zh) 基于智能降级的资源推荐方法、装置、设备及存储介质
CN111767710B (zh) 印尼语的情感分类方法、装置、设备及介质
CN111708872B (zh) 对话方法、装置及电子设备
CN115934571A (zh) 基于贝叶斯分类算法的接口测试用例生成方法及装置

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: 17881646

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: 17881646

Country of ref document: EP

Kind code of ref document: A1