AI graphical programming method and platform based on C language

Through AI graphical programming methods and platforms based on C++ language, C++ code is generated using graphical building block splicing and code mapping engines, learning difficulties caused by complex grammar and strict rules of C language are solved, and a smooth transition from beginner to professional programming language is achieved.

CN119806507APending Publication Date: 2025-04-11SHENZHEN DIANMAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411888880.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The complex grammar and strict rules of C language lead to learning difficulties for beginners, existing graphical programming tools lack a smooth transition with professional programming languages, and educational materials fail to effectively meet children's learning needs.

Method used

Provides an AI graphical programming method and platform based on C++ language. It uses a graphical editor to select graphical building blocks from the building block library and splice them. It analyzes the building block combination information through the code mapping engine to generate C++ code.

Benefits of technology

It lowers the threshold for C language learning, helps beginners to master programming knowledge more easily, and lays the foundation for their smooth transition to professional programming language learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806507A_ABST
    Figure CN119806507A_ABST
Patent Text Reader

Abstract

The invention discloses an AI graphical programming method and platform based on a C language. The method comprises the following steps: selecting graphical building blocks from a building block library by utilizing a graph editor, and splicing the graphical building blocks to obtain building block combination information; and a code mapping engine analyzes the building block combination information to obtain a program logic represented by the building block combination information, and generates a C + + code based on the program logic. The technical problem that a beginner is difficult to learn due to complex grammar and strict rules of the C language 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 graphical programming, and in particular to an AI graphical programming method and platform based on C language. Background Art

[0002] With the rapid development of information technology, programming education has gradually become an important part of children's education. More and more educators and parents realize that programming can not only cultivate children's logical thinking and problem-solving abilities, but also lay a good foundation for their future learning and career development. Among many programming languages, C language occupies an important position due to its powerful functions and wide application in software development, algorithm competitions and other fields. However, the complex syntax and strict programming rules of C language constitute a high learning threshold for beginners, especially children, which often affects their learning interest and effectiveness.

[0003] Although the graphical programming tools currently available on the market have successfully reduced the difficulty of getting started with programming to a certain extent, these tools are usually based on proprietary programming languages ​​and lack a smooth transition to professional programming languages ​​(such as C++). The design of such tools focuses on graphical operations and logical construction, and often ignores the grammatical rules and structure of actual programming languages, resulting in learners facing knowledge gaps and adaptability challenges when they turn to learning advanced programming languages. In addition, the existing educational materials and tools for C++ are mostly biased towards adult learners, lack adaptive designs for children's cognitive characteristics, and fail to effectively meet children's needs in the learning process. Therefore, there is an urgent need to develop a more friendly programming learning tool that can not only attract children's interest, but also lay the foundation for their smooth transition to the study of professional programming languages.

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

[0005] The embodiments of the present invention provide an AI graphical programming method and platform based on C language, so as to at least solve the technical problem that the complex syntax and strict rules of C language make it difficult for beginners to learn.

[0006] According to one aspect of an embodiment of the present invention, there is provided an AI graphical programming method based on C++ language, comprising: using a graphical editor to select graphical building blocks from a building block library and to connect them to obtain building block combination information; a code mapping engine analyzes the building block combination information to obtain program logic represented by the building block combination information, and generates C++ code based on the program logic.

[0007] According to another aspect of an embodiment of the present invention, there is also provided an AI graphical programming platform based on C++ language, including: a user interface layer, configured to use a graphical editor to select graphical building blocks from a building block library and to splice them to obtain building block combination information; a logic processing layer, configured to use a code mapping engine to analyze the building block combination information to obtain program logic represented by the building block combination information; and a code generation layer, configured to generate C++ code based on the program logic.

[0008] In the embodiment of the present invention, a graphical building block is selected from a building block library and assembled using a graphic editor to obtain building block combination information; a code mapping engine analyzes the building block combination information to obtain the program logic represented by the building block combination information, and generates C++ code based on the program logic. The above solution solves the technical problem that the complex syntax and strict rules of the C language make it difficult for beginners to learn. 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 an AI graphical programming method based on C++ language according to an embodiment of the present invention;

[0011] Figure 2 is a flowchart of another AI graphical programming method based on C++ language according to an embodiment of the present invention;

[0012] Figure 3 is a flowchart of another AI graphical programming method based on C++ language according to an embodiment of the present invention;

[0013] Figure 4 is a flowchart of an AI graphical programming method according to an embodiment of the present invention;

[0014] Figure 5 is a flowchart of a method for code mapping and generating C++ code according to an embodiment of the present invention;

[0015] Figure 6 It is a schematic diagram of the structure of an AI graphical programming device based on C++ language 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 an AI graphical programming method based on C++ language 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 an AI graphical programming method based on C++ language according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0021] Step S102: Use a graphic editor to select graphical building blocks from a building block library and assemble them to obtain building block combination information.

[0022] First, the basic syntax elements of C++ are mapped to graphical building blocks and stored in the building block library. The basic syntax elements of C++ include at least one of the following: loop elements, conditional elements, and function elements. The loop elements may include graphical representations of for loops and while loops, the conditional elements may include if statements and their corresponding else branches, and the function elements represent the definition and call of functions.

[0023] Next, use a graphic editor to select graphical building blocks from the building block library and assemble them to obtain building block combination information.

[0024] While the blocks are being assembled, the user is assisted in understanding the programming concept of the graphical blocks by at least one of the following methods: voice guidance, animation demonstration, and instant feedback.

[0025] Then, it is verified whether the program logic represented by the building block combination information is correct.

[0026] Step S104: the code mapping engine analyzes the building block combination information, obtains the program logic represented by the building block combination information, and generates C++ code based on the program logic.

[0027] First, the code mapping engine receives the building block combination information created by the user through the graphical interface, which contains different types of building blocks and their interconnected relationships. The engine identifies the logical structure of the entire program by parsing these combination relationships and determines the execution order and data flow. Next, based on the analyzed program logic, the code mapping engine generates the corresponding C++ code. The engine maps different types of building blocks to corresponding C++ statements and structures to complete the code expression of the logic.

[0028] In addition, in some embodiments, the system also integrates a source code editor, allowing users to directly write C++ code. After the user enters the code, the code mapping engine will parse the code, identify its logic and structure, and generate corresponding graphical building blocks. Ultimately, these building blocks will be dynamically displayed in the graphical editor, allowing users to experience the flexibility and powerful functions of text programming while enjoying graphical programming. This two-way conversion not only improves the visual experience of programming, but also enhances the user's operating efficiency.

[0029] This application provides an AI graphical programming platform based on C++ language, such as Figure 2 As shown, the platform includes a user interface layer 22 , a logic processing layer 24 and a code generation layer 26 .

[0030] The user interface layer 22 provides a friendly graphical environment for learners, including a graphic editor 222 and a project management module 224. The graphic editor module is used to support drag-and-drop operations. Users can drag building blocks to the editing area for splicing to build program logic. The editor interface design is simple and intuitive, and the classification of building blocks is clear and visible, so users can quickly find the building blocks they need. The project management and sharing module is used to allow users to save projects, view historical records, and upload projects to the community to interact with other learners.

[0031] The logic processing layer 24 is responsible for processing the logic of the building blocks spliced ​​by the user in the graphical editor. It mainly includes a building block library module 242 and a teaching auxiliary module 244. The building block library module contains graphical building blocks of basic C++ syntax elements (such as loops, conditions, and functions). Each building block is uniquely designed, has clear functions, is easy to identify, and can help users understand the corresponding programming concepts. The teaching auxiliary module is used to provide voice guidance, animation demonstrations, and instant feedback to assist users in understanding programming concepts. This module will automatically provide relevant learning materials and sample codes based on the user's splicing progress to deepen the user's understanding of knowledge points.

[0032] The code generation layer converts the building blocks spliced ​​by the user into standard C++ code in real time. It mainly includes a code mapping engine module 262. The code mapping engine module monitors the building block splicing status in real time, automatically converts the spliced ​​building block information into corresponding C++ code, and displays it on the interface. The code mapping engine can also realize reverse parsing from code to building blocks, so that users can see the graphical representation corresponding to the code they wrote in the graphical interface.

[0033] The following is a detailed description of the operation process of the AI ​​graphical programming platform based on C++ language. Figure 3 As shown, the graphical programming method applied on the AI ​​graphical programming platform includes the following steps:

[0034] Step S302: The user selects building blocks in the graphic editor and assembles them.

[0035] The user selects the required building blocks in the graphical editor and drags them from the building block library to the work area for splicing. Each building block in the building block library corresponds to the basic syntax elements of C++. For example, loop blocks include for and while loops, and conditional blocks include if and switch statements. Users can quickly identify their functions through visual labels.

[0036] The graphical programming platform displays the current block combination information and provides real-time feedback to users. The graphical editor supports multiple operations, such as zooming, dragging and splicing, and has undo and redo functions, allowing users to flexibly adjust during the splicing process.

[0037] Step S304: the editor transmits the building block combination information to the code mapping engine in real time.

[0038] The graphical editor keeps track of the state of the blocks that the user has assembled, including the type of each block, the connection relationship, and the order of assembly. The above information is stored in an internal data structure in real time, such as a tree structure or a graph structure, for subsequent processing. Whenever the user operates a block (such as dragging, rotating, or deleting), the editor will automatically update the information in the data structure. This update mechanism ensures that the code mapping engine can always receive the latest state of the block combination.

[0039] An efficient communication interface is established between the editor and the code mapping engine. This interface is responsible for converting the captured building block combination information into a format that can be processed by the code mapping engine. When the building blocks are assembled, the code mapping engine module will analyze the building block combination information and extract the corresponding program logic.

[0040] Step S306: The code mapping engine analyzes the logic, generates C++ code, and displays it on the interface.

[0041] The logic processing layer verifies in real time whether the splicing logic is correct. The code mapping engine monitors the state of the building block splicing. If an error is found, the graphical programming platform will guide the user to make corrections through visual identification (such as a red box) or voice prompts (such as "the splicing logic is incorrect"). By establishing a mapping relationship between building blocks and C++ syntax, it is ensured that the generated code complies with the programming specifications. The parsing algorithm of this application can quickly and efficiently convert the building block logic into standard C++ code.

[0042] The generated code will be displayed in real time in the code output area, and users can directly view the C++ code corresponding to the building blocks they are connected to. This module ensures that the generated code is consistent with the building block logic, thereby maintaining the accuracy and readability of the code.

[0043] Step S308: providing personalized learning guidance based on user operations.

[0044] The teaching assistance module provides personalized learning guidance based on the user's operation. For example, when the user is splicing conditional blocks, the graphical programming platform can provide detailed explanations and examples of conditional statements.

[0045] The animation demonstration is updated in real time according to the user's splicing process, showing the operation process of programming logic in a vivid way. The module integrates voice recognition technology, which can recognize the user's voice commands and provide corresponding feedback to enhance the interactivity of learning.

[0046] After completing a project, users can choose to save the project to their personal space or upload it to the community to share their achievements with other learners. The project management and sharing module supports users to manage personal projects, including editing, deleting and sharing functions, to promote interaction and cooperation among learners.

[0047] The graphical programming platform ensures that the projects created by users are saved in the cloud, ensuring the security and reliability of data. Users can access and manage their own projects at any time, enhancing their sense of participation and achievement.

[0048] The present invention maps the C++ syntax structure to graphical building blocks, maintaining the language characteristics while achieving intuitive operation. Through the real-time two-way conversion mechanism, the graphical programming platform can not only convert building blocks into code, but also support reverse parsing from code to building blocks, making it easier for learners to understand the code logic. In addition, the integrated teaching auxiliary function comprehensively improves the learning experience and efficiency.

[0049] Compared with the best graphical programming tools currently on the market, this invention significantly improves the affinity and effectiveness of C++ learning. Specific advantages include: seamless connection with professional languages, directly using C++ as the basis for programming, ensuring the continuity and practicality of learning, and reducing the obstacles for learners to switch languages ​​in the future; high interactivity and fun, concretizing abstract programming concepts through building blocks, greatly enhancing the fun and participation of learning; comprehensive learning support system, providing a programming environment while integrating teaching resources and social platforms, forming a comprehensive learning ecosystem, which is conducive to continuous learning and innovation; and accurate positioning of learning difficulties. The system directly points to common misunderstandings in programming learning through instant feedback and auxiliary functions, accelerating the learning process and improving learning efficiency.

[0050] The present application also provides an AI graphical programming method, such as Figure 4 As shown, the method comprises the following steps:

[0051] Step S402: assembling building blocks.

[0052] The building block library contains various building blocks corresponding to the basic syntax elements of C++, such as conditional statements (if / else), loop statements (for / while), and function definitions, etc. Each building block is uniquely designed with different colors and shapes so that users can quickly identify its function.

[0053] The connection between building blocks is achieved through standardized interfaces. The interface design of each building block follows a unified specification to ensure that it can be connected correctly when spliced. The connection points of the building blocks are designed to be specific shapes (such as semicircular or convex), and only building blocks of matching shapes are allowed to be spliced. For example, the output interface of the conditional building block can only be connected to the logic building block that receives the conditional result, thus avoiding logical errors.

[0054] When users try to put mismatched blocks together, the graphical programming platform will provide real-time feedback, guiding users to make corrections through color changes (such as red prompts) or pop-up prompt boxes. This feedback mechanism is designed to help users understand programming logic and reduce errors during the splicing process.

[0055] The user drags the required building blocks from the building block library into the work area by dragging. The graphical programming platform will display the current building block combination information in real time. The user can flexibly adjust the building block content through functions such as zooming in and out, dragging, and undoing and redoing. During the building process, the graphical programming platform will verify the logic of the building blocks to ensure that the building blocks comply with the C++ syntax rules. For example, when building loops and conditional building blocks, the graphical programming platform will check the nesting relationship and the termination condition settings to ensure that the generated program logic is valid.

[0056] Step S404: code mapping, generating C++ code.

[0057] like Figure 5 As shown, the method comprises the following steps:

[0058] Step S4042, analyzing the building block structure.

[0059] First, the building block data that the user splices is received from the graphical editor. This data is usually transmitted in JSON or XML format, including the type, parameters, and connection information of each building block. After receiving the data, the graphical programming platform creates a node object for each building block. Each node contains several important attributes, such as the type of building block (such as condition, loop, function), unique identifier (ID), input parameters (such as variable name and value), and a list of sub-building blocks under the node.

[0060] Next, the graphical programming platform analyzes the connection information between the blocks to determine the parent-child relationship. At this point, the child block is added to the child block list of its parent block, forming a tree structure. During the processing, the graphical programming platform also handles special cases. For example, for conditional blocks, the rationality of the connection will be verified; for loop blocks, the correctness of the execution order will be ensured; for function call blocks, the accuracy of parameter transfer and logical relationships will be ensured.

[0061] After confirming the connections and logical relationships between the building blocks, the parsed tree structure will be prepared for output and serialized into a format suitable for subsequent processing so that it can be accessed by the code generation module.

[0062] Step S4044, derive the logical relationship.

[0063] The code mapping engine begins to analyze the logical relationship of each node to form a complete program logic. For example, a depth-first search (DFS) algorithm is used to traverse the tree structure and extract the logic of each building block and the relationship between them.

[0064] In the initial stage of logic derivation, the code mapping engine uses a depth-first search algorithm to go deep into each path until it reaches the leaf node of the tree. During this process, the code mapping engine analyzes the type of each node, the input parameters, and the connection relationship between nodes. For example, the logic of the conditional block requires a true or false judgment, while the loop block involves the number of iterations.

[0065] By analyzing the nodes, the code mapping engine can convert the logical information of the building blocks into an intermediate representation (IR). This abstract layer can better reflect the logical structure of the program. During the depth-first search process, the access path is also recorded to ensure that the control flow can be accurately reflected when the code is generated. For example, the true and false branches of the conditional building block will correspond to different code blocks, and the loop building block will add the corresponding loop structure in the final generated code.

[0066] After the logical relationship is derived, the logical relationship can also be tested to determine whether the logic is correct. For example, the first eigenvector of the context code of the logical relationship to be tested and the second eigenvector of the current code to be tested are extracted respectively, and the first eigenvector and the second eigenvector are respectively upgraded according to the extended rank criterion, and the first eigenvector and the second eigenvector are coupled and fused using a multi-channel convolution kernel to obtain the coupled main embedded feature matrix and the auxiliary embedded feature matrix. The above matrix is ​​expanded along the extended dimension direction to form multiple sub-matrices, and each sub-matrix is ​​subjected to singular value decomposition to extract the core subspace representation and factor matrix. The principal component difference between the main feature matrix and the auxiliary feature matrix is ​​calculated based on the core subspace representation and the factor matrix to extract the core features, thereby effectively identifying logical errors and reference problems.

[0067] After verifying the correctness of the logical relationship, the generated intermediate representation will be passed to the subsequent code generation module. Through the above analysis and integration, the code mapping engine realizes the seamless conversion from building blocks to program logic. This process not only improves the accuracy of the generated code, but also enhances the user's sense of participation and understanding in the programming learning process.

[0068] Step S4046, generate code.

[0069] In the code generation phase, the program logic derived from logical relationships is converted into standard C++ code. This application uses predefined code templates and parameter filling to ensure that the generated code not only conforms to the syntax specifications, but also accurately reflects the logic constructed by the user during the block splicing process.

[0070] First, the graphical programming platform maintains a complete set of code templates, which are designed according to different types of building blocks and their functions. Each building block, such as conditional judgment blocks, loop blocks, function definition blocks, etc., corresponds to a specific code structure and syntax form. The code templates usually contain basic syntax elements in the C++ language, such as control structures, data types, variable declarations, etc., for quick invocation when generating code.

[0071] In the specific implementation of code generation, the graphical programming platform first constructs corresponding syntax tree nodes according to the intermediate representation formed by logical derivation. The syntax tree is an abstract representation of the program, which shows the logical relationship and control flow of the program in a hierarchical structure. For example, when processing a building block containing conditional judgment, the graphical programming platform adds a node in the syntax tree to represent the condition and links its corresponding true branch and false branch nodes. For loop structures, the graphical programming platform adds corresponding iteration control nodes to ensure that the generated code can correctly implement the expected loop logic.

[0072] Next, the graphical programming platform fills the code templates with the specific parameters in the syntax tree nodes through template filling. This process usually involves parsing the attributes of each building block, such as the judgment condition of the conditional block, the iteration times of the loop block, the parameter types of the function block, etc. The graphical programming platform fills these parameters into the placeholders of the predefined templates to generate complete C++ code snippets. For example, when generating the code of a loop block, the graphical programming platform inserts the loop times specified by the user into the N position in the template "for(int i=0;i<N;i++)".

[0073] After the generated code snippets are completed, the graphical programming platform performs syntax checking and error detection to ensure that the generated C++ code meets the compilation requirements. This stage also includes verification of aspects such as variable scopes and type consistency to avoid errors during subsequent program execution.

[0074] Finally, the generated standard C++ code will be displayed in the code output area in real time, and users can directly view the C++ code corresponding to the building blocks spliced with it. This step not only realizes the efficient conversion from block logic to code, but also provides users with a visual learning experience to help them better understand the structure and usage of programming languages. In this way, the automation of the code generation process not only improves programming efficiency, but also enhances the fun and sense of participation in learning.

[0075] This application also provides an AI graphical programming platform based on the C++ language, such as Figure 6As shown, it includes: a user interface layer 22, which is configured to use a graphic editor to select graphical building blocks from a building block library and to splice them to obtain building block combination information; a logic processing layer 24, which is configured to analyze the building block combination information with a code mapping engine to obtain the program logic represented by the building block combination information; and a code generation layer 26, which is configured to generate C++ code based on the program logic.

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

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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 C language, characterized in that: include: Use the graphic editor to select graphical building blocks from the building block library and assemble them to obtain building block combination information; The code mapping engine analyzes the building block combination information, obtains the program logic represented by the building block combination information, and generates C++ code based on the program logic.

2. The method according to claim 1, characterized in that Before selecting graphical building blocks from a building block library using a graphical editor and assembling them, the method further includes: mapping C++ basic syntax elements into graphical building blocks and storing them in the building block library.

3. The method according to claim 2, characterized in that After selecting graphical building blocks from a building block library using a graphic editor and assembling them, the method further includes: verifying whether the program logic represented by the building block combination information is correct.

4. The method according to claim 2, characterized in that: The C++ basic syntax elements include at least one of the following: a loop element, a conditional element, and a function element.

5. The method according to claim 1, characterized in that: While selecting graphical building blocks from a building block library and assembling them using a graphic editor, the method further includes: assisting in understanding the programming concept of the graphical building blocks by at least one of the following methods: voice guidance, animation demonstration, and instant feedback.

6. The method according to claim 1, characterized in that The method further comprises: using a source code editor to write C++ code, converting the written C++ code into graphical building blocks and displaying the graphical building blocks in the graphical editor.

7. An AI graphical programming platform based on C language, characterized in that: include: The user interface layer is configured to select graphical building blocks from a building block library using a graphic editor and assemble them to obtain building block combination information; The logic processing layer is configured as a code mapping engine to analyze the building block combination information to obtain the program logic represented by the building block combination information; The code generation layer is configured to generate C++ codes based on the program logic.

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.