A parallel big data generation method for supercomputers

Through linear congruential algorithm parallelization and pseudo-random number generator, a parallel big data generation method suitable for supercomputers is constructed, which solves the problem of low data generation speed and parallelization degree in the existing technology, and achieves efficient generation to meet different needs. The data set required by the distribution is suitable for a variety of big data processing and analysis algorithms on supercomputers.

CN114969666BActive Publication Date: 2024-09-06NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210625713.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2024-09-06
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

Existing parallel big data processing algorithms cannot adapt to the architecture of supercomputers, resulting in low data generation speed and low degree of parallelization, and cannot meet the benchmark testing needs of supercomputers in big data processing.

Method used

Using a linear congruential algorithm parallelization scheme, by generating pseudo-random numbers consistent with uniform distribution and constructing a parallel pseudo-random number generator, an artificial data set generation algorithm is designed to control the data scale and statistical properties, including classification and aggregation. Datasets for class, regression and factorization.

Benefits of technology

It realizes the efficient generation of data sets that meet different distribution requirements on supercomputers, solves the problem of insufficient data set size, improves the data generation speed and degree of parallelization, and is suitable for a variety of big data processing and analysis algorithms on supercomputers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969666B
    Figure CN114969666B
Patent Text Reader

Abstract

The present invention discloses a parallel big data generation method for supercomputers, comprising: S1, generating pseudo-random numbers that meet uniform distribution according to a linear congruential algorithm; S2, designing a parallelization scheme for the linear congruential algorithm; S3, generating a series of random numbers that meet different distributions according to a parallel linear congruential algorithm and various function mapping relationships, and constructing a parallel pseudo-random number generator; S4, using the parallel pseudo-random number generator to design artificial data set generation algorithms for controlling data scale and statistical attributes for different purposes. The present invention can solve the problem of insufficient data set size in big data processing and analysis algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and more specifically, to a parallel big data generation method for supercomputers. Background Art

[0002] The advent of the big data era has led to a large number of enterprises and scientific research institutions having to process data at the PB level or even the EB level. Massive data has brought massive value, and people's lifestyles are becoming more and more intelligent. However, the dramatic increase in data size has also brought new challenges to traditional big data processing platforms and big data processing and analysis algorithms. Given the huge data storage capacity and extremely fast data processing speed of supercomputers, they are widely used in various fields such as atmospheric and marine environment, industrial design and manufacturing, biomedical health, astronomy and geophysics, new energy and new materials. With the deep integration of high-performance computing and big data processing, researchers have long tried to deploy big data processing systems on supercomputers. However, parallel big data processing algorithms running on supercomputers require large data sets for benchmark function testing.

[0003] In recent years, data generators for different occasions and environments have been studied at home and abroad. Abroad, Eric et al. proposed the DBMS test suite MyBenchmark and data generation tools, which take a set of query operations as input to generate database instances, and users can also control the characteristics of the generated load; Kenneth et al. converted the generation of data tables into a graph traversal process, which can ensure relatively good attribute dependency and probability distribution, but because the focus is on maintaining attribute dependency, the degree of data parallelization is not high, which reduces the speed of data table generation. In China, Zhan Jianfeng et al. from the Institute of Computing Technology proposed the big data test benchmark BigDataBench, which uses a combination of one or more data modules to represent the diversity of big data and artificial intelligence workloads. Its benchmark test program covers multiple big data application fields; Gu Ling et al. developed a distributed online generation system Chronos for streaming data, which can control the speed and throughput of generation by users, and can maintain the association and time dependency between attributes during data generation, and generate data that meets the streaming database test suite.

[0004] However, the above solutions are all oriented to specific application scenarios and research fields and cannot adapt to the architecture of supercomputers. Currently, there is no relevant literature that specifically provides a benchmark suite for the general big data processing and analysis algorithm (classification, clustering, regression, factor decomposition, etc.) library on supercomputers. Therefore, it is necessary to develop a parallel big data generation method for supercomputers. Summary of the invention

[0005] The purpose of the present invention is to provide a parallel big data generation method for supercomputers to overcome the defects of the prior art.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0007] A parallel big data generation method for supercomputers comprises the following steps:

[0008] S1. Generate pseudo-random numbers that conform to uniform distribution according to the linear congruential algorithm;

[0009] S2. Design a parallelization scheme for the linear congruential algorithm;

[0010] S3. Generate a series of random numbers that meet different distributions according to the parallel linear congruential algorithm and various function mapping relationships, and construct a parallel pseudo-random number generator;

[0011] S4. Use parallel pseudo-random number generators to design artificial dataset generation algorithms for different purposes to control data size and statistical properties.

[0012] Furthermore, the step S1 generates a pseudo-random number that conforms to a uniform distribution through the following iterative formula:

[0013] X i+1 =(aX i +c)mod m, i=0, 1, 2, ... n; where

[0014] Among them, X0 is the initial seed of the random number generator, a is the multiplier, c is the increment, m is the modulus, and X i is the ith random number.

[0015] Furthermore, the step S2 is specifically as follows: using the same random number generator, each process of the random number generator generates a different subsequence in the random number sequence, and then using the jump method to parallelize the linear congruential algorithm.

[0016] Furthermore, the step S3 also includes: obtaining pseudo-random numbers of arbitrary probability distribution through transformation and mapping relationship, and constructing random number generation methods of other distributions.

[0017] Furthermore, the other distributions include the Box-Muller algorithm for generating normal distribution, the Knuth algorithm for generating random numbers that conform to Poisson distribution, the algorithm for generating multidimensional normal distribution from the covariance matrix and the correlation coefficient matrix, and the rejection method and inverse function method for generating other continuous distribution random numbers.

[0018] Furthermore, the artificial data set captured in S4 includes a data set for classification and clustering, a regression data set, a manifold learning data set, and a factor decomposition data set.

[0019] Compared with the prior art, the advantages of the present invention are: a parallel big data generation method for supercomputers provided by the present invention can solve the problem of insufficient data collection volume in big data processing and analysis algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 It is the basic framework diagram of MPI parallel programming in the prior art.

[0022] Figure 2 It is a flow chart of the parallel big data generation method for supercomputers of the present invention.

[0023] Figure 3 It is a structural diagram of the data set in the present invention.

[0024] Figure 4 It is a parallel schematic diagram of the make_gaussian_quantiles algorithm in the present invention.

[0025] Figure 5 It is a corresponding diagram between the file and the viewport in the present invention.

[0026] Figure 6 It is a diagram of the writing process of the shared file in the present invention.

[0027] Figure 7 It is a schematic diagram of block mapping of data sets in the present invention. DETAILED DESCRIPTION

[0028] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0029] The design concept of the present invention is parallel programming, and the relevant functions are implemented using C language and MPI. MPI can be understood as a parallel programming technology based on message passing, and can also be understood as a communication protocol between processes. MPI provides hundreds of parallel communication interfaces, which can be directly called in C language. The message passing model is oriented to programming for single-program multi-data parallel computers with distributed memory. This embodiment mainly uses the message passing model for parallel programming and implementation. Commonly used communication interfaces include: MPI_Bast, MPI_Satter, MPI_Gather, MPI_Allgather, MPI_Allgatherall, MPI_Send, MPI_Recv, MPI_Barrier, etc.

[0030] In this embodiment, the basic idea of ​​parallel programming is to divide a large task into several meta-tasks according to the task volume or data. In order to reduce the communication between processes, an appropriate amount of meta-tasks are merged, and then specific mapping rules are set to distribute them to multiple independent processes for parallel execution. In the same communicator, each process has a unique identifier rankID, and each process is usually controlled to run the same or different code blocks according to the rankID. And according to the actual data needs of the program, the MPI communication interface is called for message transmission. The usual MPI program structure is as follows: Figure 1 As shown:

[0031] See also Figure 2 As shown, this embodiment discloses a parallel big data generation method for supercomputers, comprising the following steps:

[0032] Step S1, generating pseudo-random numbers that conform to uniform distribution according to a linear congruential algorithm.

[0033] Specifically, the pseudo-random numbers that conform to the uniform distribution are generated through the following iterative formula:

[0034] X i+1 =(aX i +c)mod m, i=0, 1, 2, ... n; where

[0035] Among them, X0 is the initial seed of the random number generator, a is the multiplier, c is the increment, m is the modulus, and X i is the ith random number.

[0036] Step S2: design a parallelization scheme for the linear congruential algorithm.

[0037] Specifically, the same random number generator is used, and each process of the random number generator generates a different subsequence in the random number sequence, and then the linear congruential algorithm is parallelized using the jump method.

[0038] Step S3: Generate a series of uniformly distributed random numbers according to a parallel linear congruential algorithm to construct a parallel pseudo-random number generator.

[0039] Specifically, pseudo-random numbers of arbitrary probability distribution are obtained through transformation and mapping relationships, and random number generation methods of other distributions are constructed. Other distributions include the Box-Muller algorithm to generate normal distribution, the Knuth algorithm to generate random numbers that conform to Poisson distribution, the algorithm to generate multi-dimensional normal distribution from the covariance matrix and the correlation coefficient matrix, and the rejection method and inverse function method to generate random numbers of other continuous distributions. Therefore, a complete parallel pseudo-random number generator can be constructed.

[0040] Step S4: using a parallel pseudo-random number generator to design an artificial data set generation algorithm for controlling data scale and statistical properties for different purposes.

[0041] Specifically, by investigating the actual needs of big data processing and analysis algorithms, the following types of data sets are mainly implemented: artificial data sets include data sets for classification and clustering, regression data sets, manifold learning data sets, and factor decomposition data sets, such as Figure 3 shown.

[0042] Since the data set generator generates as many as 17 data sets, this embodiment takes a data set generation algorithm as an example to explain in detail its parallel design process and implementation.

[0043] Algorithm 1. make_gaussian_quantiles algorithm

[0044] Init (initialization):

[0045] ① Input the number of samples n_samples, the number of features n_features, the mean mean[], the covariance coefficient cov, and the number of categories n_classes;

[0046] ②Initialize the random number seed myseed;

[0047] ③ Generate a random number data set X with n_samples n_features dimensions that conforms to the multidimensional standard normal distribution;

[0048] ④X X mean+cov;

[0049] ⑤for(each sample point i)do

[0050] Calculate the variance of the sample point sequence:

[0051]

[0052] end for

[0053] ⑥ Sort the variance of each sample in the sample set;

[0054] ⑦Find n_classes-1 according to the sorted sample variance

[0055] Quantile[];

[0056] ⑧for(each sample point i)do

[0057] Determine the interval position of the sample point on quantile and set the sample label;

[0058] end for

[0059] end

[0060] Parallelization of the make_gaussian_quantiles algorithm

[0061] By analyzing the above algorithm process, the data set to be generated can be divided into rows, and each process generates a sub-data set that conforms to the multidimensional standard normal distribution. The sample variances generated by each process are calculated and sorted. The sample labels are set according to the sorting results. Assuming there are n processes, a total of n_samples samples need to be generated, and each sample has n_features features. Parallel processes such as Figure 4 shown.

[0062] Algorithm 2. make_gaussian_quantiles parallel algorithm

[0063] ① The master process sets the initial seed of the random number generator, calculates the first n random numbers and randomly generates the center point coordinates of the Gaussian cluster centerbuffer, and broadcasts it to the slave process.

[0064] ② The main process calculates the number of samples that each process needs to generate. The number of samples generated by process i is n_samples_per_procs i as follows:

[0065] n_samples_per_proc i =n_samples / n+left i

[0066]

[0067] The n_samples_per_procs calculated by the above formula i By distributing to slave processes.

[0068] ③ Randomly generate n_samples_per_procs from the process i sample points that conform to the multidimensional standard normal distribution, and then calculate the distance dis[] from each sample point to the center point.

[0069] ④ Each process locally sorts the distance from each sample point to the center point in the data set it generates in order from small to large.

[0070] ⑤ Select n numbers from the dis[] array of each slave process. The selection conditions are

[0071]

[0072] ⑥The n numbers selected at this time are also in order. Then, the total n′n numbers are gathered into the main process.

[0073] ⑦ The main process sorts the n′n data. At this time, the data is locally ordered. Using the merge algorithm to sort can reduce the time complexity.

[0074] ⑧ The master process selects n-1 pivots from the sorted data, with the selection rule being j′n, j=0,1,2,L n-1. And the n-1 pivots are broadcast to the slave processes.

[0075] ⑨ The slave process divides the dis[] array into n segments based on n-1 main elements.

[0076] ⑩Process i (i = 0, 1, 2, L n-1) sends the jth (j = 0, 1, 2, L n-1) segment to process j. That is, each process must send corresponding data segments to all other processes and receive data segments from all other processes. This process is called global exchange.

[0077] At this point, the n data segments in each process are locally ordered, and the merge algorithm is used to sort them. Then, the sorted dis[] array is aggregated to the main process, and the global sorting result of the distance from each sample point to the center point is obtained.

[0078] The master process searches for n_classes quantiles quantile[] in the global dis[] array. The selection rules for each quantile are as follows: j′(n_samples / n_classes), j=0, 1, 2, Ln_classes-1. Quantile[] is broadcast to the slave processes.

[0079] The slave processes determine the interval position of the distance from each sample point to the center point in quantile[] in turn and set the sample label. Each process uses the shuffle function to shuffle the order of the sample set.

[0080] The parallel large dataset generator integrates several algorithms for parallel dataset generation, including classification and clustering datasets, regression datasets, manifold learning datasets, factor decomposition datasets, etc. Users can efficiently generate GB-level datasets according to their own needs.

[0081] System design,The main functions of the I / O system can be divided into two parts: one is to provide a function interface for data set reading and writing operations, and the other is to realize the distribution and mapping of data sets among various processes, data mutual access, etc.

[0082] First, this embodiment mainly implements the function of reading files in parallel in multiple viewports in the mpi_read_bytes() function. Each process corresponds to a file viewport, and each viewport has an independent file pointer to read and write the viewport. A viewport corresponds to a continuous or discontinuous part of the original file in physical position. However, from the user's perspective, the data in each process file viewport is continuous. The relationship between the file and the viewport is as follows: Figure 5 As shown:

[0083] Then, the write operation of the shared file is implemented in the mpi_write_bytes() function. There is only one file pointer in the shared file. Any process that reads or writes the file will affect other processes. The function parameters include the file name filepath, the input file buffer buf, and the file size filesize (in bytes). Assuming there are n processes, first, use the MPI_FILE_OPEN interface to open the file in parallel, and then call MPI_FILE_WRITE_ORDERED to enable all processes in the same process group to write data in sequence using a shared file pointer. According to the rankID identifier of each process, processes 0, 1,...n-1 write to the file in turn. When a process writes, the file pointer automatically points to the next data unit, and each process writes the data stored in its own buf to the common file viewport. Finally, call the MPI_FILE_CLOSE interface to close the file. The writing process of the shared file is as follows. Figure 6 shown.

[0084] In addition, this embodiment designs an interface for data set distribution and mapping. The main process reads the file into its own buffer Databuffer. Set the mapping rule to send the file in blocks to all other processes. Assume that the data set is distributed to n processes, and the data set contains datasize samples in total. The number of samples received by each process is n_samples_per_proci:

[0085] n_samples_per_proc i=datasize / n+left i

[0086]

[0087] The mapping rule from file to process is to place the files in continuous blocks, that is, each process receives a continuous block of data in the file, such as Figure 7 As shown:

[0088] Given the global index globalIndex of a sample in the original file, according to the file block mapping rules, it is necessary to find the position of the sample point on the parallel node, that is, calculate the process number sendId and local index localIndex where the sample point is located. First, calculate the cumulative number of samples accum_loaca_array[] (array elements are arranged in ascending order) starting from process 0 according to the n_samples_per_proc[] array. Loop comparison finds the position subscript where globalIndex should be inserted in accum_loaca_array, which is the process number sendId where the sample point is located. The local index of the sample point in the sendId process is as follows:

[0089] localIndex=globalIndex-accum_loaca_array sendld-1

[0090] To obtain the sample points, this embodiment uses a pair of MPI interfaces, MPI_Send and MPI_Recv, to implement point-to-point communication in a blocking manner. The characteristics and labels of the sample points are respectively sent by the process sendID, and the data is received by the process recvID.

[0091] Through the implementation of this embodiment, the functionality of this embodiment is mainly divided into two parts: automatically generating some parallel artificial data sets with controllable size and complexity that meet the distribution conditions; and providing an I / O system to achieve data mutual access on different nodes. This embodiment can solve the problem of insufficient data collection in big data processing and analysis algorithms.

[0092] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, the patent owner may make various variations or modifications within the scope of the appended claims. As long as they do not exceed the protection scope described in the claims of the present invention, they should be within the protection scope of the present invention.

Claims

1. A parallel big data generation method for supercomputers, characterized in that: The following steps are involved: S1. Generate pseudo-random numbers that conform to uniform distribution according to the linear congruential algorithm; S2. Design a parallelization scheme for the linear congruential algorithm; S3. Generate a series of random numbers that meet different distributions based on the parallel linear congruential algorithm and various function mapping relationships, and construct a parallel pseudo-random number generator; S4. Design artificial dataset generation algorithms for controlling data size and statistical properties using parallel pseudo-random number generators for different purposes; The step S2 specifically includes: using the same random number generator, each process of the random number generator generates a different subsequence in the random number sequence, and then using the jump method to parallelize the linear congruential algorithm; The step S3 also includes: obtaining pseudo-random numbers of any probability distribution through transformation and mapping relationships, and constructing a random number generation method of other distributions; The other distributions include the Box-Muller algorithm for generating normal distribution, the Knuth algorithm for generating random numbers that conform to Poisson distribution, the algorithm for generating multidimensional normal distribution from the covariance matrix and the correlation coefficient matrix, and the rejection method and inverse function method for generating other continuous distribution random numbers.

2. The method for generating parallel big data for supercomputers according to claim 1, characterized in that: The step S1 generates a pseudo-random number that conforms to a uniform distribution through the following iterative formula: X=(aX+c)modm,i=0,1,2,……n;where Among them, X0 is the initial seed of the random number generator, a is the multiplier, c is the increment, m is the modulus, and X i is the i-th random number.

3. The method for generating parallel big data for supercomputers according to claim 1, characterized in that: The artificial datasets captured in S4 include datasets for classification and clustering, regression datasets, manifold learning datasets, and factor decomposition datasets.