A security asset risk prediction data encryption method and a risk prediction method
By constructing an LSOPE tree and a deterministic symmetric encryption algorithm, the problems of low automation and insufficient data security in securities asset risk prediction are solved, achieving efficient and secure risk prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2022-12-01
- Publication Date
- 2026-06-09
AI Technical Summary
Existing methods for predicting securities asset risks are not highly automated, and data security is difficult to guarantee, making it easy for sensitive data to be leaked and posing security risks.
A semi-order-preserving encrypted random forest classification method is adopted. The LSOPE tree is constructed to encrypt the securities asset data, and a deterministic symmetric encryption algorithm is used to encrypt the labels. A random forest model is then constructed to predict the risk of securities assets.
While ensuring data privacy, it improves the accuracy and security of securities asset risk prediction and achieves efficient risk classification and assessment.
Smart Images

Figure CN116522353B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an encrypted classification method in privacy computing, privacy data, and computer artificial intelligence, specifically an encryption method and risk prediction method for securities asset risk prediction data. Background Technology
[0002] As a crucial source of funds in the securities market, investors' securities assets constitute a significant portion of the market. Therefore, accurately predicting and controlling securities asset risks is a vital aspect of maintaining market security. While individuals and securities institutions have long employed methods for examining and assessing securities asset risks, and major securities brokerage firms have continuously developed risk monitoring platforms and improved their risk control systems, it is worth noting that despite the increasing maturity of risk control theories in the domestic securities market, risk control methods remain largely manual and semi-automatic. Even the few automated securities asset risk identification methods based on artificial intelligence technology still neglect security, potentially leading to the leakage of large amounts of sensitive data during calculations and posing significant security risks. Summary of the Invention
[0003] Purpose of the Invention: Current methods for predicting securities asset risk suffer from low automation and difficulty in ensuring data security. To address these issues and shortcomings, this invention provides an encryption method for securities asset risk prediction data. Furthermore, based on this encrypted data, it offers a separate method for predicting securities asset risk. This invention is based on the idea of semi-order-preserving encrypted random forest classification, proposing a classification method that offers high accuracy and security in predicting the degree of securities asset risk. This method encrypts plaintext while preserving its relative order relationship to facilitate the establishment of a random forest model, thereby accurately predicting securities asset risk while ensuring data privacy.
[0004] Technical Solution: An encryption method for securities asset risk prediction data. First, a training dataset containing historical user securities asset information needs to be established on a trusted client. Securities investment return-loss data within this dataset is used as label data. Then, rows and columns of the dataset are randomly sampled to obtain... The system uses three different training sets. Then, by merging plaintext, it constructs an LSOPE tree for each attribute of each dataset and obtains the attribute value ciphertext through the LSOPE tree. The labels are then encrypted using a deterministic symmetric encryption algorithm, and all ciphertext is transmitted to the server.
[0005] In the plaintext merging method, inserting data into an LSOPE tree is similar to inserting nodes into a binary search tree. However, since an LSOPE tree allows multiple values to be inserted into a single node, and has two different node types—label nodes and value nodes—node type judgment and type conversion are required during the process of adding data to the node to be inserted. If the node to be inserted is a value node, or a label node and the label of the data to be inserted matches the label of the node to be inserted, then the data to be inserted is directly added to that node. If the node to be inserted is a label node and the label of the data to be inserted does not match the label of the node to be inserted, then node splitting is performed. Data with attribute values less than the attribute values of the data to be inserted is passed to the left subtree of the node to be inserted, and data with attribute values greater than the attribute values of the data to be inserted is passed to the right subtree of the node to be inserted. Then, the label of the node to be inserted is compared with the label of the data to be inserted. If they do not match, the node is marked as a value node.
[0006] Will Once the LSOPE tree is constructed, it can be directly obtained from the LSOPE tree. The ciphertext value corresponding to the node is grouped, with "0" marking the left side of the tree and "1" marking the right side. The binary code of the path from the root node to the node to be encrypted is used as the prefix of the ciphertext, and [10…0] is added after it to pad the length. After encrypting the attribute value, a deterministic symmetric encryption algorithm (such as AES) is called to encrypt the tag. Subsequently, all encrypted data is transmitted to the server.
[0007] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the encryption method for securities asset risk prediction data as described above.
[0008] A method for predicting the risk of securities assets, comprising:
[0009] (1) First, a training dataset containing historical user securities asset information needs to be established on the trusted client. The securities investment return-loss data in the dataset is used as the label data, and the rows and columns of the dataset are randomly sampled to obtain... The system uses three different training sets. Then, by merging plaintext, it constructs an LSOPE tree for each attribute of each dataset and obtains the attribute value ciphertext through the LSOPE tree. The labels are then encrypted using a deterministic symmetric encryption algorithm, and all ciphertext is transmitted to the server.
[0010] (2) After receiving the ciphertext, the server constructs a classification prediction model using the random forest algorithm.
[0011] (3) Finally, in the prediction stage, for a user's securities asset data to be predicted, the client uses an LSOPE tree to encrypt it, transmits the ciphertext to the server for prediction, and sends the prediction result back to the client for decryption.
[0012] The specific structure of the LSOPE tree is as follows: Based on a binary search tree, LSOPE contains two different types of nodes: label nodes and value nodes. Each node can insert multiple values. A label node contains a set of consecutive attribute values with the same label; a value node contains a set of plaintext values with different labels but the same attribute. The LSOPE tree is dynamically generated, where all nodes are initialized as label nodes. When certain conditions are met, label nodes are converted into value nodes through splitting. The specific conditions for converting a label node into a value node in the LSOPE tree are: the insertion node corresponding to the input plaintext data is a label node, and the input label plaintext is not equal to the node label. The specific method for converting a label node into a value node is as follows: Let an input data be... ,in The attribute value is in plaintext. For plaintext labels, use express The corresponding tag node to be inserted will be used in the conversion process. The splitting process is about to begin. medium to small The plaintext was transmitted to The left subtree is greater than Plaintext transmitted to The right subtree, at this time If different tags still exist, then... Mark it as a value node.
[0013] In (2), after receiving the ciphertext, the server constructs a classification prediction model using the random forest algorithm: the server constructs a decision tree model for each of the k groups of ciphertext data. The specific method is to calculate the Gini coefficient of all possible ciphertext values that can be used as split points for each attribute, and select the ciphertext value with the largest Gini gain as the split point. Since the relative order of the plaintext data is preserved by semi-order-preserving encryption, the calculation of the Gini coefficient will not be affected by the data encryption.
[0014] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the securities asset risk prediction method described above.
[0015] A computer-readable storage medium storing a computer program that performs the securities asset risk prediction method as described above.
[0016] Beneficial effects: Compared with existing technologies, this invention implements a semi-order-preserving encryption method by constructing a novel data structure, LSOPE tree, which better hides the order information of plaintext and improves the algorithm efficiency of encrypted random forest. The securities asset risk prediction method provided by this invention is based on data encryption, thereby improving the security and accuracy of the securities asset risk prediction method while ensuring efficiency. It is conducive to more effectively and accurately classifying securities asset risks and effectively assessing securities market asset risks. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the principle of the present invention;
[0018] Figure 2 This is a flowchart of the LSOPE tree construction algorithm in this invention;
[0019] Figure 3 This is a flowchart of the LSOPE tree tag node splitting algorithm in this invention. Detailed Implementation
[0020] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0021] like Figure 1 As shown. A method for encrypting securities asset risk prediction data first inputs a set of historical user securities asset data as a training dataset into a trusted client, and then randomly samples the rows and columns of the dataset to obtain... Each dataset has a different training set. Next, an LSOPE tree is constructed for each attribute of each dataset using plaintext merging, and the ciphertext of the attribute values is obtained from the LSOPE tree. Then, a deterministic symmetric encryption algorithm is used to encrypt the labels, and all ciphertext is transmitted to the server. The specific implementation process is as follows:
[0022] Step 100: Establish a client-side database containing historical client securities asset information. OK Column dataset As training data: ,in Indicates the first Historical client securities asset data, tag data This represents the data on gains and losses from securities investments.
[0023] Step 101, from of Randomly selected The column, merged with the label column, and... proceed Second random sampling with replacement to obtain the dataset ,in Repeat the above sampling operation times to obtain Datasets Used for training A different decision tree.
[0024] Step 102, for a training dataset middle Construct an LSOPE tree from any column of the input data, assuming the input data is... ,in The attribute value is in plaintext. For plain text labels, The root node of the LSOPE tree. In the LSOPE tree, Represents a node in a tree. Indicated Right child node, express The left child node, express Maximum attribute value, express Minimum attribute value, express The label value, and the specific steps are as follows: Figure 3 As shown.
[0025] Step 1021, for a given input data If it is determined whether T is empty, then go to step 1022; otherwise, go to step 1023.
[0026] Step 1022, using input data Plain text of attribute values Initialize a label node ;
[0027] Step 1023, determine if and If yes, proceed to step 1024; otherwise, proceed to step 1025.
[0028] Step 1024, Proceed to step 1023;
[0029] Step 1025, determine if and If yes, proceed to step 1026; otherwise, proceed to step 1027.
[0030] Step 1026, set Proceed to step 1023;
[0031] Step 1027, determine if Is it a value node, or Is it a label node and If yes, proceed to step 1028; otherwise, proceed to step 1029.
[0032] Step 1028, to insert ;
[0033] Step 1029, assuming the input data is The specific steps for splitting the label node are as follows: Figure 3 As shown;
[0034] Step 10291, for all , judge if If yes, proceed to step 10292; otherwise, proceed to step 10293.
[0035] Step 10292, Proceed to step 1021;
[0036] Step 10293, for all , judge if If yes, proceed to step 10294; otherwise, proceed to step 10295.
[0037] Step 10294, Proceed to step 1021;
[0038] Step 10295, to insert ;
[0039] Step 10296, determine if If there are inconsistent label values, proceed to step 10297; otherwise, proceed to step 10210.
[0040] Step 10297, will Mark as a value node;
[0041] Step 10210, repeat steps 1021 to 1029, for Datasets All attribute columns in the table are used to construct corresponding LSOPE trees, resulting in... One LSOPE tree.
[0042] Step 1031: For any LSOPE tree, mark the left side of the tree with "0" and the right side with "1", and use the binary code on the path from the root node to the node to be encrypted as the prefix of the ciphertext, denoted as... If [10…0] are added after the value to complete the length, the ciphertext representation of the attribute value of the node to be encrypted is as follows:
[0043]
[0044] Step 1032: Encrypt the tag value using a deterministic symmetric encryption algorithm, such as AES;
[0045] Step 1033, repeat steps 1031 and 1032 to obtain The corresponding LSOPE tree Training set ciphertext ;
[0046] Step 104, ciphertext Transmitted to the server.
[0047] A method for predicting the risk of securities assets, comprising:
[0048] (1) First, input a set of historical user securities asset data into the trusted client as a training dataset, and then randomly sample the rows and columns of the dataset to obtain... The system uses several different training sets. Next, by merging plaintext data, an LSOPE tree is constructed for each attribute of each dataset, and the ciphertext of the attribute values is obtained from the LSOPE tree. Then, a deterministic symmetric encryption algorithm is used to encrypt the labels, and all ciphertext is transmitted to the server. See steps 100 to 104 for the specific implementation process.
[0049] (2) After receiving the ciphertext, the server constructs a classification prediction model using the random forest algorithm. See steps 200 to 202 for the specific implementation process.
[0050] (3) Finally, in the prediction stage, for a user's securities asset data to be predicted, the client uses an LSOPE tree to encrypt it, transmits the ciphertext to the server for prediction, and sends the prediction result back to the client for decryption. See steps 300 to 3033 for the specific implementation process.
[0051] Step 200: The server receives the encrypted text.
[0052] Step 2011, ciphertext of any training set traversal Ciphertext of all possible attribute values that could serve as split points for each attribute, and calculation of Gini gain:
[0053]
[0054] in , Indicates the risk category, Represents a set of risk categories, using Represents the set of samples at a node. Indicates in Chinese label The proportion of samples, Any attribute can be divided into a value of an attribute. and Two parts, , , express The category is marked as The sample proportion, express The category is marked as The percentage of samples;
[0055] Step 2012: Select the ciphertext of the attribute value with the largest Gini gain as the dividing attribute value;
[0056] Step 2013: Repeat steps 2011 and 2012 to split the decision tree node until any one of the following three conditions is met, then stop splitting the node: the number of samples is less than a predefined threshold, all samples belong to the same category, and the Gini gain is less than a predefined threshold.
[0057] Step 202, repeat steps 2011, 2012 and 2013 to construct. A decision tree model.
[0058] Step 300: Obtain the securities asset information of the client to be predicted as the prediction data.
[0059] Step 3011, for the attribute value of a predicted data Compare it with the root node of the established LSOPE tree; if... and Then Pass it to the right subtree of the current node, if and Then If the first two conditions are not met, then pass the data to the left subtree of the current node. ciphertext representation of attribute values ;
[0060] Step 3012, repeat step 3011, for the predicted data Each attribute value is encrypted in plaintext to obtain the ciphertext of the predicted data.
[0061] Step 3013: Transmit the encrypted prediction data to the server;
[0062] Step 3021: The server receives the encrypted prediction data.
[0063] Step 3022, utilizing the established A decision tree model classifies and predicts the encrypted data, and obtains... The prediction results are encrypted;
[0064] Step 3023, according to the voting principles from Select the final prediction result ciphertext from the ciphertexts of the prediction results;
[0065] Step 3024: Send the encrypted prediction results back to the client;
[0066] Step 3031: The client receives the encrypted prediction result;
[0067] Step 3032: Decrypt the ciphertext of the prediction result using a deterministic symmetric encryption algorithm to obtain the plaintext of the securities asset risk prediction result;
[0068] Step 3033: The client outputs the securities asset prediction results.
[0069] Obviously, those skilled in the art should understand that the steps of the encryption method for securities asset risk prediction data in the above embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. Furthermore, in some cases, the steps shown or described can be performed in a different order than presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.
Claims
1. A method for encrypting securities asset risk prediction data, characterized in that, First, a training dataset containing historical user securities asset information needs to be established on the trusted client. The securities investment return-loss data in the training dataset is used as label data, and rows and columns of the dataset are randomly sampled separately to obtain... The system uses three different training sets; then, by merging plaintext, it constructs an LSOPE tree for each attribute of each dataset and obtains the attribute value ciphertext through the LSOPE tree; then, it uses a deterministic symmetric encryption algorithm to encrypt the labels and transmits all ciphertext to the server; In the plaintext merging method, based on the binary search tree, LSOPE contains two different types of nodes: label nodes and value nodes. Each node can insert multiple values. A label node contains a group of consecutive attribute values with the same label; a value node contains a group of plaintexts with the same attribute values but different labels. The LSOPE tree is dynamically generated, and all nodes are initialized as label nodes. During the process of adding data to the node to be inserted, node type judgment and type conversion are required: If the node to be inserted is a value node, or a label node and the label of the data to be inserted is the same as the label of the node to be inserted, then the data to be inserted is directly added to the node; if the node to be inserted is a label node and the label of the data to be inserted is inconsistent with the label of the node to be inserted, then node splitting is performed, data in the node to be inserted whose attribute value is less than the attribute value of the data to be inserted is passed to the left subtree of the node to be inserted, and data in the node to be inserted whose attribute value is greater than the attribute value of the data to be inserted is passed to the right subtree of the node to be inserted. Then the label of the node to be inserted is compared with the label of the data to be inserted. If they are inconsistent, then the node is marked as a value node. Will After the LSOPE trees are constructed, obtain the results through the LSOPE trees. The ciphertext value of the corresponding node is grouped, and the left side of the tree is marked with "0" and the right side with "1". The binary code on the path from the root node to the node to be encrypted is used as the prefix of the ciphertext, and [10...0] is added after it to pad the length. After encrypting the attribute value, the deterministic symmetric encryption algorithm is called to encrypt the tag. Then, all encrypted data is transmitted to the server.
2. A method for predicting the risk of securities assets, characterized in that, include: (1) First, a training dataset containing historical user securities asset information is established on a trusted client. The securities investment return-loss data in the training dataset is used as label data, and rows and columns of the training dataset are randomly sampled to obtain... The system uses three different training sets; then, by merging plaintext, it constructs an LSOPE tree for each attribute of each dataset and obtains the attribute value ciphertext through the LSOPE tree; then, it uses a deterministic symmetric encryption algorithm to encrypt the labels and transmits all ciphertext to the server; (2) After receiving the ciphertext, the server constructs a classification prediction model using the random forest algorithm; (3) Finally, in the prediction stage, for a user's securities asset data to be predicted, the client uses an LSOPE tree to encrypt it, transmits the ciphertext to the server for prediction, and sends the prediction result back to the client for decryption. In the plaintext merging method, based on the binary search tree, LSOPE contains two different types of nodes: label nodes and value nodes. Each node can insert multiple values. A label node contains a group of consecutive attribute values with the same label; a value node contains a group of plaintext values with the same attribute but different labels. The LSOPE tree is dynamically generated, and all nodes are initialized as label nodes. During the process of adding data to the node to be inserted, node type judgment and type conversion are required: If the node to be inserted is a value node, or a label node and the label of the data to be inserted is the same as the label of the node to be inserted, then the data to be inserted is directly added to the node; if the node to be inserted is a label node and the label of the data to be inserted is inconsistent with the label of the node to be inserted, then node splitting is performed, data in the node to be inserted whose attribute value is less than the attribute value of the data to be inserted is passed to the left subtree of the node to be inserted, and data in the node to be inserted whose attribute value is greater than the attribute value of the data to be inserted is passed to the right subtree of the node to be inserted. Then the label of the node to be inserted is compared with the label of the data to be inserted. If they are inconsistent, then the node is marked as a value node. Will After the LSOPE trees are constructed, obtain the results through the LSOPE trees. The ciphertext value of the corresponding node is grouped, and the left side of the tree is marked with "0" and the right side with "1". The binary code on the path from the root node to the node to be encrypted is used as the prefix of the ciphertext, and [10...0] is added after it to pad the length. After encrypting the attribute value, the deterministic symmetric encryption algorithm is called to encrypt the tag. Then, all encrypted data is transmitted to the server.
3. The method for predicting securities asset risk according to claim 2, characterized in that, In (2), after receiving the ciphertext, the server constructs a classification prediction model using the random forest algorithm: the server constructs a decision tree model for each of the k groups of ciphertext data. The specific method is to calculate the Gini coefficient of all possible ciphertext values that can be used as split points for each attribute, and select the ciphertext value with the largest Gini gain as the split point.
4. The method for predicting securities asset risk according to claim 3, characterized in that, The formula for calculating the Gini coefficient is as follows: in Indicates the risk category, Represents a set of risk categories, using Represents the set of samples at a node. Indicates in Chinese label Given the sample proportion, the formula for calculating the Gini gain is as follows: in It can be divided into two categories based on any attribute, using a dividing attribute value. and Two parts, , , express The category is marked as The sample proportion, express The category is marked as The percentage of samples.
5. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the securities asset risk prediction method as described in any one of claims 2-4.
6. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that: When the computer program / instructions are executed by the processor, they implement the steps of the securities asset risk prediction method as described in any one of claims 2-4.