Method, device and equipment for complementing missing data based on support vector machine and storage medium

Through the combination of support vector machine and Word2Vec technology, the problems of low efficiency and low accuracy in the data completion process are solved, efficient and accurate data completion is achieved, and it is suitable for the data management needs of global green trade barriers.

CN118733980APending Publication Date: 2024-10-01CHINA NAT ELECTRIC APP RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410870363.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing technologies are inefficient and inaccurate during the data completion process, leading to problems of missing or inaccurate data, especially in the context of global green trade barriers, causing trouble for enterprise data management.

Method used

A method based on support vector machine and Word2Vec technology is used to complete the missing data through data cleaning, templating, training the Word2Vec model, vectorizing the data, predicting the vector value of the missing item, and searching for similar data items in the vector space.

Benefits of technology

It improves the efficiency and accuracy of data completion, ensures the integrity and reliability of data, and is suitable for the data management needs of global green trade barriers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733980A_ABST
    Figure CN118733980A_ABST
Patent Text Reader

Abstract

The invention provides a missing data complementing method based on a support vector machine. The missing data complementing method comprises the following steps: performing data cleaning on original data to be subjected to data complementing; templating the original data subjected to data cleaning to serve as an original data set; taking data in the original data set as a training sample, and training a Word2Vec model; all data in the original data set are vectorized through the trained Word2Vec model, and a data vector data set is obtained; predicting and generating vector values of data missing items in the original data set through a prediction model based on a support vector machine; searching in the data vector data set to obtain data items similar to the vector values, and generating missing data values matched with the data items in the original data set; and when the missing data values are completed, inputting the original data set after data completion into a database. In combination with the support vector machine and the Word2Vec technology, the missing data of the list is complemented, and the efficiency and accuracy of data complementation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data completion, and specifically relates to a method, device, equipment and storage medium for missing data completion based on a support vector machine. Background Art

[0002] In today's society, information technology is developing rapidly. Information technologies such as the Internet of Things, big data, cloud computing, and mobile Internet have emerged one after another. These technologies have been applied to more and more fields, bringing great convenience to people's lives and work. For example, the collection and management of various types of data, such as the collection and management of product life cycle data, have made certain progress by using information technology. However, the collected data is often incomplete and not necessarily accurate.

[0003] With the formation of global green trade barriers, Chinese companies, such as the electronics manufacturing industry, are facing challenges of missing or inaccurate data, which not only affects product life cycle assessment, but also hinders efforts to comply with global green trade barriers.

[0004] At present, manual data filling and manual inspection are generally used to fill in the missing data and check the accuracy of the data. This method is inefficient, and the quality of data completion is not high, and it is easy for the completed data to still be inaccurate. Summary of the invention

[0005] The purpose of the present invention is to solve the above-mentioned technical problems and provide a method for missing data completion based on support vector machine, which can improve the efficiency of data completion and improve data accuracy.

[0006] In order to solve the above problems, the present invention is implemented according to the following technical solutions:

[0007] In a first aspect, the present invention provides a method for missing data completion based on a support vector machine, the method comprising:

[0008] Clean the original data to be completed;

[0009] Template the original data after the data cleaning as the original data set;

[0010] Using the data in the original data set as training samples to train the Word2Vec model;

[0011] Vectorize all data in the original data set using the trained Word2Vec model to obtain a data vector data set;

[0012] Predicting and generating vector values ​​of data missing items in the original data set by using a prediction model based on a support vector machine;

[0013] Based on the vector value of the missing data item, searching in the data vector data set according to the vector value similarity to obtain the data item;

[0014] Writing the data value of the data item into the data missing item of the original data set;

[0015] When all missing data values ​​in the original data set are completed, the original data set with completed data is entered into the database

[0016] Preferably, the step of using the data in the original data set as training samples to train the Word2Vec model includes: S201, initializing each data value in the original data set to a random word vector as a training sample; S202, defining a neural network structure; S203, performing forward propagation in the neural network structure according to the training sample, and outputting a prediction result; S204, calculating the loss value between the prediction result and the actual result through a loss function, wherein the actual result is the actual word vector of the corresponding item in the original data set, and the loss value is the difference between the prediction result and the actual result; S205, performing back propagation in the neural network structure according to the loss value, and updating the weight coefficient of the neural network structure; S206, repeating steps S203, S204 and S205 in sequence, and when the loss value is less than or equal to the preset target loss value, the training of the Word2Vec model is completed.

[0017] Preferably, the neural network structure is a single-layer neural network structure.

[0018] Preferably, the loss function is a cross entropy loss function.

[0019] Preferably, the svmpredict function is used to predict and generate vector values ​​of data missing items in the original data set.

[0020] Preferably, in the training of the prediction model based on the support vector machine, the prediction model based on the support vector machine is trained by using a svmtrain function.

[0021] In a second aspect, the present invention provides a device for missing data completion based on a support vector machine, wherein the device for missing data completion based on a support vector machine is configured to perform the method for missing data completion based on a support vector machine, and the device for missing data completion based on a support vector machine comprises:

[0022] A data cleaning module, wherein the data cleaning module is used to clean the original data to be completed;

[0023] A data template module, wherein the data template module is used to template the original data after the data cleaning as the original data set;

[0024] A Word2Vec model training module, wherein the Word2Vec model training module is used to train a Word2Vec model using the data in the original data set as training samples;

[0025] A data vectorization module, wherein the data vectorization module is used to vectorize all data in the original data set through the trained Word2Vec model to obtain a data vector data set;

[0026] A vector value prediction generation module, the vector value prediction generation module is used to predict and generate vector values ​​of data missing items in the original data set through a prediction model based on a support vector machine;

[0027] A missing data value generation module, the missing data value generation module is used to search in the data vector data set according to the vector value similarity of the missing data item based on the vector value of the missing data item, obtain the data item, and write the data value of the data item into the missing data item of the original data set;

[0028] The database entry module is used to enter the original data set with completed data into the database when all missing data values ​​in the original data set are completed.

[0029] In a third aspect, the present invention provides an electronic device, the electronic device comprising:

[0030] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform a method for missing data completion based on a support vector machine as described in any one of the first aspects above.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is used to enable a processor to execute a method for missing data completion based on a support vector machine as described in any one of the first aspects above.

[0032] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention provides a method for missing data completion based on a support vector machine, combining a support vector machine and Word2Vec technology, by training a Word2Vec model, using it to map the original data set to be completed into a vector space, vectorizing all the data in the original data, so that the original data uses word vectors to represent text features, and obtains a data vector data set, so as to use a prediction model based on a support vector machine to predict and generate vector values ​​of data missing items in the original data set. Afterwards, by searching for similar items in the vector space of the original data set, when a data item similar to the above-mentioned vector value is searched, a missing data value matching the data item is generated in the original data set according to the data item, and the data value is the missing data value of the missing data item. By completing missing data through the method for missing data completion based on a support vector machine of the present invention, the efficiency and accuracy of data completion are improved.

[0033] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings, wherein:

[0035] Figure 1 is a structural diagram of a method for completing missing data based on a support vector machine according to an embodiment of the present invention;

[0036] Figure 2 is a flow chart of a method for missing data completion based on a support vector machine according to an embodiment of the present invention;

[0037] Figure 3 is a module diagram of a device for completing missing data according to an embodiment of the present invention;

[0038] Figure 4 It is a structural schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0040] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. Unless otherwise defined, the technical terms or scientific terms used in this specification should be understood by people with ordinary skills in the field to which this application belongs. The words "first", "second" and similar words used in this specification and claims do not indicate any order, quantity or importance, but are only used to distinguish different technical features.

[0041] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0042] In order to improve the efficiency and accuracy of list data completion, the present invention provides a method for missing data completion based on support vector machine, which combines support vector machine and Word2Vec technology to intelligently complete missing data, thereby improving the efficiency and accuracy of data completion.

[0043] Figure 1 is a structural diagram of a method for missing data completion based on a support vector machine according to the present invention. The method can be performed by a missing data completion device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0044] Step 101: clean the original data to be completed.

[0045] It should be noted that data cleaning refers to removing duplicate data, filling missing values, processing outliers, and unifying data formats from the collected data. This can reduce errors and deviations in data analysis, modeling, and model training, and improve the quality and reliability of data. Because in the process of data mining collection, there are a lot of incomplete (missing values), inconsistent, and abnormal data in the massive amount of raw data, which seriously affects the execution efficiency of data mining modeling and may even lead to deviations in mining results, so data cleaning is particularly important. Data cleaning is to improve the quality of data on the one hand, and to make the data better adapt to specific mining techniques or tools on the other hand. Unifying data formats includes defining and implementing common data standards and protocols for capturing, storing, and sharing data. The process is to develop guidelines for data elements (such as naming conventions, measurement units, and classification values) to facilitate data integration and interpretation.

[0046] Specifically, in the present invention, the collected raw data to be completed is cleaned, including checking data consistency, checking whether there are missing values ​​and abnormal values, etc. If missing values ​​are found, the data items where the missing values ​​are located are filled with "NaN". The first data is cleaned to ensure the uniformity and comparability of the data.

[0047] Specifically, in the present invention, when the collected data are in inconsistent formats, they are standardized to unify the data formats and ensure that all data use the same units and scales.

[0048] Step 102: Template the original data after data cleaning as the original data set.

[0049] It should be noted that data templating is a method of organizing and storing data in a predetermined format and structure. This usually involves creating a template that defines the layout, fields, data types, and possible validation rules of the data. Templating data can ensure that all data is recorded and stored in the same format and standard, making it easier to understand and analyze data, simplifying the data update and maintenance process, and helping to standardize data, facilitate data exchange between different systems or organizations, and make it easier to achieve automated processing and analysis, so that the data can be used as a training set to train machine learning models. For example, in an enterprise, a customer information template may be created, which includes fields such as the customer's name, address, contact information, and purchase history. When new customer data is collected, the information will be filled in according to this template to ensure the consistency and integrity of all customer data. In summary, in terms of technical implementation, data templating can be achieved through database design, spreadsheets, content management systems, or specific software applications. By templating data, data entry errors can be reduced, data quality can be improved, and subsequent data analysis and reporting can be facilitated.

[0050] Specifically, in the present invention, the parameters in the original data set after data templateization should include all parameters of the information data required in the actual application scenario.

[0051] Step 103: Use the data in the original data set as training samples to train the Word2Vec model.

[0052] It should be noted that the Word2vec model is a model used to generate word vectors, which can be used for training to reconstruct linguistic word texts. The network is represented by words and needs to guess the input words in adjacent positions. Under the assumption of the bag-of-words model in word2vec, the order of words is not important. After training, the word2vec model can be used to map each word to a vector, which can be used to represent the relationship between words. The vector is the hidden layer of the neural network. Training samples are instances used to train the model. They contain features and labels used to build the model. When training the model, the model is shown labeled samples so that the model can gradually learn the relationship between features and labels. The number and quality of training samples can directly affect the performance and generalization ability of the model.

[0053] Specifically, in the present invention, the data in the original data set is used as a training sample. Preferably, 80% of the data in the original data set is selected as a training sample. The steps of training the Word2Vec model include: (1) Initializing the data in the original data set as a random word vector as a training sample. Among them, these word vectors will be continuously adjusted during the training process of the Word2Vec model until the model training is completed. Preferably, the training sample is 80% of the data in the original data set as a training set, and the remaining 20% ​​of the data is used as a test set to verify the performance of the model. (2) Define a neural network structure, which is a single-layer neural network structure, including an input layer, a hidden layer and an output layer. The input layer is an independently encoded word vector. If the vocabulary size is 10,000, the input layer size is also 10,000. The size of the hidden layer is the dimension of the word vector. If, if the dimension of the word vector is 300, the hidden layer size is 300, and the size of the output layer is also the size of the vocabulary. (3) According to the training sample, forward propagation is performed in the neural network structure to output the prediction result. Forward propagation refers to the calculation and storage of the intermediate variables (including output) of the model in the order from the input layer to the output layer of the neural network. For example, a one-hot encoded word vector is input into the neural network structure, and the activation value of the hidden layer is calculated: h = W_in x. Where W_in is the input weight matrix and x is the one-hot encoded vector of the input word. The activation value of the output layer is calculated and the output probability distribution is obtained through the softmax function: y' = softmax (W_out h). Where W_out is the output weight matrix and y' is the output probability distribution. It should be noted that one-hot encoding means that in one-hot encoding, each unique classification value is assigned a unique binary vector, also known as a "one-hot" vector, because in this vector, only one position of the element is 1 (indicating the existence of the category), and the elements of all other positions are 0. For example, if there are three color categories, then "red" may be encoded as [1,0.0], "green" is encoded as [0,1,0], and "blue" is encoded as [0,0,1]. (4) The loss value between the predicted result and the actual result is calculated by the loss function, wherein the actual result is the actual word vector of the corresponding item in the part of the data in the original data set that serves as the training set. In the present invention, the loss function adopted is the cross entropy loss function. The main principle of the cross entropy loss function is to measure whether the model converges by calculating the difference between the actual output and the target output. The difference between the actual output and the target output is the loss value. The loss value is the difference between the predicted result and the actual result. (5) According to the loss value, back propagation is performed in the neural network structure to update the weight coefficient of the neural network structure.Back propagation is an optimization algorithm for optimizing neural network structures. Its purpose is to minimize the loss value of the loss function by adjusting the neural network parameters. It is a variant of the gradient descent algorithm. By calculating the gradient of the loss function for each parameter, and then updating the weight coefficient in the opposite direction of the gradient (i.e., starting from the output layer of the neural network structure), the value of the loss function is gradually reduced. (6) Repeat steps (3) to (5), that is, repeat the process of forward propagation, calculating the loss function and back propagation, and continuously update the weight coefficient of the neural network structure until the loss value of the loss function is less than or equal to the preset target loss value, stop repeating steps (3) to (5) in sequence, and complete the training of the Word2Vec model. It can be understood that the condition for stopping repeating steps (3) to (5) in sequence and completing the training of the Word2Vec model can also be that the number of times steps (3) to (5) are repeated in sequence reaches a preset number.

[0054] Step 104: vectorize all data in the original data set through the trained Word2Vec model to obtain a data vector data set, wherein the data in the data vector data set are all data represented by vectors.

[0055] Step 105: Generate vector values ​​of missing items in the original data set through prediction model based on support vector machine.

[0056] It should be noted that support vector machines (abbreviated as SVM) are supervised learning models and related learning algorithms for analyzing data in classification and regression analysis. Given a set of training instances, each training instance is labeled as belonging to one or the other of two categories, and the SVM training algorithm builds a model that assigns new instances to one of the two categories, making it a non-probabilistic binary linear classifier. The SVM model represents instances as points in space, so that the mapping makes instances of separate categories separated by as wide a clear interval as possible. Then, new instances are mapped to the same space and their categories are predicted based on which side of the interval they fall. In addition to performing linear classification, SVM can also effectively perform nonlinear classification using the so-called kernel technique, implicitly mapping its input into a high-dimensional feature space. When the data is not labeled, supervised learning cannot be performed, and unsupervised learning is required. It will try to find the natural clustering of data to clusters and map new data to these formed clusters. The clustering algorithm that improves the support vector machine is called support vector clustering. When the data is not labeled or only some of the data is labeled, support vector clustering is often used as a preprocessing step for classification in industrial applications.

[0057] In the present invention, when constructing a prediction model based on a support vector machine, a radial basis kernel function is selected as the kernel function of the support vector machine, because the radial basis kernel function can map the training samples to a higher-dimensional space and can handle samples when the relationship between the class label and the feature is nonlinear. Specifically, the radial basis kernel function is Where k(x,x′) is the kernel function, which represents the similarity between two samples x and x′. ||xx′|| is the Euclidean distance between x and x′. σ is the free parameter of the kernel function, which determines the degree of dispersion of the data mapped to the new space.

[0058] It should be noted that the radial basis function (RBF) is an artificial neural network that uses the radial basis function as an activation function. The output of the radial basis function network is a linear combination of the input radial basis function and the neuron parameters. The radial basis function is a real-valued function whose value depends only on the distance from the origin, that is, Φ(x)=Φ(‖x‖), or it can also be the distance to any point c, point c is called the center point, that is, Φ(x, c)=Φ(‖xc‖). Any function Φ that satisfies the property of Φ(x)=Φ(‖x‖) is called a radial basis function. The standard one generally uses the Euclidean distance (also called the Euclidean radial basis function), although other distance functions are also possible. The most commonly used radial basis function is the Gaussian kernel function, which is in the form of

[0059] k(||x-xc||)=exp{-||x-xc||^2 / (2*σ)^2)} where x_c is the center of the kernel function and σ is the width parameter of the function, which controls the radial range of the function.

[0060] In the present invention, the hyperparameters of the prediction model based on the support vector machine are defined, and the best model parameter combination can be found by optimizing the hyperparameters using grid search (GridSearch), thereby improving the performance of the model. The grid search method is an exhaustive search method for specifying parameter values, and the best learning algorithm is obtained by optimizing the parameters of the estimation function by the cross-validation method. That is, the possible values ​​of each parameter are arranged and combined, and all possible combination results are listed to generate a "grid". Each combination is then used for SVM training, and cross-validation is used to evaluate the performance. After the fitting function has tried all parameter combinations, a suitable classifier is returned, which is automatically adjusted to the best parameter combination, and the parameter value can be obtained by clf.best_params_.

[0061] In the present invention, in the training of the prediction model based on support vector machine, the prediction model based on support vector machine is trained by svmtrain function. Svmtrain function is a function used to train support vector machine (SVM) model in MATLAB. It is a part of Pattern Recognition Toolbox, which is specially used to implement support vector machine algorithm in classification and regression analysis. The workflow of svmtrain function includes the following steps: first, by selecting different kernel functions (such as linear kernel, polynomial kernel, radial basis function kernel, etc.), svmtrain can handle linear and nonlinear problems. Secondly, it uses training data set to carry out model training, and finds the best hyperplane through optimization process to maximize classification interval. In the process of model training, svmtrain function also processes some key parameters, such as penalty parameter C, kernel function parameters and loss function, etc. The selection of these parameters has a direct impact on the performance of the model. Users can adjust these parameters according to specific problems to achieve the best classification or regression effect.

[0062] Specifically, in the present invention, the svmpredict function is used to predict the vector value of the data missing item in the data template through the prediction model of the trained support vector machine. The svmpredict function is a prediction function of a support vector machine (SVM) model, which uses the trained SVM model to classify on the test data, and it can predict the category or regression value of the test data.

[0063] Step 106: Based on the vector value of the missing data item, search in the data vector data set according to the vector value similarity to obtain the data item.

[0064] Specifically, in the present invention, a vector space model may be selected to search in a data vector data set for data items that are similar to the vector value of the missing data item.

[0065] It is understandable that in the Word2vec model, the data vocabulary can be mapped into the vector space. If the distance between two word vectors is close to each other (for example, measured by Euclidean distance or cosine similarity), the two words are considered to be similar in semantics, that is, the two data are approximate. For example, if the words "apple" and "banana" appear in many similar contexts, their word vectors will be close in the vector space. Similarly, the words "dog" and "cat" often appear together in the context of describing pets, so their word vectors will also be close. This proximity indicates that these words are semantically similar or relevant. Therefore, in the present invention, the data in the original data set are vectorized by the Word2vec model, that is, these data are mapped into the vector space, and then the vector value of the data missing item is predicted and generated by the prediction model based on the support vector machine. Based on the vector value, the data item with the highest similarity (closest distance) to the vector value is searched in the vector space, and the data value of the data item is the data value of the missing data item.

[0066] Step 107: Write the data value of the data item into the data missing item of the original data set.

[0067] Step 108: When all missing data values ​​in the original data set are completed, the original data set with completed data is entered into the database.

[0068] Specifically, by combining the trained Word2Vec model and the prediction model based on the support vector machine, all the missing data values ​​in the original data set are completed, and then the original data set with the completed data is entered into the database, thus completing the missing data completion work in the original data set.

[0069] In one embodiment, the required data information is collected through data mining and other means, and the collected data information is used as the original data to be completed. Data cleaning is performed on it, including checking whether there are missing values ​​and outliers. If missing values ​​are found, the data items where the missing values ​​are located are filled with "NaN". At the same time, data consistency is checked and the data format is unified. Taking the inventory data of a certain model of domestic mobile phone products containing missing values ​​as an example, data cleaning is performed on it, missing values ​​are filled with "NaN", and the data after the data format is unified is shown in the following table:

[0070]

[0071]

[0072] In this embodiment, the original data after data cleaning is templated to obtain the original data set. Taking the inventory data of a certain electronic product as an example, the data after data template should include the life cycle information data required for the life cycle assessment of the electronic product, such as name, function, material, weight, manufacturer's process, origin, transportation method, transportation distance, carbon emission equivalent and other information. As described in the following table:

[0073]

[0074] In this embodiment, 80% of the data in the original data set is used as a training set to construct training samples and train the Word2Vec model.

[0075] In this embodiment, 80% of the data in the original data set is used as a training set, each data is initialized as a random word vector, and a training sample is constructed. The remaining 20% ​​of the data is used as a test set to verify the performance of the model. Then, a single-layer neural network structure is defined, including an input layer, a hidden layer, and an output layer. Then, according to the training sample, forward propagation is performed in the neural network structure, and the prediction result is output along the order from the input layer to the output layer of the neural network structure. Then, the loss value between the predicted result and the actual result is calculated by the cross entropy loss function, wherein the actual result is the actual word vector of the corresponding item in the part of the data in the original data set that is the training set, and the loss value is the difference between the predicted result and the actual result. Then, according to the loss value, back propagation is performed in the neural network structure, the weight coefficient of the neural network structure is updated, and the optimization algorithm of the neural network structure is optimized, so that the loss value of the loss function is gradually reduced. Then, forward propagation, loss value calculation, and back propagation are repeated in sequence, and the weight coefficient of the neural network structure is continuously updated until the loss value of the loss function is less than or equal to the preset target loss value, that is, the training of the Word2Vec model is completed.

[0076] In this embodiment, all data in the original data set are vectorized using the trained Word2Vec model to obtain a data vector data set that uses vectors to represent data.

[0077] In this embodiment, a prediction model based on a support vector machine is constructed, and a radial basis kernel function is selected as the kernel function of the support vector machine. Next, the hyperparameters of the prediction model based on the support vector machine are defined, and the hyperparameters are optimized using grid search. Next, 80% of the data in the original data set is used as a training set, and the prediction model is trained by the svmtrain function. After the prediction model is trained, the remaining 20% ​​of the data is used as a test set, and the svmpredict function is used to predict and generate prediction data, and the prediction data is compared with the actual data to verify the accuracy of the prediction. When the accuracy reaches a preset range, it indicates that the training of the prediction model based on the support vector machine is completed. Next, the svmpredict function is used to predict the vector values ​​of the data missing items in the original data set through the trained prediction model.

[0078] In this embodiment, a vector space model is used to search for a data item with the highest similarity (closest distance) to the vector value of the missing data item in the data vector data set based on the vector value of the missing data item, and the data value of the data item is written into the missing data item of the original data set.

[0079] In this embodiment, in combination with the above steps, that is, combining the trained Word2Vec model and the prediction model based on the support vector machine, all missing data values ​​in the original data set are completed, and then the original data set with the completed data is entered into the database, thus completing the missing data in the original data set.

[0080] This embodiment provides a method for completing missing data based on a support vector machine, which combines a support vector machine and Word2Vec technology to complete missing data, thereby improving the efficiency and accuracy of data completion.

[0081] Figure 3 is a module diagram of a device for completing missing data according to the present invention. Figure 3 As shown, the module includes:

[0082] 301. A data cleaning module, which is used to clean the original data to be completed.

[0083] 302. A data template module, which is used to template the original data after data cleaning as an original data set.

[0084] 303. Word2Vec model training module, the Word2Vec model training module is used to train the Word2Vec model by using the data in the original data set as training samples.

[0085] 304. A data vectorization module, which is used to vectorize all data in the original data set through the trained Word2Vec model to obtain a data vector data set.

[0086] 305. A vector value prediction generation module, which is used to predict and generate vector values ​​of data missing items in the original data set through a prediction model based on a support vector machine.

[0087] 306. A missing data value generation module, the missing data value generation module is used to search in the data vector data set according to the vector value of the data missing item according to the vector value similarity, obtain the data item, and write the data value of the data item into the data missing item of the original data set.

[0088] 307. A database entry module, wherein the database entry module is used to enter the original data set with completed data into the database when all missing data values ​​in the original data set are completed.

[0089] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0090] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0091] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0092] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as solving a method for missing data completion based on a support vector machine.

[0093] In some embodiments, a method for missing data completion based on a support vector machine may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for missing data completion based on a support vector machine described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a method for missing data completion based on a support vector machine in any other appropriate manner (e.g., by means of firmware).

[0094] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0095] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0096] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0097] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0098] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0099] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0100] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements a method for missing data completion based on a support vector machine as provided in an embodiment of the present invention.

[0101] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can 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 can 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 can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0102] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0103] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for missing data completion based on support vector machine, It is characterized in that The following steps are involved: Clean the original data to be completed; Template the original data after the data cleaning as the original data set; Using the data in the original data set as training samples to train the Word2Vec model; Vectorize all data in the original data set using the trained Word2Vec model to obtain a data vector data set; Predicting and generating vector values ​​of data missing items in the original data set by using a prediction model based on a support vector machine; Based on the vector value of the missing data item, searching in the data vector data set according to the vector value similarity to obtain the data item; Writing the data value of the data item into the data missing item of the original data set; When all missing data values ​​in the original data set are completed, the original data set with completed data is entered into the database.

2. A method for missing data completion based on support vector machine according to claim 1, It is characterized in that The step of using the data in the original data set as training samples to train the Word2Vec model includes: S201, initializing each data value in the original data set into a random word vector as a training sample; S202, define a neural network structure; S203, performing forward propagation in the neural network structure according to the training sample, and outputting a prediction result; S204, calculating the loss value between the predicted result and the actual result by using a loss function, wherein the actual result is the actual word vector of the corresponding item in the original data set, and the loss value is the difference between the predicted result and the actual result; S205, performing back propagation in the neural network structure according to the loss value, and updating the weight coefficient of the neural network structure; S206. Repeat steps S203, S204 and S205 in sequence. When the loss value is less than or equal to a preset target loss value, the training of the Word2Vec model is completed.

3. A method for missing data completion based on support vector machine according to claim 2, Features: The neural network structure is a single-layer neural network structure.

4. The method for missing data completion based on support vector machine according to claim 2, Features: The loss function is a cross entropy loss function.

5. The method for missing data completion based on support vector machine according to claim 1, Features: Use the svmpredict function to predict and generate vector values ​​for the missing data items in the original dataset.

6. A method for missing data completion based on support vector machine according to claim 5, Features: In the training of the prediction model based on the support vector machine, the prediction model based on the support vector machine is trained by using the svmtrain function.

7. A device for missing data completion based on support vector machine, It is characterized in that The device for missing data completion based on support vector machine is configured to perform the method for missing data completion based on support vector machine, and the device for missing data completion based on support vector machine includes: A data cleaning module, wherein the data cleaning module is used to clean the original data to be completed; A data template module, wherein the data template module is used to template the original data after the data cleaning as the original data set; A Word2Vec model training module, wherein the Word2Vec model training module is used to train a Word2Vec model using the data in the original data set as training samples; A data vectorization module, wherein the data vectorization module is used to vectorize all data in the original data set through the trained Word2Vec model to obtain a data vector data set; A vector value prediction generation module, the vector value prediction generation module is used to predict and generate vector values ​​of data missing items in the original data set through a prediction model based on a support vector machine; A missing data value generation module, the missing data value generation module is used to search in the data vector data set according to the vector value similarity of the missing data item based on the vector value of the missing data item, obtain the data item, and write the data value of the data item into the missing data item of the original data set; The database entry module is used to enter the original data set with completed data into the database when all missing data values ​​in the original data set are completed.

8. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for missing data completion based on a support vector machine as described in any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The computer readable storage medium stores a computer program, The computer program is used to enable a processor to implement a method for missing data completion based on a support vector machine as described in any one of claims 1 to 6 when executed.

Citation Information

Cited By

  • Blood vessel data completion method, device, equipment, medium and product

    CN120045859A