Communication data encryption detection method based on machine learning, and related device
Through machine learning-based methods, pre-analyzing and feature extraction of communication data, and matching with discriminant feature databases, the problem of insufficient effectiveness of communication data encryption detection in the existing technology is solved, and more efficient and accurate encryption detection is achieved to ensure that The security of data transmission.
Patent Information
- Application Number
- PCT/CN2024/085599
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-14
- Filing Date
- 2024-04-02
- Publication Date
- 2024-12-05
AI Technical Summary
The existing communication data encryption detection method has a single analysis of communication data, resulting in insufficient effectiveness of encryption detection and data security risks.
Using a machine learning-based method, we obtain communication data for pre-analysis, extract data features, and match it with the pre-stored discriminant feature library to determine whether the communication data is encrypted data, and realize multi-dimensional analysis and accurate judgment.
It improves the accuracy and efficiency of communication data encryption detection, reduces misjudgment, and ensures the security of data transmission.
Smart Images

Figure CN2024085599_05122024_PF_FP_ABST
Abstract
Description
Communication data encryption detection method and related equipment based on machine learning
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 14, 2023, with application number 2023104028429 and application name “Communication data encryption detection method and related equipment based on machine learning”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a communication data encryption detection method based on machine learning, a communication data encryption detection device based on machine learning, a computer device, and a computer-readable storage medium. Background Art
[0003] With the development of internet technology, data transmission over the internet has increasingly stringent security requirements. To ensure data security, data is often encrypted before transmission. However, under some communication standards, the encryption mechanisms for communication data may not be perfect, resulting in unencrypted communication data, which poses data security risks. Therefore, encryption detection of communication data is particularly necessary.
[0004] However, the current encryption detection method for communication data is relatively simple in its analysis of communication data, resulting in the corresponding effectiveness of communication data in encryption detection still needs to be improved.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a communication data encryption detection method and related equipment based on machine learning, which can improve the effectiveness of encryption detection of communication data.
[0007] In one aspect, an embodiment of the present application provides a method for detecting communication data encryption based on machine learning, the method comprising:
[0008] Acquiring communication data, and performing a pre-analysis on a possibility that the communication data is encrypted data, to obtain a pre-analysis result;
[0009] When the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, calling a data encryption discrimination model to extract data features from the communication data;
[0010] Determining a discriminant feature library, wherein the discriminant feature library includes a plurality of pre-stored discriminant features;
[0011] Based on the feature value of the data feature and the discriminant feature values of each of the pre-stored discriminant features, searching the discriminant feature library for a pre-stored discriminant feature that matches the data feature;
[0012] When the matching pre-stored discrimination feature is found, the communication data is determined to be encrypted data.
[0013] In one aspect, an embodiment of the present application provides a communication data encryption detection device based on machine learning, the device comprising:
[0014] an acquisition unit, configured to acquire communication data;
[0015] A processing unit is configured to pre-analyze the possibility that the communication data is encrypted data to obtain a pre-analysis result; when the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, call a data encryption discrimination model to extract data features from the communication data; determine a discrimination feature library, wherein the discrimination feature library includes a plurality of pre-stored discrimination features; based on the feature value of the data feature and the discrimination feature values of each of the pre-stored discrimination features, search the discrimination feature library for a pre-stored discrimination feature that matches the data feature; and when the matching pre-stored discrimination feature is found, determine that the communication data is encrypted data.
[0016] In one aspect, an embodiment of the present application provides a computer device, comprising:
[0017] a processor suitable for executing a computer program;
[0018] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the communication data encryption detection method based on machine learning as described above.
[0019] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is loaded by a processor and executed by the above-mentioned machine learning-based communication data encryption detection method.
[0020] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program or computer instructions, and when the computer program or computer instructions are executed by a processor, the above-mentioned communication data encryption detection method based on machine learning is implemented.
[0021] In an embodiment of the present application, communication data can be obtained and a pre-analysis can be performed on the possibility that the communication data is encrypted data to obtain a pre-analysis result. The pre-analysis process can determine the probability that the communication data is encrypted data, thereby achieving a preliminary judgment on whether the communication data is encrypted data. When the pre-analysis result indicates that the probability that the communication data is encrypted data is greater than a preset probability threshold, a data encryption discrimination model can be called to extract data features of the communication data. Then, based on the feature values based on the data features and the feature values of each pre-stored discriminant feature in the discriminant feature library, a pre-stored discriminant feature that matches the data features can be searched in the discriminant feature library; and when a pre-stored discriminant feature that matches the data features is found, it can be determined that the communication data is encrypted data. In the above processing process, the possibility that the communication data is encrypted data can be pre-analyzed, data features can be extracted, and other processes can be performed in sequence. Then, matching processing can be performed based on the feature values of the data features and the pre-stored discriminant features, and finally it can be determined whether the communication data is encrypted. This allows for multi-dimensional analysis of communication data, more accurately identifying encrypted data, improving the accuracy of detecting whether communication data is encrypted, and ultimately increasing the effectiveness of encryption detection. When performing encryption detection on massive amounts of communication data, this can be achieved by identifying the likelihood of encryption and selecting data with a higher likelihood of encryption. This data can then be used with a data encryption identification model to perform the final determination of encryption. This improves the overall efficiency of detecting whether communication data is encrypted and ensures the effectiveness of encryption detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1a is an architecture diagram of a communication data encryption detection system based on machine learning provided in an embodiment of the present application;
[0023] FIG1b is a schematic diagram of an application scenario of communication data encryption detection based on machine learning provided in an embodiment of the present application;
[0024] FIG2 is a flow chart of a communication data encryption detection method based on machine learning provided in an embodiment of the present application;
[0025] FIG3 is a flow chart of another communication data encryption detection method based on machine learning provided in an embodiment of the present application;
[0026] FIG4a is a schematic diagram of a data encapsulation format of satellite communication data at each layer provided by an embodiment of the present application;
[0027] FIG4b is a schematic diagram showing the presence of useless data in satellite communication data provided by an embodiment of the present application;
[0028] FIG5a is a schematic diagram of constructing a discriminant feature library provided in an embodiment of the present application;
[0029] FIG5 b is a schematic diagram of an output discrimination result provided by an embodiment of the present application;
[0030] FIG6 a is a diagram of a communication data processing framework based on machine learning provided in an embodiment of the present application;
[0031] FIG6 b is a schematic diagram of a process for processing communication data based on machine learning provided in an embodiment of the present application;
[0032] FIG7 is a schematic diagram of the structure of a communication data encryption detection device based on machine learning provided in an embodiment of the present application;
[0033] FIG8 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be described clearly and completely 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 the present application. In the present application, the term "at least one" means one or more, and the meaning of "multiple" means two or more; for example: at least one encrypted communication sample data refers to the one, two or more encrypted communication sample data, and multiple pre-stored discriminant features refer to two or more pre-stored discriminant features.
[0035] The present application proposes a communication data encryption detection scheme based on machine learning, wherein the so-called encryption detection refers to detecting whether the communication data is encrypted data, where encrypted data refers to data obtained after encryption processing; the scheme relates to a communication data encryption detection system, method and related equipment based on machine learning, wherein the scheme first pre-analyzes the possibility of the communication data being encrypted data (i.e., the encryption possibility) for the communication data to be processed. When the pre-analysis result indicates that the communication data is likely to be encrypted data (i.e., the encryption possibility) is high, a data encryption discrimination model can be used to extract data features from the communication data, and based on the feature values of the extracted data features and the feature values of each pre-stored discriminant feature in the discriminant feature library, a pre-stored discriminant feature matching the data feature is searched in the discriminant feature library, and then when a pre-stored discriminant feature matching the data feature is found, the communication data is determined to be encrypted data. In this way, the communication data can be analyzed in multiple dimensions, and the possibility of the communication data being encrypted data can be determined through pre-analysis processing. Then, the communication data can be further analyzed and processed in combination with the data encryption discrimination model, so as to achieve more accurate discrimination of encrypted data. This solution effectively prevents random, non-encrypted data from being mistakenly identified as encrypted, improving the effectiveness of encryption detection for communication data. Furthermore, in encryption detection scenarios involving massive amounts of communication data, encryption analysis can be used to filter out communication data with a high likelihood of encryption, allowing for more accurate identification of such data. This not only improves overall detection efficiency but also ensures the accuracy of encrypted data identification.
[0036] The communication data encryption detection scheme based on machine learning proposed in this application can be applied in various business scenarios, including but not limited to: ① Data communication scenarios with high data security requirements in the communication field, such as financial data exchange scenarios; ② Scenarios where it is necessary to quickly determine whether the data is encrypted, such as data security audits, network security detection and other scenarios; ③ Scenarios where encrypted data analysis is required, such as data security research, data security analysis and other scenarios. Furthermore, based on the determination of whether the communication data is encrypted data, it is also possible to determine the encryption strength of the encrypted data when the communication data is encrypted data, so as to determine whether the communication data can be transmitted securely. Therefore, the communication data encryption detection scheme based on machine learning can also be applied in: ④ Scenarios based on the need to evaluate the information transmission security of the current communication system; ⑤ Scenarios where the security of the current communication system needs to be strengthened; ⑥ Other scenarios where data encryption detection is required.
[0037] The aforementioned communication system may be a satellite communication system. This solution is based on pre-analysis of communication data to determine the likelihood of encryption. For communication data with a high likelihood of encryption, a data encryption discrimination model is invoked to extract data features. Based on the eigenvalues of the extracted data features, a discriminant feature library is checked for pre-stored discriminant features that match the data features, ultimately determining whether the communication data is encrypted. The processing power of the data encryption discrimination model enables complex calculations and analyses of communication data to be performed in a relatively short time, thereby determining whether the communication data is encrypted and improving the efficiency of encryption detection.
[0038] The following will introduce the architecture of the communication data encryption detection system based on machine learning provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0039] Please refer to Figure 1a, which is an architectural diagram of a machine learning-based communication data encryption detection system provided by an exemplary embodiment of the present application. As shown in Figure 1a, the machine learning-based communication data encryption detection system 10 includes a database 101 and a computer device 102. Database 101 can establish a communication connection with computer device 102 via a wired or wireless connection. Computer device 102 is configured to execute a machine learning-based communication data encryption detection process, and database 101 is configured to provide data support for computer device 102's machine learning-based communication data encryption detection process.
[0040] The computer device 102 can be a terminal device or a server. The terminal devices include but are not limited to: smart phones, tablet computers, smart wearable devices, smart voice interaction devices, smart home appliances, personal computers, vehicle-mounted terminals, smart cameras and other devices. This application does not impose any restrictions on this. This application does not impose any restrictions on the number of terminal devices. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to this. This application does not impose any restrictions on the number of servers.
[0041] According to the deployment location, the database 101 can be a local database of the computer device 102, or a cloud database that can establish a connection with the computer device 102. The database 101 can store communication data to be processed. The communication data can be data transmitted based on a communication standard, such as data transmitted using the satellite communication standard DVB-S / S2 / S2X (a series of digital satellite communication standards, mainly used to provide high-quality digital video and data transmission services in the field of satellite communications), including but not limited to: video data, audio data, image data, document data, etc. Furthermore, the database 101 can also store a pre-trained data encryption discrimination model. When the computer device needs to detect encrypted data, the data encryption discrimination model can be used to determine whether the communication data is encrypted data.
[0042] The machine learning-based communication data encryption detection process executed by the computer device 102 may generally include: (1) determining whether the communication data is likely to be encrypted; (2) invoking a data encryption discrimination model to extract data features of the communication data; (3) searching the discrimination feature library for pre-stored discriminant features that match the data features based on feature values of the data features and feature values of each pre-stored discriminant feature in the discrimination feature library; and (4) determining whether the communication data is encrypted based on the search results.
[0043] (1) Determine the degree of encryption of communication data.
[0044] The communication data can be obtained from the database 101 or other computer devices. The communication data includes but is not limited to any of the following: video data, audio data, image data, document data, database data, protocol data, web page data, etc. By performing pre-analysis processing on the communication data, the possibility of encryption of the communication data (i.e., the possibility that the communication data is encrypted data) can be determined based on the pre-analysis results. In one embodiment, the pre-analysis processing can be implemented based on the comparison between the information entropy of the communication data and the entropy threshold, or it can be implemented based on other features of the communication data, such as whether the communication data contains identification information after encryption processing, the file header added during the encryption process, etc. This application is not limited to this.
[0045] (2) Call the data encryption discrimination model to extract the data features of the communication data.
[0046] If the pre-analysis results determine that the communication data is highly likely to be encrypted, the data encryption discrimination model can be invoked to extract data features from the communication data to obtain data features of the communication data. Based on these data features, it can be ultimately determined whether the communication data is encrypted. The data encryption discrimination model can be obtained from database 101, other databases, or computer devices. This application does not impose any restrictions on this.
[0047] (3) Based on the feature value of the data feature and the feature value of each pre-stored discriminant feature in the discriminant feature library, the pre-stored discriminant feature that matches the data feature is searched in the discriminant feature library.
[0048] In a feasible manner, the discriminant feature library contains multiple pre-stored discriminant features, and the pre-stored discriminant features contained in the discriminant feature library are all data features of encrypted communication data. Therefore, through feature value comparison, it can be finally determined whether the communication data is encrypted data.
[0049] (4) Determine whether the communication data is encrypted data based on the search result.
[0050] If the search result indicates that a pre-stored discriminant feature that matches the data feature is found in the discriminant feature library, this indicates that a pre-stored discriminant feature similar to the data feature of the communication data exists in the discriminant feature library, and further, it can be determined that the communication data is encrypted data and that the encryption method used for the communication data is the same as the encryption method corresponding to the pre-stored discriminant feature. For example, the above match means that the difference between the feature value of the pre-stored discriminant feature and the feature value of the data feature is less than a threshold value.
[0051] In one achievable method, when the search result indicates that no pre-stored discriminant features matching the data features were found in the discriminant feature library, the communication data can be determined to be unencrypted data. By comparing the data features of various types of encrypted communication data contained in the discriminant feature library with the data features of the communication data, it is possible to more accurately determine whether each communication data with different encryption processing (such as processing differences caused by different encryption methods) is encrypted, thereby minimizing misjudgments and improving the accuracy of encryption detection.
[0052] The machine learning-based communication data encryption detection method provided in this application can determine the degree of encryption probability of the communication data by pre-analyzing and processing the communication data. For communication data with a high probability of encryption, a data encryption discrimination model can be used to perform further encryption discrimination, thereby avoiding misjudging non-encrypted data as encrypted data. In the process of using the data encryption discrimination model for encryption discrimination, data feature extraction can be performed first. Then, using the feature values of the extracted data features and the feature values of each pre-stored discriminant feature in the discriminant feature library, the discriminant feature library can be searched for pre-stored discriminant features that match the data features. The search result can ultimately determine whether the communication data is encrypted data. Based on the training of the data encryption discrimination model and the different pre-stored discriminant features in the discriminant feature library, data encryption detection can be performed more effectively. Based on the corresponding improvement in the effectiveness of encryption detection of communication data, the security of data transmission can be guaranteed.
[0053] In practical applications, the solution provided by this application can be executed before or during the communication data transmission process. Based on this solution, it is possible to detect whether the communication data is encrypted. If the communication data is encrypted, the encryption strength of the communication data can be further analyzed. If the encryption strength does not meet the transmission security requirements, a higher encryption strength can be used to strengthen the security of the communication data. If the communication data is unencrypted, it can be intercepted and transmitted after encryption. This can assist in the assessment of data transmission security and promptly identify security risks in the communication data.
[0054] Schematically, please refer to the application scenario of communication data encryption detection based on machine learning shown in Figure 1b. Communication data is, for example, data transmitted based on a series of satellite communication standards DVB-S / S2 / S2X. DVB-S / S2 / S2X can be used to transmit digital television signals between satellites and the ground through electromagnetic waves. Due to the fully exposed properties of electromagnetic waves, satellite communication data can be completely obtained from the air interface side through technical means. The DVB-S / S2 / S2X series of protocols are transmission protocols for digital satellite communications. They are only responsible for encoding and decoding transmitted data and do not encrypt the data. Objects using satellite communications (which can send satellite communication data or receive satellite communication data) carry many important services. When using the DVB-S / S2 / S2X protocol for satellite communication, the solution provided in this application can be used to perform communication data encryption detection before the communication data is transmitted to the ground station via satellite to ensure that the communication data is encrypted before being transmitted to the ground station via satellite. Furthermore, before a ground station sends communication data from the internet via satellite to a satellite communication system, or before the communication data is transmitted from the internet to a ground station, data encryption detection can be performed according to the scheme provided in this application to ensure that the communication data is transmitted encrypted. This way, even if an attacker establishes a satellite ground receiving station, the probability of the attacker intercepting unencrypted satellite communication data can be reduced, thus preventing data leakage and ensuring data transmission security.
[0055] Next, the communication data encryption detection method based on machine learning provided in the embodiment of the present application is introduced.
[0056] Please refer to Figure 2, which is a flow chart of a method for detecting communication data encryption based on machine learning provided in an embodiment of the present application. The method for detecting communication data encryption based on machine learning can be executed by a computer device (such as the computer device in the system shown in Figure 1a), and the method for detecting communication data encryption based on machine learning can include the following steps S201-S205.
[0057] S201, acquiring communication data, and performing a pre-analysis on the possibility that the communication data is encrypted data to obtain a pre-analysis result.
[0058] The communication data mentioned here refers to the communication data to be encrypted and tested. The communication data may be data that needs to be encrypted for transmission. According to different communication methods, the communication data includes but is not limited to: satellite communication data, optical fiber communication data, etc. Among them, satellite communication data is digital signal data transmitted between the satellite and the ground through electromagnetic waves, which can be transmitted based on the corresponding satellite communication standards (such as a series of digital satellite communication standards DVB-S / S2 / S2X). Optical fiber communication data is digital signal data based on optical fiber transmission. According to different data content, communication data includes but is not limited to: multimedia data (such as audio, video, pictures), document data (such as Word documents, Excel documents, TXT documents, etc.), protocol data, database data (such as database files), web page data (such as web page files), etc. In addition, communication data is data that needs to be encrypted for transmission, and encryption testing can ensure that the content contained in the communication data is transmitted after encryption.
[0059] In order to balance the effectiveness of encryption detection, the resources used for encryption detection, and the speed of encryption detection on communication data, a preliminary analysis of the possibility that the communication data is encrypted data can be performed to obtain a preliminary analysis result.
[0060] In one embodiment, discriminative features of communication data can be obtained, and based on these discriminative features, a preliminary analysis of the likelihood that the communication data is encrypted data can be performed to obtain a preliminary analysis result. The discriminative features of communication data include, but are not limited to, one or more of the following: information entropy, information added during the encryption process, data length, data storage or transmission structure, and other subtle features. These preliminary discriminative features can be used to preliminarily determine the likelihood of communication data being encrypted due to the following reasons: ① After data is encrypted, the encryption algorithm may add special file headers or other identifying information to the encrypted result to enable the decryption algorithm to correctly identify the encryption algorithm and decrypted data. Therefore, the information added during the encryption process can serve as a preliminary discriminative feature. ② When encrypting raw data, the encryption algorithm may pad the data to a specific length. Therefore, the data length can also serve as a preliminary discriminative feature. ③ For unencrypted data, the storage method can be identified based on some common data storage and transmission structures. Therefore, the data storage or transmission structure can also serve as a data feature. ④ Because encryption and compression change the data entropy, information entropy can also serve as an important preliminary discriminative feature. ⑤ Other subtle features. These features can be mixed, matched, and cross-referenced to greatly improve the accuracy of the preliminary determination that communication data is encrypted. Optionally, the communication data can be transmitted in the form of a data stream, such as a video stream, an audio stream, etc. Combining multiple features can more accurately determine whether a data stream is encrypted. It is understood that if the above features are not used as preliminary discriminant features, they can be used as data features extracted by the data encryption discriminant model for subsequent processing.
[0061] The pre-analysis result can indicate the likelihood that the communication data is encrypted. If the pre-analysis result indicates that the likelihood that the communication data is encrypted is greater than a preset likelihood threshold, the pre-analysis result indicates a high likelihood that the communication data is encrypted, i.e., there is a high likelihood that the communication data is encrypted. Therefore, steps S202-S205 can be further executed.
[0062] In one embodiment, when the pre-analysis results indicate that the likelihood of the communication data being unencrypted data is greater than a preset likelihood threshold, the communication data is directly determined to be unencrypted data. Specifically, the likelihood of the communication data being unencrypted data being greater than the preset likelihood threshold, which can also be understood as the likelihood of the communication data being encrypted data being less than or equal to the preset likelihood threshold, indicates a high likelihood of the communication data being unencrypted data. In this case, steps S202-S205 do not need to be executed, and the communication data can be directly determined to be unencrypted data, i.e., the communication data is not encrypted. In one conceivable implementation, when the communication data is determined to be unencrypted data, the communication data can be intercepted and encrypted before being transmitted.
[0063] When faced with a massive amount of communication data to be processed, pre-analyzing the likelihood of each piece of communication data being encrypted can quickly filter out data with a high likelihood of encryption. This data can then be further analyzed using a data encryption discrimination model, improving encryption detection efficiency. Furthermore, the data encryption discrimination model can reduce the chances of misidentifying non-encrypted data as encrypted, improving the overall accuracy of encrypted data detection.
[0064] S202: When the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, a data encryption discrimination model is called to extract data features from the communication data.
[0065] The data encryption discrimination model is a trained discriminant model based on machine learning, which can be used to determine whether communication data is encrypted. This machine learning-based training enables computing devices to more accurately predict whether communication data is encrypted based on input data (in this case, communication data).
[0066] By calling the data encryption discrimination model to extract and process the communication data, the data features of the communication data can be obtained, and the data features can be used to ultimately determine whether the communication data is encrypted. Based on the characteristics of communication data as a digital signal, the data features of the communication data can include one or more of the following: time domain features and frequency domain features. Among them, time domain features are, for example, certain statistics (such as mean, variance, correlation coefficient, etc.), and frequency domain features are, for example, features of the frequency domain dimension obtained by Fourier transform, wavelet transform, etc. In another implementation, the data features can represent one or more of the following: whether the communication data contains added information during the encryption process, the length of the communication data, the data storage and transmission structure of the communication data, etc. This data feature is different from the preliminary discrimination feature used for preliminary discrimination, and based on the data feature, it can be more accurately determined whether the communication data is encrypted.
[0067] S203, determining a discriminant feature library.
[0068] The data encryption discriminant model includes a discriminant feature library, which includes multiple pre-stored discriminant features. A pre-stored discriminant feature is a data feature of encrypted communication data and can indicate the presence of encryption in the encrypted communication data. That is, all pre-stored discriminant features in the discriminant feature library are data features of each encrypted communication data, and each pre-stored discriminant feature corresponds to a single encryption method. Encrypted communication data, i.e., encrypted communication data, can be encrypted communication sample data used to train the data encryption discriminant model, or other encrypted communication data. For any two encrypted communication data in the discriminant feature library that correspond to pre-stored discriminant features, if the encryption methods used for the two encrypted communication data are different, the pre-stored discriminant features corresponding to the two encrypted communication data are different. For example, the same unencrypted data can be encrypted using encryption method 1 to obtain encrypted communication data A1, and encrypted using encryption method 2 to obtain encrypted communication data A2. Due to the different encryption methods, the discriminant features corresponding to encrypted communication data A1 and encrypted communication data A2 are different. The pre-stored discriminant features in the discriminant feature library can be classified and stored according to different encryption methods or different encryption strengths, wherein the encryption strength depends on the encryption method and key complexity used in the encryption process.
[0069] S204 , based on the feature value of the data feature and the feature values of each pre-stored discriminant feature, searching the discriminant feature library for a pre-stored discriminant feature that matches the data feature.
[0070] The data features of the communication data and each pre-stored discriminant feature in the discriminant feature library each have a corresponding feature value. In one achievable embodiment, the hit detection process herein may specifically include comparing the feature value of the data feature with the feature value of each pre-stored discriminant feature in the discriminant feature library. By comparing the feature values, it is possible to search the discriminant feature library for a pre-stored discriminant feature that matches the data feature.
[0071] S205: When a matching pre-stored discrimination feature is found, determining that the communication data is encrypted data.
[0072] When a pre-stored discriminant feature that matches the data feature is found, it indicates that the feature value of the pre-stored discriminant feature in the discriminant feature library matches the feature value of the data feature. Based on the matching characteristics of corresponding feature values under the same encryption method, it can be determined that the communication data is encrypted data obtained after encryption processing, that is, the communication data is encrypted.
[0073] As a feasible implementation, a pre-stored discriminant feature in the discriminant feature library corresponds to an encryption method. A specific implementation of S204 may include the following: upon finding a matching pre-stored discriminant feature, determining that the communication data was obtained using the encryption method corresponding to the matching pre-stored discriminant feature, thereby determining that the communication data is encrypted data. In other words, based on the indication of the search result, it may be first determined that the communication data and the encrypted communication data corresponding to the pre-stored discriminant feature that matches the data feature use the same encryption method, thereby determining that the communication data is encrypted data. By first determining the encryption method and then determining that the communication data is encrypted data, the detection result that the communication data is encrypted data can be made more reliable, thereby improving the credibility of the detection result.
[0074] In one embodiment, when no pre-stored discriminant feature matching the data feature is found, the communication data is determined to be unencrypted data. Specifically, if, based on an indication of the search result, it is determined that no feature value of the pre-stored discriminant feature in the discriminant feature library matches the feature value of the data feature, the communication data can be further determined to be unencrypted data, i.e., the communication data is not encrypted.
[0075] In an embodiment of the present application, communication data can be obtained and a pre-analysis can be performed on the possibility that the communication data is encrypted data to obtain a pre-analysis result. The pre-analysis process can determine the probability that the communication data is encrypted data, thereby achieving a preliminary judgment on whether the communication data is encrypted data. When the pre-analysis result indicates that the probability that the communication data is encrypted data is greater than a preset probability threshold, a data encryption discrimination model can be called to extract data features of the communication data. Then, based on the feature values based on the data features and the feature values of each pre-stored discriminant feature in the discriminant feature library, a pre-stored discriminant feature that matches the data features can be searched in the discriminant feature library; and when a pre-stored discriminant feature that matches the data features is found, it can be determined that the communication data is encrypted data. In the above processing process, the possibility that the communication data is encrypted data can be pre-analyzed, data features can be extracted, and other processes can be performed in sequence. Then, matching processing can be performed based on the feature values of the data features and the pre-stored discriminant features, and finally it can be determined whether the communication data is encrypted. This allows for multi-dimensional analysis of communication data, more accurately identifying encrypted data, improving the accuracy of detecting whether communication data is encrypted, and ultimately increasing the effectiveness of encryption detection. When performing encryption detection on massive amounts of communication data, this can be achieved by identifying the likelihood of encryption and selecting data with a higher likelihood of encryption. This data can then be used with a data encryption identification model to perform the final determination of encryption. This improves the overall efficiency of detecting whether communication data is encrypted and ensures the effectiveness of encryption detection.
[0076] Please refer to Figure 3, which is a flow chart of a method for detecting communication data encryption based on machine learning provided in an embodiment of the present application. The method for detecting communication data encryption based on machine learning can be executed by a computer device (such as the computer device in the system shown in Figure 1a), and the method for detecting communication data encryption based on machine learning can include the following steps S301-S306.
[0077] S301, obtaining communication data.
[0078] In one embodiment, obtaining communication data may include the following processing steps 1 and 2.
[0079] Step 1: Obtain communication data packets from the communication system, and use data analysis tools to extract transmission data in the communication system from the communication data packets.
[0080] A communication system refers to a system for transmitting communication data, such as a satellite communication system. Communication data can be transmitted in the communication system in the form of a communication data packet. The communication data packet is a data packet containing communication data and can be captured from the communication system using packet capture software (such as Wireshark, Fiddler, etc.). In one embodiment, the acquired communication data packet can be a link layer (MAC layer) data packet, such as a GSE data packet (a data packet encapsulated based on the Communication Stream Encapsulation Protocol), which encapsulates the actual transmission data, specifically encapsulated in a Protocol Data Unit (PDU).
[0081] Schematically, taking satellite communication data as an example, the data encapsulation format at each layer is shown in Figure 4a. This includes the physical layer, MAC layer, general stream encapsulation layer (GSE layer), and network layer (also known as the IP layer). The physical layer contains a satellite communication data frame (Planet Frame, PLFrame), which is encapsulated into a data header (PL Header) and a complex sequence error correction frame (XFECFrame). The XFECFrame is encapsulated into a baseband frame (BBFrame), BCH FEC (a forward error correction code), and LDPC FEC (a forward error correction code) at the MAC layer. The baseband frame contains a baseband frame data field (BBFrame Data Field), a data header (BBFrame Header), and padding data. The BBFrame Data Field is encapsulated into two GSE packets in the GSELayer. Each GSE packet contains a GSE header and a GSE data field. The network layer includes a protocol data unit (PDU) corresponding to the GSELayer, and one PDU corresponds to one GSE Data Field. The protocol data unit includes the transmission data.
[0082] After acquiring the communication data packets, data analysis tools can be used to extract the transmission data in the communication system from the communication data packets. This transmission data is the data that needs further analysis. Illustratively, the transmission data can be data in various formats such as images and videos that are well supported by the DVB (Digital Video Broadcasting) protocol, or it can be protocol data such as HTTP (HyperText Transfer Protocol), TCP (Transmission Control Protocol), and UDP (User Datagram Protocol) that are not directly supported. These protocol data need to be encapsulated into the IP (Internet Protocol) protocol and then transmitted via DVB-S2. To improve the efficiency and accuracy of data analysis, the transmission data can be stripped and removed from the DVB protocol using a corresponding algorithm.
[0083] Data analysis tools, such as the GSE Data Analyzer (a tool for analyzing communication packets encapsulated using the Communication Stream Encapsulation Protocol), are used to extract transmission data from communication packets. This tool can be used to extract data from protocol data units (PDUs). Because transmission data is scattered and fragmented, this tool can quickly and efficiently parse communication packets and reassemble the fragmented data to obtain transmission data, thereby improving transmission data extraction efficiency and preparing for the next step of data preprocessing.
[0084] Step 2: Use data analysis tools to pre-process the transmission data to obtain communication data.
[0085] Since the extracted transmission data may contain duplicate data or padding data (i.e., padding data), and coding errors may occur during the transmission process, resulting in data anomalies, data analysis tools can be used to preprocess the transmission data; the preprocessing here includes but is not limited to one or more of the following: data deduplication and data cleaning.
[0086] Data deduplication can be used to remove duplicate data from transmitted data, while data cleaning can be used to remove outliers, missing values, and the like. For example, the transmitted data is satellite communication data, which contains a large number of null packets. As shown in Figure 4b, preprocessing can remove these null packets, thereby avoiding analysis of useless data and saving resources for subsequent data analysis.
[0087] The data analysis tool used for preprocessing here can be the same as the data analysis tool used for extracting the transmission data. For example, the transmission data can be preprocessed using the GSE Data Analyzer. In this way, the extraction of the transmission data and the preprocessing of the transmission data are performed using the same data analysis tool, meaning that both the transmission data and the preprocessed transmission data are obtained using the data analysis tool. By using the same data analysis tool to extract the transmission data in the communication system and preprocess the transmission data, processing efficiency can be improved. The preprocessed transmission data can be used as communication data to facilitate subsequent analysis of the communication data, including but not limited to determining the information entropy of the communication data and extracting data features of the communication data.
[0088] S302: Acquire the information volume of the communication data, and determine the information entropy of the communication data based on the information volume of the communication data.
[0089] Specifically, the specific implementation process of step S302 may include the following steps: obtaining the probability P(x i), where the reference value is a character or byte, or a numerical value, including possible values when the communication data is encrypted data. Then, the information content of the corresponding reference value of the communication data can be determined based on the probability corresponding to each reference value of the communication data. The information volume of the communication data is obtained, that is, the information volume of the communication data includes: the information volume of each reference value of the communication data. Then based on the information volume of each reference value of the communication data and the corresponding probability P(x i ) determines the information entropy of the communication data. In one implementation, based on the information amount of each reference value of the communication data and the corresponding probability P(x i ) The calculation formula for determining the information entropy H(X) of the communication data is shown in the following formula 1).
[0090] Among them, X is a random variable, which can represent communication data, x i represents the possible value of the random variable X (i.e., the reference value), P(x i ) is a random variable X with value x i The probability of n is the number of possible values of the random variable X. Indicates the reference value x of the communication data X i The amount of information, b is the base of logarithm log.
[0091] The probability distribution P(X) is the probability of a random variable X taking different values. For each piece of unencrypted data, certain values (such as common characters or bytes) may appear more frequently, resulting in an uneven distribution of P(X). Encrypted data, on the other hand, typically exhibits greater uniformity, with P(X) distribution approaching uniformity. When P(X) distribution approaches uniformity, the information entropy H(X) reaches its maximum value, indicating a high degree of uncertainty and randomness in the communication data. Because the encryption algorithm used in the encryption process disrupts the structure and patterns of the data, making it more difficult to predict, encrypted data has a higher information entropy.
[0092] The information entropy of communication data indicates its complexity. In information theory, entropy can be used to measure information content. Information entropy, also known as information enthalpy, can be used to measure the disorder and uncertainty of information states. A higher information entropy indicates richer information content and a greater amount of information. The information entropy of communication data is positively correlated with its complexity: greater entropy indicates higher complexity, while lower entropy indicates lower complexity.
[0093] When communication data is encrypted, its entropy changes. Specifically, before encryption, the entropy of the communication data depends on its content. If the content is complex and unpredictable, the entropy will be higher. After encryption, the encryption algorithm changes the content, making it more complex and unpredictable, thereby increasing its entropy. Therefore, the entropy of communication data before encryption is lower than after encryption. The higher the entropy of communication data, the more likely it is encrypted.
[0094] As can be seen from this, based on the characteristics of data encryption, preliminary analysis of communication data using its information entropy can accurately and efficiently determine whether the data is likely encrypted. Since the information entropy of encrypted data is greater than that of unencrypted data, a high entropy may indicate encryption. Whether the information entropy is high can be determined by comparing it with an entropy threshold.
[0095] S303: Compare the information entropy with the entropy threshold to obtain a comparison result, and pre-analyze the possibility that the communication data is encrypted data based on the comparison result to obtain a pre-analysis result.
[0096] The information entropy of any communication data after encryption is greater than the information entropy of any communication data before encryption. For example, if data A (i.e., the communication data before encryption) is encrypted and the resulting communication data is data A', then the information entropy of data A' will be greater than the information entropy of data A. The entropy threshold used for comparison can be set based on empirical values, specifically a threshold that ensures relatively accurate determination of whether the communication data is encrypted. This entropy threshold minimizes missed detections of encrypted data and false positives of unencrypted data.
[0097] Based on the comparison between the information entropy and the entropy threshold, a corresponding comparison result can be obtained. Based on different comparison results, the pre-analysis of the likelihood that the communication data is encrypted data will result in different pre-analysis results, specifically including the following: ① If the comparison result indicates that the information entropy of the communication data is greater than or equal to the entropy threshold, then the pre-analysis result indicates that the likelihood that the communication data is encrypted data is greater than the preset likelihood threshold; ② If the comparison result indicates that the information entropy of the communication data is less than the entropy threshold, then the pre-analysis result indicates that the likelihood that the communication data is unencrypted data is greater than the preset likelihood threshold.
[0098] Specifically, if the information entropy is greater than or equal to the entropy threshold, it indicates that the complexity of the communication data is high, and the communication data is likely to be encrypted. Therefore, the pre-analysis result can be that the probability that the communication data is encrypted data is greater than a preset probability threshold. If the information entropy is less than the entropy threshold, it indicates that the complexity of the communication data is low, and the probability that the communication data is encrypted is low. Therefore, the pre-analysis result can be that the probability that the communication data is unencrypted data is greater than a preset probability threshold. In this manner, the probability that the communication data is encrypted is indicated by the information entropy, and the probability threshold can be the entropy threshold.
[0099] It can be seen that by obtaining the information entropy of the communication data and generating a pre-analysis result based on the comparison result between the information entropy of the communication data and the entropy threshold, it is possible to make a preliminary judgment on whether the communication data is encrypted data, and then determine the encryption possibility of the communication data (that is, the possibility that the communication data is encrypted data).
[0100] When the information entropy is greater than or equal to the entropy threshold, the pre-analysis results indicate a high likelihood of encryption of the communication data. At this point, the data encryption discrimination model can be invoked for further analysis, thereby more accurately determining whether the communication data is encrypted. Combining this with machine learning when the likelihood of encryption is high can primarily address the following issues: On the one hand, in entropy-based discrimination, even if the communication data is not encrypted, the data itself has a certain degree of randomness, resulting in a relatively high corresponding entropy, potentially misclassifying non-encrypted data as encrypted. On the other hand, the entropy of encrypted data may vary depending on the encryption method, potentially misclassifying encrypted data as non-encrypted based on the entropy, and failing to accurately identify all encrypted data. The data encryption discrimination model in the embodiments of the present application, however, can be trained to learn the characteristics of encrypted data under different encryption methods, making it applicable to any communication data and highly compatible with encryption detection processing for encrypted data corresponding to various encryption methods. Therefore, compared with directly judging it as encrypted data based on information entropy, this scheme is based on the combination of information entropy and the encryption judgment model obtained by machine learning, which can further improve the accuracy of judging encrypted data and thus improve the effectiveness of encrypted data detection.
[0101] S304: When the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, a data encryption discrimination model is called to extract data features from the communication data.
[0102] In one embodiment, the process of obtaining a data encryption discrimination model through training based on machine learning may include the following steps S1 to S3.
[0103] Step S1: Acquire a training sample set, where the training sample set includes at least one encrypted communication sample data and at least one unencrypted communication sample data.
[0104] In the training sample set, each encrypted communication sample data corresponds to one unencrypted communication sample data. Any encrypted communication sample data is obtained by encrypting the corresponding unencrypted communication sample data. For example, unencrypted communication sample data Q can be encrypted to obtain encrypted communication sample data Q'. Both the unencrypted communication sample data Q and the encrypted communication sample data Q' can be used as communication sample data in the training sample set.
[0105] In one implementation, the unencrypted communication sample data in the training sample set can generally include actual communication data collected during real communications and simulated communication data obtained through simulated communications. Depending on the data source, it can specifically include one or more of the following: simulated communication data, actual communication data, standard communication data, and merged communication data. Model communication data is obtained by performing communication simulation on a simulated communication system; actual communication data is obtained by performing real communication on a real communication system; standard communication data is randomly generated data that conforms to communication standards; and merged communication data is obtained by merging at least two existing unencrypted communication sample data.
[0106] Illustratively, the unencrypted communication sample data can be non-encrypted satellite communication data. Each unencrypted communication sample data may include: simulated communication data generated using a simulated satellite communication system (such as computer software or hardware emulation of a satellite communication system); actual satellite communication data collected after actual communication using a real satellite communication system (such as using a real satellite communication system inside or outside a laboratory); communication data compliant with satellite communication standards simulated using a data generator (such as a computer program for generating a large amount of random data); data extracted from an existing database or a large amount of data generated by merging multiple databases. The encrypted communication sample data can be obtained by encrypting one or more of the following: simulated communication data, actual communication data, standard communication data, and merged communication data.
[0107] In order to enable the data encryption discrimination model to accurately discriminate encrypted data under various encryption methods, for the construction of the training sample set, we can first obtain a large amount of unencrypted communication sample data, and then use different encryption methods and different encryption strengths to encrypt each unencrypted communication sample data to obtain encrypted communication sample data, and then add each encrypted communication sample data and each unencrypted communication sample data to the training sample set.
[0108] Different encryption methods are used to encrypt the same unencrypted communication sample data, resulting in different encrypted communication sample data. For example, unencrypted communication sample data Q is encrypted using symmetric encryption and asymmetric encryption to obtain encrypted communication sample data Q1' and encrypted communication sample data Q2'. Based on the different encryption methods, Q1' and Q2' are different. Among them, the encryption methods used to encrypt the unencrypted communication sample data may include one or more of the following: symmetric encryption (such as AES, DES), asymmetric encryption (such as RSA), hash encryption (such as SHA-256), digital signature, hybrid encryption, etc. When using the above encryption methods for encryption processing, the encryption strength can be further set to obtain richer and more diverse encrypted communication sample data.
[0109] The model is trained based on various types of communication sample data (including encrypted communication sample data and unencrypted communication sample data) contained in the training sample set. The diversity of communication sample data can improve the model training effect and obtain a better generalized data encryption discrimination model, thereby improving the accuracy of the data encryption discrimination model in judging whether the communication data is encrypted.
[0110] Step S2: extracting respective sample features from each encrypted communication sample data, and extracting respective sample features from each unencrypted communication sample data.
[0111] For each communication sample data in the training sample set, feature extraction processing is required to obtain the sample features of each communication sample data, that is, the sample features of each encrypted communication sample data and the sample features of each unencrypted communication sample data. There are corresponding differences between the sample features of encrypted communication sample data and the sample features of unencrypted communication sample data. The sample features of any encrypted communication sample data can be used to reflect the encryption method of the encrypted communication sample data, and the sample features of any unencrypted communication sample data can be used to reflect the original information of the unencrypted communication sample data. Based on the sample features, the communication sample data before and after encryption can be distinguished. Schematically, the sample features are the values of certain statistics (such as mean, variance, correlation coefficient, etc.). The values of the statistics of the same communication sample data before and after encryption will show obvious changes.
[0112] In one embodiment, the logic for performing feature extraction processing on any communication sample data (including encrypted communication sample data or unencrypted communication sample data) in the training sample set may be as shown in (1)-(3) below.
[0113] (1) Performing feature analysis on each encrypted communication sample data to obtain the initial features of each encrypted communication sample data, and performing feature analysis on each unencrypted communication sample data to obtain the initial features of each unencrypted communication sample data.
[0114] During feature analysis, certain statistics of the communication sample data (such as mean, variance, correlation coefficient, etc.) can be analyzed, or feature extraction methods (such as Fourier transform, wavelet transform, etc.) can be used to extract features of the communication sample data. The communication sample data can be analyzed in different dimensions to obtain initial features of the communication sample data. These initial features can be used to express information about the communication sample data in multiple dimensions. The initial features may contain unnecessary information, resulting in a certain degree of information redundancy. For example, the initial features may include some unnecessary eigenvalues to represent the data, and based on these initial features, it is not possible to accurately express whether the communication sample data is encrypted. Therefore, it is necessary to further extract features from the initial features that can accurately indicate whether the data is encrypted.
[0115] (2) extracting a target feature from the initial feature of any communication sample data based on a feature difference between the initial feature of the encrypted communication sample data and the initial feature of the corresponding unencrypted communication sample data, wherein the target feature is used to distinguish the encrypted communication sample data from the corresponding unencrypted communication sample data.
[0116] Since data encryption may change the original structure of the data or the information contained therein, for example, by adding some identification information or file headers through encryption, the expression of features before and after encryption may be affected. Therefore, the target features can be extracted from the initial features based on the feature differences between the initial features corresponding to the communication sample data before and after encryption. The feature differences can be used to reflect the changes in the initial features before and after encryption, and whether the feature differences are obvious can be determined based on the feature differences and the difference threshold. The features with more obvious feature differences before and after encryption of the communication sample data are used as target features, and based on the target features, the encrypted communication sample data and the corresponding unencrypted communication sample data can be distinguished. Specifically, the target features of the encrypted communication sample data can be extracted from the initial features of the encrypted communication sample data, and the target features of the unencrypted communication sample data can also be extracted from the initial features of the unencrypted communication sample data. It can be seen that the above feature analysis can determine which features are most capable of distinguishing data before and after encryption.
[0117] In one implementation, the target feature can be directly used as a sample feature of any communication sample data to train the model. In another implementation, to facilitate processing and analysis, the target feature can be further processed and then used as a sample feature, as shown in (3).
[0118] (3) Perform dimensionality reduction processing on the target features to obtain the sample features of any communication sample data.
[0119] The data dimension of the target feature after dimensionality reduction is smaller than the data dimension of the target feature. Through dimensionality reduction, high-dimensional data can be projected into a low-dimensional space, retaining as much data variance as possible, thereby further reducing the redundant information in the target feature and facilitating subsequent feature-based processing (such as clustering). The dimensionality reduction mentioned above includes but is not limited to: principal component analysis, independent component analysis, etc. If the target feature is extracted from the initial feature of the encrypted communication sample data, then the target feature after dimensionality reduction is the sample feature of the encrypted communication sample data; if the target feature is extracted from the initial feature of the unencrypted communication sample data, then the target feature after dimensionality reduction is the sample feature of the unencrypted communication sample data.
[0120] It can be seen that through feature extraction, the characteristic changes of communication sample data before and after encryption can be mined, and then the features that can effectively distinguish the changes of communication sample data before and after encryption can be extracted. Subsequently, the trained data encryption discrimination model will be used in the prediction of data encryption, which can more accurately extract the data features of the communication data, and then determine whether the communication data is encrypted, thereby realizing effective detection of communication data encryption.
[0121] Step S3: The initial discriminant model is trained according to the sample features of each encrypted communication sample data and the sample features of each unencrypted communication sample data to obtain a trained discriminant model, and the trained discriminant model is used as the data encryption discriminant model.
[0122] In a feasible embodiment, the data encryption discrimination model can be trained based on a supervised approach or an unsupervised approach. The main difference between these two learning approaches is the presence or absence of annotation tags.
[0123] In a supervised approach, any communication sample data in the training sample set carries a label. If the communication sample data is encrypted, the label can be used to indicate that the encrypted communication sample data is encrypted data; if the communication sample data is unencrypted, the label can be used to indicate that the unencrypted communication sample data is unencrypted data. Step S3 specifically includes the following: generating a predicted label for each communication sample data based on the sample features of the corresponding communication sample data, and using the predicted label of each communication sample data and the label of the corresponding communication sample data to train the initial discriminant model.
[0124] Specifically, for any communication sample data, a prediction can be made based on the sample features of the communication sample data to obtain a predicted label for the communication sample data. This predicted label can be used to indicate whether the communication sample data is encrypted data. The communication sample data here can be encrypted or unencrypted. Because the initial discriminant model has limited knowledge of the information contained in the communication sample data before and after encryption during the initial training phase, the generated predicted label may not be accurate. For example, the predicted label for encrypted communication sample data may indicate that the encrypted communication sample data is unencrypted data, while the predicted label for unencrypted communication sample data may indicate that the unencrypted communication sample data is encrypted data. The annotated labels carried by the corresponding communication sample data can be used as supervisory data to optimize the model's learning effect. The supervisory role of the annotated labels is as follows: a classification loss is first constructed based on the difference between the annotated labels and the predicted labels, and then the parameters of the initial discriminant model are updated in a direction that reduces the classification loss until the model converges. Model convergence here includes but is not limited to: the loss of the discriminant model during the training process is minimized; the loss of the discriminant model during the training process is stable, and the loss no longer changes or the change amplitude is less than a preset threshold as the number of training times increases; the training time of the discriminant model reaches the preset training time; the number of iterative training of the discriminant model reaches the preset number of training times; and so on.
[0125] It is understood that training the discriminant model is an iterative process. The feature extraction and label prediction processes can be repeated until the model converges. By continuously updating the model parameters, the model can achieve better feature extraction capabilities and category predictions. Ultimately, a trained discriminant model is obtained and used as a data encryption discriminant model to classify encrypted and non-encrypted data. Common supervised learning algorithms include linear regression, logistic regression, decision trees, random forests, support vector machines, and neural networks. Training the data encryption discriminant model can be implemented using any of these supervised learning algorithms.
[0126] As can be seen, the training sample set for supervised learning algorithms contains known inputs (here, encrypted communication sample data) and corresponding outputs (or target variables, here, labeled labels). The algorithm's goal is to learn the mapping between inputs and outputs, thereby predicting the output corresponding to new inputs in the future. In supervised learning, the algorithm needs to learn how to predict outputs based on inputs, and can adjust model parameters based on the difference between the inputs and the actual outputs to improve prediction accuracy.
[0127] In an unsupervised approach, no communication sample data in the training sample set is labeled. That is, neither the encrypted nor the unencrypted communication sample data carries any labeled labels. Step S3 specifically includes the following: Based on the sample characteristics of each communication sample data, a classification prediction is performed on the corresponding communication sample data, and the classification prediction results are used to train the initial discriminant model.
[0128] In one implementation, the sample features of each communication sample data item may include: the sample features of each encrypted communication sample data item in the training sample set, and the sample features of each unencrypted communication sample data item in the training sample set. Unsupervised learning algorithms may include clustering, dimensionality reduction, anomaly detection, and the like, any of which may be used to train the data encryption discriminant model. Cluster analysis processing is used as an example for illustration.
[0129] Cluster analysis can be performed on each communication sample data in the training sample set based on the characteristics of each sample. By using cluster analysis, each communication sample data can be divided into different categories, with similar data points clustered together to form one category, and dissimilar data points classified into different categories. The clustering results obtained after cluster analysis can include communication sample data of different categories. The categories here can be encrypted data and unencrypted data. Furthermore, for the category of encrypted data, clustering can also be performed according to different encryption methods and / or different encryption strengths. Encrypted communication sample data obtained using the same encryption method and / or encryption strength is clustered into one category, and encrypted communication data obtained using different encryption methods and / or encryption strengths belong to different categories.
[0130] Through cluster analysis, we can find the clustering of encrypted communication sample data and unencrypted communication sample data, and then analyze whether the clustering of communication sample data before and after encryption is different, so as to further determine the characteristic changes of communication sample data after encryption relative to before encryption, so as to determine whether the sample characteristics of communication sample data need to be further optimized in the future.
[0131] As can be seen, in unsupervised learning, the training sample set only contains inputs, without corresponding outputs. The goal of this learning approach is to discover patterns and structure in encrypted communication sample data to better understand and analyze the data. In unsupervised learning, the algorithm needs to learn how to automatically discover structure and patterns in encrypted communication sample data without human intervention or labeling.
[0132] The above-mentioned data encryption discrimination model may include a classification model built using a neural network, and the neural network is, for example, a combination of one or more types of a convolutional neural network, a residual network, a recurrent neural network, etc. This application is not limited to this. Based on the neural network, the complex nonlinear relationship of the data can be learned, and new data can be classified and predicted. Specifically, each communication data can be divided into two categories before and after encryption. In the process of training the neural network, the acquired data set can be divided into a training sample set and a test sample set. The training sample set is first used to train the neural network model, and then the test sample set is used to evaluate the performance of the model. If the prediction accuracy of the model is very high, it means that the model can accurately divide the data into two categories before and after encryption, thereby detecting whether the data source is encrypted.
[0133] In summary, based on the training process of the data encryption discrimination model introduced in steps S1 to S3 above, based on the categories of unencrypted communication sample data and the encryption methods that can be used, different forms of data encryption technology can be used to encrypt a large amount of unencrypted communication sample data of different types and services to obtain encrypted communication sample data. By combining various machine learning methods, the encrypted communication sample data and the unencrypted communication sample data are processed to fully explore the sample features that can express whether the data is encrypted. Based on the sample features of each communication sample data, a data encryption discrimination model with the ability to classify communication data can be obtained, thereby improving the feature extraction capability of the data encryption discrimination model. The data encryption discrimination model can be pre-trained and directly called in the corresponding scenario to ultimately determine whether the communication data is encrypted data or unencrypted data, thereby improving the efficiency of encryption detection of communication data.
[0134] In one feasible embodiment, a discriminant feature library and a data encryption discriminant model can be associated. The discriminant feature library is obtained by extracting features from encrypted communication sample data. The encrypted communication sample data is the communication sample data used in the model training process. The encrypted communication sample data is obtained by encrypting the corresponding unencrypted communication sample data using different encryption methods. The unencrypted communication sample data includes one or more of simulated communication data, actual communication data, standard communication data, and merged communication data.
[0135] Specifically, after the data encryption discrimination model is trained, the data encryption discrimination model can be called to extract features from all encrypted communication sample data to obtain encryption features of each encrypted communication sample data. Compared with the sample features in the training process, the encryption features can more accurately indicate the encryption method and / or encryption strength of the encrypted communication sample data; and then these encryption features can be added to the discrimination feature library as pre-stored discrimination features for subsequent hit detection processing based on feature values. In the process of constructing the discrimination feature library, based on the encrypted communication sample data obtained after encryption processing using different encryption methods for a large amount of unencrypted communication sample data of different types and different services, the constructed discrimination feature library can cover the pre-stored discrimination features corresponding to more diverse encrypted data, and then in the feature search stage, it can ensure as much as possible that the communication data is encrypted data through feature value comparison, thereby achieving effective detection of the communication data.
[0136] The construction of the discriminant feature library is shown in Figure 5a below. The pre-stored discriminant features in this discriminant feature library can be derived by utilizing a combination of various machine learning methods, including but not limited to feature analysis (eliminating irrelevant features), dimensionality reduction (principal component analysis, independent component analysis), clustering (K-means, hierarchical clustering, etc.), and neural networks (multi-layer perceptron, convolutional neural network). This machine learning approach allows feature extraction from encrypted communication sample data, and the extracted encrypted features are added to the discriminant feature library as pre-stored discriminant features.
[0137] Schematically, after a set of communication data is encrypted using a Python program (e.g., OpenSSL, LibreSSL, or other Python encryption programs), it contains many features and labels. Features, such as file headers or identifiable information added during the encryption process, and labels can be used to indicate that the data is encrypted. When constructing a discriminant feature library, the encrypted communication data can first be analyzed using feature analysis methods, such as statistical analysis, Fourier transform, wavelet transform, etc., to extract data features and determine which features can be used to distinguish the data before and after encryption. For example, if analysis reveals that the values of certain statistics change significantly before and after encryption, this may be due to the encryption effect. Therefore, the values of these statistical quantities that have changed significantly can be used as features. Principal component analysis can then be used to reduce the features obtained from this analysis from a high-dimensional space to a low-dimensional space, preserving as much data variance as possible. This results in a lower-dimensional dataset (containing the reduced features) that facilitates subsequent cluster analysis. Cluster analysis can then be used to classify the features in the dataset into different categories, further determining the changes in the features before and after encryption. In summary, feature analysis, dimensionality reduction, and cluster analysis can help determine the different features of data before and after encryption. Among them, the encryption features of encrypted communication sample data can be added to the discriminant feature library.
[0138] In one implementation, the above feature analysis, dimensionality reduction, and clustering processing can be the logic of a data encryption discrimination model obtained based on neural network training, and the data encryption discrimination model can divide each communication data into two categories before and after encryption to achieve binary classification of the input data. In a specific implementation, this can be achieved by comparing with the features in the discrimination feature library.
[0139] S305 , determining a discriminant feature library, and searching the discriminant feature library for a pre-stored discriminant feature that matches the data feature based on the feature value of the data feature and the feature values of each pre-stored discriminant feature in the discriminant feature library.
[0140] In a feasible implementation, the similarity between the data feature and each pre-stored discriminant feature can be calculated based on the feature value of the data feature and the feature value of each pre-stored discriminant feature. Then, based on the similarity between the data feature and each pre-stored discriminant feature, it is determined to search for a pre-stored discriminant feature that matches the data feature in the discriminant feature library.
[0141] Specifically, both the data feature and the pre-stored discriminant feature can be vector representations in the vector space, and the eigenvalue is the numerical value represented by the vector. The similarity between the data feature and each pre-stored discriminant feature in the vector space is calculated based on the eigenvalue, including but not limited to any of the following: Euclidean distance, Manhattan distance, cosine similarity, etc. This application is not limited to this. The calculated similarity can correspond to the corresponding pre-stored discriminant feature. For example, the discriminant feature library contains 100 pre-stored discriminant features, then the corresponding 100 similarities can be calculated between the data feature and these 100 pre-stored discriminant features. Different similarities can be used to reflect the degree of matching between the feature values of the data feature and different pre-stored discriminant features. The greater the similarity, the higher the degree of matching.
[0142] Based on the similarity between the data feature and each pre-stored discriminant feature, searching for a pre-stored discriminant feature that matches the data feature in the discriminant feature library may include any of the following methods ① or ②: ① Comparing the sizes between each similarity and the similarity threshold. If there is a pre-stored discriminant feature with a similarity greater than the similarity threshold, it is determined that a pre-stored discriminant feature that matches the data feature has been found. Otherwise, it is determined that no pre-stored discriminant feature that matches the data feature has been found. ② Determining the maximum similarity from the similarities between the data feature and each pre-stored discriminant feature. If the maximum similarity is greater than a preset threshold, it is determined that a pre-stored discriminant feature that matches the data feature has been found. Otherwise, it is determined that no pre-stored discriminant feature that matches the data feature has been found.
[0143] Schematically, the discriminant feature library contains 100 pre-stored discriminant features, so 100 corresponding similarities can be calculated between the data features, and then the similarity with the largest value can be determined from the 100 similarities, and the size between the similarity and the preset threshold can be compared. When it is greater than the preset threshold, it can be determined that the pre-stored discriminant feature that matches the data feature is found.
[0144] S306: When a matching pre-stored discrimination feature is found, determining that the communication data is encrypted data.
[0145] In one practicable embodiment, if no pre-stored discriminant features matching the data features are found, or if the information entropy is less than or equal to an entropy threshold, the communication data may be determined to be unencrypted data. In one embodiment, after determining whether the communication data is encrypted or unencrypted, the discrimination result for the communication data may be visually displayed. Specifically, this may include: generating a first discrimination result for the communication data when the communication data is determined to be encrypted data; generating a second discrimination result for the communication data when the communication data is determined to be unencrypted data; and displaying an application interface, and displaying the first discrimination result or the second discrimination result in the target format within the application interface.
[0146] The first discrimination result is the result of determining that the communication data is encrypted data, and the second discrimination result is the result of determining that the communication data is unencrypted data. Either discrimination result is generated when the communication data is determined to be encrypted data or unencrypted data. Encryption discrimination of the communication data includes data feature extraction based on a data encryption discrimination model, and feature search based on eigenvalues of the data features and eigenvalues of pre-stored discrimination features. It may also include only preliminary analysis of the likelihood that the communication data is encrypted data based on the information entropy of the communication data, such as a preliminary encryption discrimination based on the information entropy. The application interface is an interface for displaying the discrimination results, and the first discrimination result or the second discrimination result may be displayed in the application. Specifically, after the communication data is determined to be encrypted data, the first discrimination result may be displayed in the application, and after the communication data is determined to be unencrypted data, the second discrimination result may be displayed in the application. The target format may be used to indicate the output format of the discrimination results (including the first discrimination result and the second discrimination result). The target format may include one or more of the following: image, text, table, audio, and video.
[0147] In one embodiment, in addition to outputting the discrimination result in the application interface, other content may be further output based on the discrimination result. ① If the first discrimination result is displayed in the application interface according to the target format, one or both of the current encryption method and the current encryption strength of the communication data are displayed in the application interface. ② If the second discrimination result is displayed in the application interface according to the target format, one or both of the recommended encryption method and the recommended encryption strength that match the security of the communication data are displayed in the application interface.
[0148] The "current encryption method" refers to the encryption method currently used for the communication data, and the "current encryption strength" refers to the encryption strength currently used for the communication data. The "current encryption method" and "current encryption strength" are derived based on an analysis of the communication data's characteristics. The "recommended encryption method" refers to the encryption method recommended for the communication data, and the "recommended encryption strength" refers to the encryption strength recommended for the communication data. The encryption method and encryption strength can also be displayed in a target format, such as video, image, or text. For an example, see the schematic diagram of the output judgment result shown in Figure 5b. The application interface displays information related to satellite communication data A, including the judgment that the satellite communication data is encrypted data, the fact that the encryption method used for the encrypted data is symmetric encryption, and the fact that the encryption strength is low.
[0149] As can be seen, if the communication data is encrypted, the encryption method and / or encryption strength used can also be displayed in the application interface; if the communication data is unencrypted, the recommended encryption method and / or encryption strength for the communication data can also be displayed in the application interface. In the case of unencrypted data, the above content can be output and a recommended encryption scheme for the unencrypted data can be provided. Using this recommended encryption scheme can ensure the security of the encrypted communication data transmission.
[0150] By displaying the discrimination results of the data encryption discrimination model in the form of charts, text, tables, etc., the discrimination results can be presented to the subject intuitively, making it convenient for the subject to quickly understand the detection results, evaluate the hidden dangers in data transmission, and propose effective response measures to ensure data security.
[0151] In one embodiment, security reinforcement can also be performed based on the identification of communication data. Specifically, the following steps are included: when the communication data is determined to be encrypted data, obtaining the current encryption strength of the communication data; comparing the current encryption strength with a preset strength threshold to obtain a comparison result; if the comparison result indicates that the current encryption strength is less than the preset strength threshold, recommending an encryption strength that matches the security of the communication data; and recommending an encryption strength that matches the security of the communication data that is greater than the current encryption strength.
[0152] Specifically, if the communication data is encrypted, the encryption strength of the communication data can be further analyzed to determine the encryption strength used during the encryption process (i.e., the current encryption strength). If the encryption strength is less than a preset strength threshold, it indicates that the current encryption strength used for the communication data is insufficient to ensure the transmission security of the communication data. Therefore, an encryption strength greater than the current encryption strength can be recommended for encryption to meet the required security requirements for the communication data.
[0153] It can be seen that when it is determined that the communication data is encrypted data, based on the analysis of the encrypted data, it can also provide a reference for the transmission security of the communication data, help build a more complete information security protection plan, and provide a powerful tool for data security research and network security analysis according to this plan.
[0154] Based on the above introduction, a machine learning-based communication data processing framework diagram can be provided as shown in Figure 6a. As shown in Figure 6a, it mainly includes: an entropy detection tool module and an encryption detection machine learning module.
[0155] Among them, the entropy detection tool module includes the following sub-modules: ① Data analysis module, which is used to extract transmission data from communication data packets. ② Data processing module, which is used to pre-process the transmission data extracted by the data analysis module, such as deduplication and cleaning. ③ Entropy calculation module, which is used to calculate the information entropy of communication data according to the definition formula of entropy. ④ Judgment module, which calls the data encryption discrimination model produced by the machine learning module to conduct a comprehensive analysis of the communication data to be processed, determine whether the communication data is encrypted, analyze the characteristics of the encrypted data, etc. ⑤ Encryption result display module, which is used to display the results of the analysis of the information entropy of the communication data and the data characteristics of the communication data (if it is encrypted data, the data characteristics correspond to the encryption characteristics) in the form of charts, reports, etc., and provide security recommendations.
[0156] The encryption detection machine learning module (or simply the machine learning module) is used to analyze communication sample data based on machine learning algorithms. For example, it performs feature mining on encrypted communication sample data, classifies encrypted data and non-encrypted data, and can produce a data encryption discrimination model through training for use by the judgment module.
[0157] Based on the detailed functional descriptions of each functional module described above, the following describes the data flow process involved between these modules: First, the data analysis module acquires and analyzes communication data packets to extract the transmission data. These communication data packets can be data packets provided by the target and transmitted within a corresponding communication system, such as satellite communication data packets. By analyzing the satellite communication data packets, the data to be analyzed can be extracted from the satellite communication system, achieving preliminary processing of the data source. The data analysis module sends the extracted transmission data to the data processing module. The data processing module then performs preprocessing on the transmission data, such as data cleaning, formatting, and deduplication, to obtain the communication data. The data processing module then sends this communication data to the entropy calculation module. The entropy calculation module then calculates the information entropy of the communication data and compares it with an entropy threshold. When the information entropy is greater than the entropy threshold, the judgment module can obtain the data encryption discrimination model from the machine learning module, and call the data encryption discrimination model to perform data feature extraction processing on the communication data to obtain the data features of the communication data, and then determine whether the communication data is encrypted data based on the data features of the communication data and the pre-stored discrimination features in the discrimination feature library to obtain the encryption detection result (or discrimination result). The judgment module can send the encryption detection result to the encryption result display module. Finally, the encryption detection result can be displayed by the encryption result display module. Optionally, the display method includes but is not limited to: one or more combinations of images, text, video, audio, etc., for example, the encryption detection result is displayed in the form of a chart or report. In addition, the encryption result display module can also display the security recommendations given.
[0158] The data encryption discrimination model can be pre-trained and stored in the machine learning module. The process of generating the data encryption discrimination model through the machine learning module specifically includes: obtaining encrypted communication sample data and unencrypted communication sample data as a training sample set, then performing feature extraction processing on each communication sample data in the training sample set to obtain the sample features of each communication sample data, and then using the sample features of each communication sample data to train the initial discrimination model to obtain the data encryption discrimination model. The judgment module and the machine learning module can communicate with each other. When the judgment module needs to call the data encryption discrimination model, it can send a request to the machine learning module to call the data encryption discrimination model.
[0159] Furthermore, based on the above framework diagram, a flow chart of processing communication data based on machine learning can be provided as shown in FIG6b. This flow chart combines the various modules in the framework diagram shown in FIG6a for processing. In the overall process, the communication data to be processed can be obtained first, such as a multimedia file (audio, video, pictures, etc.) with a communication standard of DVB-S / S2 / S2X, document data (PDF, Word, Excel, etc.), or database files, web page files, protocol data, etc., and then after processing, the encryption detection result of the communication data can be finally obtained. At the same time, it is given whether the communication data is encrypted, and corresponding data security precautions and security recommendations are given to avoid security risks in the communication data.
[0160] Specifically, the processing flow of each module is as follows: ① The data analysis module first analyzes the communication data packet and extracts the transmission data contained therein. This transmission data includes, but is not limited to, multimedia data (such as text, images, audio and video), document data (such as PDF, Word, and Excel documents), database data, web page data, and protocol data (such as TCP and UDP protocol data). ② The data processing module then performs data deduplication (i.e., removing duplicate data) and data cleaning (removing outliers and missing values) on the output of the data analysis module to obtain the communication data. ③ The entropy calculation module then calculates information entropy and, based on whether the information entropy exceeds a threshold, performs a preliminary analysis of the likelihood that the communication data is encrypted. Depending on the pre-analysis results, appropriate processing is performed. ④ If the information entropy is greater than or equal to the threshold, a pre-trained data encryption discrimination model and a discriminant feature library are used to conduct a comprehensive analysis of the communication data. The encryption result display module then displays the data encryption discrimination model's judgment on the communication data (indicating whether the communication data is encrypted) in the form of charts, text, tables, videos, audio, and other formats. At the same time, the transmission risk can be assessed based on the judgment results and response suggestions can be given. ⑤ If the information entropy is less than the entropy threshold, it is directly determined that the communication data is not encrypted. At the same time, the encryption result display module can be called to display the corresponding results in the same way as the judgment results above.
[0161] When the solution provided in this application is applied to various communication systems (such as satellite communication systems), based on the efficient and accurate detection of communication data, it can timely discover security risks in the communication data, assist in the security assessment of data transmission security risks, and provide a reference for improving the security solution of the communication transmission system.
[0162] The communication data encryption detection method based on machine learning provided in the embodiment of the present application can use machine learning in conjunction with information entropy detection to determine the possibility that the communication data is encrypted data by comparing the information entropy with the entropy threshold. When the possibility that the communication data is encrypted data is high, the data encryption discrimination model obtained by machine learning training is used to extract features of the communication data. After encrypting a large amount of communication data of different types and different services during the training process, machine learning technology is used to mine the features of the encrypted communication data, which can more accurately extract the data features of the communication data. Then, based on the data features, it is possible not only to quickly and effectively determine whether the communication data is encrypted, and achieve efficient detection of whether the communication data is encrypted, but also to reduce the error rate of the communication data, effectively improve the accuracy of determining whether the communication data is encrypted, thereby improving the effectiveness of data encryption detection.
[0163] Next, the communication data encryption detection device based on machine learning involved in the embodiment of the present application is described.
[0164] Please refer to Figure 7, which is a structural diagram of a communication data encryption detection device based on machine learning provided in an embodiment of the present application. The communication data encryption detection device based on machine learning can be set in the computer device provided in the embodiment of the present application, and the computer device can be the terminal device mentioned in the above method embodiment. The communication data encryption detection device based on machine learning shown in Figure 7 can be a computer program (including program code) running in the computer device, and the communication data encryption detection device based on machine learning can be used to execute some or all of the steps in the method embodiment shown in Figure 2. Please refer to Figure 7, the communication data encryption detection device based on machine learning can include the following units:
[0165] An acquisition unit 701 is configured to acquire communication data;
[0166] The processing unit 702 is used to pre-analyze the possibility that the communication data is encrypted data and obtain a pre-analysis result; when the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, call the data encryption discriminant model to extract data features from the communication data; determine a discriminant feature library, which includes multiple pre-stored discriminant features; based on the feature value of the data feature and the discriminant feature value of each of the pre-stored discriminant features, search the discriminant feature library for a pre-stored discriminant feature that matches the data feature; when the matching pre-stored discriminant feature is found, determine that the communication data is encrypted data.
[0167] In one embodiment, the processing unit 702 is specifically used to: obtain the amount of information of the communication data, and determine the information entropy of the communication data based on the amount of information of the communication data; the information entropy is used to indicate the complexity of the communication data, wherein the size of the information entropy is positively correlated with the complexity of the communication data; compare the information entropy with the entropy threshold to obtain a comparison result, and pre-analyze the possibility that the communication data is encrypted data based on the comparison result to obtain a pre-analysis result.
[0168] In one embodiment, the information entropy corresponding to any communication data after encryption processing is greater than the information entropy corresponding to any communication data before encryption processing; if the comparison result indicates that the information entropy of the communication data is greater than or equal to the entropy threshold, then the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than the preset possibility threshold; if the comparison result indicates that the information entropy of the communication data is less than the entropy threshold, then the pre-analysis result indicates that the possibility that the communication data is non-encrypted data is greater than the preset possibility threshold.
[0169] In one embodiment, the acquisition unit 701 is specifically used to: acquire communication data packets from a communication system, and use a data analysis tool to extract transmission data in the communication system from the communication data packets; use a data analysis tool to preprocess the transmission data to obtain communication data; wherein the communication data includes at least one of the following: multimedia data, document data, database data, web page data and protocol data; preprocessing includes at least one of the following: data deduplication and data cleaning.
[0170] In one embodiment, the processing unit 702 is further used to: when determining that the communication data is encrypted data, obtain the current encryption strength of the communication data; compare the current encryption strength with a preset strength threshold to obtain a comparison result; if the comparison result indicates that the current encryption strength is less than the preset strength threshold, recommend an encryption strength that matches the security of the communication data; the encryption strength that matches the security of the communication data is greater than the current encryption strength.
[0171] In one embodiment, the processing unit 702 is further used to: directly determine that the communication data is non-encrypted data when the pre-analysis result indicates that the possibility that the communication data is non-encrypted data is greater than a preset possibility threshold; or determine that the communication data is non-encrypted data when the matching pre-stored discrimination feature is not found.
[0172] In one embodiment, the processing unit 702 is further used to: generate a first judgment result of the communication data when it is determined that the communication data is encrypted data; and generate a second judgment result of the communication data when it is determined that the communication data is unencrypted data; the output unit 703 is used to: display an application interface, and display the first judgment result or the second judgment result in the application interface according to the target format; wherein the target format includes one or more of the following: image, text, table, audio, and video.
[0173] In one embodiment, the output unit 703 is also used to: if the first judgment result is displayed in the application interface according to the target format, then one or both of the current encryption method and the current encryption strength of the communication data are displayed in the application interface; if the second judgment result is displayed in the application interface according to the target format, then one or both of the recommended encryption method and the recommended encryption strength that match the security of the communication data are displayed in the application interface.
[0174] In one embodiment, the acquiring unit 701 is configured to: acquire a training sample set, where the training sample set includes at least one encrypted communication sample data and at least one unencrypted communication sample data;
[0175] The processing unit 702 is used to: extract respective sample features from each encrypted communication sample data, and extract respective sample features from each unencrypted communication sample data; train an initial discriminant model based on the sample features of each encrypted communication sample data and the sample features of each unencrypted communication sample data to obtain a data encryption discriminant model.
[0176] In one embodiment, an encrypted communication sample data corresponds to an unencrypted communication sample data, and any encrypted communication sample data is obtained by encrypting the corresponding unencrypted communication sample data, and any communication sample data includes encrypted communication sample data or unencrypted communication sample data; the processing unit 702 is specifically used to: perform feature analysis processing on each encrypted communication sample data to obtain the initial features of each encrypted communication sample data, and perform feature analysis processing on each unencrypted communication sample data to obtain the initial features of each unencrypted communication sample data; based on the feature difference between the initial features of the encrypted communication sample data and the initial features of the corresponding unencrypted communication sample data, extract the target feature from the initial features of any communication sample data; the target feature is used to distinguish the encrypted communication sample data from the corresponding unencrypted communication sample data; perform dimensionality reduction processing on the target feature to obtain the sample feature of any communication sample data; wherein the data dimension of the target feature after dimensionality reduction is smaller than the data dimension of the target feature.
[0177] In one embodiment, if any communication sample data in the training sample set carries a labeled label; the processing unit 702 is specifically used to: generate a predicted label for the corresponding communication sample data based on the sample characteristics of each communication sample data, and use the predicted label of each communication sample data and the labeled label of the corresponding communication sample data to train the initial discriminant model; if any communication sample data in the training sample set does not have a labeled label; the processing unit 702 is specifically used to: perform classification prediction on the corresponding communication sample data based on the sample characteristics of each communication sample data, and use the classification prediction result to train the initial discriminant model.
[0178] In one embodiment, the discriminant feature library is obtained by extracting features from encrypted communication sample data, wherein the encrypted communication sample data is obtained by encrypting corresponding unencrypted communication sample data using different encryption methods;
[0179] The unencrypted communication sample data includes one or more of the following: simulated communication data, actual communication data, standard communication data, and combined communication data;
[0180] Simulated communication data is obtained by calling a simulated communication system to perform communication simulation processing; actual communication data is obtained by calling a real communication system to perform real communication; standard communication data is randomly generated data that meets the communication standards; merged communication data is obtained by merging at least two existing unencrypted communication sample data.
[0181] In one embodiment, a pre-stored discriminant feature in the discriminant feature library corresponds to an encryption method; the processing unit 702 is specifically used to: when the matching pre-stored discriminant feature is found, determine that the communication data is obtained using the encryption method corresponding to the matching pre-stored discriminant feature, and determine that the communication data is encrypted data.
[0182] In an embodiment of the present application, communication data can be obtained and a pre-analysis can be performed on the possibility that the communication data is encrypted data to obtain a pre-analysis result. The pre-analysis process can determine the probability that the communication data is encrypted data, thereby achieving a preliminary judgment on whether the communication data is encrypted data. When the pre-analysis result indicates that the probability that the communication data is encrypted data is greater than a preset probability threshold, a data encryption discrimination model can be called to extract data features of the communication data. Then, based on the feature values based on the data features and the feature values of each pre-stored discriminant feature in the discriminant feature library, a pre-stored discriminant feature that matches the data features can be searched in the discriminant feature library; and when a pre-stored discriminant feature that matches the data features is found, it can be determined that the communication data is encrypted data. In the above processing process, the possibility that the communication data is encrypted data can be pre-analyzed, data features can be extracted, and other processes can be performed in sequence. Then, matching processing can be performed based on the feature values of the data features and the pre-stored discriminant features, and finally it can be determined whether the communication data is encrypted. This allows for multi-dimensional analysis of communication data, more accurately identifying encrypted data, improving the accuracy of detecting whether communication data is encrypted, and ultimately increasing the effectiveness of encryption detection. When performing encryption detection on massive amounts of communication data, this can be achieved by identifying the likelihood of encryption and selecting data with a higher likelihood of encryption. This data can then be used with a data encryption identification model to perform the final determination of encryption. This improves the overall efficiency of detecting whether communication data is encrypted and ensures the effectiveness of encryption detection.
[0183] Next, the computer device provided in the embodiments of the present application is described.
[0184] The present application also provides a schematic diagram of the structure of a computer device, as shown in Figure 8 . The computer device may include a processor 801, an input device 802, an output device 803, and a memory 804. The processor 801, input device 802, output device 803, and memory 804 are connected via a bus. The memory 804 is used to store a computer program, which includes program instructions. The processor 801 is used to execute the program instructions stored in the memory 804.
[0185] In one embodiment, the computer device may be a computer device in the system shown in FIG1a ; in this embodiment, the processor 801 performs the following operations by running the executable program code in the memory 804: obtaining communication data, and pre-analyzing the possibility that the communication data is encrypted data to obtain a pre-analysis result; when the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, calling a data encryption discriminant model to extract data features from the communication data; determining a discriminant feature library, the discriminant feature library including a plurality of pre-stored discriminant features; based on the feature value of the data feature and the discriminant feature value of each of the pre-stored discriminant features, searching the discriminant feature library for a pre-stored discriminant feature that matches the data feature; when the matching pre-stored discriminant feature is found, determining that the communication data is encrypted data.
[0186] In one embodiment, the processor 801 is specifically used to: obtain the amount of information of the communication data, and determine the information entropy of the communication data based on the information amount of the communication data; the information entropy is used to indicate the complexity of the communication data, wherein the size of the information entropy is positively correlated with the complexity of the communication data; compare the information entropy with the entropy threshold to obtain a comparison result, and pre-analyze the possibility that the communication data is encrypted data based on the comparison result to obtain a pre-analysis result.
[0187] In one embodiment, the information entropy corresponding to any communication data after encryption processing is greater than the information entropy corresponding to any communication data before encryption processing; if the comparison result indicates that the information entropy of the communication data is greater than or equal to the entropy threshold, then the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than the preset possibility threshold; if the comparison result indicates that the information entropy of the communication data is less than the entropy threshold, then the pre-analysis result indicates that the possibility that the communication data is non-encrypted data is greater than the preset possibility threshold.
[0188] In one embodiment, the processor 801 is specifically used to: obtain a communication data packet from a communication system, and extract transmission data in the communication system from the communication data packet; preprocess the transmission data to obtain communication data; wherein, the extraction of the transmission data and the preprocessing of the transmission data are performed using the same data analysis tool, and the communication data includes at least one of the following: multimedia data, document data, database data, web page data and protocol data; the preprocessing includes at least one of the following: data deduplication and data cleaning.
[0189] In one embodiment, the processor 801 is further used to: when determining that the communication data is encrypted data, obtain the current encryption strength of the communication data; compare the current encryption strength with a preset strength threshold to obtain a comparison result; if the comparison result indicates that the current encryption strength is less than the preset strength threshold, recommend an encryption strength that matches the security of the communication data; the encryption strength that matches the security of the communication data is greater than the current encryption strength.
[0190] In one embodiment, the processor 801 is further used to: directly determine that the communication data is non-encrypted data when the pre-analysis result indicates that the possibility that the communication data is non-encrypted data is greater than a preset possibility threshold; or determine that the communication data is non-encrypted data when no matching pre-stored discrimination feature is found.
[0191] In one embodiment, the processor 801 is further used to: generate a first judgment result of the communication data when it is determined that the communication data is encrypted data; generate a second judgment result of the communication data when it is determined that the communication data is unencrypted data; the processor 801 is used to call the output device 803: display the application interface, and display the first judgment result or the second judgment result in the application interface according to the target format; wherein the target format includes one or more of the following: image, text, table, audio, video.
[0192] In one embodiment, the processor 801 is used to call the output device 803: if the first judgment result is displayed in the application interface according to the target format, one or both of the current encryption method and the current encryption strength of the communication data are displayed in the application interface; if the second judgment result is displayed in the application interface according to the target format, one or both of the recommended encryption method and the recommended encryption strength that match the security of the communication data are displayed in the application interface.
[0193] In one embodiment, the processor 801 is used to obtain a training sample set, which includes at least one encrypted communication sample data and at least one unencrypted communication sample data; extract respective sample features from each encrypted communication sample data, and extract respective sample features from each unencrypted communication sample data; train an initial discriminant model based on the sample features of each encrypted communication sample data and the sample features of each unencrypted communication sample data to obtain a data encryption discriminant model.
[0194] In one embodiment, an encrypted communication sample data corresponds to an unencrypted communication sample data, and any encrypted communication sample data is obtained by encrypting the corresponding unencrypted communication sample data; any communication sample data includes encrypted communication sample data or unencrypted communication sample data; the processor 801 is specifically used to: perform feature analysis processing on each encrypted communication sample data to obtain the initial features of each encrypted communication sample data, and perform feature analysis processing on each unencrypted communication sample data to obtain the initial features of each unencrypted communication sample data; extract target features from the initial features of any communication sample data based on the feature differences between the initial features of the encrypted communication sample data and the initial features of the corresponding unencrypted communication sample data; the target features are used to distinguish the encrypted communication sample data from the corresponding unencrypted communication sample data; perform dimensionality reduction processing on the target features to obtain sample features of any communication sample data; wherein the data dimension of the target features after dimensionality reduction is smaller than the data dimension of the target features.
[0195] In one embodiment, if any communication sample data in the training sample set carries a labeled label; the processor 801 is specifically used to: generate a predicted label for the corresponding communication sample data based on the sample characteristics of each communication sample data, and use the predicted label of each communication sample data and the labeled label of the corresponding communication sample data to train the initial discriminant model; if any communication sample data in the training sample set does not have a labeled label; the processor 801 is specifically used to: perform classification prediction on the corresponding communication sample data based on the sample characteristics of each communication sample data, and use the classification prediction result to train the initial discriminant model.
[0196] In one embodiment, the discriminant feature library is obtained by extracting features from encrypted communication sample data, wherein the encrypted communication sample data is obtained by encrypting corresponding unencrypted communication sample data using different encryption methods;
[0197] The unencrypted communication sample data includes one or more of the following: simulated communication data, actual communication data, standard communication data, and combined communication data;
[0198] Simulated communication data is obtained by calling a simulated communication system to perform communication simulation processing; actual communication data is obtained by calling a real communication system to perform real communication; standard communication data is randomly generated data that meets the communication standards; merged communication data is obtained by merging at least two existing unencrypted communication sample data.
[0199] In one embodiment, the processor 801 is further used to: when determining that the communication data is encrypted data, obtain the current encryption strength of the communication data; compare the current encryption strength with a preset strength threshold to obtain a comparison result; if the comparison result indicates that the current encryption strength is less than the preset strength threshold, recommend an encryption strength that matches the security of the communication data; the encryption strength that matches the security of the communication data is greater than the current encryption strength.
[0200] In one embodiment, a pre-stored discriminant feature in the discriminant feature library corresponds to an encryption method; the processor 801 is specifically used to: when the matching pre-stored discriminant feature is found, determine that the communication data is obtained using the encryption method corresponding to the matching pre-stored discriminant feature, and determine that the communication data is encrypted data.
[0201] In an embodiment of the present application, communication data can be obtained and a pre-analysis can be performed on the possibility that the communication data is encrypted data to obtain a pre-analysis result. The pre-analysis process can determine the probability that the communication data is encrypted data, thereby achieving a preliminary judgment on whether the communication data is encrypted data. When the pre-analysis result indicates that the probability that the communication data is encrypted data is greater than a preset probability threshold, a data encryption discrimination model can be called to extract data features of the communication data. Then, based on the feature values based on the data features and the feature values of each pre-stored discriminant feature in the discriminant feature library, a pre-stored discriminant feature that matches the data features can be searched in the discriminant feature library; and when a pre-stored discriminant feature that matches the data features is found, it can be determined that the communication data is encrypted data. In the above processing process, the possibility that the communication data is encrypted data can be pre-analyzed, data features can be extracted, and other processes can be performed in sequence. Then, matching processing can be performed based on the feature values of the data features and the pre-stored discriminant features, and finally it can be determined whether the communication data is encrypted. This allows for multi-dimensional analysis of communication data, more accurately identifying encrypted data, improving the accuracy of detecting whether communication data is encrypted, and ultimately increasing the effectiveness of encryption detection. When performing encryption detection on massive amounts of communication data, this can be achieved by identifying the likelihood of encryption and selecting data with a higher likelihood of encryption. This data can then be used with a data encryption identification model to perform the final determination of encryption. This improves the overall efficiency of detecting whether communication data is encrypted and ensures the effectiveness of encryption detection.
[0202] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions. When the processor executes the above program instructions, it can execute the method in the embodiment corresponding to Figures 2 and 3 above. Therefore, it will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computer device, or executed on multiple computer devices located at one location, or, executed on multiple computer devices distributed at multiple locations and interconnected by a communication network.
[0203] According to one aspect of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, so that the computer device can perform the methods described in the embodiments corresponding to FIG. 2 and FIG. 3 , and therefore, will not be described in detail herein.
[0204] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0205] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made in accordance with the claims of the present application are still within the scope covered by the present application.
Claims
1. A communication data encryption detection method based on machine learning, characterized in that: include: Acquiring communication data, and pre-analyzing the possibility that the communication data is encrypted data to obtain a pre-analysis result; When the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, calling a data encryption discrimination model to extract data features from the communication data; Determine a discriminant feature library, wherein the discriminant feature library includes a plurality of pre-stored discriminant features; Based on the feature value of the data feature and the discriminant feature values of each of the pre-stored discriminant features, searching the discriminant feature library for a pre-stored discriminant feature that matches the data feature; When the matching pre-stored distinguishing feature is found, it is determined that the communication data is encrypted data.
2. The method according to claim 1, characterized in that The pre-analysis of the possibility that the communication data is encrypted data to obtain a pre-analysis result includes: Acquiring the information volume of the communication data, and determining the information entropy of the communication data according to the information volume of the communication data; Comparing the information entropy with the entropy threshold to obtain a comparison result; Based on the comparison result, the possibility that the communication data is encrypted data is pre-analyzed to obtain a pre-analysis result.
3. The method according to claim 1 or 2, characterized in that The information entropy corresponding to any communication data after encryption is greater than the information entropy corresponding to any communication data before encryption; If the comparison result indicates that the information entropy of the communication data is greater than or equal to the entropy threshold, then the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold; If the comparison result indicates that the information entropy of the communication data is less than the entropy threshold, then the pre-analysis result indicates that the possibility that the communication data is unencrypted data is greater than a preset possibility threshold.
4. The method according to any one of claims 1 to 3, characterized in that: The acquiring of communication data comprises: Acquire a communication data packet from a communication system, and extract transmission data in the communication system from the communication data packet using a data analysis tool; Preprocessing the transmission data using the data analysis tool to obtain communication data; The communication data includes at least one of the following: multimedia data, document data, database data, web page data and protocol data; and the preprocessing includes at least one of the following: data deduplication and data cleaning.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When determining that the communication data is encrypted data, obtaining the current encryption strength of the communication data; Comparing the current encryption strength with a preset strength threshold to obtain a comparison result; If the comparison result indicates that the current encryption strength is less than the preset strength threshold, an encryption strength that matches the security of the communication data is recommended; and the encryption strength that matches the security of the communication data is greater than the current encryption strength.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the pre-analysis result indicates that the possibility that the communication data is non-encrypted data is greater than a preset possibility threshold, directly determining that the communication data is non-encrypted data; or, When the matching pre-stored distinguishing feature is not found, it is determined that the communication data is non-encrypted data.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When it is determined that the communication data is encrypted data, a first discrimination result of the communication data is generated; when it is determined that the communication data is unencrypted data, a second discrimination result of the communication data is generated; An application interface is displayed, and the first discrimination result or the second discrimination result is displayed in the application interface according to a target format; wherein the target format includes one or more of the following: image, text, table, audio, and video.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: If the first discrimination result is displayed in the application interface according to the target format, one or both of the current encryption mode and the current encryption strength of the communication data are displayed in the application interface; If the second discrimination result is displayed in the application interface according to the target format, one or both of a recommended encryption method and a recommended encryption strength matching the security of the communication data are displayed in the application interface.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Acquire a training sample set, wherein the training sample set includes at least one encrypted communication sample data and at least one unencrypted communication sample data; Extracting respective sample features from each encrypted communication sample data, and extracting respective sample features from each unencrypted communication sample data; The initial discriminant model is trained according to the sample features of each encrypted communication sample data and the sample features of each unencrypted communication sample data to obtain a data encryption discriminant model.
10. The method according to any one of claims 1 to 9, characterized in that: One encrypted communication sample data corresponds to one unencrypted communication sample data, and any encrypted communication sample data is obtained by encrypting the corresponding unencrypted communication sample data; Any communication sample data includes encrypted communication sample data or unencrypted communication sample data; and a method for extracting sample features of any communication sample data includes: Performing feature analysis on each encrypted communication sample data to obtain initial features of each encrypted communication sample data, and performing feature analysis on each unencrypted communication sample data to obtain initial features of each unencrypted communication sample data; Extracting a target feature from the initial feature of any one of the communication sample data according to a feature difference between the initial feature of the encrypted communication sample data and the initial feature of the corresponding unencrypted communication sample data, wherein the target feature is used to distinguish the encrypted communication sample data from the corresponding unencrypted communication sample data; Perform dimensionality reduction processing on the target feature to obtain sample features of any communication sample data.
11. The method according to any one of claims 1 to 10, characterized in that: If any communication sample data in the training sample set carries a label; the initial discriminant model is trained according to the sample features of each encrypted communication sample data and the sample features of each unencrypted communication sample data, including: generating a prediction label of the corresponding communication sample data according to the sample features of each communication sample data, and training the initial discriminant model using the prediction label of each communication sample data and the label label of the corresponding communication sample data; If any communication sample data in the training sample set does not have a labeled label; the initial discriminant model is trained according to the sample characteristics of each encrypted communication sample data and the sample characteristics of each unencrypted communication sample data, including: classifying and predicting the corresponding communication sample data according to the sample characteristics of each communication sample data, and using the classification prediction results to train the initial discriminant model.
12. The method according to any one of claims 1 to 11, characterized in that: The discriminant feature library is obtained by extracting features from encrypted communication sample data, wherein the encrypted communication sample data is obtained by encrypting corresponding unencrypted communication sample data using different encryption methods; The unencrypted communication sample data includes one or more of the following: simulated communication data, actual communication data, standard communication data, and combined communication data; The simulated communication data is obtained by calling a simulated communication system to perform communication simulation processing; the actual communication data is obtained by calling a real communication system to perform real communication; the standard communication data is randomly generated data that meets the communication standard; the merged communication data is obtained by merging at least two existing unencrypted communication sample data.
13. The method according to any one of claims 1 to 12, characterized in that: A pre-stored discriminant feature in the discriminant feature library corresponds to an encryption method; when the matching pre-stored discriminant feature is found, determining that the communication data is encrypted data includes: When the matching pre-stored distinguishing feature is found, it is determined that the communication data is obtained by using the encryption method corresponding to the matching pre-stored distinguishing feature, and the communication data is determined to be encrypted data.
14. A communication data encryption detection device based on machine learning, characterized in that: include: An acquisition unit, used for acquiring communication data; a processing unit, configured to pre-analyze the possibility that the communication data is encrypted data to obtain a pre-analysis result; and when the pre-analysis result indicates that the possibility that the communication data is encrypted data is greater than a preset possibility threshold, call a data encryption discrimination model to extract data features from the communication data; Determine a discriminant feature library, wherein the discriminant feature library includes a plurality of pre-stored discriminant features; based on the feature value of the data feature and the discriminant feature values of each of the pre-stored discriminant features, search the discriminant feature library for a pre-stored discriminant feature that matches the data feature; when the matching pre-stored discriminant feature is found, determine that the communication data is encrypted data.
15. A computer device, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the communication data encryption detection method based on machine learning as described in any one of claims 1 to 13 is executed.
16. A computer-readable storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by the processor, the communication data encryption detection method based on machine learning as described in any one of claims 1-13 is executed.
17. A computer program product, characterized in that The computer program product includes a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the communication data encryption detection method based on machine learning as described in any one of claims 1-13.
