CN114548297A - Data classification method, device, equipment and medium based on domain self-adaption - Google Patents

Data classification method, device, equipment and medium based on domain self-adaption Download PDF

Info

Publication number
CN114548297A
CN114548297A CN202210177137.9A CN202210177137A CN114548297A CN 114548297 A CN114548297 A CN 114548297A CN 202210177137 A CN202210177137 A CN 202210177137A CN 114548297 A CN114548297 A CN 114548297A
Authority
CN
China
Prior art keywords
sample set
convolutional neural
neural network
network model
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210177137.9A
Other languages
Chinese (zh)
Inventor
陈彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202210177137.9A priority Critical patent/CN114548297A/en
Publication of CN114548297A publication Critical patent/CN114548297A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention relates to an artificial intelligence technology, and provides a data classification method, a device, equipment and a medium based on field self-adaptation. The method and the device realize the classification of the samples of the target domain sample set into at least two types according to the information entropy, then improve the loss weight of the model when classifying the second type target domain samples corresponding to low information entropy, generate the countermeasure network by using semi-supervised learning, and ensure the stability of the model and improve the classification precision.

Description

Data classification method, device, equipment and medium based on domain self-adaption
Technical Field
The invention relates to the technical field of intelligent decision making of artificial intelligence, in particular to a data classification method and device based on field self-adaptation, computer equipment and a storage medium.
Background
Because the traditional machine learning algorithm usually assumes that the training samples and the testing samples follow the same distribution, the data obtained in practical application is not the same. Domain adaptive learning can be used to solve the problem that training samples and test samples do not follow the same distribution.
There are three main methods for field adaptation: sample-based methods, feature-based methods, and model-based methods. In practical application, different methods are often selected according to different application scenes, however, each method of the field adaptive method has its limitations: the feature-based method usually ignores the label information of the source domain data, and the sample-based method usually hardly processes samples with far-apart source domain data, i.e. no matter any one of the field adaptive methods is adopted, the accuracy of the classification result obtained by processing the to-be-classified data is not high.
Disclosure of Invention
The embodiment of the invention provides a data classification method, a device, computer equipment and a storage medium based on domain self-adaptation, and aims to solve the problems that in the prior art, a feature-based method in a domain self-adaptation method ignores label information of source domain data, and a sample-based method is difficult to process samples with far-apart source domain data, so that the accuracy of classification results obtained by processing to-be-classified data by the domain self-adaptation method is low.
In a first aspect, an embodiment of the present invention provides a data classification method based on domain self-adaptation, including:
responding to a model training instruction, and acquiring a source domain sample set corresponding to the model training instruction;
obtaining a convolutional neural network model to be trained, and performing model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value to obtain the convolutional neural network model;
acquiring a target domain sample set, and classifying the target domain samples based on sample information entropy to obtain a target domain sample classification result; wherein the target domain sample classification result at least comprises a first type target domain sample set and a second type target domain sample set;
inputting each sample in the first type target domain sample set into the convolutional neural network model for operation to obtain a first type classification value corresponding to each sample so as to update the first type target domain sample set;
performing model training on the confrontation network to be trained by using a current sample set consisting of the first type target domain sample set and the source domain sample set to obtain a trained confrontation network; and
and inputting each sample in the second type target domain sample set into the countermeasure network for operation to obtain a second type classification value corresponding to each sample in the second type target domain sample set.
In a second aspect, an embodiment of the present invention provides a data classification apparatus based on domain self-adaptation, including:
the source domain sample set acquisition unit is used for responding to a model training instruction and acquiring a source domain sample set corresponding to the model training instruction;
the first model training unit is used for acquiring a convolutional neural network model to be trained, and performing model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value so as to obtain the convolutional neural network model;
the target domain sample set classification unit is used for acquiring a target domain sample set, and classifying the target domain samples based on sample information entropy to obtain a target domain sample classification result; wherein the target domain sample classification result at least comprises a first type target domain sample set and a second type target domain sample set;
the first classification unit is used for inputting each sample in the first type target domain sample set into the convolutional neural network model for operation to obtain a first type classification value corresponding to each sample so as to update the first type target domain sample set;
the second model training unit is used for carrying out model training on the confrontation network to be trained by using the current sample set consisting of the first type target domain sample set and the source domain sample set to obtain the confrontation network after training; and
and the second classification unit is used for inputting each sample in the second type target domain sample set to the countermeasure network for operation to obtain a second type classification value corresponding to each sample in the second type target domain sample set.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the method for classifying data based on domain adaptation described in the first aspect.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method for data classification based on domain adaptation according to the first aspect.
The embodiment of the invention provides a data classification method, a device, computer equipment and a storage medium based on field self-adaptation. The method and the device realize the classification of the samples of the target domain sample set into at least two types according to the information entropy, then improve the loss weight of the model when classifying the second type target domain samples corresponding to low information entropy, generate the countermeasure network by using semi-supervised learning, and ensure the stability of the model and improve the classification precision.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a data classification method based on domain adaptation according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a data classification method based on domain adaptation according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a domain-adaptive-based data classification apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of a data classification method based on domain adaptation according to an embodiment of the present invention; fig. 2 is a schematic flowchart of a data classification method based on domain adaptation according to an embodiment of the present invention, where the data classification method based on domain adaptation is applied to a server and is executed by application software installed in the server.
As shown in fig. 2, the method includes steps S101 to S106.
S101, responding to a model training instruction, and obtaining a source domain sample set corresponding to the model training instruction.
In this embodiment, a server is used as an execution subject to describe the technical solution. The server may obtain a source domain sample set, for example, taking the source domain sample set as the post data of the history agent, where a piece of the post data of the history agent includes fields of whether the history agent turns right in 3 months, whether the history agent is still in work in 13 months, and each source domain sample in the source domain sample set corresponds to a piece of the post data of an agent. And after the source domain sample set is obtained in the server, subsequent model training can be carried out.
S102, obtaining a convolutional neural network model to be trained, and performing model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value to obtain the convolutional neural network model.
In this embodiment, after the source domain sample set is known, the field value of each field of each source domain sample is correspondingly converted into a vector value (for example, the numeric type field value is normalized and converted into a 0-1 dummy vector, the category type field value is converted into a specific category value, the text type field value is converted into a semantic vector, and the like), an input vector corresponding to each source domain sample can be obtained, and an output value corresponding to each source domain sample is also known, so that each source domain sample can be used as a sample data to perform model training on the convolutional neural network model to be trained until the loss function of the model is the minimum value, so as to obtain the convolutional neural network model.
In one embodiment, step S102 includes:
obtaining a pre-training convolutional neural network model, and taking model parameters of the pre-training convolutional neural network model as initial model parameters of the convolutional neural network model to be trained so as to perform model initialization on the convolutional neural network model to be trained;
performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain a primary training convolutional neural network model;
obtaining a loss function of the initial training convolutional neural network model;
if the loss function is determined to be the minimum value, taking the initial training convolutional neural network model as a convolutional neural network model;
and if the loss function is determined not to be the minimum value, fine tuning the initial training convolutional neural network model to update the initial training convolutional neural network model, and returning to execute the step of performing model training on the to-be-trained convolutional neural network model according to the source domain sample set to obtain the initial training convolutional neural network model.
In this embodiment, in order to improve the efficiency of model training, a pre-trained convolutional neural network model (that is, a pre-trained model) is generally obtained first, and then model parameters of the pre-trained convolutional neural network model are transmitted to the convolutional neural network model to be trained to serve as initial model parameters thereof, so as to implement model initialization on the convolutional neural network model to be trained. And then carrying out model training on the convolutional neural network model to be trained through each source domain sample in the source domain sample set to obtain a primary training convolutional neural network model.
And if the loss function is determined to be the minimum value, the initial training convolutional neural network model does not need to be subjected to fine tuning, at the moment, the initial training convolutional neural network model is used as the convolutional neural network model, if the loss function is determined not to be the minimum value, the initial training convolutional neural network model needs to be subjected to fine tuning, at the moment, the initial training convolutional neural network model is subjected to fine tuning to update the initial training convolutional neural network model, and then, the step of performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain the initial training convolutional neural network model is returned.
In an embodiment, the formula for obtaining the loss function in the loss function for obtaining the initial training convolutional neural network model is L ═ Lsup+λLada(ii) a Wherein L issupA loss function, L, representing source domain samples in a set of source domain samplesadaDenotes the adaptation loss in the transfer learning, and λ denotes a preset balance coefficient.
In this embodiment, λ > 0. When the loss function of the training convolutional neural network model is calculated, the adaptive loss in the migration learning corresponding to the domain adaptive method is fully considered, so that a more accurate loss function can be calculated. When the loss function is determined to be the minimum value, the loss function is not equal to 0, but the loss function is already converged, and the loss function obtained when the convolutional neural network model is further finely tuned is not reduced any more, so that the loss function can be determined to be the minimum value.
Wherein the content of the first and second substances,
Figure BDA0003520731690000061
Figure BDA0003520731690000062
and n issRepresenting the number of samples in the source domain sample set, L representing the number of neural network layers in the convolutional neural network that are regularized using the MMD penalty function (where the MMD is known as Max mean variance), klIs a two-dimensional gaussian kernel function and,
Figure BDA0003520731690000063
represents the result of the activation function of the source domain sample set at the l < th > layer (more specifically, the result is the activation function of the source domain sample set at the l < th > layer
Figure BDA0003520731690000064
Wherein l represents the l-th layer,
Figure BDA0003520731690000065
the (2i-1) th type sample of the source domain sample set is represented as a result obtained by the l-th layer activation function, the s type represents a simple sample corresponding to the sample entropy not exceeding the preset information entropy threshold value in the source domain sample set in more concrete implementation), and
Figure BDA0003520731690000066
represents the result of the activation function of the source domain sample set at the l < th > layer (more specifically, the result is the activation function of the source domain sample set at the l < th > layer
Figure BDA0003520731690000067
Wherein l represents the l-th layer,
Figure BDA0003520731690000068
the (2i-1) th type sample of the source domain sample set is represented as a result obtained by the l-th layer activation function, the t type represents a difficultly classified sample corresponding to the sample information entropy exceeding a preset information entropy threshold value in the source domain sample set in more specific implementation,
Figure BDA0003520731690000069
reference is made to the specific meanings of
Figure BDA00035207316900000610
And will not be described in detail herein
Figure BDA00035207316900000611
Reference is made to the specific meanings of
Figure BDA00035207316900000612
And will not be described in detail herein.
In an embodiment, the performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain an initial training convolutional neural network model includes:
deleting the full-connection layer positioned at the last layer in the initial training convolutional neural network model to obtain a first adjusting convolutional neural network model;
acquiring a total number to be classified corresponding to the source domain sample set, and adding a current full-connection layer with the total number to be classified to the last layer of the first adjustment convolutional neural network model to obtain a second adjustment convolutional neural network model;
and training the current full-connection layer in the second adjusted convolutional neural network model according to the samples in the source domain sample set to obtain a third adjusted convolutional neural network model so as to update the initial training convolutional neural network model.
In this embodiment, after the model parameters of the pre-trained convolutional neural network model are migrated and sent to the convolutional neural network model to be trained to serve as the initial model parameters of the pre-trained convolutional neural network model, the pre-trained convolutional neural network model is used for fine tuning to train the pre-trained convolutional neural network model into the initial training convolutional neural network model meeting the current use requirement without restarting training the convolutional neural network model. The last fully-connected layer of the pre-trained convolutional neural network model is not suitable for satisfying the current requirement (this is because the total number of classes corresponding to the pre-trained convolutional neural network model may be N1, while the total number of classes corresponding to the initially-trained convolutional neural network model is N2, and N2 is not equal to N1). At this time, the full-link layer located in the last layer in the initial training convolutional neural network model may be directly deleted to obtain a first adjustment convolutional neural network model, then the current full-link layer with the total number to be classified is added to the last layer of the first adjustment convolutional neural network model to obtain a second adjustment convolutional neural network model, and finally the last full-link layer in the second adjustment convolutional neural network model is trained according to the samples in the source domain sample set, so that a third adjustment convolutional neural network model meeting the use requirement of the current scene can be quickly obtained, and at this time, the third adjustment convolutional neural network model is used as the initial training convolutional neural network model. Therefore, the initial training convolutional neural network model can be obtained through quick training in a mode of pre-training and fine tuning.
S103, obtaining a target domain sample set, and classifying the target domain samples based on sample information entropy to obtain a target domain sample classification result; wherein the target domain sample classification result at least comprises a first type target domain sample set and a second type target domain sample set.
In this embodiment, the server may further obtain a target domain sample set, for example, taking the target domain sample set as the entry data of the agent to be added as an example, for example, the entry data of the agent to be added includes fields of whether the agent to be added is turning right in 3 months, whether the historical agent is still working in 13 months, and the like, and the fields are empty values, at this time, the target domain sample set may be classified according to the sample information entropy, so as to obtain a target domain sample classification result. And then, predicting different sample sets in the target domain sample classification result based on different prediction models, so as to obtain classification values of fields of whether the agent changes right in 3 months or not, whether the historical agent is still working in 13 months or not, and the like.
In one embodiment, step S103 includes:
obtaining samples corresponding to the sample information entropy which does not exceed the preset information entropy threshold value, and forming a first type target domain sample set;
and obtaining samples corresponding to the sample information entropy exceeding the information entropy threshold value to form a second type target domain sample set.
In this embodiment, when calculating and acquiring the sample information entropy of each sample in the target domain samples, the following formula (1) is referred to:
Figure BDA0003520731690000081
in formula (1), I (V) represents sample information entropy of a sample, vcThe probability of the sample classified as C is shown, the base number of the log is 2, and the value range of C is [1, C]And C represents the total number of classifications of the samples. The higher the sample information entropy of a sample is, the more the signal of the sample isThe lower the uncertainty and the easier it is to classify, the lower the sample information entropy of a sample represents the higher the uncertainty of the information of the sample and the less easily it is classified.
After the sample information entropies of all samples in the target domain samples are obtained through calculation, the samples of which the sample information entropies do not exceed the preset information entropy threshold value are divided into a first type of target domain sample set, and the samples of which the sample information entropies exceed the preset information entropy threshold value are divided into a second type of target domain sample set. Wherein the samples in the first type target domain sample set are all samples that are easy to be classified, and the samples in the second type target domain sample set are all samples that are not easy to be classified. Therefore, the samples in the target domain samples can be quickly classified into two classes based on the information entropy of the samples.
And S104, inputting each sample in the first type target domain sample set into the convolutional neural network model for operation to obtain a first type classification value corresponding to each sample so as to update the first type target domain sample set.
In this embodiment, since the convolutional neural network model is obtained before, and the samples in the first type target domain sample set are all samples that are easy to be classified, the samples in the first type target domain sample set can be directly predicted based on the convolutional neural network model. And at the moment, the input vector corresponding to each sample in the first-type target domain sample set is input into the convolutional neural network model to be operated to obtain a first-type classification value corresponding to each sample, and because the input vector corresponding to each sample in the first-type target domain sample set and the first-type classification value are known, each sample in the first-type target domain sample set is updated into a new first-type target domain sample set which has the first-type classification value and can be used as a training sample.
And S105, performing model training on the confrontation network to be trained by using the current sample set consisting of the first type target domain sample set and the source domain sample set to obtain the trained confrontation network.
In this embodiment, in order to more accurately calculate the classification value of each sample in the second type target domain sample set, no operation is performed based on the convolutional neural network model. Instead, the current sample set composed of the first type target domain sample set and the source domain sample set may be used, and through this way of sample expansion, the first type target domain sample set with obtained classification values may be merged into the source domain sample set to improve timeliness of data (because the source domain sample set is historical data). And then, modeling the confrontation network to be trained based on the current sample set to obtain the trained confrontation network.
In one embodiment, the countermeasure network to be trained is a recurrent countermeasure network; the model training of the confrontation network to be trained is performed on the present sample set formed by the first type target domain sample set and the source domain sample set, so as to obtain the trained confrontation network, and the method comprises the following steps:
obtaining an input vector of each sample in the current sample set;
obtaining the vector similarity between the input vectors of all samples in the current sample set, and grouping the current sample set according to a preset grouping strategy to obtain a current sample set grouping result; wherein, the current sample set grouping result comprises a plurality of current sample set sub-groups which are respectively marked as the 1 st current sample set sub-group to the k current sample set sub-group, and k is the total number of the current sample set sub-groups included in the current sample set grouping result;
counting and obtaining the total number of samples correspondingly included in each current sample set subgroup, and obtaining the current sample set subgroup with the maximum total number of samples as a target current sample set subgroup;
and continuously obtaining input vectors of two samples from the target current sample set sub-group to train the to-be-trained cyclic confrontation network model, and stopping obtaining the input vectors of the two samples from the target current sample set sub-group when the to-be-trained cyclic confrontation network model converges to obtain the cyclic confrontation network model as the trained cyclic confrontation network model.
In the embodiment of training the recurrent countermeasure network model, in order to improve the efficiency of model training, a part of similar and large number of samples may be selected from the current sample set to form a target current sample set sub-group to train the recurrent countermeasure network model to be trained (i.e., a cycle-GAN model).
After the current sample set is grouped, samples with similar input vectors are grouped into the same current sample set sub-group. At this time, the current sample set subgroup with the maximum total number of samples included in the plurality of current sample set subgroups is selected as the target current sample set subgroup. At this time, the target current sample set sub-group can be used as a training sample after screening to train the to-be-trained cyclic countermeasure network model.
For example, the input vectors of two samples arbitrarily selected from the target current sample set sub-group are respectively marked as sample a and sample b, and two generators G need to be trainedAB、GBAAnd two discriminators DA、DBFor sample a, by generator GABGenerating false samples
Figure BDA0003520731690000091
By means of discriminator DBDiscrimination of false samples
Figure BDA0003520731690000092
Whether or not to approximate sample b, and will be a false sample
Figure BDA0003520731690000093
Through generator GBAGenerating a sample
Figure BDA0003520731690000094
And judging the sample
Figure BDA0003520731690000095
Whether to approximate the original real sample a. Likewise, for sample b, by generator GBAGenerating false samples
Figure BDA0003520731690000096
By means of discriminator DADiscrimination of false samples
Figure BDA0003520731690000097
Is approximated to the sample a, and a false sample is generated
Figure BDA0003520731690000098
Through generator GABGenerating a sample
Figure BDA0003520731690000099
And judging the sample
Figure BDA00035207316900000910
Whether it is similar to the original real sample b. Finally, iteration is carried out, so that the discriminator cannot discriminate whether the sample generated by the generator is a real sample.
Respectively optimizing a training generator and a discriminator, wherein the two generators share weight, the two discriminators share weight, and the final goal is to obtain a generator G which minimizes the goalABAnd GBA
In an embodiment, the grouping the current sample set according to a preset grouping policy to obtain a current sample set grouping result includes:
and grouping the current sample set through K-means clustering to obtain a grouping result of the current sample set.
In this embodiment, after the number of expected classification groups is preset, K-means clustering may be performed according to the euclidean distance between the input vectors of the samples in the current sample set as the vector similarity, so as to obtain the grouping result of the current sample set.
S106, inputting each sample in the second type target domain sample set to the countermeasure network for operation to obtain a second type classification value corresponding to each sample in the second type target domain sample set.
In this embodiment, after the countermeasure network is obtained by training, the input vectors corresponding to the samples in the second type target domain sample set are input to the countermeasure network for operation, so that the second type classification values corresponding to the samples can be obtained.
The embodiment of the application can acquire and process related data in the server based on the artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The method realizes that the samples of the target domain sample set are classified into at least two types according to the information entropy, then the loss weight of the model is improved when the second type target domain samples corresponding to low information entropy are classified, and a confrontation network is generated by using semi-supervised learning, so that the stability of the model is ensured, and the classification precision is improved.
The embodiment of the invention also provides a data classification device based on the domain self-adaption, which is used for executing any embodiment of the data classification method based on the domain self-adaption. Specifically, referring to fig. 3, fig. 3 is a schematic block diagram of a data classification apparatus 100 based on domain adaptation according to an embodiment of the present invention.
As shown in fig. 3, the data classification apparatus 100 based on domain adaptive method includes a source domain sample set obtaining unit 101, a first model training unit 102, a target domain sample set classification unit 103, a first classification unit 104, a second model training unit 105, and a second classification unit 106.
A source domain sample set obtaining unit 101, configured to, in response to a model training instruction, obtain a source domain sample set corresponding to the model training instruction.
In this embodiment, a server is used as an execution subject to describe the technical solution. The server may obtain a source domain sample set, for example, taking the source domain sample set as the post data of the history agent, where a piece of the post data of the history agent includes fields of whether the history agent turns right in 3 months, whether the history agent is still in work in 13 months, and each source domain sample in the source domain sample set corresponds to a piece of the post data of an agent. And after the source domain sample set is obtained in the server, subsequent model training can be carried out.
And the first model training unit 102 is configured to obtain a convolutional neural network model to be trained, perform model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value, so as to obtain the convolutional neural network model.
In this embodiment, after the source domain sample set is known, the field value of each field of each source domain sample is correspondingly converted into a vector value (for example, the numeric type field value is normalized and converted into a 0-1 dummy vector, the category type field value is converted into a specific category value, the text type field value is converted into a semantic vector, and the like), an input vector corresponding to each source domain sample can be obtained, and an output value corresponding to each source domain sample is also known, so that each source domain sample can be used as a sample data to perform model training on the convolutional neural network model to be trained until the loss function of the model is the minimum value, so as to obtain the convolutional neural network model.
In an embodiment, the first model training unit 102 is specifically configured to:
obtaining a pre-trained convolutional neural network model, taking model parameters of the pre-trained convolutional neural network model as initial model parameters of the convolutional neural network model to be trained, and performing model initialization on the convolutional neural network model to be trained;
performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain a primary training convolutional neural network model;
obtaining a loss function of the initial training convolutional neural network model;
if the loss function is determined to be the minimum value, taking the initial training convolutional neural network model as a convolutional neural network model;
and if the loss function is determined not to be the minimum value, fine tuning the initial training convolutional neural network model to update the initial training convolutional neural network model, and returning to execute the step of performing model training on the to-be-trained convolutional neural network model according to the source domain sample set to obtain the initial training convolutional neural network model.
In this embodiment, in order to improve the efficiency of model training, a pre-trained convolutional neural network model (that is, a pre-trained model) is generally obtained first, and then model parameters of the pre-trained convolutional neural network model are transmitted to the convolutional neural network model to be trained to serve as initial model parameters thereof, so as to implement model initialization on the convolutional neural network model to be trained. And then carrying out model training on the convolutional neural network model to be trained through each source domain sample in the source domain sample set to obtain a primary training convolutional neural network model.
And if the loss function is determined to be the minimum value, the initial training convolutional neural network model does not need to be subjected to fine tuning, at the moment, the initial training convolutional neural network model is used as the convolutional neural network model, if the loss function is determined not to be the minimum value, the initial training convolutional neural network model needs to be subjected to fine tuning, at the moment, the initial training convolutional neural network model is subjected to fine tuning to update the initial training convolutional neural network model, and then, the step of performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain the initial training convolutional neural network model is returned.
In an embodiment, the formula for obtaining the loss function in the loss function for obtaining the initial training convolutional neural network model is L ═ Lsup+λLada(ii) a Wherein L issupA loss function, L, representing source domain samples in a set of source domain samplesadaDenotes the adaptation loss in the transfer learning, and λ denotes a preset balance coefficient.
In this embodiment, λ > 0. When the loss function of the training convolutional neural network model is calculated, the adaptive loss in the migration learning corresponding to the domain adaptive method is fully considered, so that a more accurate loss function can be calculated. When the loss function is determined to be the minimum value, the loss function is not equal to 0, but the loss function is already converged, and the loss function obtained when the convolutional neural network model is further finely tuned is not reduced any more, so that the loss function can be determined to be the minimum value.
Wherein the content of the first and second substances,
Figure BDA0003520731690000121
Figure BDA0003520731690000122
and n issRepresenting the number of samples in the source domain sample set, L representing the number of neural network layers in the convolutional neural network that are regularized using the MMD penalty function (where the MMD is known as Max mean variance), klIs a two-dimensional gaussian kernel function,
Figure BDA0003520731690000123
represents the result of the activation function of the source domain sample set at the l < th > layer (more specifically, the result is the activation function of the source domain sample set at the l < th > layer
Figure BDA0003520731690000124
Wherein l represents the l-th layer,
Figure BDA0003520731690000125
the (2i-1) th type sample of the source domain sample set is represented as a result obtained by the l-th layer activation function, the s type represents a simple sample corresponding to the sample entropy not exceeding the preset information entropy threshold value in the source domain sample set in more concrete implementation), and
Figure BDA0003520731690000131
represents the result of the activation function of the source domain sample set at the l layer (more specifically
Figure BDA0003520731690000132
Wherein l represents the l-th layer,
Figure BDA0003520731690000133
the (2i-1) th type sample of the source domain sample set is represented as a result obtained by the l-th layer activation function, the t type represents a difficultly classified sample corresponding to the sample information entropy exceeding a preset information entropy threshold value in the source domain sample set in more specific implementation,
Figure BDA0003520731690000134
reference is made to the specific meanings of
Figure BDA0003520731690000135
And will not be described in detail herein
Figure BDA0003520731690000136
Reference is made to the specific meanings of
Figure BDA0003520731690000137
And will not be described in detail herein.
In an embodiment, the first model training unit 102 is further specifically configured to:
deleting the full-connection layer positioned at the last layer in the initial training convolutional neural network model to obtain a first adjusting convolutional neural network model;
acquiring a total number to be classified corresponding to the source domain sample set, and adding a current full-connection layer with the total number to be classified to the last layer of the first adjustment convolutional neural network model to obtain a second adjustment convolutional neural network model;
and training the current full-connection layer in the second adjusted convolutional neural network model according to the samples in the source domain sample set to obtain a third adjusted convolutional neural network model so as to update the initial training convolutional neural network model.
In this embodiment, after the model parameters of the pre-trained convolutional neural network model are migrated and sent to the convolutional neural network model to be trained to serve as the initial model parameters of the pre-trained convolutional neural network model, the pre-trained convolutional neural network model is used for fine tuning to train the pre-trained convolutional neural network model into the initial training convolutional neural network model meeting the current use requirement without restarting training the convolutional neural network model. The last fully-connected layer of the pre-trained convolutional neural network model is not suitable for satisfying the current requirement (this is because the total number of classes corresponding to the pre-trained convolutional neural network model may be N1, while the total number of classes corresponding to the initially-trained convolutional neural network model is N2, and N2 is not equal to N1). At this time, the full-link layer located in the last layer in the initial training convolutional neural network model may be directly deleted to obtain a first adjustment convolutional neural network model, then the current full-link layer with the total number to be classified is added to the last layer of the first adjustment convolutional neural network model to obtain a second adjustment convolutional neural network model, and finally the last full-link layer in the second adjustment convolutional neural network model is trained according to the samples in the source domain sample set, so that a third adjustment convolutional neural network model meeting the use requirement of the current scene can be quickly obtained, and at this time, the third adjustment convolutional neural network model is used as the initial training convolutional neural network model. Therefore, the initial training convolutional neural network model can be obtained through quick training in a mode of pre-training and fine tuning.
The target domain sample set classifying unit 103 is configured to obtain a target domain sample set, and classify the target domain samples based on sample information entropy to obtain a target domain sample classification result; wherein the target domain sample classification result at least comprises a first type target domain sample set and a second type target domain sample set.
In this embodiment, the server may further obtain a target domain sample set, for example, taking the target domain sample set as the entry data of the agent to be added as an example, for example, the entry data of the agent to be added includes fields of whether the agent to be added is turning right in 3 months, whether the historical agent is still working in 13 months, and the like, and the fields are empty values, at this time, the target domain sample set may be classified according to the sample information entropy, so as to obtain a target domain sample classification result. And then, predicting different sample sets in the target domain sample classification result based on different prediction models, so as to obtain classification values of fields of whether the agent changes right in 3 months or not, whether the historical agent is still working in 13 months or not, and the like.
In an embodiment, the target domain sample set classification unit 103 is specifically configured to:
obtaining samples corresponding to the sample information entropy which does not exceed the preset information entropy threshold value, and forming a first type target domain sample set;
and obtaining samples corresponding to the sample information entropy exceeding the information entropy threshold value to form a second type target domain sample set.
In this embodiment, when calculating and obtaining the sample information entropy of each sample in the target domain samples, referring to the above formula (1), i (v) in the formula (1) represents the sample information entropy of the sample, vcThe probability of the sample classified as C is shown, the base number of the log is 2, and the value range of C is [1, C]And C represents the total number of classifications of the samples. The higher the sample information entropy of a sample, the lower the information uncertainty of the sample and the easier it is to classify, and the lower the sample information entropy of a sample, the higher the information uncertainty of the sample and the less easily it is to classify.
After the sample information entropy of each sample in the target domain samples is obtained through calculation, dividing the sample of which the sample information entropy does not exceed the preset information entropy threshold value into a first type target domain sample set, and dividing the sample of which the sample information entropy exceeds the preset information entropy threshold value into a second type target domain sample set. Wherein the samples in the first type target domain sample set are all samples that are easy to be classified, and the samples in the second type target domain sample set are all samples that are not easy to be classified. Therefore, the samples in the target domain samples can be quickly classified into two classes based on the information entropy of the samples.
The first classification unit 104 is configured to input each sample in the first type target domain sample set to the convolutional neural network model for operation to obtain a first type classification value corresponding to each sample, so as to update the first type target domain sample set.
In this embodiment, since the convolutional neural network model is obtained before, and the samples in the first type target domain sample set are all samples that are easy to be classified, the samples in the first type target domain sample set can be directly predicted based on the convolutional neural network model. And at the moment, the input vector corresponding to each sample in the first-type target domain sample set is input into the convolutional neural network model to be operated to obtain a first-type classification value corresponding to each sample, and because the input vector corresponding to each sample in the first-type target domain sample set and the first-type classification value are known, each sample in the first-type target domain sample set is updated into a new first-type target domain sample set which has the first-type classification value and can be used as a training sample.
And a second model training unit 105, configured to perform model training on the confrontation network to be trained by using a current sample set formed by the first type target domain sample set and the source domain sample set, so as to obtain the trained confrontation network.
In this embodiment, in order to more accurately calculate the classification value of each sample in the second type target domain sample set, no operation is performed based on the convolutional neural network model. Instead, the current sample set composed of the first type target domain sample set and the source domain sample set may be used, and through this way of sample expansion, the first type target domain sample set with obtained classification values may be merged into the source domain sample set to improve timeliness of data (because the source domain sample set is historical data). And then, modeling the confrontation network to be trained based on the current sample set to obtain the trained confrontation network.
In one embodiment, the confrontation network to be trained is a cyclic confrontation network; the second model training unit 105 is specifically configured to:
obtaining an input vector of each sample in the current sample set;
obtaining the vector similarity between the input vectors of all samples in the current sample set, and grouping the current sample set according to a preset grouping strategy to obtain a current sample set grouping result; wherein, the current sample set grouping result comprises a plurality of current sample set sub-groups which are respectively marked as the 1 st current sample set sub-group to the k current sample set sub-group, and k is the total number of the current sample set sub-groups included in the current sample set grouping result;
counting and obtaining the total number of samples correspondingly included in each current sample set subgroup, and obtaining the current sample set subgroup with the maximum total number of samples as a target current sample set subgroup;
and continuously obtaining input vectors of two samples from the target current sample set sub-group to train the to-be-trained cyclic confrontation network model, and stopping obtaining the input vectors of the two samples from the target current sample set sub-group when the to-be-trained cyclic confrontation network model converges to obtain the cyclic confrontation network model as the trained cyclic confrontation network model.
In the embodiment of training the recurrent countermeasure network model, in order to improve the efficiency of model training, a part of similar and large number of samples may be selected from the current sample set to form a target current sample set sub-group to train the recurrent countermeasure network model to be trained (i.e., a cycle-GAN model).
After the current sample set is grouped, samples with similar input vectors are grouped into the same current sample set sub-group. At this time, the current sample set subgroup with the maximum total number of samples included in the plurality of current sample set subgroups is selected as the target current sample set subgroup. At this time, the target current sample set sub-group can be used as a training sample after screening to train the to-be-trained cyclic countermeasure network model.
For example, the input vectors of two samples arbitrarily selected from the target current sample set sub-group are respectively marked as sample a and sample b, and two generators G need to be trainedAB、GBAAnd two discriminators DA、DBFor the sample s, by the generator GABGenerating false samples
Figure BDA0003520731690000161
By means of a discriminator DBDiscrimination of false samples
Figure BDA0003520731690000162
Whether or not to approximate sample b, and will be a false sample
Figure BDA0003520731690000163
Through generator GBAGenerating a sample
Figure BDA0003520731690000164
And judging the sample
Figure BDA0003520731690000165
Whether to approximate the original real sample a. Likewise, for sample b, by generator GBAGenerating false samples
Figure BDA0003520731690000166
By means of a discriminator DADiscrimination of false samples
Figure BDA0003520731690000167
Is approximated to the sample a, and a false sample is generated
Figure BDA0003520731690000168
Through the generator GABGenerating a sample
Figure BDA0003520731690000169
And judging the sample
Figure BDA00035207316900001610
Whether it is similar to the original real sample b. Finally, iteration is carried out, so that the discriminator cannot discriminate whether the sample generated by the generator is a real sample.
Respectively optimizing a training generator and a discriminator, wherein the two generators share weight, the two discriminators share weight, and the final goal is to obtain a generator G which minimizes the goalABAnd GBA
In an embodiment, the second model training unit 105 is further specifically configured to:
and grouping the current sample set through K-means clustering to obtain a grouping result of the current sample set.
In this embodiment, after the number of expected classification groups is preset, K-means clustering may be performed according to the euclidean distance between the input vectors of the samples in the current sample set as the vector similarity, so as to obtain the grouping result of the current sample set.
A second classification unit 106, configured to input each sample in the second type target domain sample set to the countermeasure network for operation, so as to obtain a second type classification value corresponding to each sample in the second type target domain sample set.
In this embodiment, after the countermeasure network is obtained by training, the input vectors corresponding to the samples in the second type target domain sample set are input to the countermeasure network for operation, so that the second type classification values corresponding to the samples can be obtained.
The device realizes the classification of the samples of the target domain sample set into at least two types according to the information entropy, then the loss weight of the model is improved when the second type target domain samples corresponding to the low information entropy are classified, and the confrontation network is generated by using semi-supervised learning, so that the stability of the model is ensured, and the classification precision is also improved.
The domain-adaptive based data classification apparatus described above may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device 500 may be a server or a server cluster. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
Referring to fig. 4, the computer apparatus 500 includes a processor 502, a memory, which may include a storage medium 503 and an internal memory 504, and a network interface 505 connected by a device bus 501.
The storage medium 503 may store an operating device 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform a domain-adaptive based data classification method.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 may be enabled to perform a domain-adaptive data classification method.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 4 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5032 stored in the memory to implement the data classification method based on domain adaptation disclosed in the embodiment of the present invention.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 4 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 4, which are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a nonvolatile computer-readable storage medium or a volatile computer-readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the domain-adaptive-based data classification method disclosed by the embodiments of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a background server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data classification method based on domain self-adaptation is characterized by comprising the following steps:
responding to a model training instruction, and acquiring a source domain sample set corresponding to the model training instruction;
obtaining a convolutional neural network model to be trained, and performing model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value to obtain the convolutional neural network model;
acquiring a target domain sample set, and classifying the target domain samples based on sample information entropy to obtain a target domain sample classification result; wherein the target domain sample classification result at least comprises a first type target domain sample set and a second type target domain sample set;
inputting each sample in the first type target domain sample set into the convolutional neural network model for operation to obtain a first type classification value corresponding to each sample so as to update the first type target domain sample set;
performing model training on the confrontation network to be trained by using a current sample set consisting of the first type target domain sample set and the source domain sample set to obtain a trained confrontation network; and
and inputting each sample in the second type target domain sample set into the countermeasure network for operation to obtain a second type classification value corresponding to each sample in the second type target domain sample set.
2. The domain-adaptive data classification method according to claim 1, wherein the obtaining of the convolutional neural network model to be trained, and performing model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value to obtain the convolutional neural network model, comprises:
obtaining a pre-training convolutional neural network model, and taking model parameters of the pre-training convolutional neural network model as initial model parameters of the convolutional neural network model to be trained so as to perform model initialization on the convolutional neural network model to be trained;
performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain a primary training convolutional neural network model;
obtaining a loss function of the initial training convolutional neural network model;
if the loss function is determined to be the minimum value, taking the initial training convolutional neural network model as a convolutional neural network model;
and if the loss function is determined not to be the minimum value, fine tuning the initial training convolutional neural network model to update the initial training convolutional neural network model, and returning to execute the step of performing model training on the to-be-trained convolutional neural network model according to the source domain sample set to obtain the initial training convolutional neural network model.
3. The domain-adaptive data classification method according to claim 2, wherein the formula for obtaining the loss function in the loss function for obtaining the initial training convolutional neural network model is L ═ Lsup+λLada(ii) a Wherein L issupA loss function, L, representing source domain samples in a set of source domain samplesadaDenotes the adaptation loss in the transfer learning, and λ denotes a preset balance coefficient.
4. The domain-adaptive data classification method according to claim 2, wherein the performing model training on the convolutional neural network model to be trained according to the source domain sample set to obtain an initial training convolutional neural network model comprises:
deleting the full-connection layer positioned at the last layer in the initial training convolutional neural network model to obtain a first adjusting convolutional neural network model;
acquiring a total number to be classified corresponding to the source domain sample set, and adding a current full-connection layer with the total number to be classified to the last layer of the first adjustment convolutional neural network model to obtain a second adjustment convolutional neural network model;
and training the current full-connection layer in the second adjusted convolutional neural network model according to the samples in the source domain sample set to obtain a third adjusted convolutional neural network model so as to update the initial training convolutional neural network model.
5. The domain-adaptive data classification method according to claim 1, wherein the countermeasure network to be trained is a circular countermeasure network; the model training of the confrontation network to be trained is performed on the present sample set formed by the first type target domain sample set and the source domain sample set, so as to obtain the trained confrontation network, and the method comprises the following steps:
obtaining an input vector of each sample in the current sample set;
obtaining the vector similarity between the input vectors of all samples in the current sample set, and grouping the current sample set according to a preset grouping strategy to obtain a current sample set grouping result; wherein, the current sample set grouping result comprises a plurality of current sample set sub-groups which are respectively marked as the 1 st current sample set sub-group to the k current sample set sub-group, and k is the total number of the current sample set sub-groups included in the current sample set grouping result;
counting and obtaining the total number of samples correspondingly included in each current sample set subgroup, and obtaining the current sample set subgroup with the maximum total number of samples as a target current sample set subgroup;
and continuously obtaining input vectors of two samples from the target current sample set sub-group to train the to-be-trained cyclic confrontation network model, and stopping obtaining the input vectors of the two samples from the target current sample set sub-group when the to-be-trained cyclic confrontation network model is converged to obtain the cyclic confrontation network model as the trained cyclic confrontation network model.
6. The method for classifying data based on domain self-adaptation according to claim 1, wherein the obtaining a target domain sample set and classifying the target domain samples based on sample information entropy to obtain a target domain sample classification result comprises:
obtaining samples corresponding to the sample information entropy which does not exceed the preset information entropy threshold value, and forming a first type target domain sample set;
and obtaining samples corresponding to the sample information entropy exceeding the information entropy threshold value to form a second type target domain sample set.
7. The domain-adaptive data classification method according to claim 5, wherein the grouping the current sample set according to a preset grouping policy to obtain a current sample set grouping result comprises:
and grouping the current sample set through K-means clustering to obtain a grouping result of the current sample set.
8. A data classification device based on domain adaptation is characterized by comprising:
the source domain sample set acquisition unit is used for responding to a model training instruction and acquiring a source domain sample set corresponding to the model training instruction;
the first model training unit is used for acquiring a convolutional neural network model to be trained, and performing model training on the convolutional neural network model to be trained according to the source domain sample set until a loss function of the model is a minimum value so as to obtain the convolutional neural network model;
the target domain sample set classification unit is used for acquiring a target domain sample set, and classifying the target domain samples based on sample information entropy to obtain a target domain sample classification result; wherein the target domain sample classification result at least comprises a first type target domain sample set and a second type target domain sample set;
the first classification unit is used for inputting each sample in the first type target domain sample set into the convolutional neural network model for operation to obtain a first type classification value corresponding to each sample so as to update the first type target domain sample set;
the second model training unit is used for carrying out model training on the confrontation network to be trained by using the current sample set consisting of the first type target domain sample set and the source domain sample set to obtain the confrontation network after training; and
and the second classification unit is used for inputting each sample in the second type target domain sample set to the countermeasure network for operation to obtain a second type classification value corresponding to each sample in the second type target domain sample set.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the domain-adaptive data classification method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the domain-adaptive data classification method according to any one of claims 1 to 7.
CN202210177137.9A 2022-02-25 2022-02-25 Data classification method, device, equipment and medium based on domain self-adaption Pending CN114548297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210177137.9A CN114548297A (en) 2022-02-25 2022-02-25 Data classification method, device, equipment and medium based on domain self-adaption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210177137.9A CN114548297A (en) 2022-02-25 2022-02-25 Data classification method, device, equipment and medium based on domain self-adaption

Publications (1)

Publication Number Publication Date
CN114548297A true CN114548297A (en) 2022-05-27

Family

ID=81679057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210177137.9A Pending CN114548297A (en) 2022-02-25 2022-02-25 Data classification method, device, equipment and medium based on domain self-adaption

Country Status (1)

Country Link
CN (1) CN114548297A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114997936A (en) * 2022-08-03 2022-09-02 国能日新科技股份有限公司 Electric power transaction price prediction method and system based on transfer learning

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114997936A (en) * 2022-08-03 2022-09-02 国能日新科技股份有限公司 Electric power transaction price prediction method and system based on transfer learning

Similar Documents

Publication Publication Date Title
EP3711000B1 (en) Regularized neural network architecture search
WO2020228376A1 (en) Text processing method and model training method and apparatus
US11551026B2 (en) Dynamic reconfiguration training computer architecture
CN111310814A (en) Method and device for training business prediction model by utilizing unbalanced positive and negative samples
US20190228297A1 (en) Artificial Intelligence Modelling Engine
CN112348079B (en) Data dimension reduction processing method and device, computer equipment and storage medium
Ibragimovich et al. Effective recognition of pollen grains based on parametric adaptation of the image identification model
Wang et al. Patient admission prediction using a pruned fuzzy min–max neural network with rule extraction
CN116594748A (en) Model customization processing method, device, equipment and medium for task
CN116781346A (en) Convolution two-way long-term and short-term memory network intrusion detection method based on data enhancement
CN114548297A (en) Data classification method, device, equipment and medium based on domain self-adaption
Tembine Mean field stochastic games: Convergence, Q/H-learning and optimality
CN114254686A (en) Method and device for identifying confrontation sample
US11763154B1 (en) Machine learning services with pre-trained models
Tambwekar et al. Estimation and applications of quantiles in deep binary classification
CN112989007B (en) Knowledge base expansion method and device based on countermeasure network and computer equipment
WO2022271528A1 (en) Explainable artificial intelligence in computing environment
EP3971782A2 (en) Neural network selection
US20220284261A1 (en) Training-support-based machine learning classification and regression augmentation
CN114582518A (en) Medical data set optimization method and device
CN114898184A (en) Model training method, data processing method and device and electronic equipment
CN109308565B (en) Crowd performance grade identification method and device, storage medium and computer equipment
US11829735B2 (en) Artificial intelligence (AI) framework to identify object-relational mapping issues in real-time
US11983240B2 (en) Meta few-shot class incremental learning
WO2023088273A1 (en) Methods and devices for meta few-shot class incremental learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination