Domain name feature extraction method and feature extraction device
By generating a set of application domain names and using public fields and preset thresholds to determine features, the problem of low correlation in feature extraction for applications with many levels of application domain names in the existing technology is solved, and higher feature extraction granularity and relevance are achieved.
Patent Information
- Application Number
- CN202010077051.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-23
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-01-23
AI Technical Summary
When existing feature extraction devices process applications with many levels of application domain names, it is difficult to extract specific traffic features, resulting in low correlation of the extracted features.
By generating a collection of application domain names, public fields and preset thresholds are used to determine application domain name features, extract representative and highly differentiated application domain name features, and improve the granularity and relevance of feature extraction.
It improves the correlation between application domain name features and target applications, ensuring that the extracted features are highly representative and differentiated, and is suitable for application scenarios with complex domain name structures.
Smart Images

Figure CN113157997B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a method for extracting domain name features and a feature extraction device. Background Art
[0002] Traffic feature extraction technology is one of the basic technologies for business perception, traffic classification, application identification, and traffic identification. Traffic feature extraction refers to the feature extraction device analyzing the traffic and extracting a representative and highly distinguishable set of traffic features.
[0003] At present, the feature extraction device first obtains the traffic generated by the application-related process through the packet capture software on the host running the application, where the application-related process refers to the process created after the application is running; then, the feature device extracts multiple messages from the traffic, and obtains the most repetitive content in the first field and the most repetitive content in the second field of the multiple messages, and then uses the extracted content as the traffic feature corresponding to the application.
[0004] However, according to the above scheme, the feature extraction device uses the content with high repetition in the first field and the content with high repetition in the second field in the traffic corresponding to the application as the traffic feature corresponding to the application. However, for applications with more application domain name levels, it is difficult to extract the traffic features corresponding to the application, resulting in a low correlation of the traffic features extracted by the feature extraction device. For example, 123.v.qq.com, film.qq.com, video.qq.com, etc. represent the domain names corresponding to various applications of Tencent. If the feature extraction device extracts content with high repetition, the application domain name feature extracted by the feature extraction device is qq.com, that is, it is impossible to extract more specific domain name features corresponding to Tencent applications. Summary of the invention
[0005] The embodiments of the present application provide a method for extracting domain name features and a feature extraction device, which are used to improve the correlation between application domain name features extracted by the feature extraction device and a target application.
[0006] In a first aspect, a method for extracting domain name features is provided, wherein the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application. The feature extraction device generates at least one application domain name set according to the at least one application domain name, and at least two application domain names belonging to the same application domain name set have at least two identical characters or strings separated by periods. The first common field and the second common field correspond to the first application domain name set in the at least one application domain name set. The ratio of the number of application domain names including the first common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a first preset threshold. The number of application domain names including the second common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a second preset threshold. The first common field includes at least one character or string separated by periods. The second common field includes at least one character or string separated by periods. The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed.
[0007] In an embodiment of the present application, the first application domain name set in the at least one application domain name set corresponds to a first common field and a second common field. Then the application domain name features extracted by the feature extraction device from the first application domain name set include at least two common fields. Therefore, the extraction granularity of the application domain name features is small, and the application domain name features extracted by the feature extraction device have a high correlation with the target application. For example, for the target application Tencent Video, video.qq.com is extracted from 123.v.qq.com, film.qq.com, and video.qq.com in the technical solution of the embodiment of the present application, thereby obtaining application domain name features that are more relevant to Tencent Video.
[0008] In a possible implementation of the first aspect, the feature type of the first common field or the second common field includes any one of the following feature types. The first feature type is the prefix of the application domain name in the first application domain name set. The second feature type is the suffix of the application domain name in the first application domain name set, and the suffix includes at least the second-level domain name of each application domain name. The third feature type is a substring of the application domain name in the first application domain name set. The fourth feature type is the target-level domain name field of the application domain name in the first application domain name set.
[0009] In this possible implementation, a variety of possible feature types of the first common field and the second common field are provided, which improves the feasibility and diversity of the solution in practical applications.
[0010] In a possible implementation of the first aspect, when the at least one application domain name set also includes a second application domain name set, the third common field and the fourth common field correspond to the second application domain name set. The ratio of the number of application domain names including the third common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a third preset threshold. The ratio of the number of application domain names including the fourth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a fourth preset threshold. At least two common fields corresponding to the first application domain name set are partially or completely different from at least two common fields corresponding to the second application domain name set.
[0011] In this possible implementation, the at least one application domain name set includes at least two application domain name sets. Each application domain name set in the at least one application domain name set has at least two common fields, and the at least two common fields between different application domain name sets are partially or completely different. In this way, the feature extraction device can extract at least two common fields from each application domain name set in the at least one application domain name set as application domain name features of the target application. The feature extraction device extracts application domain name features with a small extraction granularity, and the application domain name features extracted by the feature extraction device have a high correlation with the target application.
[0012] In a possible implementation of the first aspect, the feature extraction device extracts the first application domain name feature of the traffic to be analyzed in the following manner. The feature extraction device performs an operation on the first application domain name set: the feature extraction device determines at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm, and a common substring algorithm. The feature extraction device determines that the first public domain name feature includes at least two common fields corresponding to the first application domain name set. Each of the at least two common fields includes at least one character or string separated by a period. The feature extraction device uses the first public domain name feature as the first application domain name feature of the traffic to be analyzed.
[0013] In this possible implementation, in order to improve the correlation between the application domain name feature extracted by the feature extraction device and the target application, the feature extraction device extracts the first application domain name feature of the traffic to be analyzed from each application domain name set in the at least one application domain name set. The first application domain name feature includes at least two common fields. It can be seen that the extraction granularity of the application domain name feature extracted by the feature extraction device is small, and the application domain name feature extracted by the feature extraction device has a high correlation with the target application.
[0014] In a possible implementation of the first aspect, the form of the first public domain name feature extracted by the algorithm used by the feature extraction device includes any of the following forms. The first form is that when the first public domain name feature is determined according to the common prefix algorithm, the form of the first public domain name feature includes the first common prefix. The first common prefix includes at least two common fields. The second form is that when the first public domain name feature is determined according to the common suffix algorithm, the form of the first public domain name feature includes the first common suffix. The first common suffix includes at least two common fields. The third form is that when the first public domain name feature is determined according to the common substring algorithm, the form of the first public domain name feature includes the first common substring. The first common substring includes at least two common fields. The fourth form is that when the first public domain name feature is determined according to the common prefix algorithm and the common substring algorithm, the form of the first public domain name feature includes the second common prefix plus the second common substring. The second common prefix includes at least one common field, and the second common substring includes at least one common field. The fifth form is that when the first public domain name feature is determined according to the common suffix algorithm and the common substring algorithm, the form of the first public domain name feature includes the third common substring plus the second common suffix. The third common substring includes at least one common field. The second common suffix includes at least one common field. The sixth form is that when the first common domain name feature is determined according to the common prefix algorithm and the common suffix algorithm, the form of the first common domain name feature includes the third common prefix plus the third common suffix. The third common prefix includes at least one common field. The third common suffix includes at least one common field. The seventh form is that when the first common domain name feature is determined according to the common prefix algorithm, the common suffix algorithm and the common substring algorithm, the form of the first common domain name feature includes the fourth common prefix plus the fourth common substring plus the fourth common suffix. The fourth common prefix includes at least one common field. The fourth common substring includes at least one common field. The fourth common suffix includes at least one common field.
[0015] In this possible implementation, the form of the first application domain name feature extracted by the feature extraction device through different algorithms is shown, which improves the feasibility and diversity of the solution.
[0016] In a possible implementation of the first aspect, the feature extraction device extracts the first application domain name feature of the traffic to be analyzed in the following manner. The feature extraction device determines the second public domain name feature. The second public domain name feature satisfies the following conditions: the second public domain name feature is at least two identical common fields between the first application domain name set and the second application domain name set. Each of the at least two identical common fields includes at least one character or string separated by a period. The feature extraction device extracts the second public domain name feature as the first application domain name feature of the traffic to be analyzed.
[0017] In this possible implementation, in order to improve the correlation between the application domain name features extracted by the feature extraction device and the target application, the feature extraction device extracts the first application domain name features of the traffic to be analyzed from each application domain name set in the at least one application domain name set. When the at least one application domain name set includes at least two application domain name sets, the feature extraction device extracts at least two identical common fields that the at least two application domain name sets have from the at least two application domain name sets as the first application domain name features of the traffic to be analyzed. Thereby, the first application domain name features of the traffic to be analyzed extracted by the feature extraction device are more representative and distinguishable. In addition, the extraction granularity of the application domain name features extracted by the feature extraction device is small, and the application domain name features extracted by the feature extraction device have a higher correlation with the target application.
[0018] In a possible implementation of the first aspect, the at least two identical common fields include a fifth common field and a sixth common field. The ratio of the number of application domain names including the fifth common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than the fifth preset threshold. The ratio of the number of application domain names including the sixth common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than the sixth preset threshold. The number of application domain names including the fifth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than the seventh preset threshold. The number of application domain names including the sixth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than the eighth preset threshold.
[0019] In this possible implementation, the frequency of the common fields included in the at least two identical common fields appearing in the first application domain name set should be greater than the corresponding preset thresholds. The frequency of the common fields included in the at least two identical common fields appearing in the second application domain name set should be greater than the corresponding preset thresholds. In the embodiment of the present application, the frequency rate should be understood as the ratio of the number of application domain names that contain the common field in the application domain name set to the total number of application domain names included in the application domain name set. Thereby, the first application domain name feature of the traffic to be analyzed extracted by the feature extraction device is more representative and discriminative, so as to improve the accuracy and relevance of the application domain name feature extracted by the feature extraction device.
[0020] In a possible implementation of the first aspect, the feature extraction device extracts the first application domain name feature of the traffic to be analyzed in the following manner. The feature extraction device determines at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm, and a common substring algorithm, and uses the determined at least two common fields as the first common domain name feature. Each of the at least two common fields corresponding to the first application domain name set includes at least one character or string separated by a period. The feature extraction device determines at least two common fields corresponding to the second application domain name set according to any one or more of the common prefix algorithm, the common suffix algorithm, and the common substring algorithm, and uses the determined at least two common fields as the third common domain name feature. Each of the at least two common fields corresponding to the second application domain name set includes at least one character or string separated by a period. The feature extraction device uses the first common domain name feature and the third common domain name feature as the first application domain name feature of the traffic to be analyzed.
[0021] In this possible implementation, the feature extraction device uses the first public domain name feature and the third public domain name feature as the first application domain name feature of the traffic to be analyzed. The first public domain name feature includes at least two public fields. The third public domain name feature includes at least two public fields. It can be seen that the feature extraction device extracts the application domain name feature with a small extraction granularity, and the application domain name feature extracted by the feature extraction device has a high correlation with the target application.
[0022] In a possible implementation of the first aspect, there is a fourth public domain name feature that overlaps between the first public domain name feature and the third public domain name feature. The feature extraction device excludes the fourth public domain name feature from the first public domain name feature to obtain a fifth public domain name feature. The feature extraction device uses the third public domain name feature and the fifth public domain name feature as the second application domain name feature of the traffic to be analyzed.
[0023] In this possible implementation, the feature extraction device may exclude the fourth public domain name feature that overlaps the first public domain name feature and the third public domain name feature from the first public domain name feature, so that the second application domain name feature of the traffic to be analyzed extracted by the feature extraction device is more representative and distinguishable, thereby improving the accuracy and relevance of the application domain name feature extracted by the feature extraction device.
[0024] In a possible implementation of the first aspect, before the feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed, the feature extraction device generates a keyword set of the target application according to the application name of the target application or the application category of the target application. Then, the feature extraction device extracts the first application domain name features in the following manner. The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set according to the keyword set as the first application domain name features of the traffic to be analyzed.
[0025] In this possible implementation, the feature extraction device generates a key set related to the target application through the name of the target application or the application category of the target application, and then extracts the first application domain name feature from each application domain name set in the at least one application domain name set in combination with the key set. Thus, the feature extraction device effectively extracts the core application domain name features of the traffic to be analyzed, and improves the relevance and accuracy of the application domain name features extracted by the feature extraction device and the target application.
[0026] In a possible implementation of the first aspect, the keyword set includes a first keyword. The feature extraction device extracts the first application domain name feature of the traffic to be analyzed from each application domain name set in the at least one application domain name set according to the keyword set in the following manner. The feature extraction device determines that the first keyword exists in the first application domain name included in the at least one application domain name set. The feature extraction device uses the first keyword plus a suffix of the first application domain name as the first application domain name feature of the traffic to be analyzed.
[0027] In this possible implementation, a specific extraction method is provided in which the feature extraction device extracts the first application domain name feature of the traffic to be analyzed from each application domain name set in the at least one application domain name set according to a keyword set.
[0028] In a possible implementation of the first aspect, the feature extraction device generates a keyword set for the application domain name of the target application in any of the following ways. The first way is that the feature extraction device generates the keyword set associated with the application name. The second way is that the feature extraction device generates a keyword set based on the multilingual translation corresponding to the application name. The third way is that the feature extraction device generates a keyword set associated with the application category of the target application.
[0029] In this possible implementation, multiple implementations of the feature extraction device generating a keyword set are provided, which improves the feasibility and diversity of the solution.
[0030] In a possible implementation of the first aspect, the first application domain name feature includes multiple application domain name features of different feature types, and the feature types include prefix, suffix, substring, prefix plus suffix, prefix plus substring, substring plus substring, substring plus suffix, and prefix plus substring plus suffix. Each feature type corresponds to a priority. The feature extraction device selects an application domain name feature from the multiple application domain name features of different feature types as the third application domain name feature of the traffic to be analyzed in the order of preset feature type priorities from high to low.
[0031] In this possible implementation, the feature extraction device may select the third application domain name feature from the application domain name features of multiple different feature types according to the preset feature type priority, so that the third application domain name feature of the traffic to be analyzed extracted by the feature extraction device is more representative and distinguishable, so as to improve the accuracy and relevance of the application domain name feature extracted by the feature extraction device.
[0032] In a possible implementation of the first aspect, after the feature extraction device selects an application domain name feature as the third application domain name feature of the traffic to be analyzed from the application domain name features of the multiple different feature types in order of preset feature type priorities from high to low, the feature extraction device outputs the number of application domain names corresponding to the third application domain name feature included in the at least one application domain name, the number of quintuples of traffic corresponding to the third application domain name feature included in the traffic to be analyzed, and the number of bytes of the traffic of the domain name corresponding to the third application domain name feature.
[0033] In this possible implementation, the feature extraction device outputs the relevant information of the third application domain name feature, so that the user can evaluate the relevance of the third application domain name feature and the target application by combining the number of bytes of the traffic corresponding to the third application domain name feature and the five-tuple of the traffic corresponding to the third application domain name.
[0034] In a possible implementation of the first aspect, before the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application, the feature extraction device obtains a traffic analysis task of the traffic to be analyzed submitted by a user. The traffic analysis task carries the traffic to be analyzed and the application name of the target application.
[0035] In this possible implementation, a specific application scenario is provided in which the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application.
[0036] In a possible implementation of the first aspect, before the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application, the feature extraction device obtains an application traffic automatic test task submitted by a user, and the application traffic automatic test task carries the application name of the target application. The feature extraction device downloads the target application according to the application traffic automatic test task; and the feature extraction device captures the traffic to be analyzed by running the target application.
[0037] In this possible implementation, another specific application scenario is provided in which the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application.
[0038] In a possible implementation of the first aspect, before the feature extraction device generates a keyword set of the application domain name of the target application based on the application name of the target application or the application category of the target application, the feature extraction device obtains the application name of the target application or the application category of the target application in any of the following ways. The first way is that the feature extraction device obtains the application name of the target application or the application category of the target application based on the at least one application domain name. The second way is that the feature extraction device obtains the application name of the target application or the application category of the target application based on the address information of the traffic to be analyzed.
[0039] In this possible implementation, two possible implementations are provided for the feature extraction device to obtain the application name of the target application or the application category of the target application without human intervention.
[0040] In a possible implementation of the first aspect, before the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application, the feature extraction device obtains the traffic to be analyzed in any of the following ways. The first way is that the feature extraction device divides the first traffic received by the feature extraction device according to the duration of a preset time slice to obtain the traffic to be analyzed. The second way is that the feature extraction device divides the first traffic according to the duration of the preset time slice and the address information of the first traffic to obtain the traffic to be analyzed.
[0041] In this possible implementation, the embodiment of the present application provides a specific method for dividing and processing the first traffic to support the application scenario in which the feature extraction device continuously receives input traffic.
[0042] In a second aspect, a feature extraction device is provided. The feature extraction device includes a network interface, a memory, and a processor connected to the memory. The memory is used to store instructions; the processor is used to execute the instructions so that the feature extraction device performs the method in the first aspect or any possible implementation of the first aspect. For details, please refer to the detailed description above, which will not be repeated here.
[0043] In a third aspect, a domain name feature extraction device is provided, which has the function of implementing the method described in the first aspect or any possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0044] In a fourth aspect, an embodiment of the present application provides a computer storage medium for storing computer software instructions used for the above-mentioned feature extraction device, which includes a program designed for executing the above-mentioned first aspect or any possible implementation method of the above-mentioned first aspect.
[0045] In a fifth aspect, another aspect of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods described in the above aspects.
[0046] In a sixth aspect, an embodiment of the present application provides a chip comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the above-mentioned first aspect.
[0047] Among them, the technical effects brought about by the second aspect, the third aspect, the fourth aspect, the fifth aspect and the sixth aspect or any possible implementation method thereof can refer to the technical effects brought about by the first aspect or different possible implementation methods of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.
[0049] Figure 1A A schematic diagram of an application scenario of the method for extracting domain name features according to an embodiment of the present application;
[0050] Figure 1B This is another schematic diagram of an application scenario of the method for extracting domain name features according to an embodiment of the present application;
[0051] Figure 1C This is another application scenario diagram of the method for extracting domain name features according to an embodiment of the present application;
[0052] Figure 2A A schematic diagram of an embodiment of a method for extracting domain name features according to an embodiment of the present application;
[0053] Figure 2B A flow division diagram of a method for extracting domain name features according to an embodiment of the present application;
[0054] Figure 3 This is another schematic diagram of an embodiment of the method for extracting domain name features according to an embodiment of the present application;
[0055] Figure 4 This is another schematic diagram of an embodiment of the method for extracting domain name features according to an embodiment of the present application;
[0056] Figure 5 This is another schematic diagram of an embodiment of the method for extracting domain name features according to an embodiment of the present application;
[0057] Figure 6 This is another schematic diagram of an embodiment of the method for extracting domain name features according to an embodiment of the present application;
[0058] Figure 7 This is a schematic diagram of the structure of a feature extraction device according to an embodiment of the present application;
[0059] Figure 8 This is a schematic diagram of the structure of a device for extracting domain name features according to an embodiment of the present application. DETAILED DESCRIPTION
[0060] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art may appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0061] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0062] The embodiments of the present application provide a method for extracting domain name features and a feature extraction device, which are used to improve the correlation between application domain name features extracted by the feature extraction device and a target application.
[0063] In order to facilitate readers to understand the solutions of the embodiments of the present application, some technical terms involved in the embodiments of the present application are explained below.
[0064] 1. Common field: refers to at least one character or string separated by periods in an application domain name. The common field refers to an application domain name set. The number of application domain names in the application domain name set that include the common field and the total number of application domain names included in the application domain name set are greater than a preset threshold. For example, the first common field corresponding to the first application domain name set in at least one application domain name set is video.qq.com, where the length of a common field is three strings separated by periods. If the preset threshold is 50%, then the number of application domain names in the first application domain name set that include the first common field and the total number of application domain names included in the first application domain name set are greater than 50%.
[0065] 2. Each application domain name set in at least one application domain name set: refers to an application domain name set having at least two common fields. For example, the at least one application domain name set includes a first application domain name set. The first application domain name set corresponds to a first common field video and a second common field qq.com.
[0066] 3. Target application: refers to a specific application, which is used as an object for the feature extraction device to extract the application domain name features. In the embodiment of the present application, the application refers to a network application, and the website server refers to a function similar to a desktop software application or a mobile application provided to the terminal user based on technologies such as dynamic web pages. The implementation technology of the application includes a client-to-server (Client / Server) architecture, or a browser-to-server (Browser / Server) architecture. When the B / S architecture is adopted, the client is a web browser. Common applications include Webmail, online shopping, online games, online videos, and many other categories. The online video category includes Tencent Video, iQiyi, youtube, and so on.
[0067] For example, when the target application is Tencent Video, the feature extraction device extracts the application domain name features of Tencent Video.
[0068] 4. Prefix: refers to the first character or the first string in the application domain name; or, refers to the first character or the first string in the application domain name and includes at least one character or string separated by a period that is continuous with the first character or the first string. For example: for the application domain name www.123.baidu.com, the suffix is a string separated by a period that includes the first string in the application domain name as the granularity, then the prefix of the application domain name is www.. Another example: the application domain name www.123.baidu.com, the prefix is two continuous strings separated by a period that include the first string in the application domain name as the granularity, then the prefix of the application domain name is www.123.. The prefix in the application domain name should be understood specifically in conjunction with the definition granularity of the prefix. In subsequent embodiments, the prefix in the application domain name should be understood in conjunction with the definition granularity of the prefix in the embodiment or implementation method.
[0069] 5. Suffix: refers to the second-level domain name of the application domain name plus the first-level domain name of the application domain name; or, refers to the second-level domain name of the application domain name and the first-level domain name of the application domain name and includes at least one character or string separated by a period that is continuous with the second-level domain name of the application domain name. For example: for the application domain name 123.video.qq.com, the suffix includes the second-level domain name of the application domain name plus the second-level domain name of the application domain name as the granularity, then the suffix of the application domain name is qq.com. Another example: for the application domain name 123.video.qq.com, the suffix includes three consecutive strings separated by periods as the granularity and these three consecutive strings are the third-level domain name of the application domain name plus the second-level domain name of the application domain name plus the first-level domain name of the application domain name, then the suffix of the application domain name is video.qq.com. In particular, when the domain name contains at least two top-level domains, the suffix in the embodiment of the present application should be understood as including at least one non-top-level domain name continuous with the at least two top-level domain names and the at least two top-level domain names. For example, the application domain name www.icbc.com.cn has a suffix of .icbc.com.cn. The suffix in the application domain name should be understood in combination with the definition granularity of the suffix. In subsequent embodiments, the suffix in the application domain name should be understood in combination with the definition granularity of the suffix in the embodiment or implementation method.
[0070] 6. Substring: refers to at least one character or string separated by a period in the application domain name. For example: for the application domain name 123.video.qq.com, a string separated by a period in the application domain name is used as the substring granularity, then the application domain name includes the substring 123 and the substring video. For the application domain name 123.video.qq.com, two strings separated by a period in the application domain name are used as the substring granularity, then the application domain name may include the substring 123.video. The substring in the application domain name should be understood in conjunction with the definition granularity of the substring. In subsequent embodiments, the substring in the application domain name should be understood in conjunction with the definition granularity of the substring in the embodiment or implementation method.
[0071] Figure 1A This is a schematic diagram of an application scenario of the method for extracting domain name features in the embodiment of the present application. Figure 1A The feature extraction device provided in the embodiment of the present application includes an application test module, an engine identification module, a traffic analysis module, an application domain name feature extraction module and a storage module. The application test module is connected to one end of the engine identification module. The other end of the engine identification module is connected to one end of the traffic analysis module. The other end of the traffic analysis module is connected to one end of the application domain name feature extraction module. The other end of the application domain name feature extraction module is connected to the storage module.
[0072] The application test module has the function of capturing the traffic of application-related processes. Application-related processes refer to processes created after the application is run. For example, the application test module receives an application automatic test task submitted by a user. The application automatic test task carries the application name of the target application. The application test module downloads the target application according to the application automatic test task. Then, the application test module runs the target application and obtains the traffic to be analyzed of the target application through the relevant processes of the target application.
[0073] The engine identification module has the function of identifying the traffic of the application. Optionally, the engine identification module receives the traffic to be analyzed of the target application sent by the application testing module, and identifies the traffic to be analyzed. Alternatively, the engine identification module receives the traffic automatic test task input by the user, and identifies the traffic to be analyzed of the target application carried by the traffic automatic test task. Optionally, the engine identification module sends the traffic to be analyzed of the target application to the traffic analysis module; or, the engine identification module sends the traffic to be analyzed that the engine identification module has not successfully identified to the traffic analysis module. In the subsequent embodiments of the present application, the example of the engine identification module sending all the traffic to be analyzed of the target application to the traffic analysis module is used for explanation.
[0074] The traffic resolution module has the function of resolving the application domain name of the traffic of the application. Optionally, the traffic resolution module receives the traffic to be analyzed of the target application sent by the engine identification module. The traffic resolution module performs domain name resolution on the traffic to be analyzed of the target application to obtain the application domain name of the traffic to be analyzed. Alternatively, the traffic resolution module receives the traffic to be analyzed of the target application input by the user. Then, the traffic resolution module performs domain name resolution on the traffic to be analyzed to obtain the application domain name of the traffic to be analyzed.
[0075] The application domain name feature extraction module has the function of extracting the application domain name features of the application. The application domain name feature extraction module receives the application domain name of the traffic to be analyzed sent by the traffic parsing module, and extracts representative and highly distinguishable application domain name features from the application domain name as the application domain name features of the application. Among them, the application domain name of the traffic to be analyzed can be included in the traffic log of the traffic to be analyzed. Secondly, the application domain name feature extraction module is also used to receive the application name of the target application input by the user, so that the application domain name feature extraction module generates a keyword set related to the application domain name of the target application according to the application name.
[0076] The storage module stores traffic sample library, application feature library and resource knowledge library, etc.
[0077] The traffic sample library stores the traffic of applications collected by the feature extraction device and related information of the collected traffic of applications, such as the five-tuple of traffic, the domain name of traffic, the application name and application category corresponding to the traffic, the number of bytes corresponding to the traffic, etc. The traffic sample library can be used by the feature extraction device to analyze common keywords in the application domain name of applications of each application category.
[0078] The application feature library stores common keywords in the application domain names of applications of various application categories. The applications of various application categories include video applications, live broadcast applications, navigation applications, map applications, and game applications. Secondly, the application domain name feature library is also used to evaluate the relevance and accuracy of the application domain name features extracted by the application domain name feature extraction device and the target application.
[0079] The resource knowledge base stores the geographic location information and ownership information corresponding to the IP address, the mapping relationship between the IP address and the application domain name, the mapping relationship between the IP address and the server certificate, etc. Among them, the ownership information includes company information, organization information, etc. In the case that the application domain name feature extraction module cannot obtain the application information of the target application, the application domain name feature extraction module determines the service information, company information or organization information associated with the traffic to be analyzed through the resource knowledge base and the IP address in the traffic to be analyzed of the target application and / or the application domain name of the traffic to be analyzed of the target application. Then, the application domain name feature extraction module estimates the application name of the target application or the application category of the target application based on the service information, company information or organization information.
[0080] The application domain name feature extraction module calls the traffic sample library, the application feature library and the resource knowledge library through the storage module. Then, the application domain name feature extraction module generates a keyword set associated with the application category of the target application.
[0081] It should be noted that the above Figure 1A The feature extraction device is a cloud server, or the feature extraction device is a computer device, or a device in other forms, which is not limited in this application. Figure 1A The engine identification module and the traffic analysis module may also be integrated into one module. Figure 1A The above modules are functional modules generated after the processor in the cloud server or computer device reads the program code in the memory and runs it. Figure 1A This is merely an example and does not limit the application scenarios to which the embodiments of the present application are applicable.
[0082] Figure 1B This is another application scenario diagram of the embodiment of the present application. Figure 1BThe feature extraction device provided in the embodiment of the present application includes an engine identification module, a traffic slicing module, a traffic resolution module, an application domain name feature extraction module, a storage module, and a feature fusion and application naming module. One end of the engine identification module is connected to one end of the traffic slicing module. The other end of the traffic slicing module is connected to one end of the traffic resolution module. The other end of the traffic resolution module is connected to the first end of the application domain name feature extraction module. The second end of the application domain name feature module is connected to the storage module. The third section of the application domain name feature module is connected to one end of the feature fusion and application naming module.
[0083] The engine identification module has the function of identifying the traffic of the application. For example, the engine identification module receives the first traffic. Then, the engine identification module identifies the first traffic.
[0084] The traffic slicing module is used to divide the traffic received from the engine identification module to obtain multiple traffic parts. The traffic slicing module sends the multiple traffic parts to the traffic analysis module so that the traffic analysis module processes each traffic part as a unit when analyzing the traffic.
[0085] Among them, it should be noted that there are multiple ways for the engine identification module to send traffic to the traffic slicing module, which are illustrated below with examples.
[0086] The first method: the engine identification module sends the traffic that the engine identification module has not successfully identified and is included in the traffic received by the engine identification module to the traffic slicing module.
[0087] The second method: the engine identification module samples the traffic received by the engine identification module to obtain the sampled traffic; then, the engine identification module sends the sampled traffic to the traffic slicing module.
[0088] The third method: the engine identification module performs mirroring processing on the traffic received by the engine identification module to obtain mirrored traffic; then, the engine identification module sends the mirrored traffic to the traffic slicing module.
[0089] In the subsequent embodiments, only the third method is taken as an example for description.
[0090] The traffic resolution module has the function of resolving the application domain name of the traffic. The traffic resolution module receives multiple parts of traffic sent by the traffic slicing module. For example, the multiple parts of traffic include the first part of traffic, the second part of traffic and the third part of traffic. Here, the function of the traffic resolution module is introduced by resolving the first part of traffic. The traffic resolution module resolves the first part of traffic to obtain the application domain name of the first part of traffic. The traffic resolution module sends the application domain name of the first part of traffic to the application domain name feature extraction module.
[0091] The application domain name feature extraction module has the function of extracting application domain name features. The application domain name feature extraction module receives the application domain name sent by the traffic analysis module. The application domain name feature extraction module extracts representative and highly distinguishable application domain name features from the application domain name as the application domain name features of the application.
[0092] The storage module is used to store traffic sample libraries, application feature libraries, resource knowledge libraries, etc. For the introduction of traffic sample libraries, application feature libraries, and resource knowledge libraries, please refer to the previous Figure 1A The relevant introduction in will not be repeated here.
[0093] The feature fusion and application naming module receives the domain name features of the application sent by the application domain name feature extraction module. The feature fusion and application naming module fuses the domain name features of the application. For example, the feature fusion and application naming module fuses the domain name features of the target application according to the preset feature type priority. Secondly, the feature fusion and application naming module estimates the application name of the target application based on the domain name features of the application, and outputs the domain name features of the target application and the application name of the target application to the user.
[0094] In the embodiment of the present application, optionally, Figure 1B The feature extraction device shown is a device that supports traffic analysis function, such as a router, a network device with a firewall function, a personal computer, a mobile terminal device, etc. The feature extraction device can analyze the received traffic in real time to obtain the application domain name characteristics of the application corresponding to the traffic. Optionally, Figure 1B The above modules are functional modules generated after the processor in the above device reads and runs the program code in the memory.
[0095] Figure 1C This is another application scenario diagram of the embodiment of the present application. Figure 1C The feature extraction device provided in the embodiment of the present application is a device installed with a feature extraction tool application. For example, the feature extraction device is a server installed with the feature extraction tool application, or a personal computer or mobile terminal device installed with the feature extraction tool application.
[0096] The feature extraction tool application includes a traffic analysis module and an application domain name feature extraction module. The traffic analysis module is connected to one end of the application domain name feature extraction module, and the other end of the application domain name feature extraction module is connected to the storage module.
[0097] The traffic parsing module has the function of parsing the application domain name of the traffic. For example, the traffic parsing module receives the traffic to be analyzed of the target application input by the user. The traffic parsing module parses the traffic to be analyzed and obtains the application domain name of the target application. The traffic parsing module sends the application domain name of the target application to the application domain name feature extraction module.
[0098] The application domain name feature extraction module has the function of extracting the application domain name features of the application. For example, the application domain name feature extraction module receives at least one application domain name of the target application input by the traffic analysis module or the user. The application domain name feature extraction module analyzes at least one application domain name of the target application and extracts the application domain name features with high representativeness and discrimination from the at least one application domain name as the application domain name features of the target application.
[0099] The storage module is used to store traffic sample libraries, application feature libraries, resource knowledge libraries, etc. For the introduction of traffic sample libraries, application feature libraries, and resource knowledge libraries, please refer to the previous Figure 1A The relevant introduction in will not be repeated here.
[0100] Figure 1C In the application scenario shown, the feature extraction device is installed with feature extraction tool software. The feature extraction tool software can be deployed on a server, a personal computer or a mobile terminal device, etc. It is not dependent on a specific type of device and is suitable for extracting application domain name features of daily traffic. For example, in daily or emergency situations, the feature extraction tool software of the feature extraction device is used to extract application domain name features of traffic. Optionally, Figure 1C The above modules are functional modules generated after the processor in the server, computer device or mobile terminal device reads the program code in the memory and runs it.
[0101] Optionally, Figures 1A to 1C The traffic sample library, application feature library and resource knowledge library shown in the application scenario are deployed in the feature extraction device. Alternatively, in actual applications, the feature extraction device can also call the traffic sample library, application feature library and resource knowledge library from other external devices through an external interface, which is not limited in this application.
[0102] See also Figure 2A , Figure 2A This is a schematic diagram of an embodiment of the method for extracting domain name features of the present application embodiment. Figure 2A The method includes steps 201 to 203.
[0103] 201. A feature extraction device obtains at least one application domain name from traffic to be analyzed of a target application.
[0104] In the embodiment of the present application, step 201 has specific application scenarios, which are specifically introduced through subsequent scenarios one to five and will not be repeated here.
[0105] 202. The feature extraction device generates at least one application domain name set according to the at least one application domain name.
[0106] In an embodiment of the present application, at least two application domain names belonging to the same application domain name set have at least two identical characters or strings separated by periods. For example, the first application domain name set in the at least one application domain name set includes application domain names 123.video.qq.com and video.qq.com, and the at least two identical characters or strings separated by periods are video and qq.com respectively.
[0107] In an embodiment of the present application, each application domain name set in the at least one application domain name set corresponds to at least two common fields. The at least two common fields are partially or completely different. The common field includes at least one character or string separated by a dot.
[0108] For example, the at least one application domain name set includes a first application domain name set. The at least two public fields corresponding to the first application domain name set are 123 and baidu1.com. It can be seen that 123 and baidu1.com are partially different. For another example: the at least two public fields corresponding to the first application domain name set are video and qq.com. It can be seen that video and qq.com are completely different.
[0109] In the embodiment of the present application, for the same application domain name set, the frequency of different common fields appearing in the application domain name set may be different or the same, and the present application does not limit this. In the embodiment of the present application, the frequency rate should be understood as the ratio of the number of application domain names in the application domain name set that contain the common field to the total number of application domain names included in the application domain name set.
[0110] For example, the at least one application domain name set includes a first application domain name set. The at least two public fields corresponding to the first application domain name set are 123 and baidu.com. The public field 123 appears in the first application domain name set at a frequency of 60%, and the public field baidu.com appears in the first application domain name set at a frequency of 70%.
[0111] Optionally, the feature type of the public field includes any of the following.
[0112] 1. The prefix in the application domain name.
[0113] 2. Apply the suffix in the domain name.
[0114] 3. Substrings in the application domain name.
[0115] For the specific meanings of prefix, suffix and substring, please refer to the above explanations of prefix, suffix and substring, which will not be repeated here.
[0116] 4. The target domain name field in the application domain name.
[0117] Optionally, the target-level domain name field is the second-level domain name of the application domain name, or the third-level domain name, or other-level domain name fields, which is not specifically limited in this application.
[0118] For example, the application domain name is www.baidu.com, the target-level domain name field is the second-level domain name field, and the public field is baidu.
[0119] The application domain name set is introduced below from two possible forms: the at least one application domain name set includes one application domain name set and the at least one application domain name set includes at least two application domain name sets.
[0120] When the at least one application domain name set includes an application domain name set, the at least one application domain name set includes a first application domain name set as an example for illustration. The first application domain name set corresponds to at least two common fields. The at least two common fields include a first common field and a second common field as an example for illustration. The ratio of the number of application domain names including the first common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a first preset threshold, and the ratio of the number of application domain names including the second common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a second preset threshold.
[0121] Optionally, the first preset threshold and the second preset threshold are the same or different.
[0122] For example, the first common field is video, and the second common field is qq.com. The first preset threshold is 50%, and the second preset threshold is 60%. The ratio of the number of application domain names including video in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than 50%. The ratio of the number of application domain names including qq.com in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than 60%.
[0123] When the at least one application domain name set includes at least two application domain name sets, the at least one application domain name set includes a first application domain name set and a second application domain name set as an example for description, wherein at least two common fields corresponding to the first application domain name set are partially or completely different from at least two common fields corresponding to the second application domain name set.
[0124] For example, at least two common fields included in the first application domain name set are video and qq.com. At least two common fields included in the second application domain name set are v and qq.com. It can be seen that video and qq.com are partially different from v and qq.com. For another example, at least two common fields corresponding to the first application domain name set are 123 and video. At least two common fields corresponding to the second application domain name set are film and 45. It can be seen that 123 and video are completely different from film and 45.
[0125] Optionally, here, at least two common fields corresponding to the second application domain name set include a third common field and a fourth common field. The ratio of the number of application domain names including the third common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a third preset threshold, and the ratio of the number of application domain names including the fourth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a fourth preset threshold. Optionally, the third preset threshold is the same as or different from the fourth preset threshold.
[0126] 203. The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as first application domain name features of the traffic to be analyzed.
[0127] The at least one application domain name set in the embodiment of the present application may include one application domain name set, or may include at least two application domain name sets. In view of these two situations, the feature extraction device extracts the first application domain name feature by: Figure 3 , Figure 4 , Figure 5 and Figure 6 The illustrated embodiments are described in detail respectively.
[0128] In an embodiment of the present application, a feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application. The feature extraction device generates at least one application domain name set based on the at least one application domain name. Among them, at least two application domain names belonging to the same application domain name set have at least two identical characters or strings separated by periods. The first common field and the second common field correspond to the first application domain name set in the at least one application domain name set. The ratio of the number of application domain names including the first common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a first preset threshold. The number of application domain names including the second common field in the first application domain name set and the total number of application domain names included in the first application domain name set are greater than a second preset threshold. The first common field includes at least one character or string separated by periods. The second common field includes at least one character or string separated by periods. Then, the feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed. It can be seen that in the technical solution of the embodiment of the present application, the first application domain name set in the at least one application domain name set corresponds to the first common field and the second common field. Then the application domain name features extracted by the feature extraction device from the first application domain name set include at least two common fields. Therefore, the extraction granularity of the application domain name features is small, and the application domain name features extracted by the feature extraction device are highly correlated with the target application. For example, for Tencent Video, the feature extraction device in the technical solution of the embodiment of the present application extracts video.qq.com from 123.v.qq.com, film.qq.com and video.qq.com, thereby obtaining application domain name features that are more relevant to Tencent Video.
[0129] In the present application embodiment, the above Figure 2A In step 201 of the embodiment shown, the feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application, which has a specific application scenario. The following is a detailed description by way of example. The same applies to scenarios not shown in the embodiments of the present application and having similar or identical requirements, and the present application does not limit it.
[0130] Scenario 1: The feature extraction device receives a traffic analysis task submitted by a user.
[0131] Optionally, in scenario 1, the above Figure 2A The illustrated embodiment further comprises step 201a. Step 201a is performed before step 201.
[0132] Step 201a: The feature extraction device obtains the traffic analysis task submitted by the user for the traffic to be analyzed.
[0133] The traffic analysis task carries the application name of the target application and the traffic to be analyzed of the target application.
[0134] like Figure 1A As shown, the feature extraction device receives the traffic analysis task submitted by the user through the application test module. The feature extraction device identifies the traffic to be analyzed submitted by the user through the engine identification module, and sends the traffic to be analyzed to the traffic resolution module. Then the above step 201 includes: the feature extraction device performs domain name resolution on the traffic to be analyzed through the traffic resolution module to obtain at least one application domain name of the traffic to be analyzed.
[0135] Scenario 2: The feature extraction device receives an automatic application traffic test task submitted by a user.
[0136] Optionally, in scenario 2, the above Figure 2A The illustrated embodiment further includes step 201b, step 201c and step 201d. Steps 201b to 201d are performed before step 201.
[0137] Step 201b: The feature extraction device obtains the application traffic automatic test task submitted by the user.
[0138] The application flow automatic test task is used to request the feature extraction device to extract the application domain name feature of the target application. The application flow automatic test task carries the application name of the target application.
[0139] Step 201c: The feature extraction device downloads the target application according to the application traffic automatic test task.
[0140] Step 201d: The feature extraction device captures the traffic to be analyzed by running the target application.
[0141] like Figure 1A As shown, the feature extraction device downloads the target application according to the application name of the target application. The feature extraction device runs the target application through the application test module. Then, the application test module obtains the traffic to be analyzed of the target application through the traffic generated by the relevant process of the target application. Then the above step 201 includes: the feature extraction device performs domain name resolution on the traffic to be analyzed through the traffic resolution module to obtain at least one application domain name of the traffic to be analyzed.
[0142] Scenario three: The feature extraction device receives the first flow of the target application, and divides the first flow to obtain the flow to be analyzed.
[0143] Optionally, in scenario 3, the above Figure 2AThe illustrated embodiment further includes step 201e and step 201f. Step 201e and step 201f are performed before step 201.
[0144] Step 201e: The feature extraction device receives the first traffic of the target application.
[0145] Step 201f: The feature extraction device divides the first flow of the target application to obtain the flow to be analyzed of the target application.
[0146] Optionally, there are multiple ways for the feature extraction device to divide the first flow, which are introduced below.
[0147] 1. The feature extraction device divides the first flow according to the duration of the preset time slice to obtain the flow to be analyzed.
[0148] like Figure 1B As shown, since the first flow is continuously input, and the feature extraction device needs to timely feedback the domain name feature extraction result of the first flow. Therefore, the feature extraction device divides the first flow according to the preset time slice to obtain the flow to be analyzed. Then, the feature extraction device extracts the domain name feature of the flow to be analyzed.
[0149] For example, Figure 2B As shown, the feature extraction device divides the first flow into four parts of flow according to the duration of the preset time slice. The four parts of flow are respectively the first part of flow, the second part of flow, the third part of flow and the fourth part of flow. Here, the first part of flow is taken as the flow to be analyzed as an example. That is, the feature extraction device uses the first part of flow obtained by division as the flow to be analyzed in the embodiment of the present application.
[0150] Among them, the duration of the preset time slice is pre-configured, or specified by the protocol, or dynamically configured by the feature extraction device according to the transmission situation of the first traffic, and is not specifically limited in this application.
[0151] Optionally, the feature extraction device configures the duration of the preset time slice according to the transmission status of the first traffic, including the following multiple methods, which are illustrated below.
[0152] a. The feature extraction device uses the duration of receiving the traffic to be analyzed including M data streams in the first traffic as the duration of the preset time slice, where M is a positive integer greater than or equal to 1.
[0153] b. The feature extraction device uses the duration of receiving the traffic to be analyzed that contains N application domain names in the first traffic as the length of the preset time slice, where N is a positive integer greater than or equal to 1.
[0154] c. The feature extraction device uses the duration of the feature extraction device receiving the to-be-analyzed traffic containing S bytes in the first traffic as the length of the preset time slice, where S is a positive integer greater than or equal to 1.
[0155] 2. The feature extraction device divides the first flow according to the duration of the preset time slice and the address information of the first flow to obtain the flow to be analyzed.
[0156] Optionally, the address information of the first flow includes an IP address of the first flow or an IP address segment of the first flow. The feature extraction device divides the flows with the same IP address or the same IP address segment included in the first flow into flows to be analyzed according to the duration of a preset time slice.
[0157] For example, Figure 2B As shown, the feature extraction device divides the first traffic into four parts of traffic by the duration of the preset time slice and the IP address segment of the first traffic. The four parts of traffic are the first part of traffic, the second part of traffic, the third part of traffic and the fourth part of traffic. Among them, the IP address segment of the first part of traffic is 61.163.111.0 / 24. The IP address segment of the second part of traffic is 58.251.150.0 / 24. The IP address segment of the third part of traffic is 203.119.207.0 / 24. The IP address segment of the fourth part of traffic is 60.205.90.0 / 24. Here, the first part of traffic is taken as the traffic to be analyzed as an example. That is, the feature extraction device uses the first part of traffic obtained by division as the traffic to be analyzed in the embodiment of the present application.
[0158] In scenario three, the above step 201 includes: the feature extraction device performs domain name resolution on the traffic to be analyzed through the traffic resolution module to obtain at least one application domain name of the traffic to be analyzed.
[0159] Scenario 4: The feature extraction device is a device installed with a feature extraction tool application. The feature extraction device receives the traffic to be analyzed of the target application through the feature extraction tool application.
[0160] like Figure 1C As shown, the feature extraction device is installed with a feature extraction tool application. The feature extraction device receives the target application's traffic to be analyzed through the traffic resolution module of the feature extraction tool application. Then the above step 201 includes: the feature extraction device performs domain name resolution on the traffic to be analyzed through the traffic resolution module to obtain at least one application domain name of the traffic to be analyzed.
[0161] Optionally, the specific process of the traffic resolution module in the above scenarios 1 to 4 performing domain name resolution on the traffic to be analyzed is as follows: the traffic resolution module divides the traffic to be analyzed into multiple data streams according to the five-tuple corresponding to the traffic to be analyzed, and the traffic resolution module respectively extracts at least one application domain name corresponding to the traffic of the multiple data streams. The traffic of each data stream corresponds to a five-tuple. The five-tuple corresponding to the traffic to be analyzed includes the source IP address, target IP address, destination port and transport layer protocol of the message included in the traffic to be analyzed.
[0162] Scenario 5: The feature extraction device is a device installed with a feature extraction tool application. The feature extraction device receives at least one application domain name of the traffic to be analyzed of the target application through the feature extraction tool application.
[0163] like Figure 1C As shown, the feature extraction device is installed with a feature extraction tool application. The above step 201 includes: the feature extraction device receives at least one application domain name of the target application's traffic to be analyzed through the application domain name feature extraction module.
[0164] Above Figure 2A In step 202 of the illustrated embodiment, the feature extraction device generates at least one application domain name set according to the at least one application domain name. The feature extraction device can be implemented in a variety of ways, which are described below by way of example.
[0165] Method 1: The feature extraction device generates the at least one application domain name set according to the common prefix of the at least one application domain name.
[0166] For example, the at least one application domain name includes taobao.com, taobao.1626.com, taobao.lazada.co.th and taobao.apilocate.amap.com. First, the feature extraction device classifies the at least one application domain name containing the common prefix taobao into an application domain name set, namely, application domain name set 1. Then, the feature extraction device divides the application domain names containing the common prefix taobao.com in the application domain name set 1 into application domain name set 2. The feature extraction device divides the application domain names containing the common prefix taobao.1626 in the application domain name set 1 into application domain name set 3. The feature extraction device divides the application domain names containing the common prefix taobao.lazada in the application domain name set 1 into application domain name set 4. The feature extraction device divides the application domain names containing the common prefix taobao.apilocate in the application domain name set 1 into application domain name set 5. In this way, four application domain name sets containing different common prefixes are obtained.
[0167] Method 2: The feature extraction device generates the at least one application domain name set according to the common suffix of the at least one application domain name.
[0168] For example, the at least one application domain name includes 123.v.qq.com, baidu.v.qq.com, tengxun.video.qq.com, and 456.fp.qq.com. First, the feature extraction device classifies the at least one application domain name containing the public suffix qq.com into an application domain name set, namely, application domain name set 1. Then, the feature extraction device divides the application domain names containing the public suffix .v.qq.com in the application domain name set 1 into application domain name set 2; the feature extraction device divides the application domain names containing the public suffix .video.qq.com in the application domain name set 1 into application domain name set 3; the feature extraction device divides the application domain names containing the public suffix .fp.qq.com in the application domain name set 1 into application domain name set 4. In this way, three application domain name sets containing different public suffixes are obtained.
[0169] Method 3: The feature extraction device generates the at least one application domain name set according to the common substring of the at least one application domain name.
[0170] For example, the at least one application domain name includes jdvod.300hu.com, vod.300hu.com, jdvodoss.jcloudcache.com, jdvod.jcloudcache.com and jdvodimg.jcloudcache.com. First, the feature extraction device classifies the at least one application domain name containing the common substring vod into an application domain name set, namely, application domain name set 1. Then, the feature extraction device divides the application domain names containing the common substring vod and the common substring 300hu in the application domain name set 1 into application domain name set 2; the feature extraction device divides the application domain names containing the common substring vod and the common substring jcloudcache in the application domain name set 1 into application domain name set 3. In this way, two application domain name sets containing different common substrings are obtained.
[0171] Mode 4: The feature extraction device generates the at least one application domain name set according to the target-level domain name of the at least one application domain name.
[0172] For example, the at least one application domain name includes v.qq.com, video.qq.com, qvideo.qq.com, film.qq.com and live.qq.com. First, the second-level domain name and the first-level domain name of each application domain name in the at least one application domain name are the same, that is, qq.com. The feature extraction device classifies the at least one application domain name into an application domain name set, that is, application domain name set 1. Then, the feature extraction device divides the application domain names with the third-level domain name v in the application domain name set 1 into application domain name set 2. The feature extraction device divides the application domain names with the third-level domain name video in the application domain name set 1 into application domain name set 3. The feature extraction device divides the application domain names with the third-level domain name q.video in the application domain name set 1 into application domain name set 3. The feature extraction device divides the application domain names with the third-level domain name film in the application domain name set 1 into application domain name set 4. The feature extraction device divides the application domain names with the third-level domain name live in the application domain name set 1 into application domain name set 5.
[0173] Optionally, before generating the at least one application domain name set, the feature extraction device may classify the at least one application domain name according to the source field of the domain name, and then generate the at least one application domain name set.
[0174] Optionally, before the feature extraction device generates the at least one application domain name set, the feature extraction device classifies the at least one domain name according to the source field of the at least one application domain name to obtain a first type of application domain name and a second type of application domain name. Then, the feature extraction device generates at least one application domain name set according to the above-mentioned method and each type of application domain name. Among them, the source field of the at least one application domain name includes the Host field of the hypertext transfer protocol (HTTP) message included in the traffic to be analyzed or the server name indication (SNI) field of the transport layer security (TLS) protocol message included in the traffic to be analyzed. For example, the first type of application domain name is the application domain name obtained by the feature extraction device from the HTTP message, and the second type of application domain name is the application domain name obtained by the feature extraction device from the SNI field of the TLS protocol message.
[0175] In the embodiment of the present application, the above Figure 2A In step 203 of the embodiment shown, the feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed. There are many ways for the feature extraction device to extract application domain name features, which are introduced below.
[0176] First, the at least one application domain name set includes an application domain name set to illustrate step 203. Here, the at least one application domain name set includes a first application domain name set as an example for illustration.
[0177] Combine the following Figure 3 The above step 203 is described below. Figure 3 As shown, the process of the feature extraction device provided in the embodiment of the present application extracting application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed includes steps 3001 and 3002.
[0178] 3001. The operation performed by the feature extraction device on the first application domain name set is: the feature extraction device determines at least two common fields corresponding to the first application domain name set according to any one or more of the common prefix algorithm, the common suffix algorithm and the common substring algorithm, and determines that the first public domain name feature includes at least two common fields corresponding to the first application domain name set.
[0179] Each of the at least two common fields includes at least one character or string separated by a period.
[0180] The form of the first public domain name feature is explained below in conjunction with the algorithm used by the feature extraction device.
[0181] a. When the first public domain name feature is determined by the feature extraction device according to a common prefix algorithm, the first public domain name feature includes a first common prefix, and the first common prefix includes at least two common fields.
[0182] For example, the first application domain name set includes the application domain name video.123.com and the application domain name video.123.shipin.com. Then the first common prefix is video.123. The first common prefix includes two common fields. The two common fields are respectively the common field video and the common field 123. The first common domain name feature includes the common field video and the common field 123.
[0183] b. When the first public domain name feature is determined by the feature extraction device according to a public suffix algorithm, the first public domain name feature includes a first public suffix, and the first public suffix includes at least two public fields.
[0184] For example, the first application domain name set includes tengxun.video.qq.com and 123.video.qq.com, then the first public suffix is .video.qq.com. The first public suffix includes two public fields, which are public fields video and qq.com. The first public domain name feature includes public fields video and qq.com.
[0185] For example, the first application domain name set includes static.xx.fb.cdn.net and scontent.xx.fb.cdn.net, and the first public suffix is .xx.fb.cdn.net. The first public suffix includes three public fields, which are public field xx, public field fb and public field cdn.net.
[0186] c. When the first public domain name feature is determined by the feature extraction device according to the common substring algorithm, the first public domain name feature includes a first common substring, and the first common substring includes at least two common fields.
[0187] For example, the first application domain name set includes dhxy.res.netease.com and dhxy.fp.ps.netease.com. Then, the first common substring includes dhxy.+.netease.com. The first common substring includes two common fields. The two common fields are respectively a common field dhxy and a common field netease.com.
[0188] d. When the first public domain name feature is determined by the feature extraction device according to the common prefix algorithm and the common substring algorithm, the first public domain name feature includes a second common prefix plus a second common substring. The second common prefix includes at least one common field, and the second common substring includes at least one common field.
[0189] For example, the first application domain name set includes dhxy.res.netease.com and dhxy.fp.ps.netease.com. Then, the first common prefix is dhxy., and the second common substring is .netease.com. The first common prefix includes a common field, namely, the common field dhxy. The second common substring includes a common field, namely, the common field netease.com.
[0190] e. When the first public domain name feature is determined by the feature extraction device according to the public suffix algorithm and the public substring algorithm, the first public domain name feature is in the form of a third public substring plus a second public suffix. The third public substring includes at least one public field, and the second public suffix includes at least one public field.
[0191] For example, the first application domain name set includes jdvod.300hu.com and vod.300hu.com. Then the third common substring is vod., and the second common suffix is .300hu.com. The third common substring includes a common field, namely, the common field vod, and the second common suffix includes a common field, namely, the common field 300hu.com.
[0192] f. When the first public domain name feature is determined by the feature extraction device according to the common prefix algorithm and the common suffix algorithm, the first public domain name feature includes the third common prefix and the third common suffix.
[0193] For example, the first application domain name set includes dhxy.chatbot.nie.163.com and dhxy.res.163.com. Then, the third public prefix is dhxy., and the third public suffix is .163.com. The third public prefix includes a public field, namely, the public field dhxy. The third public suffix includes a public field, namely, the public field 163.com.
[0194] e. When the first public domain name feature is determined by the feature extraction device according to the common prefix algorithm, the common substring algorithm and the common suffix algorithm, the first public domain name feature includes the fourth common prefix plus the fourth common substring and the fourth common suffix.
[0195] For example, the first application domain name set includes 123.video.qq.com and 123.tengxun.video.qq.com, the fourth common prefix is 123, the fourth common substring is video, and the fourth common suffix is qq.com. Among them, the fourth common prefix includes a common field, namely the common field 123. The fourth common substring includes a common field, namely the common field video. The fourth common suffix includes a common field, namely the common field qq.com. That is, the first public domain name features include the common field 123, the common field video, and the common field qq.com.
[0196] 3002. The feature extraction device uses the first public domain name feature as the first application domain name feature of the traffic to be analyzed.
[0197] For example, the first public domain name feature is video.123. Then, the feature extraction device uses video.123. as the first application domain name feature of the traffic to be analyzed.
[0198] The above step 203 is explained below by assuming that the at least one application domain name set includes at least two application domain name sets. Here, the at least one application domain name set includes a first application domain name set and a second application domain name set. In the above step 203, the feature extraction device extracts application domain name features from the at least one application domain name set as the first application domain name features of the traffic to be analyzed. The feature extraction device adopts the following method, which is introduced below.
[0199] The first method: the feature extraction device determines the second public domain name feature, and uses the second public domain name feature as the first application domain name feature of the traffic to be analyzed.
[0200] Combine the following Figure 4 Explain the first method. Figure 4 As shown, the process of the feature extraction device provided in the embodiment of the present application extracting application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed includes steps 4001 and 4002.
[0201] 4001. The feature extraction device determines a second public domain name feature.
[0202] In the embodiment of the present application, the first public domain name feature is at least two common fields between the first application domain name set and the second application domain name set, and each of the at least two common fields includes at least one character or string separated by a period.
[0203] For example, at least two common fields corresponding to the first application domain name set are video, 123, and qq.com, and at least two common fields corresponding to the second application domain name set are v, 123, and qq.com. It can be seen that at least two common fields in common between the first application domain name set and the second application domain name set are 123 and qq.com.
[0204] Optionally, the at least two identical common fields include a fifth common field and a sixth common field. Among them, the ratio of the number of application domain names including the fifth common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than the fifth preset threshold. The ratio of the number of application domain names including the sixth common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than the sixth preset threshold. The ratio of the number of application domain names including the fifth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than the seventh preset threshold. The ratio of the total number of application domain names including the sixth common field in the second application domain name set is greater than the eighth preset threshold.
[0205] Optionally, the fifth preset threshold is equal to or unequal to the sixth preset threshold, which is not specifically limited in this application. The seventh preset threshold is equal to or unequal to the eighth preset threshold, which is not specifically limited in this application.
[0206] For example, at least two of the same common fields between the first application domain name set and the second application domain name set are 123 and qq.com, respectively. The fifth preset threshold is 50%, and the sixth preset threshold is 70%. The seventh preset threshold is 60%, and the eighth preset threshold is 70%. Then the ratio of the number of application domain names including the common field 123 in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than 50%. The ratio of the number of application domain names including the common field qq.com in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than 70%. The ratio of the number of application domain names including the common field 123 in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than 60%. The ratio of the number of application domain names including the common field qq.com in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than 70%.
[0207] 4002. The feature extraction device uses the second public domain name feature as the first application domain name feature of the traffic to be analyzed.
[0208] For example, in the example in step 4001, the second public domain name feature is .123.qq.com. The feature extraction device uses .123.qq.com as the first application domain name feature.
[0209] The second way: the feature extraction device uses the first public domain name feature extracted from the first application domain name set and the second public domain name feature extracted from the second application domain name set as the first application domain name feature of the traffic to be analyzed.
[0210] Combine the following Figure 5 Explain the second method. Figure 5 As shown, the process of the feature extraction device provided in the embodiment of the present application extracting application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed includes steps 5001 to 5003.
[0211] 5001. The feature extraction device determines at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm and a common substring algorithm, and uses the determined at least two common fields as the first common domain name features.
[0212] Step 3001 and the aforementioned Figure 3 Step 3001 in the embodiment shown is similar, please refer to the aforementioned Figure 3 The detailed description of step 3001 in the illustrated embodiment will not be repeated here.
[0213] 5002. The feature extraction device determines at least two common fields corresponding to the second application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm and a common substring algorithm, and uses the determined at least two common fields as the third common domain name feature.
[0214] Step 5002 is the same as the above Figure 3 Step 3001 in the embodiment shown is similar, please refer to the aforementioned Figure 3 The detailed description of step 3001 in the illustrated embodiment will not be repeated here.
[0215] 5003. The feature extraction device uses the first public domain name feature and the third public domain name feature as the first application domain name feature of the traffic to be analyzed.
[0216] For example, the first public domain name feature is .video.123.com, and the second public domain name feature is .video.tengxun.com. Then, the feature extraction device uses .video.123.com and .video.tengxun.com as the first application domain name feature.
[0217] Optionally, when there is an overlapping fourth public domain name feature between the first public domain name feature and the second public domain name, the above Figure 5 The illustrated embodiment also includes step 5004 and step 5005 .
[0218] Step 5004: The feature extraction device excludes the fourth public domain name feature from the first public domain name feature to obtain the fifth public domain name feature.
[0219] For example, the first public domain name feature is .video.123.com, and the second public domain name feature is .video.tengxun.com. Then, the fourth public domain name feature where the first public domain name feature overlaps with the second public domain name feature is .video. The feature extraction device excludes .video from .video.123.com and obtains .123.com.
[0220] Step 5005: The feature extraction device uses the third public domain name feature and the fifth public domain name feature as the second application domain name feature of the traffic to be analyzed.
[0221] For example, the feature extraction device uses .123.com and .video.tengxun.com as the second application domain name features of the traffic to be analyzed.
[0222] The third method: the feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed according to the keyword set. The keyword set is generated by the feature extraction device according to the application name of the target application or the application category of the target application.
[0223] In the third method, the above Figure 2A The illustrated embodiment further includes step 203 a , and step 203 a is performed before step 203 .
[0224] Step 203a: The feature extraction device generates a keyword set of the target application according to the application name of the target application or the application category of the target application.
[0225] Optionally, there are multiple ways for the feature extraction device to generate a keyword set, which are introduced below.
[0226] 1. The feature extraction device generates a set of keywords associated with the application name of the target application.
[0227] Since the main language form of the application domain name is English, the feature extraction device can convert the non-English application name into an English application name. For example, convert the Chinese application name into a pinyin application name. Then, the feature extraction device generates a keyword set associated with the application name based on the pinyin application name.
[0228] There are many ways for the feature extraction device to generate a keyword set associated with the application name, as illustrated below:
[0229] a. The feature extraction device generates a keyword set associated with the application name through an open source tool.
[0230] b. The feature extraction device generates a set of keywords associated with the application name through a pinyin syllable library or a word library.
[0231] The keyword set includes keywords such as the application name in pinyin form, words in the application name in pinyin form, combinations of words, abbreviations of the application name in pinyin form, and combinations of the abbreviations.
[0232] For example, for Tencent Video, the feature extraction device generates keywords such as tengxunshipin, tengxun, shipin, txsp, etc. That is, the keyword set is [tengxunshipin, tengxun, shipin, txsp].
[0233] 2. The feature extraction device generates a keyword set according to the multilingual translations corresponding to the application name of the target application.
[0234] Since the main language form of the application domain name is English, this method is explained here by taking the multi-language translation into English as an example. The feature extraction device determines the English translation corresponding to the application name by comparing the Chinese and English names of the app or the translation website. The feature extraction device generates a set of keywords associated with the English translation of the application name based on the English translation. For example, for Tencent Video, the keywords generated by the feature extraction device include tengxunvideo and video, etc. For example, for Baidu Maps, the keywords generated by the feature extraction device include baidumap and map, etc. The feature extraction device then integrates the generated keywords to form a keyword set.
[0235] 3. The feature extraction device generates a set of keywords associated with the application category of the target application.
[0236] For example, combined with Figures 1A to 1C As shown in the schematic diagram of the application scenario, the feature extraction device generates the keyword set by applying the feature library. For example, Tencent Video belongs to the video application, and the feature extraction device generates keywords such as video, vod, live, film, and tv by applying the feature library. The feature extraction device then integrates these keywords to form a keyword set.
[0237] Then combine Figure 6 As shown, the process of the feature extraction device provided in the embodiment of the present application extracting application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed includes step 6001.
[0238] 6001. The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set according to the keyword set as the first application domain name features of the traffic to be analyzed.
[0239] The feature extraction device extracts the first application domain name feature from the at least one application domain name set according to the keyword set. The specific process includes: the feature extraction device determines that the first keyword in the keyword set exists in the first application domain name included in the at least one application domain name set, and the feature extraction device adds the suffix of the first application domain name to the first keyword as the first application domain name feature.
[0240] For example, the keyword set includes video, and the at least one application domain name set includes 123.video.qq.com. Then, the feature extraction device uses .video.qq.com as the first application domain name feature. For another example, the keyword set includes live, and the at least one application domain name set includes live01.xx.qq.com, live02.xx.qq.com, and livep.qq.com. Then, the feature extraction device uses live. plus .xx.qq.com as the first application domain name feature.
[0241] In an embodiment of the present application, before the above step 203a, the feature extraction device obtains the application name of the target application or the application category of the target application. Among them, the acquisition method of the feature extraction device needs to be explained in combination with the specific application scenario. In the above-mentioned scenarios one to five shown for the specific application scenarios of step 201, in scenario one, scenario two, scenario four and scenario five, the feature extraction device receives the application name of the target application or the application category of the target application input by the user. In scenario three, the acquisition method of the feature extraction device includes the following two methods, which are explained below.
[0242] a. The feature extraction device obtains the application name of the target application or the application category of the target application according to at least one application domain name of the traffic to be analyzed.
[0243] Combined with the above Figures 1A to 1C To illustrate, the feature extraction device determines the service information, company information or organization information associated with the at least one application domain name based on the resource knowledge base, and estimates the application information of the target application or the application category of the target application based on the service information, company information or organization information.
[0244] b. The feature extraction device obtains the application name of the target application or the application category of the target application according to the address information of the traffic to be analyzed.
[0245] The address information of the traffic to be analyzed includes the IP address of the traffic to be analyzed.
[0246] Combined with the above Figures 1A to 1C To explain, the feature extraction device obtains service information, company information or organization information associated with the IP address according to the resource knowledge base, and estimates application information of the target application or application category of the target application according to the service information, company information or organization information.
[0247] In the embodiment of the present application, optionally, the above Figure 2A The first application domain name feature in step 203 of the embodiment shown includes multiple application domain name features of different feature types. Figure 2A The illustrated embodiment further includes step 203b. Step 203b is performed after step 203.
[0248] Step 203b: The feature extraction device selects an application domain name feature from application domain name features of multiple different feature types in the order of preset feature type priorities from high to low as the third application domain name feature of the traffic to be analyzed.
[0249] Among them, the feature types include prefix, suffix, substring, prefix plus suffix, prefix plus substring, substring plus substring, substring plus suffix and prefix plus substring plus suffix.
[0250] For the target application Tencent Video, the first application domain name feature extracted by the domain name feature extraction method of the embodiment of the present application includes: public suffix .v.qq.com and public suffix .video.qq.com, public prefix plus public suffix apd-+.v.smtcdns.com and public prefix plus public suffix live. plus .l.qq.com. If the priority of the public suffix is higher than the priority of the public prefix plus the public suffix, the feature extraction device uses .v.qq.com and .video.qq.com as the third application domain name feature of the traffic to be analyzed.
[0251] It should be noted that, when the at least one application domain name set includes at least two application domain name sets, the present application illustrates three implementation methods of extracting the first application domain name feature, namely the first method to the third method. The first application domain name feature includes application domain name features extracted by multiple extraction methods. Optionally, before step 203b, the feature extraction device may also select a fourth application domain name feature from the application domain name features extracted by multiple extraction methods in a high to low order according to a preset extraction method priority. Among them, the fourth application domain name feature includes application domain name features of multiple different feature types. Then the above step 203b includes: the feature extraction device selects the application domain name feature from the application domain name features of multiple different feature types in a high to low order according to a preset feature type priority as the third application domain name feature of the traffic to be analyzed.
[0252] For example: For the target application Tencent Video, the feature extraction device extracts the public suffix type features of .v.qq.com and .video.qq.com through the first method. The feature extraction device extracts prefix + suffix type features such as apd-+.v.smtcdns.com and live+.l.qq.com through the second method. The feature extraction device extracts keyword features such as video.qq.com, live.qq.com and vod.qq.com through the third method. If the priority of the third method is higher than that of the second method, the priority of the second method is higher than that of the first method. The feature extraction device will select video.qq.com, live.qq.com, vod.qq.com, apd-+.v.smtcdns.com and live. plus .l.qq.com as the fourth application domain name feature. If the priority of the public suffix is higher than the priority of the public prefix plus the public suffix, the feature extraction device will use video.qq.com, live.qq.com, and vod.qq.com as the third application domain name feature of the traffic to be analyzed.
[0253] Optional, Figure 2A The illustrated embodiment further includes step 203c, and step 203c is performed after step 203b.
[0254] Step 203c, the feature extraction device outputs the number of application domain names corresponding to the third application domain name feature included in the at least one application domain name, the number of five-tuples of traffic corresponding to the third application domain name feature included in the traffic to be analyzed, and the number of bytes of the domain name corresponding to the third application domain name feature.
[0255] For example, for the target application "Miaopai", the application domain name feature of the "Miaopai" application extracted by the feature extraction device is .miaopai.com. Among at least one application domain name of the traffic to be analyzed for this application, 8 application domain names contain .miaopai.com. The number of quintuples of traffic corresponding to the application domain name containing .miaopai.com in the traffic to be analyzed is 116 (i.e., 116 data streams). The number of bytes of the traffic corresponding to the application domain name containing .miaopai.com in the traffic to be analyzed is 51593048. See Table 1 for details.
[0256] Table 1
[0257]
[0258]
[0259] Optional, in the above Figure 1B In the application scenario shown, the feature extraction device estimates the application name of the target application based on the third application domain name feature. The feature extraction device outputs the application name of the target application to the user. Specifically, the feature fusion and application naming module calls the resource knowledge base and combines the third application domain name feature to determine the associated service information, company information or organization information of the traffic to be analyzed. The feature fusion and application naming module estimates the application name of the target application based on the service information, company information or organization information.
[0260] It can be seen that through the technical solution of the embodiment of the present application, the user can evaluate the relevance of the third application domain name feature and the target application by combining the number of bytes of the traffic corresponding to the third application domain name feature and the five-tuple of the traffic corresponding to the third application domain name. Secondly, through the technical solution of the embodiment of the present application, the feature extraction device can aggregate the traffic of more related application domain names and extract more representative application domain name features from the traffic of the related application domain names.
[0261] Accordingly, an embodiment of the present application provides a feature extraction device for executing the domain name feature extraction method provided in each of the above embodiments. Figure 7 is a schematic diagram of the structure of a feature extraction device provided in an embodiment of the present application. Optionally, Figure 7 The feature extraction device shown is Figures 1A to 1C The feature extraction device in the application scenario shown, Figure 2A , Figure 3 , Figure 4 , Figures 5 and 6 The feature extraction device in the process shown in the figure includes a processor 701 , a memory 702 and a network interface 703 .
[0262] The processor 701 may be one or more CPUs, and the CPU may be a single-core CPU or a multi-core CPU.
[0263] The memory 702 includes, but is not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), flash memory, or optical memory, etc. The memory 702 stores operating system code.
[0264] The network interface 703 may be a wired interface, such as a fiber distributed data interface (FDDI) or a Gigabit Ethernet (GE) interface; the network interface 703 may also be a wireless interface. The network interface 703 is used to receive data streams from an internal network and / or an external network, and communicate with a flow device according to instructions from the processor 701. The flow device is a device that provides the flow to be analyzed of the target application.
[0265] Optionally, the processor 701 implements the method in the above embodiment by reading instructions stored in the memory 702, or the processor 701 may also implement the method in the above embodiment through internally stored instructions. In the case where the processor 701 implements the method in the above embodiment by reading instructions stored in the memory 702, the memory 702 stores instructions for implementing the method provided in the above embodiment of the present application.
[0266] After the processor 701 executes the instructions stored in the memory 702, the feature extraction device performs the following operations: obtain at least one application domain name from the traffic to be analyzed of the target application; generate at least one application domain name set based on the at least one application domain name; and extract application domain name features from each application domain name set in the at least one application domain name set as the first application domain name feature of the traffic to be analyzed.
[0267] The at least one processor 701 further executes the domain name feature extraction method described in the above method embodiment according to the instructions stored in the memory 702. For example, the processor 701 is used to execute the above Figure 2A In the embodiment shown, steps 201 to 203, Figure 3 In the embodiment shown, steps 3001 to 3002, Figure 4 In the embodiment shown, steps 4001 and 4002, Figure 5In the embodiment shown, steps 5001 to 5003 and Figure 6 In the illustrated embodiment, step 6001. For more details on how the processor 701 implements the above functions, please refer to the descriptions in the above method embodiments, which will not be repeated here.
[0268] Optionally, the feature extraction device further includes a bus 704. The processor 701 and the memory 702 are usually connected to each other via the bus 704, and may also be connected to each other in other ways.
[0269] Optionally, the feature extraction device further includes an input / output interface 705, which is connected to an output device and is used to output to a user through the output device the number of application domain names corresponding to the third application domain name feature included in at least one application domain name of the traffic to be analyzed, the number of quintuples of traffic corresponding to the third application domain name feature included in the traffic to be analyzed, and the number of bytes of the domain name corresponding to the third application domain name feature. The output device includes, but is not limited to, a display, a printer, and the like.
[0270] The input / output interface 705 is also used to connect to an input device. Optionally, the input / output interface 705 is used to receive the application name of the target application or the application category of the target application input by the user through the input device. The input device includes but is not limited to a keyboard, a touch screen, a microphone, a Bluetooth module, and the like.
[0271] Figure 8 Schematic diagram of the structure of the domain name feature extraction device of the embodiment of the present application. The extraction device 800 is coupled to the feature extraction device in each of the above method embodiments, for example, integrated in the feature extraction device, and is a software or hardware component in the feature extraction device. Figure 8 The extraction device 800 shown is applied to the method embodiment Figure 1A To Attachment Figure 1C In the scenario shown, the function of the feature extraction device is realized.
[0272] See also Figure 8 The extraction device 800 includes a processing module 801. Optionally, the extraction device 800 includes a sending module 802 and a receiving module 803. The processing module 801 is used to execute Figure 2A In the embodiment shown, steps 201 to 203, steps 201c to 201d, step 201f, step 203a, step 203b, Figure 3 In the embodiment shown, steps 3001 to 3002, Figure 4 In the embodiment shown, steps 4001 to 4002, Figure 5 In the embodiment shown, steps 5001 to 5003, Figure 6The sending module 802 is used to execute the above step 203c. The receiving module 803 is used to execute the above step 201a, the above step 201b and the above step 201e. For the specific execution process, please refer to the above Figure 2A , Figure 3 , Figure 4 , Figure 5 and Figure 6 The detailed description of the corresponding steps in the illustrated embodiment will not be repeated here.
[0273] Attached Figure 8 The device embodiments described are merely illustrative. For example, the division of the modules is merely a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. Figure 8 The above modules can be implemented in the form of hardware or software functional units. For example, when software is used, the processing module 801, the sending module 802 and the receiving module 803 can be implemented by the attached Figure 7 The processor 701 in the processor reads the program code stored in the memory and generates a software function module to implement it. Figure 8 The above modules can also be implemented by different hardware in the feature extraction device, for example, the sending module 802 and the receiving module 803 are implemented by the attached Figure 7 The network interface 703 in the embodiment is implemented, and the processing module 801 is implemented by the attached Figure 7 The processing module 801 may be implemented by using some processing resources in the processor 701 (e.g., other cores in a multi-core processor), or by using a field programmable gate array (FPGA), a coprocessor or other programmable device. Obviously, the above functional modules may also be implemented by combining software and hardware, for example, the sending module 802 and the receiving module 803 are implemented by the network interface 703, and the processing module 801 is a software functional module generated by the CPU after reading the instructions stored in the memory.
[0274] Attached Figure 8 For more details on the interaction process between the extraction device shown and other devices (for example, traffic devices), the technical effects that can be achieved, and how the processing module 801, the sending module 802 and the receiving module 803 implement the above functions, please refer to the description of the feature extraction device in the previous method embodiments, which will not be repeated here.
[0275] The embodiment of the present application also provides a domain name feature extraction system, which includes a feature extraction device. The feature extraction device is connected to a traffic device. For more details on the functions implemented by the feature extraction device in the extraction system and more details on the interaction process between them, please refer to the description of the feature extraction device in the previous method embodiments, which will not be repeated here.
[0276] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0277] Those skilled in the art will understand that when software is used to implement various aspects of the embodiments of the present application, or possible implementations of various aspects, the above-mentioned various aspects, or possible implementations of various aspects can be implemented in whole or in part in the form of a computer program product. A computer program product refers to computer-readable instructions stored in a computer-readable medium. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part.
[0278] The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium includes, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing. For example, the computer-readable storage medium is a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM) or a portable read only memory (CD-ROM).
[0279] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the scope of the present invention. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present invention, the present invention is also intended to include these modifications and variations.
Claims
1. A method for extracting domain name features, characterized in that: The method comprises: The feature extraction device obtains at least one application domain name from the traffic to be analyzed of the target application; The feature extraction device generates at least one application domain name set according to the at least one application domain name, at least two application domain names belonging to the same application domain name set have at least two identical characters or character strings separated by periods, a first common field and a second common field correspond to a first application domain name set in the at least one application domain name set, a ratio of the number of application domain names in the first application domain name set including the first common field to the total number of application domain names included in the first application domain name set is greater than a first preset threshold, a ratio of the number of application domain names in the first application domain name set including the second common field to the total number of application domain names included in the first application domain name set is greater than a second preset threshold, and the first common field includes at least one character separated by periods. character or string, the second common field includes at least one character or string separated by dots; the at least one application domain name set also includes a second application domain name set, the third common field and the fourth common field correspond to the second application domain name set, the ratio of the number of application domain names including the third common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a third preset threshold, the ratio of the number of application domain names including the fourth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a fourth preset threshold, and at least two common fields corresponding to the first application domain name set are partially or completely different from at least two common fields corresponding to the second application domain name set; The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as first application domain name features of the traffic to be analyzed.
2. The method according to claim 1, characterized in that The feature type of the first common field or the second common field includes any one of the following: a prefix of an application domain name in the first application domain name set; The suffix of the application domain name in the first application domain name set, the suffix including at least the secondary domain name of each application domain name; A substring of an application domain name in the first application domain name set; The target-level domain name field of the application domain name in the first application domain name set.
3. The method according to claim 1, characterized in that: The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed, including: Perform an operation on the first application domain name set: The feature extraction device determines at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm and a common substring algorithm, and determines that the first public domain name feature includes at least two common fields corresponding to the first application domain name set, and each of the at least two common fields includes at least one character or string separated by dots; The feature extraction device uses the first public domain name feature as the first application domain name feature of the traffic to be analyzed.
4. The method according to claim 3, characterized in that When the first public domain name feature is determined according to the common prefix algorithm, the first public domain name feature includes a first common prefix, and the first common prefix includes at least two common fields; When the first public domain name feature is determined according to the public suffix algorithm, the first public domain name feature includes a first public suffix, and the first public suffix includes at least two public fields; When the first public domain name feature is determined according to the common substring algorithm, the first public domain name feature includes a first common substring, and the first common substring includes at least two common fields; When the first public domain name feature is determined according to the common prefix algorithm and the common substring algorithm, the first public domain name feature comprises a second common prefix plus a second common substring, the second common prefix comprises at least one common field, and the second common substring comprises at least one common field; When the first public domain name feature is determined according to the public suffix algorithm and the public substring algorithm, the first public domain name feature comprises a third public substring plus a second public suffix, the third public substring comprises at least one public field, and the second public suffix comprises at least one public field; When the first public domain name feature is determined according to the public prefix algorithm and the public suffix algorithm, the first public domain name feature comprises a third public prefix plus a third public suffix, the third public prefix comprises at least one public field, and the third public suffix comprises at least one public field; When the first public domain name feature is determined based on the common prefix algorithm, the common suffix algorithm and the common substring algorithm, the first public domain name feature is in the form of a fourth common prefix plus a fourth common substring plus a fourth common suffix, the fourth common prefix includes at least one common field, the fourth common substring includes at least one common field, and the fourth public suffix includes at least one common field.
5. The method according to claim 1, characterized in that The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed, including: The feature extraction device determines a second public domain name feature, where the second public domain name feature satisfies the following conditions: the second public domain name feature is at least two common fields that are the same between the first application domain name set and the second application domain name set, and each of the at least two common fields includes at least one character or string separated by a period; The feature extraction device extracts the second public domain name feature as the first application domain name feature of the traffic to be analyzed.
6. The method according to claim 1, characterized in that The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed, including: The feature extraction device determines at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm, and a common substring algorithm, and uses the determined at least two common fields as first common domain name features, wherein each of the at least two common fields corresponding to the first application domain name set includes at least one character or string separated by a period; The feature extraction device determines at least two common fields corresponding to the second application domain name set according to any one or more of the common prefix algorithm, the common suffix algorithm and the common substring algorithm, and uses the determined at least two common fields as the third common domain name feature, wherein each of the at least two common fields corresponding to the second application domain name set includes at least one character or string separated by a period; The feature extraction device uses the first public domain name feature and the third public domain name feature as the first application domain name feature of the traffic to be analyzed.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The feature extraction device generates a keyword set for the target application according to the application name of the target application or the application category of the target application; The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed, including: The feature extraction device extracts application domain name features from each application domain name set in the at least one application domain name set according to the keyword set as the first application domain name features of the traffic to be analyzed.
8. A feature extraction device, characterized in that: comprising a network interface, a memory and a processor connected to the memory, The memory is used to store instructions; The processor is used to execute the instruction so that the feature extraction device performs the following operations: Obtain at least one application domain name from the traffic to be analyzed of the target application; At least one application domain name set is generated according to the at least one application domain name, at least two application domain names belonging to the same application domain name set have at least two identical characters or character strings separated by periods, a first common field and a second common field correspond to a first application domain name set in the at least one application domain name set, a ratio of the number of application domain names including the first common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a first preset threshold, a ratio of the number of application domain names including the second common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a second preset threshold, and the first common field includes at least one character or character string separated by periods. string, the second common field includes at least one character or string separated by dots; the at least one application domain name set also includes a second application domain name set, the third common field and the fourth common field correspond to the second application domain name set, the ratio of the number of application domain names including the third common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a third preset threshold, the ratio of the number of application domain names including the fourth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a fourth preset threshold, and at least two common fields corresponding to the first application domain name set are partially or completely different from at least two common fields corresponding to the second application domain name set; An application domain name feature is extracted from each application domain name set in the at least one application domain name set as a first application domain name feature of the traffic to be analyzed.
9. The feature extraction device according to claim 8, characterized in that: The feature type of the first common field or the second common field includes any one of the following: a prefix of an application domain name in the first application domain name set; The suffix of the application domain name in the first application domain name set, the suffix including at least the secondary domain name of each application domain name; A substring of an application domain name in the first application domain name set; The target-level domain name field of the application domain name in the first application domain name set.
10. The feature extraction device according to claim 8, characterized in that: The processor is specifically used for: Perform an operation on the first application domain name set: Determine at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm, and a common substring algorithm, determine that the first public domain name feature includes at least two common fields corresponding to the first application domain name set, and each of the at least two common fields includes at least one character or string separated by dots; The first public domain name feature is used as the first application domain name feature of the traffic to be analyzed.
11. The feature extraction device according to claim 10, characterized in that: When the first public domain name feature is determined according to the common prefix algorithm, the first public domain name feature includes a first common prefix, and the first common prefix includes at least two common fields; When the first public domain name feature is determined according to the public suffix algorithm, the first public domain name feature includes a first public suffix, and the first public suffix includes at least two public fields; When the first public domain name feature is determined according to the common substring algorithm, the first public domain name feature includes a first common substring, and the first common substring includes at least two common fields; When the first public domain name feature is determined according to the common prefix algorithm and the common substring algorithm, the first public domain name feature comprises a second common prefix plus a second common substring, the second common prefix comprises at least one common field, and the second common substring comprises at least one common field; When the first public domain name feature is determined according to the public suffix algorithm and the public substring algorithm, the first public domain name feature comprises a third public substring plus a second public suffix, the third public substring comprises at least one public field, and the second public suffix comprises at least one public field; When the first public domain name feature is determined according to the public prefix algorithm and the public suffix algorithm, the first public domain name feature comprises a third public prefix plus a third public suffix, the third public prefix comprises at least one public field, and the third public suffix comprises at least one public field; When the first public domain name feature is determined based on the common prefix algorithm, the common suffix algorithm and the common substring algorithm, the first public domain name feature is in the form of a fourth common prefix plus a fourth common substring plus a fourth common suffix, the fourth common prefix includes at least one common field, the fourth common substring includes at least one common field, and the fourth public suffix includes at least one common field.
12. The feature extraction device according to claim 8, characterized in that: The processor is specifically used for: Determine a second public domain name feature, where the second public domain name feature satisfies the following condition: the second public domain name feature is at least two common fields that are the same between the first application domain name set and the second application domain name set, and each of the at least two common fields includes at least one character or string separated by a period; The second public domain name feature is extracted as the first application domain name feature of the traffic to be analyzed.
13. The feature extraction device according to claim 8, characterized in that: The processor is specifically used for: Determine at least two common fields corresponding to the first application domain name set according to any one or more of a common prefix algorithm, a common suffix algorithm, and a common substring algorithm, and use the determined at least two common fields as first common domain name features, wherein each of the at least two common fields corresponding to the first application domain name set includes at least one character or string separated by a period; Determine at least two common fields corresponding to the second application domain name set according to any one or more of the common prefix algorithm, the common suffix algorithm and the common substring algorithm, and use the determined at least two common fields as the third common domain name feature, wherein each of the at least two common fields corresponding to the second application domain name set includes at least one character or string separated by a period; The first public domain name feature and the third public domain name feature are used as first application domain name features of the traffic to be analyzed.
14. The feature extraction device according to any one of claims 8 to 13, characterized in that: The processor is further configured to: generating a keyword set for the target application according to an application name of the target application or an application category of the target application; The processor is specifically used for: According to the keyword set, application domain name features are extracted from each application domain name set in the at least one application domain name set as first application domain name features of the traffic to be analyzed.
15. A device for extracting domain name features, characterized in that: The extraction device comprises: A processing module, configured to obtain at least one application domain name from the traffic to be analyzed of the target application; generate at least one application domain name set according to the at least one application domain name, at least two application domain names belonging to the same application domain name set have at least two identical characters or character strings separated by periods, a first common field and a second common field correspond to a first application domain name set in the at least one application domain name set, a ratio of the number of application domain names including the first common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a first preset threshold, a ratio of the number of application domain names including the second common field in the first application domain name set to the total number of application domain names included in the first application domain name set is greater than a second preset threshold, the first common field includes at least one character or character string separated by periods, and the second common field to at least one of the characters or strings separated by periods; the at least one application domain name set also includes a second application domain name set, the third common field and the fourth common field correspond to the second application domain name set, the ratio of the number of application domain names including the third common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a third preset threshold, the ratio of the number of application domain names including the fourth common field in the second application domain name set to the total number of application domain names included in the second application domain name set is greater than a fourth preset threshold, and at least two common fields corresponding to the first application domain name set are partially or completely different from at least two common fields corresponding to the second application domain name set; and application domain name features are extracted from each application domain name set in the at least one application domain name set as the first application domain name features of the traffic to be analyzed.
Citation Information
Patent Citations
Method and device for detecting domain name
CN105610830A
Method and device for noise removing through application of identification data packet to be analyzed
CN106385407A
Algorithm generation domain name detection method based on quasi natural language features
CN107046586A
Illegal domain name mining method based on domain name construction similarity
CN108712403A
Domain detection method and device
CN109495475A
