Artificial intelligence-based data distillation method and related device
By randomly sampling the initial dataset, adding noisy data to train the denoising model, and calculating the difference, the problem of low data distillation efficiency in existing technologies is solved, achieving efficient data compression and quality improvement, especially in medical data processing.
Patent Information
- Application Number
- CN202310460062.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-04-20
AI Technical Summary
Existing data distillation methods are computationally intensive and inefficient in machine learning or deep learning models, making it difficult to balance data quality and efficiency.
By randomly sampling the initial dataset, adding noisy data to train the denoising model, calculating the difference between the predicted data and the initial data, and selecting the initial data for data distillation in order of increasing difference.
It improves the efficiency of data distillation, reduces data volume, and enhances data quality, especially in the medical field where it can effectively process medical data.
Smart Images

Figure CN116503608B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence and digital medical technology, and in particular to a data distillation method and device based on artificial intelligence, an electronic device and a storage medium. BACKGROUND
[0002] With the development of artificial intelligence technology, the volume of data generated in production and life is also increasingly large. For example, in the medical field, a large number of medical images are usually collected in the consultation stage to assist doctors in diagnosis and treatment, so as to improve the efficiency of doctor diagnosis; at present, a large number of medical related texts are collected to construct a medical knowledge graph, so as to provide a convenient medical consultation way for patients. However, the increasingly large data volume usually has a negative impact on storage and data quality. In order to compress the data volume and improve the data quality, data distillation related technology has received more and more widespread attention. The data distillation aims to use machine learning or deep learning model to simplify the large volume of collected data, and extract high quality data, so as to balance the data quality and reduce the data volume.
[0003] At present, the existing data distillation method usually distills the machine learning or deep learning model, and the target is to distill the knowledge from a relatively complex model to a relatively simple model. This method usually needs a large amount of calculation and computer memory occupation in the implementation process, and thus leads to low efficiency of data distillation, so it is necessary to realize a data distillation method with high quality and high efficiency. SUMMARY
[0004] In view of the above, it is necessary to provide a data distillation method and related equipment based on artificial intelligence to solve the technical problem of how to improve the efficiency of data distillation, wherein the related equipment includes a data distillation device, an electronic device and a storage medium based on artificial intelligence.
[0005] The embodiment of the present application provides a data distillation method based on artificial intelligence, which comprises:
[0006] Randomly sampling an initial data set to obtain a plurality of original data;
[0007] For each original data, adding noise data to the original data for multiple times to obtain interference data corresponding to each original data;
[0008] Training a denoising model based on the interference data;
[0009] Respectively inputting each initial data in the initial data set into the denoising model to obtain predicted data corresponding to each initial data;
[0010] Calculate a difference between the predicted data and the initial data, and select a plurality of the initial data in an order from small to large according to the difference to complete data distillation.
[0011] In some embodiments, the initial data set is used to store a plurality of initial data, and the initial data set is randomly sampled to obtain the original data, specifically including:
[0012] According to the number of initial data in the initial data set, a probability of being selected for each initial data is set;
[0013] Randomly sample the initial data based on the probability of being selected for each initial data, and obtain initial data equal to a preset sampling number as the original data.
[0014] In some embodiments, for each of the original data, noise data is added to the original data multiple times to obtain interference data corresponding to each of the original data, specifically including:
[0015] For each of the original data, the iteration number corresponding to the original data is set according to a preset upper limit of iteration;
[0016] According to the iteration number, a preset noise weight and a preset initial noise data, noise data added at each iteration is calculated;
[0017] According to the original data and the noise data added at each iteration, interference data corresponding to the original data is calculated.
[0018] In some embodiments, the denoising model is trained based on the interference data, specifically including:
[0019] For each of the interference data, the interference data and the iteration number are used as sample data, the noise data added at each iteration is used as label data, and the sample data and the label data are combined as training data;
[0020] An initial denoising model is constructed, the initial denoising model is trained using the training data, and a denoising model is obtained.
[0021] In some embodiments, the initial denoising model is trained using the training data to obtain a denoising model, specifically including:
[0022] A, the interference data in the sample data is used as input data, and a first count value is initialized to 0;
[0023] B, the input data is input into the initial denoising model to obtain predicted noise corresponding to the input data;
[0024] C, calculating a loss value of the initial denoising model according to the predicted noise and the label data, and updating the initial denoising model by using a gradient descent method until the loss value of the initial denoising model no longer changes, stopping the updating to obtain an updated denoising model, and increasing the first count value by 1;
[0025] D, if the first count value is less than an iteration number in the sample data, taking a difference value between the noise data and the predicted noise as input data, and taking the updated denoising model as an initial denoising model, repeating steps B and C, and if the first count value is equal to the iteration number, taking the updated denoising model as a denoising model.
[0026] In some embodiments, the separately inputting each initial data in the initial data set into the denoising model to obtain predicted data corresponding to each initial data specifically comprises:
[0027] A, taking the initial data as input data, and initializing a second count value as 0;
[0028] B, inputting the input data into the denoising model to obtain noise data corresponding to the input data;
[0029] C, taking a difference value between the input data and the noise data as updated input data, and increasing the second count value by 1;
[0030] D, if the second count value is less than a preset termination threshold, taking the updated input data as input data, and repeating steps B and C, and if the second count value is equal to the preset termination threshold, taking the updated input data as predicted data corresponding to the initial data.
[0031] In some embodiments, the calculating a difference degree between the predicted data and the initial data, and selecting a plurality of initial data in an order from small to large according to the difference degree to complete data distillation specifically comprises:
[0032] For each initial data, calculating a difference degree between the initial data and the predicted data according to a preset difference degree measurement algorithm;
[0033] Selecting initial data in an order from small to large according to a preset knowledge distillation ratio as distillation data.
[0034] Embodiments of the present application also provide a data distillation device based on artificial intelligence, the device comprising:
[0035] A random sampling unit configured to randomly sample an initial data set to obtain a plurality of original data;
[0036] a noise adding unit, configured to add noise data to each of the original data multiple times to obtain interference data corresponding to each of the original data;
[0037] a training unit, configured to train a denoising model based on the interference data;
[0038] a prediction unit, configured to input each of the initial data in the initial data set into the denoising model to obtain prediction data corresponding to each of the initial data;
[0039] a data distillation unit, configured to calculate a difference degree between the prediction data and the initial data, and select multiple initial data in an order from small to large of the difference degree to complete data distillation.
[0040] Embodiments of the present application also provide an electronic device, which comprises:
[0041] a memory, configured to store computer readable instructions; and
[0042] a processor, configured to execute the computer readable instructions stored in the memory to implement the data distillation method based on artificial intelligence.
[0043] Embodiments of the present application also provide a computer readable storage medium, which stores computer readable instructions, and the computer readable instructions are executed by a processor in an electronic device to implement the data distillation method based on artificial intelligence.
[0044] The data distillation method based on artificial intelligence described above obtains multiple original data by randomly sampling an initial data set; adds noise data to each of the original data multiple times to obtain interference data corresponding to each of the original data, and trains a denoising model based on the interference data; then uses the denoising model to perform denoising processing on the initial data to obtain prediction data corresponding to each of the initial data; finally, calculates a difference degree between the prediction data and the initial data, and selects multiple initial data in an order from small to large of the difference degree to complete data distillation. This method can be applied to the field of digital medicine, and can perform data distillation on medical data, thereby compressing the volume of medical data and improving the quality of medical data. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 is a flowchart of a preferred embodiment of a data distillation method based on artificial intelligence related to the present application.
[0046] Figure 2 is a functional module diagram of a preferred embodiment of a data distillation device based on artificial intelligence related to the present application.
[0047] Figure 3is a structural schematic diagram of an electronic device of a preferred embodiment of an artificial intelligence-based data distillation method involved in the present application. DETAILED DESCRIPTION
[0048] In order to enable a more clearly understanding of the purpose, features and advantages of the present application, the present application is described in detail below in combination with the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict. In the following description, a large number of specific details are set forth in order to facilitate a full understanding of the present application, and the described embodiments are only a part of the embodiments of the present application, but not all the embodiments.
[0049] In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments of the present application, and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0051] The embodiments of the present application provide an artificial intelligence-based data distillation method, which can be applied to one or more electronic devices. The electronic device is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions. The hardware thereof includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0052] The electronic device can be any electronic product that can interact with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive Internet Protocol Television (IPTV), a smart wearable device, etc.
[0053] The electronic device can also include a network device and / or a user device. The network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.
[0054] The network in which the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0055] As shown in Figure 1 The flowchart of the preferred embodiment of the data distillation method based on artificial intelligence of the present application is shown in FIG. 1. The order of the steps in the flowchart can be changed according to different needs, and some steps can be omitted.
[0056] S10, randomly sampling the initial data set to obtain a plurality of original data.
[0057] In an optional embodiment, the initial data set is used to store a plurality of initial data, and the random sampling of the initial data set to obtain original data specifically includes:
[0058] According to the number of initial data in the initial data set, the probability of each initial data being selected is set;
[0059] Based on the probability of each initial data being selected, the initial data is randomly sampled to obtain initial data equal to the preset sampling number as original data.
[0060] In this optional embodiment, the initial data set is used to store a plurality of initial data, and the initial data can be medical knowledge graphs, medical images, etc. pre-collected in the medical field, or user portraits, user risk data, etc. in the financial field. The present application does not limit the category of the initial data.
[0061] In this optional embodiment, in order to improve the training speed of the denoising model, a small number of initial data needs to be selected from a large number of initial data for subsequent denoising model training tasks. In order to ensure that the probability of each initial data being selected is the same, the ratio between the natural number 1 and the number of initial data can be used as the probability of each initial data being selected.
[0062] For example, when there are 50,000 initial data in the initial data set, the probability of each initial data being selected is
[0063] In the optional embodiment, the initial data equal to the preset sampling number can be selected from the initial data set by random sampling to serve as the original data for training the denoising model. For example, when the preset sampling number is 2000, 2000 initial data can be randomly selected from the initial data set by random sampling according to the probability to serve as the original data.
[0064] In this way, the original data collected from the initial data set by random sampling can provide data support for subsequent denoising model training and improve the training speed of the denoising model.
[0065] S11, for each original data, noise data is added to the original data multiple times to obtain interference data corresponding to each original data.
[0066] To simulate the interference data with noise formed by the original data disturbed by noise, noise data needs to be added to the original data multiple times to obtain interference data corresponding to each original data. The interference data is used to represent the data with noise formed by the original data disturbed by noise. For example, when the original data is a medical image, the interference data can be a medical image with noise and unclear generated by a medical device disturbed by electromagnetic interference during the generation of the medical image.
[0067] In an optional embodiment, the original data is added to the original data multiple times to obtain interference data corresponding to each original data, specifically comprising:
[0068] For each original data, the iteration number corresponding to the original data is set according to a preset upper limit of iteration;
[0069] The noise data added at each iteration is calculated according to the iteration number, a preset noise weight, and a preset initial noise data;
[0070] The interference data corresponding to the original data is calculated according to the original data and the noise data added at each iteration.
[0071] In the optional embodiment, the iteration number sequence can be set according to the preset upper limit of iteration. For example, when the preset upper limit of iteration is 200, the iteration number sequence is all natural numbers between 1 and 200.
[0072] For each of the original data, a value from the iteration number sequence is selected as the iteration number corresponding to the original data. For example, when the preset upper limit of iteration is 200, the iteration number sequence is [1, 200], and for a certain original data, a value from the iteration number sequence is selected as the iteration number corresponding to the original data. For example, for a certain original data, if the iteration number randomly selected is 4, it means that the original data needs to be iterated 4 times, and Gaussian noise data conforming to the standard normal distribution is added to the original data each time to obtain the interference data corresponding to the original data.
[0073] In the optional embodiment, before the original data is iterated to add noise data, an initial noise weight and a weight enhancement function need to be set first. The weight enhancement function is a monotonically increasing function for controlling the increase of the noise data with the increase of the iteration number. The weight enhancement function can be a linear function or a quadratic function, etc., which is not limited in the present application.
[0074] For example, when the weight enhancement function is a linear function, the noise weight is initialized to β = 0.0001, the upper limit of the noise weight is preset to 0.002, the iteration number is 4, and the weight enhancement function can satisfy the following relationship:
[0075] β = at + b
[0076] Wherein, β represents the noise weight; t represents the iteration number; a and b represent preset harmonic constants, preferably, in the present scheme, the value of a can be 0.00063, and the value of b can be -0.00053.
[0077] In the optional embodiment, the interference data corresponding to the original data after the tthiteration can be calculated according to the original data, the noise weight and the preset Gaussian noise. t The calculation method of the interference data satisfies the following relationship:
[0078]
[0079] Wherein, z is Gaussian noise conforming to the normal distribution; represents the cumulative multiplication of the noise weight from the first iteration to the tthiteration, that is, x0represents the original data; x t represents the interference data generated after adding noise data z to the original data x0after t iterations.
[0080] For example, when the iteration number corresponding to a certain original data is 4, the interference data corresponding to the original data is:
[0081] For example, when the iteration number corresponding to a certain original data is 4, the interference data corresponding to the original data is:
[0082] In this way, noise data is added to the original data multiple times to obtain interference data corresponding to the original data, which can simulate poor quality data generated by the original data when it is disturbed, thereby providing data support for subsequent training of a denoising model.
[0083] S12, training a denoising model based on the interference data.
[0084] In an optional embodiment, the training of the denoising model based on the interference data specifically includes:
[0085] For each of the interference data, the interference data and the number of iterations are taken as sample data, the noise data added at each iteration is taken as label data, and the sample data and the label data are combined as training data.
[0086] An initial denoising model is constructed, and the initial denoising model is trained using the training data to obtain a denoising model.
[0087] In the optional embodiment, for each of the interference data, the noise data added at each iteration can be taken as label data corresponding to each iteration, the interference data obtained after the forward process is iterated and the number of iterations are taken as sample data, and the label data and the sample data are combined as training data.
[0088] For example, for a certain interference data, if the corresponding number of iterations is 4 times, the noise added in the 4 iterations can be taken as label data, and the label data is:
[0089] The sample data corresponding to the interference data is in the form of [x4, 4], where x4 represents that the interference data is obtained by adding noise 4 times, and 4 represents the number of iterations of adding noise.
[0090] In the optional embodiment, an existing neural network model such as Unet or ResNet can be taken as an initial denoising model, and the present scheme does not limit the type of the initial denoising model. The input of the initial denoising model is the interference data, and the output of the initial denoising model is the noise data corresponding to the interference data.
[0091] In an optional embodiment, the training of the initial denoising model using the training data to obtain a denoising model specifically includes:
[0092] A, the interference data in the sample data is taken as input data, and a first count value is initialized to 0;
[0093] B, inputting the input data into the initial denoising model to obtain predicted noise corresponding to the input data;
[0094] C, calculating a loss value of the initial denoising model according to the predicted noise and the label data, and updating the initial denoising model by using a gradient descent method until the loss value of the initial denoising model no longer changes, then stopping updating to obtain an updated denoising model, and increasing the first count value by 1;
[0095] The loss value can be calculated by using an existing loss value calculation method such as an Euclidean distance algorithm, a cosine distance algorithm, or a Hamming distance algorithm, and the application does not limit the loss value calculation method.
[0096] D, if the first count value is less than an iteration number in the sample data, taking a difference value between the noise data and the predicted noise as input data, and taking the updated denoising model as the initial denoising model, repeating steps B and C, and if the first count value is equal to the iteration number, taking the updated denoising model as a denoising model.
[0097] In this way, training data is constructed based on noise data and original data, and the initial denoising model is iteratively trained multiple times by using the training data to obtain a denoising model, thereby providing a model basis for subsequent data distillation.
[0098] S13, inputting each initial data in the initial data set into the denoising model respectively to obtain predicted data corresponding to each initial data.
[0099] In an optional embodiment, the step of inputting each initial data in the initial data set into the denoising model respectively to obtain predicted data corresponding to each initial data specifically includes:
[0100] A, taking the initial data as input data, and initializing a second count value as 0.
[0101] B, inputting the input data into the denoising model to obtain noise data corresponding to the input data.
[0102] In the optional embodiment, each original data can be taken as input data respectively, and the input data can be input into the denoising model to obtain noise data corresponding to the input data. The noise data is used to represent noise contained in the input data. For example, when the input data is a medical image, the noise data refers to image noise generated by interference of the medical image; when the input data is a medical knowledge graph, the noise data refers to noise data in the medical knowledge graph.
[0103] C, taking the difference between the input data and the noise data as updated input data, and increasing the second count value by 1.
[0104] In the optional embodiment, the difference between the input data and the noise data can be taken as the updated input data, that is, the noise data in the input data is removed to obtain the data after removing the noise as the updated input data.
[0105] For example, when the input data is a medical image, the noise data is used to represent the noise in the medical image, and the updated input data represents the medical image after removing the noise.
[0106] D, if the second count value is less than a preset termination threshold, taking the updated input data as the input data and repeating steps B and C, and if the second count value is equal to the preset termination threshold, taking the updated input data as the predicted data corresponding to the initial data.
[0107] The preset termination threshold can be any integer greater than 0. Preferably, in the present scheme, the preset termination threshold can be 2000.
[0108] In this way, each initial data is iteratively denoised to obtain the predicted data corresponding to each initial data, which provides data support for subsequent evaluation of the quality of the initial data.
[0109] S14, calculating the difference between the predicted data and the initial data, and selecting a plurality of initial data in order of small to large difference to complete data distillation.
[0110] In an optional embodiment, the calculation of the difference between the predicted data and the initial data, and the selection of a plurality of initial data in order of small to large difference to complete data distillation, specifically includes:
[0111] For each initial data, the difference between the initial data and the predicted data is calculated according to a preset difference metric algorithm;
[0112] According to a preset knowledge distillation ratio, the initial data is selected in order of small to large difference to be distilled data.
[0113] In the optional embodiment, the type of the preset difference measurement algorithm depends on the type of the initial data. For example, when the initial data is a medical image, the prediction data is image data obtained after removing noise from the medical image, and the preset difference measurement algorithm can be an existing image difference measurement algorithm such as FID algorithm or KID algorithm. When the initial data is serialized data in a medical knowledge graph, the prediction data is serialized data after removing noise, and the preset difference measurement algorithm can be an existing sequence difference measurement algorithm such as Euclidean distance algorithm or Hamming distance algorithm.
[0114] In the optional embodiment, the smaller the difference degree is, the smaller the difference between the initial data and the prediction data is, and the higher the quality of the initial data is. Therefore, the initial data can be selected in the order of the difference degree from small to large according to the preset knowledge distillation ratio, to serve as the distillation data. For example, when the knowledge distillation ratio is 20%, 20% of the initial data in the initial data set is selected as the distillation data. The initial data can be sorted in the order of the difference degree from small to large, and the initial data in the first 20% can be selected as the distillation data. The distillation data is used to represent the initial data with high quality and less noise in the initial data set.
[0115] In this way, the distillation data is selected from the initial data set according to the difference degree between the prediction data and the initial data, so that the data with less noise in the initial data set can be retained, thereby reducing the data volume and improving the data quality.
[0116] The above-mentioned data distillation method based on artificial intelligence obtains a plurality of initial data by randomly sampling the initial data set. Noise data is added to each initial data multiple times to obtain interference data corresponding to each initial data, and a denoising model is trained based on the interference data. Then, the denoising model is used to denoise the initial data to obtain prediction data corresponding to each initial data. Finally, the difference degree between the prediction data and the initial data is calculated, and a plurality of initial data is selected in the order of the difference degree from small to large to complete data distillation. The method can be applied to the field of digital medicine, and can be used to distill medical data, thereby compressing the volume of medical data and improving the quality of medical data.
[0117] For example, Figure 2Fig. 1 is a functional module diagram of a preferred embodiment of the data distillation device based on artificial intelligence provided by the present application. The data distillation device based on artificial intelligence 11 comprises a random sampling unit 110, a noise adding unit 111, a training unit 112, a prediction unit 113, and a data distillation unit 114. The module / unit referred to in the present application refers to a series of computer program segments capable of being executed by the processor 13 and capable of completing a fixed function, which are stored in the memory 12. In the present embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0118] The random sampling unit 110 is configured to randomly sample an initial data set to obtain a plurality of original data.
[0119] The noise adding unit 111 is configured to add noise data to each original data multiple times to obtain interference data corresponding to each original data.
[0120] The training unit 112 is configured to train a denoising model based on the interference data.
[0121] The prediction unit 113 is configured to input each initial data in the initial data set into the denoising model to obtain prediction data corresponding to each initial data.
[0122] The data distillation unit 114 is configured to calculate a difference degree between the prediction data and the initial data, and select a plurality of initial data in order from small to large according to the difference degree to complete data distillation.
[0123] In an optional embodiment, the random sampling unit 110 is specifically configured to:
[0124] set a probability of being selected for each initial data according to the number of initial data in the initial data set;
[0125] randomly sample the initial data based on the probability of being selected for each initial data to obtain initial data equal to a preset sampling number as original data.
[0126] In an optional embodiment, the noise adding unit 111 is specifically configured to:
[0127] for each original data, set an iteration number corresponding to the original data according to a preset upper limit of iteration;
[0128] calculate noise data added at each iteration according to the iteration number, a preset noise weight, and a preset initial noise data;
[0129] The interference data corresponding to the original data is calculated according to the original data and the noise data added at each iteration.
[0130] In an optional embodiment, the training unit 112 is specifically configured to:
[0131] For each of the interference data, the interference data and the number of iterations are taken as sample data, the noise data added at each iteration is taken as label data, and the sample data and the label data are taken as training data in combination;
[0132] An initial denoising model is constructed, and the initial denoising model is trained by using the training data to obtain a denoising model.
[0133] In an optional embodiment, the training unit 112 trains the initial denoising model by using the training data to obtain a denoising model, and specifically includes:
[0134] A, the interference data in the sample data is taken as input data, and a first count value is initialized to 0;
[0135] B, the input data is input into the initial denoising model to obtain predicted noise corresponding to the input data;
[0136] C, a loss value of the initial denoising model is calculated according to the predicted noise and the label data, and the initial denoising model is updated by using a gradient descent method until the loss value of the initial denoising model no longer changes, the update is stopped to obtain an updated denoising model, and the first count value is increased by 1;
[0137] D, if the first count value is less than the number of iterations in the sample data, the difference between the noise data and the predicted noise is taken as input data, and the updated denoising model is taken as the initial denoising model, steps B and C are repeated, and if the first count value is equal to the number of iterations, the updated denoising model is taken as the denoising model.
[0138] In an optional embodiment, the prediction unit 113 is specifically configured to:
[0139] A, the initial data is taken as input data, and a second count value is initialized to 0;
[0140] B, the input data is input into the denoising model to obtain noise data corresponding to the input data;
[0141] C, the difference between the input data and the noise data is taken as updated input data, and the second count value is increased by 1;
[0142] D, if the second count value is less than a preset termination threshold, the updated input data is taken as input data, and steps B and C are repeatedly executed, if the second count value is equal to the preset termination threshold, the updated input data is taken as the prediction data corresponding to the initial data.
[0143] In an optional embodiment, the data distillation unit 114 is specifically configured to:
[0144] For each of the initial data, a difference degree between the initial data and the prediction data is calculated according to a preset difference degree measurement algorithm;
[0145] According to a preset knowledge distillation ratio, the initial data is selected in the order of difference degree from small to large as distillation data.
[0146] As Figure 3 shown is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device 1 includes a memory 12 and a processor 13. The memory 12 is configured to store computer readable instructions, and the processor 13 is configured to execute the computer readable instructions stored in the memory to implement the artificial intelligence-based data distillation method of any of the above embodiments.
[0147] In an optional embodiment, the electronic device 1 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as an artificial intelligence-based data distillation program.
[0148] Figure 3 Only the electronic device 1 with the memory 12 and the processor 13 is shown, and those skilled in the art can understand that, Figure 3 the structure shown does not constitute a limitation on the electronic device 1, and can include fewer or more components than shown, or combine certain components, or different component arrangements.
[0149] In combination Figure 1 , the memory 12 in the electronic device 1 stores a plurality of computer readable instructions to implement an artificial intelligence-based data distillation method, and the processor 13 can execute the plurality of instructions to implement:
[0150] randomly sampling an initial data set to obtain a plurality of original data;
[0151] for each of the original data, adding noise data to the original data multiple times to obtain interference data corresponding to each of the original data;
[0152] training a denoising model based on the interference data;
[0153] inputting each initial data in the initial data set into the denoising model to obtain prediction data corresponding to each of the initial data;
[0154] calculate a difference degree between the predicted data and the initial data, and select a plurality of the initial data in descending order of the difference degree to complete data distillation.
[0155] Specifically, the specific implementation method of the processor 13 to the above instructions can refer to Figure 1 The descriptions of related steps in corresponding embodiments are not repeated here.
[0156] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 can be a bus type structure or a star type structure. The electronic device 1 can also include more or less other hardware or software or different component arrangements, for example, the electronic device 1 can also include an input / output device, a network access device, etc.
[0157] It should be noted that the electronic device 1 is only an example. Other existing or future electronic products, such as those adaptable to the present application, should also be included in the protection scope of the present application and are hereby incorporated by reference.
[0158] The memory 12 includes at least one type of readable storage medium, which can be non-volatile or volatile. The readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 can be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1. The memory 12 can also be an external storage device of the electronic device 1 in other embodiments, for example, a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 12 can include both the internal storage unit and the external storage device of the electronic device 1. The memory 12 can be used to store application software and various data installed in the electronic device 1, such as the code of the data distillation program based on artificial intelligence, etc., and can also be used to temporarily store data that has been output or will be output.
[0159] The processor 13 may, in some embodiments, be composed of integrated circuits, for example, can be composed of a single packaged integrated circuit, or can be composed of multiple packaged integrated circuits of the same function or different functions, including one or more combinations of central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control core of the electronic device 1, and connects various components of the entire electronic device 1 through various interfaces and lines, executes or runs programs or modules stored in the memory 12 (such as executing artificial intelligence-based data distillation programs), and calls data stored in the memory 12 to execute various functions of the electronic device 1 and process data.
[0160] The processor 13 executes the operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application programs to implement the steps in the above various artificial intelligence-based data distillation method embodiments, such as Figure 1 The steps shown.
[0161] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units can be a series of computer-readable instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program can be divided into a random sampling unit 110, a noise adding unit 111, a training unit 112, a prediction unit 113, and a data distillation unit 114.
[0162] The integrated units implemented in the form of software function modules described above can be stored in a computer-readable storage medium. The software function modules described above are stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the artificial intelligence-based data distillation method described in each embodiment of the present application.
[0163] The integrated modules / units of the electronic device 1, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be instructed by a computer program to complete related hardware devices, and the computer program can be stored in a computer-readable storage medium. The computer program, when executed by a processor, can implement the steps of each method embodiment described above.
[0164] The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, and other memories, etc.
[0165] Further, the computer readable storage medium can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, at least one application required by a function, etc.; and the storage data area can store data created according to the use of the blockchain node, etc.
[0166] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one arrow is used in the figure, but it does not mean that there is only one bus or only one type of bus. The bus is arranged to realize the connection and communication between the memory 12, the at least one processor 13, etc. Figure 3
[0167] The embodiment of the present application also provides a computer readable storage medium (not shown in the figure), which stores computer readable instructions. The computer readable instructions are executed by a processor in an electronic device to realize the data distillation method based on artificial intelligence according to any one of the above embodiments.
[0168] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The plurality of units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words "first", "second", etc. are used to indicate names, not any specific order.
[0169] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. An artificial intelligence-based data distillation method, characterized in that, The method comprises: randomly sampling an initial data set to obtain a plurality of original data; adding noise data to each of the original data multiple times to obtain interference data corresponding to each of the original data; training a denoising model based on the interference data; inputting each of the initial data in the initial data set into the denoising model to obtain predicted data corresponding to each of the initial data; calculating the difference between the predicted data and the initial data, and selecting a plurality of initial data in order of the difference from small to large to complete data distillation. 2.The AI-based data distilling method of claim 1, wherein, The initial data set is used to store a plurality of initial data, and the initial data set is randomly sampled to obtain original data, specifically comprising: setting the probability of each initial data being selected according to the number of initial data in the initial data set; randomly sampling the initial data based on the probability of each initial data being selected to obtain initial data equal to a preset sampling number as original data. 3.The AI-based data distilling method of claim 1, wherein, The method comprises: for each of the original data, setting the number of iterations corresponding to the original data according to a preset upper limit of iterations; calculating the noise data added at each iteration according to the number of iterations, a preset noise weight and a preset initial noise data; calculating the interference data corresponding to the original data according to the original data and the noise data added at each iteration. 4.The AI-based data distilling method of claim 3, wherein, The method comprises: for each of the interference data, taking the interference data and the number of iterations as sample data, taking the noise data added at each iteration as label data, and taking the sample data and the label data as training data; constructing an initial denoising model, training the initial denoising model using the training data, and obtaining a denoising model. 5.The AI-based data distilling method of claim 4, wherein, The method comprises: A, taking the interference data in the sample data as input data and initializing a first count value to 0; B, inputting the input data into the initial denoising model to obtain predicted noise corresponding to the input data; C, calculating the loss value of the initial denoising model according to the predicted noise and the label data, and updating the initial denoising model using the gradient descent method until the loss value of the initial denoising model no longer changes, stopping updating to obtain an updated denoising model, and increasing the first count value by 1; D, if the first count value is less than the number of iterations in the sample data, taking the difference between the noise data and the predicted noise as input data, and taking the updated denoising model as the initial denoising model, repeating steps B and C, if the first count value is equal to the number of iterations, taking the updated denoising model as the denoising model. 6.The AI-based data distilling method of claim 1, wherein, The method comprises: A, inputting the initial data as input data and initializing a second count value as 0; B, inputting the input data into the denoising model to obtain noise data corresponding to the input data; C, taking the difference between the input data and the noise data as updated input data and increasing the second count value by 1; D, if the second count value is less than a preset termination threshold, taking the updated input data as input data and repeating steps B and C, and if the second count value is equal to the preset termination threshold, taking the updated input data as predicted data corresponding to the initial data. 7.The AI-based data distilling method of claim 1, wherein, The difference between the predicted data and the initial data is calculated, and a plurality of initial data is selected in order of decreasing difference to complete data distillation, specifically including: For each initial data, the difference between the initial data and the predicted data is calculated according to a preset difference metric algorithm; According to a preset knowledge distillation ratio, the initial data is selected in order of decreasing difference to be distilled data.
8. An artificial intelligence-based data distillation device, characterized by, The device includes: A random sampling unit for randomly sampling an initial data set to obtain a plurality of original data; A noise adding unit for adding noise data to each original data multiple times to obtain interference data corresponding to each original data; A training unit for training a denoising model based on the interference data; A prediction unit for inputting each initial data in the initial data set into the denoising model to obtain predicted data corresponding to each initial data; A data distillation unit for calculating the difference between the predicted data and the initial data, and selecting a plurality of initial data in order of decreasing difference to complete data distillation.
9. An electronic device, comprising: The electronic device includes: A memory storing computer readable instructions; and A processor executing the computer readable instructions stored in the memory to implement the artificial intelligence-based data distillation method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor in the electronic device to implement the artificial intelligence-based data distillation method of any one of claims 1 to 7.
Citation Information
Patent Citations
MCU fingerprint identification method based on knowledge distillation network
CN115376164A
CT image denoising method and apparatus, computer device, and medium
WO2022178995A1