Data classification method, device, equipment and storage medium
By optimizing and updating the graph structure in the small sample learning task, the recognition performance of the classification model is improved by using feature embedding and graph structure models, and the problem of simple and fixed graph structure construction in the prior art is solved.
Patent Information
- Application Number
- CN202210193867.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-03-01
AI Technical Summary
The existing graph structure construction methods are simple and fixed, resulting in poor recognition performance of small sample models.
By inputting the to-processed data set into the first target classification model, the first target feature embedding model is used to extract the support features and query features, and optimize and update the initial graph structure based on the preset objective function through the first target graph structure model, and determine the classification label of the to-process query data.
The identification performance of classification models in small sample data tasks is improved, the noise impact is reduced, and the flexibility and recognition accuracy of graph structure are enhanced.
Smart Images

Figure CN114610953B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a data classification method, device, equipment and storage medium. Background Art
[0002] With the rapid development of Internet technology and mobile smart terminals, deep learning methods that rely on large-scale labeled data training have achieved great success in various fields. However, in real-life applications, many problems can only provide extremely limited labeled data, which cannot meet the requirements of deep learning training on large-scale labeled data.
[0003] The small sample learning method was proposed to solve the above problems. As a typical method in the small sample learning method, the small sample method based on transduction theory makes full use of the graph structure information between a small amount of labeled data and a large amount of unlabeled data in the small sample learning task to predict the category information of the unlabeled data. This method is highly dependent on the graph structure constructed in the feature space, that is, using the traditional distance measurement method to construct a static graph structure of the training samples in the feature space.
[0004] In the process of implementing the present invention, it was found that the prior art has at least the following technical problems:
[0005] The existing graph structure construction method is simple and fixed, resulting in poor recognition performance of small sample models. Summary of the Invention
[0006] The present invention provides a data classification method, apparatus, device and storage medium to solve the problem that existing graph structure construction methods are simple and fixed, and to improve the recognition performance of classification models in small sample data tasks.
[0007] According to one aspect of the present invention, a data classification method is provided, the method comprising:
[0008] Inputting the acquired data set to be processed into a first target classification model; wherein the data set to be processed includes a support set to be processed and a query set to be processed, the support set to be processed includes a plurality of labeled data, the query set to be processed includes a plurality of unlabeled data, and the first target classification model includes a trained first target feature embedding model and a first target graph structure model;
[0009] extracting, through the first target feature embedding model, support features to be processed and query features to be processed corresponding to the support set to be processed and the query set to be processed, respectively, and outputting the support features to be processed and the query features to be processed to the first target graph structure model;
[0010] Through the first target graph structure model, based on the preset objective function and the supporting features to be processed, the initial graph structure determined based on the query features to be processed is optimized and updated to obtain an updated result, and based on the updated result, the classification labels corresponding to each query data to be processed in the query set to be processed are determined.
[0011] According to another aspect of the present invention, there is provided a data classification device, the device comprising:
[0012] A data set input module for processing, configured to input the acquired data set to be processed into a first target classification model; wherein the data set to be processed includes a support set to be processed and a query set to be processed, the support set to be processed includes a plurality of labeled data, the query set to be processed includes a plurality of unlabeled data, and the first target classification model includes a trained first target feature embedding model and a first target graph structure model;
[0013] a feature extraction module, configured to extract, through the first target feature embedding model, support features to be processed and query features to be processed corresponding to the support set to be processed and the query set to be processed, respectively, and output the support features to be processed and the query features to be processed to the first target graph structure model;
[0014] A classification label determination module is used to optimize and update the initial graph structure determined based on the query features to be processed based on the preset objective function and the supporting features to be processed through the first target graph structure model, obtain an updated result, and determine the classification label corresponding to each query data to be processed in the query set to be processed based on the updated result.
[0015] According to another aspect of the present invention, an electronic device is provided, comprising:
[0016] at least one processor; and
[0017] a memory communicatively coupled to the at least one processor;
[0018] The memory stores a computer program that can be executed 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 the data classification method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data classification method described in any embodiment of the present invention when executed.
[0020] The embodiments of the above invention have the following advantages or beneficial effects:
[0021] The technical solution of the embodiment of the present invention is to input the data set to be processed into the first target classification model, and extract the support set to be processed and the query set to be processed in the data set to be processed respectively through the first feature embedding model in the first target classification model to obtain the support features to be processed and the query features to be processed, and output the support features to be processed and the query features to be processed to the first target graph structure model in the first target classification model. Through the first target graph structure model, based on the preset objective function, the initial graph structure determined based on the support features to be processed and the query features to be processed is optimized and updated to obtain the updated result, and based on the updated result, the classification label corresponding to each query data to be processed in the query set to be processed is determined, which solves the problem that the existing graph structure construction method is simple and fixed, and improves the recognition performance of the classification model.
[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 is a flow chart of a data classification method provided according to an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of a data set to be processed according to an embodiment of the present invention;
[0026] Figure 3 is a flow chart of another data classification method provided according to an embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of a specific example of a data classification method provided according to an embodiment of the present invention;
[0028] Figure 5 is a flowchart of a method for determining a first target classification model provided according to an embodiment of the present invention;
[0029] Figure 6 is a structural diagram of a data classification device provided according to an embodiment of the present invention;
[0030] Figure 7is a structural diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions 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 embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Figure 1 This is a flow chart of a data classification method provided according to an embodiment of the present invention. This embodiment is applicable to the case of classifying small sample task data. The method can be executed by a data classification device. The data classification device can be implemented in the form of hardware and / or software. The data classification device can be configured in smart terminals such as desktop computers, laptop computers, and tablet computers. Figure 1 As shown, the method includes:
[0034] S110: Input the acquired data set to be processed into a first target classification model.
[0035] Specifically, the dataset to be processed can be a dataset in a small-sample learning task. A small-sample learning task can be used to describe the task of learning to distinguish the classification labels corresponding to a large amount of unlabeled data based on a small amount of labeled data. In this embodiment, the dataset to be processed includes a support set to be processed and a query set to be processed. The support set to be processed contains multiple labeled data, and the query set to be processed contains multiple unlabeled data. Specifically, in this embodiment, the amount of data contained in the support set to be processed can be much smaller than the amount of data contained in the query set to be processed.
[0036] In one embodiment, optionally, the labeled data includes supporting image data and classification label data corresponding to the supporting image data, and the unlabeled data includes query image data. Figure 2 is a schematic diagram of a data set to be processed according to an embodiment of the present invention. Specifically, Figure 2 The support set to be processed and the query set to be processed in the data set to be processed are shown. The support set to be processed contains a small amount of labeled data. Specifically, the labeled data includes supporting image data and classification label data corresponding to the supporting image data (such as Figure 2 A, B or C in the query set), the query set to be processed contains a large amount of unlabeled data. Specifically, the unlabeled data includes query image data. It should be noted that Figure 2 The various picture data are only exemplary illustrations for distinguishing the pictures, and do not limit the content of the picture data. In actual applications, the picture data may specifically be pictures of animals, buildings, landscapes, and people, etc.
[0037] Specifically, the first target classification model is a trained network model. In this embodiment, the first target classification model includes a trained first target feature embedding model and a first target graph structure model. Specifically, the network structure of the first target feature embedding model and the second target graph structure model can be any network architecture that can complete the model function proposed in this application. This application does not limit the network structure of the first target feature embedding model and the second target graph structure model. Exemplarily, the network structure of the first target feature embedding model can include a 4-layer convolutional neural network, an 18-layer residual network, and a 121-layer DenseNet network.
[0038] S120 , extracting the support features to be processed and the query features to be processed corresponding to the support set to be processed and the query set to be processed respectively through the first target feature embedding model, and outputting the support features to be processed and the query features to be processed to the first target graph structure model.
[0039] Specifically, the data set to be processed is input into the first target feature embedding model in the first target classification model, and the first target feature embedding model performs feature extraction on the labeled data in the support set to be processed to obtain the support features to be processed, and performs feature extraction on the unlabeled data in the query set to be processed to obtain the query features to be processed.
[0040] S130. Through the first target graph structure model, based on the preset objective function and the supporting features to be processed, the initial graph structure determined based on the query features to be processed is optimized and updated to obtain an updated result. Based on the updated result, the classification labels corresponding to each query data to be processed in the query set to be processed are determined.
[0041] In this embodiment, the preset objective function is used to characterize the functional relationship between the graph structure and the label probability distribution matrix. In one embodiment, optionally, the preset objective function satisfies the formula:
[0042]
[0043] Among them, Y represents the label probability distribution matrix, W represents the graph structure, C represents the type of classification label data corresponding to the support set to be processed, M represents the number of query image data in the query set to be processed, and Y ic represents the label probability between the i-th query image data in the query set to be processed and the c-th classification label data in the support set to be processed, X i represents the query features of the i-th query image data in the query set to be processed, X j represents the query features of the j-th query image data in the query set to be processed, M c represents the support features to be processed for the supporting image data corresponding to the c-th classification label data in the support set to be processed, w(X i ,X j ) represents the local geometric information between the i-th query image data and the j-th query image data, d(X i ,M c ) represents the feature distance between the i-th query feature to be processed and the c-th support feature to be processed, Y i Indicates the label probability corresponding to the i-th query image data in the query set to be processed, Y j represents the label probability corresponding to the j-th query image data in the query set to be processed, and α and β represent the support parameters in the first target graph structure model.
[0044] Specifically, the first target graph structure determines the initial graph structure based on the query features to be processed, and optimizes and updates the initial graph structure based on the preset objective function and the supporting features to be processed to obtain an updated result.
[0045] In this embodiment, the initial graph structure is used to represent the initial local geometric information between each query image data in the query set to be processed. Specifically, the initial local geometric information w(X) between the i-th query image data and the j-th query image data in the initial target graph structure is i ,X j ) 0 Satisfies the formula:
[0046]
[0047] Among them, ||X i -X j || 2Represents the feature distance between the i-th query image data and the j-th query image data in the feature space.
[0048] Exemplarily, the first preset requirement may be less than a first preset distance threshold.
[0049] In one embodiment, optionally, the update result includes the target graph structure and the target label probability distribution matrix corresponding to the target graph structure. Accordingly, based on the preset objective function and the supporting features to be processed, the initial graph structure determined based on the query features to be processed is optimized and updated to obtain the update result, including: determining the initial label probability distribution matrix based on the preset objective function, the supporting features to be processed and the initial graph structure determined based on the query features to be processed.
[0050] In this embodiment, the initial label probability distribution matrix is used to represent the initial label probability between each query image data in the query data set to be processed and the classification label data corresponding to the support set to be processed. Specifically, based on the preset objective function and the initial graph structure, the initial label probability between the i-th query image data and the c-th classification label data in the initial label probability distribution matrix is obtained. Satisfies the formula:
[0051]
[0052] Among them, 1 T represents the transpose of the identity matrix, w(X i ,X j ) represents the initial local geometric information between the i-th query image data and the j-th query image data in the initial graph structure.
[0053] In this embodiment, the target graph structure is used to represent the local geometric information of the target in the feature space and label space between each query image data in the query set to be processed. In one embodiment, optionally, the target graph structure is determined based on the initial label probability distribution matrix and a preset objective function, including: determining the label probability distance in the label space between each query image data in the query set to be processed based on the initial label probability distribution matrix and the preset objective function; determining the feature distance in the feature space between each query image data in the query set to be processed based on the query features to be processed and the preset objective function; and determining the target graph structure based on the label probability distance and the feature distance.
[0054] Specifically, based on the preset objective function and the initial label probability distribution matrix, the label probability distance between the i-th query image data and the j-th query image data in the label space is determined. Satisfies the formula:
[0055]
[0056] Among them, Y i 0 Indicates the initial label probability corresponding to the i-th query image data in the initial label probability distribution matrix, Y j 0 Represents the initial label probability corresponding to the j-th query image data in the initial label probability distribution matrix.
[0057] Specifically, based on the query features to be processed and the preset objective function, the feature distance X between the i-th query image data and the j-th query image data in the feature space is determined. ij Satisfies the formula:
[0058] X ij =β||X i -X j || 2
[0059] In one embodiment, optionally, the target graph structure is determined based on the label probability distance and the feature distance, including: determining the target geometric distance based on the label probability distance and the feature distance; for each query image data in the query set to be processed, classifying and screening the target geometric distances between the query image data and other query image data in the query set to be processed based on a preset classification algorithm; and determining the target subgraph structure corresponding to the query image data based on the screened target geometric distances.
[0060] Specifically, the target geometric distance between the i-th query image data and the j-th query image data is Satisfies the formula:
[0061]
[0062] Among them, exemplarily, the preset classification algorithm includes the K nearest neighbor algorithm. Specifically, assuming that the query set to be processed contains n query image data, the target geometric distances between the i-th query image data and other query image data are determined respectively, and the multiple target geometric distances are sorted, and the K target geometric distances with the smallest distances are used as the screened target geometric distances. Among them, the smaller the target geometric distance (the closer to 0), the closer the local geometric information between the query image data is, and the local geometric information is 1. Conversely, the farther the target geometric distance is, the local geometric information is 0.
[0063] Specifically, the local geometric information corresponding to the filtered target geometric distances is set to 1, and the local geometric information corresponding to the unfiltered target geometric distances is set to 0. In this embodiment, the target subgraph structure can be used to describe the target local geometric information between the i-th query image data and K other query image data.
[0064] Specifically, the target local geometric information w(X i ,X j ) 1 Satisfies the formula:
[0065]
[0066] Based on the above embodiment, optionally, the local geometric information corresponding to the target geometric distance less than the preset distance threshold is set to 1, and the local geometric information corresponding to the target geometric distance greater than or equal to the preset distance threshold is set to 0. In this embodiment, the target local geometric information w(X) between the i-th query image data and the j-th query image data in the target graph structure is i ,X j ) 1 Satisfies the formula:
[0067]
[0068] In this embodiment, the target label probability distribution matrix is used to characterize the target label probability between each query image data in the query set to be processed and the classification label data corresponding to the support set to be processed. Specifically, based on the preset objective function and target graph structure, the target label probability between the i-th query image data and the c-th classification label data in the target label probability distribution matrix is obtained. Satisfies the formula:
[0069]
[0070] Among them, w(X i ,X j ) 1 Represents the target local geometric information between the i-th query image data and the j-th query image data in the target graph structure.
[0071] The target graph structure in the prior art can only represent the local geometric information between the query image data in the feature space in the query set to be processed. The local geometric information between the query image data reflected by the target graph structure is relatively simple and easily affected by noise.
[0072] The technical solution of this embodiment optimizes and updates the initial graph structure determined based on the support features to be processed and the query features to be processed based on a preset objective function through a first target graph structure model to obtain a target graph structure. The target graph structure can represent the local geometric information between the query image data in the label space and the feature space in the query set to be processed. The target graph structure is comprehensively calculated from multiple spatial dimensions, which can reduce the noise impact in the query image data to a certain extent, solve the problem that the existing graph structure construction method is simple and fixed, and improve the recognition performance of the classification model.
[0073] Based on the above embodiment, the target graph structure obtained in the above embodiment can optionally be further optimized and updated based on a preset objective function. The method further includes: judging whether the function loss value corresponding to the preset objective function has converged based on the target graph structure and the target label probability distribution matrix; if so, determining the classification labels corresponding to each query image data in the query set to be processed based on the target label probability distribution matrix; if not, determining an optimized target label probability distribution matrix based on the target label probability distribution matrix and the preset objective function, and repeating the operation of judging whether the function loss value corresponding to the preset objective function has converged based on the optimized target probability distribution matrix.
[0074] Figure 3 1 is a flow chart of another data classification method provided according to an embodiment of the present invention. The specific implementation steps of this embodiment include:
[0075] S210: Input the acquired data set to be processed into a first target classification model.
[0076] S220 , extracting the support features to be processed and the query features to be processed corresponding to the support set to be processed and the query set to be processed respectively through the first target feature embedding model, and outputting the support features to be processed and the query features to be processed to the first target graph structure model.
[0077] S230 , determining an initial label probability distribution matrix through a first target graph structure model based on a preset objective function, support features to be processed, and an initial graph structure determined based on query features to be processed.
[0078] S240 : Determine a target graph structure based on the initial label probability distribution matrix and a preset objective function, and determine a target label probability distribution matrix based on the target graph structure and the preset objective function.
[0079] S250. Determine whether the function loss value corresponding to the preset objective function converges. If so, execute S280; if not, execute S260.
[0080] In one embodiment, the preset loss value requirement may be that the function loss value is minimum or the function loss value converges. Specifically, the target graph structure and the target label probability distribution matrix are brought into the preset objective function to obtain the loss function value, such as Loss k For example, if Loss k With Loss k-1 If the loss difference is less than the preset difference threshold, the loss function value is considered to converge.
[0081] S260: Determine the optimized target graph structure based on the target label probability distribution matrix and the preset objective function.
[0082] Specifically, the local geometric information w(X i ,X j ) k+1 Satisfies the formula:
[0083]
[0084] Among them, the target geometric distance Satisfies the formula:
[0085]
[0086] Among them, Y i k represents the target label probability corresponding to the i-th query image data in the target probability distribution matrix obtained in the k-1th iteration, Y j k Represents the target label probability corresponding to the j-th query image data in the target probability distribution matrix in the k-1th iteration.
[0087] S270 : Based on the optimized target graph structure and the preset objective function, determine the optimized target label probability distribution matrix, and re-execute S250 .
[0088] Specifically, the initial label probability between the i-th query image data and the c-th classification label data in the optimized target label probability distribution matrix corresponding to the k-th iteration is Satisfies the formula:
[0089]
[0090] w(X i ,X j ) k+1 Represents the target local geometric information between the i-th query image data and the j-th query image data in the target graph structure obtained at the k-th iteration.
[0091] S280: Determine the classification labels corresponding to the query image data in the query set to be processed based on the target label probability distribution matrix.
[0092] Figure 4 This is a schematic diagram of a specific example of a data classification method provided by an embodiment of the present invention. Specifically, the data set to be processed is input into the first target feature embedding model in the first target classification model, the first target feature embedding model performs feature extraction, and the extracted features are input into the first target graph structure model. The first target graph structure model is based on a preset objective function, namely Figure 4 Shown in The initial graph structure is optimized and updated, and the target graph structure and target label probability distribution matrix in the updated result are updated alternately and iteratively. Figure 4 The left matrix in the second layer of the first target graph structure model in represents the target label probability distribution matrix, the matrix to the right of the dotted arrow represents the optimized target label probability distribution matrix, and the two formulas above and below the dotted arrow represent the solution formulas for label probability and local geometric information, respectively. Figure 4 The two dashed boxes on the left of the third layer of the first target graph structure model represent the label graph structure in the feature space and the feature graph structure in the label space of each query image data in the query set to be processed, respectively. Based on the label graph structure and the feature graph structure, the target graph structure (i.e., the dashed box to the right of the third layer dashed arrow) is determined. The label graph structure and the feature graph structure can be determined based on the label probability distance and the feature distance, respectively.
[0093] When the function loss value of the preset objective function converges, the optimized target graph structure and the optimized target label probability distribution matrix corresponding to the optimized target graph structure are obtained. Based on the optimized target label probability distribution matrix, the classification labels corresponding to each query image data in the query set to be processed are determined.
[0094] The preset objective function in the technical solution of this embodiment contains two variables, namely the graph structure and the label probability distribution matrix. This embodiment splits the preset objective function into two sub-problems, namely optimizing the probability distribution matrix with a fixed graph structure and optimizing the graph structure with a fixed probability distribution matrix, to achieve alternating optimization of the graph structure and the probability distribution matrix until the function loss value corresponding to the preset objective function converges, so that the final target graph structure and target label probability distribution matrix are both optimal solutions, which solves the problem in the existing technology that the solution method of the fixed graph structure can only determine the unique solution of the graph structure, and further improves the recognition performance of the classification model.
[0095] On the basis of the above embodiment, this embodiment also optimizes the method for determining the first target graph structure model in the first target classification model in the above embodiment. Optionally, the method further includes: inputting the obtained verification data set into at least two first initial classification models respectively; wherein the verification data set includes a verification support set and a verification query set, the first initial classification model includes a first initial graph structure model and a first target feature embedding model, and the support parameters corresponding to the first initial graph structure model in different first initial classification models are different; for each first initial classification model, based on the true classification labels corresponding to each unlabeled data in the verification query set and the predicted classification labels corresponding to each unlabeled data output by the first initial classification model, determine the recognition rate corresponding to the first initial classification model; and use the first initial classification model with the highest recognition rate as the first target classification model.
[0096] Specifically, the validation support set contains a small amount of labeled data, and the validation query set contains a large amount of unlabeled data. The first target feature embedding model is a trained model, and the first target feature embedding models in different first initial classification models are the same.
[0097] The preset objective function in the technical solution of this embodiment includes two variables, namely, the graph structure and the label probability distribution matrix. In the step of determining the first target classification model, it is first ensured that the feature embedding model in the first initial classification model is the trained first target feature embedding model, so that in each alternating optimization process, the verification query features and the verification support features in the preset objective function are the same, reducing the number of variables in the preset objective function, improving the efficiency of determining the optimal graph structure and the optimal label probability distribution matrix, and thereby improving the efficiency of determining the first target classification model.
[0098] In this embodiment, the support parameters corresponding to the first initial graph structure models in different first initial classification models are different. For example, in the first initial classification model A, α=1, β=3; in the first initial classification model B, α=3, β=4. The number of first initial classification models and the parameter settings for the support parameters corresponding to different first initial graph structure models are not limited herein.
[0099] The technical solution of this embodiment does not improve the meta-learning training strategy of the graph structure model, but rather improves the model algorithm of the graph structure model. This technical solution determines the recognition rate of the first initial classification model with different support parameters based on the validation dataset, and uses the first initial classification model with the highest recognition rate as the first target classification model. This allows the graph structure model to be used in combination with any feature embedding model. While improving the prediction efficiency of query image data, it also expands the applicable scenarios of this solution and has strong promotion significance.
[0100] In one embodiment, optionally, the method further includes: inputting the acquired test data set into the first target classification model; wherein the test data set includes a test support set and a test query set; based on the true classification labels corresponding to each unlabeled data in the test query set and the predicted classification labels corresponding to each unlabeled data output by the first target classification model, determining the target classification accuracy of the first target classification model, and outputting the target classification accuracy.
[0101] Specifically, the test support set contains a small amount of labeled data, and the test query set contains a large amount of unlabeled data.
[0102] The advantage of this setting is that it allows users to accurately grasp the recognition performance of the selected first target classification model and provide data reference for subsequent model corrections.
[0103] On the basis of the above embodiment, this embodiment also optimizes the method for determining the first target feature embedding model in the first target classification model in the above embodiment. Optionally, the method further includes: inputting the acquired base class data set into the second initial classification model; wherein the base class data set contains multiple labeled data, and the second initial classification model contains an untrained second initial feature embedding model and a second initial classifier; based on the true classification labels corresponding to each labeled data in the base class data set and the predicted classification labels corresponding to each labeled data output by the second initial classification model, adjusting the model parameters in the second initial classification model to obtain a trained second target classification model; and using the second target feature embedding model in the second target classification model as the first target feature embedding model in the first initial classification model.
[0104] Specifically, through the second initial feature embedding model in the first initial classification model, feature extraction is performed on each labeled data in the input base class data set to obtain feature data, and each feature data is input into the second initial classifier. Through the second initial classifier, based on each feature data, the predicted classification label corresponding to the labeled data is determined.
[0105] Exemplarily, based on the predicted classification label and the true classification label corresponding to the labeled data, a cross entropy loss function value is determined, and based on the cross entropy loss function value, the model parameters in the second initial feature embedding model in the second initial classification model are trained. The cross entropy loss function C satisfies the formula:
[0106]
[0107] Among them, y q Indicates the true classification label corresponding to the qth labeled data in the base class dataset, Yq It represents the predicted classification label corresponding to the qth labeled data in the base class dataset, and Q represents the number of labeled data in the base class dataset.
[0108] In one embodiment, optionally, before using the second target feature embedding model in the second target classification model as the first target feature embedding model in the first initial classification model, the method further includes: determining the training classification accuracy corresponding to the second target classification model based on the acquired verification data set, and judging whether the training classification accuracy meets the preset accuracy range; if so, using the second target feature embedding model in the second target classification model as the first target feature embedding model in the first initial classification model; if not, adjusting the hyperparameters in the second target classification model, and using the adjusted second target classification model as the second initial classification model, and re-executing the operation of inputting the acquired base class data set into the second initial classification model.
[0109] Exemplarily, hyperparameters include, but are not limited to, the learning rate of the network model, the number of convolution kernels, the size of the convolution kernels, the number of batch samples, the number of weight decays, etc. Hyperparameters are not limited here.
[0110] Figure 5 It is a flowchart of a method for determining a first target classification model provided in accordance with an embodiment of the present invention. Specifically, data is input into a data storage device. In this embodiment, the input data includes a base class data set, a validation data set, and a test data set. Based on the base class data set and the cross entropy function loss value, the second initial classification model is trained to obtain a second target classification model. Based on the validation data set, the classification accuracy of the second target classification model is tested to determine whether the training classification accuracy corresponding to the second target classification model meets the preset accuracy range. If not, the hyperparameters in the second target classification model are adjusted, and the adjusted second target classification model is used as the second initial classification model. The operation of training the second initial classification model based on the base class data to obtain the second target classification model is repeated. If the training classification accuracy meets the preset accuracy range, the second target feature embedding model in the second target classification model is used as the first target feature embedding model in the first initial classification model. Based on the validation data set, the recognition rates corresponding to different first initial classification models are determined, and the first initial classification model with the highest recognition rate is used as the first target classification model. At this time, the balance parameter corresponding to the first target graph structure model in the first target classification model is the optimal balance parameter. Based on the test data set, the classification accuracy of the first target classification model is tested, and the target classification accuracy is output.
[0111] It should be noted that the distance calculation method mentioned in the above embodiment of the present invention is only for illustrative purposes and is not intended to limit the present invention. Exemplary distance calculation methods include but are not limited to Euclidean distance, cosine distance, Gaussian kernel function, Manhattan distance, Chebyshev distance, and the like.
[0112] Figure 6 FIG. 1 is a structural diagram of a data classification device provided according to an embodiment of the present invention. Figure 6 As shown, the device includes: a data set input module 310 to be processed, a feature extraction module 320 and a classification label determination module 330.
[0113] The processing data set input module 310 is used to input the acquired processing data set into the first target classification model; wherein the processing data set includes a processing support set and a processing query set, the processing support set includes a plurality of labeled data, the processing query set includes a plurality of unlabeled data, and the first target classification model includes a trained first target feature embedding model and a first target graph structure model;
[0114] A feature extraction module 320 is configured to extract support features and query features corresponding to the support set and query set, respectively, through the first target feature embedding model, and output the support features and query features to the first target graph structure model.
[0115] The classification label determination module 330 is used to optimize and update the initial graph structure determined based on the query features to be processed based on the preset objective function and the supporting features to be processed through the first target graph structure model, obtain an updated result, and determine the classification label corresponding to each query data to be processed in the query set to be processed based on the updated result.
[0116] The technical solution of this embodiment is to input the data set to be processed into the first target classification model, and extract the support set to be processed and the query set to be processed in the data set to be processed respectively through the first feature embedding model in the first target classification model to obtain the support features to be processed and the query features to be processed, and output the support features to be processed and the query features to be processed to the first target graph structure model in the first target classification model. Through the first target graph structure model, based on the preset objective function, the initial graph structure determined based on the support features to be processed and the query features to be processed is optimized and updated to obtain the updated result, and based on the updated result, the classification label corresponding to each query data to be processed in the query set to be processed is determined, which solves the problem that the existing graph structure construction method is simple and fixed, and improves the recognition performance of the classification model.
[0117] Based on the above embodiment, optionally, the labeled data includes supporting image data and classification label data corresponding to the supporting image data, and the unlabeled data includes query image data. Accordingly, the initial graph structure is used to represent the initial local geometric information between each query image data in the query set to be processed.
[0118] Based on the above embodiment, optionally, the update result includes the target graph structure and the target label probability distribution matrix corresponding to the target graph structure. Accordingly, the classification label determination module 330 includes:
[0119] An initial label probability distribution matrix determining unit, configured to determine an initial label probability distribution matrix based on a preset objective function, supporting features to be processed, and an initial graph structure determined based on query features to be processed;
[0120] a target graph structure determining unit, configured to determine a target graph structure based on an initial label probability distribution matrix and a preset objective function, and to determine a target label probability distribution matrix based on the target graph structure and the preset objective function;
[0121] Among them, the target graph structure is used to represent the target local geometric information in the feature space and label space between each query image data in the query set to be processed, the target label probability distribution matrix is used to represent the target label probability between each query image data in the query set to be processed and the classification label data corresponding to the support set to be processed, and the preset target function is used to represent the functional relationship between the graph structure and the label probability distribution matrix.
[0122] Based on the above embodiment, optionally, the target graph structure determination unit includes:
[0123] A label probability distance determination subunit is used to determine the label probability distance between each query image data in the query set to be processed in the label space based on the initial label probability distribution matrix and a preset objective function;
[0124] A feature distance determination subunit, configured to determine the feature distance between each query image data in the query set to be processed in the feature space based on the query feature to be processed and a preset objective function;
[0125] The target graph structure determination subunit is used to determine the target graph structure based on the label probability distance and feature distance.
[0126] Based on the above embodiment, optionally, the target graph structure determination subunit is specifically configured to:
[0127] Determine the target geometric distance based on the label probability distance and feature distance;
[0128] For each query image data in the query set to be processed, based on a preset classification algorithm, the target geometric distance between the query image data and other query image data in the query set to be processed is classified and screened;
[0129] Based on the filtered target geometric distance, the target subgraph structure corresponding to the query image data is determined.
[0130] Based on the above embodiment, optionally, the device further includes:
[0131] The loss function value judgment module is used to judge whether the function loss value corresponding to the preset objective function converges based on the target graph structure and the target label probability distribution matrix;
[0132] A classification label determination module is used to determine the classification labels corresponding to the query image data in the query set to be processed based on the target label probability distribution matrix if yes;
[0133] The target label probability distribution matrix optimization module is used to determine the optimized target label probability distribution matrix based on the target label probability distribution matrix and the preset objective function, and repeatedly call the loss function value judgment module based on the optimized target probability distribution matrix.
[0134] Based on the above embodiment, optionally, the preset objective function satisfies the formula:
[0135]
[0136] Among them, Y represents the label probability distribution matrix, W represents the graph structure, C represents the type of classification label data corresponding to the support set to be processed, M represents the number of query image data in the query set to be processed, and Y ic represents the label probability between the i-th query image data in the query set to be processed and the c-th classification label data in the support set to be processed, X i represents the query features of the i-th query image data in the query set to be processed, X j represents the query features of the j-th query image data in the query set to be processed, M c represents the support features to be processed for the supporting image data corresponding to the c-th classification label data in the support set to be processed, w(X i ,X j ) represents the local geometric information between the i-th query image data and the j-th query image data, d(X i ,M c ) represents the feature distance between the i-th query feature to be processed and the c-th support feature to be processed, Y i Indicates the label probability corresponding to the i-th query image data in the query set to be processed, Y jrepresents the label probability corresponding to the j-th query image data in the query set to be processed, and α and β represent the support parameters in the first target graph structure model.
[0137] Based on the above embodiment, optionally, the device further includes:
[0138] a first target classification module determination module, configured to input the obtained validation data set into at least two first initial classification models respectively; wherein the validation data set includes a validation support set and a validation query set, the first initial classification model includes a first initial graph structure model and a first target feature embedding model, and the support parameters corresponding to the first initial graph structure model are different in different first initial classification models;
[0139] For each first initial classification model, determining a recognition rate corresponding to the first initial classification model based on the true classification labels corresponding to each unlabeled data in the validation query set and the predicted classification labels corresponding to each unlabeled data output by the first initial classification model;
[0140] The first initial classification model with the highest recognition rate is used as the first target classification model.
[0141] Based on the above embodiment, optionally, the device further includes:
[0142] A target classification accuracy output module is used to input the acquired test data set into the first target classification model; wherein the test data set includes a test support set and a test query set;
[0143] Based on the true classification labels corresponding to each unlabeled data in the test query set and the predicted classification labels corresponding to each unlabeled data output by the first target classification model, the target classification accuracy of the first target classification model is determined and the target classification accuracy is output.
[0144] Based on the above embodiment, optionally, the device includes:
[0145] a first target feature embedding model determination module, configured to input the acquired base class data set into a second initial classification model; wherein the base class data set comprises a plurality of labeled data, and the second initial classification model comprises an untrained second initial feature embedding model and a second initial classifier;
[0146] Based on the true classification labels corresponding to each labeled data in the base class dataset and the predicted classification labels corresponding to each labeled data output by the second initial classification model, the model parameters in the second initial feature embedding are adjusted to obtain a trained second target classification model;
[0147] The second target feature embedding model in the second target classification model is used as the first target feature embedding model in the first initial classification model.
[0148] Based on the above embodiment, optionally, the device further includes:
[0149] a second target classification model determination module, configured to determine, based on the acquired validation data set, a training classification accuracy corresponding to the second target classification model before using the second target feature embedding model in the second target classification model as the first target feature embedding model in the first initial classification model, and to judge whether the training classification accuracy meets a preset accuracy range;
[0150] If yes, the second target feature embedding model in the second target classification model is used as the first target feature embedding model in the first initial classification model;
[0151] If not, the hyperparameters in the second target classification model are adjusted, and the adjusted second target classification model is used as the second initial classification model, and the operation of inputting the acquired base class data set into the second initial classification model is re-executed.
[0152] The data classification device provided in the embodiment of the present invention can execute the data classification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0153] Figure 7 1 is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention. The electronic device 10 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 may 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.
[0154] like Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. 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 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0155] Multiple 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 magnetic 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 via a computer network such as the Internet and / or various telecommunication networks.
[0156] The processor 11 may be any general-purpose and / or specialized processing component 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 specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data classification method.
[0157] In some embodiments, the data classification method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data classification method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the data classification method in any other suitable manner (e.g., by means of firmware).
[0158] Various embodiments of the systems and techniques described 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), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes 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.
[0159] Computer programs for implementing the data classification methods of the present invention can be written in any combination of one or more programming languages. These computer programs can 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 flowcharts and / or block diagrams are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0160] An embodiment of the present invention further provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a processor to execute a data classification method, the method comprising:
[0161] Inputting the obtained data set to be processed into the first target classification model; wherein the data set to be processed includes a support set to be processed and a query set to be processed, the support set to be processed includes multiple labeled data, the query set to be processed includes multiple unlabeled data, and the first target classification model includes a trained first target feature embedding model and a first target graph structure model;
[0162] Extracting the support features to be processed and the query features to be processed corresponding to the support set to be processed and the query set to be processed respectively through the first target feature embedding model, and outputting the support features to be processed and the query features to be processed to the first target graph structure model;
[0163] Through the first target graph structure model, based on the preset objective function and the supporting features to be processed, the initial graph structure determined based on the query features to be processed is optimized and updated to obtain the updated results. Based on the updated results, the classification labels corresponding to each query data to be processed in the query set to be processed are determined.
[0164] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0165] To provide interaction with a user, the systems and techniques described herein can 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0166] The systems and techniques described herein can be implemented in a computing system that includes back-end 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 front-end components (e.g., a user computer with a graphical user interface or 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 back-end components, middleware components, or front-end components. The components of the system can 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.
[0167] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0168] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0169] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A data classification method, characterized in that: include: Inputting the acquired data set to be processed into a first target classification model; wherein the data set to be processed includes a support set to be processed and a query set to be processed, the support set to be processed includes a plurality of labeled data, the query set to be processed includes a plurality of unlabeled data, and the first target classification model includes a trained first target feature embedding model and a first target graph structure model; extracting, through the first target feature embedding model, support features to be processed and query features to be processed corresponding to the support set to be processed and the query set to be processed, respectively, and outputting the support features to be processed and the query features to be processed to the first target graph structure model; An initial graph structure determined based on the query features to be processed is optimized and updated using the first target graph structure model based on a preset objective function and the supporting features to be processed to obtain an updated result, and a classification label corresponding to each query data to be processed in the query set to be processed is determined based on the updated result; The labeled data includes supporting image data and classification label data corresponding to the supporting image data, the unlabeled data includes query image data, and the update result includes a target graph structure and a target label probability distribution matrix corresponding to the target graph structure; The optimizing and updating of the initial graph structure determined based on the query features to be processed based on the preset objective function and the supporting features to be processed to obtain an updated result includes: Determining an initial label probability distribution matrix based on a preset objective function, the supporting features to be processed, and an initial graph structure determined based on the query features to be processed; Determining a target graph structure based on the initial label probability distribution matrix and the preset objective function, and determining a target label probability distribution matrix based on the target graph structure and the preset objective function; Among them, the target graph structure is used to represent the target local geometric information in the feature space and label space between each query image data in the query set to be processed, the target label probability distribution matrix is used to represent the target label probability between each query image data in the query set to be processed and the classification label data corresponding to the support set to be processed, and the preset target function is used to represent the functional relationship between the graph structure and the label probability distribution matrix.
2. The method according to claim 1, characterized in that The initial graph structure is used to represent the initial local geometric information between each query image data in the query set to be processed.
3. The method according to claim 1, characterized in that The determining of the target graph structure based on the initial label probability distribution matrix and the preset objective function includes: Based on the initial label probability distribution matrix and the preset objective function, determining the label probability distance between each query image data in the query set to be processed in the label space; Determining the feature distance between each query image data in the query set to be processed in the feature space based on the query feature to be processed and the preset objective function; A target graph structure is determined based on the label probability distance and the feature distance.
4. The method according to claim 3, characterized in that The determining of the target graph structure based on the label probability distance and the feature distance includes: Determining a target geometric distance based on the label probability distance and the feature distance; For each query image data in the query set to be processed, classify and screen the target geometric distance between the query image data and other query image data in the query set to be processed based on a preset classification algorithm; Based on the filtered target geometric distance, a target subgraph structure corresponding to the query image data is determined.
5. The method according to claim 1, wherein The method further comprises: Based on the target graph structure and the target label probability distribution matrix, determining whether the function loss value corresponding to the preset objective function converges; If yes, determining the classification labels corresponding to the query image data in the query set to be processed based on the target label probability distribution matrix; If not, based on the target label probability distribution matrix and the preset objective function, determine the optimized target label probability distribution matrix, and based on the optimized target probability distribution matrix, repeat the operation of judging whether the function loss value corresponding to the preset objective function converges.
6. The method according to any one of claims 2 to 5, characterized in that: The preset objective function satisfies the formula: Among them, Y represents the label probability distribution matrix, W represents the graph structure, C represents the type of classification label data corresponding to the support set to be processed, M represents the number of query image data in the query set to be processed, and Y ic represents the label probability between the i-th query image data in the query set to be processed and the c-th classification label data in the support set to be processed, X i represents the query feature to be processed in the i-th query image data in the query set to be processed, X j represents the query feature to be processed of the jth query image data in the query set to be processed, M c represents the support features to be processed of the supporting image data corresponding to the c-th classification label data in the support set to be processed, w(X i ,X j ) represents the local geometric information between the i-th query image data and the j-th query image data, d(X i ,M c ) represents the feature distance between the i-th query feature to be processed and the c-th support feature to be processed, Y i represents the label probability corresponding to the i-th query image data in the query set to be processed, Y j represents the label probability corresponding to the j-th query image data in the query set to be processed, and α and β represent the support parameters in the first target graph structure model.
7. The method according to claim 6, characterized in that The method further comprises: Inputting the obtained validation data set into at least two first initial classification models respectively; wherein the validation data set includes a validation support set and a validation query set, the first initial classification model includes a first initial graph structure model and a first target feature embedding model, and the support parameters corresponding to the first initial graph structure model are different in different first initial classification models; For each first initial classification model, determining a recognition rate corresponding to the first initial classification model based on the true classification labels corresponding to the unlabeled data in the verification query set and the predicted classification labels corresponding to the unlabeled data output by the first initial classification model; The first initial classification model with the highest recognition rate is used as the first target classification model.
8. The method according to claim 7, characterized in that The method further comprises: Inputting the acquired test data set into the first target classification model; wherein the test data set includes a test support set and a test query set; Based on the true classification labels corresponding to each unlabeled data in the test query set and the predicted classification labels corresponding to each unlabeled data output by the first target classification model, the target classification accuracy of the first target classification model is determined and the target classification accuracy is output.
9. The method according to claim 7, characterized in that The method further comprises: Inputting the obtained base class data set into a second initial classification model; wherein the base class data set includes a plurality of labeled data, and the second initial classification model includes an untrained second initial feature embedding model and a second initial classifier; Adjusting the model parameters of the second initial feature embedding model based on the true classification labels corresponding to the respective labeled data in the base class dataset and the predicted classification labels corresponding to the respective labeled data output by the second initial classification model to obtain a trained second target classification model; The second target feature embedding model in the second target classification model is used as the first target feature embedding model in the first initial classification model.
10. The method according to claim 9, characterized in that Before using the second target feature embedding model in the second target classification model as the first target feature embedding model in the first initial classification model, the method further includes: Determining the training classification accuracy corresponding to the second target classification model based on the obtained validation data set, and judging whether the training classification accuracy meets a preset accuracy range; If yes, the second target feature embedding model in the second target classification model is used as the first target feature embedding model in the first initial classification model; If not, the hyperparameters in the second target classification model are adjusted, and the adjusted second target classification model is used as the second initial classification model, and the operation of inputting the acquired base class data set into the second initial classification model is re-executed.
11. A data classification device, characterized in that: include: A data set input module for processing, configured to input the acquired data set to be processed into a first target classification model; wherein the data set to be processed includes a support set to be processed and a query set to be processed, the support set to be processed includes a plurality of labeled data, the query set to be processed includes a plurality of unlabeled data, and the first target classification model includes a trained first target feature embedding model and a first target graph structure model; a feature extraction module, configured to extract, through the first target feature embedding model, support features to be processed and query features to be processed corresponding to the support set to be processed and the query set to be processed, respectively, and output the support features to be processed and the query features to be processed to the first target graph structure model; a classification label determination module, configured to optimize and update the initial graph structure determined based on the query features to be processed using the first target graph structure model, based on a preset objective function and the supporting features to be processed, obtain an updated result, and determine, based on the updated result, the classification label corresponding to each query data to be processed in the query set to be processed; The labeled data includes supporting image data and classification label data corresponding to the supporting image data, the unlabeled data includes query image data, and the update result includes a target graph structure and a target label probability distribution matrix corresponding to the target graph structure; The classification label determination module includes: An initial label probability distribution matrix determining unit, configured to determine an initial label probability distribution matrix based on a preset objective function, the supporting features to be processed, and an initial graph structure determined based on the query features to be processed; a target graph structure determining unit, configured to determine a target graph structure based on the initial label probability distribution matrix and the preset objective function, and to determine a target label probability distribution matrix based on the target graph structure and the preset objective function; Among them, the target graph structure is used to represent the target local geometric information in the feature space and label space between each query image data in the query set to be processed, the target label probability distribution matrix is used to represent the target label probability between each query image data in the query set to be processed and the classification label data corresponding to the support set to be processed, and the preset target function is used to represent the functional relationship between the graph structure and the label probability distribution matrix.
12. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed 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 the data classification method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data classification method according to any one of claims 1 to 10 when executed.
Citation Information
Patent Citations
Dynamic hypergraph structure learning classification method and system based on tensor representation
CN111695011A
Modification of in-execution smart contract programs
US10831452B1