Data processing method, device, equipment and storage medium

By screening feature samples and target samples from historical samples, combining with the joint training mechanism, a new classification model is automatically built, which solves the problem of wasted storage resources when model updates in the existing technology, and realizes efficient storage resource utilization.

CN112396084BActive Publication Date: 2025-03-07CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910765590.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-19
Publication Date
2025-03-07
Estimated Expiration
2039-08-19

AI Technical Summary

Technical Problem

The prior art requires storing all original data when model updates, resulting in waste of storage resources, especially when resources such as IoT devices are limited.

Method used

By screening feature samples and target samples from historical samples, combining the joint training mechanism, a new classification model is automatically built, reducing the amount of data used to train the second classification model.

Benefits of technology

While ensuring the accuracy of learning, it saves storage resources and avoids waste of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112396084B_ABST
    Figure CN112396084B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, device, equipment and storage medium. The method includes: determining a feature sample selected from a historical sample and the type of the feature sample; the type of the feature sample constitutes a first type set; determining a target sample and the type of the target sample; the type of the target sample constitutes a second type set; the second type set is different from the first type set; adjusting the parameters of a first classification model according to the feature sample, the type of the feature sample, the target sample and the type of the target sample to obtain a second classification model; the first classification model can identify the types included in the first type set; the second classification model can identify the types included in the third type set; the third type set is the union of the first type set and the second type set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning, and in particular to a data processing method, apparatus, device and storage medium. Background Art

[0002] At present, when there are new types that cannot be recognized by the classification model, the model is retrained based on the training data corresponding to the new type and the original data corresponding to the original type, so as to obtain a classification model that can recognize the new type. Storing all the original data to support the update of the model takes up a lot of storage resources, especially under resource-constrained conditions such as IoT devices, resulting in a waste of storage resources. Summary of the invention

[0003] Embodiments of the present application provide a data processing method, apparatus, device, and storage medium.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a data processing method, including:

[0006] Determine feature samples screened from historical samples and types of the feature samples; the types of the feature samples constitute a first type set;

[0007] Determine a target sample and a type of the target sample; the type of the target sample constitutes a second type set; the second type set is different from the first type set;

[0008] According to the feature samples, the types of the feature samples, the target samples and the types of the target samples, the parameters of the first classification model are adjusted to obtain a second classification model; the first classification model can identify the types included in the first type set; the second classification model can identify the types included in the third type set; the third type set is the union of the first type set and the second type set.

[0009] In a second aspect, an embodiment of the present application provides a data processing device, including:

[0010] A first determining unit is used to determine feature samples selected from historical samples and types of the feature samples; the types of the feature samples constitute a first type set;

[0011] A second determining unit, configured to determine a target sample and a type of the target sample; the types of the target samples constitute a second type set; the second type set is different from the first type set;

[0012] An adjustment unit is used to adjust the parameters of the first classification model according to the feature sample, the type of the feature sample, the target sample and the type of the target sample to obtain a second classification model; the first classification model can identify the types included in the first type set; the second classification model can identify the types included in the third type set; the third type set is the union of the first type set and the second type set.

[0013] In a third aspect, an embodiment of the present application provides a data processing device, the device comprising at least: a processor and a storage medium configured to store executable instructions, wherein: the processor is configured to execute the stored executable instructions;

[0014] The executable instructions are configured to execute the above-mentioned data processing method.

[0015] In an eighth aspect, an embodiment of the present application provides a storage medium, in which computer executable instructions are stored, and the computer executable instructions are configured to execute the above-mentioned data processing method.

[0016] The data processing method provided in the embodiment of the present application combines feature samples screened from historical samples and target samples involving new types to train an existing first classification model that can identify historical samples, and obtains a second classification model that can identify the types of historical samples and new types involved in target samples, thereby making full use of the existing first classification model, combining feature samples screened from historical samples and a joint training mechanism of target samples to automatically construct a new second classification model, while ensuring the accuracy of learning, reducing the amount of data used to train the second classification model, thereby saving storage resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views.The drawings generally illustrate, by way of example and not limitation, various embodiments discussed herein.

[0018] Figure 1 An optional flow chart of a data processing method according to an embodiment of the present application;

[0019] Figure 2 An optional flow chart of a data processing method according to an embodiment of the present application;

[0020] Figure 3 An optional structural diagram of a classification model according to an embodiment of the present application;

[0021] Figure 4 An optional flow chart of a data processing method according to an embodiment of the present application;

[0022] Figure 5 An optional flowchart of sustainable learning according to an embodiment of the present application;

[0023] Figure 6 A schematic diagram of an optional structure of a data processing device provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of an optional hardware structure of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the specific technical scheme of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0026] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0027] In order to facilitate understanding of the solution of the embodiment of the present application, the continuous learning applied in the embodiment of the present application is first described:

[0028] Continuous learning means learning new concepts based on new training data while not forgetting the concepts that have already been learned. For example, a household robot can only recognize running, walking and other behaviors at the beginning, but when the training data of "falling" is added, it can recognize the "falling" behavior with a higher accuracy while still being able to recognize the "running", "walking" and other behaviors that it can already recognize with a higher accuracy.

[0029] Current continuous learning options include the following:

[0030] Solution 1: Retrain the model based on the original labeled data and the newly obtained labeled data to obtain an updated model;

[0031] Solution 2: Update the model by updating the training data and the hidden Markov model.

[0032] In the above solution 1, all the original data needs to be stored to support the update of the model, resulting in a waste of storage resources; in the above solution 2, the training data needs to be continuously updated, and the original data needs to be stored to support the update of the model, resulting in a waste of storage resources.

[0033] Based on the above-mentioned problems existing in the related technology, an embodiment of the present application provides a data processing method, which makes full use of the existing first classification model, combines the feature samples selected from historical samples and the joint training mechanism of the target samples, and automatically constructs a new second classification model. While ensuring the accuracy of learning, it reduces the amount of data used to train the second classification model, thereby saving storage resources.

[0034] The data processing method provided in the embodiments of the present application can be applied to various forms of electronic devices as data processing devices. The electronic devices provided in the embodiments of the present application can be implemented as various terminals, such as mobile phones (cell phones), tablet computers, laptop computers, Internet of Things devices and other mobile terminals with wireless communication capabilities, and desktop computers, desktop computers, etc. In addition, the electronic device can also be implemented as a server or a server cluster composed of multiple servers, which is not limited here.

[0035] Figure 1 A flow chart of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the following steps are included:

[0036] Step S101, determining feature samples screened from historical samples and types of the feature samples; the types of the feature samples constitute a first type set.

[0037] The historical samples are samples that have been used to train the classification model. The historical samples are screened and the retained historical samples are called feature samples. Here, the types of all feature samples constitute the first type set.

[0038] In the embodiment of the present application, feature samples are screened from historical samples according to a set screening rule, and the screening rule includes one of the following:

[0039] Rule 1: Random selection;

[0040] Rule 2: According to the type of samples, a set number of samples are selected from each type of samples as the feature samples corresponding to that type;

[0041] Rule 3: According to the type of sample, select samples with density greater than the set value from each type of sample as the feature samples corresponding to that type.

[0042] The content of the screening rules can be configured according to actual needs, and the embodiments of the present application do not limit this.

[0043] Here, the classification model trained with historical sample data is referred to as a first classification model. The first classification model can identify the type of each historical sample, that is, the first classification model can identify the types in the first classification model composed of the types of feature samples.

[0044] In the embodiment of the present application, the data processing device can determine the sample set to which the sample belongs in the form of tasks. The samples included in different tasks are called different sample sets, and the number of samples in each sample set can be one or more, and the numbers in different sample sets can be different or the same. The sample set of the i-th task, i.e., the i-th sample set, is called D i , where D i ={X ij , j = 1, 2, ..., n}, X ij The sample set D i The jth sample of i There are n samples, where n is an integer greater than 1. The types of samples in the sample set constitute a type set Y i , Y i ={y ij , j = 1, 2, ..., n}, where y ij For sample X ij Here, we will select the sample set D i The feature sample set composed of the feature samples extracted from can be called E i .

[0045] In the embodiment of the present application, each sample may include parameters of at least one dimension, for example, different samples are physical indicators of different users, and the physical indicators of each user include parameters of three dimensions: height, weight, and gender. In the embodiment of the present application, there is no limitation on the meaning of sample representation, the number of dimensions included in the sample, and the parameters of different dimensions. For sample X ij The parameter of the sth dimension, X ij The number of dimensions is m, where m is an integer greater than 0. ij It can be represented by l-dimensional data, that is

[0046] Step S102, determining a target sample and the type of the target sample; the type of the target sample constitutes a second type set; the second type set is different from the first type set.

[0047] The target sample is a sample that has not been used to train the classification model. The target sample is a sample in the sample set corresponding to the new task. Here, the sample set where the target sample is located is called the target sample set, and the types of the target samples in the target sample set constitute the second classification set. The first classification set and the second classification set are different. The second classification set includes types that are not included in the first classification set, that is, types that cannot be recognized by the first classification model. For example: the types in the first classification set include: type 1, type 2 and type 3, and the types in the second classification set include: type 4. For another example: the types in the first classification set include: type 1, type 2 and type 3, and the types in the second classification set include: type 2 and type 4. For another example: the types in the first classification set include: type 1, type 2 and type 3, and the types in the second classification set include: type 2 and type 4. For another example: the types in the first classification set include: type 1, type 2 and type 3, and the types in the second classification set include: type 4 and type 5.

[0048] In the embodiment of the present application, the target sample set where the target sample is located can be defined as D i , D i The second type set consisting of the types of target samples in is defined as Y i . Combine the target samples from D1, D2 to D i-1 They are called historical sample sets respectively, and the historical sample sets D1, D2 to D i-1 The first classification model trained with historical samples in is defined as N i-1 From D1, D2 to D i-1 The feature sample sets obtained by extracting feature samples are: E1, E2 to E i-1 The first type set T i-1 Including E1, E2 to E i-1 The type of each feature sample in T i-1 =Y1∪Y2∪…∪Y i-1 . N i-1

[0049] Step S103, adjusting the parameters of the first classification model according to the feature samples, the types of the feature samples, the target samples and the types of the target samples to obtain a second classification model.

[0050] The first classification model can identify the types included in the first type set; the second classification model can identify the types included in the third type set; the third type set is the union of the first type set and the second type set.

[0051] In the present application, according to E1, E2 to E i-1 The feature samples and target sample sets D in i The target samples in, and E1, E2 to E i-1The first type set T is composed of the types of feature samples in i-1 and D i The second type set Y consists of the types of target samples in i , for the first classification model N i-1 The parameters of the first classification model N are adjusted until i-1 Convergence, the first classification model N after convergence i-1 The second classification model is called N i , the second classification model N i The third classification set T that can be identified i is the first classification set T i-1 and the second classification set Y i The union of i =T i-1 ∪Y i =Y1∪Y2∪…∪Y i-1 ∪Y i , thus obtaining a classification model that can identify the types of historical samples as well as new types in new samples.

[0052] Here, E1, E2 to E i-1 The feature samples and target sample sets D in i The target sample in is used as the first classification model N i-1 The outputs are summed up with the first type set T i-1 and the second type set Y i The types of samples in the sample are compared, and the first classification model N is classified according to the comparison results. i-1 Adjust the parameters of E1, E2 to E i-1 The feature samples and target sample sets D in i The target sample in is used as the first classification model after parameter adjustment N i-1 The input until the first classification model N i-1 Convergence, that is, E1, E2 to E i-1 The feature samples and target sample sets D in i The target sample in is input into the first classification model N i-1 The output result obtained after that is consistent with the first type set T i-1 and the second type set Y i The types of samples in the same and no longer change, the second classification model N is obtained i .

[0053] Here, the second classification model N i The objective function can be shown as formula (1):

[0054]

[0055] Among them, Ψ is the candidate model set, t i is the number of feature samples in the feature sample set; It is E1, E2, E i-1 The cross entropy loss function is: Yes D i The cross loss function;

[0056] in, As shown in formula (2):

[0057]

[0058] As shown in formula (3):

[0059]

[0060] In the embodiment of the present application, the first classification model N i-1 There is no restriction on the objective function used in training.

[0061] It should be noted that in the embodiment of the present application, the classification model N i-1 The training method can also refer to the method described in step S101 to step S103. At this time, the historical sample sets are D1, D2 to D i-2 , the corresponding feature sets are E1, E2 to E i-2 , the target sample set is E i-1 , according to E1, E2 to E i-2 The characteristic samples and D i-1 The target samples in, and E1, E2 to E i-1 The type set T of the feature samples in i-2 and D i-1 The type set Y of the target samples in i-1 , for the classification model N i-2 The parameters of the classification model N are adjusted until i-2 Convergence, the classification model is defined as N i-1 , classification model N i-1 The identifiable classification set T i-1 is the classification set T i-2 and the classification set Y i-1 The union of i-1 =T i-2 ∪Y i-1 =Y1∪Y2∪…∪Y i-1 .

[0062] In an embodiment of the present application, when a new type appears in the sample data that cannot be recognized by the current classification model, the sample data of the task corresponding to the new type is used as the target sample data, and the sample data of the task corresponding to the type that the current classification model can recognize and used for training the current classification model is used as the historical sample data. The current classification model is trained by using feature samples and target sample data screened from the historical sample data until the classification model converges to obtain a classification model that can recognize the new type.

[0063] The learning algorithm and network structure adopted by the classification model in the embodiment of the present application can be set according to actual needs, and the embodiment of the present application does not limit this.

[0064] The data processing method provided in the embodiment of the present application combines feature samples screened from historical samples and target samples involving new types to train an existing first classification model that can identify historical samples, and obtains a second classification model that can identify the types of historical samples and new types involved in target samples, thereby making full use of the existing first classification model, combining feature samples screened from historical samples and a joint training mechanism of target samples to automatically construct a new second classification model, while ensuring the accuracy of learning, reducing the amount of data used to train the second classification model, thereby saving storage resources.

[0065] In some embodiments, before executing S101, the method further includes:

[0066] The historical samples are subjected to dimension reduction; and the feature samples are selected from the historical samples after dimension reduction.

[0067] Historical sample sets D1, D2 to D i-1 Historical samples in X 1j , X 2j , X (i-1)j Dimensionality reduction is performed to transform the number of dimensions m into m', thereby compressing and encrypting the size of the historical sample. Here, the dimension-reduced X 1j , X 2j , X (i-1)(j) Can be defined as and And so on. At this time, when selecting feature samples, the feature samples in each historical sample set are screened from the historical sample set composed of the historical samples after dimensionality reduction.

[0068] Here, the historical sample sets D1, D2 to D i-1 Historical samples X in 1j , X 2j , X (i-1)j After dimensionality reduction, the historical sample set can be defined as in, to The reduced-dimensional historical samples in can be defined as f(X 1j )、f(X 2j ) to f(X (i-1)j ). Among them, f(x) is the dimension reduction function used to reduce the dimension of historical samples.

[0069] In the embodiment of the present application, the dimensionality reduction method used to reduce the dimension of the historical samples may include: linear mapping methods such as principal component analysis (PCA) and linear discriminant analysis (LDA), as well as nonlinear mapping methods such as kernel method (kernel + linear), two-dimensionalization and tensorization (two-dimensional + linear), and manifold learning. The embodiment of the present invention does not impose any limitation on the dimensionality reduction method used for dimensionality reduction.

[0070] In some embodiments, before executing S101, the method further includes: screening feature samples from historical samples. The screening feature samples from historical samples may be performed as follows: Figure 2 As shown, including:

[0071] Step S100a: dividing the historical sample set consisting of the historical samples into at least one sample subset according to the types of different historical samples.

[0072] Here, the historical sample set is the historical sample set D1, D2 to D3 composed of the original historical samples without dimensionality reduction. i-1 , or it can be a historical sample set consisting of historical samples after dimension reduction to

[0073] According to the types of different historical samples in a historical sample set, the historical samples in the historical sample set are classified, and the historical samples of the same type are divided into the same sample subset. At this time, the types of historical samples belonging to the same sample subset are the same, and the types of historical samples belonging to different sample subsets are different.

[0074] For example: historical sample set D i-1 The historical samples in include: sample 1, sample 2, sample 3 to sample 10, and the corresponding types are: type 1, type 2, type 3, type 2, type 2, type 3, type 1, type 2, type 3, and type 1. Then, sample 1, sample 7 and sample 10 are classified into a sample subset, sample 2, sample 4, sample 5, sample 8 are classified into a sample subset, and sample 3, sample 6 and sample 9 are classified into a sample subset.

[0075] When all the historical samples in a historical sample set are the same, that is, the type of the historical samples included is one, then the historical sample set in the historical sample set is a sample subset. When the types of historical samples in a historical sample set are two, the historical sample set is divided into two sample subsets. When the types of historical samples in a historical sample set are three, the historical sample set is divided into three sample subsets. It can be seen that the number of divided sample subsets is the same as the number of types of historical samples in the historical sample set.

[0076] Step S100b: selecting a feature sample in a corresponding sample subset from the historical samples included in the at least one sample subset.

[0077] After dividing the historical sample set into sample subsets, various types of feature samples are screened from each sample subset, for example: randomly screening a set number of feature samples from each sample subset, or screening a set number of feature samples with high density according to the density of each historical sample in the sample subset.

[0078] It should be noted that in the embodiment of the present application, the number of feature samples screened in each sample subset may be the same or different. In the embodiment of the present application, no limitation is imposed on the screening method of screening feature samples and the number of samples screened.

[0079] In some embodiments, step S100b selects characteristic samples in a corresponding sample subset from the historical samples included in the at least one sample subset, which may be performed as follows:

[0080] For each sample subset, the following processing is performed to obtain the characteristic samples in the corresponding sample subset: determine the density of each historical sample in the sample subset; sort the historical samples in the sample subset according to the density of each historical sample; and use a set number of historical samples ranked first as the characteristic samples of the sample subset.

[0081] When screening feature samples from at least one sample subset, the sample subset is used as a screening unit, and the feature samples included in the corresponding sample subset are screened from each sample subset respectively, that is, the type is used as a screening unit, and the feature samples corresponding to each type in the historical sample set are screened.

[0082] Here, we define the historical sample set D i-1 or The sample subset consisting of historical samples of category k is I k , calculate I k The density of each historical sample in I kSort all historical samples in I, and use the set number of historical samples in the front order as feature samples to form I k The corresponding feature sample set e (i-1)k .

[0083] For example: In the same example as above, the samples in a sample subset include: sample 2, sample 4, sample 5 and sample 8. The densities of sample 2, sample 4, sample 5 and sample 8 are calculated respectively, and sample 2, sample 4, sample 5 and sample 8 are sorted according to the density. The resulting sorting is: sample 2>sample 8>sample 5>sample 4. When the set number is 2, the characteristic samples in the sample subset are sample 2 and sample 8.

[0084] Historical sample collection D i-1 or The feature sample set E consists of the feature samples selected from i-1 for

[0085] In one example, when the characteristic samples provided for screening from a sample subset including sample 1, sample 7, and sample 10 and a sample subset including sample 3, sample 6, and sample 9 are respectively (sample 7, sample 10), and (sample 3, sample 9) by the above method for screening characteristic samples, the historical sample set D i-1 or The characteristic samples in include: sample 2, sample 8, sample 7, sample 10, sample 3 and sample 9.

[0086] In some embodiments, determining the density of each historical sample in the sample subset includes:

[0087] For each historical sample in the sample subset, the following processing is performed to obtain the density of the corresponding historical sample: determining the distance between the historical sample and other historical samples in the sample subset; adding the determined distances to obtain the density of the historical sample.

[0088] Here, the historical sample set D i-1 or The sample subset consisting of historical samples of category k is I k , I k The samples g and I in k The distance between other samples h is d gh , d is the distance threshold, then the density of sample g is g It can be calculated by formula (4):

[0089]

[0090] in,

[0091] In some embodiments, adjusting the parameters of the first classification model according to the feature sample, the type of the feature sample, the target sample, and the type of the target sample to obtain the second classification model includes:

[0092] Performing dimensionality reduction on the target sample;

[0093] According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the types of the target samples, the parameters of the first classification model are adjusted to obtain a second classification model.

[0094] In the embodiment of the present application, the target samples used when training the first classification model may also be target samples that have undergone dimensionality reduction.

[0095] Target sample set D i The target sample X in ij Perform dimensionality reduction and transform the number of dimensions m into m', thereby compressing and encrypting the size of the historical sample to obtain the reduced dimensionality and At this time, when training the second classification model, the parameters of the first classification model are adjusted based on the target sample after dimensionality reduction, the feature samples selected from the historical samples, and the types of each sample to obtain the second classification model.

[0096] Here, the target sample set D i The target sample X in ij After dimensionality reduction, the sample set can be defined as When the target sample X ij The dimension reduction function used for dimension reduction is defined as f(x), then for the target sample X ij After dimensionality reduction, the target sample obtained is

[0097] It should be noted that the characteristic samples can be from D1, D2 to D i-1 Filtered from, or from To the selected ones.

[0098] In the embodiment of the present application, the dimensionality reduction method used for reducing the dimension of the historical samples may include: linear mapping methods such as PCA and LDA, as well as nonlinear mapping methods such as kernel method (kernel + linear), two-dimensionalization and tensorization (two-dimensional + linear), and manifold learning. In the embodiment of the present invention, the dimensionality reduction method used for reducing the dimension of the historical samples and the dimensionality reduction method used for reducing the dimension of the target samples may be the same or different.

[0099] In some embodiments, adjusting the parameters of the first classification model according to the feature sample, the type of the feature sample, the target sample after dimensionality reduction, and the type of the target sample to obtain the second classification model includes:

[0100] Upgrading the dimension of the target sample after dimension reduction to obtain an updated target sample;

[0101] Using the updated target sample as an input of a third classification model, and obtaining a probability of identifying the updated target sample as a corresponding type output by the third classification model; the third classification model can identify the types included in the second type set;

[0102] According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the corresponding probabilities of the target samples after corresponding updates, the parameters of the first classification model are adjusted to obtain the second classification model.

[0103] For the target sample f(X ij ) to upgrade the dimension, f(X ij ) is expanded to m dimensions, and the updated target sample g(f(X ij )). Wherein, g(x) is the dimension-raising function used to increase the dimension of the target sample after dimension reduction. ij ) There is no limitation on the dimension-upgrading method used.

[0104] The third classification model can be defined as The second type set Y consisting of the types of target samples that can be identified i . The updated target sample g(f(X ij )) as the input of the third classification model, and the third classification model converts g(f(X ij ))Identified as Y ij Probability Among them, Y ij For X ij Type.

[0105] At this time, according to E1, E2 to E i-1 The feature samples and The target sample f(X ij ), and E1, E2 to E i-1 The first type set T is composed of the types of feature samples in i-1 and Each f(X ij ) corresponding to g(f(X ij )), for the first classification model N i-1The parameters of the first classification model N are adjusted until i-1 Convergence, the second classification model is defined as N i .

[0106] At this time, formula (2) can be replaced by formula (5):

[0107]

[0108] Formula (3) can be replaced by formula (6):

[0109]

[0110] In some embodiments, the third training model may be obtained by executing the following steps:

[0111] Inputting the target sample into a set network model to obtain an output result of the network model;

[0112] The output result corresponding to the target sample is compared with the type of the corresponding target sample, and the parameters of the network model are adjusted according to the comparison result until the network model converges to obtain the third classification model.

[0113] The target sample set D i and the type of each target sample as the training data for the third classification model. The second type set Y consisting of the types of target samples that can be identified i .

[0114] The target sample set D i The target samples in are used as the input of the network model, and the obtained outputs are respectively i The types of samples in the set are compared, and the parameters of the set network model are adjusted according to the comparison results. The target sample set D i The target samples in are used as the input of the network model after parameter adjustment until the network model converges. i The network model N is set by the target sample input i-1 The output result obtained after the second type set Y i The types of samples in the same and no longer change, and the third classification model is obtained

[0115] Here, the third classification model The objective function can be shown as formula (7):

[0116]

[0117] Where l is the cross entropy loss function, as expressed in formula (8):

[0118]

[0119] The structure of the network model can be set as Figure 3 As shown, it includes: convolution layer 1, pooling layer 1, convolution layer 2, pooling layer 2, fully connected layer and output layer. Among them, the size of the convolution kernel of convolution layer 1 can be 5×5, and the number of convolution kernels is 32, the size of the convolution kernel of pooling layer 1 can be 2×2, the size of the convolution kernel of convolution layer 1 can be 5×5, and the number of convolution kernels is 64, the size of the convolution kernel of pooling layer 1 can be 2×2, and the dimension of the fully connected layer can be 1024.

[0120] It should be noted that in the embodiments of the present application, there are no restrictions on the network structure and objective function of the set network model, and they can be limited according to actual needs.

[0121] Below, the data processing method provided in the embodiment of the present application is explained through specific application scenarios.

[0122] like Figure 4 As shown, including:

[0123] Step S401, based on the original data D i-1 and Y i-1 Train the classifier And make sure that T i-1 The classifier N i-1 .

[0124] Among them, N1

[0125] Step S402: Use the dimension reduction function f(x) to reduce D i-1 The samples in are compressed to m' dimension, and f(X i-1 ), use the function g(x) to convert f(X i-1 ) is expanded to m dimensions, and we get g(f(X i-1 )), the updated compressed data set is

[0126] Step S403, based on the data set Get the feature point set E of the data set i-1 .

[0127] Step S404: Combine E1, E2 to E i-1 、N i-1 and Train to get a new classifier N i .

[0128] In step S401, the training data set is D i-1 ={X (i-1)j , j = 1, 2, ..., n}, where According to the training data set D i-1 and the corresponding tag set Y (i-1) ={y (i-1)j , j = 1, 2, ..., n}, The classifier is The available Figure 3 The network structure of the deep learning model shown.

[0129] The classifier is The objective function can be:

[0130]

[0131] Use stochastic gradient descent algorithm to train the optimal model Where Φ is the model set and l is the cross entropy loss function, which is expressed as follows:

[0132]

[0133] In step S402, the original data D is subjected to random function f(x). i-1 Sample X in i-1 Perform compression encryption to obtain the compressed data f(X i-1 ), compressed to m' dimension; using the function g(x) to convert f(X i-1 ) is expanded to m dimensions, and we get g(f(X i-1 )),Will Acting on g(f(X i-1 )) to build a compressed data set

[0134] In step S403, based on the data set Get the feature point set E of the data set i-1 ; Assume that the data set Included in category c i-1 The feature sample set of category k is e (i-1)k , assuming the data set The data sample I of category k k Sample g and I k The distance between other samples h is d gh , d is the distance threshold, then the density of sample g is g It can be calculated by the following formula:

[0135]

[0136] in,

[0137] Will I k The samples in are sorted according to density, and the samples ranked in the first t are added to the data set The feature sample set e of category k (i-1)k And further obtain the feature set E of all categories i-1 ;in,

[0138] Then E i-1 The total number of categories in is t i-1 =c i-1 *t.

[0139] In step S404, E1, E2 to E i-1 、N i-1 And the corresponding classifier and Train to get a new classifier N i ; Among them, the loss function is as follows:

[0140]

[0141]

[0142] Taking the above loss function as the objective function, the stochastic gradient descent algorithm is used to train the new classifier N i , as shown below:

[0143]

[0144] Among them, Ψ is the candidate model set, is E1, E2, …, E i-1 The cross entropy loss function is: yes The cross loss function.

[0145] The data processing method provided in the embodiment of the present application can achieve the following Figure 5 The continuous learning method shown in Figure 5 As shown:

[0146] Through the dataset D i Get the classifier For data set D i The samples in are reduced in dimension to obtain a data set consisting of the samples after dimension reduction. use Feature point set E i-1 And the classifier N i-1 Get the classifier N i .

[0147] Through the dataset D i+1 Get the classifier For data set D i+1 The samples in are reduced in dimension to obtain a data set consisting of the samples after dimension reduction. based on Get the feature point set E i . use Feature point set E i And the classifier N i Get the classifier N i+1 .

[0148] pass Figure 5 The learning method shown in the figure combines the feature sample set of the previous task with the sample set of the current task for joint training to obtain the model mechanism. When new categories and new training data are involved, it can make full use of the existing models and data, automatically build a new model, and complete all previous tasks with a higher accuracy.

[0149] In the method provided by the embodiment of the present invention, on the one hand, the existing model is trained by selecting characteristic samples from the original samples, which can reduce the storage space required for storing training data and save the resources of storage devices, especially under the condition that the storage resources of IoT devices are limited. On the other hand, the samples are compressed and encrypted, which reduces the amount of data storage while protecting data privacy.

[0150] Based on the foregoing embodiments, an embodiment of the present application provides a data processing device, which includes the modules included and the components included in each module, and can be implemented by a processor in a data processing device; of course, it can also be implemented by a logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0151] Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the data processing device 600 includes:

[0152] A first determining unit 601 is used to determine feature samples selected from historical samples and types of the feature samples; the types of the feature samples constitute a first type set;

[0153] A second determining unit 602 is used to determine a target sample and a type of the target sample; the types of the target samples constitute a second type set; the second type set is different from the first type set;

[0154] The adjustment unit 603 is used to adjust the parameters of the first classification model according to the feature sample, the type of the feature sample, the target sample and the type of the target sample to obtain a second classification model; the first classification model can identify the types included in the first type set; the second classification model can identify the types included in the third type set; the third type set is the union of the first type set and the second type set.

[0155] In other embodiments, the device further comprises: a first screening unit, configured to:

[0156] Performing dimensionality reduction on the historical samples;

[0157] The feature samples are selected from the historical samples after dimensionality reduction.

[0158] In other embodiments, the device further comprises: a second screening unit, configured to:

[0159] According to the types of different historical samples, the historical sample set formed by the historical samples is divided into at least one sample subset; the types of historical samples belonging to the same sample subset are the same, and the types of historical samples belonging to different sample subsets are different;

[0160] A feature sample in a corresponding sample subset is selected from the historical samples included in the at least one sample subset.

[0161] In other embodiments, the second screening unit is further used for:

[0162] For each sample subset, perform the following processing to obtain the feature samples in the corresponding sample subset:

[0163] Determining the density of each historical sample in the sample subset;

[0164] Sorting the historical samples in the sample subset according to the density of each historical sample;

[0165] A set number of historical samples that are ranked first are used as feature samples of the sample subset.

[0166] In other embodiments, the second screening unit is further used for:

[0167] For each historical sample in the sample subset, the following processing is performed to obtain the density of the corresponding historical sample:

[0168] Determine the distances between the historical samples and other historical samples in the sample subset;

[0169] The determined distances are added to obtain the density of the historical samples.

[0170] In other embodiments, the adjustment unit 603 is further configured to:

[0171] Performing dimensionality reduction on the target sample;

[0172] According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the types of the target samples, the parameters of the first classification model are adjusted to obtain a second classification model.

[0173] In other embodiments, the adjustment unit 603 is further configured to:

[0174] Upgrading the dimension of the target sample after dimension reduction to obtain an updated target sample;

[0175] Using the updated target sample as an input of a third classification model, and obtaining a probability of identifying the updated target sample as a corresponding type output by the third classification model; the third classification model can identify the types included in the second type set;

[0176] According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the corresponding probabilities of the target samples after corresponding updates, the parameters of the first classification model are adjusted to obtain the second classification model.

[0177] In other embodiments, the adjustment unit 603 is further configured to:

[0178] Inputting the target sample into a set network model to obtain an output result of the network model;

[0179] The output result corresponding to the target sample is compared with the type of the corresponding target sample, and the parameters of the network model are adjusted according to the comparison result until the network model converges to obtain the third classification model.

[0180] It should be noted that in the embodiments of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product, which is stored in a storage medium and includes several instructions for a terminal to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0181] Correspondingly, an embodiment of the present application provides a data processing device, Figure 7 A schematic diagram of the structure of the data processing device provided in the embodiment of the present application is shown in FIG. Figure 7 As shown, the data processing device 700 at least includes: a processor 701 , a communication interface 702 , and a storage medium 703 configured to store executable instructions, wherein: the processor 701 generally controls the overall operation of the data processing device 700 .

[0182] The communication interface 702 enables the data processing device to communicate with other terminals or servers through a network.

[0183] The storage medium 703 is configured to store instructions and applications executable by the processor 701, and can also cache data to be processed or processed by the processor 701 and each module in the data processing device 700, which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0184] In an exemplary embodiment, the present invention also provides a storage medium, namely a computer-readable storage medium, such as a memory including a computer program, and the computer program can be executed by the processor 701 of the data processing device to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0185] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0186] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, an element defined by the statement "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed.

[0187] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art may understand that all or part of the steps of implementing the above method embodiment may be completed by hardware related to program instructions, and the aforementioned program may be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memories, magnetic disks or optical disks. Alternatively, if the above integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present invention is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a terminal to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage media include: mobile storage devices, ROM, magnetic disks, optical disks, and other media that can store program codes.

[0188] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: The method comprises: Determine feature samples screened from historical samples and types of the feature samples; the types of the feature samples constitute a first type set; Determine a target sample and a type of the target sample; the type of the target sample constitutes a second type set; the second type set is different from the first type set; According to the feature sample, the type of the feature sample, the target sample and the type of the target sample, the parameters of the first classification model are adjusted to obtain a second classification model; the first classification model can identify the types included in the first type set; the second classification model can identify the types included in the third type set; the third type set is the union of the first type set and the second type set; The method further comprises: Performing dimensionality reduction on the historical samples; Select the feature sample from the historical samples after dimensionality reduction; According to the types of different historical samples, the historical sample set formed by the historical samples is divided into at least one sample subset; the types of historical samples belonging to the same sample subset are the same, and the types of historical samples belonging to different sample subsets are different; Selecting a feature sample in a corresponding sample subset from the historical samples included in the at least one sample subset; The selecting a feature sample in a corresponding sample subset from the historical samples included in the at least one sample subset comprises: For each sample subset, perform the following processing to obtain the feature samples in the corresponding sample subset: Determining the density of each historical sample in the sample subset; Sorting the historical samples in the sample subset according to the density of each historical sample; Using a set number of historical samples that are ranked first as feature samples of the sample subset; The adjusting the parameters of the first classification model according to the feature sample, the type of the feature sample, the target sample and the type of the target sample to obtain the second classification model includes: Performing dimensionality reduction on the target sample; According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the types of the target samples, the parameters of the first classification model are adjusted to obtain a second classification model; The step of adjusting the parameters of the first classification model according to the feature sample, the type of the feature sample, the target sample after dimension reduction, and the type of the target sample to obtain the second classification model includes: Upgrading the dimension of the target sample after dimension reduction to obtain an updated target sample; Using the updated target sample as an input of a third classification model, and obtaining a probability of identifying the updated target sample as a corresponding type output by the third classification model; the third classification model can identify the types included in the second type set; According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the corresponding probabilities of the target samples after corresponding updates, the parameters of the first classification model are adjusted to obtain the second classification model.

2. The method according to claim 1, characterized in that The determining the density of each historical sample in the sample subset includes: For each historical sample in the sample subset, the following processing is performed to obtain the density of the corresponding historical sample: Determine the distances between the historical samples and other historical samples in the sample subset; The determined distances are added to obtain the density of the historical samples.

3. The method according to claim 1, characterized in that The method further comprises: Inputting the target sample into a set network model to obtain an output result of the network model; The output result corresponding to the target sample is compared with the type of the corresponding target sample, and the parameters of the network model are adjusted according to the comparison result until the network model converges to obtain the third classification model.

4. A data processing device, characterized in that: The device comprises: A first determining unit is used to determine feature samples selected from historical samples and types of the feature samples; the types of the feature samples constitute a first type set; A second determining unit, configured to determine a target sample and a type of the target sample; the types of the target samples constitute a second type set; the second type set is different from the first type set; an adjusting unit, configured to adjust parameters of a first classification model according to the feature sample, the type of the feature sample, the target sample, and the type of the target sample, to obtain a second classification model; the first classification model can identify types included in the first type set; the second classification model can identify types included in a third type set; the third type set is a union of the first type set and the second type set; The device further comprises: a first screening unit, configured to reduce the dimension of the historical samples; Select the feature sample from the historical samples after dimensionality reduction; The device further includes: a second screening unit, configured to divide the historical sample set formed by the historical samples into at least one sample subset according to the types of different historical samples; the types of historical samples belonging to the same sample subset are the same, and the types of historical samples belonging to different sample subsets are different; Selecting a feature sample in a corresponding sample subset from the historical samples included in the at least one sample subset; The second screening unit is further configured to perform the following processing on each sample subset to obtain feature samples in the corresponding sample subset: Determining the density of each historical sample in the sample subset; Sorting the historical samples in the sample subset according to the density of each historical sample; Using a set number of historical samples that are ranked first as feature samples of the sample subset; The adjustment unit is further used to reduce the dimension of the target sample; According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the types of the target samples, the parameters of the first classification model are adjusted to obtain a second classification model; The adjustment unit is further used to increase the dimension of the target sample after the dimension reduction to obtain an updated target sample; Using the updated target sample as an input of a third classification model, and obtaining a probability of identifying the updated target sample as a corresponding type output by the third classification model; the third classification model can identify the types included in the second type set; According to the feature samples, the types of the feature samples, the target samples after dimensionality reduction, and the corresponding probabilities of the target samples after corresponding updates, the parameters of the first classification model are adjusted to obtain the second classification model.

5. A data processing device, characterized in that: The device comprises at least: a processor and a storage medium configured to store executable instructions, wherein: the processor is configured to execute the stored executable instructions; The executable instructions are configured to execute the data processing method provided in any one of claims 1 to 3 above.

6. A storage medium, characterized in that: The storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the data processing method provided in any one of claims 1 to 3 above.

Citation Information

Patent Citations

  • Classifying method and device with time adaptability

    CN106126751A

  • Ganglion differentiation-based incremental target identification system

    CN106919980A