A data classification method, apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202211615835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-12-15
AI Technical Summary
[0003]由于不同模型的网络结构或训练所采用的样本数据不同,将同一待处理数据输入不同模型,不同模型输出的特征值可能维度不同,或者即使维度相同,每个维度的定义也是不同的,因此不同模型输出的特征值是无法直接进行比较的
[0053] In the solution provided in this application embodiment, since the same model is used to extract feature values from the data for computational processing, and the feature values of the central data can reflect the common features of data of the same category, the electronic device or data processing device can use the second model to extract feature values from the data to be processed and the first central data of the original data, and then determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, instead of using the second model to extract feature values from all the original data and the data to be processed and determining the category to which all the data belongs. In this way, the efficiency of the second model in determining the category to which the data to be processed belongs after introducing the second model and the data to be processed can be improved, while avoiding the waste of resources and time required by the first model to extract and classify feature values from the original data.
Smart Images

Figure CN115935258B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data classification method, apparatus, electronic device, and storage medium. Background Technology
[0002] The underlying network structure and parameters used in general AI (Artificial Intelligence) recognition are called models. Typically, models are obtained after training and used for actual recognition; for example, models can classify images and audio. After data is input into the model, the model can output the corresponding feature values. A model can accumulate a large number of feature values corresponding to a large amount of data during its use.
[0003] Because different models have different network structures or use different sample data for training, when the same data to be processed is input into different models, the feature values output by different models may have different dimensions, or even if the dimensions are the same, the definition of each dimension is different. Therefore, the feature values output by different models cannot be directly compared.
[0004] When migrating existing data to a new device, or introducing a new model into an existing device, new data is typically used. However, since the feature values of the existing data and the feature values obtained by processing the new data using the new model cannot be directly used for computational purposes, it is necessary to reprocess all the existing data using the new model to obtain the corresponding feature values. Only then can all the data be classified based on the feature values of the existing and new data, rendering all the original feature values useless. This results in a significant waste of time and resources, and low data processing efficiency. Summary of the Invention
[0005] The purpose of this application is to provide a data classification method, apparatus, electronic device, and storage medium to at least avoid the situation where, after migrating existing data to a new device or introducing a new model into the existing device, the existing data is reprocessed using the new model to obtain corresponding feature values, causing all the original feature values to become useless data, thereby at least improving the efficiency of data classification.
[0006] In a first aspect, embodiments of this application provide a data classification method, the method comprising:
[0007] Obtain data to be processed, wherein the data to be processed is the unprocessed data obtained after the first model is replaced by the second model, the first model is used to classify the original data, and the second model is used to classify the data to be processed;
[0008] The second model is used to extract feature values from the data to be processed and the first central data to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. The category of the original data has been determined by the first model. The first central data is the data used as the category center when the original data is classified by the first model. The first central data is determined from the original data based on the quality assessment results of the original data.
[0009] Based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, the category to which the data to be processed belongs is determined.
[0010] Optionally, the step of determining the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data includes:
[0011] Calculate the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first center data, and determine whether there is a similarity that reaches the first threshold in the first similarity;
[0012] If it exists, determine the category to which the data to be processed belongs as the first category, wherein the first category is the category corresponding to the first center data whose similarity reaches the first threshold; or,
[0013] If it does not exist, determine that the category to which the data to be processed belongs is a new category.
[0014] Optionally, after the step of determining that the category to which the data to be processed belongs is the first category, the method further includes:
[0015] The data to be processed is evaluated according to a preset evaluation method to obtain the quality evaluation result.
[0016] If the quality assessment result of the data to be processed is higher than the quality assessment result of the target data, the target data is replaced with the data to be processed. The quality assessment result of the target data is determined based on the preset assessment method, and the target data is the second center data of the category to which the data to be processed belongs.
[0017] Optionally, the data to be processed includes images, and the step of performing a quality assessment on the data to be processed according to a preset evaluation method to obtain a quality assessment result includes:
[0018] The quality assessment result P is obtained by performing a quality assessment on the data to be processed according to the following formula:
[0019]
[0020] in, k Let α be the k-th attribute value of the data to be processed. k Let n be the weight value corresponding to the k-th attribute value, where n is a positive integer.
[0021] Optionally, the method further includes:
[0022] Retrieve data deletion requests initiated by users;
[0023] If the data deleted by the data deletion operation is third-center data, delete the third-center data indicated by the data deletion operation;
[0024] The remaining data is evaluated for quality according to the preset evaluation method to obtain the quality evaluation result, wherein the remaining data is other data besides the third center data included in the category to which the third center data belongs;
[0025] Based on the quality assessment results corresponding to each remaining data point, new center data of the category to which the remaining data belongs is determined from the remaining data.
[0026] Optionally, the method further includes:
[0027] Obtain the user's merge category operation and merge the data included in the category indicated by the merge category operation;
[0028] The fourth center data under the category indicated by the merge category operation is used as the center data under the category obtained after data merging.
[0029] Optionally, the method further includes:
[0030] For the first data in the original data that meets the error condition, the second model is used to extract feature values from the first data to obtain the feature values corresponding to the first data. The error condition is that the second similarity is less than the sum of the second threshold corresponding to the first model and the precision difference, and greater than the second threshold corresponding to the first model. The second similarity is the similarity between the feature values corresponding to the original data and the feature values of the first center data of its category. The precision difference is the difference between the precision of the second model and the precision of the first model. The second threshold is the similarity threshold used when classifying the original data using the first model.
[0031] Based on the feature values corresponding to the first data and the feature values corresponding to the first central data, the category to which the first data belongs is determined.
[0032] Secondly, embodiments of this application provide a data classification method applied to a data processing device, the data processing device including a first processing unit and a second processing unit, the first processing unit running a first model, and the second processing unit running a second model, the method including:
[0033] Obtain the first and second data to be processed;
[0034] The first processing unit uses the first model to extract feature values from the first data to be processed, obtains a first feature value, and determines the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data, wherein the fifth center data is determined from the first data to be processed based on the quality assessment result of the first data to be processed;
[0035] The second processing unit uses the second model to extract feature values from the second data to be processed, obtains a third feature value, and determines the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data. The sixth center data is determined from the second data to be processed based on the quality assessment results of the second data to be processed.
[0036] The target model is used to extract feature values from the target center data to obtain the fifth feature value corresponding to the target center data. If the target model is the first model, the target center data is the sixth center data; or, if the target model is the second model, the target center data is the fifth center data.
[0037] If there exists a target feature value whose similarity to the fifth feature value meets a preset similarity, the data included in the category corresponding to the fifth feature value is merged with the data included in the category corresponding to the target feature value. Wherein, if the fifth feature value is a feature value obtained by extracting feature values from the sixth central data using the first model, the target feature value is the second feature value; or, if the fifth feature value is a feature value obtained by extracting feature values from the fifth central data using the second model, the target feature value is the fourth feature value.
[0038] Thirdly, embodiments of this application provide a data classification apparatus, the apparatus comprising:
[0039] The first data acquisition module is used to acquire data to be processed, wherein the data to be processed is unprocessed data acquired after the first model is replaced by the second model, the first model is used to classify the original data, and the second model is used to classify the data to be processed.
[0040] The feature extraction module is used to extract features from the data to be processed and the first central data using the second model, so as to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. The category of the original data has been determined by the first model. The first central data is the data used as the category center when classifying the original data using the first model. The first central data is determined from the original data based on the quality assessment results of the original data.
[0041] The data category determination module is used to determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data.
[0042] Fourthly, embodiments of this application provide a data classification apparatus applied to a data processing device. The data processing device includes a first processing unit and a second processing unit. The first processing unit runs a first model, and the second processing unit runs a second model. The apparatus includes:
[0043] The second data acquisition module is used to acquire the first data to be processed and the second data to be processed.
[0044] The first category determination module is used by the first processing unit to extract feature values from the first data to be processed using the first model to obtain a first feature value, and to determine the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data, wherein the fifth center data is determined from the first data to be processed based on the quality assessment result of the first data to be processed;
[0045] The second category determination module is used by the second processing unit to extract feature values from the second data to be processed using the second model to obtain a third feature value, and to determine the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data, wherein the sixth center data is determined from the second data to be processed based on the quality assessment results of the second data to be processed;
[0046] The central data feature value extraction module is used to extract feature values from the target central data using the target model to obtain the fifth feature value corresponding to the target central data. If the target model is the first model, the target central data is the sixth central data, or if the target model is the second model, the target central data is the fifth central data.
[0047] The data merging module is used to merge the data included in the category corresponding to the fifth feature value with the data included in the category corresponding to the target feature value if there is a target feature value whose similarity with the fifth feature value meets a preset similarity. Specifically, if the fifth feature value is a feature value obtained by extracting feature values from the sixth center data using the first model, the target feature value is the second feature value; or, if the fifth feature value is a feature value obtained by extracting feature values from the fifth center data using the second model, the target feature value is the fourth feature value.
[0048] Fifthly, an electronic device comprising:
[0049] Memory, used to store computer programs;
[0050] A processor, when executing a program stored in memory, implements the method described in either the first or second aspect above.
[0051] A sixth aspect is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in either the first or second aspect.
[0052] Beneficial effects of the embodiments in this application:
[0053] In the solution provided in this application embodiment, since the same model is used to extract feature values from the data for computational processing, and the feature values of the central data can reflect the common features of data of the same category, the electronic device or data processing device can use the second model to extract feature values from the data to be processed and the first central data of the original data, and then determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, instead of using the second model to extract feature values from all the original data and the data to be processed and determining the category to which all the data belongs. In this way, the efficiency of the second model in determining the category to which the data to be processed belongs after introducing the second model and the data to be processed can be improved, while avoiding the waste of resources and time required by the first model to extract and classify feature values from the original data.
[0054] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0056] Figure 1 This is a schematic diagram illustrating the feature values corresponding to the image output by the model.
[0057] Figure 2 This is a schematic diagram illustrating the image recognition and classification using the first model.
[0058] Figure 3 A flowchart illustrating the first data classification method provided in this application embodiment;
[0059] Figure 4 This is a schematic diagram illustrating the output of the feature values corresponding to the image using the first model and the second model.
[0060] Figure 5 A diagram illustrating the distance between the data and the center data;
[0061] Figure 6 Based on Figure 3 A flowchart illustrating the method for determining the data category to be processed in the illustrated embodiment;
[0062] Figure 7 Based on Figure 6 A flowchart illustrating the central data replacement method in the illustrated embodiment;
[0063] Figure 8 Based on Figure 7 A flowchart illustrating the method for determining central data in the case of deleting central data in the illustrated embodiment;
[0064] Figure 9 Based on Figure 3 A flowchart illustrating the method for determining the center data in the case of merging categories in the illustrated embodiment;
[0065] Figure 10 Based on Figure 3 The flowchart shown in the embodiment is for determining the category of the original data that satisfies the error condition.
[0066] Figure 11 This is a schematic diagram illustrating the identification and classification of existing data using the first model.
[0067] Figure 12 This is a schematic diagram illustrating the identification and classification of the data to be processed using the second model;
[0068] Figure 13A flowchart illustrating the second data classification method provided in this application embodiment;
[0069] Figure 14 This is a schematic diagram of the structure of the first data classification device provided in the embodiments of this application;
[0070] Figure 15 This is a schematic diagram of the structure of the second data classification device provided in the embodiments of this application;
[0071] Figure 16 This application provides a schematic diagram of the structure of an electronic device. Detailed Implementation
[0072] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0073] After being trained on samples, models used for data recognition can be used to identify input data. For example, a model can identify and classify images, audio, etc. When data is input into the model, the model can output the corresponding feature values.
[0074] like Figure 1 An image 101 is input into a trained model 102. After analysis and calculation by model 102, a vector T 103 is output. Vector T can be specifically represented as T[t1,t2,t3…tn]. The dimension of vector T is defined by the model during training, and each element t1,t2,t3…tn in T is only meaningful for this model 102.
[0075] For example, consider two models, Model 1 and Model 2. Model 1 defines the network output dimension as a one-dimensional array of 1024, while Model 2 defines the network output dimension as a one-dimensional array of 512. An electronic device uses both Model 1 and Model 2 to process the same data; Model 1 outputs vector 1, and Model 2 outputs vector 2. Because Model 1 and Model 2 define different network output dimensions, the parameters in the network nodes are different, therefore vector 1 and vector 2 cannot be directly compared.
[0076] Besides the different network output dimensions defined by different models, another reason why the output results of different models on the same data cannot be directly compared is that different models use different sample sets or have different network structures during training. Thus, even if different models have the same output dimension, the meaning of each element within that dimension may change, making it impossible to directly compare the output results of different models on the same data.
[0077] In data recognition technologies, the process typically begins with collecting samples and training a model to obtain a first model. During use, the first model often encounters two scenarios. First, some issues are discovered during application, requiring optimization. The optimized second model is then trained and ready for deployment. Second, the CPU (Central Processing Unit), NPU (Neural-network Processing Unit), or GPU (Graphics Processing Unit) processor needs to be replaced, and the stored data needs to be preserved. In this case, the second model is required.
[0078] In both of the above scenarios, during the use of the first model, a large number of feature value output records have often been accumulated, which constitute feature value set 1. For example, the data source could be cameras, user data backup uploads, or network data collection, etc. If the first model is used for person recognition, and the first model has accumulated 100,000 images, then since a single image may contain multiple people, the feature values output after recognition by the first model may exceed 100,000.
[0079] If different terminals use different models—for example, a terminal could be a private NAS (Network Attached Storage) electronic device or a private intelligent identification electronic device—then after the second model is updated to the aforementioned electronic device, the feature values of the data accumulated by the first model cannot be used to calculate the feature values of the data output by the second model. Therefore, the second model needs to recalculate the feature values of the data accumulated by the first model to obtain feature value set 2. The original feature value set 1 becomes meaningless after the second model is updated. In this embodiment, the electronic device can be referred to as a data processing device, which refers to an object that can be used to execute the data classification scheme provided in this embodiment.
[0080] The time required for electronic devices to recalculate feature values using the second model on the data accumulated by the first model is relatively long. Typically, the electronic device remains idle until the second model completes its recalculation, and is then reused after the upgrade is complete. This process of re-identifying the data accumulated by the first model using the second model can also be performed in the background; the first model remains in use until the re-identification process of the second model is completely finished.
[0081] The time required for an electronic device to re-identify the original data using the second model depends on the device's resources and the performance requirements of the identification process. This process can be lengthy, and the original feature set, such as feature set 1, becomes useless old data with each model update, rendering the time and resources previously consumed by the electronic device useless.
[0082] The following example illustrates the process of updating the model described above. Figure 2 As shown, the electronic device uses a first model for facial feature recognition. The dataset consists of single-person headshot images P1, P2, P3, P4, P5, and P6. The first model recognizes images P1-6 and outputs feature values T1, T2, T3, T4, T5, and T6 corresponding to P1-6. To classify images P1-6 according to the people in them, the first model aggregates images T1-6, resulting in three categories: F1, F2, and F3. F1 includes P1 and P2, F2 includes P3 and P4, and F3 includes P5 and P6, indicating that the people included in P1 and P2, P3 and P4, and P5 and P6 are the same.
[0083] At this point, the first model is updated to the second model, and a new batch of images P7 and P8 are obtained. The electronic device needs to use the second model to identify and classify P7 and P8. Since the feature values output by the second model cannot be directly compared with those output by the first model, the electronic device needs to use the second model to re-identify and extract feature values from P1-8, and then classify P7 and P8 based on the feature values extracted by the second model. Thus, the feature values T1-6 extracted by the first model from P1-6 become useless data, and the time and resources previously spent by the electronic device become wasted. Furthermore, the electronic device needs to use the second model to re-identify and extract feature values from all data, which takes a considerable amount of time.
[0084] To address the problem of existing data becoming useless and significant time and resource waste caused by the migration of existing data to a new device or the introduction of a new model into an existing device, where the new model needs to process the existing data to obtain corresponding feature values and then classify all data based on these feature values, this application provides a data classification method, apparatus, electronic device, and storage medium. The data classification method provided in this application is described below.
[0085] like Figure 3 As shown, a data classification method includes:
[0086] S301, Obtain the data to be processed;
[0087] Wherein, the data to be processed is the unprocessed data obtained after the first model is replaced by the second model, the first model is used to classify the original data, and the second model is used to classify the data to be processed;
[0088] S302, the second model is used to extract feature values from the data to be processed and the first central data to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data;
[0089] Wherein, the category of the original data has been determined by the first model, the first center data is the data used as the category center when classifying the original data using the first model, and the first center data is determined from the original data based on the quality assessment results of the original data;
[0090] S303, based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, determine the category to which the data to be processed belongs.
[0091] As can be seen, in the solution provided by this application embodiment, the electronic device can acquire data to be processed, wherein the data to be processed is unprocessed data acquired after the first model is replaced by the second model. The first model is used to classify the original data, and the second model is used to classify the data to be processed. The second model is used to extract feature values from the data to be processed and the first central data to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. The category of the original data has been determined by the first model. The first central data is the data used as the category center when classifying the original data using the first model. The first central data is determined from the original data based on the quality assessment results of the original data. Based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, the category to which the data to be processed belongs is determined. In this scheme, since the same model is used to extract feature values from the data for computational processing, and the feature values of the central data can reflect the common features of data of the same category, the electronic device can use the second model to extract feature values from the data to be processed and the first central data. Then, based on the feature values corresponding to the data to be processed and the first central data, the category to which the data to be processed belongs can be determined. Instead, it is not necessary to use the second model to extract feature values from all the original data and the data to be processed and determine the category to which all the data belongs. In this way, the efficiency of the second model in determining the category to which the data to be processed belongs after introducing the second model and the data to be processed can be improved, while avoiding the waste of resources and time required by the first model to extract feature values and classify the original data.
[0092] The data classification method disclosed in this application is applied to the field of data recognition technology. Specifically, it can be applied to scenarios such as recognizing and classifying images, audio, or files, without any specific limitations.
[0093] This solution applies to, but is not limited to, the following two situations:
[0094] The first scenario is a model upgrade. The electronic device uses the first model for data recognition. Due to reasons such as the need to improve the accuracy of the first model, it needs to be upgraded. The upgraded model is the second model. The electronic device uses the upgraded model, i.e. the second model, for data recognition. At this time, the electronic device obtains the data to be processed.
[0095] The second scenario involves data migration. The electronic device uses the first model for data recognition, extracting feature values from the data to obtain the feature values corresponding to the original data. Now, it is necessary to migrate this original data and its corresponding feature values to a new electronic device. The new device uses the second model, and in this case, the new device acquires the data to be processed.
[0096] The second scenario described above is illustrated below. The NAS is connected to a first smart device. This first smart device can use a first model to extract feature values from the photos stored on the NAS and classify the photos based on the extracted feature values, resulting in multiple albums. Now, the NAS is connected to a second smart device, which uses a second model. When a user stores data to be processed on the NAS, which is a batch of new images, the second smart device can use the data classification method provided in this solution to classify the data.
[0097] Since the model used by the electronic device has been replaced by the second model, the feature values corresponding to the data extracted by the different models cannot be compared. Therefore, it is necessary to classify the data to be processed, that is, the unprocessed data obtained after the first model is replaced by the second model, using the data classification method provided in the embodiments of this application. The first model is the model used to classify the original data, and the second model is the model used to classify the data to be processed. The second model is an upgraded model compared to the first model, and the accuracy of data identification and classification using the second model is higher.
[0098] For example, if the model is used for image recognition and classification, then the data to be processed can be images. If the model is used for audio recognition and classification, then the data to be processed can be audio.
[0099] Since the electronic device has already used the first model to classify the original data, and the category center data can reflect the characteristics of the data included in its category, the first center data is the data used as category centers when the electronic device uses the first model to classify the original data. Therefore, the electronic device only needs to extract the feature values corresponding to the data to be processed, as well as the feature values corresponding to the first center data. The first center data is used as the category center data because it is determined from the original data based on the quality assessment results of the original data.
[0100] Although the electronic device contains feature values corresponding to the first central data, these feature values are extracted using the first model. Since feature values extracted from data using different models cannot be compared, the electronic device needs to use a second model to extract feature values from both the data to be processed and the first central data, thereby obtaining the feature values corresponding to the data to be processed and the feature values corresponding to the first central data.
[0101] Since the feature values of the central data can reflect the common characteristics of data of the same category, the category to which the data to be processed belongs can be determined based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. In this way, it is only necessary to compare the feature values corresponding to the data to be processed with the feature values corresponding to the first central data, rather than comparing the feature values corresponding to the data to be processed with the feature values corresponding to all the original data, which can improve the efficiency of the second model in classifying the data to be processed. As the amount of original data increases, the efficiency of data classification using the data classification method provided in this application embodiment increases proportionally.
[0102] As can be seen, in this embodiment, since the same model is used to extract feature values from the data for computational processing, and the central data can reflect the common features of data of the same category, the electronic device can use the second model to extract feature values from the data to be processed and the first central data, and then determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. Instead, it is not necessary to use the second model to extract feature values from all the original data and the data to be processed and determine the category to which all the data belongs. In this way, the efficiency of the second model in determining the category to which the data to be processed belongs can be improved, while avoiding the waste of resources and time required by the first model to extract and classify feature values from the original data.
[0103] The following section will introduce the theory of reverse reasoning. Since the feature values extracted by different models cannot be directly compared, if the relationship between the data is determined through the feature values, then among several high-precision models, the probability of the relationship between the feature values can be passed to other models based on the relationship between the data. Here, high precision means that the model precision reaches 99%.
[0104] like Figure 4 The data to be processed consists of three images, P1, P2, and P3, each containing a facial image. The electronic device can use a first model and a second model to classify the images. The accuracy of the first and second models is very close, for example, the difference in accuracy is less than 3%. The electronic device can extract feature values from the three images using the first and second models respectively. The feature values extracted by the electronic device using the first model for P1, P2, and P3 are T1, T2, and T3, respectively, while the feature values extracted by the electronic device using the second model for P1, P2, and P3 are Z1, Z2, and Z3, respectively.
[0105] If the electronic device determines that the characters included in P1 and P2 are the same based on T1 and T2, that is, T1 = S = T2, where S refers to a higher probability, that is, T1 is likely to be equal to T2. Since Z1 and Z2 are the feature values corresponding to P1 and P2, and P1 and P2 include the same characters, then the feature values of Z1 and Z2 are also likely to be equal, that is, Z1 = S = Z2.
[0106] Continuing with the example above, if we determine that T3 is similar to T1, i.e., T3 = S = T1, then based on the fact that P1 and P2 include the same characters, we can also know that P3 and P1 include the same characters. Therefore, we can conclude that the characters included in P1, P2, and P3 are all the same, and thus we can deduce that T3 = S = Z1.
[0107] In practical applications, it is usually necessary to determine the relationship between the data corresponding to the feature values based on the relationship between the feature values, and then classify the data. Although the feature values extracted from the data using the first model and the second model cannot be directly compared, if the first model and the second model select the class center data in the same way, then for the same set of data, the class center data determined by the first model and the second model are the same. The conclusion obtained from the above reverse reasoning theory can be directly used, that is, it can be deduced that T3 = S = Z1.
[0108] Specifically, such as Figure 5 As shown in the diagram, the points represent data. The closer the distance between different points, the higher their similarity. If the distance between a point and the center point is less than a preset distance, then this point can be determined to belong to the category corresponding to the center point. The electronic device uses the first model to select center point 501. Therefore, the electronic device needs to use the first model to compare the distances between other points and the center point to determine whether the other points belong to the category corresponding to center point 501. For example, the electronic device uses the first model to determine the distance between data 502 and center point 501, thereby determining whether data 502 belongs to the category corresponding to center point 501.
[0109] If, for a batch of image data P1, P2, and P3, the electronic device uses a first model to determine that the center point is P1, and the electronic device judges these three data points to be similar (i.e., they belong to the same category), and then receives a new batch of image data P4, P5, and P6, the electronic device uses a second model to determine that these three new data points are similar, and the electronic device uses the second model to determine that the center point is P4. Assuming that the first and second models determine the center point in the same way, we know that if the electronic device uses the second model to determine the center point of P1, P2, and P3, then the center point determined by the second model should also be P1. Furthermore, if P1, P4, P5, and P6 are determined to be similar, then we know that P1, P2, P3, P4, P5, and P6 are all similar, and the categories to which P1, P2, and P3 belong can be merged with the categories to which P4, P5, and P6 belong to a single category.
[0110] like Figure 6 As shown, the step of determining the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data may include:
[0111] S601, calculate the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first center data, and determine whether there is a similarity that reaches the first threshold in the first similarity;
[0112] Since the central data can reflect the common features of data of the same category, in order to improve the efficiency of data classification, a first similarity can be calculated between the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, and it can be determined whether there is a similarity that reaches a first threshold. The method for calculating the similarity between feature values can be cosine distance, Euclidean distance, etc., and is not specifically limited here. Furthermore, the value of the threshold in this embodiment can be determined according to specific calculation requirements.
[0113] It is understandable that the first center data is the category center data corresponding to each original data category. In other words, the similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the category center data corresponding to each original data category can be calculated.
[0114] For example, given three existing data categories with category centers PX, PY, and PZ, and two data points to be processed (P1 and P2), with a first similarity threshold of 95%, we can calculate the first similarity between the feature values of P1 and PX, PY, and PZ, and between the feature values of P2 and PX, PY, and PZ. The results are shown in the table below. It can be seen that the first similarity reaching the first threshold is the first similarity between the feature values of P1 and PZ.
[0115]
[0116] S602, if it exists, determine that the category to which the data to be processed belongs is the first category, wherein the first category is the category corresponding to the first center data corresponding to the similarity reaching the first threshold;
[0117] If the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first center data reaches the first threshold, it means that the similarity between the feature value corresponding to the category center of the original data category and the feature value corresponding to the data to be processed reaches the first threshold. It can be determined that the category to which the data to be processed belongs is the first category corresponding to the first center data that reaches the first threshold of first similarity, and the data to be processed can be classified into the first category.
[0118] Continuing with the example from step S601, since the first threshold is 95%, the first similarity in the table that reaches the first threshold is 98%, which is the first similarity between the feature value corresponding to P1 and the feature value corresponding to PZ. Therefore, P1 can be classified into the category corresponding to PZ. If the data in the example includes pictures of people, then it means that the person included in P1 and the person included in the pictures in the category corresponding to PZ are the same person.
[0119] S603, if it does not exist, determine that the category to which the data to be processed belongs is a new category.
[0120] If none of the first similarities between the feature values corresponding to the data to be processed and the feature values corresponding to the first center data reach the first threshold, it means that the data to be processed is not similar to the original data. In other words, the data to be processed cannot be classified into the category to which the original data belongs. Therefore, it can be determined that the category to which the data to be processed belongs is a new category.
[0121] Following the example from step S601, since the first similarity between the feature values corresponding to P2 and PX, and between the feature values corresponding to PY and PZ, has not reached the first threshold, it means that P2 is dissimilar to PX, PY, and PZ. If the data in the example contains images of people, it means that the people included in the images in the categories corresponding to PX, PY, and PZ are different from the people included in P2. Therefore, it is necessary to determine that the category to which P2 belongs is a newly added category.
[0122] As can be seen, in this embodiment, the electronic device can calculate the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first central data, and determine whether there is a similarity that reaches a first threshold in the first similarity. If there is, the category to which the data to be processed belongs is determined to be the category corresponding to the first central data corresponding to the similarity that reaches the first threshold; or, if there is no similarity, the category to which the data to be processed belongs is determined to be a new category. Since the similarity between feature values can be used to determine the relationship between the data corresponding to the feature values, the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first central data can be calculated. If there is a similarity that reaches the first threshold in the first similarity, it means that there is a category to which the data to be processed belongs in the original data's category, and the first category corresponding to the first central data corresponding to the first similarity that reaches the first threshold can be determined as the category to which the data to be processed belongs. If there is no similarity that reaches the first threshold in the first similarity, it means that there is no category to which the data to be processed belongs in the original data's category, so the category to which the data to be processed belongs needs to be determined as a new category. In this way, the efficiency of data classification can be improved, ensuring that each piece of data to be processed has a category to which it belongs.
[0123] As one implementation method of this application, such as Figure 7 After determining that the data to be processed belongs to the first category as described above, the method may further include:
[0124] S701, Perform a quality assessment on the data to be processed according to a preset assessment method to obtain a quality assessment result;
[0125] The electronic device has already performed a quality assessment on the original data according to a preset evaluation method. The first central data in the original data category can be the data with the highest quality assessment result. To improve the first central data of the category to which the data to be processed belongs, after determining the category to which the data to be processed belongs, a quality assessment can be performed on the data to be processed according to the preset evaluation method to obtain the quality assessment result. The higher the quality assessment result, the better the data corresponding to that quality assessment result reflects the characteristics of the data in its category.
[0126] For example, if an electronic device uses a model to classify the people included in a photo, the preset evaluation method could be to detect whether the face in the photo is a frontal view, whether the lighting in the photo is sufficient, and whether there are any obstructions on the face in the photo, such as masks or glasses.
[0127] S702, if the quality assessment result of the data to be processed is higher than the quality assessment result of the target data, the target data is replaced with the data to be processed.
[0128] The quality assessment result of the target data is determined based on the preset assessment method, and the target data is the second central data of the category to which the data to be processed belongs.
[0129] The target data is the second central data of the category to which the data to be processed belongs. If the quality assessment result of the data to be processed is higher than that of the target data, it means that the data to be processed reflects the characteristics of the data in this category better than the target data. Therefore, the central data of this category can be replaced by the data to be processed instead of the target data.
[0130] Following the example of step S701, if the person in the target data is facing forward, under strong light, and wearing glasses, while the person in the data to be processed is facing forward, under strong light, and not wearing glasses, since the angle and light parameters of the data to be processed and the target data are the same, but the occlusion parameter of the data to be processed is higher than that of the target data, the quality assessment result of the data to be processed is higher than that of the target data. Therefore, the center data can be replaced by the data to be processed instead of the target data.
[0131] It should be noted that if the category of the data to be processed is the same as the category of the original data, then the data in the second data center is the same as the data in the first data center. In other words, whether the data in the first data center and the data in the second data center are the same needs to be determined on a case-by-case basis.
[0132] As can be seen, in this embodiment, the electronic device can perform a quality assessment on the data to be processed according to a preset assessment method to obtain a quality assessment result. If the quality assessment result of the data to be processed is higher than the quality assessment result of the target data, the target data is replaced with the data to be processed. The quality assessment result of the target data is determined based on the preset assessment method, and the target data is the second center data of the category to which the data to be processed belongs. Since the category center data can be the data with the highest quality assessment result in that category, the data to be processed can be quality assessed according to the preset assessment method to obtain a quality assessment result. If the quality assessment result of the data to be processed is higher than the quality assessment result of the target data, the center data is replaced with the data to be processed. In this way, the center data of the original data's category can be updated while classifying the data to be processed, improving the accuracy of data classification.
[0133] As one embodiment of this application, the data to be processed includes an image, and the step of performing a quality assessment on the data to be processed according to a preset evaluation method to obtain a quality assessment result may include:
[0134] The quality assessment result P is obtained by performing a quality assessment on the data to be processed according to the following formula:
[0135]
[0136] in, k Let α be the k-th attribute value of the data to be processed. k Let n be the weight value corresponding to the k-th attribute value, where n is a positive integer.
[0137] Pre-set evaluation methods may include using the above formula to assess data quality. Specifically, T k Let α be the k-th attribute value of the data to be processed. k α represents the weight value corresponding to the k-th attribute value. k * k This represents the impact of the k-th attribute value on the quality assessment result, where k ranges from 1 to n, and α... k * k By summing the results, we can obtain the quality assessment result P.
[0138] For example, based on the above explanation, if the data to be processed is an image including a face, there are three attributes affecting the quality assessment result: angle parameter, lighting parameter, and occlusion parameter. Then n is 3, and k ranges from 1 to 3. The formula used in the preset assessment method can be P = α1*1 + α2*2 + α3*3. Here, P represents the quality assessment result; T1 represents the angle parameter, which is highest when the face is facing forward; the smaller the difference between the angle of the face shown in the image and the angle when facing forward, the larger the parameter; α1 represents the weight of the angle parameter in the quality assessment result; T2 represents the lighting parameter in the photo; the stronger the light in the photo, the larger the parameter; α2 represents the weight of the lighting parameter in the quality assessment result; T3 represents the occlusion parameter, which is larger when there is less occlusion on the face in the photo; α3 represents the weight of the occlusion parameter in the quality assessment result.
[0139] As can be seen, in this embodiment of the application, the electronic device can perform quality assessment on the data to be processed according to the following formula to obtain the quality assessment result P: in, k Let α be the k-th attribute value of the data to be processed. k Let T be the weight value corresponding to the k-th attribute value, where n is a positive integer. k Let α be the k-th attribute value of the data to be processed. k α represents the weight value corresponding to the k-th attribute value. k * k This represents the impact of the k-th attribute value on the quality assessment result, where k ranges from 1 to n, and α... k * k By summing the results, we can obtain the quality assessment result P. This makes the quality assessment result more valuable for reference.
[0140] As one implementation method of this application, such as Figure 8 As shown, the above method may further include:
[0141] S801, retrieves the data deletion operation initiated by the user;
[0142] Users can issue a data deletion command to delete the data.
[0143] S802, if the data indicated by the data deletion operation is third-center data, delete the third-center data indicated by the data deletion operation;
[0144] Third-center data refers to the central data when the data deletion operation indicates that the data is central data. If the data deleted by the user is third-center data, then the electronic device can use the third-center data indicated by the data deletion operation.
[0145] It should be noted that if the category of the data deleted is the same as the category of the original data, then the data in the third center is the same as the data in the first center. In other words, whether the data in the first center and the data in the third center are the same needs to be determined on a case-by-case basis.
[0146] S803, perform a quality assessment on the remaining data according to the preset assessment method to obtain a quality assessment result;
[0147] The remaining data refers to all data other than the third center data included in the category to which the third center data belongs;
[0148] After the electronic device deletes the third-center data indicated by the data deletion operation, the category corresponding to that third-center data will have no center data. To ensure subsequent classification operations can proceed, a new center data needs to be selected from the remaining data in that category. The remaining data consists of all data in the category to which the third-center data belongs, excluding the third-center data itself. The electronic device can perform a quality assessment on the remaining data according to a preset evaluation method to obtain the quality assessment result.
[0149] S804, based on the quality assessment results corresponding to each remaining data, determine new center data of the category to which the remaining data belongs from the remaining data.
[0150] Since the data serving as the category center can be the data with the highest quality assessment result in that category, the electronic device can determine a new center data for that category from the remaining data based on the quality assessment result corresponding to each remaining data point. In subsequent classification operations, the electronic device can compare the feature values corresponding to the data to be processed with the feature values corresponding to the newly determined center data, thereby ensuring the smooth progress of subsequent classification operations.
[0151] As can be seen, in this embodiment, the electronic device can obtain a data deletion operation issued by the user; if the data indicated by the data deletion operation is third-center data, the third-center data indicated by the data deletion operation is deleted; the remaining data is subjected to quality evaluation according to the preset evaluation method to obtain a quality evaluation result, wherein the remaining data is all data other than the third-center data included in the category to which the third-center data belongs; based on the quality evaluation result corresponding to each remaining data, a new center data for the category to which the remaining data belongs is determined from the remaining data. Since the center data of a category can be the data with the highest quality evaluation result in that category, after the third-center data is deleted, there is no longer a center data for that category. In order to ensure the subsequent classification operation, the electronic device can perform a quality evaluation on the remaining data according to the preset evaluation method, and determine a new center data for that category from the remaining data based on the quality evaluation result corresponding to each remaining data. In this way, the subsequent category classification operation can be ensured after the center data is deleted.
[0152] As one implementation method of this application, such as Figure 9 As shown, the above method may further include:
[0153] S901, Obtain the merge category operation issued by the user, and merge the data included in the category indicated by the merge category operation;
[0154] After a user issues a merge category command, the electronic device can merge the data included in the category specified in the merge category command. For example, if the electronic device processes images containing people, and uses a model to identify and classify the people in the images, category 1 includes data P1, P2, and P3, and category 2 includes P4, P5, and P6, if the user merges category 1 and category 2, the electronic device can merge category 1 and category 2, and P1, P2, P3, P4, P5, and P6 will belong to one category after the merge.
[0155] S902, the fourth center data under the category indicated by the merge category operation is used as the center data under the category obtained after data merging.
[0156] Since each category indicated by the merge category operation has its own central data before the merge, in order to ensure the subsequent classification operation, the electronic device can use the fourth central data under the category indicated by the merge category operation as the central data under the category obtained after the data merge.
[0157] Following the example of step S901, since the people in the pictures included in category 1 are different from those in the pictures included in category 2, after merging category 1 and category 2, in subsequent classification operations, if the people included in the data to be processed are the same as those in category 1 or category 2, then the data to be processed can be classified into the category after merging category 1 and category 2. Therefore, the electronic device can use the fourth center data of the category indicated by the merged category operation as the center data under the category obtained after data merging.
[0158] If the center data for category 1 is P1 and the center data for category 2 is P5, then the electronic device can use the fourth center data, namely P1 and P5, as the center data of the merged category. In subsequent data classification operations, the electronic device can compare the feature value corresponding to the data to be processed with the feature value corresponding to P1, and also compare the feature value corresponding to the data to be processed with the feature value corresponding to P5. If one of the feature values reaches a preset threshold, then the category resulting from the merger of category 1 and category 2 can be determined as the category to which the data to be processed belongs.
[0159] It should be noted that if the category indicated by the merge category operation is the same as the category to which the original data belongs, then the data in the fourth center is the same as the data in the first center. In other words, whether the data in the first center and the data in the fourth center are the same needs to be determined on a case-by-case basis.
[0160] As can be seen, in this embodiment, the electronic device can acquire the user's merge category operation and merge the data included in the category indicated by the merge category operation; the fourth center data under the category indicated by the merge category operation is used as the center data under the category obtained after data merging. Since the data included in the categories merged by the user are not similar, in order to classify the data to be processed that is similar to the data included in the merged category into the merged category in subsequent classification operations, the electronic device can use the fourth center data under the category indicated by the merge category operation as the center data under the category obtained after data merging. In this way, it can support the user to perform the merge category operation and ensure the accuracy of subsequent classification operations.
[0161] As one implementation method of this application, such as Figure 10 As shown, the above method may further include:
[0162] S1001, for the first data in the original data that meets the error condition, the second model is used to extract the feature value of the first data to obtain the feature value corresponding to the first data;
[0163] Wherein, the error condition is that the second similarity is less than the sum of the second threshold corresponding to the first model and the precision difference, and greater than the second threshold corresponding to the first model; the second similarity is the similarity between the feature value corresponding to the original data and the feature value of the first center data of its category; the precision difference is the difference between the precision of the second model and the precision of the first model; and the second threshold is the similarity threshold used when classifying the original data using the first model.
[0164] Since different models have different levels of accuracy, the second model is usually more accurate than the first model. Therefore, after introducing the second model into electronic devices, in order to make the classification of the original data more accurate, error fitting can be performed on the original data classified using the first model.
[0165] The first data that meets the error condition is data that would be classified into the current category when using the first model, but might not be classified into the current category when using the second model due to the increased accuracy.
[0166] The second similarity is the similarity between the feature values corresponding to the original data and the feature values of the first center data of its category. A higher second similarity indicates greater similarity between the original data and the first center data of its category; a lower second similarity indicates less similarity. Data that meets the error condition is typically where the similarity between the data and the first center data of its category is close to the second threshold. In other words, when using the first model to classify the data, the second similarity is at the critical value of similarity used by the first model to determine whether the data are similar. The second threshold is the similarity threshold used when classifying the original data using the first model.
[0167] Both the similarity threshold and the model's accuracy are expressed as percentages. In the error condition, since the first model will classify the original data into the current category, the second similarity will always be greater than the second threshold corresponding to the first model. Since the accuracy difference is the maximum possible error when two models classify the same data, the sum of the second threshold and the accuracy difference represents the similarity threshold that takes into account the maximum error generated when using the second model versus the first model. If the second similarity is less than the sum of the second threshold and the accuracy difference, it means that if the second model is used to classify the original data, it may not be classified into the current category. Therefore, for this portion of the first data that meets the error condition, the second model can be used to extract feature values and reclassify the first data.
[0168] For example, if the accuracy difference is 5% and the second threshold is 90%, for data whose second similarity is between 90% and 95%, it is possible that the data will not be classified into the current category when classified by the second model.
[0169] The error condition will be described below with reference to a formula, and the error condition can be expressed as (T-E)<‖Tx-T1‖<T. Wherein, Tx is a feature value corresponding to first data, T1 is a feature value corresponding to first center data of a category to which the first data belongs, T is a second threshold, E is an accuracy difference, and if an accuracy of a first model is Acc1 and an accuracy of a second model is Acc2, then E can be expressed as follows: E=Acc2-Acc1. ‖Tx-T1‖ represents a vector difference between Tx and T1. A smaller vector difference indicates that original data is more similar to the first center data of the category to which the original data belongs, and a larger vector difference indicates that the original data is less similar to the first center data of the category to which the original data belongs.
[0170] After the electronic device introduces the second model, the accuracy D of data classification of the electronic device is greater than or equal to the accuracy of the first model and less than or equal to the accuracy of the second model, that is, Acc1≤D≤Acc2.
[0171] That the vector difference is less than the second threshold corresponding to the first model means that when the electronic device uses the first model to classify first data, the vector difference is less than a similarity threshold based on which the first model classifies original data. That is, the first model will classify the first data into the current category. A difference between the second threshold and the accuracy difference represents a similarity threshold that takes into account a maximum error generated when classification is performed by using the second model compared with using the first model. That the vector difference is greater than the difference between the second threshold corresponding to the first model and the accuracy difference means that when the electronic device uses the second model to classify the first data, it is possible that the first data will not be classified into the current category. Therefore, the electronic device needs to use the second model with higher accuracy to reclassify the first data satisfying the error condition, and the electronic device can use the second model to extract a feature value of the original data to obtain a feature value corresponding to the original data.
[0172] For example, an accuracy of the first model is 99.2%, an accuracy of the second model is 99.4%, the accuracy difference is 0.2%, and the second threshold corresponding to the first model is 95%. Then for first data in which a vector difference between a feature value corresponding to the original data and a feature value of the first center data of the category to which the original data belongs is greater than 94.8% and less than 95%, the second model is used to extract a feature value of the first data, obtain a feature value corresponding to the original data, and perform reclassification.
[0173] S1002, determining the category to which the first data belongs based on the feature value corresponding to the first data and the feature value corresponding to the first center data.
[0174] If the second model is used to classify the first data that meets the error condition, the first data will not be classified into the category assigned to it by the first model. Therefore, the electronic device can use the second model to compare the feature values extracted from the first data using the second model with the feature values extracted from the first center data using the second model, and then determine the category to which the first center data belongs as the similarity value that reaches the second threshold among the above feature values.
[0175] As can be seen, in this embodiment, the electronic device can use the second model to extract feature values from the first data that meets the error condition in the original data, thereby obtaining the feature values corresponding to the first data. The error condition is that the second similarity is less than the sum of the second threshold corresponding to the first model and the precision difference, and greater than the second threshold corresponding to the first model. The second similarity is the similarity between the feature values corresponding to the original data and the feature values of the first center data of its category. The precision difference is the difference between the precision of the second model and the precision of the first model. The second threshold is the similarity threshold used when classifying the original data using the first model. Based on the feature values corresponding to the first data and the feature values corresponding to the first center data, the category to which the first data belongs is determined. Since the first data meets the error condition, it means that it can be classified into the current category using the first model. However, when classified using the more precise second model, it may not be classified into the current category. Therefore, electronic devices can use a second model to regroup the original data that meets the error conditions. Specifically, the electronic device can use the second model to extract feature values from the first data, obtain the feature values corresponding to the first data, and determine the category to which the first data belongs based on the feature values corresponding to the first data and the feature values corresponding to the first center data. In this way, after updating the model, the more accurate second model can be used to reclassify the original data that meets the error conditions, improving the accuracy of data classification.
[0176] As one embodiment of this application, a schematic diagram of an electronic device using a first model to identify and classify existing data is shown below. Figure 11As shown. The original data consists of images including people. The electronic device can use the first model to perform person recognition and classification on the images including people. P1-21 is the original data. The electronic device can use the first model to extract feature values from P1-21, obtaining feature values T1-21 corresponding to P1-21. For the obtained feature values T1-21, the electronic device can use the first model to aggregate the feature values. Specifically, the aggregation method can be the K-means algorithm, hierarchical clustering algorithm, SOM (Self-organizing Maps) algorithm, etc., without specific limitations here.
[0177] The electronic device uses a first model to aggregate photos P1-21 to obtain three albums, F1, F2, and F3, which are the categories described in this application. The negatives for F1, F2, and F3 are P1, P8, and P15, respectively, which are the category center data described in this application. P1, P8, and P15 are selected using the preset evaluation method provided in this application, and each negative corresponds to a feature value extracted by the electronic device using the first model. Album F1 includes photos P1-7, album F2 includes photos P8-14, and album F3 includes photos P15-21.
[0178] After categorizing, users can manually delete photos from albums or merge two albums. If the deleted photos are negatives, the electronic device needs to use a preset evaluation method to calculate the quality assessment result of each photo in the album corresponding to the deleted negatives, and then reselect negatives based on the quality assessment results of each photo. If the user manually merges two albums, the negatives corresponding to the two albums can be used as the negatives of the merged new album.
[0179] After the electronic device introduces the second model and the data to be processed, the electronic device uses the second model to classify the data to be processed, as shown in the diagram below. Figure 12 As shown, the data to be processed is P22-27. Since the feature values extracted using different models cannot be directly compared, the electronic device can use a second model to re-extract the feature values of the three negatives, thus obtaining T1', T8', and T15. The electronic device can also use the second model to extract the feature values corresponding to P22-27, obtaining T22'-27'. To determine the category to which each piece of data to be processed belongs, the electronic device can use the second model to cluster the feature values T22'-27' corresponding to the data to be processed and the feature values T1', T8', and T15' corresponding to the three negatives of the original data. The specific clustering method will not be elaborated here.
[0180] The clustering results show that the similarity between T1' and T22' reaches the preset threshold, so P22 can be classified into album F1. The electronic device can output the quality assessment result of P22 using the preset evaluation method. The quality assessment result of P22 is lower than that of P1, so the negative of F1 remains P1. Since the similarity between T25' and T1', T8', and T15' does not reach the preset threshold, the new category can be determined as the category to which P25 belongs, the new category is album F4, and the negative corresponding to F4 is P25. The similarity between T23' and T8' reaches the preset threshold, so P23 can be classified into album F2. The electronic device can output the quality assessment result of P22 using the preset evaluation method. The quality assessment result of P23 is higher than that of P8, so the electronic device can replace the negative of F2 with P23 instead of P8. The feature values of T24', T26', and T27' and T15' all reach the preset threshold, and the quality assessment results of P24, P26, and P27 are all lower than the quality assessment result of P15. Therefore, P24, P26, and P27 can be classified into album F3, and the original negative P15 will not be replaced.
[0181] It is evident that after introducing the second model and the data to be processed, the electronic device does not use the second model to extract feature values from all the original data. Instead, it only needs to use the second model to extract the feature values of the central data and the data to be processed to complete the classification of the data to be processed. This can improve the efficiency of data classification after introducing the second model and the data to be processed, and can avoid the waste of the original data and the feature values corresponding to the original data.
[0182] It should be noted that relational terms such as "first" and "second" in this application are used only to distinguish data objects being processed in different processing scenarios, and do not necessarily require or imply any such actual order between these data objects.
[0183] Corresponding to the first data classification method described above, this application embodiment also provides another data classification method, which will be introduced below.
[0184] like Figure 13 As shown, a data classification method is applied to a data processing device, which includes a first processing unit and a second processing unit. The first processing unit runs a first model, and the second processing unit runs a second model. In an optional embodiment, the first and second processing units deployed in the data processing device can be implemented using a multi-core processor architecture. The data classification method includes:
[0185] S1301, Obtain the first data to be processed and the second data to be processed;
[0186] Since the first processing unit and the second processing unit included in the electronic device can run the first model and the second model respectively, the acquired data to be processed can be divided into the first data to be processed and the second data to be processed. The electronic device can use two models to process the data to be processed simultaneously.
[0187] For example, an electronic device receives two batches of image data: the first batch of data to be processed includes P30-P39, and the second batch of data to be processed includes P40-49. The electronic device can use a first model to process the first batch of data P30-39 and a second model to process the second batch of data P40-49.
[0188] S1302, the first processing unit uses the first model to extract feature values from the first data to be processed, obtains a first feature value, and determines the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data.
[0189] The fifth center data is determined from the first data to be processed based on the quality assessment results of the first data to be processed;
[0190] The electronic device can use a first model running on the first processing unit to extract feature values from the first data to be processed, obtaining a first feature value corresponding to the first data to be processed. Then, the electronic device can determine the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data. The fifth center data refers to the category center data used by the electronic device when classifying data using the first model.
[0191] Following the example in step S1301 above, the electronic device can classify the first data to be processed using the first model, resulting in two new categories, F5 and F6. The center data of F5 is P30, the center data of F6 is P35, the data included in F5 are P30-34, and the data included in F6 are P35-39.
[0192] It should be noted that if the category to which the data in the fifth center belongs is the same as the category to which the original data belongs, then the data in the fifth center is the same as the data in the first center. In other words, whether the data in the first center and the data in the fifth center are the same needs to be determined on a case-by-case basis.
[0193] S1303, the second processing unit uses the second model to extract feature values from the second data to be processed, obtains a third feature value, and determines the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data;
[0194] The sixth center data is determined from the second data to be processed based on the quality assessment results of the second data to be processed;
[0195] The electronic device can use a second model running on the second processing unit to extract feature values from the second data to be processed, obtaining a third feature value corresponding to the second data to be processed. Then, the electronic device can determine the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data. The sixth center data refers to the category center data used by the electronic device when classifying data using the second model.
[0196] Following the example in step S1302 above, the electronic device can use the second model to classify the second data to be processed, resulting in two new categories, F7 and F8. The center data of F7 is P40, the center data of F8 is P45, the data included in F7 are P40-44, and the data included in F8 are P45-49.
[0197] S1304, The target model is used to extract feature values from the target center data to obtain the fifth feature value corresponding to the target center data;
[0198] Wherein, if the target model is the first model, the target center data is the sixth center data; or, if the target model is the second model, the target center data is the fifth center data.
[0199] After the electronic device classifies the first set of data using the first model and the second set of data using the second model, the feature values extracted by the different models cannot be directly compared. The feature value corresponding to the fifth center data is extracted using the first model, while the feature value corresponding to the sixth center data is extracted using the second model. Therefore, the electronic device can use the target model to extract feature values from the target center data to obtain the fifth feature value corresponding to the target center data.
[0200] The target model can be either the first model or the second model. If the target model is the first model, then the central data is the sixth central data, meaning that the second model is used to extract the feature values from the sixth central data, thus obtaining the fifth feature value corresponding to the sixth central data. If the target model is the second model, then the central data is the fifth central data, meaning that the second model is used to extract the feature values from the fifth central data, thus obtaining the fifth feature value corresponding to the fifth central data.
[0201] Following the example in step S1303 above, the electronic device can use the first model to extract the feature values corresponding to P40 and P45, and use the second model to extract the feature values corresponding to P30 and P35.
[0202] S1305, if there is a target feature value whose similarity to the fifth feature value meets the preset similarity, merge the data included in the category corresponding to the fifth feature value with the data included in the category corresponding to the target feature value;
[0203] Wherein, if the fifth feature value is a feature value obtained by extracting feature values from the sixth central data using the first model, the target feature value is the second feature value; or, if the fifth feature value is a feature value obtained by extracting feature values from the fifth central data using the second model, the target feature value is the fourth feature value.
[0204] If the similarity between the feature values corresponding to the center data of two categories meets a preset similarity, it means that the data included in these two categories can be merged. The electronic device can merge the data included in the category corresponding to the fifth feature value with the data included in the category corresponding to the target feature value, provided that the similarity between the target feature value and the target feature value meets the preset similarity.
[0205] The target feature value can be either the second or the fourth feature value. If the target feature value is the second feature value, then the fifth feature value can be the feature value obtained by extracting the feature value from the second central data using the first model. If the target feature value is the fourth feature value, then the fifth feature value can be the feature value obtained by extracting the feature value from the first central data using the second model.
[0206] Following the example in step S1304 above, if the first model determines that the similarity between the feature value corresponding to P40 extracted by the first model and the feature value corresponding to P30 meets the preset similarity, then the electronic device can merge the data included in F7 to which P40 belongs with the data included in F5 to which P30 belongs.
[0207] As can be seen, in this embodiment, since the feature values extracted by different models cannot be directly compared, the first model can be used to extract the feature value corresponding to the sixth center data, and the similarity between the feature value corresponding to the sixth center data extracted by the first model and the second feature value can be calculated. If the preset similarity is met, the data included in the two categories corresponding to the similarity can be merged. The electronic device (or data processing device) can also use the second model to extract the feature value corresponding to the fifth center data, and calculate the similarity between the feature value corresponding to the fifth center data extracted by the second model and the fourth feature value. If the preset similarity is met, the data included in the two categories corresponding to the similarity can be merged. In this way, the first and second models can be run on the same electronic device, and the first and second data to be processed can be processed by the two models respectively. The categories obtained by classifying using different models can be merged based on the similarity between the feature values corresponding to the target center data, which can improve the efficiency of data classification and ensure the accuracy of the data.
[0208] It should be noted that the method used to calculate the similarity between feature values in the second data classification method is consistent with that in the first data classification method. Furthermore, relational terms such as "first" and "second" in this application are merely used to distinguish processed data objects in different processing scenarios, and do not necessarily require or imply any such actual order between these processed data objects. For details not described in this embodiment, please refer to the descriptions in the foregoing data classification embodiments.
[0209] Corresponding to the first data classification method described above, this application also provides a data classification device. The first data classification device provided by this application is described below.
[0210] For details not described in the device embodiments provided in this application, please refer to the descriptions in the foregoing method embodiments.
[0211] like Figure 14 As shown, a data classification device includes:
[0212] The first data acquisition module 1401 is used to acquire data to be processed, wherein the data to be processed is unprocessed data acquired after the first model is replaced by the second model, the first model is used to classify the original data, and the second model is used to classify the data to be processed.
[0213] The feature extraction module 1402 is used to extract features from the data to be processed and the first central data using the second model, so as to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. The category of the original data has been determined by the first model. The first central data is the data used as the category center when classifying the original data using the first model. The first central data is determined from the original data based on the quality assessment results of the original data.
[0214] The data category determination module 1403 is used to determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data.
[0215] As can be seen, in the solution provided by the embodiments of this application, since the same model is used to extract feature values from the data for computational processing, and the central data can reflect the common features of data of the same category, the electronic device or data processing device can use the second model to extract feature values from the data to be processed and the first central data of the original data, and then determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, instead of using the second model to extract feature values from all the original data and the data to be processed and determining the category to which all the data belongs. In this way, the efficiency of the second model in determining the category to which the data to be processed belongs after introducing the second model and the data to be processed can be improved, while avoiding the waste of resources and time required by the first model to extract feature values and classify the original data.
[0216] As one embodiment of this application, the data category determination module 1403 described above may include:
[0217] The similarity calculation unit is used to calculate the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first center data, and to determine whether there is a similarity that reaches a first threshold in the first similarity.
[0218] The first central data category determination unit is used to determine, if it exists, the category to which the data to be processed belongs is the first category, wherein the first category is the category corresponding to the first central data whose similarity reaches the first threshold;
[0219] The second central data category determination unit is used to determine the category to which the data to be processed belongs as a new category if it does not exist.
[0220] As one embodiment of this application, the above-described apparatus may further include:
[0221] The data to be processed quality assessment module is used to assess the quality of the data to be processed according to a preset assessment method and obtain the quality assessment result.
[0222] The central data replacement module is used to replace the target data with the data to be processed if the quality assessment result of the data to be processed is higher than the quality assessment result of the target data. The quality assessment result of the target data is determined based on the preset assessment method, and the target data is the second central data of the category to which the data to be processed belongs.
[0223] As one embodiment of this application, the data to be processed includes images, and the data quality assessment module may include:
[0224] The data quality assessment unit is used to assess the quality of the data to be processed according to the following formula, and obtain the quality assessment result P:
[0225]
[0226] in, k Let α be the k-th attribute value of the data to be processed. k Let n be the weight value corresponding to the k-th attribute value, where n is a positive integer.
[0227] As one embodiment of this application, the above-described apparatus may further include:
[0228] The deletion operation acquisition module is used to acquire data deletion operations issued by users;
[0229] The central data deletion module is used to delete the third central data indicated by the data deletion operation if the data indicated by the data deletion operation is third central data.
[0230] The quality assessment module is used to assess the quality of the remaining data according to the preset assessment method and obtain the quality assessment result, wherein the remaining data is other data besides the third center data included in the category to which the third center data belongs;
[0231] The first center data determination module is used to determine new center data of the category to which the remaining data belongs from the remaining data based on the quality assessment results corresponding to each remaining data.
[0232] As one embodiment of this application, the above-described apparatus may further include:
[0233] The category merging module is used to obtain the category merging operation issued by the user and merge the data included in the category indicated by the category merging operation;
[0234] The second center data determination module is used to take the fourth center data under the category indicated by the merge category operation as the center data under the category obtained after data merging.
[0235] As one embodiment of this application, the above-described apparatus may further include:
[0236] The original data feature value extraction module is used to extract feature values from the first data in the original data that meets the error condition using the second model, thereby obtaining the feature values corresponding to the first data. The error condition is that the second similarity is less than the sum of the second threshold corresponding to the first model and the precision difference, and greater than the second threshold corresponding to the first model. The second similarity is the similarity between the feature value corresponding to the original data and the feature value of the first center data of its category. The precision difference is the difference between the precision of the second model and the precision of the first model. The second threshold is the similarity threshold used when classifying the original data using the first model.
[0237] The original data category determination module is used to determine the category to which the first data belongs based on the feature value corresponding to the first data and the feature value corresponding to the first central data.
[0238] Corresponding to the second data classification method described above, this application also provides a data classification device. The second data classification device provided in this application will be described below.
[0239] like Figure 15 As shown, a data classification device can be applied to a data processing device, which includes a first processing unit and a second processing unit. The first processing unit runs a first model, and the second processing unit runs a second model. The device includes:
[0240] The second data acquisition module 1501 is used to acquire the first data to be processed and the second data to be processed.
[0241] The first category determination module 1502 is used by the first processing unit to extract feature values from the first data to be processed using the first model to obtain a first feature value, and to determine the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data, wherein the fifth center data is determined from the first data to be processed based on the quality assessment result of the first data to be processed;
[0242] The second category determination module 1503 is used by the second processing unit to extract feature values from the second data to be processed using the second model to obtain a third feature value, and to determine the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data, wherein the sixth center data is determined from the second data to be processed based on the quality assessment results of the second data to be processed;
[0243] The central data feature value extraction module 1504 is used to extract feature values from the target central data using the target model to obtain the fifth feature value corresponding to the target central data. If the target model is the first model, the target central data is the sixth central data, or if the target model is the second model, the target central data is the fifth central data.
[0244] The data merging module 1505 is used to merge the data included in the category corresponding to the fifth feature value with the data included in the category corresponding to the target feature value if there is a target feature value whose similarity with the fifth feature value meets a preset similarity. If the fifth feature value is a feature value obtained by extracting feature values from the sixth center data using the first model, the target feature value is the second feature value; or, if the fifth feature value is a feature value obtained by extracting feature values from the fifth center data using the second model, the target feature value is the fourth feature value.
[0245] As can be seen, in this embodiment, since the feature values extracted by different models cannot be directly compared, the first model can be used to extract the feature value corresponding to the sixth central data, and the similarity between the feature value corresponding to the sixth central data extracted by the first model and the second feature value can be calculated. If the preset similarity is met, the data included in the two categories corresponding to the similarity can be merged. The electronic device or data processing device can also use the second model to extract the feature value corresponding to the fifth central data, and calculate the similarity between the feature value corresponding to the fifth central data extracted by the second model and the fourth feature value. If the preset similarity is met, the data included in the two categories corresponding to the similarity can be merged. In this way, the first and second models can be run on the same electronic device, and the first and second data to be processed can be processed by the two models respectively. The categories obtained by classifying using different models can be merged based on the similarity between the feature values corresponding to the central data, which can improve the efficiency of data classification and ensure the accuracy of the data.
[0246] This application also provides an electronic device (or data processing device), such as... Figure 16 As shown, it includes:
[0247] Memory 1601 is used to store computer programs;
[0248] When the processor 1602 executes the program stored in the memory 1601, it implements the data classification method steps described in any of the above embodiments.
[0249] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 1602, the communication interface, and the memory 1601 communicating with each other via the communication bus.
[0250] As can be seen, in the solution provided by this application embodiment, the electronic device can acquire data to be processed, wherein the data to be processed is unprocessed data acquired after the first model is replaced by the second model; the second model is used to extract feature values from the data to be processed and the central data to obtain feature values corresponding to the data to be processed and feature values corresponding to the central data, wherein the central data is the category center data used when classifying the original data using the first model; based on the feature values corresponding to the data to be processed and the feature values corresponding to the central data, the category to which the data to be processed belongs is determined. In this scheme, since the same model is used to extract feature values from the data for computational processing, and the central data can represent the features of the data included in the category corresponding to the central data, the electronic device can use the second model to extract feature values from the data to be processed and the central data. Then, based on the feature values corresponding to the data to be processed and the central data, the category to which the data to be processed belongs can be determined. Instead, it is not necessary to use the second model to extract feature values from all the original data and the data to be processed and determine the category to which all the data belongs. In this way, the efficiency of the second model in determining the category to which the data to be processed belongs after introducing the second model and the data to be processed can be improved, while avoiding the waste of resources and time required by the first model to extract feature values and classify the original data.
[0251] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0252] The communication interface is used for communication between the aforementioned electronic devices and other electronic devices.
[0253] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0254] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be 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, or discrete hardware components.
[0255] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the first data classification methods or the second data classification methods described above.
[0256] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the first data classification methods or the second data classification methods described above.
[0257] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage electronic device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.
[0258] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or electronic device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or electronic device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or electronic device that includes said element.
[0259] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0260] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A method of data classification, characterized by, The method includes: Obtain data to be processed, wherein the data to be processed is unprocessed data obtained after the first model is replaced by the second model, the first model is used to classify the original data, and the second model is used to classify the data to be processed; the unprocessed data and the original data are images, or the unprocessed data and the original data are audio. The second model is used to extract feature values from the data to be processed and the first central data to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. The category of the original data has been determined by the first model. The first central data is the data used as the category center when the original data is classified by the first model. The first central data is determined from the original data based on the quality assessment results of the original data. Based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data, the category to which the data to be processed belongs is determined.
2. The method of claim 1, wherein, The step of determining the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data includes: Calculate the first similarity between the feature value corresponding to the data to be processed and the feature value corresponding to the first center data, and determine whether there is a similarity that reaches the first threshold in the first similarity; If it exists, determine the category to which the data to be processed belongs as the first category, wherein the first category is the category to which the first center data corresponding to the similarity reaching the first threshold belongs; or, If it does not exist, determine that the category to which the data to be processed belongs is a new category.
3. The method of claim 2, wherein, After the step of determining that the data to be processed belongs to the first category, the method further includes: The data to be processed is evaluated according to a preset evaluation method to obtain the quality evaluation result. If the quality assessment result of the data to be processed is higher than the quality assessment result of the target data, the target data is replaced with the data to be processed. The quality assessment result of the target data is determined based on the preset assessment method, and the target data is the second center data of the category to which the data to be processed belongs.
4. The method according to claim 3, characterized in that, The data to be processed includes images; The step of performing a quality assessment on the data to be processed according to a preset assessment method to obtain a quality assessment result includes: The quality assessment result P is obtained by performing a quality assessment on the data to be processed according to the following formula: ; in, For the k-th attribute value of the data to be processed, Let n be the weight value corresponding to the k-th attribute value, where n is a positive integer.
5. The method according to claim 3, characterized in that, The method further includes: Retrieve data deletion requests initiated by users; If the data deleted by the data deletion operation is third-center data, delete the third-center data indicated by the data deletion operation; The remaining data is evaluated for quality according to the preset evaluation method to obtain the quality evaluation result, wherein the remaining data is other data besides the third center data included in the category to which the third center data belongs; Based on the quality assessment results corresponding to each remaining data point, new center data of the category to which the remaining data belongs is determined from the remaining data.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Obtain the user's merge category operation and merge the data included in the category indicated by the merge category operation; The fourth center data under the category indicated by the merge category operation is used as the center data under the category obtained after data merging.
7. The method according to any one of claims 1-5, characterized in that, The method further includes: For the first data in the original data that meets the error condition, the second model is used to extract feature values from the first data to obtain the feature values corresponding to the first data. The error condition is that the second similarity is less than the sum of the second threshold corresponding to the first model and the precision difference, and greater than the second threshold corresponding to the first model. The second similarity is the similarity between the feature values corresponding to the original data and the feature values of the first center data of its category. The precision difference is the difference between the precision of the second model and the precision of the first model. The second threshold is the similarity threshold used when classifying the original data using the first model. Based on the feature values corresponding to the first data and the feature values corresponding to the first central data, the category to which the first data belongs is determined.
8. A data classification method, characterized in that, The method is applied to a data processing device, the data processing device including a first processing unit and a second processing unit, the first processing unit running a first model, and the second processing unit running a second model, the method comprising: Acquire a first data to be processed and a second data to be processed; the first data to be processed and the second data to be processed are images, or the first data to be processed and the second data to be processed are audio. The first processing unit uses the first model to extract feature values from the first data to be processed, obtains a first feature value, and determines the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data, wherein the fifth center data is determined from the first data to be processed based on the quality assessment result of the first data to be processed; The second processing unit uses the second model to extract feature values from the second data to be processed, obtains a third feature value, and determines the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data. The sixth center data is determined from the second data to be processed based on the quality assessment results of the second data to be processed. The target model is used to extract feature values from the target center data to obtain the fifth feature value corresponding to the target center data. If the target model is the first model, the target center data is the sixth center data; or, if the target model is the second model, the target center data is the fifth center data. If there exists a target feature value whose similarity to the fifth feature value meets a preset similarity, the data included in the category corresponding to the fifth feature value is merged with the data included in the category corresponding to the target feature value. Wherein, if the fifth feature value is a feature value obtained by extracting feature values from the sixth central data using the first model, the target feature value is the second feature value; or, if the fifth feature value is a feature value obtained by extracting feature values from the fifth central data using the second model, the target feature value is the fourth feature value.
9. A data classification device, characterized in that, The device includes: A first data acquisition module is used to acquire data to be processed, wherein the data to be processed is unprocessed data acquired after the first model is replaced by the second model, the first model is used to classify the original data, and the second model is used to classify the data to be processed; the unprocessed data and the original data are images, or the unprocessed data and the original data are audio. The feature extraction module is used to extract features from the data to be processed and the first central data using the second model, so as to obtain the feature values corresponding to the data to be processed and the feature values corresponding to the first central data. The category of the original data has been determined by the first model. The first central data is the data used as the category center when classifying the original data using the first model. The first central data is determined from the original data based on the quality assessment results of the original data. The data category determination module is used to determine the category to which the data to be processed belongs based on the feature values corresponding to the data to be processed and the feature values corresponding to the first central data.
10. A data classification device, characterized in that, An apparatus for use in data processing equipment, the data processing equipment comprising a first processing unit and a second processing unit, the first processing unit running a first model and the second processing unit running a second model, the apparatus comprising: The second data acquisition module is used to acquire the first data to be processed and the second data to be processed; the first data to be processed and the second data to be processed are images, or the first data to be processed and the second data to be processed are audio. The first category determination module is used by the first processing unit to extract feature values from the first data to be processed using the first model to obtain a first feature value, and to determine the first category to which the first data to be processed belongs based on the first feature value and the second feature value corresponding to the fifth center data, wherein the fifth center data is determined from the first data to be processed based on the quality assessment result of the first data to be processed; The second category determination module is used by the second processing unit to extract feature values from the second data to be processed using the second model to obtain a third feature value, and to determine the second category to which the second data to be processed belongs based on the third feature value and the fourth feature value corresponding to the sixth center data, wherein the sixth center data is determined from the second data to be processed based on the quality assessment results of the second data to be processed; The central data feature value extraction module is used to extract feature values from the target central data using the target model to obtain the fifth feature value corresponding to the target central data. If the target model is the first model, the target central data is the sixth central data, or if the target model is the second model, the target central data is the fifth central data. The data merging module is used to merge the data included in the category corresponding to the fifth feature value with the data included in the category corresponding to the target feature value if there is a target feature value whose similarity with the fifth feature value meets a preset similarity. Specifically, if the fifth feature value is a feature value obtained by extracting feature values from the sixth center data using the first model, the target feature value is the second feature value; or, if the fifth feature value is a feature value obtained by extracting feature values from the fifth center data using the second model, the target feature value is the fourth feature value.
11. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-7 or 8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-7 or 8.
Citation Information
Patent Citations
Image recognition result evaluation method and device, electronic equipment and storage medium
CN113033587A
Class identification method, electronic equipment and storage medium
CN115359259A