Sample data processing method and device, equipment, storage medium and program product

By performing standardized preprocessing and distributed sharding on multimodal sample data in an offline environment, an efficient and complete dataset of training samples is generated, which solves the problem of low efficiency in online preprocessing and improves the overall efficiency and stability of model training.

CN123178779APending Publication Date: 2026-11-27BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611390482.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Online preprocessing of multimodal sample data during the model training phase is inefficient, resulting in high computational load, storage bottlenecks, and instability in the training process.

Method used

In an offline environment, multimodal sample data is standardized and preprocessed to generate an initial sample dataset. Then, a sample dataset to be verified is generated through distributed sharding and parallel processing. Finally, integrity verification is performed to ensure the integrity and consistency of the dataset. The processed dataset is used directly during the training phase.

Benefits of technology

It significantly improves the efficiency and stability of model training, reduces the computational load and storage requirements during training, ensures data quality, and avoids delays and failure risks during training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178779A_ABST
    Figure CN123178779A_ABST
Patent Text Reader

Abstract

The present disclosure provides a sample data processing method and device, electronic equipment, computer readable storage medium and computer program product, relating to the technical field of computer. The method comprises: acquiring multi-modal sample data used for model training stage; after acquiring the multi-modal sample data, before taking the multi-modal sample data as training samples of a to-be-trained model, performing standardization preprocessing on the multi-modal sample data in an offline environment to generate an initial sample data set; performing distributed sharding processing on the initial sample data set, merging after parallel processing of each shard to obtain a to-be-verified sample data set; in response to the to-be-verified sample data set passing integrity check, taking the to-be-verified sample data set as a to-be-trained sample data set, so as to directly take the to-be-trained sample data set as actual input data in the training stage of the to-be-trained model, thereby improving the overall efficiency of model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to the fields of artificial intelligence technology such as data processing, machine learning, and large models, and particularly to a sample data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In the field of artificial intelligence, model training based on multimodal sample data (such as data containing text, images, and videos) has become a mainstream technological trend. Typically, during model training, the acquired raw multimodal sample data needs to be input into the training system, which then performs necessary preprocessing operations on the raw data during training, such as format conversion, data cleaning, and normalization, to meet the model's input requirements. However, with the rapid increase in the number of model parameters and the scale of data, this method of performing online data preprocessing during the training phase faces many challenges. Summary of the Invention

[0003] This disclosure provides a sample data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which improves the overall efficiency of model training.

[0004] In a first aspect, embodiments of this disclosure propose a sample data processing method, comprising: acquiring multimodal sample data to be used in the model training phase; after acquiring the multimodal sample data and before using the multimodal sample data as training samples for the model to be trained, performing standardized preprocessing on the multimodal sample data in an offline environment to generate an initial sample dataset; performing distributed sharding processing on the initial sample dataset, and merging the shards after parallel processing to obtain a sample dataset to be verified; in response to the sample dataset to be verified passing integrity verification, using the sample dataset to be verified as a sample dataset to be trained, so that the sample dataset to be trained can be directly used as actual input data in the training phase of the model to be trained.

[0005] Secondly, this disclosure proposes a model training method, comprising: obtaining a training sample dataset generated by the sample data processing method of any one of claims 1-9; inputting the training sample dataset into the training model to train the model, wherein, during the training phase, the standardized preprocessing operation of the input data is skipped, and the training sample dataset is directly used as the actual input data to perform model training.

[0006] Thirdly, embodiments of this disclosure propose a sample data processing apparatus, comprising: a data acquisition unit configured to acquire multimodal sample data to be used in the model training phase; a dataset generation unit configured to perform standardized preprocessing on the multimodal sample data in an offline environment after acquiring the multimodal sample data and before using the multimodal sample data as training samples for the model to be trained, to generate an initial sample dataset; a sharding processing unit configured to perform distributed sharding processing on the initial sample dataset, and merge the shards after parallel processing to obtain a sample dataset to be verified; and an integrity verification unit configured to, in response to the integrity verification of the sample dataset to be verified, use the sample dataset to be verified as the sample dataset to be trained, so that the sample dataset to be trained can be directly used as actual input data in the training phase of the model to be trained.

[0007] Fourthly, embodiments of this disclosure propose a model training apparatus, comprising: a dataset acquisition unit configured to acquire a training sample dataset generated by the sample data processing method of any one of claims 1-9; and a model training unit configured to input the training sample dataset into a training model to train the model, wherein, during the training phase, the standardized preprocessing operation of the input data is skipped, and the training sample dataset is directly used as the actual input data to perform model training.

[0008] Fifthly, embodiments of this disclosure provide an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to implement the sample data processing method described in the first aspect or the model training method described in the second aspect when executed.

[0009] In a sixth aspect, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions that enable a computer to implement the sample data processing method described in the first aspect or the model training method described in the second aspect when executed.

[0010] In a seventh aspect, embodiments of this disclosure provide a computer program product including a computer program, which, when executed by a processor, can implement the steps of the sample data processing method as described in the first aspect or the model training method as described in the second aspect.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is an exemplary system architecture to which this disclosure can be applied; Figure 2 A flowchart of a sample data processing method provided in this embodiment of the disclosure; Figure 3 A flowchart of another sample data processing method provided in this disclosure embodiment; Figure 4 A flowchart of a model training method provided in this embodiment of the disclosure; Figure 5 A structural block diagram of a sample data processing apparatus provided in an embodiment of this disclosure; Figure 6 A structural block diagram of a model training device provided in an embodiment of this disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device suitable for performing sample data processing methods or model training methods, provided in an embodiment of this disclosure. Detailed Implementation

[0013] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding; these should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0014] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0015] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the sample data processing methods, apparatus, electronic devices, and computer-readable storage media of the present disclosure can be applied.

[0016] like Figure 1As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0017] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various applications for enabling information communication between the terminal devices 101, 102, and 103 and server 105 can be installed. These applications include web browser applications, AI applications, and instant messaging applications.

[0018] Terminal devices 101, 102, and 103 and server 105 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices, and can be implemented as multiple software programs or software modules, or as a single software program or software module; no specific limitation is made here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules, or as a single software program or software module; no specific limitation is made here.

[0019] Server 105 can provide various services through its built-in applications. For example, a web browser-like application that generates a training sample dataset based on multimodal sample data can achieve the following effects when running this application: First, it acquires multimodal sample data to be used in the model training phase. After acquiring the multimodal sample data but before using it as training samples for the model, it performs standardized preprocessing on the multimodal sample data offline to generate an initial sample dataset. Then, it performs distributed sharding on the initial sample dataset, processes each shard in parallel, and merges them to obtain a verification sample dataset. Finally, when the verification sample dataset passes integrity verification, it is used as the training sample dataset, so that it can be directly used as the actual input data during the training phase of the model.

[0020] It should be noted that, in addition to being obtained from terminal devices 101, 102, and 103 via network 104, multimodal sample data can also be pre-stored locally on server 105 through various means. Therefore, when server 105 detects that this data is already stored locally (for example, when starting to process the task of generating a previously retained training sample dataset), it can choose to directly obtain this data from locally. In this case, the exemplary system architecture 100 may also exclude terminal devices 101, 102, and 103 and network 104.

[0021] Since generating a training dataset from multimodal sample data requires significant computational resources and power, the sample data processing methods provided in the subsequent embodiments of this disclosure are generally executed by a server 105 with strong computational power and abundant resources. Correspondingly, the sample data processing device is also generally located within the server 105. However, it should also be noted that when terminal devices 101, 102, and 103 also possess sufficient computational power and resources, they can also perform the aforementioned calculations performed by the server 105 through web browser applications installed on them, thereby outputting the same results as the server 105. Especially when multiple terminal devices with different computational capabilities exist simultaneously, but a web browser application determines that its terminal device has strong computational power and abundant remaining resources, it can allow the terminal device to perform the aforementioned calculations, thereby appropriately reducing the computational burden on the server 105. Accordingly, the sample data processing device can also be located within terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may also exclude the server 105 and the network 104.

[0022] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0023] Please refer to Figure 2 , Figure 2 A flowchart of a sample data processing method provided in this disclosure embodiment, wherein process 200 includes the following steps: Step 201: Obtain multimodal sample data that will be used in the model training phase; This step is intended for the entity executing the sample data processing method (e.g., Figure 1The server 105 shown acquires multimodal sample data that will be used in the model training phase. Multimodal sample data refers to a dataset containing two or more different modalities, such as text, images, video, and audio. For example, a data pair containing a product image and its corresponding text description is a typical image-text bimodal dataset; a video clip with subtitles or audio tracks simultaneously encompasses video frames, text, and audio modalities. The value of multimodal sample data lies in its ability to provide the model with richer, more multi-dimensional information, enabling the model to learn the relationships and alignment between different modalities, thereby acquiring cross-modal understanding and generation capabilities.

[0024] In this embodiment, multimodal sample data may include at least two of text data, image data, and video data. This embodiment further specifies that multimodal sample data includes at least two of the above three modalities. This limitation ensures that the data processed in this embodiment does indeed possess multimodal characteristics while maintaining a reasonable scope of coverage; it does not require the simultaneous inclusion of all three modalities. Specifically, a common combination is a bimodal combination of text and image data. For example, each sample contains a product image and its corresponding text description. This type of data is widely used in model training tasks such as image-text retrieval and image-text generation. Another common combination is a bimodal combination of text and video data. For example, each sample contains a short video and its corresponding text title or description. This type of data is widely used in tasks such as video understanding and video subtitle generation. Furthermore, it can also be a bimodal combination of image and video data, or a trimodal combination where text, images, and video coexist. Regardless of the combination method used, these multimodal sample data share a common characteristic: there is usually some semantic association or alignment between different modalities. By learning this cross-modal association, the model can gain the ability to jointly understand and generate multimodal information.

[0025] In this embodiment, multimodal sample data can be acquired through various means. A common approach is to obtain it from publicly available, pre-built datasets, such as downloading ready-made multimodal datasets from open-source data platforms or communities. These platforms typically integrate massive amounts of pre-processed data resources. Another approach is to collect and build the data independently, such as exporting from an internal database, using web crawlers to scrape web page content, capturing surveillance video streams through a video gateway, or uploading various local documents, audio, and video files to a data processing system. Furthermore, data feedback generated during model inference can be utilized to form a data loop.

[0026] Step 202: After obtaining the multimodal sample data and before using it as training samples for the model to be trained, perform standardization preprocessing on the multimodal sample data in an offline environment to generate an initial sample dataset; After acquiring the raw multimodal sample data, before formally using this data as training data for the model to be trained, the execution entity performs a standardized preprocessing operation on the multimodal sample data. This operation is performed within a specific time window, between data acquisition and data delivery to the model training phase. The reason for setting up this standardized preprocessing step at this point is to complete necessary data preparation work before the data enters the training pipeline. In this embodiment, the preprocessing action is performed independently offline, thereby decoupling the data preparation phase from model iteration.

[0027] In this embodiment, execution in an offline environment refers to the standardized preprocessing operations described above occurring in an offline processing scenario isolated from the model training environment. Specifically, the offline environment can be an independently deployed data processing cluster, a dedicated data preprocessing server, or a group of computing nodes managed by a task scheduling system. This environment is physically or logically independent of the computing resources used for model training (such as a training cluster with GPU accelerator cards), and there is no resource competition between the two. A typical implementation scenario is that data processing jobs are submitted to an offline computing platform, which schedules CPU-intensive or memory-intensive computing instances on demand to execute preprocessing tasks, while the GPU resources of the training cluster are reserved for pure model iteration computation. This offline execution mode not only avoids preprocessing operations occupying the valuable accelerator card resources of the training cluster, but also allows the preprocessing process to fully process massive amounts of data with longer runtime and larger computational scale, without worrying about causing delays or interruptions to online training tasks.

[0028] In this embodiment, standardization preprocessing refers to converting raw data from diverse sources, with varying formats and modalities, into a standard format that meets the requirements of subsequent processing. Multimodal sample data often exhibits high heterogeneity in its original form; for example, text data may be stored in different encoding formats, image data may have different resolutions and color spaces, and video data may contain different frame rates and encoding / decoding formats. The fundamental goal of standardization preprocessing is to eliminate this heterogeneity, achieving uniformity across all sample data at the data structure level. Standardization preprocessing involves at least format unification and structural regularization of the raw data. Format unification aims to convert data of various modalities from their original carrier formats into a system-defined, universal storage format. For example, it can unify text with multiple encodings into a universal character encoding format, or unify images with different compression formats into uncompressed or standard compressed formats. Structural regularization focuses on the logical organization of the data, ensuring that each piece of sample data is expressed using a universal data structure that the system can recognize and parse.

[0029] In this embodiment, the implementation of standardized preprocessing varies depending on the modality of the data being processed and the application scenario, but the core logic remains the same. For example, for text modality data, standardized preprocessing typically involves operations such as unified character encoding conversion, filtering of special symbols or control characters, and unified truncation or padding of text length to ensure that all text samples have a consistent encoding form and processable tensor dimension before entering the model. For image modality data, standardized preprocessing typically involves scaling or cropping images of different sizes to a preset spatial resolution and mapping the pixel values ​​of each channel from integer to floating-point units to facilitate the subsequent model's adaptation to numerical ranges. For video modality data, in addition to performing image-like standardized processing on each frame, the video frame rate also needs to be uniformly sampled to ensure that each video sample has a consistent frame sequence length in the time dimension. The essence of the above specific processing methods for different modalities is to transform heterogeneous raw inputs into outputs with a unified data format.

[0030] The initial sample dataset generated after the above standardization preprocessing is actually a preliminary result of the systematic regularization of the original multimodal sample data. The data in this initial sample dataset has met the consistency requirements in terms of format and structure, but its internal data is still in a centralized storage state or has not been distributedly organized and validated. This initial sample dataset serves as a transitional form between the original multimodal sample data and the subsequent trainable sample data. It retains all valid sample information and provides a standardized form for direct use by distributed processing stages, thus eliminating the need for subsequent operations to backtrack to the original heterogeneous data or perform any repetitive format conversion work.

[0031] Step 203: Perform distributed sharding processing on the initial sample dataset, and merge the shards after parallel processing to obtain the sample dataset to be verified; In this embodiment, the execution entity performs distributed sharding processing on the initial sample dataset, and merges the shards after parallel processing to obtain the sample dataset to be verified. Although the initial sample dataset has reached a unified standard in terms of format and structure, its overall data volume is often enormous, especially in multimodal model training scenarios, where the number of samples may reach hundreds of millions or even billions, and the overall data scale can reach hundreds of TB or even PB. If such a large amount of data is processed centrally on a single machine, it will face many problems such as storage bottlenecks, excessive computation time, and single point of failure risk. Therefore, this embodiment introduces the architectural concept of distributed sharding processing, which divides the initial sample dataset, which was originally concentrated in a single storage entity, into multiple relatively independent data shards according to a predetermined strategy. This allows each shard to be independently allocated to different processing nodes for parallel processing, thereby making full use of the computing and storage resources of the distributed cluster and increasing the data processing throughput many times over.

[0032] In this embodiment, the technical principle of distributed sharding processing lies in the process of dividing a large-scale dataset into several data subsets, and the processing paradigm of distributing each subset to multiple computing nodes for parallel computation. From the perspective of data segmentation, the sharding operation is not random, but rather based on certain partitioning logic to ensure the balance of data volume and the integrity of data content in each shard. Specifically, one implementation of the sharding operation can be to read samples sequentially from the initial sample dataset and divide them into different shards according to a preset step size or batch size, so that each shard contains approximately an equal number of samples. Another implementation of the sharding operation can be based on the distribution characteristics of the data itself, such as classifying and sharding according to the category, source domain, or result of a certain hash mapping, so that the data within each shard maintains a certain inherent semantic consistency during subsequent parallel processing.

[0033] After the data sharding operation is completed, each data shard is dispatched to multiple processing nodes in the distributed environment for parallel processing. The basic idea of ​​parallel processing is that each processing node independently executes the same logical processing operations on its own data shards, with no interference or communication synchronization required between nodes. This breaks down the originally serially executed task into multiple subtasks that can be performed simultaneously. The implementation of parallel processing relies on the unified management and scheduling of computing resources by the distributed computing framework. One feasible implementation is that the scheduler in the distributed system matches the location information of each data shard with the computing power of each processing node, scheduling the sharded data to the nearest or lightest-loaded processing node for processing. Upon receiving the assigned data shard, each processing node independently loads the data content of that shard and performs necessary processing operations, such as unified data format conversion, feature extraction, and data augmentation.

[0034] After parallel processing by each processing node, multiple independent data shards, each containing partial processing results, are obtained. To form a complete dataset for verification, these scattered processing results need to be merged. The essence of the merging operation is to reassemble the contents of multiple data shards into a unified data set according to a predetermined order or logic. Specifically, merging can be done using a simple concatenation method, where the sample data in each shard are concatenated end-to-end according to the shard number, recombineing them into a complete data sequence. This merging method requires that each shard maintains its original relative order of samples during parallel processing, and the merging order between shards is also explicit, thus ensuring a deterministic correspondence between the merged dataset and the original initial sample dataset in terms of sample arrangement. The dataset obtained after the merging operation is the dataset for verification. While the dataset for verification has undergone parallel processing at the shard dimension, it has not yet undergone final reliability verification and needs to pass a subsequent integrity verification step before it can be formally used for model training.

[0035] Step 204: In response to the integrity check of the sample dataset to be verified, use the sample dataset to be verified as the sample dataset to be trained, so that the sample dataset to be trained can be directly used as the actual input data during the training phase of the model to be trained.

[0036] In this embodiment, once the dataset to be verified passes the integrity check, the operation of formally establishing the dataset to be verified as the dataset to be trained is triggered. The purpose of the integrity check is to confirm that the dataset to be verified, obtained after a series of operations such as distributed sharding, parallel processing, and merging, is complete and intact at the data level. Because the dataset to be verified undergoes a complex process of splitting the initial dataset into multiple shards, distributing them to different nodes for processing, and then merging them again, there are various potential data anomaly risks during this process. For example, data loss may occur during the transmission or processing of shards, individual shard processing failures may result in missing data in those shards, and sorting errors during the merging operation may lead to sample misalignment or duplication. The existence of the integrity check is to identify these potential problems before the data is formally put into training, ensuring that only verified and intact data can enter the subsequent model training stage.

[0037] In this embodiment, the core of integrity verification lies in verifying whether the integrity and consistency of the data content of the sample dataset to be verified meet the expected standards. The core indicator of integrity verification is whether the data in the sample dataset to be verified is complete, that is, whether there is a reduction in the number of samples or the loss of some data content compared with the expected total amount of data. From the perspective of verification logic, its basic idea is to use some quantifiable verification method to confirm whether the number of samples, data format, key fields, etc. in the sample dataset to be verified are in a normal state. For example, during the verification process, it can be checked whether the total number of samples in the sample dataset to be verified is consistent with the expected target number, or whether the core content fields of each sample are not empty and the format is correct, or to confirm that the data has not been damaged during transmission and processing through verification and comparison. If all the above checks meet the expectations, the integrity verification is confirmed to be passed; otherwise, if insufficient sample number, abnormal data format, or missing content fields are found, the verification fails, and the sample dataset to be verified will not be considered a qualified training sample dataset, thereby avoiding sending defective data into the training process.

[0038] After passing the integrity verification, the dataset to be verified is officially established as the dataset to be trained. The dataset to be trained refers to a dataset that has completed all preprocessing work, is ready, and can be used for model training at any time. It will be used directly as the actual input data for the model to be trained without undergoing any further format conversion, cleaning, or standardization.

[0039] In conventional model training workflows, training systems typically perform data preprocessing operations synchronously when loading raw data in each training epoch or batch. This coupling of the training and data processing processes makes preprocessing a mandatory step in the training pipeline. However, in this embodiment, since all preprocessing and validation are completed offline, the training sample dataset is already in its final form, meeting the model input requirements. Therefore, when receiving this dataset during the training phase, no further standardized preprocessing is required; the sample data from the training sample dataset can be directly used as the model's actual input. This significantly shortens the data loading path during the training phase, dramatically improving the efficiency of data flow from storage media to the model input layer. In practical deployments, the training sample dataset can be stored in a high-performance distributed file system or object storage. Upon startup, the training task simply reads the samples from this dataset according to a predetermined strategy and feeds them into the model to begin iterative computation. The entire training process is no longer subject to additional waiting delays or failure risks due to the uncertainty of data preprocessing, thus ensuring smooth operation during the model training phase.

[0040] The sample data processing method provided in this disclosure, by separating the data standardization preprocessing operation from the model training stage and executing it independently in an offline environment, fundamentally avoids the repeated parsing and cleaning of the original multimodal sample data during training, significantly simplifies the data input process during training, thereby effectively reducing the computational load and I / O overhead of online training tasks and reducing the occupation of GPU memory resources; at the same time, by introducing a distributed sharding processing architecture for the initial sample dataset, using multiple nodes to process data shards in parallel before merging, massive amounts of multimodal data can be processed efficiently and quickly offline, greatly shortening the total time spent on data preparation; and, By adding an integrity verification step after parallel processing, the integrity of the data content of the sample dataset to be verified after distributed processing is ensured, thereby maintaining data quality while ensuring data processing efficiency. Finally, thanks to the organic combination of the above offline preprocessing and distributed processing, the training phase can directly use the verified sample dataset to be trained as the actual input data. This eliminates the waiting delay and potential failure risks introduced by the uncertainty of data preprocessing in the training phase, and ensures that the sample data sent to the model has a uniform and standardized format and complete and reliable content. Thus, it significantly improves the stability, smoothness and overall training efficiency of the training process in the scenario of large-scale training of multimodal models.

[0041] Please refer to Figure 3 , Figure 3 A flowchart of another sample data processing method provided in this disclosure embodiment, wherein process 300 includes the following steps: Step 301: Obtain multimodal sample data to be used in the model training phase; Step 301 and as follows Figure 2 The steps shown in step 201 are the same. For the same parts, please refer to the corresponding parts of the previous embodiment. They will not be repeated here.

[0042] Step 302: After obtaining the multimodal sample data and before using it as the training sample for the model to be trained, perform standardization preprocessing on the multimodal sample data in an offline environment to generate an initial sample dataset; In this embodiment, the standardization preprocessing is further refined into a series of ordered operational steps. Standardization preprocessing includes: converting multimodal sample data into a serializable native data structure; performing normalization on the native data structure; filling in detected outlier or missing data; and selecting key fields required for training to remove redundant data. These four operations together constitute the core processing logic of the standardization preprocessing. They have an inherent sequential dependency, with subsequent operations based on the standardized data structure output by previous operations. Through this set of operations, the original multimodal sample data is gradually transformed from a scattered and heterogeneous raw form into a standardized data form with a unified structure, regular content, and concise fields, providing a high-quality input source for subsequent distributed sharding processing.

[0043] Converting multimodal sample data into a serializable native data structure is the first step in standardized preprocessing, aiming to address the heterogeneity of multimodal data in its original form. A serializable native data structure refers to a standardized data organization form that can be directly recognized and manipulated by programming languages ​​or computing frameworks and can be serialized into a byte stream for storage or transmission. The core idea of ​​this conversion operation is to uniformly carry multimodal data from various sources and formats within a common data container. For example, for text data, the conversion operation encapsulates it from its original string encoding form into a structured string object with type identifiers and length information; for image data, the conversion operation decodes the pixel matrix from various compressed image formats and organizes it into a numerical array in tensor form; for video data, the conversion operation parses the frame sequence from multimedia container formats and constructs a composite data structure containing frame data and timing information. The converted data structure should directly correspond to the basic data object types in programming languages ​​or underlying computing libraries, rather than intermediate formats processed through secondary encapsulation or custom serialization protocols, thus ensuring that subsequent processing steps can access and manipulate this data in a unified and efficient manner.

[0044] Normalization of raw data structures is a data numerical level adjustment operation performed after the data structure has been unified. The core objective of normalization is to map feature values ​​from different samples and modalities, which fall within different numerical ranges or have different dimensions, to a unified numerical interval or a unified statistical distribution. In multimodal data, different modalities naturally exhibit significant differences in numerical scale. For example, pixel values ​​in image data are typically in the range of 0 to 255, while the numerical range of each dimension of the feature vector generated after word embedding or vectorization of text data may depend on the specific embedding method. Timestamps or frame numbers in video data may involve even larger numerical spans. Without normalization, subsequent models will face optimization difficulties due to inconsistent input feature scales during training. Normalization can be implemented by linearly mapping values ​​to a unit interval, or by standardizing based on statistical means and methods, making the numerical magnitudes of different modalities comparable. In addition, normalization also means regularizing the dimensions of the data structure. For example, it can scale image data to the same spatial resolution and adjust text sequences to the same length to ensure the consistency of all samples in the same modality in terms of data structure dimensions.

[0045] Imputing detected outlier or missing data is a proactive repair operation performed after normalization to address data quality issues. In actual data acquisition, multimodal sample data inevitably contains various quality problems. Outlier data refers to outliers whose values ​​significantly deviate from the normal distribution range, or data entries with non-compliant formats or obvious errors. Missing data refers to a modality, field value, or part of information that should be present in the sample but is actually missing. Outlier detection can be based on statistical thresholds; for example, if the mean pixel value of an image sample exceeds the normal range by more than three standard deviations, it can be marked as outlier. Missing data can be detected based on the integrity of the data structure; for example, if a text field in a sample is empty or the image data length is 0, it can be determined as missing. After detecting the above anomalies or missing data, the imputation operation is responsible for repairing these incomplete data. The specific imputation strategy can be flexibly selected based on data characteristics and application scenarios. For example, for missing numerical features, mean or mode imputation can be used; for missing text fields, empty strings or special markers can be used as placeholders; for anomalous image data, corrections or replacements can be made based on the statistical characteristics of adjacent frames or other samples in the same batch. Through imputation operations, the integrity and validity of each sample data at the content level are ensured, preventing the usability of the overall dataset from being affected by the data quality problems of individual samples.

[0046] Filtering key fields required for training to remove redundant data is the final step in standardized preprocessing. Its purpose is to reduce the size of the dataset and focus on the information dimensions truly valuable for model training. Raw multimodal sample data often contains a large amount of redundant information irrelevant to the core learning task. For example, when acquiring image data, in addition to the pixel matrix of the image itself, it may also include metadata information such as shooting time, device model, GPS location, and thumbnails; when acquiring text data, it may contain HTML tags, special delimiters, irrelevant formatting marks, and other noisy content; when acquiring video data, it may contain non-keyframes, redundant audio track information, or additional header information from the container format. The key field filtering operation removes this redundant data from the samples, retaining only the core information necessary for the training task. Specifically, the filtering operation is based on a predefined list of key fields, which is set according to the specific input requirements of the model to be trained. If a field is not in the key field list, the data corresponding to that field will be discarded. After screening, each sample retains only the core data content that actually contributes to model training. The overall size of the dataset is significantly reduced, storage space usage is reduced, and the data transmission and computational load in subsequent processing stages are also reduced, thereby improving the operating efficiency of the entire data processing pipeline.

[0047] Step 303: Divide the initial sample dataset into multiple data fragments and save each data fragment as an independent data file; In this embodiment, the executing entity divides the initial sample dataset into multiple data shards, and saves each data shard as an independent data file. Data sharding refers to splitting sample data that was originally stored completely in the same dataset into several data subsets of similar size according to a predetermined partitioning logic. This partitioning operation does not physically move or change the content of the original data itself, but rather divides the dataset into multiple non-overlapping subsets at the logical organization level. Each subset contains a complete copy of a portion of the samples in the original dataset.

[0048] In this embodiment, the partitioning operation can be implemented based on a uniform division of the sample size. For example, each partition can be set to contain a fixed number of samples, and then the samples can be sequentially partitioned into different partitions according to their order of arrangement in the dataset. After partitioning, each data partition is saved as an independent data file, rather than being aggregated into the same data file. The significance of saving each partition as an independent data file is that the independent files can be distributed and stored in different storage locations in the distributed storage system, thereby enabling subsequent parallel processing stages to achieve data isolation between nodes through file-level independent loading and operations. In a specific deployment, these independent data files can be saved on different storage nodes of the distributed file system or in different directories of shared storage. Each independent file has a unique file identifier and storage path, so that each processing node in the distributed environment can independently address and load the corresponding data partition based on the file path.

[0049] Step 304: Utilize multiple processing nodes to process each independent data file in parallel; In this embodiment, the execution entity utilizes multiple processing nodes to process each independent data file in parallel. This is the core distributed computing step performed after the data fragments are saved as independent data files. In a distributed computing architecture, a processing node refers to a computing unit with independent computing and storage access capabilities. Each node can be a physical server, a virtual machine instance, or a containerized computing process. The processing nodes communicate and coordinate with each other via a network. However, during the parallel processing of data fragments, each node independently loads and processes its assigned data file without needing to exchange data or synchronize its state with other nodes. This dependency-free parallel mode makes the speedup of the entire processing task approximately proportional to the number of nodes participating in the processing.

[0050] In this embodiment, the implementation of parallel processing relies on a distributed scheduling system to allocate independent data files and assign tasks to processing nodes. The scheduling system allocates each independent data file to different processing nodes based on factors such as the current load of each processing node and the network distance between the node and the storage location of the data files. Upon receiving the allocated file list, each node loads the data from each file sequentially according to a pre-defined processing logic and performs the corresponding processing operations. The processing logic running on each node is identical; only the data files being processed differ. This parallel mode of "same logic, different data" ensures the uniformity of the format and content of the processing results for each segment, providing a data compatibility basis for subsequent merging operations.

[0051] Step 305: Merge the independent data files after parallel processing to obtain the sample dataset to be verified; In this embodiment, the executing entity merges the independent data files that have undergone parallel processing. Specifically, the goal of the merging operation is to unify the data, which is scattered across multiple independent files and has already undergone parallel processing on its own, into a single complete data set. Since each independent data file has already undergone format unification and content regularization using the same processing logic during the parallel processing stage, the data in each file is fully compatible at the data structure level, making the merging operation technically relatively direct and efficient.

[0052] In this embodiment, the merging operation can be implemented by sequentially reading the data content of each independent data file and appending them to the same data set in a predetermined order. This predetermined order can be the numbering order of the data fragments or the chronological order in which the files were processed. The key to the merging operation is ensuring that the order of samples in the merged data set maintains a definite correspondence with the order of samples within each fragment before merging, thus avoiding the loss of data association information or inconsistent sample arrangement due to disordered order. The data set generated after the merging operation is the sample dataset to be verified. This dataset has completely aggregated all the parallel-processed sample data and logically restored to a unified whole for use in subsequent integrity verification.

[0053] The distributed sharding processing method provided in this application divides the initial sample dataset into multiple data shards at the logical level and saves each shard as an independent data file. This allows the massive sample data, originally stored centrally in a single dataset, to be discretized at the physical storage level, creating a prerequisite for subsequent parallel processing. Based on this, multiple processing nodes are used to process each independent data file in parallel. Multiple nodes can work simultaneously and load and process their respective assigned data files without interference, thus decomposing the originally serially executed total processing task into multiple concurrently executable subtasks, significantly shortening the overall processing time and significantly improving data processing throughput. Simultaneously, because the independent data files are interconnected... Isolation ensures that if an exception occurs during the loading or processing of a single file, it will not affect the parallel processing of other data files, effectively avoiding the risk of overall task blocking or failure due to single point of failure or resource contention in traditional centralized processing. Finally, by merging the independent data files after parallel processing, the processing results scattered in each shard are re-aggregated into a complete data set. This allows the final output sample dataset to maintain logical consistency with the original initial sample dataset while enjoying the efficiency improvement and stability guarantee brought by distributed parallel processing. This balances the efficiency of data processing with the integrity of data organization, providing a reliable data foundation for unified access and overall operation of the dataset in subsequent stages.

[0054] Step 306: Compare the dataset to be verified with the initial dataset to verify the completeness and consistency of each sample data in the dataset to be verified; In this embodiment, the executing entity compares the dataset to be verified with the initial dataset to verify the completeness and consistency of each sample in the dataset to be verified. In the distributed data processing flow, the dataset to be verified undergoes multiple stages, including sharding, cross-node parallel processing, and merging. Each stage may carry the risk of data anomalies, such as sample omissions during sharding, failures in processing individual files during parallel processing, or disordered order or data loss during merging. To ensure that the final output dataset meets the trainable standard in terms of quality, a systematic comparison and verification of the dataset to be verified with the initial dataset, which serves as the input source, is necessary. The core logic of this comparison and verification is that the initial dataset is a standard reference set containing all valid samples, generated after standardization preprocessing. Therefore, comparing the dataset to be verified with it allows us to determine whether the data content remains complete and consistent after distributed processing.

[0055] In this embodiment, integrity refers to whether the number of samples in the dataset to be verified is consistent with the number of samples in the initial dataset. Since data omissions at any stage in distributed processing can lead to a discrepancy between the final merged total number of samples and the original total, the most basic check for integrity verification is the comparison of sample counts. In this embodiment, the executing entity can count the total number of samples in the initial dataset and the total number of samples in the dataset to be verified, and compare whether they are equal. Consistency refers to whether the content of each sample in the dataset to be verified is consistent with its corresponding sample in the initial dataset; that is, whether the data content of each sample has undergone unexpected changes after a series of operations such as fragmentation, transmission, processing, and merging.

[0056] In this embodiment, consistency verification can be implemented in various ways. For example, it can be done by comparing the values ​​of key feature fields sample by sample, or by generating a content summary (such as a checksum or hash value) for each sample and then comparing it. If the feature values ​​or hash values ​​of all samples match, it indicates that the data content has not been damaged or tampered with during the transfer process. Through dual verification of integrity and consistency, it can be ensured that the dataset to be verified is equivalent to the initial dataset in both quantity and quality, thereby confirming that the distributed processing process has not had any negative impact on the data.

[0057] Step 307: In response to the integrity check passing, use the dataset to be verified as the dataset to be trained. After the integrity verification passes, in response to the successful verification result, the dataset to be verified is officially used as the dataset to be trained. This state transition can be manifested in the data management module by labeling or updating the metadata of the dataset. For example, in the dataset registry or metadata storage service, the dataset's label can be updated from an unverified state to a verified and usable state. This state labeling allows the subsequent model training phase to identify the availability status of the dataset and use it directly when loading data, without having to perform repeated verification or preprocessing operations. Through this state transition, the dataset to be trained is given a formally usable status in the data pipeline, its data content has been confirmed in terms of quantity and quality, and it can serve as a stable data source for the training phase.

[0058] Step 308: Delete the intermediate data and temporary cache data generated during the generation process of the sample dataset to be verified according to the preset cleaning strategy.

[0059] After the integrity verification is passed and the dataset to be verified is determined as the dataset to be trained, the intermediate data and temporary cache data generated during the generation process of the dataset to be verified are deleted according to the preset cleaning strategy.

[0060] Throughout the entire processing flow from the initial sample dataset to the final training sample dataset, a large amount of intermediate data is generated to support each processing stage. This includes independent data files generated during the sharding stage, temporary output results from each node during the parallel processing stage, and intermediate cached data generated during the merging stage. Once integrity checks are passed, the historical mission of this intermediate data is complete. Continuing to retain it will occupy additional storage space, increase storage costs, and may even cause confusion in subsequent operations due to misuse.

[0061] In this embodiment, the preset cleanup strategy refers to predefined data cleanup rules. This strategy specifies which types of data are deletable intermediate data, under what conditions the cleanup operation is triggered, and the specific cleanup method. The cleanup strategy can be determined based on the time of data generation and its stage. For example, cached files located in temporary directories, temporary fragment files named with a specific prefix, and temporary copies with expiration timestamps earlier than the current time are all included in the cleanup scope. By performing the cleanup operation, the storage resources occupied during processing are released in a timely manner, keeping the storage space clean and sufficient, avoiding the problem of insufficient storage capacity caused by the accumulation of a large amount of temporary data, thereby ensuring the long-term stable operation of the system.

[0062] The integrity verification and subsequent processing method provided in this application compares the dataset to be verified with the initial dataset to verify the integrity and consistency of each sample data in the dataset to be verified. This allows the dataset after distributed sharding and parallel processing to be verified simultaneously in terms of both the number of samples and the content of the samples, thereby effectively identifying anomalies such as sample omissions, data corruption, or content changes that may occur during processing, providing reliable verification assurance for data quality. Simultaneously, by officially using the dataset to be verified as the training dataset in response to the successful integrity verification, the dataset obtains a formal usable status after rigorous verification, ensuring that only after passing the integrity verification can the dataset be officially recognized as usable. Only fully verified and error-free data can proceed to the subsequent model training stage, eliminating the risk of training anomalies or model performance degradation caused by data defects from the source. Furthermore, by deleting intermediate data and temporary cached data generated during the generation of the sample dataset to be verified according to a preset cleaning strategy, a large number of temporary files generated in the processing flow are cleaned up in a timely manner while ensuring the safety and usability of the final dataset. This effectively releases storage resources and avoids the space occupation pressure caused by the long-term accumulation of intermediate data on the storage system. Thus, while ensuring data quality, efficient management of storage resources is achieved, enabling the entire data processing pipeline to deliver the final results in a clean and lightweight state after completing data output.

[0063] In this embodiment, the difference is... Figure 2 In the illustrated embodiment, steps 301-302 correspond to steps 201-202. Steps 303-305 specifically provide an implementation method for generating the dataset to be verified, and steps 306-308 specifically provide an implementation method for obtaining the dataset to be trained. There is no causal or dependency relationship between the two implementation methods, and they do not necessarily need to be applied simultaneously in one embodiment. They can be applied separately in different embodiments as needed for generating the dataset to be verified or for obtaining the dataset to be trained. This embodiment exists only as a preferred embodiment that simultaneously includes two specific implementation methods.

[0064] In this embodiment, the execution entity can further divide the initial sample dataset in the following way: collect samples from the initial sample dataset according to a preset sample number, and treat each batch of collected samples as a data shard; save each data shard as an independent data file, and generate the storage directory structure of each independent data file. The preset sample number refers to a value determined before performing the sharding operation, which specifies the number of samples contained in each data shard. Specifically, the preset sample number can be flexibly determined according to the actual application scenario and computing resource conditions. Its value typically considers factors such as the size of a single data shard, the memory capacity of subsequent processing nodes, and network transmission bandwidth. The number of samples contained in a shard should not be too few or too many: too few shards will lead to an excessive total number of shards, increasing the overhead of scheduling and file management; too many shards may lead to an excessively large size of a single shard, occupying too much node memory resources during subsequent loading and processing, or even exceeding the processing capacity limit of a single processing node. Therefore, setting the preset sample number is essentially a trade-off at the granularity of data partitioning to achieve a balance between the number of shards and the size of the shards.

[0065] Sample collection refers to sequentially reading a specified number of samples from the initial sample dataset according to their order of arrangement within the dataset. Specifically, the execution method of the collection operation varies depending on the storage format and access interface of the initial sample dataset. If the initial sample dataset is stored as a centralized file, the collection operation can be implemented by sequentially reading the data records in that file. Each time a preset number of samples are read, a batch is formed. After the samples in this batch are grouped into a data shard, the counter is reset, and subsequent samples are read again until all samples have been collected. If the initial sample dataset is stored as a database table, the collection operation can retrieve sample records in batches sequentially using query statements with sorting and pagination. Regardless of the storage format, the core logic of the collection operation remains consistent: continuously retrieving a preset number of samples from the dataset in a predetermined order to form a complete data shard unit. When the total number of samples in the dataset is not divisible by the preset number of samples, the number of samples contained in the last data shard may be less than the preset value. This is a normal occurrence in the sharding process, and the last shard still participates in subsequent processing as an independent data shard.

[0066] Each data shard is saved as an independent data file, and a storage directory structure for each independent data file is generated. This is the persistence operation for the sharding results after the data sharding is completed. Saving each data shard as an independent data file means that the data content of each shard is written to a separate file, rather than appending the data of all shards to a single file. This one-to-one file organization method gives each data shard an independent identity at the storage level. Subsequent processing nodes in the distributed processing can directly access and load the required data shards independently based on the file path, without needing to perform data splitting or offset calculations during reading. The format of each independent data file can adopt a serialization storage format compatible with subsequent processing stages, such as binary encoding format or structured data storage format, so that processing nodes can efficiently deserialize and load file content.

[0067] While preserving individual data files, it's also necessary to generate the storage directory structure for each individual data file. The storage directory structure refers to the hierarchical path system used to organize and manage these individual data files. Specifically, the method for generating the directory structure can be designed according to the storage management specifications of the deployment environment. One feasible implementation is to create a root directory for the current batch of data processing tasks, and then generate corresponding subdirectories under this root directory according to the shard number, or directly store each shard file. For example, files named with numerical numbers can be stored in the root directory, with each file corresponding to a data shard. Another feasible implementation is to establish a multi-level directory hierarchy, for example, creating subdirectories level by level according to data version, task identifier, shard group, etc., and then storing the corresponding individual data files in each subdirectory. A well-designed directory structure allows a large number of individual data files to be organized in an orderly manner within the file system, avoiding the file system performance bottleneck that might be caused by laying all files flat in the same directory, and facilitating the rapid location and batch retrieval of required data files in subsequent processing stages based on the directory path. Through the series of operations described above, including data collection, storage, and directory structure generation, the initial sample dataset is completely transformed into a set of independent data files that are physically independent but logically constitute a complete data set. This lays the foundation for data organization for subsequent parallel processing using multiple processing nodes.

[0068] The data sharding and storage method provided in this application collects samples from an initial sample dataset according to a preset sample number and treats each batch of samples as a data shard. This gives the data partitioning process clear and configurable granular control capabilities. The preset sample number can be flexibly adjusted according to the resource capabilities of subsequent processing nodes, thereby achieving an on-demand balance between the number of shards and the size of a single shard. This avoids scheduling overhead expansion due to overly fine sharding or excessive single-point load due to overly coarse sharding. Simultaneously, by saving each data shard as an independent data file, each shard achieves physical isolation at the storage level, and the independent data files do not affect each other, which facilitates subsequent processing nodes. Independent addressing, loading, and manipulation at the file level ensure that the corruption or anomaly of a single file does not affect the data availability of other shards, thus improving the robustness of data storage. Furthermore, by generating storage directory structures for each independent data file, a hierarchical organization system is established for a large number of scattered independent data files. This allows files to be stored in an orderly manner within the storage system, avoiding the file system performance degradation caused by a massive number of files spread across the same directory. It also provides a clear addressing basis for batch file location and scheduling based on directory paths in subsequent processing stages. Therefore, from the source stage of data partitioning, an orderly, controllable, and highly scalable data organization foundation is provided for the efficient operation of the entire distributed processing flow.

[0069] In this embodiment, to ensure the security and correctness of each parallel processing task at the data access level, the executing entity can also perform parallel processing on each independent data file in the following ways: by setting an upper limit constraint on the number of concurrent processing tasks on each processing node through a preset slot allocation mechanism; and by allocating multiple independent data files to each processing node for parallel processing based on the upper limit constraint of each processing node according to the topology information of distributed training. The topology information includes global scale parameters, tensor parallel parameters, and pipeline parallel parameters.

[0070] In a distributed processing architecture, while multiple processing nodes can work simultaneously to improve overall processing efficiency, the computing power of each node is not unlimited. The number of concurrent processing tasks it can handle is limited by hardware resources such as the number of CPU cores, memory capacity, and I / O bandwidth. If the number of concurrent tasks on each node is not constrained, resource contention will inevitably occur when multiple tasks compete for the limited resources of the same node. This leads to a significant increase in the execution time of each task, a decrease in overall processing efficiency, and may even trigger task timeouts or node crashes due to resource exhaustion. Therefore, this embodiment uses a preset slot allocation mechanism to impose an upper limit on the number of concurrent processing tasks on each processing node, achieving a balance between fully utilizing node computing power and ensuring processing stability.

[0071] In this embodiment, the slot allocation mechanism is a resource management strategy used to control the number of concurrent tasks on each computing node in a distributed system. Each processing node can be considered to have a fixed number of slots, and each slot can only handle one data processing task at a time. The total number of slots represents the maximum number of concurrent tasks allowed on that node, and this value is typically preset based on the node's physical resource configuration (such as the number of CPU logical cores and available memory). When multiple independent data files need to be allocated to different processing nodes, the scheduler checks the current slot occupancy status of each node: if a node has free slots, the new data file can be allocated to that node; if all slots on that node are occupied, it must wait for existing tasks to complete and release the slots before accepting new allocation tasks. Through this mechanism, the number of concurrent processing tasks on each processing node is strictly limited to a preset upper limit, effectively avoiding performance degradation caused by overload.

[0072] After constraining the upper limit of the number of concurrent tasks on each node, multiple independent data files need to be allocated to various processing nodes for parallel processing based on the topology information of the distributed training. The topology information of the distributed training refers to a set of structured parameters describing the organization of computing resources and communication relationships within the distributed training cluster. Specifically, this topology information includes global scale parameters, tensor parallelism parameters, and pipeline parallelism parameters. Global scale parameters characterize the total number of computing nodes participating in distributed processing and the basic configuration information of each node; tensor parallelism parameters describe how model parameters are partitioned and distributed across multiple computing devices, reflecting the partitioning relationship of each node in the model dimension; pipeline parallelism parameters describe how different layers or stages of the model are allocated to different nodes, and the data flow dependencies between stages. The above topology information collectively constitutes an important reference for task allocation decisions.

[0073] In this embodiment, data file allocation based on topology information means that when assigning individual data files to processing nodes, the scheduler considers not only load balancing but also the matching relationship between data distribution and topology. For example, based on the stage division described by pipeline parallelism parameters, the scheduler can prioritize allocating files belonging to the same data parallel group to nodes within the same pipeline stage to reduce cross-stage data transfer overhead. Similarly, based on the partitioning dimension described by tensor parallelism parameters, the scheduler can align data file allocation with the model partitioning method, enabling each node to coordinate with locally stored model parameters when loading data, thereby improving the overlap efficiency of data reading and model computation. By incorporating topology information into file allocation decisions, the parallelism strategy for data processing and the parallelism strategy for model training are kept consistent at the organizational level, thereby reducing additional communication overhead introduced by mismatch between data allocation and computation topology.

[0074] Furthermore, during the parallel processing of independent data files using multiple processing nodes, a pre-defined concurrency control strategy is needed to explicitly limit access permissions for the same independent data file. This means that only one processing node is allowed to read and write to the same independent data file at any given time, ensuring data access security. This limitation is necessary in a distributed environment where multiple nodes share storage. Without this restriction, if two or more processing nodes simultaneously attempt to read and write to the same independent data file, it could lead to data inconsistency, content overwriting, or file corruption. This concurrency control strategy ensures that each independent data file is exclusively accessed by only one processing node at any given time, eliminating the risk of data contention that can arise from multiple nodes operating on the same file simultaneously, and guaranteeing data integrity and operational correctness for each shard during parallel processing. In this embodiment, the concurrency control strategy can be implemented using a file lock mechanism in a distributed file system or a distributed lock mechanism based on an external coordination service, thereby ensuring mutually exclusive access to the same file in a cross-node parallel processing environment.

[0075] The parallel processing method provided in this application embodiment imposes an upper limit constraint on the number of concurrent processing tasks on each processing node through a preset slot allocation mechanism. This ensures that the number of data processing tasks undertaken by each processing node at any given time is strictly limited to a preset threshold, thereby effectively avoiding resource contention and performance fluctuations caused by too many concurrent tasks on a single node. This guarantees the computational stability and responsiveness of each processing node during parallel processing. Simultaneously, by allocating multiple independent data files to each processing node for parallel processing based on the distributed training topology information and the upper limit constraint of each processing node, the data file allocation strategy aligns with the actual physical topology of the training cluster. The logically parallel architecture is matched, achieving coordinated optimization of data distribution and computing power, thereby improving the overall execution efficiency of processing tasks. In addition, through the preset concurrency control strategy, only one processing node is allowed to perform read and write operations on the same independent data file at the same time. This fundamentally eliminates problems such as data competition, read and write conflicts, or file deadlock that may be caused by multiple nodes accessing the same data file at the same time. This ensures the security and correctness of each parallel processing task at the data access level, so that in highly concurrent distributed processing scenarios, each processing node can independently and without interference complete the processing work of its assigned data file, further ensuring the accuracy and consistency of parallel processing results.

[0076] In this embodiment, in order to establish the grouping relationship between the independent data files at the logical level and provide a clear organizational structure for subsequent data aggregation by group, the execution entity can also merge the independent data files in the following way: according to the preset data parallel grouping strategy, traverse all the independent data files processed by each processing node, and classify the multiple processed independent data files belonging to the same data parallel group; for each data parallel group, load the data from each independent data file in the data parallel group and merge them to generate the sample dataset to be verified.

[0077] Specifically, the executing entity merges the independent data files after parallel processing to obtain the sample dataset to be validated. This operation is implemented by classifying all processed independent data files according to a pre-defined data parallel grouping strategy, and by loading and merging data for each group. A data parallel grouping strategy is a planning scheme used in distributed data processing scenarios to divide a large number of independent data files into different logical groups according to specific dimensions. In distributed training architectures, data parallelism is a common parallel training method. Its basic idea is to divide the complete training dataset into multiple data subsets, with each computing node holding a different data subset and independently performing forward propagation and gradient calculation. To match the data parallelism in the subsequent model training stage, the data files need to be organized according to the same data parallel grouping strategy during the data merging stage, so that files belonging to the same data parallel group can be directly used by the corresponding training nodes after merging. The specific content of the data parallel grouping strategy can be a balanced division based on the number of files or samples, a classification based on the partition number in the filename after modulo operation, or grouping based on certain attribute characteristics of the data itself. By presetting this grouping strategy, the merge operation has a clear classification basis, which can determine which files should be divided into the same group.

[0078] In this embodiment, the execution entity traverses all independent data files processed by each processing node and categorizes multiple processed independent data files belonging to the same data parallel group. This is a preliminary preparation step before the merging operation. Traversal means accessing each independent data file after parallel processing one by one to obtain its relevant information for attribution determination. In this embodiment, the traversal operation can be implemented by reading the directory list in the file system. Each independent data file carries or is associated with metadata information during storage, such as its original fragment number and the corresponding data parallel group identifier. The core action of classification is to determine which data parallel group each traversed file should belong to according to the rules of the data parallel grouping strategy. For example, if the grouping strategy stipulates that the attribution is determined by taking the modulo of the hash value of the filename with the total number of groups, the system calculates the hash value of each filename and performs the modulo operation, and assigns the file to the corresponding group based on the result. Through this process of traversal and classification, a large number of independent data files that were originally scattered in the storage system are reorganized into multiple logical file groups. Each file group corresponds to a parallel data group, and all files in the same group together contain all the sample data required by that group.

[0079] In this embodiment, for each data parallel group, the data from each independent data file within that data parallel group is loaded and merged to generate a sample dataset to be verified. After classification and partitioning, each data parallel group is associated with a set of independent data files. For each such group, the data content of each associated file needs to be actually read and merged together to form a complete dataset.

[0080] In this embodiment, the loading operation is achieved by sequentially reading the contents of each independent data file within the group. The data in each file is read into memory or a temporary cache in a streaming manner. The concatenation and merging operation connects the read data from each file in a predetermined order to form a continuous data sequence. The concatenation order can be arranged according to the file numbers from smallest to largest, or according to the file positions in the original dataset, as long as the order is predetermined and reproducible. Since each independent data file has undergone the same standardized processing operation in the previous parallel processing stage, the data within each file is consistent in format and structure. Therefore, the concatenation operation does not require additional format conversion or structure adaptation; it only needs to concatenate the data content end to end. After the above loading and concatenation operations for each data parallel group, each group generates a corresponding merged data set, which together constitute the complete sample dataset to be verified. The sample data in this dataset has been reasonably organized and arranged according to the data parallel grouping strategy. In subsequent use, all sample data of the corresponding group can be directly extracted according to the group identifier without performing additional grouping conversion or data rearrangement operations.

[0081] The merging method provided in this application embodiment traverses all independent data files processed by each processing node according to a preset data parallel grouping strategy, and classifies multiple processed independent data files belonging to the same data parallel group. This allows a large number of independent data files originally scattered across multiple processing nodes to be reorganized and classified according to the dimension of data parallel grouping, thereby establishing the grouping relationship between files at the logical level and providing a clear organizational structure for subsequent data aggregation by group. Furthermore, by loading the data from each independent data file within each data parallel group and merging them, the data files belonging to the same data parallel group are reorganized and classified according to the dimension of data parallel grouping. Sample data originally stored in multiple independent files within a group can be sequentially concatenated into a continuous data sequence. This eliminates the data fragmentation caused by scattered file storage and maintains the original order and integrity of the sample data within each file during the merging process. The resulting dataset of samples to be verified forms a complete and continuous data whole in each data parallel group dimension. This provides a ready-to-use dataset format for subsequent stages that need to access and process data in a data parallel group manner, avoiding the additional overhead caused by repeatedly performing file traversal, classification, and loading operations during the usage stage, and improving the overall efficiency of the data pipeline.

[0082] Please refer to Figure 4 , Figure 4 A flowchart of a model training method provided in this disclosure embodiment, wherein process 400 includes the following steps: Step 402: Obtain the training sample dataset generated by the above sample data processing method; During the model training phase, the first step is to acquire the training sample dataset generated by the aforementioned sample data processing methods. Acquisition refers to the process by which the model training system reads or loads this dataset from persistent storage. This training sample dataset is the final result generated after a series of pre-processing operations, including standardization preprocessing, distributed sharding, parallel processing, merging, and integrity verification, have been completed offline. Unlike the conventional training process, which requires acquiring unprocessed data from the original data source, the data acquired here is already fully processed, formatted, complete, and quality-verified.

[0083] In this embodiment, the specific implementation of the acquisition operation can be through the dataset loading interface in the training script, specifying the storage path of the training sample dataset in a distributed file system or object storage, and the training framework automatically loads the sample data in the dataset into the memory space of the training process. Since the dataset has already completed all necessary preprocessing in the offline stage, the loading process only involves reading and deserializing the data, without the need for any additional data transformation logic.

[0084] Step 402: Input the dataset of samples to be trained into the model to be trained and train the model.

[0085] After obtaining the training sample dataset, this dataset is input into the model to be trained. During the training phase, the standardization preprocessing of the input data is skipped, and the training sample dataset is directly used as the actual input data to perform model training.

[0086] In this embodiment, inputting the training sample dataset into the training model means sending each sample data in the dataset into the model's input layer according to the data format and batch organization method required for training. This operation is typically manifested as the data loader in the training framework reading samples from the dataset in batches according to a preset batch size, and passing each batch of data to the model's forward computation interface in the form of tensors or arrays. The training model refers to an artificial intelligence model that has not yet completed training or needs further parameter optimization. Its structure typically includes an input layer, several hidden layers, and an output layer, each containing weight parameters to be learned. The essence of model training is to use labeled sample data to calculate the prediction result through forward propagation, calculate the gradient through backpropagation, and update the model parameters according to the gradient, thereby gradually reducing the prediction error of the model on the training data and eventually converging to a better parameter state. During the training process, the above forward, backpropagation, and parameter update process is repeated in each training round or each iteration step until a preset stopping condition is met.

[0087] In this embodiment, the standardized preprocessing of the input data is skipped during the training phase, and the model training is performed directly using the dataset to be trained as the actual input data. Skipping this step means that the data loading pipeline in the training process will no longer include any standardized preprocessing steps or function calls. In a conventional model training process, the data loading section of the training script typically includes a preprocessing function, which is executed after each batch of data is loaded but before being fed into the model. This function performs operations such as data format conversion, normalization, and outlier handling. However, in this embodiment, since the dataset to be trained has already undergone all the aforementioned standardized preprocessing operations in the preceding offline processing, these preprocessing steps are no longer needed in the data loading pipeline during the training phase. After loading each batch of sample data, the training system does not call any additional format conversion or numerical normalization functions, but directly uses the loaded sample data as the model input for forward computation. This skipping operation can be implemented through the configuration of the training script, for example, by setting the preprocessing parameters of the data loader to null, or by not adding any preprocessing operators when building the data pipeline.

[0088] In this embodiment, directly using the training sample dataset as the actual input data further clarifies the usage of the input data. Here, "direct" signifies that the data transfer path from loading to inputting into the model is streamlined, without any additional data transformation steps. Specifically, when the training system reads a batch of samples from the training sample dataset from the storage medium, these samples are already in the standardized format required by the model. For example, text data has been converted into a standard index sequence, image data has been adjusted to a uniform size and normalized to a preset numerical range, and video data has been sampled to a consistent frame rate and resolution. The training system only needs to deserialize this data from the storage format into a memory data structure that the model can accept, and then immediately feed it into the model for computation.

[0089] This "direct" input mode minimizes the data preparation time for each training iteration and shifts the dependence of the training process on data quality from the training phase to the pre-training offline processing phase, thus making the execution of the training phase more stable and predictable. Throughout the training process, each batch of sample data received by the model has a uniform format and standardized numerical range, which provides a reliable data foundation for the stable updating of model parameters.

[0090] The model training method provided in this embodiment obtains the training sample dataset generated by the aforementioned sample data processing method, enabling the model training phase to directly obtain data input that has undergone a complete preprocessing process and is in a ready state. This eliminates the need for data collection and preprocessing of raw data at the start of the training process. Based on this, the training sample dataset is input into the model for training. During the training phase, the standardization preprocessing of the input data is skipped, and the training sample dataset is directly used as the actual input data for model training. This ensures that each iteration step in the training process does not require any format conversion or normalization. Data processing operations such as abnormal filling or field filtering are eliminated. Data can be directly fed into the model for calculation after being loaded from the storage medium, which significantly shortens the data preparation time for each training batch and eliminates I / O wait and computation delays introduced by online preprocessing. At the same time, since the data input path during the training phase is greatly simplified, the risk of training interruption or error caused by the uncertainty of the data preprocessing link in the entire training process is also effectively avoided, making the model training process more stable and smooth. Especially in large-scale and long-term training tasks, this improvement in stability will directly translate into reliable progress in training and full utilization of computing resources.

[0091] To enhance understanding, this disclosure also provides a specific implementation scheme in conjunction with a particular application scenario.

[0092] I. Scene Setting

[0093] Suppose we are training a multimodal large-scale model for an internet company. This model needs to simultaneously understand product images and corresponding user reviews to achieve "image-text matching" and "cross-modal retrieval" functions. The company's data team collected raw data from business logs, totaling 100,000 samples. Each sample contains a main product image (various formats and sizes) and a text review (containing special symbols and varying lengths). Our goal is to transform this disorganized raw data into a standard dataset that can be directly used by the training system through the processing pipeline of this solution.

[0094] II. Offline Standardized Preprocessing

[0095] The data team first launched an offline data processing task, which ran on a dedicated CPU server isolated from the training cluster.

[0096] The system reads 100,000 original samples from distributed storage. For each sample, the system decodes the product image from various formats into a standard tensor data structure and scales all images to the same spatial size. For text comments, the system converts all characters to a standard encoding format and filters out meaningless special characters. Simultaneously, the system detects that a small number of samples have corrupted image files or empty text content, and performs padding on these abnormal samples, such as replacing corrupted images with solid color images and replacing empty comments with placeholders. After completing the above transformations, the system removes fields irrelevant to training from the original data, such as user ID, browsing timestamps, device model, and other metadata, retaining only the image content, text content, and corresponding category labels. Through this series of operations, the original 100,000 heterogeneous data entries are transformed into a uniformly formatted and structurally sound initial sample dataset, which is then temporarily stored in a distributed file system.

[0097] III. Distributed Sharding and Storage

[0098] At this point, the initial sample dataset is still stored centrally in a single logical dataset. To leverage the parallel processing capabilities of multiple servers, the system begins to shard the data.

[0099] The system pre-defines each data shard to contain 5000 samples. Following the sample order in the initial dataset, the system collects samples sequentially, forming a data shard after every 5000 samples are collected. After this process, the 100,000 samples are divided into 20 data shards. For each shard, the system saves it as an independent binary data file, with the filename numbered according to the shard order. Simultaneously, the system creates a root directory in distributed storage named by task ID and timestamp, and stores all 20 independent data files in this directory. The storage path of each file is recorded in the system's metadata service. At this point, the initial sample dataset in centralized storage has been transformed into 20 independent data files distributed across the storage system, each of which can be independently addressed and loaded.

[0100] IV. Distributed Parallel Processing

[0101] Next, the system utilizes a distributed computing cluster to process these 20 independent data files in parallel. This cluster consists of four processing nodes, each equipped with a multi-core CPU and ample memory.

[0102] Before the task starts, the system scheduler determines the concurrent task limit for each node through a slot allocation mechanism, setting each node to process a maximum of two data files simultaneously. At this point, there are a total of eight available slots across the four nodes. The scheduler distributes the 20 independent data files to each node in batches, taking into account the distributed training topology. Specifically, given that subsequent model training will employ a 2-way pipeline parallelism and a 2-way tensor parallelism configuration, the scheduler tries to allocate consecutively numbered data files to nodes within the same pipeline stage to reduce cross-node communication during subsequent data merging. After receiving the allocated files, each node independently loads its own data file and performs the same processing operations, including text segmentation and encoding, image feature extraction and compression, and length calculation for each sample. During processing, a concurrency control strategy ensures that only one node accesses the same data file at a time; when a node is processing a file, other nodes cannot read or write to that file. After a period of parallel operation, all 20 data files are processed, and each node writes the processing results back to the storage system, forming a new set of processed independent data files.

[0103] V. Merging intermediate data

[0104] After parallel processing is complete, there are 20 processed data shards in the system. Since these files are scattered across the output directories of various processing nodes, they need to be merged back into a complete dataset.

[0105] The system first reads the preset data parallel grouping strategy. Assuming subsequent training will use 4-way data parallelism, the grouping strategy specifies that the 20 processed data files are evenly divided into 4 data parallel groups, each containing 5 files. The division method is determined by taking the file number modulo the total number of groups. The system iterates through all 20 files, classifying each file into its corresponding group according to the above rules. For example, files whose numbers leave a remainder of 0 when modulo 4 are assigned to group 0, those with a remainder of 1 to group 1, and so on. After classification, the system sequentially performs data loading and concatenation for each group: loading the data content from each file in that group and concatenating the data from each file in ascending order of file number into a continuous data sequence. After this operation, each of the 4 data parallel groups generates a merged dataset, which together constitutes the complete dataset to be validated. This dataset has been logically restored to a unified whole, but has not yet undergone final quality verification.

[0106] VI. Integrity Verification and Cleanup

[0107] Before the sample dataset to be verified is officially used, the system must perform an integrity check to confirm that the data content has not been damaged or omitted after undergoing complex processes such as fragmentation, transmission, parallel processing and merging.

[0108] The system initiates a verification process, comparing the dataset to be verified with the initially generated dataset. First, the total number of samples is compared, confirming both are 100,000. Then, the system randomly selects several samples from the dataset to be verified and compares each sample's key fields to ensure complete consistency with the corresponding samples in the initial dataset. After the complete verification process, the system confirms that all samples are intact and their content has not undergone any unexpected changes, thus passing the integrity verification. At this point, the system marks the dataset as "verified and usable," officially designating it as the training dataset, meaning it is fully qualified for model training. Next, the system triggers a cleanup operation, deleting all intermediate data generated throughout the processing flow according to a preset cleanup strategy. This includes the 20 original fragment files generated in step three, the 20 processed fragment files generated in step four, and local temporary cache files generated during the operation of each node. After cleanup, only the final training dataset is retained in the storage system, and a large amount of temporarily occupied storage space is promptly released.

[0109] VII. Model Training Phase

[0110] Finally, the dataset of samples to be trained was delivered to the model training team. The training team then launched a large-scale distributed training task, which utilized dozens of GPU servers.

[0111] The training script's data loading module directly reads the training sample dataset from the storage system. Since this dataset has undergone all standardized preprocessing operations offline, including data format conversion, normalization, anomaly imputation, redundancy removal, and sequence packing, the training script skips all preprocessing steps when loading data. In each training iteration, the system reads sample data from the dataset in batches. This sample data, upon reading, already has a uniform format and standardized numerical range, and can be directly fed into the model for forward and backward propagation calculations without any further conversion. Throughout the training process, the GPU no longer needs to wait for the CPU to perform online word segmentation or image scaling operations. The data loading path is significantly shortened, resulting in a smooth and stable training process without any training interruptions caused by data preprocessing delays or anomalies.

[0112] In the specific embodiment disclosed in this example, 100,000 pieces of messy original image and text data are preprocessed offline to form an initial sample dataset. This dataset is then divided into 20 independent files through distributed sharding and storage. Distributed computation is performed through multi-node parallel processing. After merging and grouping, a complete dataset to be verified is formed. Integrity verification and cleanup confirm the data is error-free and resources are released. Finally, the dataset is directly loaded and used during the model training phase. The entire process embodies a complete technical concept of decoupling offline preprocessing from online training, distributed parallel acceleration, quality verification assurance, and automatic resource cleanup, effectively solving the problem of training data preparation efficiency in large-scale multimodal data scenarios.

[0113] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a sample data processing apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0114] like Figure 5 As shown, the sample data processing device 500 of this embodiment may include: a data acquisition unit 501, a dataset generation unit 502, a sharding processing unit 503, and an integrity verification unit 504. The data acquisition unit 501 is configured to acquire multimodal sample data to be used in the model training phase; the dataset generation unit 502 is configured to perform standardized preprocessing on the multimodal sample data in an offline environment after acquiring the multimodal sample data and before using it as training samples for the model to be trained, to generate an initial sample dataset; the sharding processing unit 503 is configured to perform distributed sharding processing on the initial sample dataset, and merge the shards after parallel processing to obtain a sample dataset to be verified; the integrity verification unit 504 is configured to, in response to the integrity verification of the sample dataset to be verified, use the sample dataset to be verified as the sample dataset to be trained, so that the sample dataset to be trained can be directly used as actual input data during the training phase of the model to be trained.

[0115] In this embodiment, the specific processing of the data acquisition unit 501, the dataset generation unit 502, the fragmentation processing unit 503, and the integrity verification unit 504 in the sample data processing device 500, and the resulting technical effects, can be found in the following references: Figure 2 The relevant descriptions of steps 201-204 in the corresponding embodiments will not be repeated here.

[0116] In some optional implementations of this embodiment, the standardization preprocessing in the dataset generation unit 502 includes: converting multimodal sample data into a serializable native data structure, performing normalization processing on the native data structure, filling in detected abnormal or missing data, and filtering key fields required for training to remove redundant data.

[0117] In some optional implementations of this embodiment, the sharding processing unit 503 is further configured as follows: a sharding saving module, configured to divide the initial sample dataset into multiple data shards and save each data shard as an independent data file; a parallel processing module, configured to use multiple processing nodes to perform parallel processing on each independent data file; and a data merging module, configured to merge the independent data files after parallel processing to obtain the sample dataset to be verified.

[0118] In some optional implementations of this embodiment, the fragment storage module in the fragment processing unit 503 is further configured as follows: a sample acquisition module is configured to acquire samples from the initial sample dataset according to a preset number of samples, and to treat each batch of acquired samples as a data fragment; a data storage module is configured to save each data fragment as an independent data file and generate a storage directory structure for each independent data file.

[0119] In some optional implementations of this embodiment, the parallel processing module in the sharding processing unit 503 is further configured as follows: a constraint module is configured to impose an upper limit constraint on the number of concurrent processing tasks on each processing node through a preset slot allocation mechanism; and a data processing module is configured to allocate multiple independent data files to each processing node for parallel processing based on the upper limit constraint of each processing node according to the topology information of the distributed training. The topology information includes global scale parameters, tensor parallel parameters, and pipeline parallel parameters.

[0120] In some optional implementations of this embodiment, the constraint module in the sharding processing unit 503 includes: allowing only one processing node to perform read and write operations on the same independent data file at the same time through a preset concurrency control strategy.

[0121] In some optional implementations of this embodiment, the data merging module in the sharding processing unit 503 is further configured as follows: a data partitioning module is configured to traverse all independent data files processed by each processing node according to a preset data parallel grouping strategy, and classify and partition multiple processed independent data files belonging to the same data parallel group; a data loading module is configured to load the data in each independent data file within each data parallel group and merge and concatenate them to generate a sample dataset to be verified.

[0122] In some optional implementations of this embodiment, the integrity verification unit 504 is further configured as follows: a data verification module, configured to compare the sample dataset to be verified with the initial sample dataset to verify the integrity and consistency of each sample data in the sample dataset to be verified; a training dataset generation module, configured to use the sample dataset to be verified as the training sample dataset in response to the integrity verification passing; and a data cleaning module, configured to delete the intermediate data and temporary cache data generated during the generation of the sample dataset to be verified according to a preset cleaning strategy.

[0123] In some optional implementations of this embodiment, the multimodal sample data includes at least two of the following: text data, image data, and video data.

[0124] This embodiment is a device embodiment corresponding to the above method embodiment. The sample data processing device provided in this embodiment, by separating the data standardization preprocessing operation from the model training stage and executing it independently in an offline environment, fundamentally avoids the repeated parsing and cleaning of the original multimodal sample data during training, significantly simplifies the data input process in the training stage, thereby effectively reducing the computational load and I / O overhead of online training tasks and reducing the occupation of GPU memory resources; at the same time, by introducing a distributed sharding processing architecture for the initial sample dataset, using multiple nodes to process the data shards in parallel and then merge them, massive amounts of multimodal data can be processed efficiently and quickly offline, greatly shortening the processing time. The total preparation time was calculated. Furthermore, by adding an integrity verification step after parallel processing, the integrity and error-free nature of the data content of the sample dataset to be verified after distributed processing were ensured, thereby maintaining data quality while ensuring data processing efficiency. Finally, thanks to the organic combination of the above offline preprocessing and distributed processing, the training phase can directly use the verified sample dataset to be trained as the actual input data. This eliminates the waiting delay and potential failure risks introduced by the uncertainty of data preprocessing in the training phase, and ensures that the sample data sent to the model has a uniform and standardized format and complete and reliable content. Thus, the stability, smoothness and overall training efficiency of the training process are significantly improved in the large-scale training scenario of multimodal models.

[0125] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a model training device, which is similar to... Figure 3 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0126] like Figure 6As shown, the sample data processing apparatus 600 of this embodiment may include: a dataset acquisition unit 601 and a model training unit 602. The dataset acquisition unit 601 is configured to acquire a training sample dataset generated by the sample data processing method of any one of claims 1-9; the model training unit 602 is configured to input the training sample dataset into the training model to train the model, wherein, during the training phase, the standardization preprocessing operation of the input data is skipped, and the training sample dataset is directly used as the actual input data to perform model training.

[0127] In this embodiment, the specific processing of the dataset acquisition unit 601 and the model training unit 602 in the sample data processing device 600, and the resulting technical effects, can be found in reference to [reference needed]. Figure 4 The relevant descriptions of steps 401-402 in the corresponding embodiments will not be repeated here.

[0128] This embodiment exists as a device embodiment corresponding to the above method embodiment. The model training device provided in this embodiment obtains the training sample dataset generated by the aforementioned sample data processing method, enabling the model training stage to directly obtain data input that has undergone a complete preprocessing process and is in a ready state. This eliminates the need for data collection and preprocessing of the original data at the start of the training process. Based on this, the training sample dataset is input into the model to be trained, and the standardized preprocessing operation of the input data is skipped during the training stage. The training sample dataset is directly used as the actual input data to perform model training, so that each iteration step in the training process does not require... Perform any data processing operations such as format conversion, normalization, exception filling, or field filtering. Data can be directly fed into the model for calculation after being loaded from the storage medium, which significantly shortens the data preparation time for each training batch and eliminates I / O wait and computation delays introduced by online preprocessing. At the same time, since the data input path during the training phase is greatly simplified, the risk of training interruption or error caused by the uncertainty of the data preprocessing stage is effectively avoided. This makes the model training process more stable and smooth. Especially in large-scale, long-term training tasks, this improvement in stability will directly translate into reliable progress in training and full utilization of computing resources.

[0129] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to implement the sample data processing method or model training method described in any of the above embodiments.

[0130] According to embodiments of this disclosure, this disclosure also provides a readable storage medium storing computer instructions that enable a computer to implement the sample data processing method or model training method described in any of the above embodiments when executed.

[0131] According to embodiments of this disclosure, this disclosure also provides a computer program product that, when executed by a processor, can implement the sample data processing method or model training method described in any of the above embodiments.

[0132] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0133] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded into random access memory (RAM) 703 from storage unit 708. The RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0134] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0135] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the sample data processing method. For example, in some embodiments, the sample data processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the sample data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the sample data processing method by any other suitable means (e.g., by means of firmware).

[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0138] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0141] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0142] According to the technical solution of this disclosure, by separating the data standardization preprocessing operation from the model training stage and executing it independently in an offline environment, the repeated parsing and cleaning of the original multimodal sample data during training is fundamentally avoided, significantly simplifying the data input process during training. This effectively reduces the computational load and I / O overhead of online training tasks and reduces the occupation of GPU memory resources. Simultaneously, by introducing a distributed sharding processing architecture for the initial sample dataset, multi-node parallel processing of data shards followed by merging enables massive amounts of multimodal data to be processed efficiently and quickly offline, significantly shortening the total time spent on data preparation. Furthermore, through… Adding an integrity verification step after parallel processing ensures the integrity and accuracy of the data content of the sample dataset to be verified after distributed processing, thereby maintaining data quality while ensuring data processing efficiency. Finally, thanks to the organic combination of the above offline preprocessing and distributed processing, the training phase can directly use the verified sample dataset to be trained as the actual input data. This eliminates the waiting delay and potential failure risks introduced by the uncertainty of data preprocessing in the training phase, and ensures that the sample data sent to the model has a uniform and standardized format and complete and reliable content. Thus, it significantly improves the stability, smoothness and overall training efficiency of the training process in the scenario of large-scale training of multimodal models.

[0143] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0144] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A sample data processing method, comprising: Acquire multimodal sample data that will be used in the model training phase; After obtaining the multimodal sample data and before using it as training samples for the model to be trained, the multimodal sample data is subjected to standardization preprocessing in an offline environment to generate an initial sample dataset. Distributed sharding processing is performed on the initial sample dataset, and the shards are processed in parallel and then merged to obtain the sample dataset to be verified. In response to the integrity check of the sample dataset to be verified, the sample dataset to be verified is used as the sample dataset to be trained, so that the sample dataset to be trained can be directly used as the actual input data during the training phase of the model to be trained.

2. The method according to claim 1, wherein, The standardization preprocessing includes: converting the multimodal sample data into a serializable native data structure, performing normalization processing on the native data structure, filling in detected abnormal or missing data, and selecting key fields required for training to remove redundant data.

3. The method according to claim 1, wherein, The initial sample dataset is processed by distributed sharding, and the shards are processed in parallel and then merged to obtain the sample dataset to be verified, including: The initial sample dataset is divided into multiple data fragments, and each data fragment is saved as an independent data file. The independent data files are processed in parallel using multiple processing nodes; The independent data files, after parallel processing, are merged to obtain the sample dataset to be verified.

4. The method according to claim 3, wherein, The step of dividing the initial sample dataset into multiple data fragments and saving each data fragment as an independent data file includes: Samples are collected from the initial sample dataset according to a preset sample number, and each batch of samples collected is treated as a data slice; Each data fragment is saved as an independent data file, and a storage directory structure for each independent data file is generated.

5. The method according to claim 3, wherein, The parallel processing of each independent data file using multiple processing nodes includes: The number of concurrent processing tasks on each processing node is constrained by a preset slot allocation mechanism. Based on the topology information of the distributed training, the multiple independent data files are allocated to each processing node for parallel processing based on the upper limit constraints of each processing node. The topology information includes global scale parameters, tensor parallel parameters, and pipeline parallel parameters.

6. The method according to claim 5, wherein, The method of setting an upper limit on the number of concurrent processing tasks on each processing node through a preset slot allocation mechanism includes: By using a pre-defined concurrency control strategy, only one processing node is allowed to perform read and write operations on the same independent data file at any given time.

7. The method according to claim 3, wherein, The step of merging the independent data files after parallel processing to obtain the sample dataset to be verified includes: According to the preset data parallel grouping strategy, all independent data files processed by each processing node are traversed, and multiple processed independent data files belonging to the same data parallel group are classified and divided. For each data parallel group, the data from each independent data file within that data parallel group is loaded and merged to generate the sample dataset to be verified.

8. The method according to claim 1, wherein, The step of using the sample dataset to be verified as the training sample dataset in response to the integrity verification of the sample dataset to be verified includes: The dataset to be verified is compared with the initial dataset to verify the integrity and consistency of each sample data in the dataset to be verified. In response to the successful integrity verification, the dataset to be verified is used as the dataset to be trained. According to the preset cleaning strategy, the intermediate data and temporary cache data generated during the generation process of the sample dataset to be verified are deleted.

9. The method according to claim 1, wherein, The multimodal sample data includes at least two of the following: text data, image data, and video data.

10. A model training method, comprising: Obtain the training sample dataset generated by the sample data processing method according to any one of claims 1-9; The training sample dataset is input into the training model to train the model. During the training phase, the standardization preprocessing operation of the input data is skipped, and the training sample dataset is directly used as the actual input data to perform model training.

11. A sample data processing apparatus, comprising: The data acquisition unit is configured to acquire multimodal sample data that will be used in the model training phase; The dataset generation unit is configured to perform standardization preprocessing on the multimodal sample data in an offline environment after acquiring the multimodal sample data and before using the multimodal sample data as training samples for the model to be trained, to generate an initial sample dataset. The sharding processing unit is configured to perform distributed sharding processing on the initial sample dataset, and merge the shards after parallel processing to obtain the sample dataset to be verified. The integrity verification unit is configured to, in response to the integrity verification of the sample dataset to be verified, use the sample dataset to be verified as the sample dataset to be trained, so that the sample dataset to be trained can be directly used as the actual input data during the training phase of the model to be trained.

12. A model training device, comprising: The dataset acquisition unit is configured to acquire the training sample dataset generated by the sample data processing method according to any one of claims 1-9; The model training unit is configured to input the training sample dataset into the training model to train the model, wherein, during the training phase, the standardization preprocessing operation of the input data is skipped, and the training sample dataset is directly used as the actual input data to perform model training.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.

14. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-10.

15. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-10.