Method, product and equipment for classifying and identifying bad applications based on traffic time sequence characteristics

Through the method based on the traffic timing characteristics, poor applications are identified, and the problem of inefficient identification of "skin replacement" applications in the prior art is solved, efficient and accurate application classification is achieved, and the waste of computing resources is reduced.

CN119025972AActive Publication Date: 2024-11-26BEIJING FULE TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411158955.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-26
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

The prior art is inefficient in identifying frequently updated "skin replacement" applications. The rule matching method cannot cope with the increased difficulty in identification caused by appearance changes. The rule base needs to be updated continuously, which is inefficient.

Method used

The classification and identification method of bad application based on traffic timing characteristics is adopted. By obtaining the traffic timing data of the applications to be identified and seed applications, the similarity is calculated and the target category is determined using category tags to be determined, and the identification efficiency and accuracy are improved.

Benefits of technology

Through the analysis of traffic timing data, the similarity between applications is quantified, the efficiency and accuracy of identifying bad applications is improved, the waste of computing resources is reduced, and the traceability and accuracy of classification results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025972A_ABST
    Figure CN119025972A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of application identification, in particular to a bad application classification identification method based on traffic time sequence characteristics, a product and equipment. The method comprises the following steps: acquiring a to-be-identified application and a seed application set containing category labels; obtaining traffic time sequence data of the to-be-identified application and each application in the seed application set, and determining the similarity between the to-be-identified application and each application in the seed application set according to the traffic time sequence data; determining a target category corresponding to the to-be-identified application from category labels according to the similarity between the to-be-identified application and each application in the seed application set and the category label of each application in the seed application set; and judging whether the to-be-identified application belongs to the target category, and obtaining a classification identification result of the to-be-identified application. According to the invention, the efficiency and accuracy of identifying bad applications can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application identification technology, and in particular to a method, product and device for classifying and identifying bad applications based on traffic timing characteristics. Background Art

[0002] In the context of the rapid development of information and communication technology, telecommunications network fraud has become one of the most influential forms of crime in the whole society. In order to evade the review mechanism, criminals design different applications for different groups of people, and even use one application for each person, that is, release a separate application file for each fraud target, which increases the difficulty of investigation. Criminals disguise a new application by changing the application name and appearance, and its core functions and logic remain unchanged. This is commonly known as a "skin-changing" application. This method is extremely low-cost, but it will greatly increase the difficulty of identification and the workload of review.

[0003] Related technologies identify bad applications, mainly using rule matching algorithms. Collect application files or collect seed sets through manual labeling, extract rules from applications in the set, and determine the category of the application to be identified through rule matching. Rule matching methods include but are not limited to: (1) File name and package name matching: Check whether the name and package name of the application file match the name and package name in the seed set.

[0004] (2) File structure and resource file comparison: Analyze whether the file structure and resource files (such as layout files, icons, images, etc.) within the application match the applications in the seed set.

[0005] (3) Signature and certificate comparison: Check whether the application's signature and certificate information match the applications in the seed set.

[0006] (4) Permission and function comparison: Analyze whether the application’s permission declaration and function list match those of the applications in the seed set.

[0007] (5) Resource file hash value comparison: Calculate the hash value of the resource file (such as pictures, layout files, etc.) to see if it matches the application in the seed set.

[0008] (6) Metadata analysis: Check whether the metadata of the application file (such as version number, author information, description, etc.) matches the application in the seed set.

[0009] However, the rule matching method cannot cope with frequently updated "skinned" applications. The UI design, color scheme, icon and other appearance elements of "skinned" applications can be changed at will, and the file name, package name, signature, certificate, metadata, etc. can also be updated. If the rule matching method is adopted, it is necessary to constantly analyze new applications and extract rules to add to the rule base, which is very inefficient. When the rules are extracted and added to the rule base, new "skinned" applications may be born, and the old rules have become invalid. Summary of the invention

[0010] In order to solve the problem of low efficiency in identifying bad applications in the prior art, the present application provides a method, product and device for classifying and identifying bad applications based on traffic timing characteristics.

[0011] In the first aspect, the present application provides a method for classifying and identifying bad applications based on traffic time series characteristics, which adopts the following technical solutions: A method for classifying and identifying bad applications based on traffic time series characteristics, comprising: Obtain the application to be identified and the seed application set containing the category label; Acquire traffic time series data of the application to be identified and each application in the seed application set, and determine the similarity between the application to be identified and each application in the seed application set according to the traffic time series data; According to the similarity between the application to be identified and each application in the seed application set, and the category label of each application in the seed application set, determining the target category corresponding to the application to be identified from the category labels; It is determined whether the application to be identified belongs to the target category, and a classification identification result of the application to be identified is obtained.

[0012] By adopting the above technical solution, the application to be identified and the seed application set containing category labels are obtained. The category labels in the seed application set provide standards for classification and identification, so that the classification process has a basis to rely on, ensuring the traceability and accuracy of the classification results. The traffic time series data contains the dynamic characteristics of application behavior. These characteristics are the key to distinguishing different application types (especially bad applications), and can capture the time series changes of application behavior. At the same time, the data of the application to be identified and the seed application set are obtained, which ensures the comprehensiveness and consistency of the analysis and helps to reduce classification errors caused by data differences. By comparing the traffic time series data, the similarity between the application to be identified and the seed application can be quantified, which helps to convert complex network behaviors into comparable numerical values. Using similarity and category labels for classification decisions can improve classification efficiency and reduce waste of computing resources while ensuring accuracy. This application improves the efficiency and accuracy of identifying bad applications.

[0013] In a preferred example, the present application may be further configured as follows: determining the similarity between the application to be identified and each application in the seed application set according to the traffic time series data, respectively, includes: Using a sliding window to smooth the traffic time series data of a first target application to obtain target time series data, wherein the first target application is any application in the to-be-identified application and the seed application set; Generate a flow time series curve according to the target time series data; The minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application is calculated, and the minimum distance is used as the similarity between the application to be identified and the second target application, where the second target application is any application in the seed application set.

[0014] By adopting the above technical solution, the traffic time series data is smoothed using a sliding window, which can smooth the data and remove random noise. The smoothed time series data is converted into a traffic time series curve, which helps to more intuitively observe the changing trends and patterns of the data. By calculating the minimum distance between two traffic time series curves, the similarity between the application to be identified and the seed application can be quantified, making the classification decision more objective and accurate.

[0015] In a preferred example, the present application may be further configured as follows: calculating the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application includes: Constructing a distance matrix of the traffic timing curve of the to-be-identified application and the traffic timing curve of the second target application, wherein an element in the distance matrix represents a distance between two points; A cumulative distance matrix is ​​constructed based on the distance matrix using a dynamic time warping algorithm, wherein any element in the cumulative distance matrix represents the minimum cumulative distance from a matrix starting point to a point corresponding to the element; The element value corresponding to the matrix end point is read from the cumulative distance matrix to obtain the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application.

[0016] By adopting the above technical solution, the dynamic time warping algorithm allows time expansion and offset between data points, and can better handle time series data that are not aligned on the time axis or have inconsistent speeds, thereby improving the matching accuracy. The construction of the cumulative distance matrix takes into account the cumulative distances of all possible paths from the starting point to the current point, and selects the smallest one as the cumulative distance of the current point, which helps to avoid local optimal solutions. The element value corresponding to the end point of the cumulative distance matrix is ​​the minimum distance between the two traffic timing curves, which helps to quantify the similarity between the application to be identified and the seed application.

[0017] In a preferred example, the present application may be further configured as follows: determining the target category corresponding to the application to be identified from the category label according to the similarity between the application to be identified and each application in the seed application set, and the category label of each application in the seed application set, includes: Dividing the seed application set into multiple groups according to category labels, wherein the category labels of the applications in each group are the same; Calculate the average value of the similarity between the application to be identified and each application in each group according to the similarity between the application to be identified and each application in the seed application set; A target group with the smallest average value is determined from multiple groups, and the category label of the target group is used as the target category.

[0018] By adopting the above technical solution, the seed application set is grouped according to the category label, and the average similarity between the application to be identified and each application in each group is calculated. This can smooth the noise or outlier effects that may be brought by individual applications in the group, making the similarity evaluation more robust and reducing the misjudgment caused by differences in individual applications. The target group with the smallest average value is selected as the category of the application to be identified. This method is based on the idea of ​​global optimization and takes into account the relationship between the application to be identified and the entire seed application set, so that its category can be determined more accurately.

[0019] In a preferred example, the present application may be further configured as follows: the determining whether the application to be identified belongs to the target category and obtaining the classification identification result of the application to be identified includes: Comparing the average value corresponding to the target category with a preset threshold; If the average value corresponding to the target category is not less than the preset threshold, the classification recognition result is that the application to be recognized does not belong to the target category, and the application to be recognized is a normal application; If the average value corresponding to the target category is less than the preset threshold, the classification recognition result is that the application to be recognized is a bad application and belongs to the target category.

[0020] By adopting the above technical solution and citing the preset threshold, clear boundary conditions for the classification and recognition results are given, which helps to obtain more accurate classification and recognition results.

[0021] In a preferred example, the present application may be further configured as follows: the acquiring of the traffic time series data of each application in the to-be-identified application and the seed application set includes: Acquire the running data of each application in the to-be-identified application and the seed application set when the application is running; Preprocessing the operation data of the first target application to obtain target operation data, wherein the first target application is any one of the application to be identified and the seed application set; Determine the data packet size at each timing point from the target operation data, arrange the data packet sizes in the order of the corresponding timing points, and obtain the traffic timing data in the form of an array, wherein an element in the array represents the data packet size at a timing point.

[0022] By adopting the above technical solution, preprocessing the operation data can ensure data quality, determine the data packet size at each time point from the target operation data, and arrange the traffic time series data in array form in time sequence, so that the data has continuity and comparability in the time dimension, which helps to more accurately capture the network behavior characteristics of the application.

[0023] In a preferred example, the present application may be further configured as follows: the preprocessing of the operation data of the first target application to obtain the target operation data includes: Removing irrelevant protocol packets from the running data of the first target application to obtain original traffic data, wherein the irrelevant protocol packets are protocol data packets other than the TCP protocol; Useless data packets are removed from the original traffic data to obtain target operation data, wherein the useless data packets include: damaged packets, timeout packets, reset packets, handshake packets and waving packets.

[0024] By adopting the above technical solution, irrelevant protocol packets and useless data packets are removed, which significantly reduces the amount of data that needs to be processed, which not only reduces the computing cost and storage requirements of data processing, but also improves the efficiency and performance of data analysis.

[0025] In a second aspect, the present application provides a computer program product, which adopts the following technical solution: A computer program product includes a computer program. When the computer program is executed by a processor, the method for classifying and identifying bad applications based on traffic timing characteristics as described in any one of the first aspects is implemented.

[0026] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: one or more processors; Memory; At least one application, wherein at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the method for classifying and identifying bad applications based on traffic timing characteristics as described in any one of the first aspects.

[0027] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores a computer program thereon. When the computer program is executed in a computer, the computer is caused to execute the method for classifying and identifying bad applications based on traffic timing characteristics as described in any one of the first aspects.

[0028] In summary, this application includes the following beneficial technical effects: The present application obtains the application to be identified and the seed application set containing category labels. The category labels in the seed application set provide standards for classification and identification, so that the classification process has a basis to rely on, ensuring the traceability and accuracy of the classification results. The traffic time series data contains the dynamic characteristics of application behavior. These characteristics are the key to distinguishing different application types (especially bad applications) and can capture the time series changes of application behavior. At the same time, the data of the application to be identified and the seed application set are obtained to ensure the comprehensiveness and consistency of the analysis, which helps to reduce classification errors caused by data differences. By comparing the traffic time series data, the similarity between the application to be identified and the seed application can be quantified, which helps to convert complex network behaviors into comparable numerical values. Using similarity and category labels for classification decisions can improve classification efficiency while ensuring accuracy, reduce waste of computing resources, and improve the efficiency and accuracy of identifying bad applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flowchart of a method for classifying and identifying bad applications based on traffic timing characteristics provided by an embodiment of the present application; Figure 2 This is a schematic diagram of a registration interface of an application provided in an embodiment of the present application; Figure 3 It is a schematic diagram of traffic packet information of a Pcap file provided in an embodiment of the present application; Figure 4 It is a schematic diagram of a flow timing curve provided in an embodiment of the present application; Figure 5 It is a comparative schematic diagram of flow timing curves of two applications of the same series provided in an embodiment of the present application; Figure 6 It is a comparative schematic diagram of flow timing curves of two applications of different series provided in an embodiment of the present application; Figure 7 Schematic diagram of the principle of the DTW algorithm provided in the embodiment of the present application; Figure 8 is a schematic diagram of path selection provided in an embodiment of the present application; Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following is combined with Figure 1 -Attached Fig. 9 This application is described in further detail.

[0031] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make modifications to the present embodiment without any creative contribution as needed, but such modifications are protected by the patent law as long as they are within the scope of the claims of the present application.

[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0034] It should be noted that in the optional embodiments of the present application, the object information and other related data involved, when the embodiments in the present application are applied to specific products or technologies, need to obtain the permission or consent of the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information needs to obtain the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.

[0035] In order to improve the recognition efficiency and accuracy of "skin-changing" applications, we can find a feature that is not easy to change for "skin-changing" applications, or a feature that is extremely costly to change. For the same series of "skin-changing" applications, even if the UI design, color scheme, icons and other appearance elements can be changed, the same set of background interfaces are usually used. Because if the background interface needs to be changed, it is equivalent to completely designing and developing a new application system, which is very costly. At this time, it is equivalent to developing a new application, which is no longer a "skin-changing" application. The interface format, call parameters, and call sequence of the application have been designed in the development stage. The interfaces called by applications in the same series are the same, and the only difference is the data contained in the interface. Therefore, the amount of data transmitted by each interface will not change much. The characteristics of the interface call data volume and call sequence will be reflected in the time sequence transformation of traffic transmission. Therefore, if the traffic time sequence characteristics of the application can be extracted as the characteristics of classification and recognition, then for the same series of "skin-changing" applications, it is only necessary to analyze and extract the traffic time sequence characteristics once, and it can be applied to all applications in the series, without the need to frequently update the rule base. The efficiency and accuracy of classification and recognition of "skin-changing" applications are also improved.

[0036] The present application embodiment provides a method for classifying and identifying bad applications based on traffic time series characteristics, such as Figure 1 As shown, the method provided in the embodiment of the present application is executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes steps S101 to S104, wherein: S101: Obtain an application to be identified and a seed application set containing category labels.

[0037] Specifically, a sample set of bad applications can be obtained, and each application in the sample set is pre-set with a category label by manual labeling. The sample set is divided into a set of applications to be identified and a seed application set Q in a ratio of 3:1. For each application in the set of applications to be identified, the bad application classification and identification method based on traffic timing characteristics provided by this application is used, and based on the seed application set Q, it is identified whether the application is a bad application and which category the application belongs to when it is a bad application. Then, the identification result of the set of applications to be identified is compared with the pre-set category label to complete the verification.

[0038] The application to be identified is any application in the set of applications to be identified. Each application in the set of applications to be identified is classified and identified to obtain the classification and identification results of each application. The size of the seed application set is |Q|=q, which represents the number of applications in the seed application set. A bad application is a "skinned" application that disguises itself as a new application by changing the application name and appearance.

[0039] S102: Obtain traffic time series data of the application to be identified and each application in the seed application set, and determine the similarity between the application to be identified and each application in the seed application set according to the traffic time series data.

[0040] For any application, the operation steps are specific, and each step corresponds to a certain interface of the remote service. Replacing the appearance interface of a bad application to disguise a new application is a common means of evading review, but criminals will not modify the background program of the application. On the one hand, it is because users and reviewers cannot perceive the changes in the background program, which does not add value to the purpose of disguising a new application; on the other hand, it is due to cost considerations. Modifying the appearance interface only requires modifying the text and resource files, which is extremely low cost, while modifying the background program requires modifying the logic and database, which is equivalent to developing a new system program, which is difficult and costly.

[0041] For the same series of applications, the interface format has been established during the application development phase. The interfaces of the same series of applications are the same, and the difference is the data contained in the interface. Even after the appearance interface is changed, when using the same set of background interfaces, the order of interface calls will not change, and the overall amount of data transmitted by the interface will not change much.

[0042] Specifically, for any application in the to-be-identified application and the seed application set, the application is set to run in a sandbox environment, and the Pcap file generated when the application is running can be obtained. The traffic timing data of the application is extracted from the Pcap file. The traffic timing data includes the data packet size of each timing point. The data packet size is arranged in order from first to last according to the corresponding timing point to obtain the timing traffic data in the form of an array, and an element in the array represents the data packet size of a timing point. By running each application, the electronic device can obtain the traffic timing data of each application in the to-be-identified application and the seed application set.

[0043] The running time of each application can be manually set according to actual experience, and the running time is optionally 30 minutes.

[0044] Figure 2A schematic diagram of the registration interface of the application provided in an embodiment of the present application, which includes four operation steps, namely: enter a mobile phone number, click to obtain a verification code, enter a password, and set a password. These four operation steps correspond to four interfaces of the remote service. The sizes of data packets generated by the four interfaces are arranged in time as 526, 385, 284, 385, 369, 385, 1411, and 385.

[0045] See also Figure 3 , which shows a schematic diagram of the flow packet information of the Pcap file provided in the embodiment of the present application. It can be seen that the flow packet information in the Pcap file is sorted by time, and the flow packet information includes: time, source, communication protocol type, data packet size, etc.

[0046] Furthermore, for any application in the to-be-identified application and the seed application set, a traffic timing curve is generated according to the traffic timing data of the application, thereby obtaining a traffic timing curve of each application in the to-be-identified application and the seed application set. Figure 4 A schematic diagram of a flow timing curve provided in an embodiment of the present application is shown.

[0047] See also Figure 5 , which shows a comparison diagram of the flow timing curves of two applications in the same series. It can be seen that the flow timing curves of the same series of applications are similar. Figure 6 , which shows a schematic diagram of the comparison of the flow timing curves of two applications from different series. It can be seen that the flow timing curves of the two applications from different series are quite different and have low similarity.

[0048] Furthermore, the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of each application in the seed application set is calculated as the similarity between the two applications, thereby obtaining the similarity between the application to be identified and each application in the seed application set.

[0049] S103 , determining a target category corresponding to the application to be identified from the category labels according to the similarity between the application to be identified and each application in the seed application set, and the category label of each application in the seed application set.

[0050] Specifically, the seed application set is divided into multiple groups according to the category label, and the category label of the applications in each group is the same. According to the similarity between the application to be identified and each application in the seed application set, the average similarity between the application to be identified and each application in each group is calculated. The group with the smallest average value is determined from the multiple groups as the target group, and the category label of the target group is used as the target category.

[0051] S104: Determine whether the application to be identified belongs to the target category, and obtain a classification identification result of the application to be identified.

[0052] Specifically, the average value corresponding to the target category is compared with the preset threshold. If the average value corresponding to the target category is not less than the preset threshold, the classification and recognition result is that the application to be identified does not belong to the target category. If the average value corresponding to the target category is less than the preset threshold, the classification and recognition result is that the application to be identified is a bad application and belongs to the target category.

[0053] The embodiment of the present application obtains the application to be identified and the seed application set containing the category label. The category label in the seed application set provides a standard for classification and identification, so that the classification process has a basis to rely on, and the traceability and accuracy of the classification results are ensured. The traffic time series data contains the dynamic characteristics of the application behavior. These characteristics are the key to distinguishing different application types (especially bad applications), and the time series changes of the application behavior can be captured. At the same time, the data of the application to be identified and the seed application set are obtained, which ensures the comprehensiveness and consistency of the analysis, and helps to reduce the classification error caused by data differences. By comparing the traffic time series data, the similarity between the application to be identified and the seed application can be quantified, which helps to convert complex network behaviors into comparable values. Using similarity and category labels for classification decisions can improve classification efficiency while ensuring accuracy and reduce the waste of computing resources. The present application improves the efficiency and accuracy of identifying bad applications.

[0054] A possible implementation of the embodiment of the present application is to obtain traffic time series data of each application in the application to be identified and the seed application set, including: Obtaining running data of each application in the to-be-identified application and the seed application set when the application is running; Preprocessing the operation data of the first target application to obtain target operation data, wherein the first target application is any application in the to-be-identified application and the seed application set; Determine the data packet size at each timing point from the target operation data, arrange the data packet sizes in the order of the corresponding timing points, and obtain the traffic timing data in the form of an array, wherein an element in the array represents the data packet size at a timing point.

[0055] For the first target application, its running data during runtime is the generated Pcap file data. Preprocessing the running data of the first target application includes sequentially executing the steps of removing irrelevant protocol packets and removing useless data packets. The preprocessing can be implemented through network analysis tools such as Wireshark or Tshark.

[0056] Furthermore, the traffic timing data of the first target application can be represented by an array, the length of the array is the number of data packets in the traffic timing data, and each element in the array represents the size of the data packet, thereby obtaining the traffic timing data of each application in the application to be identified and the seed application set.

[0057] The embodiment of the present application performs preprocessing on the operation data to ensure data quality, determines the data packet size at each time point from the target operation data, and arranges the traffic timing data in array form in time sequence, so that the data has continuity and comparability in the time dimension, which helps to more accurately capture the network behavior characteristics of the application.

[0058] A possible implementation of the embodiment of the present application is to preprocess the operation data of the first target application to obtain target operation data, including: Removing irrelevant protocol packets from the running data of the first target application to obtain original traffic data, wherein the irrelevant protocol packets are protocol data packets other than the TCP protocol; Remove useless data packets from the original traffic data to obtain the target operation data. The useless data packets include: damaged packets, timeout packets, reset packets, handshake packets and waving packets.

[0059] During the operation of an application, different transmission protocols will be used according to different usage scenarios. For example, during voice and video calls, the UDP protocol will be used. However, among the data generated by the application, protocols other than the TCP protocol are of little value to the subsequent algorithms. Therefore, protocol data packets other than the TCP protocol can be regarded as irrelevant protocol packets and removed through network analysis tools. For the operation data of the first target application, the data after removing irrelevant protocol packets is used as the original traffic data.

[0060] During network transmission, due to problems such as poor communication line quality, poor client network quality, and weak network signals, there will be packet damage, connection timeouts, and connection resets. Such packets will interfere with subsequent algorithms and need to be removed. In the TCP protocol, there is a three-way handshake mechanism when the two parties establish a connection, and a four-way handshake mechanism when the connection ends. The size of the packet transmitted during this process is fixed, which is of little value to the subsequent algorithms and also needs to be removed from the TCP stream data. For the operation data of the first target application, use network analysis tools to remove useless packets from the original traffic data to obtain the target operation data, which contains a series of packet sizes.

[0061] The embodiments of the present application significantly reduce the amount of data that needs to be processed by removing irrelevant protocol packets and useless data packets, which not only reduces the computing cost and storage requirements of data processing, but also improves the efficiency and performance of data analysis.

[0062] A possible implementation of the embodiment of the present application is to determine the similarity between the application to be identified and each application in the seed application set according to the traffic time series data, including: The traffic time series data of the first target application is smoothed by using a sliding window to obtain target time series data, where the first target application is any application in the to-be-identified application and the seed application set; Generate a traffic time series curve based on target time series data; The minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application is calculated, and the minimum distance is used as the similarity between the application to be identified and the second target application. The second target application is any application in the seed application set.

[0063] In this embodiment, a sliding window aggregation algorithm is performed on the traffic time series data of each application in the to-be-identified application to obtain a traffic time series curve of each application.

[0064] Taking the first target application as an example, the traffic time series data of the first target application is recorded as an array sequence, and a sliding window aggregation algorithm is performed on the sequence, including the following steps: (1) Sliding window initialization.

[0065] Define the sliding window size, and denote the number of time points contained in the sliding window as w. Define the step size, that is, the number of time points that the sliding window slides each time, and denote it as s.

[0066] (2) Data segmentation.

[0067] The array sequence is segmented according to the sliding window size w and step size s. The initial window position starts from the first element of the traffic time series data, including the first w elements, and then starts to move the window to the right. Each time the window slides to the right by s positions until the entire traffic time series data is covered.

[0068] (3) Sum within the sliding window.

[0069] The time point data in each sliding window is summed to calculate the sum of all elements in the sliding window. Let the starting position of the i-th sliding window be is, then the summation calculation formula of the i-th sliding window is: Repeat the above summation process until all windows are calculated.

[0070] (4) Result generation.

[0071] The summation results of each window are stored in order to generate new time series data. The new time series data reflects the local sum of the original data and provides a smoother aggregation result. The length of the new time series is represented by |S|: (5) Computational optimization.

[0072] In the sliding window process, the summation result of the previous window is used to add the elements newly entering the window and subtract the elements leaving the window to achieve incremental calculation and reduce the amount of repeated calculation.

[0073] The target time series data obtained by smoothing the traffic time series data of the first target application using a sliding window can be represented by an array, and then a traffic time series curve is generated based on the target time series data. The traffic time series curve contains a series of points, and each point represents an element in the target time series data.

[0074] The role of sliding window aggregation algorithm in traffic time series data processing and analysis includes: (1) Smoothing data fluctuations: Sliding window aggregation can smooth fluctuations and noise in the original data by summing or averaging adjacent data points, providing clearer trends and patterns. This is especially important when analyzing time series data with high volatility.

[0075] (2) Real-time calculation: Sliding window aggregation can be calculated in real time, which is particularly suitable for stream data processing. When a new data point arrives, only the value in the window needs to be updated without recalculating the entire sequence. This incremental calculation method is suitable for high-frequency, continuous data stream processing.

[0076] (3) Reduce computational complexity: By setting the window size and step size, the amount of data to be processed can be effectively reduced, reducing computational complexity. In particular, for large-scale traffic time series data, sliding window aggregation can significantly improve computational efficiency and meet the needs of limited computing resources.

[0077] (4) Flexibility: Sliding window aggregation can adjust the window size and step size according to specific needs to balance computational accuracy and efficiency. Different window size and step size settings can capture trends and changes at different granularities, making the aggregation method more flexible and adaptable.

[0078] (5) Providing local features: Sliding window aggregation can extract local features of time series data, which helps to identify short-term trends, periodic patterns, and outliers. This is of great significance for time series analysis and the construction of prediction models, and can provide valuable features for subsequent in-depth analysis.

[0079] (6) Data compression: Sliding window aggregation achieves data dimensionality reduction and compression by aggregating multiple data points into one data point, which helps to reduce data storage space.

[0080] (7) Improve data robustness: Sliding window aggregation can enhance data robustness and counteract the impact of individual outliers or erroneous data points. Through the aggregation operation, the impact of individual outliers is averaged or weakened, thereby improving the overall data quality.

[0081] The embodiment of the present application utilizes a sliding window to smooth the traffic time series data, which can smooth the data and remove random noise, and convert the smoothed time series data into a traffic time series curve, which helps to more intuitively observe the changing trends and patterns of the data, calculate the minimum distance between two traffic time series curves, and quantify the similarity between the application to be identified and the seed application, making the classification decision more objective and accurate.

[0082] A possible implementation of the embodiment of the present application is to calculate the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application, including: Construct a distance matrix between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application, where an element in the distance matrix represents the distance between two points; The Dynamic Time Warping (DTW) algorithm is used to construct a cumulative distance matrix based on the distance matrix. Any element in the cumulative distance matrix represents the minimum cumulative distance from the starting point of the matrix to the corresponding point of the element. The element value corresponding to the matrix end point is read from the cumulative distance matrix to obtain the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application.

[0083] Specifically, the traffic timing curve of the application to be identified is represented as Sp, the traffic timing curve of the second target application is represented as Sq, Sp and Sq are aligned, and a distance matrix X is constructed. The size of the distance matrix X is n×m, where n is the number of elements in Sp, m is the number of elements in Sq, and the matrix element x(i, j) represents the distance between the i-th point in Sp and the j-th point in Sq, and the element value corresponding to the i-th point in Sp is Sp i , the element value corresponding to the jth point in Sq is Sq j , the distance between two points is d(Sp i ,Sq j ), generally using Euclidean distance, that is

[0084] like Figure 7 As shown, it shows a schematic diagram of the principle of the DTW algorithm provided by the embodiment of the present application. When finding the distance between two traffic time series curves, it can be summarized as finding a path passing through several grid points in this grid, so that the sum of the distances of the points passed on the path is minimized. The grid points passed by the path are the aligned points for calculation of the two sequences. This path is represented by W, and the kth element of W is defined as w k =(i,j) k , the mapping of sequences Sp and Sq is defined, and the following equation is obtained: W=w1,w2,...,w k,...w K max(m,n)≤K≤m+n-1 This path is not chosen randomly, but needs to meet the following constraints: (1) Boundary conditions: w1 = (1,1) and w K =(m,n). The speed of any two traffic time series curves may change, but the order in which the behaviors occur will not change, so the selected path must start from the lower left corner and end at the upper right corner.

[0085] (2) Continuity. If w k-1 =(a ′ ,b ′ ), then for the next point w on the path k =(a,b) needs to satisfy (aa ′ )≤1 and (bb ′ )≤1. That is, it is impossible to cross a point to match, and it can only align with its adjacent points. This ensures that every coordinate in Sp and Sq appears in W.

[0086] (3) Monotonicity. If w k-1 =(a ′ ,b ′ ), then for the next point w on the path k =(a,b) needs to satisfy (aa ′ )≥0 and (bb ′ ) ≥ 0. This restricts the points on W to be monotonically distributed over time.

[0087] See also Figure 8 , which shows a schematic diagram of path selection provided by an embodiment of the present application. Combined with the continuity and monotonicity constraints, each grid path has only three directions. For example, if the path has passed through the grid point (i, j), then the next grid point passed can only be one of the following three situations: (i+1, j), (i, j+1) or (i+1, j+1).

[0088] There are many paths that satisfy the above constraints. The shortest path is the path that minimizes the following regularization cost: This shortest path is equivalent to extending and shortening the two traffic timing curves to obtain the shortest distance between the two traffic timing sequences, that is, the most similar mapping relationship. This shortest distance is also the final distance measurement of the two traffic timing curves.

[0089] Define a cumulative distance, start matching the two curve sequences Sp and Sq from point (0,0), and when you reach a point, the distances calculated from all previous points will be accumulated. After reaching the end point (m,n), this cumulative distance is the final total distance, and the cumulative distance d = d(i,j) = d(Sp i ,Sq j )+min{d(i-1,j-1),d(i-1,j),d(i,j-1)}, which is the minimum distance (similarity) between the traffic timing curves Sp and Sq.

[0090] The dynamic time warping algorithm in the embodiment of the present application allows time expansion and offset between data points, and can better handle time series data that are not aligned on the time axis or have inconsistent speeds, thereby improving the matching accuracy. The construction of the cumulative distance matrix takes into account the cumulative distances of all possible paths from the starting point to the current point, and selects the smallest one as the cumulative distance of the current point, which helps to avoid local optimal solutions. The element value corresponding to the end point of the cumulative distance matrix is ​​the minimum distance between the two traffic timing curves, which helps to quantify the similarity between the application to be identified and the seed application.

[0091] A possible implementation of the embodiment of the present application is to determine the target category corresponding to the application to be identified from the category label according to the similarity between the application to be identified and each application in the seed application set, and the category label of each application in the seed application set, including: The seed application set is divided into multiple groups according to the category labels, and the category labels of the applications in each group are the same; According to the similarity between the application to be identified and each application in the seed application set, the average value of the similarity between the application to be identified and each application in each group is calculated; A target group with the smallest mean value is determined from multiple groups, and the category label of the target group is used as the target category.

[0092] In this embodiment, the size of the seed application set is |Q|=q, which represents the number of applications in the seed application set. After obtaining the similarity between the application to be identified and each application in the seed application set, the obtained similarities are represented as an array d=[d1, d2,…, d q ], (q=|Q|), and the seed application set is represented as Q={q1,q2,…,q q}, the category labels of the seed application set are represented as the category set T = {t1, t2, …, t z}, z is the number of categories, and each application q in the seed application set i Category t i ∈T.

[0093] For each category t∈T, calculate the average distance (average similarity) between the application to be identified and all applications in the seed set Q belonging to category t. t is the set of all points of category t, representing a group, defined as: Q t = {q i ∈Q|t i = t}, calculate the application to be identified to Q t The average distance: Find the group with the smallest corresponding average distance as the target group, and the average distance corresponding to the target group is recorded as The category corresponding to the target group is the target category t min : The embodiment of the present application groups the seed application set according to category labels and calculates the average similarity between the application to be identified and each application in each group. This can smooth the noise or outlier effects that may be brought by individual applications in the group, making the similarity assessment more robust and reducing misjudgments caused by differences in individual applications. The target group with the smallest average value is selected as the category of the application to be identified. This method is based on the idea of ​​global optimization and takes into account the relationship between the application to be identified and the entire seed application set, so that its category can be determined more accurately.

[0094] A possible implementation of the embodiment of the present application is to determine whether the application to be identified belongs to the target category and obtain a classification identification result of the application to be identified, including: Compare the average value corresponding to the target category with the preset threshold; If the average value corresponding to the target category is not less than the preset threshold, the classification and recognition result is that the application to be recognized does not belong to the target category and the application to be recognized is a normal application; If the average value corresponding to the target category is less than the preset threshold, the classification and recognition result is that the application to be identified is a bad application and belongs to the target category.

[0095] The preset threshold value may be manually set according to actual needs and is not specifically limited in this embodiment.

[0096] The embodiment of the present application provides clear boundary conditions for the classification and recognition results by referring to preset thresholds, which helps to obtain more accurate classification and recognition results.

[0097] For example, based on the sample set in Table 1, the distribution of the number of seed applications and the number of applications to be identified in each category is shown in Table 1 below: The bad application classification and identification method based on traffic timing characteristics provided in this application is used to classify and identify each application to be identified in Table 1, and the results (the number of correct identifications by the DTW algorithm and the accuracy of the DTW algorithm) are shown in Table 2. Table 2 also includes the classification and identification results of the traditional rule matching algorithm. Comparison of the two methods shows that among the 9 categories, the classification and identification results of the algorithm provided in this application for false investment and financial management applications are weaker than those of the traditional rule matching algorithm, and the identification and classification results of the remaining 8 categories are better than those of the traditional rule matching algorithm, which proves the effectiveness of the algorithm of this application.

[0098] An embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the contents shown in the aforementioned embodiment of the method for classifying and identifying bad applications based on traffic timing characteristics are implemented.

[0099] An electronic device is provided in an embodiment of the present application, such as Fig. 9 As shown, Fig. 9 The electronic device 900 shown includes: a processor 901 and a memory 903. The processor 901 and the memory 903 are connected, such as through a bus 902. Optionally, the electronic device 900 may also include a transceiver 904. It should be noted that in actual applications, the transceiver 904 is not limited to one, and the structure of the electronic device 900 does not constitute a limitation on the embodiments of the present application.

[0100] Processor 901 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 901 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0101] The bus 902 may include a path to transmit information between the above components. The bus 902 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 902 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but it does not mean that there is only one bus or only one type of bus.

[0102] The memory 903 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0103] The memory 903 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 901. The processor 901 is used to execute the application code stored in the memory 903 to implement the contents shown in the embodiment of the bad application classification and identification method based on traffic time series characteristics.

[0104] Fig. 9 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0105] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer-readable storage medium is run on a computer, the computer can execute the contents shown in the aforementioned embodiment of the method for classifying and identifying bad applications based on traffic timing characteristics.

[0106] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0107] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for classifying and identifying bad applications based on traffic time series characteristics, characterized in that: include: Obtain the application to be identified and the seed application set containing the category label; Acquire traffic time series data of the application to be identified and each application in the seed application set, and determine the similarity between the application to be identified and each application in the seed application set according to the traffic time series data; According to the similarity between the application to be identified and each application in the seed application set, and the category label of each application in the seed application set, determining the target category corresponding to the application to be identified from the category labels; It is determined whether the application to be identified belongs to the target category, and a classification identification result of the application to be identified is obtained.

2. The method for classifying and identifying bad applications based on traffic time series characteristics according to claim 1 is characterized in that: The determining, according to the traffic time series data, respectively the similarity between the application to be identified and each application in the seed application set comprises: Using a sliding window to smooth the traffic time series data of a first target application to obtain target time series data, wherein the first target application is any application in the to-be-identified application and the seed application set; Generate a flow time series curve according to the target time series data; The minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application is calculated, and the minimum distance is used as the similarity between the application to be identified and the second target application, where the second target application is any application in the seed application set.

3. The method for classifying and identifying bad applications based on traffic time series characteristics according to claim 2 is characterized in that: The calculating the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application includes: Constructing a distance matrix of the traffic timing curve of the to-be-identified application and the traffic timing curve of the second target application, wherein an element in the distance matrix represents a distance between two points; A cumulative distance matrix is ​​constructed based on the distance matrix using a dynamic time warping algorithm, wherein any element in the cumulative distance matrix represents the minimum cumulative distance from a matrix starting point to a point corresponding to the element; The element value corresponding to the matrix end point is read from the cumulative distance matrix to obtain the minimum distance between the traffic timing curve of the application to be identified and the traffic timing curve of the second target application.

4. The method for classifying and identifying bad applications based on traffic time series characteristics according to claim 1 is characterized in that: The determining, based on the similarity between the application to be identified and each application in the seed application set, and the category label of each application in the seed application set, the target category corresponding to the application to be identified from the category label includes: Dividing the seed application set into multiple groups according to category labels, wherein the category labels of the applications in each group are the same; Calculate the average value of the similarity between the application to be identified and each application in each group according to the similarity between the application to be identified and each application in the seed application set; A target group with the smallest average value is determined from multiple groups, and the category label of the target group is used as the target category.

5. The method for classifying and identifying bad applications based on traffic time series characteristics according to claim 4 is characterized in that: The determining whether the application to be identified belongs to the target category and obtaining the classification identification result of the application to be identified includes: Comparing the average value corresponding to the target category with a preset threshold; If the average value corresponding to the target category is not less than the preset threshold, the classification recognition result is that the application to be recognized does not belong to the target category, and the application to be recognized is a normal application; If the average value corresponding to the target category is less than the preset threshold, the classification recognition result is that the application to be recognized is a bad application and belongs to the target category.

6. The method for classifying and identifying bad applications based on traffic time series characteristics according to claim 1 is characterized in that: The obtaining of the traffic time series data of each application in the to-be-identified application and the seed application set includes: Acquire the running data of each application in the to-be-identified application and the seed application set when the application is running; Preprocessing the operation data of the first target application to obtain target operation data, wherein the first target application is any one of the application to be identified and the seed application set; Determine the data packet size at each timing point from the target operation data, arrange the data packet sizes in the order of the corresponding timing points, and obtain the traffic timing data in the form of an array, wherein an element in the array represents the data packet size at a timing point.

7. The method for classifying and identifying bad applications based on traffic time series characteristics according to claim 6 is characterized in that: The preprocessing of the operation data of the first target application to obtain target operation data includes: Removing irrelevant protocol packets from the running data of the first target application to obtain original traffic data, wherein the irrelevant protocol packets are protocol data packets other than the TCP protocol; Useless data packets are removed from the original traffic data to obtain target operation data, wherein the useless data packets include: damaged packets, timeout packets, reset packets, handshake packets and waving packets.

8. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the steps of the method for classifying and identifying bad applications based on traffic timing characteristics described in any one of claims 1 to 7.

9. An electronic device, characterized in that: include: at least one processor; Memory; At least one application, wherein at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the method for classifying and identifying bad applications based on traffic timing characteristics as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method for classifying and identifying bad applications based on traffic timing characteristics as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Abnormal information discovery method based on network traffic big data

    CN111049818A

  • Illegal application category identification method and device

    CN111143833A

  • Time sequence classification method and device

    CN112131322A

  • Network traffic identification method and device based on deep transfer learning

    CN112235264A

  • Traffic classification method and device, electronic device and computer readable medium

    CN113705726A