AI graphical programming method and device based on genetic algorithm

By providing the cross and mutation operation modules with drag-and-drop configurations in the graphical programming platform, the problem of complexity of genetic algorithm operation in the existing technology is solved, intuitive cross and mutation processing is realized, and user experience and algorithm application effect is improved.

CN119201085APending Publication Date: 2024-12-27SHENZHEN DIANMAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411486848.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing graphical programming platform is difficult to implement genetic algorithms, especially the visual support for cross-and-mutation operations is poor, which affects the user's learning experience and algorithm application effect.

Method used

By providing programming instruction building blocks in the graphical programming interface, users can drag and configure cross-and-mutation operations, generate cross-and-mutation processing AI models, and display the results through real-time visualization tools.

Benefits of technology

It simplifies the operation process of genetic algorithms, enables users to intuitively perform cross-and-mutation operations, improves learning experience and algorithm application effects, and is suitable for beginners and educational scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201085A_ABST
    Figure CN119201085A_ABST
Patent Text Reader

Abstract

The invention discloses an AI graphical programming method and device based on a genetic algorithm. The method comprises the following steps: in response to detection that programming instruction building blocks related to a genetic algorithm are dragged to a code area of a graphical programming interface, performing cross configuration and variation configuration through the programming instruction building blocks; and in response to an instruction for executing the graphical code of the code area, executing crossover operation on a selected AI model by utilizing the crossover configuration, and performing mutation operation by utilizing the mutation configuration to obtain the AI model after crossover and mutation processing. The technical problem that a genetic algorithm is difficult to realize in an existing graphical programming method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to an AI graphical programming method and device based on a genetic algorithm. Background Art

[0002] The graphical programming platform simplifies the complexity of programming through an intuitive user interface, making it more suitable for children and programming beginners. Genetic algorithm is an optimization algorithm that simulates the natural evolution process and gradually optimizes and solves complex optimization problems through operations such as selection, crossover and mutation.

[0003] Graphical programming platforms simplify the complexity of programming through intuitive user interfaces, making them more suitable for children and programming beginners. The platform can help users learn programming easily through drag-and-drop operations and graphical instruction modules. However, existing graphical programming platforms still have some shortcomings when implementing complex algorithms. For example, genetic algorithm is an optimization algorithm that simulates the natural evolution process and is often used to solve complex optimization problems. The algorithm includes operations such as selection, crossover, and mutation, but in traditional programming environments, these operations require a lot of code to be written, which is difficult for beginners to master. At the same time, the randomness and complexity of genetic algorithm operations make the debugging process cumbersome, and it is difficult for users to intuitively understand and observe the effects of these operations in real time, which affects the learning experience and the application effect of the algorithm. Existing graphical programming platforms do not provide comprehensive support for genetic algorithms, lack visual support for crossover and mutation operations, and have poor flexibility, which limits user learning and use.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiment of the present invention provides an AI graphical programming method and device based on a genetic algorithm, so as to at least solve the technical problem that it is difficult to implement the genetic algorithm in the existing graphical programming method.

[0006] According to one aspect of an embodiment of the present invention, there is provided an AI graphical programming method based on a genetic algorithm, comprising: in response to detecting that a programming instruction block related to a genetic algorithm is dragged to a code area of ​​a graphical programming interface, performing crossover configuration and mutation configuration through the programming instruction block; in response to an instruction to execute the graphical code of the code area, performing a crossover operation on a selected AI model using the crossover configuration, and performing a mutation operation using the mutation configuration, so as to obtain the AI ​​model after crossover and mutation processing.

[0007] According to another aspect of an embodiment of the present invention, there is also provided an AI graphical programming device based on a genetic algorithm, comprising: a configuration module, configured to respond to detecting that a programming instruction block related to the genetic algorithm is dragged to a code area of ​​a graphical programming interface, and to perform cross-configuration and mutation configuration through the programming instruction blocks; a cross-mutation module, configured to respond to instructions for executing the graphical code of the code area, to perform a crossover operation on a selected AI model using the crossover configuration, and to perform a mutation operation using the mutation configuration, so as to obtain the AI ​​model after crossover and mutation processing.

[0008] In an embodiment of the present invention, in response to detecting that a programming instruction block related to a genetic algorithm is dragged to a code area of ​​a graphical programming interface, a crossover configuration and a mutation configuration are performed through the programming instruction block; in response to an instruction to execute the graphical code of the code area, a crossover operation is performed on the selected AI model using the crossover configuration, and a mutation operation is performed using the mutation configuration to obtain the AI ​​model after crossover and mutation processing. Through the above scheme, the problem that it is difficult to implement genetic algorithm technology in the existing graphical programming method is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0010] Figure 1 is a flowchart of a graphical programming method based on a genetic algorithm according to an embodiment of the present invention;

[0011] Figure 2 is an architectural diagram of a graphical programming platform according to an embodiment of the present invention;

[0012] Figure 3 is a network structure diagram of a cross-connect module according to an embodiment of the present invention;

[0013] Figure 4 is a workflow diagram of a graphical programming platform according to an embodiment of the present invention;

[0014] Figure 5 is a flowchart of a graphical programming method based on a genetic algorithm taking optimization of an AI model as an example according to an embodiment of the present invention;

[0015] Figure 6 is a schematic diagram of the structure of a graphical programming device based on a genetic algorithm according to an embodiment of the present invention;

[0016] Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0017] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0019] According to an embodiment of the present invention, a method embodiment of a graphical programming method based on a genetic algorithm is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0020] Figure 1 is a graphical programming method based on genetic algorithm according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0021] Step S102, in response to detecting that a programming instruction block related to the genetic algorithm is dragged to a code area of ​​the graphical programming interface, cross configuration and mutation configuration are performed through the programming instruction block.

[0022] Genetic Algorithm (GA) is an optimization algorithm based on natural selection and genetics. It simulates the biological evolution process and searches for the optimal solution to a problem through a series of operations (such as selection, crossover, mutation, etc.). Genetic algorithms are often used to solve complex optimization problems, especially those that are difficult to handle with traditional methods, such as multi-objective optimization and large-scale search problems.

[0023] In a traditional programming environment, the implementation of a genetic algorithm requires writing a lot of code, and even crossover and mutation operations involve multi-step calculations, which are difficult for beginners to master. The embodiment of the present application encapsulates the genetic algorithm in a programming instruction building block, and performs crossover configuration and mutation configuration by dragging the programming instruction building block related to the genetic algorithm to the code area of ​​the graphical programming interface. For example, through the programming instruction building block, the intersection position is configured, and the mutation probability and mutation position are configured.

[0024] Step S104, in response to an instruction to execute the graphical code of the code area, a crossover operation is performed on the selected AI model using the crossover configuration, and a mutation operation is performed using the mutation configuration to obtain the AI ​​model after crossover and mutation processing.

[0025] First, the initial population is set through the graphical programming interface, and a fitness function is defined to evaluate the quality of the AI ​​model.

[0026] Next, the crossover configuration is used to perform a crossover operation. In the case of a single-point crossover, the crossover configuration is used to exchange the parent genes through a crossover point to form two new offspring individuals; in the case of a multi-point crossover, the crossover configuration is used to exchange genes through multiple crossover points; in the case of a uniform crossover, the crossover configuration is used to independently crossover each gene position. In the present application, the crossover configuration is used to perform a crossover operation to generate new offspring individuals, which can combine the excellent characteristics of the parent individuals to improve the fitness of the new individuals. In the case of a single-point crossover, the parent genes are exchanged through a crossover point, which can quickly generate diversified individuals and increase the diversity of the population; in the case of a multi-point crossover, the genes are exchanged through multiple crossover points, so that the offspring individuals have a wider combination of characteristics, further improving the evolutionary potential of the population; in the case of a uniform crossover, each gene position is independently crossed, and the various parts of the parent genes can be evenly mixed, which improves the ability of the population to explore the solution space and helps avoid falling into a local optimum.

[0027] Afterwards, the mutation configuration is used to perform mutation operations. In the case of simple mutation, the preset position of the individual gene is randomly changed; in the case of exchange mutation, the two gene positions of the individual are randomly exchanged to change the structure of the two genes; in the case of reversal mutation, a gene sequence is randomly selected and the gene sequence is reversed. Using the mutation configuration for mutation operations can introduce new gene characteristics and further increase the diversity of the population. In the case of simple mutation, randomly changing the preset position of the individual gene can effectively break the local characteristics of the individual and increase the opportunity to explore new solutions; in the case of exchange mutation, by randomly exchanging the two gene positions of the individual to change its structure, a new gene combination can be generated to improve the quality of the solution; in the case of reversal mutation, a gene sequence is randomly selected and reversed, which can effectively explore new solution space areas, further enhance the algorithm's ability to jump out of the local optimal solution, and enhance the overall optimization effect.

[0028] After obtaining the AI ​​model after crossover and mutation processing, the population changes and fitness distribution of the AI ​​model after crossover and mutation can also be displayed through visualization tools.

[0029] The present application integrates genetic algorithms, especially crossover and mutation operations, in a graphical programming environment, which not only allows users to perform optimization tasks simply and intuitively, but also allows them to learn the implementation of complex algorithms in an easy-to-use programming environment.

[0030] The present invention proposes a crossover and mutation operation implemented in a graphical programming platform, so that users can complete key steps in a genetic algorithm by dragging and configuring graphic modules, which is convenient for users to understand and apply.

[0031] This application provides a graphical programming platform, such as Figure 2 As shown, it includes a graphical programming interface 12, a crossover module 14, a mutation module 16 and a real-time visualization tool 18. The graphical programming interface is a graphical module that provides crossover and mutation operations based on a graphical programming platform. The crossover module includes a variety of crossover operations, which are provided for user selection and configuration. The mutation module includes a variety of mutation operations, which the user can freely select. The real-time visualization tool can display the results after crossover and mutation in real time.

[0032] The cross module will be described in detail below. The network structure diagram of the cross module is as follows Figure 3 As shown, it includes input layer, hidden layer and output layer.

[0033] Single-point crossover is to exchange the genes of the parent generation through a crossover point to form two new offspring individuals. Assuming that the genes of the two parent individuals are represented as P1 and P2, and the crossover point is c, the generated offspring individuals are represented as:

[0034] Child1=P1[0:c]+P2[c:end]

[0035] Child2=P2[0:c]+P1[c:end].

[0036] Multi-point crossover is to exchange genes through multiple crossover points to increase gene diversity. Assuming there are two crossover points c1 and c2, the generated offspring individuals are expressed as:

[0037] Child1=P1[0:c1]+P2[c1:c2]+P1[c2:end]

[0038] Child2=P2[0:c1]+P1[c1:c2]+P2[c2:end].

[0039] Uniform crossover is an independent crossover at each gene position, which increases randomness. Assuming the crossover probability is p, the crossover of each gene position can be expressed as:

[0040] for i from 0 to length(P1)

[0041] if random(0,1) <p

[0042] Child1[i]=P1[i]

[0043] Child2[i]=P2[i]

[0044] else

[0045] Child1[i]=P2[i]

[0046] Child2[i]=P1[i]

[0047] The mutation module will be described below.

[0048] Simple mutation is to randomly change a certain bit of individual gene to improve population diversity. Assuming the mutation probability is pm and the gene is represented by G, the mutation operation can be expressed as:

[0049] for i from 0 to length(G)

[0050] if random(0,1) <pm

[0051] G[i]=random(0,1) / / assuming gene is binary

[0052] Exchange mutation is to randomly exchange two gene positions of an individual to change its structure. Assuming the gene position is i, the exchange mutation can be expressed as:

[0053] temp=G[i]

[0054] G[i]=G[j]

[0055] G[j]=temp

[0056] Reversal mutation is to randomly select a gene sequence and reverse it, which can be expressed as:

[0057] segment=G[i:j]

[0058] reverse(segment)

[0059] G[i:j]=segment.

[0060] The following describes the workflow of the graphical programming platform. Figure 4 As shown, the graphical programming method of the graphical programming platform includes the following steps:

[0061] Step S402, setting the initial population.

[0062] In the graphical programming interface, users drag and drop corresponding modules to set the population size and genetic encoding method.

[0063] Step S404, defining a crossover operation.

[0064] The user drags the crossover module, such as single-point crossover, multi-point crossover, etc., and configures the crossover point position.

[0065] Step S406, performing a crossover operation.

[0066] The system performs crossover operations according to the configuration to generate new offspring individuals.

[0067] Step S408, defining a mutation operation.

[0068] The user drags mutation modules, such as simple mutation, exchange mutation, reversal mutation, etc., and configures the mutation probability and mutation position.

[0069] Step S410, performing a mutation operation.

[0070] The system performs mutation operations according to the settings and updates individual genes.

[0071] Step S412: display the results in real time.

[0072] Use visualization tools to display population changes and fitness distribution after crossover and mutation.

[0073] The present invention provides a simple, flexible and intuitive genetic algorithm crossover and mutation implementation method through a graphical programming platform, has broad application prospects, and is particularly suitable for education and beginner training.

[0074] The following describes a graphical programming method based on genetic algorithms, taking the optimization of AI models as an example. Figure 5 As shown, the method comprises the following steps:

[0075] Step S502, initialization.

[0076] In the graphical programming platform, the user first sets the initial population. The initial population is the basis for the genetic algorithm to start optimization, and each individual represents a possible AI strategy. In this platform, users can define the size of the population and the genetic encoding method by dragging and dropping modules. In addition, users need to define a fitness function to evaluate the pros and cons of each AI strategy. The definition of the fitness function is usually based on the performance indicators of the AI ​​model, such as accuracy, recall rate, F1 score, etc., to ensure that the optimization process is carried out in the direction of improving model performance.

[0077] In order to prevent the population from falling into a local optimal solution, a strategy diversity constraint is introduced into the fitness function. This constraint encourages the generation of AI strategies with different characteristics, thereby improving the diversity and overall exploration ability of the population. In specific implementation, the score of the AI ​​strategy in the population can be calculated and used as part of the fitness function.

[0078] In some embodiments, the score of the fitness function can be obtained based on the following: determining the weights of performance indicators based on environmental conditions; obtaining the weighted sum of the AI ​​strategy on different performance indicators based on the weights of the performance indicators and the performance indicators; determining the contribution of diversity to fitness based on the diversity score and diversity weight coefficient of the AI ​​strategy; determining the contribution of robustness to fitness based on the robustness score and robustness weight coefficient of the AI ​​strategy; finally, determining the score of the fitness function based on the weighted sum of the AI ​​strategy on different performance indicators, the contribution of diversity to fitness, and the contribution of robustness to fitness.

[0079] Specifically, the fitness function can be expressed as:

[0080]

[0081] Where D(AI) represents the diversity score of the AI ​​strategy, and γ is the diversity weight coefficient, which adjusts the influence of diversity in the fitness function. AI represents a specific AI strategy. The AI ​​strategy can be an algorithm model, such as a genetic algorithm model. E represents the environment state, which is used to describe the external environment conditions in which the AI ​​strategy is located, including dynamically changing factors such as data distribution, network conditions, input and output requirements, etc. The introduction of the environment state can help the fitness function dynamically adjust its evaluation criteria according to changes in the external environment. Mi(AI) represents the i-th performance indicator, which is usually used to evaluate the performance of the AI ​​strategy. These indicators can be accuracy, recall, and F1 score. wi(E) represents the weight of the i-th performance indicator, and the weight depends on the environment state E. By dynamically adjusting the weight wi(E), the fitness function can give different performance indicators different priorities according to different states of the environment. For example, in some environments, more attention is paid to accuracy rather than recall. In this case, the weight of accuracy will be higher. D(AI) represents the diversity score of the AI ​​strategy. The diversity score measures the degree of difference between individuals in the population, encouraging the optimization process to generate more diverse AI strategies and avoiding the population from falling into a local optimal solution. For example, D(AI) can be quantified by calculating the distribution difference of AI strategies in parameter space or feature space. R(AI) represents the robustness score of the strategy. Robustness measures the stability and consistency of AI strategies under different test conditions or environmental changes. For example, if an AI strategy can still maintain high performance in the face of changes in data distribution or noise interference, it means that the strategy has good robustness. δ is the robustness weight coefficient, which controls the influence of the robustness score R(AI) on the fitness function. A higher δ value indicates that more emphasis is placed on the robustness of the strategy, ensuring that the AI ​​strategy performs stably in a changing environment.

[0082] Step S504, configuring parameters.

[0083] During the parameter configuration stage, users need to select appropriate crossover and mutation modules and configure the corresponding parameters.

[0084] 1) Cross-module configuration.

[0085] Users can choose different types of crossover modules such as single-point crossover, multi-point crossover or uniform crossover. When selecting single-point crossover, users need to configure the location of the crossover point, which determines how the gene sequences of the two parent individuals are exchanged. For example, if a single-point crossover is selected, the system will cut the parent gene at the configured crossover point and exchange it to form a child individual. For multi-point crossover, users need to configure multiple crossover points, which can increase the genetic diversity of the offspring and improve the exploration ability of the population.

[0086] 2) Mutation module configuration. Users can choose different types of mutation modules such as simple mutation, exchange mutation or reversal mutation. The platform allows users to set the mutation probability and mutation position. The mutation probability determines the frequency of random changes in genes, while the mutation position determines the specific location of gene mutation. For example, in simple mutation, if the random probability is lower than the set mutation probability, the gene position mutates; in exchange mutation, two gene positions are exchanged, changing the structure of the individual.

[0087] Step S506, performing crossover and mutation operations.

[0088] The user drags the corresponding crossover module (such as single-point crossover, multi-point crossover, uniform crossover) in the interface and configures relevant parameters (such as crossover point position or crossover probability). The system will automatically perform the crossover operation according to the user configuration and generate new offspring individuals. For example, in a single-point crossover operation, the system will cut the parent gene according to the configured crossover point and cross to form a new offspring.

[0089] Similarly, users can drag and drop the corresponding mutation modules (such as simple mutation, exchange mutation, reversal mutation) and configure relevant parameters (such as mutation probability or mutation position). The system automatically performs gene mutation operations according to the configuration. For example, in the reversal mutation operation, the system will randomly select a gene sequence and reverse it to update the individual's gene structure.

[0090] Step S508: Visual display

[0091] In order to help users intuitively understand and adjust the optimization process, the graphical programming platform provides powerful real-time visualization tools. Users can observe the changes in individual genes and fitness distribution in the population in real time. Through visualization tools, users can observe the impact of crossover and mutation operations on population diversity and improvements in fitness. Real-time feedback allows users to adjust crossover and mutation strategies more quickly and optimize the effects of AI strategies.

[0092] This application uses a graphical programming environment, so users can implement complex crossover and mutation operations without writing code, which greatly simplifies the operation process. Secondly, the crossover and mutation modules support a variety of operations and configurations, and users can freely combine them according to specific needs, which enhances the flexibility of operation. In addition, the system also provides real-time visualization tools that allow users to observe the effects of crossover and mutation in real time, making it convenient for them to adjust and optimize strategies. Finally, the system is easy to understand and operate, suitable for beginners and teaching scenarios, and helps users intuitively understand the key steps in genetic algorithms.

[0093] The present application also provides a graphical programming device based on genetic algorithm, such as Figure 6As shown, it includes: a configuration module 62, which is configured to respond to detecting that a programming instruction block related to the genetic algorithm is dragged to the code area of ​​the graphical programming interface, and perform crossover configuration and mutation configuration through the programming instruction block; a crossover mutation module 64, which is configured to respond to the instruction of executing the graphical code in the code area, perform a crossover operation on the selected AI model using the crossover configuration, and perform a mutation operation using the mutation configuration to obtain the AI ​​model after crossover and mutation processing.

[0094] It should be noted that: the graphical programming device based on genetic algorithm provided in the above embodiment is only illustrated by the division of the above functional modules. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the graphical programming device based on genetic algorithm provided in the above embodiment and the graphical programming method embodiment based on genetic algorithm belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0095] Figure 7 FIG. 1 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. It should be noted that: Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0096] like Figure 7 As shown, the electronic device includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0097] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0098] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, various functions defined in the method and apparatus of the present application are executed. In some embodiments, the electronic device may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0099] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0100] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An AI graphical programming method based on genetic algorithm, characterized in that: include: In response to detecting that a programming instruction building block related to the genetic algorithm is dragged to a code area of ​​the graphical programming interface, performing cross configuration and mutation configuration through the programming instruction building block; In response to an instruction to execute the graphical code of the code area, a crossover operation is performed on the selected AI model using the crossover configuration, and a mutation operation is performed using the mutation configuration to obtain the AI ​​model after crossover and mutation processing.

2. The method according to claim 1, characterized in that The crossover configuration and mutation configuration are performed by the programming instruction building blocks, including: configuring the crossover point position, and configuring the mutation probability and mutation position by the programming instruction building blocks.

3. The method according to claim 1, characterized in that Performing a crossover operation using the crossover configuration includes: In the case of a single-point crossover, using the crossover configuration, the parental genes are exchanged through a crossover point to form two new offspring individuals; and / or In the case of multi-point crossover, using the crossover configuration to perform gene exchange through multiple crossover points; and / or In the case of uniform crossover, each genetic position is crossed over independently using the crossover configuration.

4. The method according to claim 1, characterized in that: The mutation configuration is used to perform a mutation operation, including: In the case of simple mutations, randomly changing a predetermined position of an individual gene; and / or In the case of a crossover mutation, two gene positions of an individual are randomly swapped, changing the structure of the two genes; and / or In the case of a reversal mutation, a gene sequence is randomly selected and reversed.

5. The method according to claim 1, characterized in that After obtaining the AI ​​model after crossover and mutation processing, the method further includes: displaying the population changes and fitness distribution of the AI ​​model after crossover and mutation through a visualization tool.

6. The method according to claim 1, characterized in that Before cross-configuring the programming instruction blocks, the method further includes: setting an initial population through the graphical programming interface and defining a fitness function to evaluate the quality of the AI ​​model.

7. An AI graphical programming device based on genetic algorithm, characterized in that: include: a configuration module configured to, in response to detecting that a programming instruction building block related to a genetic algorithm is dragged to a code area of ​​a graphical programming interface, perform cross configuration and mutation configuration through the programming instruction building block; The crossover and mutation module is configured to respond to an instruction to execute the graphical code of the code area, perform a crossover operation on the selected AI model using the crossover configuration, and perform a mutation operation using the mutation configuration to obtain the AI ​​model after crossover and mutation processing.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor is enabled to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.