A data processing method, device, apparatus, and storage medium

By employing the CUDA architecture and linear list encoding in gene expression programming, the evaluation process is parallelized. Combined with ADF genes, the problem of high computational cost in expression tree creation and evaluation in the GEP algorithm is solved, resulting in faster population evolution and lower error.

CN117273126BActive Publication Date: 2026-03-17CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing Gene Expression Programming (GEP) algorithms have high computational costs in the expression tree creation, translation, and evaluation processes, which affects the efficiency of function discovery. They also suffer from slow convergence speed and are prone to getting trapped in local optima.

Method used

We improve gene expression programming by using the CUDA architecture and a linear list-based encoding method, utilize the CUDA architecture for parallel evaluation, and combine it with ADF gene enhancement to improve individual expression. The individual evaluation process is accelerated by using the CUDA architecture and predefined kernel functions.

Benefits of technology

It improves the speed of population evolution, reduces the error in function discovery, and enhances the efficiency and accuracy of population search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117273126B_ABST
    Figure CN117273126B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, equipment and storage medium, and relates to the technical field of computers, and comprises the following steps: initializing a population to obtain a current population with a function to be evaluated as an individual; a gene expression programming is improved by using a CUDA architecture and a linear table-based coding mode in advance to obtain a target population evolution algorithm; an ADF gene for enhancing individual expression is used in the algorithm; all individuals are subjected to parallel evaluation processing based on the CUDA architecture in the algorithm and a predefined kernel function to determine the current fitness of each individual, and it is judged whether the preset evolution termination condition is met at present; if not, the individual whose current fitness meets the preset elimination condition is eliminated, the remaining individuals are processed based on the preset genetic operator in the algorithm to generate a new current population, and the step of parallel evaluation processing is rejumped; and if yes, the individual solution is output. The application improves the population evolution speed and reduces the error of the found function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology

[0002] Gene Expression Programming (GEP), proposed by Candida Ferreira in 2001, borrows from the linear encoding-based individual mutation mechanism of Genetic Algorithm (GA) and the functional association discovery capabilities of Genetic Programming (GP) in various scenarios. GEP achieves a 100-60,000-fold improvement in evolutionary efficiency compared to GA and GP methods. This is because GEP inherits the simplicity and ease of mutation manipulation from GA while maintaining the strong spatial search capabilities of GP in solving complex problems. As a "genotype / phenotype" genetic algorithm, GEP is simple to encode, can solve complex problems, and significantly improves the efficiency of function discovery. Evolutionary computation methods such as GEP have been widely applied in engineering applications and scientific research, thanks to their advantages of not requiring prior assumptions about the problem and possessing high evolutionary efficiency and accuracy. In recent years, GEP has been widely used in regression and classification, time series prediction, and data mining, especially suitable for discovering hidden functional relationships in large datasets.

[0003] Since Ferreira proposed the gene expression programming method, researchers have proposed improvements to the GEP algorithm in various aspects: (1) In the exploration and optimization of the population, early work proposed operators based on distribution probability to improve search efficiency; for the study of multimodal functions, a diversity strategy based on merging and classification to adaptively adjust the niche radius was proposed; subsequent work included improvements to fitness calculation, increasing the weight of samples with prediction errors and using weighted fitness to ensure the diversity of the initial population, and using gene symbol-chromosome sequence frequency table to achieve a uniform distribution initialization strategy for gene space. Research proposed improvements such as mirroring genes and widening the selection neighborhood, but these had the disadvantages of increased complexity and the possibility of premature convergence in a larger search space. (2) In terms of computational efficiency mainly based on parallelization, research used GPUs to accelerate the computation of the original GEP and used the least squares method to optimize the local coefficients on the function structure derived from evolution, enhancing the ability to discover constants. A subsequent study designed an age-stratified population structure based on genetic operands and used a distributed architecture ported from the Spark framework to fully utilize multiple GPUs to allocate evolution tasks to accelerate computation.

[0004] However, with the emergence of various solution space exploration and parallel methods, several problems in GEP that still need to be studied and solved have gradually become apparent. These include the fact that early research tests used relatively simple functions for speedup and did not combine improvements in GEP structure and coding to further achieve parallelism; the lack of single-GPU parallelization in distributed parallel research, which failed to fully utilize the parallelism of GEP itself; and the problem of tree generation in individual expression, where the number of expression trees (ETs) generated increases rapidly with parameters such as initial population size, gene length, and generation number. Even if the inflation problem similar to that in GP can be avoided, dynamically generating and releasing these ETs still consumes a lot of time and space resources. Furthermore, along with the generation and release of trees, there is the problem of repeated traversal of ETs and computation, which affects the population computation speed.

[0005] In summary, gene expression programming is commonly used for the discovery of complex high-dimensional functions. Its improved algorithm, Scale Gene Expression Programming (Scale-GEP), based on linear lists, has various practical applications. However, the computational cost of expression tree creation, translation, and evaluation remains high, affecting the efficiency of function discovery. Furthermore, GEP still suffers from slow convergence and a tendency to get trapped in local optima. Therefore, providing a solution to these technical problems is a current challenge for those skilled in the art. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a data processing method, apparatus, device, and storage medium that can improve the population evolution speed and reduce the error of the discovery function. The specific solution is as follows:

[0007] In a first aspect, the present invention discloses a data processing method, comprising:

[0008] The population is initialized to obtain the current population, and the corresponding target population evolution algorithm is determined; the current population uses the function to be evaluated as the individual, and the target population evolution algorithm is a population evolution algorithm obtained by pre-improving the gene expression programming using the CUDA architecture and the linear list-based encoding method, and the target population evolution algorithm uses the ADF gene to enhance individual expression;

[0009] Based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm, the fitness of all individuals in the current population is evaluated in parallel to determine the current fitness of each individual in the current population and to determine whether the preset evolution termination condition is met.

[0010] If the preset evolution termination condition is not met, individuals whose current fitness meets the preset elimination condition are removed from the current population. The remaining individuals after elimination are then processed based on the preset genetic operators in the target population evolution algorithm to generate a new current population. The process then jumps back to the step of parallelizing the evaluation of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm.

[0011] If the preset evolution termination condition is met, the individual solution corresponding to the current fitness is output to obtain several objective functions that have passed the evaluation.

[0012] Optionally, the step of removing individuals whose current fitness meets the preset removal criteria from the current population, and processing the remaining individuals after removal based on the preset genetic operator in the target population evolution algorithm to generate a new current population, includes:

[0013] Sort all individuals in the current population according to their current fitness to obtain the current sorted population;

[0014] Select all individuals whose current fitness is less than a preset fitness threshold from the currently sorted population, and remove the currently selected individuals from the current population to obtain a preset number of elite individuals;

[0015] The current elite individuals are processed based on the preset genetic operators in the target population evolution algorithm to generate a new current population.

[0016] Optionally, the preset genetic operator includes any one or a combination of several of the following: mutation operator, crossover operator, insertion operator, transposon operator, single-point recombination operator, multi-point recombination operator, and gene recombination operator;

[0017] Furthermore, when the preset genetic operator includes the mutation operator, the method further includes: setting a terminal symbol for determining the transition probability of the mutation operator to control the evolution process.

[0018] Optionally, the linear list consists of a single central unit, or consists of a central unit, a left sub-linear list, and a right sub-linear list; wherein the left sub-linear list and the right sub-linear list have the same length.

[0019] Accordingly, the process of creating the linear list includes:

[0020] The pre-constructed empty queue is initialized to obtain the current queue, and the head linear list of the current queue is selected;

[0021] Iterate through each gene symbol in the gene sequence of each individual in the current population;

[0022] If the gene symbol is a terminal symbol for a variable or constant, then the gene symbol is filled into the central cell of the queue head linear list;

[0023] If the gene symbol is a unary operator, then the left sub-layer sub-linear list is added to the current queue, and the coordinates of the left sub-layer sub-linear list are stored.

[0024] If the gene symbol is a binary operator, then the left sub-level sub-linear list and the right sub-level sub-linear list are added to the current queue, and the linear list coordinates of the left sub-level sub-linear list and the linear list coordinates of the right sub-level sub-linear list are stored.

[0025] Optionally, the parallel evaluation of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm includes:

[0026] Based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm, the fitness of all individuals in the current population is evaluated and reduced in parallel using GPU on different thread blocks.

[0027] In this context, different thread blocks correspond to different individual computations, and multiple threads are launched in each GPU for parallel computation.

[0028] Optionally, different threads are used to process different fitness evaluation instances, and adjacent threads access contiguous GPU memory locations with array indices.

[0029] Optionally, the parallel evaluation of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm includes:

[0030] Update the number of ADF gene operators to obtain the corresponding number of ADF operators;

[0031] Establish a linear list corresponding to each ADF gene, and traverse the branch structure of the linear list to convert the linear list into a postfix expression;

[0032] The postfix expression, constant variable array, and ADF count information corresponding to all individuals in the current population are sent to the GPU, and the fitness of all individuals in the current population is evaluated in parallel on the GPU based on the CUDA architecture in the target population evolution algorithm and the predefined kernel function.

[0033] In a second aspect, the present invention discloses a data processing apparatus, comprising:

[0034] The population initialization module is used to initialize the population to obtain the current population and determine the corresponding target population evolution algorithm. The current population uses the function to be evaluated as individuals. The target population evolution algorithm is a population evolution algorithm obtained by pre-improving the gene expression programming using the CUDA architecture and a linear list-based encoding method. Furthermore, the target population evolution algorithm uses the ADF gene to enhance individual expression.

[0035] The parallel evaluation module is used to perform parallel evaluation of the fitness of all individuals in the current population based on the CUDA architecture in the target population evolution algorithm and the predefined kernel function, so as to determine the current fitness of each individual in the current population and determine whether the preset evolution termination condition is met.

[0036] The population iteration module is used to remove individuals whose current fitness meets the preset removal condition from the current population when the current evolution termination condition is not met, and to process the remaining individuals after removal based on the preset genetic operators in the target population evolution algorithm to generate a new current population, and then jump back to the step of evaluating the fitness of all individuals in the current population in parallel based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm;

[0037] The individual solution output module is used to output the individual solution corresponding to the current fitness when the preset evolution termination condition is met, so as to obtain several objective functions that have passed the evaluation.

[0038] Thirdly, the present invention discloses an electronic device, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed data processing method.

[0041] Fourthly, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed data processing method.

[0042] As can be seen, the present invention provides a data processing method, comprising: initializing a population to obtain a current population, and determining a corresponding target population evolution algorithm; wherein the current population uses the function to be evaluated as an individual, and the target population evolution algorithm is a population evolution algorithm obtained by pre-improving the gene expression programming using a CUDA architecture and a linear list-based encoding method, and wherein the target population evolution algorithm employs an ADF gene for enhancing individual expression; and performing parallel evaluation processing of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm to determine the current fitness of each individual in the current population. The algorithm proceeds by determining whether a preset evolution termination condition is met. If the preset evolution termination condition is not met, individuals whose current fitness meets the preset removal condition are removed from the current population. The remaining individuals after removal are then processed based on the preset genetic operators in the target population evolution algorithm to generate a new current population. The algorithm then jumps back to the step of parallelizing the evaluation of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm. If the preset evolution termination condition is met, the individual solutions corresponding to the current fitness are output to obtain several objective functions that have passed the evaluation. Therefore, this invention utilizes the CUDA architecture and a linear list-based encoding method to improve gene expression programming, resulting in a population evolution algorithm for population evolution. Specifically, the expression and evaluation processes in linear list-based gene expression programming are improved by using a linear list as the encoding for individuals and expression trees in the GEP, combined with ADF gene enhancement to boost individual expression. Then, the CUDA architecture is used to design and parallelize the most computationally time-consuming evaluation process in population evolution. This involves accelerating the individual evaluation process in parallel using the CUDA architecture and predefined kernel functions, thereby increasing the population evolution speed and reducing the error of the discovery function. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0044] Figure 1 This is a schematic diagram illustrating the evolution process of a GEP disclosed in this invention;

[0045] Figure 2 This is a flowchart of a data processing method disclosed in this invention;

[0046] Figure 3 This is a schematic diagram of a specific example of a multi-gene individual containing ADF and an expression tree disclosed in this invention;

[0047] Figure 4 This is a flowchart of a specific data processing method disclosed in this invention;

[0048] Figure 5 This is a schematic diagram of the overall framework of a specific population evolution step and key improvement technology disclosed in this invention;

[0049] Figure 6 This is a schematic diagram comparing the speeds of the two gene lengths disclosed in this invention;

[0050] Figure 7 This is a schematic diagram showing the speed comparison of different numbers of multiple genes disclosed in this invention;

[0051] Figure 8 This is a schematic diagram of the structure of a data processing device disclosed in this invention;

[0052] Figure 9 This is a structural diagram of an electronic device disclosed in this invention. Detailed Implementation

[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Currently, Generative Ecosystem Extraction (GEP) is commonly used for discovering complex high-dimensional functions. Its improved algorithm, Scale-GEP, has various practical applications. However, the computational cost of expression tree creation, translation, and evaluation in Scale-GEP remains high, affecting the efficiency of function discovery. Furthermore, GEP still suffers from slow convergence and a tendency to get trapped in local optima. Therefore, this invention provides a data processing scheme that can improve the population evolution speed and reduce the error in function discovery.

[0055] It should be noted that the primary goal of evolutionary algorithms such as GEP, GP, and GA is to iteratively evolve a population of individuals multiple times to obtain individual solutions representing the functional relationship. GEP, in particular, uses linear fixed-length symbol strings to represent solutions. This encoding method borrows from the concept of open code frames, removing the limitations of genetic operations and improving operational efficiency by dividing genes into coding and non-coding regions. Furthermore, the overall operation of GEP is similar to other evolutionary computational methods, obtaining the optimal solution to the problem through numerous iterative modifications to a complex number of individuals, i.e., the population. See also... Figure 1As shown, the evolution of GEP follows these steps:

[0056] (1) Initialize the individual population. GEP uses fixed-length symbolic strings as genotypes for individuals in the population and trees as phenotypes;

[0057] (2) Determine the expression method in advance based on the problem, and express all individuals;

[0058] (3) Evaluate all individuals based on the given fitness evaluation function and sample data to infer whether a solution that meets the requirements has been generated. This is the most crucial step in the evolutionary process;

[0059] (4) If a solution that satisfies the problem requirements has already appeared in the current individual, output the solution and stop iterating; otherwise, proceed to the next step (5).

[0060] (5) Select a portion of individuals with high fitness to form a new generation of population. The selection strategy may include, but is not limited to, tournaments and roulette.

[0061] (6) Individuals in the mutated population. Mutation operators may include, but are not limited to, mutation, crossover, transposition, etc., and then jump to step (2).

[0062] This invention discloses a data processing method, see [link to relevant documentation]. Figure 2 As shown, the method includes:

[0063] Step S11: Initialize the population to obtain the current population and determine the corresponding target population evolution algorithm; the current population uses the function to be evaluated as the individual, and the target population evolution algorithm is a population evolution algorithm obtained by pre-improving the gene expression programming using the CUDA architecture and the linear list-based encoding method. Furthermore, the target population evolution algorithm uses the ADF gene to enhance individual expression.

[0064] In this embodiment, the current population is obtained by initializing the individual population, and the corresponding target population evolution algorithm is determined. It is understood that as the problem size increases, evolutionary algorithms such as GEP need to improve the efficiency of population search. Therefore, improvements are made to the expression and evaluation processes in gene expression programming based on linear lists to improve population evolution efficiency. Specifically, a linear list is used as the encoding for individuals and expression trees in GEP, combined with ADF (Auto Defined Function) gene enhancement for individual expression. Then, CUDA (Compute Unified Device Architecture) is used to design and parallelize the evaluation process, which is the most computationally time-consuming part of population evolution, resulting in a new CUDA-SGEP (Target Population Evolution Algorithm), where SGEP stands for Scale-GEP.

[0065] It should be noted that Scale-GEP converts the expression tree (ET) of the phenotype of GEP individuals into a scale (linear list) and reduces the computational overhead during the evolutionary process based on operator operations. The linear list consists of a single central unit, or a central unit, a left sub-layer sub-linear list, and a right sub-layer sub-linear list; wherein the left and right sub-layer sub-linear lists have the same length. That is, the scale satisfies the following constraints:

[0066] (1) A scale consists of a single central unit or a central unit and left and right sub-scales;

[0067] (2) The left and right sub-scales of the current scale have the same length;

[0068] (3) If the current Scale contains left and right sub-scales, then the center cell of the current Scale stores the center cell coordinates of the left and right sub-scales;

[0069] (4) A Scale consists of a series of Scales at different levels in a recursive structure. Similar to a leaf node, a Scale only contains a central unit. All the lower-level Scales recursively form a higher-level Scale.

[0070] The time complexity of Scale is calculated as follows: if the population size is P, the number of generations is G, the number of runs is R, and the gene head length is h, and one gene element operation is considered as a basic operation, then the time consumption of gene expression based on Scale is at most 3*(2*h+1)*P*G*R basic operations, which proves that the linear list accelerates the evaluation calculation by avoiding repeated operands.

[0071] The process of creating the linear list is as follows: initializing a pre-constructed empty queue to obtain the current queue, and selecting the head linear list of the current queue; sequentially traversing each gene symbol of the gene sequence of each individual in the current population; if the gene symbol is a variable or constant terminal symbol, then filling the gene symbol into the central unit of the head linear list; if the gene symbol is a unary operator, then adding the left sub-level linear list to the current queue, and storing the linear list coordinates of the left sub-level linear list; if the gene symbol is a binary operator, then adding the left sub-level linear list and the right sub-level linear list to the current queue, and storing the linear list coordinates of the left sub-level linear list and the right sub-level linear list.

[0072] For example, for genes expressed as Scale containing ADF, see [link to relevant documentation]. Figure 3 As shown, the top symbol string represents two gene sequences of an individual. The left side of the sequence represents the gene indicating ADF, and the right side represents the main function. Both are divided into head and non-head regions. When the main function is expressed, it calls ADF through the symbol "F" representing ADF, forming a multi-layered gene structure. This sequence containing two genes can be transformed into two trees, or scales representing tree structures. Although the scales are stored in the form of nested linear lists, they still represent tree structures. The construction of the scales starts from the left end of the gene sequence, and the scale coordinates use a queue. First, the outermost scale corresponding to the root node of the ADF gene sequence stores the "+" symbol read from the queue into the center point. Then, the left and right sub-scales are built, that is, the coordinates of the center units of the left and right sub-scales are stored into the queue. After that, one coordinate is taken out each time. If it is an operator, the coordinates are stored according to the number of operators. If it is a terminal symbol of a variable or constant, the symbol is stored into the center unit, and the coordinates of the center unit of the sub-scale are calculated. Finally, when the transformation process is over, the gene is expressed in the scale.

[0073] Step S12: Based on the CUDA architecture in the target population evolution algorithm and the predefined kernel function, perform parallel evaluation of the fitness of all individuals in the current population to determine the current fitness of each individual in the current population and determine whether the preset evolution termination condition is met.

[0074] It is important to note that evaluation is a crucial step in updating individual fitness and ensuring the effectiveness of the population search. Fitness represents the quality of an individual's solution evaluated against the sample set, similar to the concept of a loss function, and different fitness functions should be designed based on the problem and the encoding representation. The differences in fitness calculation functions imply different evaluation criteria, such as requirements for error and complexity. For example, the following inverse form of the sum of squared errors can be used as the fitness calculation function:

[0075]

[0076]

[0077] Where IMSE represents the fitness value, MSE represents the mean of the sum of squared errors, and y i This represents the actual value of the result found by the j-th function. The standard fitness value represents the reference value for the function discovery result, m represents the total number of functional relationships, and the larger the standard fitness value, the smaller the error of the corresponding function discovery result.

[0078] In this embodiment, the fitness of all individuals in the current population is evaluated in parallel based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm to determine the current fitness of each individual in the current population. It is understood that parallelization accelerates the evaluation process of individuals, thereby improving the evolutionary efficiency of the population. Parallelization requires consideration of the parallelizability of the program itself, and then the time-consuming steps in the computation are located using the compiler tools provided by CUDA. GEP contains evaluation steps that require a large number of fitness instances to be calculated, as well as computations expressed using expression trees or scale before evaluation. Therefore, for rapidly growing data scales in practical problems, parallel design can provide program scalability. For example, a hybrid programming approach using C-CUDA and Python can be used, where C-CUDA is CUDA for C language, distinct from CUDA for Python. First, the underlying logic, including defining population encoding, selection, and mutation operators, is defined. The evolutionary logic is then implemented in parallel using the CUDA toolkit. Next, PyBind is used to encapsulate the chromosome and evolutionary program classes of GEP, generating a Python extension containing the GEP library. Finally, iterative training and testing are performed on the dataset to verify the real-time performance of the population operation. The parsed expression tree structure is then compared with the actual expression to form a complete parallel framework.

[0079] Step S13: If the preset evolution termination condition is not met, individuals whose current fitness meets the preset removal condition are removed from the current population. The remaining individuals after removal are processed based on the preset genetic operators in the target population evolution algorithm to generate a new current population. Then, the process jumps back to the step of parallelizing the evaluation of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm.

[0080] In this embodiment, when the preset evolution termination condition is not met, individuals whose current fitness meets the preset removal condition are removed from the current population. The remaining individuals after removal are then processed based on the preset genetic operator in the target population evolution algorithm to generate a new current population. For example, if the preset number of population iterations has not been reached, population iteration continues to generate a new current population. Specifically, all individuals in the current population are sorted according to their current fitness to obtain the sorted population. All individuals with current fitness less than a preset fitness threshold are selected from the sorted population, and these selected individuals are removed to obtain a preset number of elite individuals. These elite individuals are then processed based on the preset genetic operator in the target population evolution algorithm to generate a new current population. It can be understood that a specified number of individuals with the best fitness are selected as elite individuals, updated after evaluation, and the worst individuals are replaced in each generation. Here, the elite individual refers to the individual with the best fitness value in the population so far, possessing the best genetic structure and superior traits. In other words, using an elite strategy ensures that the best individual found in the population search will not be discarded or destroyed. Genetic algorithms, including the traditional GEP, can converge when using a strategy of preserving the best individual in each generation, but not necessarily when this strategy is not implemented. Furthermore, experiments show that removing the elite strategy significantly reduces the accuracy of the results compared to before removal, indicating an unstable evolutionary process.

[0081] It should be noted that the preset genetic operators include any one or a combination of several of the following: mutation operators, crossover operators, insertion operators, transposition operators, single-point recombination operators, multi-point recombination operators, and gene recombination operators. Furthermore, when the preset genetic operators include the mutation operator, the method further includes: setting a terminal symbol for determining the transition probability of the mutation operator to control the evolutionary process. That is, the genetic operators of GEP include any one or a combination of several of the following: mutation, insertion, transposition, single-point recombination, multi-point recombination, and gene recombination. In this embodiment, the parameter settings of the genetic operators are implemented with reference to GP and classic GEP, and additionally, functions, terminal symbols, and the transition probabilities of variables and constants in the terminal symbols when applying the mutation operator are set to more accurately control the evolutionary process. Furthermore, before modifying the population using genetic operators, a new operator with a restart mechanism can be added. This involves sorting individuals in the population based on their fitness, selecting the individuals with the worst fitness, and randomly generating an equal number of individuals to replace them. This is equivalent to restarting the classic GEP algorithm. By generating new individuals, the exploration domain of the current population is broadened. Experiments have shown that the restart mechanism is more sensitive to parameters when not using it. Moreover, with the same parameter settings, the accuracy of the function discovery results may also decrease without the restart mechanism. This indicates that the restart mechanism enhances the population's ability to escape local optima by introducing new gene fragments, thus preventing premature convergence in the program.

[0082] Step S14: If the preset evolution termination condition is met, the individual solution corresponding to the current fitness is output to obtain several objective functions that have passed the evaluation.

[0083] Understandably, during the population evolution process, if the preset evolution termination condition is met and an individual in the current population produces a solution that satisfies the problem requirements, then this solution is output and the iteration stops.

[0084] As can be seen, in this embodiment of the invention, the population evolution algorithm obtained by improving gene expression programming using the CUDA architecture and a linear list-based encoding method achieves population evolution. Specifically, the expression and evaluation processes in gene expression programming based on linear lists are improved by using linear lists as the encoding of individuals and expression trees in the GEP, and combining ADF genes to enhance individual expression. Then, the evaluation process, which is the most computationally time-consuming process in population evolution, is designed and parallelized using the CUDA architecture and predefined kernel functions. This accelerates the individual evaluation process in parallel, thereby improving the population evolution speed and reducing the error of the discovery function.

[0085] See Figure 4 As shown, this embodiment of the invention discloses a specific data processing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.

[0086] Step S21: Initialize the population to obtain the current population and determine the corresponding target population evolution algorithm; the current population uses the function to be evaluated as the individual, and the target population evolution algorithm is a population evolution algorithm obtained by pre-improving the gene expression programming using the CUDA architecture and the linear list-based encoding method. Furthermore, the target population evolution algorithm uses the ADF gene to enhance individual expression.

[0087] Step S22: Based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm, and using GPUs on different thread blocks, the fitness of all individuals in the current population is evaluated and reduced in parallel to determine the current fitness of each individual in the current population and to determine whether the preset evolution termination condition is met; wherein, different thread blocks correspond to the computation of different individuals, and multiple threads are started in each GPU for parallel computation.

[0088] In this embodiment, the fitness of all individuals in the current population is evaluated and reduced in parallel on different thread blocks using a GPU (Graphics Processing Unit). That is, parallelization is achieved on a single-card, multi-threaded CUDA architecture, thereby accelerating the computation of Scale-GEP. It is understood that although most steps of GEP are executed serially, the computationally intensive nature of GEP and the parallelizability of its algorithm steps allow GEP to accelerate these steps with the help of hardware resources. Furthermore, with the rapid development of GPUs and other hardware and their parallel technologies, evolutionary computation has also seen work combining parallelization to accelerate computation. Specifically, based on the CUDA architecture and predefined kernel functions in the target population evolutionary algorithm, the fitness of all individuals in the current population is evaluated and reduced in parallel on different thread blocks using a GPU. CUDA is a general-purpose high-level language for GPUs widely used in the field of parallel computing, providing a GPU programming interface that can handle parallel program optimizations such as data transfer, memory optimization, and thread synchronization. Different threads are used to process different fitness evaluation instances, and adjacent threads access GPU memory locations with contiguous array indices. Therefore, it can be seen that by using a distributed framework to enable GEP to perform parallel computation on fitness evaluation instances and across different programs, hardware utilization efficiency can be improved. Furthermore, experiments with multi-processor-based GEP in data mining and classification problems demonstrate that using a distributed platform and a designed parallel algorithm can effectively improve evolutionary efficiency. In other words,

[0089] For example, see Figure 5 As shown, the evaluation process, which accounts for the majority of the time in population computation for each generation, is parallelized. Individuals are encoded using a linear list (Scale) instead of a traditional expression tree, and multi-gene encoding with ADF replaces the general single-gene encoding to improve function discovery capabilities. During each generation's computation, the fixed-length gene strings in the GEP are first converted to Scale according to a given tree traversal order. Then, the Scale of the individual's linear representation and the array storing constant values ​​in the formula—the data required for computation—are transferred to the GPU memory space. Furthermore, kernel functions are used on the GPU to implement fitness calculation and reduction algorithms using parallel evaluation and reduction algorithms, implemented on thread blocks. Different blocks correspond to the computation of different individuals. After completion, the reduced fitness results are returned from the GPU, and other lower-time-consuming serial evolutionary steps are executed. The overall parallel algorithm uses multiple threads for simultaneous computation within a single GPU and achieves further acceleration based on the Scale-GEP algorithm.

[0090] Specifically, the number of ADF gene operators is updated to obtain the corresponding ADF number information; a linear list corresponding to each ADF gene is established, and the branch structure of the linear list is traversed to convert the linear list into a postfix expression; the postfix expression, constant variable array, and ADF number information corresponding to all individuals in the current population are sent to the GPU, and the fitness of all individuals in the current population is evaluated in parallel on the GPU based on the CUDA architecture in the target population evolution algorithm and the predefined kernel function.

[0091] For example, this embodiment of the invention provides a specific parallel evaluation algorithm. Compared with the parallelism of the classic GEP, it makes corresponding modifications to the Scale expression and ADF encoding for parallel steps, as shown in Table 1, Algorithm 1:

[0092] Table 1

[0093]

[0094] Understandably, for each ADF gene, the number of individuals is updated using the operator's information. Then, a Scale linear list is built to represent this information. The algorithm uses translation, specifically the Reorder method, to traverse the Scale's branching structure, transforming it into a postfix expression. Finally, the expressions for all individuals, the array of constant variables, and the ADF number information are transferred to the GPU, where the defined kernel function is executed in parallel. The Scale is built as shown in Algorithm 2 (Table 2).

[0095] Table 2

[0096]

[0097] The establishment of a scale represents the process of expressing the gene sequence of a new generation of individuals as a scale, that is, traversing each gene symbol sequentially and building a sub-linear list. If it is a variable or constant, the gene symbol is filled into the central unit, without left and right sub-levels; if it is a unary operator, the left sub-level is added to the queue; if it is a binary operator, both left and right sub-levels are added to the queue. When an operator is added to the queue, the linear list coordinates of the sub-level are stored. Using a scale linear list essentially increases space overhead but reduces the time overhead of accessing the tree; the ADF function requires separate intermediate result calculation and storage.

[0098] Accordingly, parallel evaluation on CUDA involves kernel functions, as shown in Table 3 for Algorithm 3:

[0099] Table 3

[0100]

[0101] Understandably, kernel functions are used for parallel evaluation of the population. Algorithm 3 specifically specifies the input information, including evolutionary parameters such as population size, gene symbol table, individual gene symbol length, and dataset information. Each thread is responsible for calculating the fitness instance. If the dataset size exceeds the thread limit of the stream, it can be divided into smaller datasets for separate evaluation. The evaluation algorithm executes postfix expressions based on the gene symbol table to obtain the calculation results, which are the function prediction values ​​of individuals within the block. During computation, the same block represents the same individual for computation, and shared memory within the block is used to store the computational output of gene symbols. Adjacent threads access contiguous memory locations with array indices.

[0102] Furthermore, during the reduction phase, a parallel reduction algorithm on CUDA is executed. This process utilizes multiple thread blocks to handle large arrays, involving all multiprocessors in the GPU. Each thread block reduces a portion of the large array and then uses memory copying to return the value to the host. The ADF computation primarily affects the evaluation; the reduction process itself does not require modification. To avoid shared memory access conflicts, adjacent threads operate on adjacent array elements using in-block indices. After each block completes the reduction of its segment to a value, the value is returned to the host.

[0103] It should be noted that ADF genes refer to genes with special functions within a multi-gene set. These genes are expressed indirectly as functions, expanding the relational domain for the same number of genes and enhancing the expressive power of the original genes. Each ADF is a sub-function used to solve a sub-problem, and the program for solving a given problem of interest is combined in the main function. During population initialization, all ADF-encoded genes on each chromosome are randomly generated. In subsequent evolution, mutations and crossovers will evolve the chromosome's ADFs. For simple problems, the use of ADFs has little impact on experimental results, and individuals containing ADFs tend to have longer expressions. However, as problem complexity increases, using ADFs can enhance the ability of GEPs to express complex structures, and by leveraging the expressive power of the contained substructures, the searched expression error is smaller.

[0104] In the above CUDA parallel evaluation process, genes containing ADF function symbols need to be substituted into the expression with the specific independent variable values ​​of this fitness instance, replacing the variable symbols in the ADF genes pointed to by the ADF function symbols, and then calculated using expression trees or postfix expressions translated by Scale.

[0105] Step S23: If the preset evolution termination condition is not met, individuals whose current fitness meets the preset removal condition are removed from the current population. The remaining individuals after removal are processed based on the preset genetic operators in the target population evolution algorithm to generate a new current population. Then, the process jumps back to the step of parallelizing the evaluation of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm.

[0106] Step S24: If the preset evolution termination condition is met, the individual solution corresponding to the current fitness is output to obtain several objective functions that have passed the evaluation.

[0107] For details regarding steps S21, S23 to S24, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0108] As can be seen, in this embodiment of the invention, the population evolution algorithm obtained by improving gene expression programming using the CUDA architecture and a linear list-based encoding method achieves population evolution. Specifically, the expression and evaluation processes in gene expression programming based on linear lists are improved by using linear lists as the encoding of individuals and expression trees in the GEP, and combining ADF genes to enhance individual expression. Then, the evaluation process, which is the most computationally time-consuming process in population evolution, is designed and parallelized using the CUDA architecture. That is, the evaluation process of individuals is accelerated in parallel on the GPU based on the CUDA architecture and predefined kernel functions, thereby improving the population evolution speed and reducing the error of the discovery function.

[0109] In the experiments verifying that the population evolution performance of the CUDA-SGEP proposed in this invention is superior to that of the original GEP and Scale-GEP based on ET, the benchmark dataset used for function discovery was selected from the best benchmark dataset in current GEP research. This dataset is closer to real-world data and better reflects the challenges faced by evolutionary computation in function discovery. The dataset contains function relation sets F1, F3, F5, F7, and F14, and for each function class, the dataset provides several hundred to one thousand sample points. The independent variable values ​​of the sample points range from [-1, 1] on functions F1 to F7. The function relations and value ranges of the multi-dimensional F14 function for each dataset are shown in Table 4.

[0110] Table 4

[0111]

[0112] In the experiments, representative function discovery datasets F1, F3, F5, F7, and F14 from the benchmark were selected to showcase the experimental results, with the difficulty of function discovery increasing sequentially. The F1 experiment provides a performance reference for GEP on the basic dataset; the relationships between F3 and F5 show that GEP can consistently achieve similar experimental results to F1 under different relationships, and improves the accuracy and speed results; the F7 formula contains unary operators, used to test the scalability of GEP in the solution space when solving function discovery problems, as well as the performance differences under different configurations; F14 dataset has high dimensionality and coupled relationships, making it a highly challenging dataset suitable for verifying the performance of the GEP method on complex function data. On these datasets, through speed and error comparisons in multiple sets of experiments, the comparative results demonstrate the performance improvement of CUDA-based Scale-GEP.

[0113] For example, experiments were conducted using Scale-GEP, a CUDA-based parallel computing platform, employing tournament selection, single-point reassembly, and root insertion sequence (RIS) operators within GEP. The experimental environment consisted of an Intel i7-7700 x8 GTX 1050Ti processor, 8GB of RAM, and programming languages ​​including Python 3, C++14, and Pybind 11 wrappers, with CUDA version 11.4 used.

[0114] The baseline data used in the function discovery experiments were taken from the F1, F3, F5, F7, and F14 function discovery datasets. Their functional relationships can be categorized into polynomial functions, relationships containing trigonometric functions, and examples of multidimensional complex functions, respectively. Polynomial functions are often used as the basis for evaluating the performance of symbolic regression algorithms. F7, whose original expression contains functions other than "+", "-", "*", and " / ", is used to test performance under different function sets, while F14 can explore algorithm performance in cases where it is difficult to find an accurate expression. The three values ​​in the data range represent the upper bound, lower bound, and number of data points for the independent variable.

[0115] The parameter configurations used in the function discovery experiment are shown in Table 5:

[0116] Table 5

[0117]

[0118] The population size is 50, which has been verified as a reasonable setting for the baseline problem. The number of generations of population iterations is determined to be 200 based on the problem difficulty and experiments. The head length is the number of symbols in the coding region of the gene head. In GEP using multiple genes, there are multiple linear strings connected by connecting functions. One ADF gene is set in each of the F1, F3, F5, and F7 datasets. In F14, the success rate of finding the individual optimal solution is higher when two ADFs are set. In the function set, the function sets of F1, F3, and F5 do not contain components such as sin and cos, while the function set of the F7 dataset is expanded to obtain accurate representation. In the constant set, ERC (Ephemeral Random Constants) represents variable constants, and constant ordinal numbers are shared among multiple genes. In the operator probability settings, the mutation rate and crossover rate are uniformly set for the experimental dataset: the mutation rate, after experimental verification, is set to a small value close to 0.1 to avoid setting it too high and causing the algorithm to degenerate into random search on the solution space; the crossover rate, i.e. the recombination operator probability, can generally be set to a value close to 0.3 or 0.5 to control the overall variation and length of the population, and to fully explore the local solution space by utilizing the genetic material searched in the current generation in a balance between exploration and utilization.

[0119] In the experiment, based on the above experimental dataset and hyperparameter settings, the computational efficiency and accuracy of the proposed CUDA-SGEP were compared and analyzed. The computational efficiency was also compared and analyzed with ET-based GEP and Scale-GEP in terms of the number of multiple genes and gene length.

[0120] First, regarding computational efficiency, the computation time of iterations during population evolution is compared with that of ET-based GEP, Scale-based GEP, and Scale-GEP accelerated by CUDA, as shown in Table 6:

[0121] Table 6

[0122]

[0123] Among them, the ET-based GEP takes 3.3s per generation for evolutionary iteration on the F1 dataset, with a variance of 1.0s between generations. The Scale-based GEP, under the same configuration and dataset for F1, takes 1.5ms per evolutionary iteration, a significant improvement over the ET-based GEP, which is noticeably slower. The F3 and F5 test results, using the same parameters as F1, show very similar timeframes. On the F14 dataset with 1000 fitness instances, the Scale-GEP without CUDA parallel acceleration takes 13.9ms, showing near-linear growth. On the F14 dataset with the same parameter configuration, combined with CUDA parallel acceleration, the time is 1.4ms, close to the time on the smaller F1 dataset, showing non-linear speed growth, demonstrating the speed improvement from parallel acceleration. Therefore, after comparison, parallel acceleration of evaluation and expression reduces the time to approximately 1.4ms per generation, lower than the 4.99ms result of parallelizing the original GEP. Considering that CUDA-SGEP achieves the same number of evolution generations with similar error to Scale-GEP, the time consumed per generation is reduced by 8.4 times, thus improving the computational efficiency of parallelized GEP.

[0124] Second, the impact of gene length on computational efficiency, that is, comparing the impact of hyperparameters related to gene length on performance, as shown in Table 6 above. Table 6 has already compared the evolutionary time of the ET-based GEP and the GEP method improved by Scale and CUDA parallel acceleration, comparing these two improved methods under different settings, such as... Figure 6As shown, in Experiment 1, the gene head h was set to 3 (the total length of the entire coding region, including non-coding regions, is 11); in Experiment 2, the gene head h was set to 5 (the total length of the gene, including coding and non-coding regions, is l); and in Experiments 3 and 4, the gene head h was set to 7. These settings were used to compare the influence trends of gene head length and total length on evolutionary speed. Specifically, in Experiment 1, the Scale-GEP method took 10.9 ms per generation, while the Scale-GEP method using CUDA acceleration took 1.4 ms; in Experiment 2, the Scale-GEP method took 13.9 ms per generation, while the Scale-GEP method using CUDA acceleration took 1.4 ms; and in Experiment 3, the times were 16.0 ms and 1.5 ms respectively. Finally, in Experiment 4, where the gene head length *h* was kept constant while the total length *l* was varied, the Scale-GEP method took 16.0 ms per generation, while the Scale-GEP method using CUDA parallel acceleration took 1.7 ms. The time range overlapped with previous experiments within the fluctuations across multiple experiments. Compared to Experiment 3 and the first two experiments, the linear growth trend was small, indicating that the time per generation was essentially the same considering the inherent randomness of GEP. In contrast, the Scale-GEP method without linear acceleration showed a linear growth trend in time per generation as gene length increased from Experiment 1 to Experiment 3. This demonstrates that the experiments on gene length, comparing the two methods under different parameters, show a stable performance improvement achieved by using parallelization. Since the gene head length is directly related to the length of a single Scale, the results of single-gene experiments with different lengths show that the CUDA parallelization method has a significant speedup advantage compared to the serial GEP. Based on the speedup increase from Experiment 1 to Experiment 3, the time increase of parallel Scale-GEP is slower, making it suitable for handling a large number of evolutionary operations on long-coding individuals.

[0125] Third, the impact of multiple gene counts on computational efficiency, specifically the impact of the number of multiple genes per individual in the comparison parameters on performance. For example... Figure 7As shown, in Experiment 1, the number of multigenes was 1, while in Experiments 2 to 5, the number of genes increased sequentially. Specifically, in Experiment 1, the Scale-based GEP took 7.3 ms per generation for evolution, while the Scale-GEP method using CUDA acceleration took 1.0 ms. In Experiments 3 to 5, the first method took 13.9 ms, 17.2 ms, and 23.7 ms respectively, while the second method took 1.3 ms, 1.4 ms, and 1.6 ms respectively, demonstrating the effect of accelerated computation. Scale-GEP showed a linear increase in time as the number of multigenes connected by the join function increased, with an average increase ratio of 1.34. The CUDA-SGEP method, accelerated by CUDA, also exhibits a linear increase in computation time, with an average increase of 1.17. When the number of genes increases sequentially from 1 to 5, the computation time increases by a factor of 2, which is slower than the unused method. Considering the error range, the parallel-accelerated method, except for Experiment 1, shows only a small increase in time per generation from Experiment 2 to 5, with each generation's time remaining essentially the same. Therefore, experiments comparing the two methods under different gene count parameters further demonstrate that CUDA parallelization reduces parameter dependence and provides a stable performance improvement in complex function discovery problems. The number of genes, i.e., the number of scales of individual expression, also shows the advantages of parallelism in multi-gene experiments with different gene counts, and is suitable for large-scale evolutionary operations on multi-gene individuals.

[0126] For example, the experiment also used error to illustrate the accuracy of the results found by the function expression, as shown in Table 7:

[0127] Table 7

[0128]

[0129] Because F14 contains constants that are difficult to generate through methods like x / x, both GEP methods incorporate variable constant terms on all datasets. On lower-complexity datasets, the improved GEP with ADF shows consistent experimental results with the unimproved method. On F7 and F14, the optimal error value is reduced, and the mean error obtained from 100 repeated experiments is also reduced. Performance experimental data shows that it is on par with or improves upon the unimproved Scale-GEP. Experiments demonstrate that the CUDA-SGEP method proposed in this invention improves computational efficiency without sacrificing computational accuracy, and provides more accurate results for discovering multiple functional relationships.

[0130] Accordingly, embodiments of the present invention also disclose a data processing apparatus, see below. Figure 8 As shown, the device includes:

[0131] Population initialization module 11 is used to initialize the population to obtain the current population and determine the corresponding target population evolution algorithm; the current population uses the function to be evaluated as individuals, and the target population evolution algorithm is a population evolution algorithm obtained by pre-improving the gene expression programming using the CUDA architecture and the linear list-based encoding method, and the target population evolution algorithm uses the ADF gene to enhance individual expression;

[0132] The parallel evaluation module 12 is used to perform parallel evaluation of the fitness of all individuals in the current population based on the CUDA architecture in the target population evolution algorithm and the predefined kernel function, so as to determine the current fitness of each individual in the current population and determine whether the preset evolution termination condition is met.

[0133] The population iteration module 13 is used to remove individuals whose current fitness meets the preset removal condition from the current population when the current evolution termination condition is not met, and to process the remaining individuals after removal based on the preset genetic operator in the target population evolution algorithm to generate a new current population, and then jump back to the step of evaluating the fitness of all individuals in the current population in parallel based on the CUDA architecture and predefined kernel function in the target population evolution algorithm;

[0134] Individual solution output module 14 is used to output the individual solution corresponding to the current fitness when the preset evolution termination condition is met, so as to obtain several objective functions that have passed the evaluation.

[0135] As can be seen from the above, in this embodiment of the invention, the population evolution algorithm obtained by improving gene expression programming using the CUDA architecture and a linear list-based encoding method achieves population evolution. Specifically, the expression and evaluation processes in gene expression programming based on linear lists are improved by using linear lists as the encoding of individuals and expression trees in the GEP, and combining ADF genes to enhance individual expression. Then, the evaluation process, which is the most computationally time-consuming process in population evolution, is designed and parallelized using the CUDA architecture and predefined kernel functions. This accelerates the individual evaluation process in parallel, thereby improving the population evolution speed and reducing the error of the discovery function.

[0136] In some specific embodiments, the population iteration module 13 may specifically include:

[0137] The sorting submodule is used to sort all individuals in the current population according to their current fitness to obtain the currently sorted population.

[0138] The filtering submodule is used to filter out all individuals whose current fitness is less than a preset fitness threshold from the currently sorted population, and remove the currently filtered individuals from the current population to obtain a preset number of elite individuals.

[0139] The processing submodule is used to process the current elite individuals based on the preset genetic operators in the target population evolution algorithm to generate a new current population.

[0140] In some specific embodiments, the process of creating the linear list may specifically include:

[0141] The queue initialization module is used to initialize a pre-constructed empty queue to obtain the current queue, and select the head linear list of the current queue;

[0142] The gene traversal module is used to sequentially traverse each gene symbol of the gene sequence of each individual in the current population;

[0143] The gene symbol filling module is used to fill the gene symbol into the central cell of the queue head linear list when the gene symbol is a terminal symbol of a variable or constant.

[0144] The first processing module is used to add the left sub-layer sub-linear list to the current queue and store the linear list coordinates of the left sub-layer sub-linear list when the gene symbol is a unary operator.

[0145] The first processing module is configured to, when the gene symbol is a binary operator, add the left sub-layer sub-linear list and the right sub-layer sub-linear list to the current queue, and store the linear list coordinates of the left sub-layer sub-linear list and the linear list coordinates of the right sub-layer sub-linear list.

[0146] In some specific embodiments, the parallelization evaluation module 12 may specifically include:

[0147] The parallelization submodule is used to perform parallel evaluation and reduction of the fitness of all individuals in the current population based on the CUDA architecture and predefined kernel functions in the target population evolution algorithm, and by utilizing the GPU on different thread blocks.

[0148] In this context, different thread blocks correspond to different individual computations, and multiple threads are launched in each GPU for parallel computation.

[0149] In some specific embodiments, the parallelization evaluation module 12 may specifically include:

[0150] The update submodule is used to update the number of ADF gene operators to obtain the corresponding ADF number of operators.

[0151] A submodule is established to create a linear list corresponding to each ADF gene, and the branch structure of the linear list is traversed to convert the linear list into a postfix expression.

[0152] The information sending submodule is used to send the postfix expression, constant variable array and ADF count information corresponding to all individuals in the current population to the GPU, and to perform parallel evaluation of the fitness of all individuals in the current population on the GPU based on the CUDA architecture in the target population evolution algorithm and the predefined kernel function.

[0153] Furthermore, embodiments of the present invention also provide an electronic device. Figure 9 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of the invention.

[0154] Figure 9 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present invention. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data processing method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0155] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this invention, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0156] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0157] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the data processing methods executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0158] Furthermore, embodiments of the present invention also disclose a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the data processing method steps disclosed in any of the foregoing embodiments.

[0159] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0160] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0161] The above provides a detailed description of the data processing method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A data processing method, characterized by, The method comprises the following steps: initializing a population to obtain a current population and determining a corresponding target population evolution algorithm; the current population takes a function to be evaluated as an individual, the target population evolution algorithm is a population evolution algorithm obtained by improving a gene expression programming in advance using a CUDA architecture and a linear table-based coding mode, and the target population evolution algorithm adopts an ADF gene for enhancing individual expression; performing parallel evaluation processing on the fitness of all individuals in the current population based on the CUDA architecture and a predefined kernel function in the target population evolution algorithm to determine the current fitness of each individual in the current population and determine whether the current evolution satisfies a preset evolution termination condition; if the current evolution does not satisfy the preset evolution termination condition, removing the individual whose current fitness satisfies a preset removal condition from the current population, processing the remaining individuals after removal based on a preset genetic operator in the target population evolution algorithm to generate a new current population, and returning to the step of performing parallel evaluation processing on the fitness of all individuals in the current population based on the CUDA architecture and the predefined kernel function in the target population evolution algorithm; if the current evolution satisfies the preset evolution termination condition, outputting the individual corresponding to the current fitness to obtain a plurality of target functions that pass the evaluation; wherein the parallel evaluation processing on the fitness of all individuals in the current population based on the CUDA architecture and the predefined kernel function in the target population evolution algorithm comprises: updating the number of objects of each ADF gene operator to obtain corresponding ADF object number information; establishing a linear table corresponding to each ADF gene and traversing the branch structure of the linear table to convert the linear table into a postfix expression; sending the postfix expression, the constant variable array and the ADF object number information corresponding to all individuals in the current population to a GPU, and performing parallel evaluation processing on the fitness of all individuals in the current population based on the CUDA architecture and the predefined kernel function in the target population evolution algorithm on the GPU.

2. The data processing method of claim 1, wherein, The step of removing the individual whose current fitness satisfies a preset removal condition from the current population and processing the remaining individuals after removal based on a preset genetic operator in the target population evolution algorithm to generate a new current population comprises: sorting all individuals in the current population in order of the size of the current fitness to obtain a current sorted population; filtering all individuals in the current sorted population whose current fitness is less than a preset fitness threshold and removing the filtered individuals from the current population to obtain a preset number of elite individuals; processing the elite individuals based on a preset genetic operator in the target population evolution algorithm to generate a new current population.

3. The data processing method of claim 1, wherein, The preset genetic operator includes any one or a combination of several of a mutation operator, a crossover operator, a string insertion operator, a transposition operator, a single-point recombination operator, a multi-point recombination operator, and a gene recombination operator. When the preset genetic operator includes the mutation operator, the method further includes setting a terminal symbol for determining a transition probability of the mutation operator to control the evolution process.

4. The data processing method of claim 1, wherein, The linear table is composed of a single central unit or a central unit, a left sub-layer sub-linear table, and a right sub-layer sub-linear table; the left sub-layer sub-linear table and the right sub-layer sub-linear table have the same length. Correspondingly, the creation process of the linear table includes: initializing a previously constructed empty queue to obtain a current queue, and selecting a head linear table of the current queue; sequentially traversing each gene symbol of the gene sequence of each individual in the current population; if the gene symbol is a variable or constant terminal symbol, the gene symbol is filled into the central unit of the head linear table; if the gene symbol is a unary operator, the left sub-layer sub-linear table is added to the current queue, and the linear table coordinates of the left sub-layer sub-linear table are stored; if the gene symbol is a binary operator, the left sub-layer sub-linear table and the right sub-layer sub-linear table are added to the current queue, and the linear table coordinates of the left sub-layer sub-linear table and the right sub-layer sub-linear table are stored.

5. The data processing method of claim 1, wherein, The parallel evaluation processing of the fitness of all individuals in the current population based on the CUDA architecture in the target population evolution algorithm and the pre-defined kernel function includes: parallel evaluation and reduction processing of the fitness of all individuals in the current population based on the CUDA architecture in the target population evolution algorithm and the pre-defined kernel function, and using GPU on different thread blocks; wherein different thread blocks correspond to the calculation of different individuals, and multiple threads in each GPU are started for parallel calculation.

6. The data processing method according to claim 5, characterized in that, Different threads are used to process different fitness evaluation instances, and adjacent threads access array index continuous GPU memory locations.

7. A data processing apparatus, characterized by, It includes: a population initialization module for initializing the population to obtain a current population and determining a corresponding target population evolution algorithm; the current population takes a function to be evaluated as an individual, the target population evolution algorithm is a population evolution algorithm obtained by improving a gene expression programming using a CUDA architecture and a linear table-based encoding method in advance, and the ADF gene for enhancing individual expression is used in the target population evolution algorithm; a parallel evaluation module for performing parallel evaluation processing of the fitness of all individuals in the current population based on the CUDA architecture in the target population evolution algorithm and the pre-defined kernel function to determine the current fitness of each individual in the current population and determine whether the current evolution termination condition is met. A population iteration module is configured to, when the preset evolution termination condition is not met, remove the individual whose current fitness meets a preset removal condition from the current population, process the remaining individuals after the removal based on a preset genetic operator in the target population evolution algorithm, generate a new current population, and jump back to the step of performing parallel evaluation of the fitness of all individuals in the current population based on the CUDA architecture and the predefined kernel function in the target population evolution algorithm. An individual solution output module is configured to, when the preset evolution termination condition is met, output the individual solution corresponding to the current fitness to obtain a plurality of target functions that pass the evaluation. The parallel evaluation module specifically includes: An update submodule is configured to update the number information of each ADF gene operator to obtain corresponding ADF number information. An establishment submodule is configured to establish a linear table corresponding to each ADF gene, and traverse the branch structure of the linear table to convert the linear table into a postfix expression. An information sending submodule is configured to send the postfix expression, the constant variable array, and the ADF number information corresponding to all individuals in the current population to a GPU, and perform parallel evaluation of the fitness of all individuals in the current population based on the CUDA architecture and the predefined kernel function in the target population evolution algorithm on the GPU.

8. An electronic device, comprising: It includes: A memory for saving a computer program; A processor for executing the computer program to implement the steps of the data processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program for storing; wherein the computer program is executed by the processor to implement the steps of the data processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Self-adaptive thread based GPU parallel particle swarm optimization method

    CN106502632A