A threat detection method, apparatus and system
Patent Information
- Application Number
- CN202110363637.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-02
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-04-02
AI Technical Summary
但是,目前对数据进行威胁检测的过程不够完备,导致威胁检测结果不够安全和可靠
Smart Images

Figure CN115168841B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of security technology, and in particular to a threat detection method, apparatus and system. Background Technology
[0002] With the development of the Internet and the Internet of Things, massive amounts of data have brought great convenience to people's work and life. However, these data usually contain users' privacy and sensitive information. In-depth analysis of these data may lead to the mining and abuse of users' privacy. Therefore, the massive amounts of data generated also bring great security risks to users.
[0003] To provide users with better security protection, threat detection is performed on the data collected by communication devices. However, the current threat detection process is not comprehensive enough, resulting in threat detection results that are not secure or reliable enough.
[0004] Therefore, there is an urgent need to provide a threat detection method that can more comprehensively and securely detect threats from the data to be detected. Summary of the Invention
[0005] Based on this, embodiments of this application provide a threat detection method, apparatus, and system to achieve more comprehensive, secure, and reliable threat detection, thereby enhancing user privacy protection.
[0006] In a first aspect, embodiments of this application provide a threat detection method. This method may include, for example, determining a first detection result based on a first data feature and a first decision tree of the data to be detected, and determining a second detection result based on a second data feature and a second decision tree of the data to be detected. Then, based on the first and second detection results, a target detection result is determined. This target detection result is used to characterize the threat level information of the data to be detected, and the threat level information can be used to measure the possibility that the data to be detected is threatening or illegal. The first data feature is a data feature extracted from the data to be detected, the second data feature is a data feature extracted from the data to be detected (data collected from a communication device), the second data feature and the first data feature satisfy a first functional relationship, and the second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree. In this way, the data to be detected is transformed into multiple data features and stored separately. The privacy-preserving decision tree obtained during training is transformed into multiple decision trees. Thus, when detecting the data to be detected, the detection results can be determined based on the transformed decision trees and transformed data features. The multiple detection results are then used to determine the target detection result that can characterize the threat level information of the data to be detected. In this way, privacy protection is achieved at each stage of the threat detection process, and the threat detection of the data to be detected is performed more comprehensively, thereby improving the security and reliability of user privacy protection.
[0007] In one possible implementation, the process of training the decision tree may include, for example,: determining the first gradient of a fifth decision tree based on the first sample and the initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; determining the second gradient of a sixth decision tree based on the second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; updating the initial decision tree based on the first and second gradients, and returning to perform the same steps: determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree, and determining the second gradient of the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree meets a preset condition; and determining the initial decision tree that meets the preset condition as the fourth decision tree. In this way, federated learning technology can be used for model training without sending one's own data, avoiding the leakage of user data and improving the security of model training. Moreover, multiple parties use their own data to train sub-models, and one party securely aggregates the sub-models trained by each party to obtain a jointly trained machine learning model. During this process, the joint training scheme continuously iterates to train a fourth decision tree usable in subsequent actual detection processes, improving the security of samples, models, etc., during model training.
[0008] As an example, in this implementation, determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree can include: determining the fifth decision tree based on the first sample, the differential privacy algorithm, and the initial decision tree; calculating the gradient of the fifth decision tree, denoted as the first gradient. This introduces random perturbation during decision tree training, i.e., using the differential privacy algorithm to prevent attackers from intercepting the model, thus improving the security of the trained decision tree.
[0009] As another example, in this implementation, determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree can include: determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree; updating the first gradient based on a first random mask, wherein the value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update, and the first random mask is used to cancel out the second random mask used when determining the second gradient. Thus, by introducing a masking technique—that is, adding a random mask to the calculated gradient—attacks are prevented from inferring user data or the model from intercepted gradients, thereby improving the security of the trained decision tree.
[0010] In one possible implementation, before determining the first detection result based on the first data features and the first decision tree of the data to be detected, and before determining the second detection result based on the second data features and the second decision tree of the data to be detected, the method may further include: determining a third decision tree based on a privacy-preserving algorithm and a fourth decision tree, and then determining the first and second decision trees based on the third decision tree. The privacy-preserving algorithm is used to protect the privacy of the fourth decision tree; for example, the privacy-preserving algorithm may be a garbled circuit (GC) algorithm or a secure multiparty computation (MPC) algorithm. In this way, by protecting the privacy of the trained decision tree and transforming the privacy-preserving decision tree into multiple decision trees, and using the transformed multiple decision trees for threat detection, the security of the threat detection process is improved.
[0011] As an example, for the case where the privacy protection algorithm is an obfuscated circuit algorithm, the method may further include: determining the obfuscated circuit, the seed of the obfuscated circuit, and decryption information. Then, the above-mentioned determination of the first detection result based on the first data features and the first decision tree of the data to be detected may include: obtaining the first detection result based on the first data features, the first model data of the obfuscated circuit, the obfuscated circuit, and the seed. Similarly, the above-mentioned determination of the second detection result based on the second data features and the second decision tree of the data to be detected may include: obtaining the second detection result based on the second data features, the second model data of the obfuscated circuit, the obfuscated circuit, and the seed, where the second model data and the first model data satisfy a second functional relationship. Therefore, the above-mentioned determination of the target detection result based on the first and second detection results may include: determining the target detection result of the data to be detected based on the first detection result, the second detection result, the decryption information, and the third decision tree. As can be seen, by using a privacy-preserving decision tree with a confusing circuit algorithm to perform threat detection on the data to be detected, and transforming the decision tree to obtain multiple decision trees, multiple parties that secretly share data features can use these multiple decision trees to perform threat detection separately. Finally, one party integrates the detection results of multiple parties to obtain the target detection result that represents the degree of illegality of the data to be detected. In this way, the detection stage fully utilizes the security design of each stage in the embodiments of this application. As a whole process, the threat detection process can more comprehensively and effectively resist attacks.
[0012] As another example, for the case where the privacy protection algorithm is a secure multi-party algorithm, the method for determining the first detection result based on the first data features of the data to be detected and the first decision tree may include: determining the first intermediate result corresponding to each node of the first decision tree based on the first data features and the threshold corresponding to each node of the first decision tree; determining the second intermediate result corresponding to each maximum depth leaf node of the first decision tree based on the first intermediate result corresponding to each node of the first decision tree and the second parameter corresponding to each maximum depth leaf node of the first decision tree, where the second parameter is the weight corresponding to each maximum depth leaf node of the first decision tree; and determining the first detection result based on the second intermediate result corresponding to each maximum depth leaf node of the first decision tree. Similarly, the above-mentioned determination of the second detection result based on the second data features and the second decision tree of the data to be detected may include: determining the third intermediate result corresponding to each node of the second decision tree based on the threshold corresponding to each node of the second decision tree; determining the fourth intermediate result corresponding to each leaf node of the second decision tree based on the third intermediate result corresponding to each node of the second decision tree and the third parameter corresponding to each leaf node of the second decision tree with the maximum depth, where the third parameter is the weight corresponding to each leaf node of the second decision tree with the maximum depth; and determining the second detection result based on the third intermediate result corresponding to each leaf node of the second decision tree with the maximum depth. It can be seen that by using a privacy-preserving decision tree from a secure multi-party algorithm to perform threat detection on the data to be detected, and transforming the decision tree to obtain multiple decision trees, multiple parties that secretly share data features can use these multiple decision trees to perform threat detection separately. Finally, one party integrates the detection results of multiple parties to obtain a target detection result representing the likelihood of the data to be detected being illegal. Thus, this detection stage fully utilizes the security design of each stage in the embodiments of this application. As a whole process, this threat detection process can more comprehensively and effectively resist attacks.
[0013] In one scenario, the threat detection method provided in this application embodiment can be executed by a physical entity, which may include multiple units, each unit being used to execute corresponding steps. The physical entity may be, for example, the threat detection device of the second aspect.
[0014] In another scenario, the threat detection method provided in this application embodiment can also be executed by a threat detection system. This threat detection system may include multiple physical entities, each physical entity may correspond to a server, and each server is used to perform corresponding operations. This threat detection system may be, for example, a third-party threat detection system.
[0015] Secondly, embodiments of this application also provide a threat detection device, which may include: a first determining unit, a second determining unit, and a third determining unit. The first determining unit is used to determine a first detection result based on a first data feature and a first decision tree of the data to be detected, wherein the first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a communication device; the second determining unit is used to determine a second detection result based on a second data feature and a second decision tree of the data to be detected, wherein the second data feature is a data feature extracted from the data to be detected, the second data feature and the first data feature satisfy a first functional relationship, and the second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree; the third determining unit is used to determine a target detection result based on the first detection result and the second detection result, wherein the target detection result is used to characterize the threat level information of the data to be detected.
[0016] In one possible implementation, the device may further include a fourth determining unit and a fifth determining unit. The fourth determining unit is configured to determine a third decision tree based on a privacy-preserving algorithm and the fourth decision tree before determining a first detection result based on first data features and a first decision tree of the data to be detected, and before determining a second detection result based on second data features and a second decision tree of the data to be detected; wherein the privacy-preserving algorithm is used to protect the privacy of the fourth decision tree. The fifth determining unit is configured to determine the first decision tree and the second decision tree based on the third decision tree.
[0017] In one possible implementation, the device may further include a sixth determining unit, a seventh determining unit, an updating unit, and an eighth determining unit. The sixth determining unit is configured to determine a first gradient of a fifth decision tree based on the first sample and the initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; the seventh determining unit is configured to determine a second gradient of the sixth decision tree based on the second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; the updating unit is configured to update the initial decision tree based on the first and second gradients, and return to performing the determination of the first gradient of the fifth decision tree based on the first sample and the initial decision tree, and the determination of the second gradient of the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree satisfies a preset condition; the eighth determining unit is configured to determine the initial decision tree that satisfies the preset condition as the fourth decision tree.
[0018] As an example, the aforementioned sixth determining unit may include a first determining subunit and a computation subunit. The first determining subunit is used to determine the fifth decision tree based on the first sample, the differential privacy algorithm, and the initial decision tree; the computation subunit is used to calculate the gradient of the fifth decision tree, denoted as the first gradient.
[0019] As another example, the aforementioned sixth determining unit may include a second determining subunit and an updating subunit. The second determining subunit is used to determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree; the updating subunit is used to update the first gradient based on a first random mask, the value of the updated first gradient being determined by the first random mask and the value of the first gradient before the update, wherein the first random mask is used to cancel out the second random mask used when determining the second gradient.
[0020] In one possible implementation, if the privacy protection algorithm is an obfuscated circuit algorithm, the device may further include a ninth determining unit, which is used to determine the obfuscated circuit, the seed of the obfuscated circuit, and decryption information. Then, the aforementioned first determining unit is specifically used to: obtain a first detection result based on first data features, first model data of the obfuscated circuit, the obfuscated circuit, and the seed. The aforementioned second determining unit is specifically used to: obtain a second detection result based on second data features, second model data of the obfuscated circuit, the obfuscated circuit, and the seed, wherein the second model data and the first model data satisfy a second functional relationship. The aforementioned third determining unit is specifically used to: determine the threat level information of the data to be detected based on the first detection result, the second detection result, the decryption information, and a third decision tree.
[0021] In one possible implementation, if the privacy protection algorithm is a secure multi-party algorithm, then the first determining unit in the device may include: a third determining subunit, a fourth determining subunit, and a fifth determining subunit. The third determining subunit is used to determine the first intermediate result corresponding to each node in the first decision tree based on the first data features and the threshold corresponding to each node in the first decision tree. The fourth determining subunit is used to determine the second intermediate result corresponding to each maximum depth leaf node in the first decision tree based on the first intermediate result corresponding to each node in the first decision tree and the second parameter corresponding to each maximum depth leaf node in the first decision tree, where the second parameter is the weight corresponding to each maximum depth leaf node in the first decision tree. The fifth determining subunit is used to determine the first detection result based on the second intermediate result corresponding to each maximum depth leaf node in the first decision tree. Similarly, the second determining unit in the device may include: a sixth determining subunit, a seventh determining subunit, and an eighth determining subunit. The sixth determining subunit is used to determine the third intermediate result corresponding to each node in the second decision tree based on the second data features and the threshold corresponding to each node in the second decision tree; the seventh determining subunit is used to determine the fourth intermediate result corresponding to each maximum depth leaf node in the second decision tree based on the third intermediate result corresponding to each node in the second decision tree and the third parameter corresponding to each maximum depth leaf node in the second decision tree, where the third parameter is the weight corresponding to each maximum depth leaf node in the second decision tree; the eighth determining subunit is used to determine the second detection result based on the third intermediate result corresponding to each maximum depth leaf node in the second decision tree.
[0022] It should be noted that the threat detection device provided in the second aspect corresponds to the method provided in the first aspect. For the specific implementation method and the achieved effect, please refer to the relevant description of the method shown in the first aspect.
[0023] Thirdly, embodiments of this application provide a threat detection system, which may include, for example, a first server, a second server, and a third server. The first server is used to determine a first detection result based on a first data feature of the data to be detected and a first decision tree. The first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a first communication device. The second server is used to determine a second detection result based on a second data feature of the data to be detected and a second decision tree. The second data feature is a data feature extracted from the data to be detected, and the second data feature and the first data feature satisfy a first functional relationship. The second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree. The third server is used to determine a target detection result based on the first and second detection results. The target detection result is used to characterize the threat level information of the data to be detected.
[0024] In one possible implementation, the system may further include a fourth server, which is used to determine a third decision tree based on a privacy-preserving algorithm and a fourth decision tree, and to determine a first decision tree and a second decision tree based on the third decision tree, wherein the privacy-preserving algorithm is used to protect the privacy of the fourth decision tree; the fourth server is also used to send the first decision tree and the second decision tree to the first server and the second server respectively.
[0025] In one possible implementation, the system may further include: a second communication device, a third communication device, and a fifth server, wherein the second communication device is used to determine a first gradient of a fifth decision tree based on a first sample and an initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; the third communication device is used to determine a second gradient of a sixth decision tree based on the second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; the fifth server is used to update the initial decision tree based on the first gradient and the second gradient, and to trigger the second communication device to perform the determination of the first gradient of the fifth decision tree based on the first sample and the initial decision tree, and to trigger the third communication device to perform the determination of the second gradient of the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree meets a preset condition; the fifth server is also used to determine the initial decision tree that meets the preset condition as the fourth decision tree.
[0026] As an example, the aforementioned second communication device is specifically used to: determine a fifth decision tree based on the first sample, the differential privacy algorithm, and the initial decision tree; and calculate the gradient of the fifth decision tree, denoted as the first gradient.
[0027] As another example, the aforementioned second communication device is specifically used to: determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree; update the first gradient based on the first random mask, wherein the value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update, wherein the first random mask is used to cancel out the second random mask used when determining the second gradient.
[0028] In one possible implementation, if the privacy protection algorithm is an obfuscated circuit algorithm, then the second server is further configured to determine the obfuscated circuit, its seed, and decryption information; send the obfuscated circuit and seed to the first server; and send the decryption information to the third server. Specifically, the first server is configured to: obtain a first detection result based on first data features, first model data of the obfuscated circuit, the obfuscated circuit, and the seed. The second server is configured to: obtain a second detection result based on second data features, second model data of the obfuscated circuit, the obfuscated circuit, and the seed, wherein the second model data and the first model data satisfy a second functional relationship. The third server is configured to: determine the threat level information of the data to be detected based on the first detection result, the second detection result, the decryption information, and the third decision tree.
[0029] In one possible implementation, if the privacy-preserving algorithm is a secure multi-party algorithm, then the first server is specifically used to: determine a first intermediate result corresponding to each node in the first decision tree based on the first data features and the threshold corresponding to each node in the first decision tree; determine a second intermediate result corresponding to each leaf node of the first decision tree based on the first intermediate result corresponding to each node in the first decision tree and the second parameter corresponding to each leaf node of the first decision tree with maximum depth, wherein the second parameter is the weight corresponding to each leaf node of the first decision tree with maximum depth; and determine a first detection result based on the second intermediate result corresponding to each leaf node of the first decision tree with maximum depth. The second server is specifically used to: determine a third intermediate result corresponding to each node in the second decision tree based on the second data features and the threshold corresponding to each node in the second decision tree; determine a fourth intermediate result corresponding to each leaf node of the second decision tree with maximum depth based on the third intermediate result corresponding to each node in the second decision tree and the third parameter corresponding to each leaf node of the second decision tree with maximum depth, wherein the third parameter is the weight corresponding to each leaf node of the second decision tree with maximum depth; and determine a second detection result based on the third intermediate result corresponding to each leaf node of the second decision tree with maximum depth.
[0030] In the above embodiments, the third server and the first server can be co-located, or the third server and the second server can be co-located.
[0031] It should be noted that the threat detection system provided in the third aspect corresponds to the method provided in the first aspect. For the specific implementation method and the achieved effect, please refer to the relevant description of the method shown in the first aspect.
[0032] Fourthly, embodiments of this application also provide a network device that may include the threat detection device provided in the second aspect above.
[0033] Fifthly, embodiments of this application also provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect above.
[0034] In a sixth aspect, this application also provides a computer program product, including a computer program or computer-readable instructions, which, when run on a computer, cause the computer to perform the method provided in the first aspect. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0036] Figure 1 This is a schematic diagram of a threat detection process in an embodiment of this application;
[0037] Figure 2a This is a schematic diagram of the structure of a threat detection server 100 according to an embodiment of this application;
[0038] Figure 2b This is a schematic diagram of the structure of a threat detection system 200 according to an embodiment of this application;
[0039] Figure 3 This is a flowchart illustrating the model training phase of the threat detection method in this application embodiment;
[0040] Figure 4 This is a flowchart illustrating the data collection and storage stage of the threat detection method in this application embodiment;
[0041] Figure 5 This is a flowchart illustrating one detection stage of the threat detection method in this application embodiment;
[0042] Figure 6a This is a schematic diagram of the structure of decision tree 2 in the embodiments of this application;
[0043] Figure 6b This is a schematic diagram of the comparison circuit in decision tree 2 in the embodiments of this application;
[0044] Figure 6c This is a schematic diagram of the improved comparison circuit in decision tree 2 in the embodiments of this application;
[0045] Figure 6d Examples of embodiments in this application Figure 6a The circuit diagram of decision tree 2 is shown below;
[0046] Figure 7 This is a flowchart illustrating a threat detection method according to an embodiment of this application;
[0047] Figure 8 This is a flowchart illustrating another threat detection method in an embodiment of this application;
[0048] Figure 9 This is a schematic diagram of the structure of a threat detection device according to an embodiment of this application;
[0049] Figure 10 This is a schematic diagram of the structure of a threat detection system according to an embodiment of this application;
[0050] Figure 11 This is a schematic diagram of the structure of a communication device 1100 in an embodiment of this application;
[0051] Figure 12 This is a schematic diagram of the structure of a communication device 1200 in an embodiment of this application. Detailed Implementation
[0052] Faced with the massive amounts of data generated every moment, data privacy protection is typically necessary to safeguard user information security. Currently, methods for data privacy protection include:
[0053] Method one involves data transformation, where the original data is processed into transformed data, which is then stored and transmitted. This way, even if an attacker exists, they can only obtain the transformed data and not the original data, thus preventing them from gaining access to user privacy and achieving their attack goals. Common data transformation methods include, but are not limited to, hashing, truncation, substitution, and hiding. However, using data transformation to protect privacy results in the loss of some characteristics of the original data, making accurate network traffic analysis impossible and reducing the data's usability.
[0054] Method two involves using differential privacy algorithms or cryptographic techniques for threat detection. Differential privacy algorithms introduce random noise during model training, causing the predicted results from the trained model to deviate from the actual results, thus preventing attackers from inferring data from the predictions and model. However, this method only protects privacy during model training. Cryptographic techniques (such as homomorphic encryption, secure multi-party computation, encrypted Boolean circuits, and secret sharing) encrypt sensitive data to ensure confidentiality during transmission and storage, preventing attackers from obtaining the model by speculating on input samples and outputs. However, this method only protects privacy during data transmission and storage. It is understandable that... Figure 1 As shown, the typical threat detection process can include: model training, data collection, data storage, detection, and result display. Specifically, the detection process refers to using the model trained during model training to perform threat detection on the stored data. It is evident that the target threat detection method only provides privacy protection for one or two stages of the complete threat detection process, failing to provide comprehensive and systematic privacy protection for the entire process. This results in insufficient security and reliability of the threat detection results.
[0055] Based on this, in order to provide a more secure and reliable threat detection method and achieve systematic privacy protection throughout the entire threat detection process, in this embodiment, a first detection result can be determined based on a first data feature and a first decision tree of the data to be detected collected from a communication device; a second detection result can also be determined based on a second data feature and a second decision tree of the data to be detected; then, a target detection result can be determined based on the first and second detection results. Here, the first and second data features are both data features extracted from the data to be detected, the second and first data features satisfy a first functional relationship, the second and first decision trees are decision trees obtained by transforming a third decision tree, and the target detection result is used to characterize the threat level information of the data to be detected. Thus, through the threat detection method provided in this embodiment, the data to be detected is transformed into multiple data features and stored separately, and the privacy-protected decision tree obtained through training is transformed into multiple decision trees. Therefore, when detecting the data to be detected, the detection result can be determined based on the transformed decision tree and the transformed data features, and the target detection result that characterizes the threat level information of the data to be detected can be determined using multiple detection results. In this way, by... Figure 1 Privacy protection is implemented at every stage of the threat detection process, enabling more comprehensive threat detection of the data to be detected, thereby improving the security and reliability of user privacy protection.
[0056] In one scenario, the threat detection method provided in this application embodiment can be executed by a threat detection server, which is a physical entity. This physical entity may include multiple modules, each module executing a corresponding step. For example, see... Figure 2a Assuming the threat detection server 100 may include at least module 101, module 102, and module 103, wherein module 101 is used to determine a first detection result based on a first data feature and a first decision tree of the data to be detected; module 102 is used to determine a second detection result based on a second data feature and a second decision tree of the data to be detected; and module 103 is used to determine a target detection result based on the first detection result and the second detection result. The threat detection server 100 may also utilize the following... Figure 9 The threat detection device 900 shown is implemented, with each module corresponding to a unit within the threat detection device 900. Modules in the threat detection server 100 can be, for example, virtual machines (VMs).
[0057] In another scenario, the threat detection method provided in this application embodiment can also be executed by a threat detection system. This system can include multiple physical entities, each corresponding to a server, and each server is used to perform a corresponding operation. For example, see... Figure 2b Assuming the threat detection system 200 may include at least server 210, server 220, and server 230, wherein server 210 is used to determine a first detection result based on a first data feature and a first decision tree of the data to be detected; server 220 is used to determine a second detection result based on a second data feature and a second decision tree of the data to be detected; and server 230 is used to determine a target detection result based on the first detection result and the second detection result. This threat detection system 200 may also utilize the following... Figure 10 The threat detection system 1000 shown is implemented, and each server corresponds to a server in the threat detection system 1000.
[0058] The data (also referred to as traffic) mentioned in this application embodiment can be data transmitted between clients and collected by the threat detection server 100 or the threat detection system 200, or data transmitted between a client and a server and collected by the threat detection server 100 or the threat detection system 200. For example, the data can be data transmitted between a terminal and a base station and collected by the threat detection server 100 or the threat detection system 200, or data can be data transmitted between a host and a server and collected by the threat detection server 100 or the threat detection system 200. In this case, the threat detection server 100 or the threat detection system 200 can be deployed at the outgoing interface of the data sender or at the incoming interface of the data receiver, and is not limited in this application embodiment.
[0059] For ease of description, the following explanation uses a threat detection system 200, which includes multiple servers, as an example to illustrate the execution of this threat detection method.
[0060] See Figure 2b The threat detection system 200 shown in this embodiment of the application may include servers 210, 220, and 230, as well as communication devices 110, 120, 130, and 240. The communication devices may be network devices such as routers, switches, repeaters, and firewalls, or existing, under development, or future smart wearable devices, smartphones, feature phones, tablets, laptops, desktop computers, minicomputers, mid-range computers, mainframe computers, etc. The servers may be physical server devices or cloud servers capable of performing the corresponding functions. It should be noted that the threat detection system 200 may include any number of communication devices and servers, and is not limited to a specific number. Figure 2b The number shown is not limited to any one device. Furthermore, each communication device can be combined in any combination within a single physical device, and each server can be combined in any combination within a single physical device. As long as the functionality and basic security requirements of the embodiments of this application are not affected, they all fall under the category of threat detection systems applicable to the embodiments of this application.
[0061] In this embodiment, the threat detection process may include: a model training phase, a data collection and storage phase, and a detection phase. The following examples illustrate this process. Figure 2b The threat detection system shown is a network scenario. The process of each stage is illustrated by example to introduce the threat detection method provided in the embodiments of this application.
[0062] For the model training phase:
[0063] In this embodiment, considering that users may not fully trust the server and are unwilling to directly upload user data to it, federated learning (FL) technology is used for model training. This means that multiple communication devices each train a sub-model using their own data, and the server securely aggregates the sub-models trained by each communication device to obtain a jointly trained machine learning model, effectively preventing data leakage. For example, a horizontal federated learning algorithm can be used to complete model training by updating gradients between communication devices and the server, and by performing secure aggregation on the server.
[0064] In the embodiments of this application, the model can be a gradient boosting decision tree or a random forest. The training process of the model will be described below using a gradient boosting decision tree as an example.
[0065] Taking the joint model training of communication devices 110, 120, and 130 with server 240 as an example, a possible model training method 100 in the threat detection process is explained. (See also...) Figure 3 The specific process of method 100 may include, for example, the following steps S101 to S107:
[0066] S101, server 240 sends decision tree 0 to communication device 110, communication device 120 and communication device 130 respectively.
[0067] When S101 is executed for the first time, decision tree 0 can be a smaller decision tree constructed by server 240 according to actual needs, serving as the basis for model training. For example, decision tree 0 can include only one node A, and its depth is 1; or, for another example, decision tree 0 can include node A, node B1, and node B2, where node B1 and node B2 are two leaf nodes of node A, and its depth is 2. During model training, executing one round of S101 to S106 can add at least one layer to the decision tree (i.e., the depth of the decision tree increases by at least one). When S101 is executed again, decision tree 0 can be the decision tree obtained by server 240 after the previous round of training.
[0068] As an example, in S101, server 240 can directly or indirectly send the relevant parameters of decision tree 0 to communication devices 110, 120, and 130. The relevant parameters of decision tree 0 may include, but are not limited to: the nodes included in decision tree 0, the threshold th for each node (except for the leaf node with the maximum depth), the parameters q and w corresponding to the leaf node with the maximum depth. The threshold th indicates the leaf node that should be reached after deciding on the node, parameter q can be used to identify the weight of the leaf node with the maximum depth, and parameter w can be used to identify the threat level information of the leaf node with the maximum depth. The value of parameter w indicates the probability that the data to be detected is illegal data. Taking decision tree 0 as an example, which includes nodes A, B1, and B2, and where nodes B1 and B2 are two leaf nodes of node A, the relevant parameters of decision tree 0 can include: A-th0, B1-(q1 and w1), and B2-(q2 and w2). These parameters indicate that if the value obtained after processing the input data through node A is less than th0, then the data travels from node A to node B1; otherwise, it travels from node A to node B2. When the node reached (i.e., the effective node) is B1 (one of the leaf nodes with the maximum depth), the corresponding weight is q1 and the obtained threat level information is w1; when the node reached is B2, the corresponding weight is q2 and the obtained threat level information is w2. Furthermore, communication devices 110, 120, and 130 can also calculate the gradient a0 corresponding to decision tree 0 based on the received decision tree 0.
[0069] As another example, in S101, server 240 can also send the gradient a0 corresponding to decision tree 0 to communication devices 110, 120 and 130 respectively. In this way, communication devices 110, 120 and 130 can also determine decision tree 0 based on the received gradient a0.
[0070] As another example, in S101, server 240 can also send the relevant parameters of decision tree 0 and the gradient a0 corresponding to decision tree 0 to communication device 110, communication device 120 and communication device 130 respectively.
[0071] It should be noted that regardless of whether the server 240 sends the relevant parameters of decision tree 0 or the gradient a0 corresponding to decision tree 0 to each communication device, each communication device can determine the same decision tree 0.
[0072] During non-first executions of S101, server 240 sends decision tree 0 to each communication device. For example, server 240 may send the optimal gradient a2 of the updated decision tree 0 from S105 to each communication device. The optimal gradient a2 can be determined by server 240 based on the gradient a10 of the updated decision tree 0 and the number of communication devices participating in training; for example, a2 = a10 ÷ 3. Alternatively, server 240 may send decision tree 0 to each communication device. For example, server 240 may determine the optimal decision tree 0' of the updated decision tree 0 from S105 and send the relevant parameters of the optimal decision tree 0' to each communication device. The decision tree 0 constructed by each communication device based on the relevant parameters of the optimal decision tree 0' is the same as the decision tree 0 constructed based on the optimal gradient a2.
[0073] S102, the communication device 110 determines the gradient a11 of the decision tree 11 based on the decision tree 0 and the sample 1, and sends the gradient a11 to the server 240.
[0074] S103, the communication device 120 determines the gradient a21 of the decision tree 21 based on the decision tree 0 and the sample 2, and sends the gradient a21 to the server 240.
[0075] S104, the communication device 130 determines the gradient a31 of the decision tree 31 based on the decision tree 0 and the sample 3, and sends the gradient a31 to the server 240.
[0076] Each communication device uses samples locally collected by that device. A sample refers to the data features corresponding to several data points collected locally by the communication device, along with the threat level information of those data features. To avoid leaking local samples, each communication device trains decision tree 0 based on its own samples. Specifically, communication device 110 trains decision tree 0 based on its local sample 1, communication device 120 trains it based on its local sample 2, and communication device 130 trains it based on its local sample 3. The data features in the samples can be data features corresponding to historical data collected locally by the communication device. The threat level information of the data features in the samples can be labels determined and marked for the data features through models or manually. The data features corresponding to the data can refer to statistical values corresponding to certain indicators of the data over a period of time, such as the number of devices accessed by the data within a certain period.
[0077] Decision tree 11 can be a decision tree with a depth greater than decision tree 0, and it includes all the nodes of decision tree 0; decision tree 21 can be a decision tree with a depth greater than decision tree 0, and it includes all the nodes of decision tree 0; decision tree 31 can be a decision tree with a depth greater than decision tree 0, and it includes all the nodes of decision tree 0. It should be noted that decision trees 11, 21, and 31 can be the same decision tree or different decision trees, depending on the training results obtained from the samples used to train decision tree 0.
[0078] It should be noted that S102, S103 and S104 are implemented in a similar way, only the training samples used are different. The following explanation will take S102 as an example.
[0079] In a specific implementation, S102 may include, for example, S1021, the communication device 110 trains decision tree 0 and obtains decision tree 11 based on the data features in sample 1 and the corresponding threat level information of the data features; S1022, the communication device 110 calculates the gradient a11 of decision tree 11; S1023, the communication device 110 sends the gradient a11 to server 240.
[0080] In some implementations, to improve the security of the trained decision tree, random perturbations can be added during the decision tree training process. This involves using differential privacy algorithms to prevent attackers from intercepting the model. Specifically, S1021 may include: communication device 110 training decision tree 0 based on sample 1 and adding random perturbations to obtain decision tree 11. This results in a difference between the detection results obtained through threat detection using decision tree 11 and the actual threat level information. While this difference does not affect the accuracy of the final threat detection result, it prevents attackers from achieving their attack objectives through inference. The differential privacy (DP) algorithm specifically refers to introducing random perturbations to make the detection results follow a probability distribution. Attackers cannot determine whether a certain data exists in the sample, thus preventing sample-based differential attacks. While ensuring the usability of the sample, it probabilizes the detection results, minimizing data leakage.
[0081] In other implementations, when calculating gradient a11 in S1022, the communication device 110 may also introduce a masking technique. That is, a random mask is added to the calculated gradient to prevent attackers from inferring user data or the model generated on server 240 based on the intercepted gradient. Specifically, S1022 may include: the communication device 110 calculating the gradient a11' of decision tree 11, and determining gradient a11 based on gradient a11', random mask b12, and random mask b13. Among them, random mask b12 can be used to cancel the random mask b21 used by communication device 120 when determining gradient a21, and random mask b13 can be used to cancel the random mask b31 used by communication device 130 when determining gradient a31. For example, gradient a11 = gradient a11' + random mask b12 + random mask b13, gradient a21 = gradient a21' + random mask b21 + random mask b23, gradient a31 = gradient a31' + random mask b31 + random mask b32, where gradient a21' is the value obtained by calculating the gradient of decision tree 21, and gradient a31' is the value obtained by calculating the gradient of decision tree 31. The values are obtained by randomizing the gradients: random mask b12 + random mask b21 = 0, random mask b13 + random mask b31 = 0, and random mask b23 + random mask b32 = 0. In this way, on the one hand, since the random masks included in the gradients transmitted to the server 240 can be completely canceled out, it does not affect the server 240 from obtaining the accurate global gradient a10 based on the received gradients a11, a21, and a31. On the other hand, even if an attacker intercepts gradients a11, a21, a31, and the global gradient a10, they cannot determine the true gradient of the decision tree of each communication device, thus ensuring the security of the decision tree.
[0082] In other implementations, S102 to S104 above can also be replaced with: S102', communication device 110 determines decision tree 11 based on decision tree 0 and sample 1, and sends the relevant parameters of decision tree 11 to server 240; S103', communication device 120 determines decision tree 21 based on decision tree 0 and sample 2, and sends the relevant parameters of decision tree 21 to server 240; S104', communication device 130 determines decision tree 31 based on decision tree 0 and sample 3, and sends the relevant parameters of decision tree 31 to server 240. Thus, S105 below can also be replaced with: S105', server 240 updates decision tree 0 based on the relevant parameters of decision tree 11, decision tree 21, and decision tree 31.
[0083] S105, Server 240 updates decision tree 0 based on gradients a11, a21, and a31.
[0084] As an example, server 240 can determine the global gradient a10 based on the safe aggregation of gradients a11, a21, and a31, and determine a new decision tree 10 based on gradient a10. Therefore, server 240 can use decision tree 10 to update decision tree 0; that is, the updated decision tree 0 is decision tree 10. The updated decision tree 0 can have a depth one greater than the original decision tree 0, and the updated decision tree 0 can include all nodes of the original decision tree 0.
[0085] As another example, server 240 can determine decision trees 11, 21, and 31 based on gradients a11, a21, and a31, respectively. Then, it performs a secure aggregation of decision trees 11, 21, and 31 to determine a new decision tree 10. Thus, server 240 can use decision tree 10 to update decision tree 0; that is, the updated decision tree 0 is decision tree 10. Decision trees 11, 21, 31, and the updated decision tree 0 can all have a depth one greater than the original decision tree 0, and they can include all nodes of the original decision tree 0.
[0086] For example, the original decision tree 0 may include nodes A, B1, and B2, where nodes B1 and B2 are two leaf nodes of node A, and the depth of decision tree 0 is 2. In one case, the updated decision tree 0 may include nodes A, B1, B2, C11, C12, C21, and C22, where nodes C11 and C12 are two leaf nodes of node B1, and nodes C21 and C22 are two leaf nodes of node B2, and the depth of decision tree 0 becomes 3. In another case, the updated decision tree 0 may include nodes A, B1, B2, C11, and C12, where nodes C11 and C12 are two leaf nodes of node B1, and the depth of decision tree 0 becomes 3.
[0087] S106, Server 240 determines whether the updated decision tree 0 meets the preset conditions. If it does, then execute S107; otherwise, return to execute S101.
[0088] S107, server 240 determines the updated decision tree 0 as decision tree 1.
[0089] The preset conditions can also be called the stopping conditions for model training. They are used to indicate the end of model training. When the server 240 determines that the updated decision tree 0 meets the preset conditions, the decision tree 0 can be used as the final result of training. When the server 240 determines that the updated decision tree 0 does not meet the preset conditions, the decision tree 0 needs to be trained. Then, the server returns to execute S101 to S105 to obtain another updated decision tree 0 and continues to determine whether the new updated decision tree 0 meets the preset conditions.
[0090] As an example, the preset conditions may include a decision tree depth threshold. For example, the preset conditions indicate that the maximum depth of the decision tree after model training does not exceed 5. Then, when the server 240 determines that the depth of the updated decision tree 0 is 5, it is considered that the updated decision tree 0 meets the preset conditions, executes S107 and completes model training, and the updated decision tree 0 can be used as the final decision tree 1 obtained in the model training stage.
[0091] As another example, the preset conditions may include a data volume threshold. For example, the preset conditions indicate that the data volume of the leaf nodes at the maximum depth of the decision tree after model training does not exceed 10 megabytes. Then, when the server 240 determines that the data volume allocated to the leaf nodes at the maximum depth of the updated decision tree 0 is less than 10 megabytes, it is considered that the updated decision tree 0 meets the preset conditions, and S107 is executed to complete the model training. The updated decision tree 0 can then be used as the final decision tree 1 obtained in the model training phase.
[0092] It should be noted that, for security reasons, the decision tree 1 obtained by this method 100 can be further protected using a privacy-preserving algorithm to determine decision tree 2. This decision tree 2 is used to complete threat detection of the data to be detected during the detection phase. The privacy-preserving algorithm can be a garbled circuit (GC) algorithm or a secure multiparty computation (MPC) algorithm. The garbled circuit algorithm uses a Boolean circuit approach to construct a secure function for computation, allowing the two servers performing the detection to calculate the detection result for a specific function independently without needing to know the specific input of the other party during the calculation. During the detection process, only ciphertext or random numbers are exchanged, with no leakage of any valid information, thus achieving the computational objective while protecting privacy data. When the privacy-preserving algorithm is a garbled circuit algorithm, it means that each node in decision tree 2 is a garbled circuit protected by the garbled circuit algorithm. For specific implementation details, please refer to [link to implementation details]. Figure 7The corresponding description is as follows: A secure multi-party algorithm refers to a computation that allows at least two servers to collaboratively perform a certain calculation without a trusted third party. This ensures the privacy of the input and the correctness of the calculation, and also provides mathematical proof that the input of each server involved in the computation has not been leaked, even without a trusted third party. When the privacy protection algorithm is a secure multi-party algorithm, it means that the threshold and data features corresponding to the data to be detected at each node in decision tree 2 are shared by multiple trusted servers. The final detection result is obtained through joint calculation by multiple servers, protected by the secure multi-party algorithm. For specific implementation details, please refer to [link to implementation details]. Figure 8 The corresponding description.
[0093] As can be seen, through the above method 100, multiple communication devices and a server in the threat detection system 200 can use federated learning technology to train the model without the communication devices sending their own data to the server, thus avoiding the leakage of user data and improving the security of the model training. Moreover, multiple communication devices use their own data to train sub-models, and the server securely aggregates the sub-models trained by each communication device to obtain a jointly trained machine learning model. In this process, through joint training schemes, masking technology, differential privacy algorithms and other technologies, a decision tree 2 that can be used in subsequent actual detection processes is continuously trained iteratively, which improves the security of samples, models and other components during the model training process.
[0094] For the data acquisition and storage phase:
[0095] In this embodiment of the application, the data to be detected may be data collected from communication device 110, communication device 120, communication device 130 or other communication devices not shown. The following description takes data collected from communication device 110 as the example of the data to be detected.
[0096] In this embodiment of the application, in order to protect the privacy of the data to be detected, the data to be detected cannot be directly stored by the server in plaintext form. Therefore, in order to detect illegal data (or malicious data) in the data to be detected and to intercept it, a secret sharing technology is adopted in the process of collecting and storing the data to be detected. That is, each piece of data to be detected is transformed and distributed and stored on multiple servers.
[0097] Taking the joint collection and storage of data to be detected by communication device 110, server 210, and server 220 as an example, this paper describes a possible data collection and storage method 200 in the threat detection process. (See also...) Figure 4 The specific process of method 200 may include, for example, the following steps S201 to S205:
[0098] Step 201: Threat detection server 100 or threat detection system 200 collects data to be detected from communication device 110.
[0099] Both the threat detection server 100 and the threat detection system 200 can collect data from various data sources using different data collection methods. For example, they can collect traffic through streaming frames or logs through log collection tools (such as the Filebeat plugin).
[0100] In a specific implementation, the threat detection server 100 or threat detection system 200 used to collect the data to be detected from the communication device 110 can be connected to the outgoing interface through which the communication device 110 transmits the data to be detected, or it can be connected to the incoming interface of the next-hop device when the communication device 110 transmits the data to be detected to the next-hop device, thereby completing the collection of the data to be detected.
[0101] S202, the threat detection server 100 or the threat detection system 200 extracts the data features of the data to be detected, and transforms the data features of the data to be detected into first data features and second data features according to the first functional relationship.
[0102] One data feature of the data to be tested can be the statistical value of a preset statistical indicator within a preset time period. The statistical indicator corresponding to the data feature can be set according to actual needs; it can be one or multiple statistical indicators. Extracting the data feature of the data to be tested can, for example, involve statistically analyzing the values of the data under various statistical indicators to obtain the values of each statistical indicator. The data feature of the data to be tested can include the statistical values corresponding to each statistical indicator of the data.
[0103] In some possible implementations, to save computational resources, dimensionality reduction processing of the data to be detected is often performed before extracting the data features, thereby extracting data features from the dimensionality-reduced data. The scale and process of dimensionality reduction can be flexibly designed according to actual needs and are not limited in the embodiments of this application.
[0104] To improve the security of data storage, secret sharing technology was used to de-identify the data to be detected. The data features were transformed to obtain at least two data features, and each data feature was transmitted to multiple servers to instruct the servers to store the received data features respectively.
[0105] The first functional relationship that transforms the data features of the data to be detected into the first data feature and the second data feature can be XOR. For example, the first functional relationship can be a single-bit XOR. Then, after performing a single-bit XOR on the transformed first data feature and the second data feature, the result is the data feature of the data to be detected. Or, for example, if the data feature of the data to be detected is a binary string, the first functional relationship can also be a bitwise XOR. Then, after performing a bitwise XOR on the transformed first data feature and the second data feature, the result is the data feature of the data to be detected.
[0106] S203, the threat detection server 100 or the threat detection system 200 sends the first data feature to the server 210 and the second data feature to the server 220.
[0107] In practice, to ensure the security of the transmission of the first data feature and the second data feature, the first data feature can be encrypted and sent to server 210. Similarly, the second data feature can be encrypted and sent to server 220.
[0108] S204, Server 210 stores the first data feature.
[0109] S205, Server 220 stores the second data feature.
[0110] The above method 200 describes the secure storage of data features corresponding to the data to be detected by two servers (i.e., server 210 and server 220) through secret sharing technology. In other scenarios, the secure storage of data features corresponding to the data to be detected can also be achieved by secret sharing technology of more servers. For example, the threat detection server 100 or the threat detection system 200 can also transform the extracted data features of the data to be detected into third data features, fourth data features and fifth data features according to the third functional relationship, and send the third data features, fourth data features and fifth data features to server 210, server 220 and server 230 respectively, and server 210, server 220 and server 230 store the third data features, fourth data features and fifth data features respectively.
[0111] As can be seen, in this method 200, multiple data features after transformation of the data features corresponding to the data to be detected are stored on multiple servers through secret sharing technology. This ensures that the data features stored on each server do not leak the overall data features of the data to be detected. Only when a sufficient number of servers (usually with a preset threshold, such as 4) are integrated by the attacker can the data features of the data to be detected be obtained. When the number of attacked servers is less than the preset threshold, the attack can be effectively resisted.
[0112] For the detection phase:
[0113] In this embodiment, after the above two stages of preparation, when actually performing threat detection on the data to be detected, considering that the data features of the data to be detected are secretly shared and stored on multiple servers, in order to ensure the security of the threat detection process, the servers participating in the training during the model training stage (such as server 240) can also transform the trained decision tree (such as decision tree 2) and send the transformed decision trees to the multiple servers storing the data features of the data to be detected, so that each server storing the data features of the data to be detected can complete the threat detection by means of the transformed decision tree, and then another server integrates the detection results obtained by each server storing the data features of the data to be detected, effectively preventing the leakage of the data to be detected and the decision tree.
[0114] Taking the joint threat detection of data collected from communication device 110 by servers 240, 210, 220, and 230 as an example, the detection method 300 in the threat detection process is explained. (See also...) Figure 5 The specific process of method 300 may include, for example, the following S301 to S304:
[0115] S301, server 210 determines a first detection result based on the first data features of the data to be detected and decision tree 2', wherein the first data features are data features extracted from the data to be detected.
[0116] S302, server 220 determines a second detection result based on the second data feature of the data to be detected and decision tree 2”, wherein the second data feature is a data feature extracted from the data to be detected, the second data feature and the first data feature satisfy a first functional relationship, and decision tree 2’ and decision tree 2” are decision trees obtained by transforming decision tree 2.
[0117] It should be noted that the relevant descriptions of the first data feature, the second data feature, and the first functional relationship can be found in Method 200 above, and will not be repeated here.
[0118] Before S301 and S302, server 240 can transform the decision tree 2 trained by the above method 100 to obtain decision tree 2' and decision tree 2'", and send decision tree 2' and decision tree 2'" to server 210 and server 220 respectively. The structure of decision tree 2' and decision tree 2'" can be the same as that of decision tree 2. However, for nodes at the same position, the relevant parameters of that node on decision tree 2 can be transformed into the relevant parameters of that node on decision tree 2' and decision tree 2'" through the first functional relationship. Decision tree 2 can be transformed into various different combinations of decision trees through the first functional relationship. However, if it is determined that the decision tree transformed from decision tree 2 through the first functional relationship includes decision tree 2', then the other decision tree transformed from decision tree 2 can be determined as decision tree 2".
[0119] In a specific implementation, S301 may include, for example, server 210 inputting the first data feature into decision tree 2', obtaining the output of decision tree 2', and determining the first detection result based on the output. Similarly, S302 may include, for example, server 220 inputting the second data feature into decision tree 2'", obtaining the output of decision tree 2'", and determining the second detection result based on the output.
[0120] It should be noted that decision tree 2 can be obtained by using a confusing circuit algorithm to protect the privacy of decision tree 1. In this case, the specific implementation of S301 and S302 can be found in the relevant description in method 400 below; or, decision tree 2 can also be obtained by using a secure multi-party algorithm to protect the privacy of decision tree 1. In this case, the specific implementation of S301 and S302 can be found in the relevant description in method 500 below.
[0121] S303, Server 210 and Server 220 respectively send the first detection result and the second detection result to Server 230.
[0122] S304, Server 230 determines the target detection result based on the first detection result and the second detection result. The target detection result is used to characterize the threat level information of the data to be detected.
[0123] Server 230 can be a physical device independent of server 210 and server 220, or server 220 can be co-located with server 210 in the same physical device, or server 230 can be co-located with server 220 in the same physical device.
[0124] As can be seen, in method 300, multiple decision trees are obtained by transforming the privacy-protected decision tree 2, and these decision trees are sent to multiple servers that store data features. This allows multiple servers that secretly share data features to perform threat detection using these multiple decision trees. Finally, a single server integrates the detection results from multiple servers to obtain a target detection result that represents the likelihood of the data to be detected being illegal. In this way, the detection stage fully utilizes the security designs in methods 100 and 200. As a whole process, this enables the threat detection system 200 to defend against attacks more comprehensively and effectively.
[0125] It should be noted that methods 100, 200, and 300, as a whole, constitute a threat detection process that provides protection throughout the entire threat detection process. During the model training phase, it can resist attackers' inference attacks on user data. During the data collection and storage phase, even if an attacker compromises fewer than a preset number of servers used for storage, they will not be able to obtain the data to be detected; that is, it can resist attacks of any form on fewer than a preset number of servers used for storage. During the actual detection phase, even if an attacker compromises fewer than a preset number of servers used for detection, they will not be able to obtain or tamper with the detection results; that is, it can effectively protect fewer than a preset number of servers used for detection from any form of attack.
[0126] In decision tree 2, each node is a comparison circuit or an improved comparison circuit. Assume the structure of decision tree 2 is as follows: Figure 6a As shown, the diagram includes nodes A, B1, B2, C11, C12, C21, and C22. Node A is the root node, nodes B1 and B2 are two leaf nodes of node A, nodes C11 and C12 are two leaf nodes of node B1, and nodes C21 and C22 are two leaf nodes of node B2. Node A can essentially be a comparator circuit (represented as C in the diagram), for example, see [reference needed]. Figure 6b Node A can correspond to a 32-bit comparator circuit, which may include 150 AND gates and 150 NOT gates. The input is two 32-bit strings, and the output is two 1-bit characters. Nodes B1 and B2 can essentially be an improved comparator circuit (represented as M in the diagram), for example, see [link to relevant documentation]. Figure 6c Nodes B1 and B2 can each include a Figure 6bThe comparison circuit shown consists of two AND gates and one NOT gate. The inputs are two 32-bit strings and one 1-bit string, and the outputs are two 1-bit characters. Nodes C11, C12, C21, and C22 are the leaf nodes with the maximum depth in decision tree 2. Nodes C11 and C12 can be the two outputs of node B1, and nodes C21 and C22 can be the two outputs of node B2. Figure 6a The circuit diagram corresponding to decision tree 2 shown can be found in [reference]. Figure 6d As shown, since the final output of decision tree 2 needs to comprehensively consider the output results of the leaf nodes at the maximum depth, after nodes C11, C12, C21 and C22, multiple adder circuits (represented as Adder in the figure) are needed to add the points corresponding to nodes C11, C12, C21 and C22 to obtain an output result, which is the final output result of decision tree 2.
[0127] In some possible implementations, if the privacy protection algorithm traversed by decision tree 2 is a confusing circuit algorithm, taking the joint threat detection of the data to be detected collected from communication device 110 by servers 240, 210, 220, and 230 as an example, such as... Figure 7 As shown, a specific process of a possible detection method 400 may include, for example, the following steps S401 to S406:
[0128] S401, Server 210 determines the obfuscation circuit, the seed of the obfuscation circuit, and decryption information.
[0129] As an example, server 210 can preset security parameters λ and preset circuit f. During actual threat detection, server 210 can input λ and f into the obfuscation circuit generation algorithm (which can be represented as Gb()), and output the seed of the obfuscation circuit, the obfuscation circuit F, and the decryption information d. Here, the seed is used to generate random numbers, which are used to generate the input of the obfuscation circuit F; d is used by server 230 to decrypt the final output of decision tree 2. For example, S401 can be represented as: Gb(λ, f) = (seed, F, d).
[0130] S402, Server 210 obtains the first detection result based on the first data features, the first model data of the obfuscated circuit, the obfuscated circuit, and the seed.
[0131] S403, Server 220 obtains the second detection result based on the second data features, the second model data of the obfuscated circuit, the obfuscated circuit, and the seed, wherein the second model data and the first model data satisfy a second functional relationship.
[0132] S404, Server 210 and Server 220 respectively send the first detection result and the second detection result to Server 230.
[0133] S405, Server 210 sends the decryption information to Server 230.
[0134] S406, Server 230 determines the target detection result of the data to be detected based on the first detection result, the second detection result, the decryption information, and the third decision tree.
[0135] Before S402 and S403, the device that collects the data to be detected (such as server 250) can transform the data features of the data to be detected into a first data feature and a second data feature based on a secret sharing technique (which can be represented as Share()). For example, this transformation process can be represented as: Share(data features of the data to be detected) = (first data feature, second data feature). The generator or owner of decision tree 2 (such as server 240) can transform the model data (which can be understood as the preset value corresponding to the obfuscation circuit F) into first model data and second model data based on the secret sharing technique. For example, this transformation process can be represented as: Share(model data) = (first model data, second model data). The first model data and the second model data can be transformed through a second functional relationship to obtain the model data corresponding to the obfuscation circuit F. This second functional relationship can be, for example, bit-by-bit XOR or single-bit XOR.
[0136] As an example, server 210 can send the obtained obfuscated circuit F and seed seed to server 220 to ensure that server 220 can execute S403.
[0137] As another example, server 220 can also obtain and save the obfuscation circuit F and seed used in S403 through its own calculations, without server 210 sending obfuscation circuit F and seed to server 220, and can still ensure that server 220 can execute.
[0138] In specific implementation, for decision tree 2, server 210 can execute S402, that is, generate result 1 based on the first data feature, the first model data, the obfuscation circuit and the seed; similarly, for decision tree 2, server 220 can execute S403, that is, generate result 2 based on the second data feature, the second model data, the obfuscation circuit and the seed; then, server 210 and server 220 send result 1 and result 2 to server 230 respectively, and server 230 determines result 3 based on result 1 and result 2, thereby determining the target detection result based on result 3 and decryption information.
[0139] Alternatively, server 210 can send result 1 to server 220, which determines result 3 based on result 2 and result 1, and then sends result 3 to server 230. Server 230 then determines the target detection result based on result 3 and the decrypted information. Alternatively, if server 230 is integrated with server 220, server 210 can also send result 1 and the decrypted information to server 220, which determines result 3 based on result 2 and result 1, and then determines the target detection result based on result 3 and the decrypted information. Or, if server 230 is integrated with server 210, server 210 can also send result 1 to server 220, which determines result 3 based on result 2 and result 1, and then sends result 3 to server 210. Server 210 then determines the target detection result based on result 3 and the decrypted information.
[0140] As an example, this can be achieved using an input label generation algorithm (also represented as Gen()). That is, the seed is used as input to Gen(), and servers 210 and 220 obtain the same output label X (i.e., an input to the obfuscation circuit) based on Gen(seed). Thus, server 210 can obtain label X1 based on the first data feature and the first model data, and server 220 can obtain label X2 based on the second data feature and the second model data. It should be noted that an optimized Free XOR protocol is used here, requiring only the generation of δ and 0-labels, reducing the computational load. Next, server 230, server 210, or server 220 can obtain the final output label Y based on the obfuscation circuit calculation function (also represented as Ev()). That is, the obfuscation circuit F, label X1, and label X2 are used as input to Ev(), and the output of Ev() is denoted as label Y, for example, Ev(F, X1, X2) = Y. Finally, server 230 can determine the detection result based on the decryption algorithm (which can also be represented as De()), that is, take the decryption information d and label Y as input to De(), and denote the output of De() as y, for example, it can be represented as: De(d, Y) = y.
[0141] It should be noted that if the semi-honest mode is set, since it cannot be tampered with by attackers, only the least significant bit needs to be transmitted to the server 230 when transmitting label X1, label X2, or label Y, instead of transmitting the entire label, thus saving network resources.
[0142] In other scenarios, method 400 may also involve server 220 determining the obfuscated circuit, the seed of the obfuscated circuit, and decryption information, and server 220 sending the decryption information to server 230.
[0143] As can be seen, in method 400, a privacy-preserving decision tree 2 with a confusing circuit algorithm is used to perform threat detection on the data to be detected. The decision tree 2 is then transformed to obtain multiple decision trees, which are then sent to multiple servers that store data features. This allows multiple servers that secretly share data features to perform threat detection separately using these multiple decision trees. Finally, a single server integrates the detection results from multiple servers to obtain a target detection result that represents the likelihood of the data to be detected being illegal. In this way, the detection stage fully utilizes the security designs in methods 100 and 200. As a whole process, this enables the threat detection system 200 to more comprehensively and effectively resist attacks.
[0144] In some other possible implementations, if the privacy-preserving algorithm traversed by decision tree 2 is a secure multi-party algorithm, then the above... Figure 6a Nodes A, B1, and B2 shown can all be considered as requiring a secure multi-party computation. Taking the example of servers 240, 210, 220, and 230 jointly performing threat detection on the data to be detected collected from communication device 110, as follows... Figure 8 As shown, a specific process of a possible detection method 500 may include, for example, the following steps S501 to S507:
[0145] S501, Server 210, Server 220 and Server 230 respectively store the third data feature, the fourth data feature and the fifth data feature.
[0146] S502, servers 210, 220 and 230 receive decision tree 3, decision tree 4 and decision tree 5 from server 240 respectively.
[0147] In practice, the storage of the data features of the data to be detected and the generator or owner of decision tree 2 can be transformed into three copies using additive sharing under arithmetic operations, and stored on three servers respectively.
[0148] Among them, the device that collects the data to be detected (such as server 250) can transform the data features of the data to be detected into the third data feature, the fourth data feature, and the fifth data feature based on the secret sharing technology (which can be represented as Share()). For example, the transformation process can be represented as: Share(data features of the data to be detected) = (third data feature, fourth data feature, fifth data feature).
[0149] The generator or owner of decision tree 2 (such as server 240) can also transform decision tree 2 into decision tree 3, decision tree 4, and decision tree 5 through a single transformation. Furthermore, server 240 can also transform the thresholds of each node in decision tree 2 to obtain the threshold components corresponding to decision tree 3, decision tree 4, and decision tree 5, and send these threshold components along with the decision trees to the corresponding servers. For example, the structure file of decision tree 2 can be model.json, which can be transformed (or reconstructed) using the reconstruct.py program to obtain a predetermined number (e.g., 3) decision trees with the same structure.
[0150] S503, server 210 determines the first intermediate result corresponding to each node on decision tree 3 based on the third data features and the threshold corresponding to each node on decision tree 3; according to the first intermediate result corresponding to each node on decision tree 3 and the weight q corresponding to each maximum depth leaf node of decision tree 3, it determines the second intermediate result corresponding to each maximum depth leaf node of decision tree 3; thus, according to the second intermediate result corresponding to each maximum depth leaf node of decision tree 3, it determines the third detection result.
[0151] S504, server 220 determines the third intermediate result corresponding to each node on decision tree 4 based on the fourth data feature and the threshold corresponding to each node on decision tree 4; according to the third intermediate result corresponding to each node on decision tree 4 and the weight q corresponding to each maximum depth leaf node on decision tree 4, it determines the fourth intermediate result corresponding to each maximum depth leaf node on decision tree 4; thus, according to the fourth intermediate result corresponding to each maximum depth leaf node on decision tree 4, the fourth detection result is determined.
[0152] S505, server 230 determines the fifth intermediate result corresponding to each node on decision tree 5 based on the fifth data feature and the threshold corresponding to each node on decision tree 5; according to the fifth intermediate result corresponding to each node on decision tree 5 and the weight q corresponding to each maximum depth leaf node on decision tree 5, it determines the sixth intermediate result corresponding to each maximum depth leaf node on decision tree 5; thus, according to the sixth intermediate result corresponding to each maximum depth leaf node on decision tree 5, the fifth detection result is determined.
[0153] It should be noted that S503, S504 and S505 are implemented in a similar way. The following explanation will take S503 as an example.
[0154] For example, decision tree 2 is Figure 6aThe decision tree shown, assuming that in decision tree 3 obtained by transforming decision tree 2, has the threshold of node A as th11, the threshold of node B1 as th21, the threshold of node B2 as th31, the weight of node C11 as q11, the weight of node C12 as q12, the weight of node C21 as q13, and the weight of node C22 as q14. The third data feature can include three data points: third data feature 1, third data feature 2, and third data feature 3, corresponding to nodes A, B1, and B2, respectively. Therefore, the process of server 210 calculating the first intermediate result in S503 can include: S31, server 210 calculates the first intermediate result b11 = msb(third data feature 1-th11) for node A, the first intermediate result b21 = msb(third data feature 2-th21) for node B1, and the first intermediate result b31 = msb(third data feature 3-th31) for node B2. Here, msb(ab) is a binary comparison function. The data in msb() needs to be converted to binary using the A2B protocol. The output of this comparison function is a binary share result of ab>0 or ab<0. S32, Server 210 calculates the second intermediate result L11 = (1-b11)*(1-b21)*q11 for reaching node C11 (i.e., from node A through node B1 to node C11), L12 = (1-b11)*b21*q12 for reaching node C12 (i.e., from node A through node B1 to node C12), L13 = b11*(1-b31)*q13 for reaching node C21 (i.e., from node A through node B2 to node C21), and L14 = b11*b21*q14 for reaching node C22 (i.e., from node A through node B2 to node C22). Taking the calculation of L11 as an example, b11 and b21 are binary numbers, and q11 is a floating-point number. Therefore, we can first calculate the result of (1-b11)*(1-b21), then convert this result to a floating-point number and multiply it by q11. It should be noted that regardless of how many of b11, b21, and b31 are 0, there will only be one non-zero result among L11 to L14. S33, server 210 determines the third detection result based on Y1 = L11 + L12 + L13 + L14. The third detection result can be, for example, Y1.
[0155] Similarly, server 220 determines the fourth detection result based on Y2 = L21 + L22 + L23 + L24, and server 230 determines the fifth detection result based on Y3 = L31 + L32 + L33 + L34.
[0156] S506, Servers 210, 220 and 230 send the third, fourth and fifth detection results to Server 240 respectively.
[0157] S507, Server 240 determines the target detection result of the data to be detected based on the third detection result, the fourth detection result, and the fifth detection result.
[0158] In practice, server 240 determines the target detection result based on Y1, Y2 and Y3. The target detection result can be expressed as: Y = Y1 + Y2 + Y3.
[0159] It should be noted that the server that ultimately integrates the detection results of various servers to obtain the target detection result can be server 240, or any one of server 210, server 220 or server 230, or other servers besides server 210, server 220, server 230 and server 240.
[0160] It should be noted that in this method 500, the example of servers 210, 220, and 230 performing threat detection on data collected from communication device 110 based on a secure multi-party algorithm is used. The number of "multi-party" participants in the secure multi-party algorithm should be greater than or equal to two. The more "multi-party" participants in the secure multi-party algorithm, the better the privacy protection of the data to be detected.
[0161] As can be seen, in method 500, a privacy-preserving decision tree 2, derived from a secure multi-party algorithm, is used to perform threat detection on the data to be detected. The decision tree 2 is then transformed to obtain multiple decision trees, which are then sent to multiple servers storing data features. This allows multiple servers that secretly share data features to perform threat detection using these multiple decision trees. Finally, a single server integrates the detection results from multiple servers to obtain a target detection result representing the likelihood of the data to be detected being illegal. Thus, this detection stage fully utilizes the security designs in methods 100 and 200, forming a cohesive process that enables the threat detection system 200 to more comprehensively and effectively defend against attacks.
[0162] Based on the above method embodiments, this application also provides a threat detection device, which will be described below with reference to the accompanying drawings.
[0163] See Figure 9 The figure is a schematic diagram of the structure of a threat detection device 900 provided in an embodiment of this application. This device 900 can, for example, correspond to... Figure 2a The threat detection server 100 shown can be executed by its various units. Figure 3 , Figure 4, Figure 5 , Figure 7 or Figure 8 The method shown. The device 900 may include: a first determining unit 901, a second determining unit 902, and a third determining unit 903.
[0164] The first determining unit 901 is used to determine a first detection result based on a first data feature of the data to be detected and a first decision tree. The first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a communication device.
[0165] Wherein, the first determining unit 901 can correspond to Figure 2a Module 101 in the document, the specific implementation of the first determining unit 901 can be found in [reference]. Figure 5 Detailed description of S301 in the embodiment.
[0166] The second determining unit 902 is used to determine a second detection result based on the second data features and the second decision tree of the data to be detected. The second data features are data features extracted from the data to be detected. The second data features and the first data features satisfy a first functional relationship. The second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree.
[0167] Wherein, the second determining unit 902 can correspond to Figure 2a Module 102 in the middle, the specific implementation of the second determining unit 902 can be found in Figure 5 Detailed description of S302 in the embodiment.
[0168] The third determining unit 903 is used to determine a target detection result based on the first detection result and the second detection result, wherein the target detection result is used to characterize the threat level information of the data to be detected.
[0169] Among them, the third determining unit 903 can correspond to Figure 2a Module 103 in the document, the specific implementation of the third determining unit 903 can be found in [reference]. Figure 5 Detailed description of S304 in the embodiment.
[0170] In one possible implementation, the device 900 may further include a fourth determining unit and a fifth determining unit. The fourth determining unit is configured to determine a third decision tree based on a privacy-preserving algorithm and a fourth decision tree before determining a first detection result based on a first data feature and a first decision tree of the data to be detected, and before determining a second detection result based on a second data feature and a second decision tree of the data to be detected, wherein the privacy-preserving algorithm is used to protect the privacy of the fourth decision tree; the fifth determining unit is configured to determine the first decision tree and the second decision tree based on the third decision tree. The fourth decision tree in the fourth determining unit may be equivalent to decision tree 1 determined in method 100, the third decision tree may be equivalent to decision tree 2, and the first and second decision trees may be equivalent to decision tree 2' and decision tree 2 in method 300 or method 400, respectively.
[0171] In one possible implementation, the device 900 may further include: a sixth determining unit, a seventh determining unit, an updating unit, and an eighth determining unit. The sixth determining unit is configured to determine a first gradient of a fifth decision tree based on a first sample and an initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; the seventh determining unit is configured to determine a second gradient of the sixth decision tree based on a second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; the updating unit is configured to update the initial decision tree based on the first gradient and the second gradient, and return to the process of determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree, and determining the second gradient of the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree satisfies a preset condition; the eighth determining unit is configured to determine the initial decision tree that satisfies the preset condition as the fourth decision tree. Specific implementations of the sixth determining unit, the seventh determining unit, the updating unit, and the eighth determining unit can be found in [reference needed]. Figure 3 Detailed description of Chinese method 100.
[0172] As an example, the sixth determining unit may include a first determining subunit and a computation subunit. The first determining subunit is used to determine the fifth decision tree based on the first sample, the differential privacy algorithm, and the initial decision tree; the computation subunit is used to calculate the gradient of the fifth decision tree, denoted as the first gradient.
[0173] As an example, the sixth determining unit may include a second determining subunit and an updating subunit. The second determining subunit is used to determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree; the updating subunit is used to update the first gradient based on a first random mask, wherein the value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update, and the first random mask is used to cancel out the second random mask used when determining the second gradient.
[0174] In one possible implementation, the privacy protection algorithm is an obfuscation circuit algorithm. Then, the device 900 further includes: a ninth determining unit, used to determine the obfuscation circuit, the seed of the obfuscation circuit, and decryption information; a first determining unit 901, specifically used to: obtain the first detection result based on the first data features, the first model data of the obfuscation circuit, the obfuscation circuit, and the seed; a second determining unit 902, specifically used to: obtain the second detection result based on the second data features, the second model data of the obfuscation circuit, the obfuscation circuit, and the seed, wherein the second model data and the first model data satisfy a second functional relationship; and a third determining unit 903, specifically used to: determine the threat level information of the data to be detected based on the first detection result, the second detection result, the decryption information, and the third decision tree. For a specific implementation of this embodiment, see [link to specific implementation details]. Figure 7 Detailed description of Chinese method 400.
[0175] In one possible implementation, the privacy protection algorithm is a secure multi-party algorithm. Therefore, in the device 900, the first determining unit 901 may include: a third determining subunit, a fourth determining subunit, and a fifth determining subunit. The third determining subunit is used to determine a first intermediate result corresponding to each node in the first decision tree based on the first data features and the threshold corresponding to each node in the first decision tree; the fourth determining subunit is used to determine a second intermediate result corresponding to each maximum depth leaf node in the first decision tree based on the first intermediate result corresponding to each node in the first decision tree and a second parameter corresponding to each maximum depth leaf node in the first decision tree, where the second parameter is the weight corresponding to each maximum depth leaf node in the first decision tree; the fifth determining subunit is used to determine the first detection result based on the second intermediate result corresponding to each maximum depth leaf node in the first decision tree. The second determining unit 902 may include: a sixth determining subunit, a seventh determining subunit, and an eighth determining subunit. The sixth determining subunit is used to determine the third intermediate result corresponding to each node in the second decision tree based on the second data features and the threshold corresponding to each node in the second decision tree; the seventh determining subunit is used to determine the fourth intermediate result corresponding to each maximum depth leaf node in the second decision tree based on the third intermediate result corresponding to each node in the second decision tree and the third parameter corresponding to each maximum depth leaf node in the second decision tree, wherein the third parameter is the weight corresponding to each maximum depth leaf node in the second decision tree; the eighth determining subunit is used to determine the second detection result based on the third intermediate result corresponding to each maximum depth leaf node in the second decision tree. For a detailed implementation of this embodiment, please refer to [link to specific implementation details]. Figure 8 Detailed description of Chinese method 500.
[0176] For details on the specific executable functions and implementation of the threat detection device 900, please refer to [link / reference needed]. Figure 3 Method 100 shown Figure 4 Method 200 shown Figure 5 Method 300 shown Figure 7 Method 400 shown and Figure 8 The corresponding description in method 500 shown will not be repeated here.
[0177] Based on the above method embodiments, this application also provides a threat detection system, which will be described below with reference to the accompanying drawings.
[0178] See Figure 10 The figure is a schematic diagram of the structure of a threat detection system 1000 provided in an embodiment of this application. This system 1000 can, for example, correspond to... Figure 2bThe threat detection system 200 shown can be executed by various physical devices (including servers and communication devices). Figure 3 , Figure 4 , Figure 5 , Figure 7 or Figure 8 The method is shown. The system 1000 may include: a first server 1001, a second server 1002, and a third server 1003.
[0179] The first server 1001 is used to determine a first detection result based on a first data feature and a first decision tree of the data to be detected. The first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a first communication device.
[0180] Among them, the first server 1001 can correspond to Figure 2b For a detailed implementation of server 210 in the first server 1001, please refer to [link to implementation details]. Figure 5 Detailed description of S301 in the embodiment.
[0181] The second server 1002 is used to determine a second detection result based on the second data features and the second decision tree of the data to be detected. The second data features are data features extracted from the data to be detected. The second data features and the first data features satisfy a first functional relationship. The second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree.
[0182] Among them, the second server 1002 can correspond to Figure 2b For details on the implementation of server 220 and the second server 1002, please refer to [link to relevant documentation]. Figure 5 Detailed description of S302 in the embodiment.
[0183] The third server 1003 is used to determine the target detection result based on the first detection result and the second detection result, wherein the target detection result is used to characterize the threat level information of the data to be detected.
[0184] Among them, the third server 1003 can correspond to Figure 2b For details on the implementation of server 230 and the third server 1003, please refer to [link to implementation details]. Figure 5 Detailed description of S304 in the embodiment.
[0185] In one possible implementation, the system 1000 may further include: a fourth server, configured to determine the third decision tree based on a privacy protection algorithm and a fourth decision tree, and to determine the first decision tree and the second decision tree based on the third decision tree, wherein the privacy protection algorithm is used to protect the privacy of the fourth decision tree; the fourth server is further configured to send the first decision tree and the second decision tree to the first server and the second server respectively. The fourth decision tree may be equivalent to decision tree 1 determined in method 100, the third decision tree to decision tree 2, and the first and second decision trees to decision tree 2' and decision tree 2' in method 300 or method 400 respectively.
[0186] In one possible implementation, the system 1000 may further include: a second communication device, a third communication device, and a fifth server, wherein: the second communication device is configured to determine a first gradient of a fifth decision tree based on a first sample and an initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; the third communication device is configured to determine a second gradient of a sixth decision tree based on the second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; the fifth server is configured to update the initial decision tree based on the first gradient and the second gradient, and trigger the second communication device to perform the determination of the first gradient of the fifth decision tree based on the first sample and the initial decision tree, and trigger the third communication device to perform the determination of the second gradient of the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree satisfies a preset condition; the fifth server is further configured to determine the initial decision tree that satisfies the preset condition as the fourth decision tree. Specific implementations of the second communication device, the third communication device, and the fifth server can be found in [reference needed]. Figure 3 Detailed description of Chinese method 100.
[0187] As an example, the second communication device is specifically used to: determine the fifth decision tree based on the first sample, the differential privacy algorithm, and the initial decision tree; and calculate the gradient of the fifth decision tree, denoted as the first gradient.
[0188] As an example, the second communication device is specifically configured to: determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree; update the first gradient based on a first random mask, wherein the value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update, wherein the first random mask is used to cancel out the second random mask used when determining the second gradient.
[0189] In one possible implementation, the privacy protection algorithm is an obfuscation circuit algorithm. Then, the second server 1002 in the system 1000 is further configured to determine the obfuscation circuit, the seed of the obfuscation circuit, and decryption information, send the obfuscation circuit and the seed to the first server 1001, and send the decryption information to the third server 1003; the first server 1001 is specifically configured to: obtain the first detection result based on the first data features, the first model data of the obfuscation circuit, the obfuscation circuit, and the seed; the second server 1002 is specifically configured to: obtain the second detection result based on the second data features, the second model data of the obfuscation circuit, the obfuscation circuit, and the seed, wherein the second model data and the first model data satisfy a second functional relationship; the third server 1003 is specifically configured to: determine the threat level information of the data to be detected based on the first detection result, the second detection result, the decryption information, and the third decision tree. For a specific implementation of this embodiment, see [link to specific implementation details]. Figure 7 Detailed description of Chinese method 400.
[0190] In one possible implementation, the privacy protection algorithm is a secure multi-party algorithm. Then, in system 1000, the first server 1001 is specifically configured to: determine a first intermediate result corresponding to each node in the first decision tree based on the first data features and the threshold corresponding to each node in the first decision tree; determine a second intermediate result corresponding to each maximum depth leaf node in the first decision tree based on the first intermediate result corresponding to each node in the first decision tree and a second parameter corresponding to each maximum depth leaf node in the first decision tree, where the second parameter is the weight corresponding to each maximum depth leaf node in the first decision tree; and determine the first detection result based on the second intermediate result corresponding to each maximum depth leaf node in the first decision tree. The second server 1002 is specifically configured to: determine a third intermediate result corresponding to each node in the second decision tree based on the second data features and the threshold corresponding to each node in the second decision tree; determine a fourth intermediate result corresponding to each leaf node of the second decision tree based on the third intermediate result corresponding to each node in the second decision tree and the third parameter corresponding to each leaf node of the second decision tree with maximum depth, wherein the third parameter is the weight corresponding to each leaf node of the second decision tree with maximum depth; and determine the second detection result based on the third intermediate result corresponding to each leaf node of the second decision tree with maximum depth. For a detailed implementation of this embodiment, please refer to [link to specific implementation details]. Figure 8 Detailed description of Chinese method 500.
[0191] It should be noted that the third server 1003 may be co-located with the first server 1001, or the third server 1003 may be co-located with the second server 1002.
[0192] For details on the specific executable functions and implementation of the Threat Detection System 1000, please refer to [link / reference]. Figure 3 Method 100 shown Figure 4 Method 200 shown Figure 5 Method 300 shown Figure 7 Method 400 shown and Figure 8 The corresponding description in method 500 shown will not be repeated here.
[0193] Figure 11 This is a schematic diagram of the structure of a communication device 1100 provided in an embodiment of this application. The communication device 1100 may include, for example, a device comprising... Figure 9 The network device shown is the threat detection device 900.
[0194] Please see Figure 11 As shown, the communication device 1100 includes a processor 1110, a communication interface 1120, and a memory 1130. The number of processors 1110 in the communication device 1100 can be one or more. Figure 11 Taking a processor as an example. In this embodiment, the processor 1110, communication interface 1120, and memory 1130 can be connected via a bus system or other means, wherein, Figure 11 Taking the connection between China and Israel via bus system 1140 as an example.
[0195] Processor 1110 may be a CPU, an NP, or a combination of a CPU and an NP. Processor 1110 may further include hardware chips. These hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof.
[0196] Communication interface 1120 is used to receive and send messages. Specifically, communication interface 1120 may include a receiving interface and a sending interface. The receiving interface can be used to receive messages, and the sending interface can be used to send messages. There can be one or more communication interfaces 1120.
[0197] The memory 1130 may include volatile memory, such as random-access memory (RAM); the memory 1130 may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 1130 may also include a combination of the above types of memory.
[0198] Optionally, the memory 1130 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and handling hardware-based tasks. The processor 1110 can read the programs in the memory 1130 to implement the threat detection method provided in this application embodiment.
[0199] The memory 1130 can be a storage device in the communication device 1100, or it can be a storage device independent of the communication device 1100.
[0200] The bus system 1140 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0201] Figure 12 This is a schematic diagram of another communication device 1200 provided in an embodiment of this application. The communication device 1200 can be configured as described above, including... Figure 9 The network device shown as the threat detection device 900, or it could be... Figure 11 The communication device 1100 shown.
[0202] The communication equipment 1200 includes: a main control board 1210 and an interface board 1230.
[0203] The main control board 1210, also known as the main processing unit (MPU) or route processor card, controls and manages the various components in the communication device 1200, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1210 includes a central processing unit 1211 and a memory 1212.
[0204] Interface board 1230 is also called a line processing unit (LPU), linecard, or service board. Interface board 1230 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 1230 includes: a central processing unit 1231, a network processor 1232, a forwarding table entry memory 1234, and a physical interface card (PIC) 1233.
[0205] The central processing unit 1231 on the interface board 1230 is used to control and manage the interface board 1230 and communicate with the central processing unit 1211 on the main control board 1210.
[0206] The network processor 1232 is used to implement packet forwarding processing. The network processor 1232 can be in the form of a forwarding chip. Specifically, uplink packet processing includes: packet ingress interface processing, forwarding table lookup; downlink packet processing includes: forwarding table lookup, etc.
[0207] The physical interface card 1233 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1230 through this card, and processed packets are sent out from the physical interface card 1233. The physical interface card 1233 includes at least one physical interface, also called a physical port, which corresponds to the FlexE physical interface in the system architecture. The physical interface card 1233, also called a daughter card, can be installed on the interface board 1230 and is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 1232 for processing. In some embodiments, the central processing unit 1231 of the interface board 1230 can also perform the functions of the network processor 1232, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 1232 in the physical interface card 1233.
[0208] Optionally, the communication device 1200 includes multiple interface boards. For example, the communication device 1200 also includes an interface board 1240, which includes a central processing unit 1241, a network processor 1242, a forwarding table entry memory 1244, and a physical interface card 1243.
[0209] Optionally, the communication device 1200 also includes a switching fabric board 1220. The switching fabric board 1220 can also be referred to as a switch fabric unit (SFU). When the communication device has multiple interface boards 1230, the switching fabric board 1220 is used to complete data exchange between the interface boards. For example, interface boards 1230 and 1240 can communicate through the switching fabric board 1220.
[0210] The main control board 1210 and the interface board 1230 are coupled. For example, the main control board 1210, interface board 1230, interface board 1240, and switching network board 1220 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1210 and the interface board 1230, and the main control board 1210 and the interface board 1230 communicate with each other through the IPC channel.
[0211] Logically, the communication device 1200 includes a control plane and a forwarding plane. The control plane includes a main control board 1210 and a central processing unit 1231, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 1234, a physical interface card 1233, and a network processor 1232. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1232 forwards messages received by the physical interface card 1233 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding table entry memory 1234. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0212] If the communication device 1200 is configured as a threat detection device 900, the central processing unit 1211 can determine a first detection result based on a first data feature and a first decision tree of the data to be detected, determine a second detection result based on a second data feature and a second decision tree of the data to be detected, and determine a target detection result based on the first detection result and the second detection result. The network processor 1232 can trigger the physical interface card 1233 to receive the data to be detected.
[0213] It should be understood that the first determining unit 901, the second determining unit 902, and the third determining unit 903 in the threat detection device 900 can be equivalent to the central processing unit 1211 or the central processing unit 1231 in the communication device 1200. The threat detection device 900 may also include a transceiver unit, which can be equivalent to the physical interface card 1233 or the physical interface card 1243 in the communication device 1200.
[0214] It should be understood that the operation on interface board 1240 in this embodiment is consistent with the operation on interface board 1230, and will not be described again for the sake of simplicity. It should be understood that the communication device 1200 in this embodiment can correspond to the threat detection device or threat detection server in the above-described method embodiments. The main control board 1210, interface board 1230 and / or interface board 1240 in the communication device 1200 can implement the functions and / or various steps implemented in the threat detection device in the above-described method embodiments, and will not be described again for the sake of simplicity.
[0215] It should be understood that there may be one or more main control boards, including a primary main control board and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of the communication equipment, the more interface boards it provides. Each interface board may also have one or more physical interface cards. There may be no switching network board, or one or more; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the communication equipment may not need a switching network board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the communication equipment can have at least one switching network board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture communication device are greater than those of a centralized architecture device. Alternatively, the communication equipment can also be a single board, without a switching network board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit on the interface board and the central processing unit on the main control board can be combined into a single central processing unit to execute the combined functions. This type of equipment has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario.
[0216] In some possible embodiments, the aforementioned network devices or communication devices can be implemented as virtualized devices. For example, a virtualized device can be a virtual machine (VM) running a program for sending messages, deployed on hardware (e.g., a physical server). A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Virtual machines can be configured as... Figure 2a or Figure 2b The network devices in the system. For example, network devices or communication devices can be implemented based on a general-purpose physical server combined with Network Functions Virtualization (NFV) technology. Each network device or communication device can be a virtual host, virtual router, or virtual switch. Those skilled in the art can virtualize network devices or communication devices with the above functions on a general-purpose physical server by combining NFV technology by reading this application, and will not be elaborated here.
[0217] It should be understood that the communication devices of the various product forms described above each have any of the functions of the network devices or communication devices in the above method embodiments, which will not be elaborated here.
[0218] This application also provides a chip, including a processor and an interface circuit. The interface circuit is used to receive instructions and transmit them to the processor. The processor may be, for example, a... Figure 9 One specific implementation of the threat detection device 900 shown can be used to execute the aforementioned threat detection method. The processor is coupled to a memory, which stores programs or instructions. When the processor executes the programs or instructions, the chip system implements the method described in any of the above method embodiments.
[0219] Optionally, the chip system may include one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0220] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.
[0221] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0222] This application also provides a computer-readable storage medium, including instructions or a computer program, which, when run on a computer, causes the computer to perform the threat detection method provided in the above embodiments.
[0223] This application also provides a computer program product containing instructions or computer programs, which, when run on a computer, causes the computer to execute the threat detection method provided in the above embodiments.
[0224] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0225] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0226] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical business division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0227] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0228] Furthermore, the various business units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software business unit.
[0229] If the integrated unit is implemented as a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0230] Those skilled in the art will recognize that, in one or more of the examples above, the services described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0231] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention.
[0232] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A threat detection method, characterized in that, include: A first detection result is determined based on a first data feature and a first decision tree of the data to be detected, wherein the first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a communication device; A second detection result is determined based on the second data feature and the second decision tree of the data to be detected. The second data feature is a data feature extracted from the data to be detected. The second data feature and the first data feature satisfy a first functional relationship. The first functional relationship is used to transform the data feature of the data to be detected into the first data feature and the second data feature. The second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree according to the first functional relationship. Based on the first detection result and the second detection result, a target detection result is determined, which is used to characterize the threat level information of the data to be detected.
2. The method according to claim 1, characterized in that, Before determining the first detection result based on the first data features and the first decision tree of the data to be detected, and before determining the second detection result based on the second data features and the second decision tree of the data to be detected, the method further includes: The third decision tree is determined based on the privacy protection algorithm and the fourth decision tree, wherein the privacy protection algorithm is used to protect the privacy of the fourth decision tree; Based on the third decision tree, the first decision tree and the second decision tree are determined.
3. The method according to claim 2, characterized in that, The method further includes: Based on the first sample and the initial decision tree, the first gradient of the fifth decision tree is determined, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; Based on the second sample and the initial decision tree, the second gradient of the sixth decision tree is determined, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; Based on the first gradient and the second gradient, update the initial decision tree, and return to execute the first gradient of determining the fifth decision tree based on the first sample and the initial decision tree, and the second gradient of determining the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree meets the preset conditions; The initial decision tree that meets the preset conditions is determined as the fourth decision tree.
4. The method according to claim 3, characterized in that, The step of determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree includes: The fifth decision tree is determined based on the first sample, the differential privacy algorithm, and the initial decision tree; Calculate the gradient of the fifth decision tree, and denote it as the first gradient.
5. The method according to claim 3, characterized in that, The step of determining the first gradient of the fifth decision tree based on the first sample and the initial decision tree includes: Based on the first sample and the initial decision tree, determine the first gradient of the fifth decision tree; The first gradient is updated according to the first random mask. The value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update. The first random mask is used to cancel out the second random mask used when determining the second gradient.
6. The method according to any one of claims 2 to 5, characterized in that, The privacy protection algorithm is a confusing circuit algorithm.
7. The method according to claim 6, characterized in that, The method further includes: Determine the obfuscation circuit, the seed of the obfuscation circuit, and the decryption information; The determination of the first detection result based on the first data features and the first decision tree of the data to be detected includes: Based on the first data features, the first model data of the obfuscated circuit, the obfuscated circuit, and the seed, the first detection result is obtained; The determination of the second detection result based on the second data features and the second decision tree of the data to be detected includes: Based on the second data features, the second model data of the obfuscation circuit, the obfuscation circuit, and the seed, the second detection result is obtained, and the second model data and the first model data satisfy a second functional relationship. The step of determining the target detection result based on the first detection result and the second detection result includes: Based on the first detection result, the second detection result, the decryption information, and the third decision tree, the target detection result of the data to be detected is determined.
8. The method according to any one of claims 2 to 5, characterized in that, The privacy protection algorithm is a secure multi-party algorithm.
9. The method according to claim 8, characterized in that, The determination of the first detection result based on the first data features and the first decision tree of the data to be detected includes: Based on the first data features and the thresholds corresponding to each node in the first decision tree, the first intermediate result corresponding to each node in the first decision tree is determined. Based on the first intermediate result corresponding to each node in the first decision tree and the second parameter corresponding to each maximum depth leaf node in the first decision tree, the second intermediate result corresponding to each maximum depth leaf node in the first decision tree is determined, and the second parameter is the weight corresponding to each maximum depth leaf node in the first decision tree. The first detection result is determined based on the second intermediate results corresponding to each leaf node with the maximum depth of the first decision tree; The determination of the second detection result based on the second data features and the second decision tree of the data to be detected includes: Based on the second data features and the thresholds corresponding to each node in the second decision tree, the third intermediate result corresponding to each node in the second decision tree is determined; Based on the third intermediate results corresponding to each node in the second decision tree and the third parameters corresponding to each maximum depth leaf node in the second decision tree, the fourth intermediate results corresponding to each maximum depth leaf node in the second decision tree are determined, wherein the third parameters are the weights corresponding to each maximum depth leaf node in the second decision tree. The second detection result is determined based on the third intermediate result corresponding to each leaf node with the maximum depth of the second decision tree.
10. A threat detection device, characterized in that, include: The first determining unit is configured to determine a first detection result based on a first data feature of the data to be detected and a first decision tree, wherein the first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a communication device; The second determining unit is used to determine a second detection result based on the second data feature and the second decision tree of the data to be detected. The second data feature is a data feature extracted from the data to be detected. The second data feature and the first data feature satisfy a first functional relationship. The first functional relationship is used to transform the data feature of the data to be detected into the first data feature and the second data feature. The second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree according to the first functional relationship. The third determining unit is used to determine the target detection result based on the first detection result and the second detection result, wherein the target detection result is used to characterize the threat level information of the data to be detected.
11. The apparatus according to claim 10, characterized in that, The device further includes: The fourth determining unit is configured to determine the third decision tree according to the privacy protection algorithm and the fourth decision tree before determining the first detection result based on the first data features and the first decision tree of the data to be detected, and before determining the second detection result based on the second data features and the second decision tree of the data to be detected, wherein the privacy protection algorithm is used to protect the privacy of the fourth decision tree; The fifth determining unit is used to determine the first decision tree and the second decision tree based on the third decision tree.
12. The apparatus according to claim 11, characterized in that, The device further includes: The sixth determining unit is used to determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; The seventh determining unit is used to determine the second gradient of the sixth decision tree based on the second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; An update unit is configured to update the initial decision tree based on the first gradient and the second gradient, and return to perform the first gradient of determining the fifth decision tree based on the first sample and the initial decision tree, and the second gradient of determining the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree meets a preset condition. The eighth determining unit is used to determine the initial decision tree that satisfies the preset conditions as the fourth decision tree.
13. The apparatus according to claim 12, characterized in that, The sixth determining unit includes: The first determining subunit is used to determine the fifth decision tree based on the first sample, the differential privacy algorithm, and the initial decision tree; The computational subunit is used to calculate the gradient of the fifth decision tree, denoted as the first gradient.
14. The apparatus according to claim 12, characterized in that, The sixth determining unit includes: The second determining subunit is used to determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree; An update subunit is used to update the first gradient according to a first random mask. The value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update. The first random mask is used to cancel out the second random mask used when determining the second gradient.
15. The apparatus according to any one of claims 11 to 14, characterized in that, The privacy protection algorithm is a confusing circuit algorithm.
16. The apparatus according to claim 15, characterized in that, The device further includes: The ninth determining unit is used to determine the obfuscation circuit, the seed of the obfuscation circuit, and the decryption information; The first determining unit is specifically used for: Based on the first data features, the first model data of the obfuscated circuit, the obfuscated circuit, and the seed, the first detection result is obtained; The second determining unit is specifically used for: Based on the second data features, the second model data of the obfuscation circuit, the obfuscation circuit, and the seed, the second detection result is obtained, and the second model data and the first model data satisfy a second functional relationship. The third determining unit is specifically used for: Based on the first detection result, the second detection result, the decryption information, and the third decision tree, the threat level information of the data to be detected is determined.
17. The apparatus according to any one of claims 11 to 14, characterized in that, The privacy protection algorithm is a secure multi-party algorithm.
18. The apparatus according to claim 17, characterized in that, The first determining unit includes: The third determining subunit is used to determine the first intermediate result corresponding to each node of the first decision tree based on the first data features and the threshold corresponding to each node of the first decision tree. The fourth determining subunit is used to determine the second intermediate result corresponding to each maximum depth leaf node of the first decision tree based on the first intermediate result corresponding to each node on the first decision tree and the second parameter corresponding to each maximum depth leaf node of the first decision tree. The second parameter is the weight corresponding to each maximum depth leaf node of the first decision tree. The fifth determining subunit is used to determine the first detection result based on the second intermediate result corresponding to each leaf node with the maximum depth of the first decision tree; The second determining unit includes: The sixth determining subunit is used to determine the third intermediate result corresponding to each node on the second decision tree based on the second data features and the threshold corresponding to each node on the second decision tree; The seventh determining subunit is used to determine the fourth intermediate result corresponding to each maximum depth leaf node of the second decision tree based on the third intermediate result corresponding to each node on the second decision tree and the third parameter corresponding to each maximum depth leaf node of the second decision tree, wherein the third parameter is the weight corresponding to each maximum depth leaf node of the second decision tree. The eighth determining subunit is used to determine the second detection result based on the third intermediate result corresponding to each leaf node with the maximum depth of the second decision tree.
19. A threat detection system, characterized in that, The system includes a first server, a second server, and a third server, wherein: The first server is configured to determine a first detection result based on a first data feature of the data to be detected and a first decision tree, wherein the first data feature is a data feature extracted from the data to be detected, and the data to be detected is data collected from a first communication device; The second server is used to determine a second detection result based on the second data features and the second decision tree of the data to be detected. The second data features are data features extracted from the data to be detected. The second data features and the first data features satisfy a first functional relationship. The first functional relationship is used to transform the data features of the data to be detected into the first data features and the second data features. The second decision tree and the first decision tree are decision trees obtained by transforming a third decision tree according to the first functional relationship. The third server is used to determine a target detection result based on the first detection result and the second detection result, wherein the target detection result is used to characterize the threat level information of the data to be detected.
20. The system according to claim 19, characterized in that, The system also includes a fourth server. The fourth server is used to determine the third decision tree based on the privacy protection algorithm and the fourth decision tree, and to determine the first decision tree and the second decision tree based on the third decision tree, wherein the privacy protection algorithm is used to protect the privacy of the fourth decision tree; The fourth server is further configured to send the first decision tree and the second decision tree to the first server and the second server, respectively.
21. The system according to claim 20, characterized in that, The system further includes: a second communication device, a third communication device, and a fifth server, wherein: The second communication device is used to determine the first gradient of the fifth decision tree based on the first sample and the initial decision tree, wherein the depth of the fifth decision tree is one greater than the depth of the initial decision tree; The third communication device is used to determine the second gradient of the sixth decision tree based on the second sample and the initial decision tree, wherein the depth of the sixth decision tree is one greater than the depth of the initial decision tree; The fifth server is configured to update the initial decision tree based on the first gradient and the second gradient, and trigger the second communication device to execute the first gradient of the fifth decision tree based on the first sample and the initial decision tree, and trigger the third communication device to execute the second gradient of the sixth decision tree based on the second sample and the initial decision tree, until the updated initial decision tree meets the preset conditions. The fifth server is further configured to determine the initial decision tree that satisfies the preset conditions as the fourth decision tree.
22. The system according to claim 21, characterized in that, The second communication device is specifically used for: The fifth decision tree is determined based on the first sample, the differential privacy algorithm, and the initial decision tree; Calculate the gradient of the fifth decision tree, and denote it as the first gradient.
23. The system according to claim 21, characterized in that, The second communication device is specifically used for: Based on the first sample and the initial decision tree, determine the first gradient of the fifth decision tree; The first gradient is updated according to the first random mask. The value of the updated first gradient is determined by the first random mask and the value of the first gradient before the update. The first random mask is used to cancel out the second random mask used when determining the second gradient.
24. The system according to any one of claims 20 to 23, characterized in that, The privacy protection algorithm is a confusing circuit algorithm.
25. The system according to claim 24, characterized in that, The second server is further configured to determine the obfuscated circuit, the seed of the obfuscated circuit, and decryption information, send the obfuscated circuit and the seed to the first server, and send the decryption information to the third server; The first server is specifically used for: Based on the first data features, the first model data of the obfuscated circuit, the obfuscated circuit, and the seed, the first detection result is obtained; The second server is specifically used for: Based on the second data features, the second model data of the obfuscation circuit, the obfuscation circuit, and the seed, the second detection result is obtained, and the second model data and the first model data satisfy a second functional relationship. The third server is specifically used for: Based on the first detection result, the second detection result, the decryption information, and the third decision tree, the threat level information of the data to be detected is determined.
26. The system according to any one of claims 20 to 23, characterized in that, The privacy protection algorithm is a secure multi-party algorithm.
27. The system according to claim 26, characterized in that, The first server is specifically used for: Based on the first data features and the thresholds corresponding to each node in the first decision tree, the first intermediate result corresponding to each node in the first decision tree is determined. Based on the first intermediate result corresponding to each node in the first decision tree and the second parameter corresponding to each maximum depth leaf node in the first decision tree, the second intermediate result corresponding to each maximum depth leaf node in the first decision tree is determined, and the second parameter is the weight corresponding to each maximum depth leaf node in the first decision tree. The first detection result is determined based on the second intermediate results corresponding to each leaf node with the maximum depth of the first decision tree; The second server is specifically used for: Based on the second data features and the thresholds corresponding to each node in the second decision tree, the third intermediate result corresponding to each node in the second decision tree is determined; Based on the third intermediate results corresponding to each node in the second decision tree and the third parameters corresponding to each maximum depth leaf node in the second decision tree, the fourth intermediate results corresponding to each maximum depth leaf node in the second decision tree are determined, wherein the third parameters are the weights corresponding to each maximum depth leaf node in the second decision tree. The second detection result is determined based on the third intermediate result corresponding to each leaf node with the maximum depth of the second decision tree.
28. The system according to any one of claims 19 to 23, characterized in that, The third server is co-located with the first server, or the third server is co-located with the second server.
29. A network device, characterized in that, The network device includes the apparatus according to any one of claims 10 to 18.
30. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Privacy protection decision tree classification method for cloud outsourcing data
CN111259440A