Data transmission method, device, equipment and storage medium
By performing projection clustering and coding encryption on the data to be transmitted, the problem of damage caused by data transmission failure in traditional data transmission methods is solved, and efficient and safe massive data transmission is achieved.
Patent Information
- Application Number
- CN202410824132.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Traditional data transmission methods are difficult to effectively manage and process large amounts of data, and face problems such as bandwidth limitations, network congestion, and data security threats, making data corruption prone to occur during data transmission.
By obtaining the data to be transmitted, constructing a projection plane for clustering, dividing data subsets and generating error correction codes based on data block size, encoding and encryption, and ultimately achieving fast and safe transmission of data.
It improves the security and robustness of data, ensures the fast and safe transmission of massive data, and avoids damage during data transmission.
Smart Images

Figure CN118381582B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data communication technology, and in particular to data transmission methods, devices, equipment and storage media. Background Art
[0002] With the widespread application of the Internet, the Internet of Things (IoT) and various smart devices, the amount of data has exploded. Traditional single servers or centralized storage systems are difficult to effectively manage and process such a huge amount of data. With the increasing popularity of big data and cloud computing, the demand for efficient and reliable data transmission is growing. Intelligent data processing, optimized encoding strategies and precise transmission control are important ways to meet the needs of fast and secure data transmission.
[0003] As the amount of data grows, the demand for high-capacity, high-speed, and high-durability storage media is also increasing. Traditional data transmission methods often face problems such as bandwidth limitations, network congestion, and data security threats. In order to adapt to the ever-changing business needs and technical environment, how to efficiently and securely transfer large amounts of data from the source to the target has become a major challenge during the data transmission process.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a data transmission method, device, equipment and storage medium, aiming to solve the technical problem of data corruption caused by transmission failure during large-scale data transmission.
[0006] To achieve the above object, the present application proposes a data transmission method, which includes:
[0007] Get the data to be transmitted;
[0008] Constructing a projection plane according to the data to be transmitted, and clustering the data to be transmitted based on the projection plane to obtain a data subset;
[0009] Dividing the data subset into a plurality of data blocks according to a preset size ratio between the data blocks;
[0010] A reference error correction code is obtained according to the size of the data block, a plurality of the data blocks are encoded based on the reference error correction code to obtain a code to be transmitted, and data is transmitted based on the code to be transmitted.
[0011] In one embodiment, constructing a projection plane according to the data to be transmitted, and clustering the data to be transmitted based on the projection plane to obtain a data subset includes:
[0012] Obtaining a projection vector according to the data to be transmitted, and constructing a projection plane according to the projection vector;
[0013] Projecting the data to be transmitted onto the projection plane to obtain a data feature vector;
[0014] Clustering the data feature vectors multiple times to obtain multiple clustering data sets;
[0015] A data classification model is constructed according to each cluster data set, and the data feature vector is classified based on the data classification model to obtain a data subset.
[0016] In one embodiment, obtaining a projection vector according to the data to be transmitted, and constructing a projection plane according to the projection vector, includes:
[0017] Acquire standardization parameters, and perform standardization processing on the data to be transmitted based on the standardization parameters to obtain standard data;
[0018] Obtaining a correlation coefficient according to the standard data, and constructing a covariance matrix for the standard data according to the correlation coefficient;
[0019] Obtaining the eigenvalues and eigenvectors of the data to be transmitted according to the covariance matrix;
[0020] The eigenvector corresponding to the maximum eigenvalue is used as the projection vector.
[0021] In one embodiment, the data classification model is constructed according to each cluster data set, and the data feature vector is classified based on the data classification model to obtain a data subset, including:
[0022] Obtaining an initial classification model, using part of the data in each clustering data set as training data to train each initial classification model, and obtaining a data classification model;
[0023] Input the data feature vector into each data classification model to obtain multiple initial data categories;
[0024] The initial data category with the most repeated categories among the multiple initial data categories is used as a reference category;
[0025] The data feature vectors of the same reference category are taken as data subsets.
[0026] In one embodiment, dividing the data subset into a plurality of data blocks according to a preset size ratio between the data blocks includes:
[0027] Obtaining a preset size ratio between each data block and a data volume of the data subset;
[0028] Obtaining a reference data amount for each data block according to the preset size ratio and the data amount;
[0029] The data subset is divided based on the reference data amount to obtain multiple data blocks.
[0030] In one embodiment, obtaining a reference error correction code according to the size of the data block, encoding the multiple data blocks based on the reference error correction code to obtain the code to be transmitted includes:
[0031] Calculate the code length and the information bit length according to the size of the data block, and obtain the supervision bit length according to the code length and the information bit length;
[0032] Obtaining a maximum number of error corrections according to the supervision bit length;
[0033] Obtaining a minimum code distance according to the maximum number of error corrections, the code length, and the information bit length;
[0034] Using the maximum number of error corrections, the code length, the minimum code distance, the supervision bit length, and the information bit length as a reference error correction code;
[0035] The multiple data blocks are encoded based on a reference error correction code to obtain a code to be transmitted.
[0036] In one embodiment, encoding the multiple data blocks based on the reference error correction code to obtain the code to be transmitted includes:
[0037] Encoding the plurality of data blocks based on the reference error correction code to obtain a plurality of initial encoded data;
[0038] Generate a reference hash value according to the hash chain, and determine a replacement position and a replacement direction based on the reference hash value;
[0039] The plurality of initial coded data are permuted according to the permutation position and permutation direction to obtain the code to be transmitted.
[0040] In addition, to achieve the above purpose, the present application also proposes a data transmission device, the data transmission device comprising:
[0041] A data acquisition module, used to acquire data to be transmitted;
[0042] A data partitioning module, used to construct a projection plane according to the data to be transmitted, and cluster the data to be transmitted based on the projection plane to obtain a data subset;
[0043] The data partitioning module is further used to partition the data subset into a plurality of data blocks according to a preset size ratio between the data blocks;
[0044] The data transmission module is used to obtain a reference error correction code according to the preset size, encode the multiple data blocks based on the reference error correction code to obtain the code to be transmitted, and quickly transmit data based on the code to be transmitted.
[0045] In addition, to achieve the above objectives, the present application also proposes a data transmission device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data transmission method described above.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transmission method described above are implemented.
[0047] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.
[0048] One or more technical solutions proposed in this application have at least the following technical effects:
[0049] By projecting the data to be transmitted and clustering the features of the projected data, the data blocks divided based on the clustered data subsets are transmitted, and the data blocks are encoded and encrypted, the data division accuracy and transmission efficiency are guaranteed while improving the security and robustness of the data, realizing the fast and secure transmission of massive data and avoiding data damage during data transmission due to large data volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0052] Figure 1 A flowchart of the first embodiment of the data transmission method of the present application is provided;
[0053] Figure 2 A data block size coefficient relationship diagram provided for an embodiment of the data transmission method of the present application;
[0054] Figure 3 A flowchart of the second embodiment of the data transmission method of the present application is provided;
[0055] Figure 4 This is a schematic diagram of the module structure of the data transmission device according to an embodiment of the present application;
[0056] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the data transmission method in the embodiment of the present application. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0059] The main solution of the embodiment of the present application is: obtain data to be transmitted; construct a projection plane according to the data to be transmitted, cluster the data to be transmitted based on the projection plane to obtain a data subset; divide the data subset into multiple data blocks according to a preset size ratio between each data block; obtain a reference error correction code according to the size of the data block, encode multiple data blocks based on the reference error correction code to obtain a code to be transmitted, and transmit data based on the code to be transmitted.
[0060] In this embodiment, for the convenience of description, the following description is made by taking identification of a data transmission device as the execution subject.
[0061] With the widespread application of the Internet, the Internet of Things (IoT) and various smart devices, the amount of data has exploded. Traditional single servers or centralized storage systems are difficult to effectively manage and process such a huge amount of data. With the increasing popularity of big data and cloud computing, the demand for efficient and reliable data transmission is growing. Intelligent data processing, optimized encoding strategies and precise transmission control are important ways to meet the needs of fast and secure data transmission.
[0062] As the amount of data grows, the demand for high-capacity, high-speed, and high-durability storage media is also increasing. Traditional data transmission methods often face problems such as bandwidth limitations, network congestion, and data security threats. In order to adapt to the ever-changing business needs and technical environment, how to efficiently and securely transfer large amounts of data from the source to the target has become a major challenge during the data transmission process.
[0063] The present application provides a solution that ensures data division accuracy and transmission efficiency while improving data security and robustness, achieving fast and secure transmission of massive data and avoiding data damage during data transmission due to large data volumes.
[0064] It can be seen from the above embodiments that the present application discloses a data transmission method, device, equipment and storage medium, which relates to the field of data communication technology, and discloses: obtaining data to be transmitted; constructing a projection plane according to the data to be transmitted, clustering the data to be transmitted based on the projection plane to obtain a data subset; dividing the data subset into multiple data blocks according to a preset size ratio between each data block; obtaining a reference error correction code according to the size of the data block, encoding multiple data blocks based on the reference error correction code to obtain a code to be transmitted, and transmitting data based on the code to be transmitted; the method projects the data to be transmitted and clusters the data features after the projection, transmits the data blocks divided based on the clustered data subsets, and encrypts the data block codes, thereby ensuring the accuracy of data division and transmission efficiency, while improving the security and robustness of the data, and realizing the rapid and secure transmission of massive data.
[0065] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a data transmission device, etc. The following takes a data transmission device as an example to illustrate this embodiment and the following embodiments.
[0066] Based on this, the embodiment of the present application provides a data transmission method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the data transmission method of the present application.
[0067] In this embodiment, the data transmission method includes steps S10 to S40:
[0068] Step S10, obtaining data to be transmitted.
[0069] It is understandable that the data to be transmitted can be data that is about to be segmented for transmission. At the same time, the data to be transmitted can be data with a large amount of data, and can be data of any type, such as user information data, operation information data, order information, electricity usage information and other related data. This embodiment only involves data processing and does not limit the type of data.
[0070] Step S20: construct a projection plane according to the data to be transmitted, and cluster the data to be transmitted based on the projection plane to obtain a data subset.
[0071] It can be understood that the projection plane may refer to mapping high-dimensional data into one or more low-dimensional, more manageable and processable abstract spaces by performing some form of transformation or dimensionality reduction operations on the high-dimensional data in data processing or data analysis.
[0072] It should be understood that constructing a projection plane can be to select the feature set with the highest discrimination and information entropy from the data to be transmitted, and use the subspace corresponding to the feature as the projection plane. The data selection with the highest discrimination and information entropy can be obtained through principal component analysis, linear judgment analysis, information entropy analysis, etc.
[0073] It should be emphasized that by constructing a projection plane for the data to be transmitted and clustering it, the redundancy between the data is effectively identified and reduced, so that the amount of data transmitted is reduced, thereby speeding up the data transmission.
[0074] It is understandable that clustering the data to be transmitted based on the projection plane to obtain a data subset can be achieved by first projecting the data to be transmitted onto the projection plane, obtaining data features of each data to be transmitted on the projection plane, and performing feature clustering based on the features, and each clustering result is a data subset.
[0075] It should be noted that the data to be transmitted can be clustered by various clustering methods such as principal component analysis, factor analysis, independent component analysis, etc. Different clustering methods can be selected according to different requirements for clustering results. This embodiment does not limit this and can be selected according to actual conditions.
[0076] It is understandable that by mapping each data to be transmitted to the projection plane, data features of each data to be transmitted can be obtained, and each cluster (also understood as a clustering result) obtained after clustering the data features is a data subset.
[0077] Step S30: dividing the data subset into a plurality of data blocks according to a preset size ratio between the data blocks.
[0078] It is understandable that the preset size ratio can be a preset size ratio of each data block. In simple terms, it is determined that the data to be transmitted is divided into 100 data blocks for transmission, and the preset size ratio is: 1:2 i :...:2 n :...:1, all the data to be transmitted are divided into 100 data blocks according to the preset ratio.
[0079] It should be noted that data blocks can divide the data to be transmitted into a series of data units of equal size or changing according to certain rules. There is a certain relationship between the units. For example, the initial position of each data block stores the serial number of the data block and the storage positions of the previous and next data blocks.
[0080] In a feasible implementation, step S30 may include steps A31 to A33:
[0081] Step A31, obtaining a preset size ratio between each data block and the data volume of the data subset.
[0082] It is understandable that the number of data blocks is determined according to the size of the quantity, and then the size ratio between each data block is determined based on the number of data blocks. For example, the data volume is 2000 and it is determined to be divided into 50 data blocks. Then the data ratio based on the 50 data blocks is determined to be 1:2:3:...:2:1; the size of each data volume and the number of each data block and the ratio between the data block sizes can be preset, and the specific setting ratio can be adjusted according to the actual situation.
[0083] It is understandable that the data volume of a data subset may refer to the size of the data included in the data itself, and the data volume is directly related to the scale or amount of the data, and may be measured in units such as bytes (B), kilobytes (KB), megabytes (MB), gigabytes (GB), and terabytes (TB).
[0084] It should be noted that, in this embodiment, the preset ratio between the data blocks may be set by referring to the following formula:
[0085]
[0086] Among them, M k Indicates the size of each data block, M total Indicates the amount of data of each data; n indicates the total number of data blocks; where a and b are size coefficients, which can be set in advance or refer to the following formula:
[0087]
[0088] Among them, T c Indicates the execution time of the data in the data block; T i represents the input time of the data in the data block; T0 represents the output time of the data in the data block, T c 、T i The relationship between T0 can be referred to Figure 2 , Figure 2 In the data block size coefficient relationship diagram, the horizontal axis is the processing time of the data in the data block in the data to be transmitted, and the vertical axis is the processing action on the data block.
[0089] Step A32, obtaining a reference data volume of each data block according to the preset size ratio and the data volume.
[0090] It is understandable that the reference data volume can be understood as the total data volume divided according to a preset size ratio, and the total data volume can be obtained by adding up the various reference data volumes, that is, the data volume described in this embodiment.
[0091] In a specific implementation, the data volume is 1000, the preset number of data blocks is 5, and the ratio between each data block is 1:6:1.5:1:0.5, then the reference data volume is 100, 600, 150, 100, and 50.
[0092] Step A33, dividing the data subset based on the reference data amount to obtain multiple data blocks.
[0093] It is understandable that it is known how much data volume each data block should have (ie, the reference data volume), and multiple data blocks are obtained by dividing based on the reference data volume.
[0094] In this embodiment, by dividing the data into subsets, storage and computing resources can be used more efficiently. The size ratio control of the data blocks helps to balance the processing burden of different parts of the data, making resource allocation more reasonable and reducing the phenomenon of idle or overused resources.
[0095] The above are only feasible implementations of step S30 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S30.
[0096] Step S40, obtaining a reference error correction code according to the size of the data block, encoding the multiple data blocks based on the reference error correction code to obtain a code to be transmitted, and transmitting data based on the code to be transmitted.
[0097] It can be understood that the reference error correction code may be a different error correction code determined for different data block sizes.
[0098] It is understandable that dividing the data to be transmitted into multiple data blocks will inevitably increase the number of data packets in the network, thereby increasing the probability of data conflicts and transmission errors; the transmission of a large number of data blocks and data packets may result in partial loss or errors, which will affect the final recovery of the complete data.
[0099] It should be understood that the error correction code can correct partial data loss and can also correct large-segment data loss. This embodiment encodes data through the error correction code to improve the consistency and security of data before and after transmission.
[0100] It should be noted that the reference error correction code is obtained according to the size of the data block, and the multiple data blocks are encoded based on the reference error correction code to obtain the code to be transmitted, including: calculating the code length and the information bit length according to the size of the data block, and obtaining the supervision bit length according to the code length and the information bit length; obtaining the maximum number of error corrections according to the supervision bit length; obtaining the minimum code distance according to the maximum number of error corrections, the code length, and the information bit length; using the maximum number of error corrections, the code length, the minimum code distance, the supervision bit length, and the information bit length as a reference error correction code; encoding the multiple data blocks based on the reference error correction code to obtain the code to be transmitted.
[0101] It can be understood that for each data block, relevant information of the data block, such as the maximum number of error corrections, the code length, the minimum code distance, the supervision bit length and the information bit length, is calculated based on the selected error correction code algorithm (such as Hamming code, Reed-Solomon code, BCH code, etc.).
[0102] In a specific implementation, after encoding a data block, the data block may have information bits and check bits added to it. The encoded code length can be obtained based on the original data block and the information bits and check bits; the original data length to be transmitted in the data block is the information bit length.
[0103] It should be noted that the code length minus the information bit length is equal to the supervision bit length; the supervision bit length is equal to twice the maximum number of error corrections; the code length minus the information bit length plus 1 is equal to the minimum code distance.
[0104] Among them, it should be noted that the encoding of the multiple data blocks based on the reference error correction code to obtain the code to be transmitted can be encoding the multiple data blocks based on the reference error correction code to obtain multiple initial encoded data; generating a reference hash value according to the hash chain, and determining a replacement position and a replacement direction based on the reference hash value; replacing the multiple initial encoded data according to the replacement position and the replacement direction to obtain the code to be transmitted; it can also be based on the error correction code and the content in the data block to obtain the redundant bits of the data block, and obtain the code to be transmitted based on the redundant bits plus the data in the original data block, or it can be other encoding methods, which are not limited to this in this embodiment.
[0105] The present embodiment provides a data transmission method, which projects the data to be transmitted and clusters the features of the projected data, transmits the data blocks divided based on the clustered data subsets, and encodes and encrypts the data blocks, thereby ensuring the accuracy of data division and transmission efficiency while improving the security and robustness of the data, realizing fast and secure transmission of massive data, and avoiding data damage during data transmission due to large data volume.
[0106] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S20, the data transmission method further includes steps S21 to S24:
[0107] Step S21, obtaining a projection vector according to the data to be transmitted, and constructing a projection plane according to the projection vector.
[0108] It can be understood that the projection vector is obtained based on the data to be transmitted, and may be data with a larger eigenvalue in the data to be transmitted. A projection plane may be constructed based on two projection vectors.
[0109] In a feasible implementation, step S21 may include steps A211 to A214:
[0110] Step A211, obtaining standardization parameters, and performing standardization processing on the data to be transmitted based on the standardization parameters to obtain standard data.
[0111] It is understandable that the standardization parameters may be pre-acquired parameters required for use in the process of standardizing the data to be transmitted.
[0112] It should be noted that the standardization processing of the data to be transmitted based on the standardization parameter can refer to the following formula:
[0113]
[0114] Among them, S j represents the standard deviation, i.e. the standardized parameter; X ij represents standard data, where the data to be transmitted is divided into multiple data sets, the data in each data set is different, then there are k data sets, i and j represent the amount of data in any two data sets and i is not less than j.
[0115] Step A212, obtaining a correlation coefficient according to the standard data, and constructing a covariance matrix for the standard data according to the correlation coefficient.
[0116] It is understandable that the correlation coefficient obtained according to the standard data can refer to the following formula:
[0117]
[0118] Among them, W pq Denotes the correlation coefficient, and the covariance matrix of the standard data is constructed according to the correlation coefficient as follows:
[0119]
[0120] Wherein, Σ represents the covariance matrix, p and q represent that each data to be transmitted is divided into multiple data sets, and m represents the total number of data in the data set.
[0121] Step A213, obtaining the eigenvalues and eigenvectors of the data to be transmitted according to the covariance matrix.
[0122] It is understandable that the covariance matrix is a matrix used to describe the relationship between multidimensional random variables. For a data set with n variables, the covariance matrix is an n×n symmetric matrix, where the elements on the diagonal are the variances of each variable, and the elements on the off-diagonal are the covariances between the corresponding two variables. The value of the covariance reflects the consistency of the changing trends of the two variables: a positive value indicates that the two tend to change in the same direction (positive correlation), a negative value indicates an opposite change (negative correlation), and close to zero indicates no obvious linear relationship.
[0123] It should be noted that obtaining the eigenvalues and eigenvectors of the data to be transmitted according to the covariance matrix can be performed by performing eigenvalue decomposition on the covariance matrix, and finding the vector v (eigenvector) and the scalar λ (eigenvalue) by solving the equation Cv = λv, where C is the covariance matrix, and λ multiplied by v is equal to the result of the matrix C acting on v.
[0124] Step A214, taking the eigenvector corresponding to the maximum eigenvalue as the projection vector.
[0125] It should be noted that among all eigenvalues and corresponding eigenvectors, the eigenvalues are sorted by size. The size of the eigenvalue reflects the variance of the data in the direction of the corresponding eigenvector. The largest eigenvalue corresponds to the most important eigenvector, that is, the direction in which the data changes the most.
[0126] It should be noted that the direction in which the data changes the most includes the main information or variability in the data. In data dimensionality reduction, feature extraction, and data analysis, constructing a projection plane based on the feature vector in this direction to project the data to be transmitted can reduce the complexity of the data as much as possible with the least loss of information.
[0127] In this implementation, by calculating the eigenvalues of the data to be transmitted, the data vector with the largest eigenvalue is used as the projection vector to construct the projection plane. The direction corresponding to the largest eigenvalue is the direction with the largest data change, that is, the direction containing the most information. By projecting the data onto this direction, the variability information of the original data can be retained as much as possible, and relatively unimportant information can be discarded, thereby maintaining the main structure and characteristics of the data while reducing the dimension.
[0128] The above are only feasible implementations of step S21 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S21.
[0129] Step S22, projecting the data to be transmitted onto the projection plane to obtain a data feature vector.
[0130] It can be understood that the data feature vector may be a feature vector obtained by projecting each data to be transmitted onto the projection plane.
[0131] It should be noted that each data point to be transmitted is mathematically operated along a specific direction (in this case, the normal direction of the projection plane or its basis vector) so that the data point is mapped to this two-dimensional plane. This step reduces the dimensionality of the data while trying to preserve the key structure or variability of the data.
[0132] Step S23, clustering the data feature vectors multiple times to obtain multiple clustered data sets.
[0133] It should be noted that multiple clustering of the data feature vectors can be performed by first selecting multiple clustering centers from multiple data feature vectors for initialization, calculating the distance between each data feature vector and the clustering center, and classifying each data feature vector as the clustering center with the closest distance to obtain an initial clustering result; using the median data feature vector of each data feature vector in the initial clustering result as a new clustering center, clustering again based on the new clustering center until the clustering center does not change, and obtaining the final clustering result is the clustering result obtained after repeatedly generating a preset number of clustering centers as the final clustering result; wherein the preset number can be 5, 8, etc., and this embodiment is not limited to this.
[0134] It is understandable that the clustering result obtained by the last clustering is used as the clustering data set.
[0135] Step S24: construct a data classification model according to each cluster data set, and classify the data feature vector based on the data classification model to obtain a data subset.
[0136] In a feasible implementation, step S24 may include steps A241 to A244:
[0137] Step A241, obtaining an initial classification model, using part of the data in each clustering data set as training data to train each initial classification model, and obtaining a data classification model.
[0138] It is understandable that the classification model can be a logistic regression classification model, a support vector machine classification model, a decision tree classification model, etc., and any one of them can be selected as the initial classification model.
[0139] It is understandable that the model parameters of the initial classification model before training are randomly generated, and after training on various clustering data sets, the model parameters are optimized to obtain a data classification model.
[0140] It should be noted that training the classification model with clustered data can enable the model to more accurately grasp the differences in the characteristics of data of different categories, so that more accurate data categories can be obtained more quickly when classifying other data in the future.
[0141] It should be understood that the partial data in the clustering data set may be 30%-40% of the data randomly selected from the clustering data set as training data.
[0142] Step A242, input the data feature vector into each data classification model to obtain multiple initial data categories.
[0143] It is understandable that the data classification model can determine the probability that a data belongs to the target type. For example, model A can obtain a 90% probability that data a belongs to category N; model B can obtain a 50% probability that data a belongs to category C. Each data classification model is used to determine the probability of a data category.
[0144] It should be noted that when the probability that a data feature vector belongs to the data category exceeds 80%, the data category is used as the initial data category of the data feature vector.
[0145] It is understandable that a data feature vector may have multiple initial data categories or may have no initial data category.
[0146] Step A243, taking the initial data category with the most repeated categories among the multiple initial data categories as the reference category.
[0147] It can be understood that when the data feature vector does not have an initial data category, the maximum similarity probability of the data feature vector in each model category is compared with the probability threshold. If the maximum similarity probability is greater than the probability threshold, the model type corresponding to the maximum similarity probability is used as the reference category of the data feature; if it is less than or equal to the probability threshold, the data feature vector is eliminated as an interference vector.
[0148] Step A244, taking the data feature vectors of the same reference category as the data subset.
[0149] It is understandable that through the two divisions, the feature vectors with high correlation can be used as data subsets.
[0150] In this embodiment, through unsupervised clustering, we can initially understand the natural grouping of data, which helps the initial classification model constructed later to better adapt to the distribution characteristics of the data, refine the classification based on the existing data structure, and may achieve higher classification accuracy than a single method. In particular, when the reference category is determined based on the category with the most repetitions, the most representative category is automatically selected, and a series of data with a higher correlation is obtained as a data subset.
[0151] The above are only feasible implementations of step S24 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S24.
[0152] This embodiment provides a data transmission method, which constructs a projection plane through the projection vector obtained from the data to be transmitted, thereby reducing the dimensionality of high-dimensional data, removing redundant information in the data, focusing on the main features of the data, and helping to improve the efficiency of data processing; the further combination of projection and clustering can represent the inherent structure of the data to be transmitted, ensure the distribution and correlation between the original data to be transmitted, and make the data subsets obtained after classification and clustering more compact, which is conducive to reducing the cost of data transmission and storage.
[0153] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data transmission method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0154] This application also provides a data transmission device, please refer to Figure 4 , the data transmission device comprises:
[0155] A data acquisition module 10, used to acquire data to be transmitted;
[0156] A data partitioning module 20, configured to construct a projection plane according to the data to be transmitted, and cluster the data to be transmitted based on the projection plane to obtain a data subset;
[0157] The data partitioning module 20 is further configured to partition the data subset into a plurality of data blocks according to a preset size ratio between the data blocks;
[0158] The data transmission module 30 is used to obtain a reference error correction code according to the preset size, encode the multiple data blocks based on the reference error correction code to obtain a code to be transmitted, and quickly transmit data based on the code to be transmitted.
[0159] The data transmission device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problem of data corruption caused by transmission failure during large-scale data transmission. Compared with the prior art, the beneficial effects of the data transmission device provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and other technical features in the data transmission device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0160] The present application provides a data transmission device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transmission method in the above-mentioned embodiment one.
[0161] Reference below Figure 5 , which shows a schematic diagram of the structure of a data transmission device suitable for implementing the embodiment of the present application. The data transmission device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The data transmission device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0162] like Figure 5As shown, the data transmission device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data transmission device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data transmission device to communicate with other devices wirelessly or by wire to exchange data. Although the data transmission device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0163] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0164] The data transmission device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problem of data corruption caused by transmission failure during large-scale data transmission. Compared with the prior art, the beneficial effects of the data transmission device provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and other technical features in the data transmission device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0165] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0166] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0167] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data transmission method in the above-mentioned embodiment.
[0168] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0169] The computer-readable storage medium may be included in the data transmission device; or may exist independently without being assembled into the data transmission device.
[0170] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by a data transmission device, the data transmission device enables the following: to obtain data to be transmitted; to construct a projection plane according to the data to be transmitted, and to cluster the data to be transmitted based on the projection plane to obtain a data subset; to divide the data subset into multiple data blocks according to a preset size ratio between each data block; to obtain a reference error correction code according to the size of the data block, to encode multiple data blocks based on the reference error correction code to obtain a code to be transmitted, and to transmit data based on the code to be transmitted.
[0171] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0172] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0173] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0174] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data transmission method, and can solve the technical problem of data corruption caused by transmission failure during large-scale data transmission. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data transmission method provided by the above-mentioned embodiment, and will not be elaborated here.
[0175] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data transmission method when executed by a processor.
[0176] The computer program product provided by the present application can solve the technical problem of data corruption caused by transmission failure during large-scale data transmission. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, which will not be described in detail here.
[0177] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data transmission method, characterized in that: The data transmission method comprises: Get the data to be transmitted; Constructing a projection plane according to the data to be transmitted, and clustering the data to be transmitted based on the projection plane to obtain a data subset; Dividing the data subset into a plurality of data blocks according to a preset size ratio between the data blocks; A reference error correction code is obtained according to the size of the data block, a plurality of the data blocks are encoded based on the reference error correction code to obtain a code to be transmitted, and data is transmitted based on the code to be transmitted.
2. The data transmission method according to claim 1, characterized in that: The step of constructing a projection plane according to the data to be transmitted, and clustering the data to be transmitted based on the projection plane to obtain a data subset includes: Obtaining a projection vector according to the data to be transmitted, and constructing a projection plane according to the projection vector; Projecting the data to be transmitted onto the projection plane to obtain a data feature vector; Clustering the data feature vectors multiple times to obtain multiple clustering data sets; A data classification model is constructed according to each cluster data set, and the data feature vector is classified based on the data classification model to obtain a data subset.
3. The data transmission method according to claim 2, characterized in that: The obtaining a projection vector according to the data to be transmitted, and constructing a projection plane according to the projection vector, comprises: Acquire standardization parameters, and perform standardization processing on the data to be transmitted based on the standardization parameters to obtain standard data; Obtaining a correlation coefficient according to the standard data, and constructing a covariance matrix for the standard data according to the correlation coefficient; Obtaining the eigenvalues and eigenvectors of the data to be transmitted according to the covariance matrix; The eigenvector corresponding to the maximum eigenvalue is used as the projection vector.
4. The data transmission method according to claim 2, characterized in that: The data classification model is constructed according to each cluster data set, and the data feature vector is classified based on the data classification model to obtain a data subset, including: Obtain an initial classification model, use part of the data in each clustering data set as training data to train each initial classification model, and obtain a data classification model; Input the data feature vector into each data classification model to obtain multiple initial data categories; The initial data category with the most repeated categories among the multiple initial data categories is used as a reference category; The data feature vectors of the same reference category are taken as data subsets.
5. The data transmission method according to claim 1, characterized in that: The step of dividing the data subset into a plurality of data blocks according to a preset size ratio between the data blocks comprises: Obtaining a preset size ratio between each data block and a data volume of the data subset; Obtaining a reference data amount for each data block according to the preset size ratio and the data amount; The data subset is divided based on the reference data amount to obtain multiple data blocks.
6. The data transmission method according to claim 1, characterized in that: The step of obtaining a reference error correction code according to the size of the data block, and encoding the multiple data blocks based on the reference error correction code to obtain a code to be transmitted includes: Calculate the code length and the information bit length according to the size of the data block, and obtain the supervision bit length according to the code length and the information bit length; Obtaining a maximum number of error corrections according to the supervision bit length; Obtaining a minimum code distance according to the maximum number of error corrections, the code length, and the information bit length; Using the maximum number of error corrections, the code length, the minimum code distance, the supervision bit length, and the information bit length as a reference error correction code; The multiple data blocks are encoded based on a reference error correction code to obtain a code to be transmitted.
7. The data transmission method according to claim 6, characterized in that: The step of encoding the plurality of data blocks based on the reference error correction code to obtain the code to be transmitted includes: Encoding the plurality of data blocks based on the reference error correction code to obtain a plurality of initial encoded data; Generate a reference hash value according to the hash chain, and determine a replacement position and a replacement direction based on the reference hash value; The plurality of initial coded data are permuted according to the permutation position and permutation direction to obtain the code to be transmitted.
8. A data transmission device, characterized in that: The data transmission device comprises: A data acquisition module, used to acquire data to be transmitted; A data partitioning module, used to construct a projection plane according to the data to be transmitted, and cluster the data to be transmitted based on the projection plane to obtain a data subset; The data partitioning module is further used to partition the data subset into a plurality of data blocks according to a preset size ratio between the data blocks; The data transmission module is used to obtain a reference error correction code according to the size of the data block, encode multiple data blocks based on the reference error correction code to obtain a code to be transmitted, and perform data transmission based on the code to be transmitted.
9. A data transmission device, characterized in that: The device comprises: a memory, a processor, and a data transmission program stored in the memory and executable on the processor, wherein the data transmission program is configured to implement the data transmission method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a data transmission program, and when the data transmission program is executed by the processor, the data transmission method according to any one of claims 1 to 7 is implemented.
