Data processing method, data processing device, medium and electronic equipment
By dividing the training data set into subsets and implementing parallel loading and processing in machine learning model training, the problem of low loading efficiency of training data is solved, and the efficiency and timeliness of model training are improved.
Patent Information
- Application Number
- CN202310547753.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-15
- Publication Date
- 2024-11-15
AI Technical Summary
When training machine learning models, the training data loading and processing efficiency in distributed file systems is low, resulting in high cost of model training time and affecting efficiency.
By dividing the training dataset into multiple subsets, and when starting the training task of the machine learning model, each subset is loaded in turn, and after completing the loading of any subset, the model is trained using the subset, and at the same time, the unloaded Other subsets implement parallel processing of data loading and model training.
It reduces the loading pressure of training data, improves the timeliness and efficiency of model training, reduces the delay in data processing, and improves the efficiency of overall data processing and model training.
Smart Images

Figure CN118964970A_ABST
Abstract
Description
Background Art
[0002] Usually, a large amount of training data is needed when training a machine learning model, and the training data used for model training is often stored in a distributed file system. When the machine learning platform is training the model, it needs to load the training data from the file system first, and then perform data processing or model training. The data processing process is complex, and when the amount of data is large, it will greatly increase the time cost of data processing and affect the training efficiency of the machine learning model. Summary of the invention
[0003] The present disclosure provides a data processing method, a data processing device, a computer-readable storage medium and an electronic device, thereby improving the problem of poor data processing efficiency in the prior art when performing model training, at least to a certain extent.
[0004] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0005] According to a first aspect of the present disclosure, a data processing method is provided, comprising: in response to initiating a training task of a machine learning model, sequentially loading subsets of a training data set; after completing the loading of any subset, training the machine learning model using the any subset, so that the training of the machine learning model is performed simultaneously with the loading of one or more subsets not loaded in the training data set.
[0006] According to a second aspect of the present disclosure, there is provided a data processing device, comprising: a data loading module, for sequentially loading subsets of a training data set in response to initiating a training task for a machine learning model; and a model training module, for training the machine learning model using any subset after completing loading of any subset, so that training the machine learning model and loading of one or more subsets not loaded in the training data set are performed simultaneously.
[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data processing method of the first aspect and possible implementation methods thereof are implemented.
[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the data processing method of the first aspect and possible implementation thereof by executing the executable instructions.
[0009] The technical solution disclosed in this disclosure has the following beneficial effects:
[0010] In response to starting the training task of the machine learning model, each subset of the training data set is loaded in sequence; after completing the loading of any subset, the machine learning model is trained using any subset, so that the training of the machine learning model and the loading of one or more subsets that are not loaded in the training data set are performed simultaneously. On the one hand, this exemplary embodiment provides a new processing method for training data for training a machine learning model, which can be based on each subset of the training data set. When starting the training task of the machine learning model, any subset can be loaded in sequence, and the training process of the machine learning model can be started using the training data in the subset. Compared with the process of model training only after all training data are loaded, this exemplary embodiment reduces the loading pressure of training data and improves the timeliness and training efficiency of model training; on the other hand, in this exemplary embodiment, model training and subset loading can be performed simultaneously, and the loading process of the subset in the training data set does not affect the process of model training through the loaded subset, thereby further improving the efficiency of data processing and model training.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0013] Figure 1 A flow chart showing a data processing method in this exemplary embodiment;
[0014] Figure 2 A sub-flow chart showing a data processing method in this exemplary embodiment;
[0015] Figure 3 A schematic diagram showing the architecture of a data processing method in this exemplary embodiment;
[0016] Figure 4 A schematic diagram showing an architecture of another data processing method in this exemplary embodiment;
[0017] Figure 5 A schematic diagram showing the architecture of another data processing method in this exemplary embodiment;
[0018] Figure 6 A structural block diagram of a data processing device in this exemplary embodiment is shown;
[0019] Figure 7 A structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0020] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0021] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0022] In this exemplary embodiment, the executor of the data processing method may be a platform, server, or terminal for performing machine learning model training.
[0023] Combine the following Figure 1 This section describes the flow of the data processing method. Figure 1 As shown, the data processing method may include the following steps S110 to S120:
[0024] Step S110, in response to starting the training task of the machine learning model, loading each subset of the training data set in sequence.
[0025] The training process of a machine learning model such as a neural network can usually be performed on a training end, which can be a machine learning platform, a server, a host, or other terminals or devices. In this exemplary embodiment, when training a model, the training end can sequentially load each subset of the training data set to perform data preprocessing, as well as model training, testing, or verification, etc. by using the training data in each subset. Among them, the training data set refers to a data set including training data, which can be divided into one or more subsets, and the size of each subset can be the same or different. Subset division can be carried out in a variety of ways, for example, it can be divided according to the size of the training end cache, it can also be divided according to the size of the training end hard disk, and it can also be divided according to the batch parameters of the training data in the model training. In an exemplary embodiment, the above-mentioned training data can include multiple batches, each batch being a subset. When training a machine learning model, the training data can be divided into several batches (batches) for training respectively. In this exemplary embodiment, the data of each batch can be used as a subset to perform data loading, data preprocessing, or model training.
[0026] In this exemplary embodiment, the training data set and its subsets can be first stored in a preset system, such as a distributed file system. When the training task of the machine learning model needs to be started, the training end can obtain each subset from the distributed file system and load each subset of the training data in sequence; or the training data set is stored in a distributed file system. When the training task of the machine learning model needs to be started, the training data set is divided into one or more subsets and loaded in sequence; or, the training end can first obtain the training data set or each subset of the training data set, and store them locally on the training end. When the training task of the machine learning model is started, it triggers the loading of each subset of the training data set from the training end in sequence, etc.
[0027] In particular, the training end of the machine learning model can first obtain the training data set or each subset of the training data set from the training data storage end (such as a distributed file system) for storage, so that when loading each subset of the training data set, it can be directly obtained from the training end, saving data processing time and improving data processing efficiency. Among them, the training data set or the subset of the training data set can be stored in the memory of the training end, or it can be stored in the solid-state hard disk of the training end. It can be determined specifically according to the size of the data volume of the training data set or each subset. When the data volume is less than the first threshold, it can be stored in the memory. When the data volume is greater than the first threshold, it can be stored in the solid-state hard disk, etc. After the machine model training is completed, the training data stored in the training end can be released.
[0028] Step S120, after completing loading of any subset, use any subset to train the machine learning model, so that the training of the machine learning model and the loading of one or more subsets not loaded in the training data set are carried out simultaneously.
[0029] Furthermore, after loading the training data in any subset, the training end can perform the training task of the machine learning model through the training data in this subset, and at the same time, the training end can continue to load the training data in one or more subsets that are not loaded in the training data set. Based on this, compared with the existing technology that can only start model training after obtaining all the training data, this exemplary embodiment can ensure the immediacy of the machine learning model training trigger, reduce the time cost of loading training data in the training data set for a long time, and improve the training efficiency of the machine learning model.
[0030] The machine learning model is performed simultaneously with loading one or more subsets that are not loaded in the training data set, which can include the machine learning model using the training data in the previous subset to perform model training while performing the data loading process of the next subset, or performing the data loading process of the next two subsets, etc.
[0031] In summary, in this exemplary embodiment, in response to starting the training task of the machine learning model, each subset of the training data set is loaded in sequence; after completing the loading of any subset, the machine learning model is trained using any subset, so that the training of the machine learning model and the loading of one or more subsets that are not loaded in the training data set are carried out simultaneously. On the one hand, this exemplary embodiment provides a new processing method for training data for training a machine learning model, which can be based on each subset of the training data set. When starting the training task of the machine learning model, any subset is loaded in sequence, and the training process of the machine learning model is started using the training data in the subset. Compared with the process in which model training can only be performed after all training data are loaded, this exemplary embodiment reduces the loading pressure of training data and improves the timeliness and training efficiency of model training; on the other hand, in this exemplary embodiment, model training and subset loading can be carried out simultaneously, and the loading process of the subset in the training data set does not affect the process of model training through the loaded subset, thereby further improving the efficiency of data processing and model training.
[0032] In an exemplary embodiment, any subset is represented by the i-th subset; Figure 2 As shown, in the above step S120, using any subset to train the machine learning model so that the training of the machine learning model and loading of one or more subsets not loaded in the training data set are performed simultaneously may include the following steps:
[0033] Step S210, preprocessing the data of the i-th subset and loading the i+1-th subset at the same time;
[0034] Step S220, after completing loading the i+1th subset and completing data preprocessing of the i-th subset, input the i-th subset into the machine learning model for training, and at the same time perform data preprocessing on the i+1th subset, and load the i+2th subset or a subset after the i+2th subset.
[0035] This exemplary embodiment can perform data preprocessing on the i-th subset after loading it, so as to use the training data in the preprocessed i-th subset to perform the training process of the machine learning model. Among them, data preprocessing can include processing abnormal data, data cleaning, data classification, data encoding, data normalization or discretization, etc., which can be specifically determined according to the application scenario of model training. For example, in the fields of computer vision and audio and video, the process means of preprocessing data during model training may be different. Considering that data preprocessing may take a long time, this exemplary embodiment can execute the process of loading the training data in the i+1-th subset while performing data preprocessing on the i-th subset, so that data preprocessing and data loading processes can be performed simultaneously.
[0036] After completing the loading of the i+1th subset and preprocessing the data of the i-th subset, the i-th subset can be input into the machine learning model for training, and at the same time, the data of the i+1th subset is preprocessed, and at the same time, the i+2th subset or a subset after the i+2th subset is loaded. This exemplary embodiment transforms the time-series serial processing method of "data loading" + "data preprocessing" in the prior art into a parallel processing method of "data loading" + "data preprocessing" by dividing the training data set into multiple subsets, so as to speed up the process of machine model training and improve the model training speed.
[0037] In an exemplary embodiment, in the above step S120, using any subset to train the machine learning model, so that the training of the machine learning model and loading of one or more subsets not loaded in the training data set are performed simultaneously, may also include:
[0038] When the loading of the i+1th subset is completed but the data preprocessing of the ith subset is not completed, the data preprocessing of the ith subset continues, and the loading of the i+2th subset begins at the same time;
[0039] According to different application scenarios, the time required for data preprocessing may vary. In order to further speed up the data processing speed, in this exemplary embodiment, after completing the loading of the training data of the i+1th subset, if the data preprocessing work of the i-th subset is not completed, the data preprocessing of the i-th subset can be continued, and the i+2th subset can be loaded at the same time to avoid the problem that the data preprocessing time is long and affects the data loading process. That is, in this exemplary embodiment, the loading process of the subset can be unaffected by the data preprocessing process. Regardless of whether the data preprocessing of the i-th subset is completed, after completing the loading of the i+1th subset, the loading process of the i+2th subset can be further executed.
[0040] In an exemplary embodiment, the loading of each subset is performed by a data loading process, the data preprocessing of each subset is performed by a preprocessing process, and the input of each subset into a machine learning model for training is performed by a model training process; the data loading process, the preprocessing process, and the model training process are three parallel processes.
[0041] This exemplary embodiment can transform the traditional serial processes of data loading, data preprocessing, and model training into independent parallel processes, so that the processes are decoupled from each other, avoiding the problem that the slow data loading process affects the data preprocessing process, or the complex data preprocessing process affects the model training process, thereby reducing the latency of data processing and greatly improving data processing efficiency. Specifically, this can be achieved by setting three parallel processes: data loading process, preprocessing process, and model training process.
[0042] Figure 3A schematic diagram of the logical architecture of a data processing method in this exemplary embodiment is shown, and the architecture may include a distributed file system 310 for storing a training data set 311; a training platform 320 for executing a training process of a machine learning model using training data, etc. Specifically, the training framework data and loading code may be modified, such as DataLoader of Pytroch (a Python machine learning library), and the training data set may be divided into subsets based on batches of training data, and data loading, preprocessing, and model training processes may be performed separately according to each batch. For example, during training, the first loading process 321 is preferentially executed in parallel to load the first batch of training data into the memory of the training end, and then the first preprocessing process 322 is performed to perform data preprocessing using the first batch of training data, and the first model training process 323 is performed to perform model training using the preprocessed first batch of training data; at the same time, the second loading process 324 is executed in parallel to load the second batch of training data into the memory of the training end, and at the same time as the second preprocessing process 325 and the second model training process 326, the third loading process 327 is executed in parallel, and so on. Through the above method, data loading, preprocessing and model training are carried out in parallel. In computer vision, audio, video, image and other training tasks, the preprocessing time of the task is longer than the data loading time. This exemplary embodiment can make reasonable use of time and improve time utilization.
[0043] In an exemplary embodiment, the training task of the machine learning model may be performed by a virtual machine; before starting the training task of the machine learning model, the data processing method may further include:
[0044] Read the training dataset from the database into the storage space of the virtual machine.
[0045] The database may be any platform or data storage system for storing training data sets, such as a distributed file system, etc. In this exemplary embodiment, before starting the training task of the machine learning model, the training data set may be read from the database to the storage space of the virtual machine in advance. For example, before formally training the machine learning model, the data set may be cached in the memory of the training Pod (container) in the training end through multiple processes or multiple threads. During model training, the data set may be directly loaded from the memory.
[0046] For example, in a computer vision training task, the size of the training data set is 48GB. In the prior art, when training each machine learning model or using the training data in the training data set during the machine learning model training process, the training data set must first be obtained from the training data storage end (such as a distributed file system), wherein the data generally needs to be routed through the network to the storage node, the storage node loads the data from the hard disk, and then sends the data to the training Pod through the network. The whole process has both network input and output and disk input and output, and has a high latency. In addition, the throughput of the distributed file system is limited by multiple factors such as the client processing power, network bandwidth, server processing power, and current load. Based on this exemplary embodiment, the above-mentioned computer vision training task is optimized, and the training data set is first stored in the storage space of the virtual machine, such as first cached in the memory of the training Pod, and then in the actual model training process, the data can be obtained from the memory. Figure 4 The schematic diagram of the architecture of another data processing method in this exemplary embodiment is shown, including a database 410 for storing a training data set 411, and a training platform 420, which can be a virtual machine for performing machine learning model training tasks. Before formally training the machine learning model, the training data set 411 can be read in parallel from the database 410 to the memory 422 of the training container 421 of the training platform 420. During the training process, if the same image needs to be used 200 times during training, then when the prior art is adopted, the image will be repeatedly read from the database 200 times, and through this exemplary embodiment, the 200 reading processes of the image from the database to the training platform are avoided, which is equivalent to expanding the original training data by 200 times by pre-storing the training data in the training end memory storage. Before optimization, the data loading throughput is 626.442 samples / s (samples / second). After optimization, it only takes 50 seconds (seconds) to cache the original training data set from the distributed file system to the memory. After that, the data loading throughput reaches more than 21000 samples / s, which is more than 30 times before optimization.
[0047] In an exemplary embodiment, the training task of the machine learning model is performed by a virtual machine; before starting the training task of the machine learning model, the data processing method may further include:
[0048] The training data set is read from the database into the memory of the physical machine where the virtual machine is located.
[0049] In addition, this exemplary embodiment can also read the training data set from the database into the memory of the physical machine where the virtual machine is located according to actual needs. For example, it can be mounted on the SSD (Solid State Disk or Solid State Drive) on the training Pod. Specifically, before the formal training of the machine learning model, the training data set can be copied to the SSD through multiple processes or multiple threads. When the model is trained subsequently, it can be directly read from the local SSD for use. Figure 5 An architectural diagram of another data processing method in this exemplary embodiment is shown, including a database 510 for storing a training data set 511, and a training platform 520, which can be a virtual machine for performing machine learning model training tasks. Before formally training the machine learning model, the training data set 511 can be read in parallel from the database 510 to the solid-state hard disk 522 of the training container 521 of the physical machine where the training platform 520 is located.
[0050] In this exemplary embodiment, it can be determined based on actual conditions whether to read the training data set from the database into the storage space of the virtual machine, or into the memory of the physical machine where the virtual machine is located. Specifically, it can be selected, for example, based on the amount of data in the training data set. When the data amount of the training data set is less than a first threshold, such as less than the storage space of the virtual machine, it is read into the storage space of the virtual machine. When the data amount of the training data set is greater than the first threshold and less than the second threshold, such as greater than the storage space of the virtual machine but less than the memory of the physical machine, it is read into the memory of the physical machine where the virtual machine is located, etc.
[0051] The exemplary embodiment of the present disclosure also provides a data processing device. Figure 6 As shown, the data processing device 600 may include: a data loading module 610, which is used to load each subset of the training data set in sequence in response to starting the training task of the machine learning model; a model training module 620, which is used to train the machine learning model using any subset after completing the loading of any subset, so that the training of the machine learning model and the loading of one or more subsets not loaded in the training data set are carried out simultaneously.
[0052] In an exemplary embodiment, any subset is represented by the i-th subset; the model training module includes: a first processing unit, used to perform data preprocessing on the i-th subset and load the i+1-th subset at the same time; after completing the loading of the i+1-th subset and completing the data preprocessing of the i-th subset, the i-th subset is input into the machine learning model for training, and the data preprocessing is performed on the i+1-th subset, and the i+2-th subset or a subset after the i+2-th subset is loaded.
[0053] In an exemplary embodiment, the model training module also includes: a second processing unit, which is used to continue to perform data preprocessing on the i-th subset and start loading the i+2-th subset at the same time when the loading of the i+1-th subset is completed but the data preprocessing of the i-th subset is not completed.
[0054] In an exemplary embodiment, the loading of each subset is performed by a data loading process, the data preprocessing of each subset is performed by a preprocessing process, and the input of each subset into a machine learning model for training is performed by a model training process; the data loading process, the preprocessing process, and the model training process are three parallel processes.
[0055] In an exemplary embodiment, the training task of the machine learning model is performed by a virtual machine; the above-mentioned data processing module also includes: a first reading unit, used to read the training data set from the database into the storage space of the virtual machine before starting the training task of the machine learning model.
[0056] In an exemplary embodiment, the training task of the machine learning model is performed by a virtual machine; the above-mentioned data processing module also includes: a second reading unit, used to read the training data set from the database into the memory of the physical machine where the virtual machine is located before starting the training task of the machine learning model.
[0057] In an exemplary embodiment, the training data set includes a plurality of batches, each batch being a subset.
[0058] The specific details of each part of the above device have been described in detail in the implementation method part, so they will not be repeated here.
[0059] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium, which can be implemented in the form of a program product, including program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification, for example, to execute Figure 1 or Figure 2 The program product may be in the form of a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0060] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0061] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0062] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0063] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0064] The exemplary embodiments of the present disclosure further provide an electronic device, which may include a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute the above data processing method by executing the executable instructions.
[0065] Below Figure 7The mobile terminal 700 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 7 The construction in can also be applied to fixed type equipment.
[0066] like Figure 7 As shown, the mobile terminal 700 may specifically include: a processor 701, a memory 702, a bus 703, a mobile communication module 704, an antenna 1, a wireless communication module 705, an antenna 2, a display screen 706, a camera module 707, an audio module 708, a power module 709 and a sensor module 710.
[0067] The processor 701 may include one or more processing units, for example, the processor 701 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.
[0068] The encoder can encode (i.e. compress) an image or video to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of an image or video to restore the image or video data. The mobile terminal 700 can support one or more encoders and decoders, for example: image formats such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), and video formats such as MPEG (Moving Picture Experts Group) 1, MPEG10, H.1063, H.1064, and HEVC (High Efficiency Video Coding).
[0069] The processor 701 may be connected to the memory 702 or other components via a bus 703 .
[0070] The memory 702 may be used to store computer executable program codes, which may include instructions. The processor 701 executes various functional applications and data processing of the mobile terminal 700 by running the instructions stored in the memory 702. The memory 702 may also store application data, such as images, videos, and other files.
[0071] The communication function of the mobile terminal 700 can be implemented by the mobile communication module 704, antenna 1, wireless communication module 705, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 704 can provide 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 700. The wireless communication module 705 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 700.
[0072] The display screen 706 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 707 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 708 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 709 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 710 may include one or more sensors for implementing corresponding sensing detection functions. For example, the sensor module 710 may include an inertial sensor, which is used to detect the motion posture of the mobile terminal 700 and output inertial sensing data.
[0073] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other implementations of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0074] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: include: In response to initiating a training task of the machine learning model, sequentially loading each subset of the training data set; After completing loading of any subset, the machine learning model is trained using the any subset, so that the training of the machine learning model is performed simultaneously with loading of one or more subsets that are not loaded in the training data set.
2. The method according to claim 1, characterized in that The method of using the i-th subset to represent any of the subsets; and using the any of the subsets to train the machine learning model, so that the training of the machine learning model and the loading of one or more subsets not loaded in the training data set are performed simultaneously, comprises: Performing data preprocessing on the i-th subset and loading the i+1-th subset at the same time; After completing loading the i+1th subset and completing data preprocessing of the i-th subset, the i-th subset is input into the machine learning model for training, and data preprocessing is performed on the i+1th subset, and the i+2th subset or a subset after the i+2th subset is loaded.
3. The method according to claim 2, characterized in that The step of training the machine learning model by using any of the subsets, so that the training of the machine learning model is performed simultaneously with loading one or more subsets not loaded in the training data set, further includes: When the loading of the i+1th subset is completed but the data preprocessing of the i-th subset is not completed, the data preprocessing of the i-th subset continues to be performed and the loading of the i+2th subset is started at the same time.
4. The method according to claim 2, characterized in that: The loading of each subset is performed by a data loading process, the data preprocessing of each subset is performed by a preprocessing process, and the input of each subset into the machine learning model for training is performed by a model training process; the data loading process, the preprocessing process, and the model training process are three parallel processes.
5. The method according to claim 1, characterized in that The training task of the machine learning model is performed by a virtual machine; Before starting the training task of the machine learning model, the method further includes: The training data set is read from a database into the storage space of the virtual machine.
6. The method according to claim 1, characterized in that The training task of the machine learning model is performed by a virtual machine; Before starting the training task of the machine learning model, the method further includes: The training data set is read from a database into a memory of the physical machine where the virtual machine is located.
7. The method according to any one of claims 1 to 6, characterized in that: The training data set includes multiple batches, each batch being a subset.
8. A data processing device, characterized in that: include: A data loading module, configured to sequentially load subsets of the training data set in response to initiating a training task of the machine learning model; The model training module is used to train the machine learning model using any subset after completing the loading of any subset, so that the training of the machine learning model and the loading of one or more subsets not loaded in the training data set are carried out simultaneously.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Data loading method and device, electronic equipment and storage medium
CN113377998A
