Data security exchange method and system based on support vector machine
Through the data security exchange method based on the support vector machine, the original data is preprocessed, feature extraction and encryption processed, which solves the problem of vulnerability in the transmission process of traditional data exchange methods, and realizes data security, efficiency and continuous improvement.
Patent Information
- Application Number
- CN202411652219.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional data exchange methods are vulnerable to attacks during transmission, resulting in data leakage, and the prior art is difficult to effectively ensure the security and accuracy of data.
The data security exchange method based on support vector machines is adopted to ensure the security and privacy protection of the data during transmission by preprocessing the original data, extracting key features, building an encryption model, and encrypting it.
It realizes effective exchange and utilization of data without sacrificing data security, improves the efficiency of data exchange, reduces potential security risks, and ensures continuous improvement and adaptability of the data exchange process through feedback and optimization mechanisms.
Smart Images

Figure CN119513895A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data security, and in particular to a data security exchange method and system based on a support vector machine. Background Art
[0002] In the context of the rapid development of informatization, the security of data exchange has become increasingly prominent. Traditional data exchange methods are vulnerable to attacks during the transmission process, resulting in data leakage. In order to ensure the security of data exchange, an efficient and reliable data exchange method is needed. Support vector machine, as a supervised learning model, is widely used in classification and regression problems. It has significant advantages in processing high-dimensional data and nonlinear problems. Summary of the invention
[0003] In order to solve the technical problems in the above background, the present invention provides a data security exchange method and system based on support vector machine, aiming to ensure the security and accuracy of data during transmission.
[0004] To achieve the above object, the present invention provides a data security exchange method based on support vector machine, the steps comprising:
[0005] Preprocess the collected raw data to obtain processed data;
[0006] Extracting key features based on the processed data;
[0007] Based on the key features, an encryption model is constructed using a support vector machine;
[0008] The encryption model is used to encrypt the original data to achieve secure data exchange.
[0009] Preferably, the principal component analysis technique is used to extract key features from the processed data, and the calculation formula of PCA is:
[0010]
[0011] Among them, W is the projection matrix, C is the covariance matrix of the data, and T represents the transposed matrix.
[0012] Preferably, the method for constructing the encryption model includes: first, adjusting the regularization parameter C to avoid overfitting and improve the model's generalization ability for new data by balancing the complexity of the model and the classification error rate on the training set; then, using a cross-validation strategy, combined with optimization techniques such as grid search, to find the optimal combination of kernel function parameters and regularization parameter C to improve the classification performance of the model; finally, based on the optimal parameter combination found, the SVM model is retrained using the training set data to complete the model construction.
[0013] Preferably, a Gaussian radial basis function is used as a kernel function to distinguish between safe and unsafe data exchange; the formula of the RBF kernel function is:
[0014] K(x i , x j ) = exp(-γ||x i -x j || 2 )
[0015] Among them, γ is the parameter of the kernel function, which controls the width of the function; ||x i -x j || represents the Euclidean distance between two eigenvectors.
[0016] Preferably, the encryption model uses a HASH function to blind the data before data exchange; then, uses an AES encryption algorithm to encrypt the data; finally, uses SSL or TLS secure transmission protocols to establish a secure communication channel for secure data transmission in the network.
[0017] Preferably, after receiving the data, the receiver first performs a decryption operation to restore the original data; then, the receiver uses the locally deployed SVM model to classify and verify the decrypted data:
[0018] In SVM, the decision function for a given test data point is expressed as:
[0019]
[0020] Where: x is the new data point to be classified, N is the number of support vectors, α i is the weight of each support vector (also called Lagrange multiplier), y i is the label (+1 or -1) of the corresponding support vector, K(x i , x) is the kernel function, which calculates the similarity between two data points, b is the intercept of the decision hyperplane, and the kernel function can be expressed as:
[0021] K(x i , x) = exp(-γ||x i -x|| 2 )
[0022] Among them, γ is the parameter of the kernel function, which controls the width of the function;
[0023]
[0024] Among them, max|f(x′)| is the maximum absolute value of the decision function output of all data points in the training set, which is used for normalization;
[0025]
[0026] In this definition, if the absolute value of the output of the decision function |f(x)| of a data point x is greater than a certain threshold τ, then the data exchange is considered safe at that point S(x)=1, otherwise it is considered unsafe S(x)=0.
[0027] The present invention also provides a data security exchange system based on support vector machine, the system is used to implement the above method, including: a collection module, an extraction module, a construction module and an encryption module;
[0028] The acquisition module is used to pre-process the collected raw data to obtain processed data;
[0029] The extraction module is used to extract key features based on the processed data;
[0030] The construction module is used to construct an encryption model using a support vector machine based on the key features;
[0031] The encryption module is used to encrypt the original data using the encryption model to achieve secure data exchange.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] The present invention realizes the effective exchange and utilization of data without sacrificing data security. The invention improves the efficiency of data exchange and reduces potential security risks by strictly controlling and optimizing each link in the data exchange process, and ensures the continuous improvement and adaptability of the data exchange process through continuous feedback and optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0038] Embodiment 1
[0039] like Figure 1 FIG. 1 is a schematic diagram of the method flow of this embodiment, and the steps include:
[0040] S1. Preprocess the collected raw data to obtain processed data.
[0041] The collected raw data set is preprocessed, which includes data cleaning, denoising, standardization, and normalization to obtain processed data. During the data cleaning process, missing values and outliers are identified and removed to ensure the integrity and reliability of the data set. In the denoising step, techniques such as wavelet transform are used to effectively reduce the noise level in the data. Subsequently, through standardization, the numerical range of all features is unified to [-1,1], eliminating the influence of different dimensions. Normalization further ensures that different features have the same importance in model training.
[0042] S2. Extract key features based on the processed data.
[0043] Using techniques such as principal component analysis (PCA), key features are extracted from the processed data. The goal of PCA is to find the direction with the largest variance in the data. The calculation formula of PCA is:
[0044]
[0045] Among them, W is the projection matrix, C is the covariance matrix of the data, and T represents the transposed matrix.
[0046] This step is the key to achieving data dimensionality reduction and improving model performance. Specifically, the covariance matrix of the processed data is calculated to understand the correlation between the features; then, the importance of the principal component is determined according to the size of the eigenvalue by solving the eigenvalue and the corresponding eigenvector of the matrix. The larger the eigenvalue, the more information the corresponding principal component contains; then, the first few most important principal components are selected according to the situation (usually determined by the cumulative contribution rate of the eigenvalue), and these principal components are the key features; finally, the original data is projected onto these principal components through the principal component score calculation to obtain the reduced-dimensional data set, which contains the main information of the original data, while removing redundancy and noise, and improving the efficiency and accuracy of subsequent data processing.
[0047] S3. Based on the key features, the encryption model is constructed using support vector machine.
[0048] After the key features are extracted, support vector machine (SVM) is used to build the encryption model on this basis. The key features extracted in step S2 are used as input to build the encryption model. These key features, as the inherent laws and characteristics of the original data set, provide the necessary feature space and information for the construction of the SVM model. Using key features for training can make the SVM model more focused on the main information and characteristics in the data, thereby improving the classification performance and accuracy of the model. At the same time, the extraction of key features also helps to reduce the risk of overfitting of the model, remove redundant and noisy features, and make the model more robust and reliable.
[0049] In this embodiment, Gaussian radial basis function (RBF) is selected as the kernel function to distinguish between safe and unsafe data exchange. First, the regularization parameter C is adjusted to balance the complexity of the model and the classification error rate on the training set to avoid overfitting and improve the generalization ability of the model to new data. Then, strategies such as cross-validation are used, combined with optimization techniques such as grid search, to find the optimal combination of kernel function parameters and regularization parameter C, so that the model shows the best classification performance on the validation set. Finally, according to the optimal parameter combination found, the SVM model is retrained using the training set data to complete the construction of the model.
[0050] During the model training process, an initial γ value is first selected based on the characteristics and distribution of the data. Subsequently, different γ values are tried through cross-validation and other technical means to observe the performance of the model on the validation set in order to find the optimal γ value. At the same time, an initial value is also set for the regularization parameter C, and the value of C is also adjusted using cross-validation and other methods. By changing the value of C, it is possible to observe how well the model fits the training data and how its generalization ability to new data changes.
[0051] Finally, a C value will be selected that can both fit the training data well and prevent overfitting to a certain extent. When constructing an encryption model based on support vector machine (SVM), the model structure is based on the basic principle of SVM, and its decision function is
[0052]
[0053] Where x is a new data point to be classified, N is the number of support vectors, and α i is the weight (Lagrange multiplier) of each support vector, yi is the label (+1 or -1) of the corresponding support vector, b is the intercept of the decision hyperplane, and the kernel function K(x i , x j ) uses Gaussian radial basis function (RBF), whose formula is
[0054] K(x i , x j ) = exp(-γ||x i -x j || 2 )
[0055] Here γ is the parameter of the kernel function, which controls the width of the function, ||x i ,x j || represents the Euclidean distance between two eigenvectors.
[0056] During the model training process, first select an initial γ value based on the data characteristics and distribution, then try different γ values through cross-validation and other technical means, observe the performance of the model on the validation set to find the optimal γ value. For the regularization parameter C, set the initial value and use cross-validation and other methods to adjust the value of C. By changing the value of C, observe the degree of fit of the model to the training data and the changes in the generalization ability of the model to new data, and finally determine a C value that can both fit the training data well and prevent overfitting.
[0057] Compared with the prior art, the present invention is unique in many aspects. In data processing, the present invention performs comprehensive preprocessing of the original data before building the model, including data cleaning (eliminating missing values and outliers), denoising (using wavelet transform and other technologies), standardization (unifying the feature value range to [-1,1]) and normalization processing to ensure the data quality and the equal importance of different features in model training, while the prior art may not be perfect in the data preprocessing link. In terms of feature extraction, the present invention uses principal component analysis (PCA) technology to extract key features, determines the importance of principal components by calculating the covariance matrix, solving eigenvalues and eigenvectors, selects the first few important principal components as key features, realizes data dimensionality reduction and removes redundancy and noise, and improves data processing efficiency and accuracy. The prior art may not perform feature extraction or use other less effective methods. In terms of model construction and optimization, the present invention fine-tunes the regularization parameter C and the kernel function parameter γ, avoids overfitting by balancing the model complexity and classification error rate, uses cross-validation combined with optimization techniques such as grid search to find the optimal parameter combination, and retrains the model. The existing technology may not be fine enough for parameter adjustment or does not use effective optimization technology. In terms of security processing, the encryption model of the present invention uses HASH function blinding processing before data exchange to ensure data anonymity, and then uses AES encryption algorithm to encrypt and protect confidentiality. Finally, SSL / TLS secure transmission protocol is used to establish a secure channel. The receiver also performs decryption and classification verification to ensure data consistency and accuracy, and establishes feedback and optimization mechanisms. The existing technology may not be comprehensive enough in the security processing link. Through innovative designs in these aspects, the present invention has obvious advantages over the existing technology in terms of data security exchange, effectively improves data exchange efficiency, reduces security risks, and ensures continuous improvement and adaptability of the data exchange process.
[0058] Finally, the optimal parameter combination is found through cross-validation and grid search techniques to ensure that the model has good classification performance on unknown data.
[0059] Specifically, a parameter space is first set, which includes the regularization parameter C and the parameter γ of the RBF kernel function. Then, all possible combinations of parameter values are systematically traversed in this parameter space through the grid search technique. For each set of parameters, the data set is divided into a training set and a validation set using the cross-validation method. The training set is used to train the SVM model, while the validation set is used to evaluate the model performance. This process is repeated many times, using different data segmentation methods each time to ensure the comprehensiveness and accuracy of the evaluation. Finally, based on the performance evaluation results on the validation set, the set of parameters that gives the model the highest classification accuracy and the lowest risk of overfitting is selected as the optimal parameter combination.
[0060] S4. Use encryption model to encrypt original data to achieve secure data exchange.
[0061] Before data exchange, the encryption model will blind and encrypt the data. Blinding ensures the anonymity of the data by applying technologies such as HASH functions. This process converts sensitive information or identifiers of the data into a hash value that is difficult to trace, thereby ensuring the anonymity of the data, making it difficult for unauthorized parties to easily identify its original source or content even if they intercept the data.
[0062] Subsequently, the data was encrypted using encryption algorithms such as AES to protect the confidentiality of the data during transmission. This encryption algorithm provides high-intensity security protection and can effectively prevent the data from being stolen or tampered with during transmission. Through blinding and encryption processing, the security and privacy protection of the data during the exchange process are ensured, providing reliable protection for the secure transmission of data.
[0063] In the secure transmission stage, secure transmission protocols such as SSL / TLS are used to establish a secure communication channel to ensure the security of data transmission in the network. After receiving the data, the receiver first performs a decryption operation to restore the original data. Subsequently, the receiver uses the locally deployed SVM model to classify and verify the decrypted data.
[0064] Specifically, the decrypted data is input into the SVM model, and the model predicts the classification of the data points based on the previously trained classification boundaries and parameters. Subsequently, the prediction results are compared with the expected classification labels to evaluate the consistency and accuracy of the data. If the prediction results are consistent with expectations, it means that the data has maintained its integrity and accuracy during transmission; if there are differences, it may indicate that the data has been tampered with during transmission or there are other problems, which require further investigation and processing. Through this classification verification step, this embodiment ensures the reliability and security of data exchange.
[0065] This step verifies the consistency and accuracy of the data, while ensuring the generalization ability of the model on new data. Finally, in the feedback and optimization stage, based on the results, the encryption model is adjusted and the model is retrained to further improve the performance of the model. At the same time, an audit and monitoring mechanism is established to record and analyze the data exchange process, ensure compliance, and effectively track and handle potential security issues. The classification verification method is as follows:
[0066] In SVM, the decision function for a given test data point is expressed as:
[0067]
[0068] Where: x is the new data point to be classified, N is the number of support vectors, α iis the weight of each support vector (also called Lagrange multiplier), y i is the label (+1 or -1) of the corresponding support vector, K(x i , x) is the kernel function, which calculates the similarity between two data points, b is the intercept of the decision hyperplane, and the kernel function can be expressed as:
[0069] K(x i , x) = exp(-γ||x i -x|| 2 )
[0070] Among them, γ is the parameter of the kernel function, which controls the width of the function.
[0071]
[0072] Among them, max|f(x′)| is the maximum absolute value of the decision function output of all data points in the training set, which is used for normalization.
[0073]
[0074] In this definition, if the absolute value of the output of the decision function |f(x)| of a data point x is greater than a certain threshold τ, then the data exchange is considered safe at that point S(x)=1, otherwise it is considered unsafe S(x)=0.
[0075] Embodiment 2
[0076] This embodiment also provides a data security exchange system based on a support vector machine, including: an acquisition module, an extraction module, a construction module and an encryption module; the acquisition module is used to pre-process the collected original data to obtain processed data; the extraction module is used to extract key features based on the processed data; the construction module is used to construct an encryption model based on the key features using a support vector machine; the encryption module is used to encrypt the original data using the encryption model to achieve data security exchange.
[0077] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A data security exchange method based on support vector machine, characterized in that the steps include: Preprocess the collected raw data to obtain processed data; Extracting key features based on the processed data; Based on the key features, an encryption model is constructed using a support vector machine; The encryption model is used to encrypt the original data to achieve secure data exchange.
2. The data security exchange method based on support vector machine according to claim 1 is characterized in that: The principal component analysis technique is used to extract key features from the processed data. The calculation formula of PCA is: Among them, W is the projection matrix, C is the covariance matrix of the data, and T represents the transposed matrix.
3. The data security exchange method based on support vector machine according to claim 1 is characterized in that: The method for constructing the encryption model includes: first, adjusting the regularization parameter C to avoid overfitting and improve the generalization ability of the model to new data by balancing the complexity of the model and the classification error rate on the training set; then, using a cross-validation strategy, combined with optimization techniques such as grid search, to find the optimal combination of kernel function parameters and regularization parameter C to improve the classification performance of the model; finally, according to the optimal parameter combination found, the SVM model is retrained using the training set data to complete the construction of the model.
4. The data security exchange method based on support vector machine according to claim 3 is characterized in that: Gaussian radial basis function is used as the kernel function to distinguish between safe and unsafe data exchange; the formula of RBF kernel function is: K(x i ,x j )=exp(-γ||x i -x j || 2 ) Among them, γ is the parameter of the kernel function, which controls the width of the function; ||x i -x j || represents the Euclidean distance between two eigenvectors.
5. The data security exchange method based on support vector machine according to claim 1 is characterized in that: The encryption model uses a HASH function to blind the data before data exchange; then, an AES encryption algorithm is used to encrypt the data; and finally, an SSL or TLS secure transmission protocol is used to establish a secure communication channel for secure data transmission in the network.
6. The data security exchange method based on support vector machine according to claim 5 is characterized in that: After receiving the data, the receiver first performs a decryption operation to restore the original data. Then, the receiver uses the locally deployed SVM model to classify and verify the decrypted data: In SVM, the decision function for a given test data point is expressed as: Where: x is the new data point to be classified, N is the number of support vectors, α i is the weight of each support vector, yi is the label of the corresponding support vector (+1 or -1), K(x i ,x) is the kernel function, which calculates the similarity between two data points, b is the intercept of the decision hyperplane, and the kernel function can be expressed as: K(x i ,x)=exp(-γ||x i -x|| 2 ) Among them, γ is the parameter of the kernel function, which controls the width of the function; Among them, max|f(x′)| is the maximum absolute value of the decision function output of all data points in the training set, which is used for normalization; If the absolute value of the output of the decision function |f(x)| of the data point x is greater than a certain threshold τ, the data exchange at point x is considered safe S(x)=1, otherwise it is considered unsafe S(x)=0.
7. A data security exchange system based on support vector machine, the system is used to implement the method according to any one of claims 1 to 6, characterized in that: include: Acquisition module, extraction module, construction module and encryption module; The acquisition module is used to pre-process the collected raw data to obtain processed data; The extraction module is used to extract key features based on the processed data; The construction module is used to construct an encryption model using a support vector machine based on the key features; The encryption module is used to encrypt the original data using the encryption model to achieve secure data exchange.
Citation Information
Patent Citations
Chaotic encryption transmission method for block chain identity consensus authentication
CN117997621A
Public verifiable privacy protection SVM classification method
CN118074942A
Equipment fault diagnosis method and system based on deep learning
CN118626946A