Visual programming method, apparatus, device, medium and product

CN122963525APending Publication Date: 2026-10-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510479568.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]然而,上述程序调试过程中运行信息的获取方式较为繁琐,因而降低了程序的调试效率

Benefits of technology

[0020]在实现可视化编程的过程中,在运行第一程序内容的过程中,通过自动生成的日志代码自动采集编程积木的运行信息,并向用户展示编程积木对应的运行结果的运行日志,从而使得用户在调试可视化的第一程序内容时,无需通过手动添加用于实现运行信息采集的编程积木即可实现调试过程的日志获取,实现了程序内容调试过程中运行日志的自动化生成,提升了调试过程的人机交互效率,同时,在调试结束后,用户也不再需要执行部分编程积木的删除操作,减少了对用户手动操作的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963525A_ABST
    Figure CN122963525A_ABST
Patent Text Reader

Abstract

The application discloses a visual programming method, device, equipment, medium and product. The method comprises the following steps: displaying first program content, the first program content comprising at least one programming block; receiving a code running operation for the first program content; in response to the code running operation, displaying a running result corresponding to the at least one programming block; displaying a running log corresponding to the running result, the running log comprising running information generated by the at least one programming block in a running process, and the running information being information collected through a log code automatically generated in the first program content. The method realizes automatic generation of the running log in the program content debugging process, and improves the human-computer interaction efficiency in the debugging process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of human-computer interaction technology, and in particular to a visual programming method, apparatus, device, medium and product. Background Technology

[0002] With the development of computer technology, more and more people have a need to learn programming. Visual programming is a programming method based on a graphical interface. It uses graphical blocks to represent the logic and function of a program, making it easy for non-professional developers to understand and create programs.

[0003] In related technologies, when users are developing using visual programming, in order to more intuitively understand the runtime information generated during program execution, they usually add graphical blocks to the program to print runtime information (e.g., print variables), thereby obtaining the program's runtime information during debugging.

[0004] However, the method of obtaining runtime information during the above program debugging process is rather cumbersome, thus reducing the debugging efficiency of the program. Summary of the Invention

[0005] This application provides a visual programming method, apparatus, device, medium, and product. The technical solutions provided by this application include the following aspects.

[0006] According to one aspect of the embodiments of this application, a visual programming method is provided, the method comprising:

[0007] Display the first program content, which includes at least one programming block, the programming block being a visual unit used to represent programming logic in visual programming;

[0008] Receive code execution operations targeting the content of the first program;

[0009] In response to the code execution operation, the execution result corresponding to the at least one programming block is displayed;

[0010] Display the running log corresponding to the running result. The running log includes running information generated during the running of the at least one programming block. The running information is information collected by the log code automatically generated in the first program content.

[0011] According to one aspect of the embodiments of this application, a visual programming apparatus is provided, the apparatus comprising:

[0012] A display module is used to display first program content, which includes at least one programming block. The programming block is a visual unit used to represent programming logic in visual programming.

[0013] The receiving module is used to receive code execution operations targeting the content of the first program;

[0014] The display module is also configured to display the execution result corresponding to the at least one programming block in response to the code execution operation;

[0015] The display module is also used to display the running log corresponding to the running result. The running log includes running information generated by the at least one programming block during the running process. The running information is information collected by the log code automatically generated in the first program content.

[0016] According to one aspect of the embodiments of this application, a terminal device is provided, the terminal device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described visual programming method.

[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, the computer program being loaded and executed by a processor to implement the above-described visual programming method.

[0018] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium, and a processor reading from the computer-readable storage medium and executing the computer program to implement the above-described visual programming method.

[0019] The technical solution provided in this application can bring the following beneficial effects:

[0020] In the process of implementing visual programming, during the execution of the first program content, the running information of the programming blocks is automatically collected through automatically generated log code, and the running logs of the running results corresponding to the programming blocks are displayed to the user. This allows the user to obtain the logs during the debugging process without having to manually add programming blocks for collecting running information when debugging the first program content. This achieves automated generation of running logs during program content debugging, improves the efficiency of human-computer interaction during the debugging process, and at the same time, the user no longer needs to delete some programming blocks after debugging, reducing the need for manual operation. Attached Figure Description

[0021] Figure 1This is a schematic diagram of the implementation environment of a solution provided in one embodiment of this application;

[0022] Figure 2 This is a flowchart of a visual programming method provided in one embodiment of this application;

[0023] Figure 3 This is a schematic diagram illustrating the log display of visual programming according to an embodiment of this application;

[0024] Figure 4 This is a flowchart of a visual programming method provided in one embodiment of this application;

[0025] Figure 5 This is a schematic diagram showing the operation log provided in one embodiment of this application;

[0026] Figure 6 This is a flowchart of a visual programming method provided in one embodiment of this application;

[0027] Figure 7 This is a schematic diagram of the translation process of programming building blocks in related technologies;

[0028] Figure 8 This is a schematic diagram illustrating the translation process of a programming block provided in one embodiment of this application;

[0029] Figure 9 This is a schematic diagram illustrating the process of generating log entries corresponding to programming blocks provided in one embodiment of this application;

[0030] Figure 10 This is a schematic diagram of a log item generation process provided in one embodiment of this application;

[0031] Figure 11 This is a schematic diagram of a log generation process provided in one embodiment of this application;

[0032] Figure 12 This is a flowchart illustrating the generation of runtime logs according to an embodiment of this application;

[0033] Figure 13 This is a block diagram of a visual programming apparatus provided in one embodiment of this application;

[0034] Figure 14 This is a block diagram of a visual programming apparatus provided in one embodiment of this application;

[0035] Figure 15 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0037] First, a brief introduction to the terms used in the embodiments of this application will be given.

[0038] Visual programming aims to help developers create graphical programming editors. It provides an intuitive interface that allows users to build programs by dragging and connecting various program blocks (building blocks). Each block represents a programming concept or operation, such as loops, conditional statements, mathematical operations, etc. Visual programming typically supports multiple programming languages, such as JavaScript, Python, and Lua. This means users can use the same graphical editor to create programs in different languages ​​and convert them into the corresponding source code.

[0039] Programming blocks (components): A block, block component, or programming block or programming block component is a visual unit for programming. It provides a series of modules or modular tools with different functions, allowing users to create program code by connecting these components. This programming method differs from traditional text-based programming, making programming more intuitive and easier to learn. In the embodiments of this application, "block" and "block component" and "programming block" and "programming block component" have the same meaning.

[0040] Please refer to Figure 1 This diagram illustrates an implementation environment provided by one embodiment of the present application. This implementation environment can be implemented as an application system. The implementation environment may include: a terminal device 10 and a server 20.

[0041] Terminal device 10 includes, but is not limited to, mobile phones, tablets, smart voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), in-vehicle terminals, smart home appliances, AR (Augmented Reality) devices, VR (Virtual Reality) devices, and other electronic devices. Terminal device 10 can run a client of a target application (such as a visual programming application). Optionally, the target application can be an application that needs to be downloaded and installed, or it can be a webpage or a mini-program; this application embodiment does not limit this.

[0042] In this application embodiment, the target application can be a visual programming application, a game application, or other applications with visual programming capabilities; this application embodiment does not limit this. It is understood that game applications have visual programming capabilities. For example, users can use this visual programming function to create UGC (User Generated Content).

[0043] Optionally, the target application is a puzzle game application that provides users with a visual programming editor to customize levels. A puzzle game is a game genre where the main objective is to complete a series of challenging levels. Users must face various obstacles, enemies, or puzzles to complete each level and ultimately achieve victory. Introducing a visual programming editor into the puzzle game application allows users without programming experience to easily design more complex custom levels. When designing a custom level, users need to debug the program, requiring them to obtain runtime logs for troubleshooting and error correction. Using the technical solution of this application, users can achieve automated runtime log acquisition without manually adding code for runtime information extraction, thereby improving the efficiency of creating custom levels.

[0044] Server 20 is used to provide backend services for the client of the target application in terminal device 10. For example, server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but it is not limited to these.

[0045] Terminal device 10 and server 20 can communicate with each other via a network. This network can be a wired network or a wireless network.

[0046] Please refer to Figure 2 This document illustrates a flowchart of a visual programming method provided in one embodiment of this application. The method is described by… Figure 1 Taking the terminal device 10 as an example, the method may include at least one of the following steps (210-240).

[0047] Step 210: Display the contents of the first program.

[0048] In this embodiment, the terminal device has a visual programming function. Schematic, the terminal device itself has a visual programming function; or, the terminal device has a visual programming function based on downloading a visual programming application, etc.

[0049] Optionally, visual programming is a feature built into an application, such as a game application that provides a UGC editor. The UGC editor supports the creation, adjustment, and sharing of custom content (such as virtual maps, virtual scenes, virtual characters, etc.) using objects. The UGC editor aims to lower the barrier to creation while maintaining high-quality output. The UGC editor has visual programming capabilities, which are designed to help users of the game application create a graphical programming editor that can guide users to build program content using programming blocks through an intuitive programming interface.

[0050] This illustration demonstrates that visual programming functionality is implemented through a programming interface. The interface includes multiple interactive functions, allowing users to engage in the visual programming process. These interactive functions include at least one of several, such as selection, zoom in, zoom out, delete, and move. Users can select programming blocks in the interface using the selection function, adjust the size of the blocks using zoom in / out, and adjust the state of the blocks within the interface using delete and move functions. No specific limitations are imposed on the interactive functions described here.

[0051] The aforementioned programming blocks are visual units used in visual programming to represent programming logic. Different programming blocks represent different concepts and operations in programming, and are used to implement different logical functions. Optionally, programming blocks can be understood as data blocks that encapsulate data execution logic; then, applying a programming block is the process of adopting that data execution logic.

[0052] In some embodiments, a user-defined function broadly refers to a reusable piece of code logic defined by the user to encapsulate a series of operations or functionalities. It allows programmers to encapsulate a piece of code logic into a function, specifying a name and a set of parameters for that function. In visual programming, user-defined functions can be implemented using user-defined, reusable programming blocks.

[0053] In some embodiments, programming blocks correspond to block types, which are the types of logical functions implemented in visual programming. Illustratively, the block types corresponding to programming blocks are the logical function types corresponding to data execution logic, such as: mathematical operation logic functions corresponding to mathematical operation type programming blocks, conditional judgment logic functions corresponding to conditional judgment type programming blocks, string operation logic functions corresponding to string operation type programming blocks, etc.

[0054] In this embodiment, the first program content displayed on the terminal includes at least one programming block. Optionally, the first program content may be program content obtained by programming with a first account logged into the visual programming application; or, the first program content may be program content imported by the first account, which is not limited here.

[0055] In some embodiments, a programming interface is displayed, and the first program content is obtained by programming using at least one programming block in the programming interface; or, a programming interface is displayed, and the first program content is imported in the programming interface.

[0056] The programming interface is the interface used for visual programming. Optionally, if visual programming is implemented through a webpage, the programming interface is the webpage interface; or, if visual programming is implemented through an application, the programming interface is the application's built-in interface, etc.

[0057] Step 220: Receive code execution operation for the content of the first program.

[0058] The code execution operation is used to instruct the execution of the functional code corresponding to at least one programming block in the first program content to obtain the corresponding execution result.

[0059] Alternatively, the code execution operation can be implemented as at least one of the following operations:

[0060] The first type is control-triggered operations that target code execution controls.

[0061] Schematic illustration: A code execution control is displayed in the programming interface, and the received control trigger operation for the code execution control is taken as the code execution operation. Optionally, the aforementioned control trigger operation for the code execution control can be implemented as at least one of the following: click operation, double-click operation, long press operation, heavy tap operation, swipe operation, etc., for the code execution control, and is not limited here.

[0062] The second type is the shortcut key triggering operation for preset shortcut keys associated with code execution functions.

[0063] As an illustration, the code execution function is bound to a preset shortcut key, and the shortcut key trigger operation received through the input device is used as the code execution operation. Optionally, the above-mentioned input device includes a keyboard, mouse, gamepad, smartphone, etc., and is not limited here.

[0064] The third type includes input voice containing preset keywords associated with the code execution function.

[0065] As an illustration, the code execution function is bound to preset keywords. It collects input voice through a microphone, performs voice detection on the input voice, and obtains the voice content corresponding to the input voice. If the voice content includes the aforementioned preset keywords, the operation of collecting the input voice is used as the code execution operation.

[0066] Step 230: In response to the code execution operation, display the execution result corresponding to at least one programming block.

[0067] The aforementioned execution results are graphical execution results, which are visual representations of the output results corresponding to the program code; that is, the results after sequentially executing at least one programming block contained in the first program content. Optionally, the execution results may include, but are not limited to, calculation results, function call results, interactive feedback, display effects, etc., and may also include other forms of execution results, which are not limited in this application. Optionally, the displayed execution results include at least one of static graphics, dynamic graphics, two-dimensional graphics, and three-dimensional graphics.

[0068] In some embodiments, the above-mentioned running results can be implemented as running results with interactive functions. Schematic, in response to the code running operation, an interactive interface is displayed, which includes at least one interactive element. The interactive interface is the running result of the first program content, and the user can trigger at least one interactive element in the interactive interface. For example, the interactive interface is implemented as a game level interface with a custom level, and the user can perform interactive operations in the game level interface obtained by running the program to test the custom level.

[0069] Step 240: Display the running log corresponding to the running result. The running log includes running information generated during the running of at least one programming block. The running information is information collected by the log code automatically generated in the first program content.

[0070] Indicatively, the runtime log includes runtime information generated during the execution of at least one programming block, used to help users understand the execution status, performance, and potential problems of the first program content.

[0071] Optionally, the runtime information includes at least one of the following:

[0072] • Output information: The content directly output to the console, file, or other output devices during the execution of the function code corresponding to the programming block;

[0073] • Timestamp information: Used to indicate the specific time when the record's runtime information was generated, typically including the date and time;

[0074] • Log Level Information: Used to distinguish the importance and urgency of runtime information, including DEBUG (most detailed information), INFO (normal information), WARNING (warning information), ERROR (error information), CRITICAL (critical error information), etc.

[0075] • Log Source Information: Used to identify the location where runtime information is generated, including module name, file name, function name, line number, programming block identifier, etc.

[0076] • Context Information: Used to provide background information for runtime information generation, such as user identifier, request identifier, thread identifier, etc.

[0077] • Performance Metrics: These indicate performance data recorded during the execution of the first program content, such as execution time, memory usage, and Central Processing Unit (CPU) utilization.

[0078] • Debug Information: This indicates detailed information generated when the first part of the program is run in debug mode, such as variable values, call stack information, etc.

[0079] • Dependencies: These indicate the external libraries, modules, or services that the program depends on during its execution.

[0080] In this embodiment of the application, the running information in the running log is obtained by collecting log code automatically generated in the first program content.

[0081] Optionally, the aforementioned log code is code automatically added during the generation of the first program content. Illustratively, the user places at least one programming block in the work area of ​​the programming interface, generates the first program content using the program generation control provided by the programming interface, and automatically inserts log code during the generation of the first program content. That is, in response to receiving a control trigger operation on the program generation control, at least one programming block is converted into corresponding function code, and the function code is combined with the preset log code to obtain the first program content.

[0082] Optionally, the aforementioned log code is code automatically added during the execution of the first program content. Illustratively, after the user places at least one programming block in the work area of ​​the programming interface, generates the first program content using the program generation control provided by the programming interface, and then inserts log code into the first program content when executing the code using the code execution control provided by the programming interface. That is, in response to receiving a control trigger operation for the code execution control, a preset log code is inserted into the first program content to obtain the second program content.

[0083] Alternatively, the runtime log can be displayed in at least one of the following ways:

[0084] The first option is automatic display.

[0085] Optionally, the running log is displayed when the first program content is detected to have finished running; or, the corresponding running log is displayed synchronously according to the running progress of the first program content during its running process; or, the running log is displayed when a running error is detected during the running process of the first program content.

[0086] The second method is manual triggering.

[0087] Optionally, the running log is displayed in response to receiving a control trigger operation for the first tool control corresponding to the running log; or, the running log is displayed in response to receiving a shortcut key trigger operation for a preset shortcut key bound to the running log; or, the running log is displayed in response to receiving input voice containing a preset tube detection associated with the running log.

[0088] In one example, let's take manual triggering as an example, such as Figure 3 As shown, this is a schematic diagram of a visual programming log display provided by an exemplary embodiment of this application. The diagram shows a programming interface 300, in which the user programs using programming blocks to obtain a first program content 310. After the user clicks the code running control 320 in the programming interface 300, a virtual level interface 330 implemented by the first program content 310 is displayed. The user performs interactive operations in the virtual level interface 330 to test the first program content. After the test is completed, the user returns to the programming interface 300 and retrieves the running log 350 corresponding to the first program content through the first tool control 340 displayed in the programming interface 300.

[0089] In some embodiments, a function to export runtime logs is provided to the user. Illustratively, a log export operation is received for the runtime logs, and in response to the log export operation, a runtime log file is generated, which is a file storing the runtime logs in a specified format. Optionally, the specified format includes .doc, .docx, .txt, .rtf, .xml, .json, etc., and is not limited thereto.

[0090] In some embodiments, the log export operation described above is implemented through a second tool control. The second tool control is illustrated, and it is used to implement the runtime log export function. In response to receiving a control trigger operation on the second tool control, the runtime log is exported and a corresponding runtime log file is generated.

[0091] During the execution of the first program content, when the user performs different interactive operations to test, different execution logs are generated. In some embodiments, the first program content corresponds to historical execution results; that is, the user runs the first program content within a historical time period and generates historical execution results, which correspond to historical execution logs. Based on the historical execution logs and the execution logs corresponding to the current execution results, a first comparison function is provided to the user. Illustratively, a first comparison operation is received between the execution logs and historical execution logs. In response to the first comparison operation, a first comparison result between the execution logs and historical execution logs is displayed. This first comparison result is used to indicate the differences between the execution logs and historical execution logs.

[0092] In some embodiments, the first comparison operation between the running log and the historical running log is implemented through a third tool control. Illustratively, the third tool control is shown, and in response to receiving a control trigger operation on the third tool control, the first comparison result between the running log and the historical running log is displayed.

[0093] Optionally, the first alignment result includes at least one of the following:

[0094] • First comparison information between the running information corresponding to the same interactive operation for different interactive elements, wherein the interactive element is the element used to implement the interactive operation in the interactive interface generated after running the first program content. For example, a virtual scene screen is displayed in the interactive interface generated by the first program content. The virtual scene screen includes interactive element A and interactive element B. The current running log records the running information A corresponding to the movement operation for interactive element A, and the historical running log records the running information B corresponding to the movement operation for interactive element B. The first comparison information is the difference between running information A and running information B.

[0095] • Second comparison information between runtime information corresponding to different interactive operations of the same interactive element. For example, a virtual scene is displayed in the interactive interface generated by the first program content. The virtual scene includes interactive element A. The current runtime log records runtime information A corresponding to the movement operation of interactive element A. The historical runtime log records runtime information B corresponding to the zoom operation of interactive element A. The second comparison information is the difference between runtime information A and runtime information B.

[0096] • The third comparison information is for the running information corresponding to different operation sequences in the same interactive operation group. The same interactive operation group is a combination of interactive operations for the same interactive element. For example, the interactive operation group includes the move operation, zoom operation and rotate operation for interactive element A. The current running log records the running information A corresponding to the operation sequence {move operation, zoom operation, rotate operation} for interactive element A. The historical running log records the running information B corresponding to the operation sequence {move operation, rotate operation, zoom operation} for interactive element A. The third comparison information is the difference between running information A and running information B.

[0097] • The fourth comparison information between the sets of input interactive operations during operation;

[0098] • The fifth comparison information between the current runtime log and the historical runtime log, including at least one of the following: output information, timestamp information, log level information, log source information, context information, performance information, debugging information, and dependency information.

[0099] In some embodiments, in the first comparison result, when the running information corresponding to the running log is different from the historical running information corresponding to the historical running log, the running information corresponding to the running log and the historical running information corresponding to the historical running log are compared and displayed using the first display style.

[0100] Optionally, the first display style includes at least one of the following: highlight display style, underline display style, bold display style, specified color display style, and outline display style, without limitation.

[0101] In some embodiments, the first program content corresponds to a third program content. The first program content and the third program content are program content of the same visual programming project under different versions. The first program content corresponds to the first version, and the third program content corresponds to the second version. Based on the running logs corresponding to the first version and the running logs corresponding to the second version, a second comparison function is provided to the user. Illustratively, a second comparison operation is received between the running logs corresponding to the first version and the running logs corresponding to the second version. In response to the second comparison operation, a second comparison result is displayed between the running logs corresponding to the first version and the running logs corresponding to the second version. This second comparison result is used to indicate the differences between the running logs corresponding to the first version and the running logs corresponding to the second version.

[0102] In some embodiments, the second comparison operation between the runtime logs corresponding to the first version and the runtime logs corresponding to the second version is implemented through a fourth tool control. Illustratively, the fourth tool control is displayed, and in response to receiving a control trigger operation on the fourth tool control, the second comparison result between the runtime logs corresponding to the first version and the runtime logs corresponding to the second version is displayed.

[0103] Optionally, when the first program content contains newly added programming blocks compared to the third program content, the second comparison result includes the running information of the newly added programming blocks; alternatively, when the first program content includes a first programming block and the third program content includes a second programming block, and the first and second programming blocks are programming blocks of the same type but with different input parameters, the second comparison result includes the running information corresponding to the first and second programming blocks respectively.

[0104] In summary, during the implementation of visual programming, the automatic log code automatically collects the running information of the programming blocks while running the first program content, and displays the running logs of the corresponding running results to the user. This allows users to obtain the debugging logs without manually adding programming blocks for collecting running information when debugging the first visual program content, thus achieving automated generation of running logs during program debugging and improving the efficiency of human-computer interaction during the debugging process. At the same time, after debugging, users no longer need to delete some programming blocks, reducing the need for manual operation.

[0105] In some optional embodiments, the runtime log is retrieved via a provided first tool control. Please refer to [reference needed]. Figure 4 This document illustrates a flowchart of a visual programming method provided in an exemplary embodiment of this application. The method may include at least one of the following steps (241-242), wherein steps (241-242) are... Figure 2The next step after step 240.

[0106] Step 241: Display the first tool control.

[0107] The first tool control is used to provide a query function for the runtime log. Optionally, the first tool control is displayed on the programming interface; or, the first tool control is displayed overlaid on a tool window in the programming interface; or, the first tool control is displayed around the programming interface in a mounted manner, without limitation.

[0108] Optionally, the display conditions of the first tool control can be implemented as at least one of the following:

[0109] • Once the first program content has finished running, the first tool control is displayed. That is, once the first program content has finished running, the first tool control is provided to the user to query the running log.

[0110] • If at least one piece of running information is generated during the execution of the first program content, the first tool control is displayed. That is, when running information is generated during the execution of the first program content, the first tool control is provided to the user to query the running log.

[0111] • If a runtime error occurs in the first program content, the first tool control is displayed. That is, when a runtime error occurs in the first program content, the first tool control is provided to the user to query the runtime log.

[0112] • When the runtime environment of the first program content is a test environment, the first tool control is displayed. That is, when the runtime environment variable in the first program content is set to "test", the first tool control is provided to the user to query the runtime log during the execution of the first program content.

[0113] Step 242: In response to receiving a control trigger operation for the first tool control, display the running log corresponding to the running result.

[0114] Optionally, the control triggering operation for the first tool control described above can be implemented as at least one of the following: click operation, double-click operation, long-press operation, heavy-tap operation, swipe operation, etc., for the first tool control, without limitation.

[0115] In some embodiments, in response to receiving a control trigger operation for the first tool control, a log display interface is displayed, in which the running log corresponding to the running result is displayed.

[0116] In some embodiments, programming blocks correspond to triggers, which are logical units composed of multiple blocks used to trigger an operation or event in the program when a specific condition is met. A trigger begins with a programming block of an event type and consists of at least one consecutive block of at least one other type. A trigger group includes at least one trigger, wherein there is a close business relationship between the at least one trigger contained in the trigger group. A business relationship refers to the logical association between different triggers within the program content.

[0117] Schematic illustration: The first program content includes at least one trigger group, and each trigger group includes at least one programming block. The log display interface shows trigger group candidates corresponding to each of the at least one trigger group. In response to receiving a selection operation from the at least one trigger group candidate to choose a first trigger group candidate, the program displays the running log of the running result corresponding to the first trigger group. The first trigger group corresponds to the first trigger group candidate. That is, the user can customize and query the running information of a specified trigger group.

[0118] like Figure 5 As shown, it illustrates a schematic diagram of the operation log provided by an exemplary embodiment of this application. The log display interface 500 displays a trigger filtering area 510, which displays trigger group candidates 511 corresponding to the trigger group. The trigger group candidates 511 also correspond to trigger candidates 512. The corresponding operation log is displayed in the log display area 520 according to the selection status of the trigger group candidates 511 and the trigger candidates 512.

[0119] In some embodiments, the runtime log includes at least one log entry indicating the triggering record of at least one operation event. After displaying the runtime log, the user can also jump to the location of the programming block corresponding to the operation event in the first program content using a provided jump control corresponding to the log entry. Illustratively, a jump control corresponding to a log entry is shown. The jump control is used to jump to the location of the programming block that triggers at least one operation event in the first program content. In response to receiving a control trigger operation on the jump control, the first program content is displayed, and the user jumps to the first location of the programming block corresponding to at least one operation event.

[0120] In other words, by providing jump controls corresponding to log entries in the runtime log, the log entries are linked to programming blocks in the first program content, making it easier for users to debug the program content based on the runtime log, thus improving the efficiency of program testing and debugging in visual programming.

[0121] In some embodiments, a function to export runtime logs is provided to the user. Illustratively, a log export operation is received for the runtime logs, and in response to the log export operation, a runtime log file is generated, which is a file storing the runtime logs in a specified format. Optionally, the specified format includes .doc, .docx, .txt, .rtf, .xml, .json, etc., and is not limited thereto.

[0122] In some embodiments, the log export operation described above is implemented through a second tool control. The second tool control is illustrated; in response to a control trigger operation received for the second tool control, the runtime log is exported and a corresponding runtime log file is generated.

[0123] During the execution of the first program content, when the user performs different interactive operations to test, different execution logs are generated. In some embodiments, the first program content corresponds to historical execution results; that is, the user runs the first program content within a historical time period and generates historical execution results, which correspond to historical execution logs. Based on the historical execution logs and the execution logs corresponding to the current execution results, a first comparison function is provided to the user. Illustratively, a first comparison operation is received between the execution logs and historical execution logs. In response to the first comparison operation, a first comparison result between the execution logs and historical execution logs is displayed. This first comparison result is used to indicate the differences between the execution logs and historical execution logs.

[0124] In some embodiments, the first comparison operation between the running log and the historical running log is implemented through a third tool control. Illustratively, the third tool control is shown, and in response to receiving a control trigger operation on the third tool control, the first comparison result between the running log and the historical running log is displayed.

[0125] In some embodiments, in the first comparison result, when the running information corresponding to the running log is different from the historical running information corresponding to the historical running log, the running information corresponding to the running log and the historical running information corresponding to the historical running log are compared and displayed using the first display style.

[0126] Optionally, the first display style includes at least one of the following: highlight display style, underline display style, bold display style, specified color display style, and outline display style, without limitation.

[0127] In some embodiments, the first program content corresponds to a third program content. The first program content and the third program content are program content of the same visual programming project under different versions. The first program content corresponds to the first version, and the third program content corresponds to the second version. Based on the running logs corresponding to the first version and the running logs corresponding to the second version, a second comparison function is provided to the user. Illustratively, a second comparison operation is received between the running logs corresponding to the first version and the running logs corresponding to the second version. In response to the second comparison operation, a second comparison result is displayed between the running logs corresponding to the first version and the running logs corresponding to the second version. This second comparison result is used to indicate the differences between the running logs corresponding to the first version and the running logs corresponding to the second version.

[0128] In some embodiments, the second comparison operation between the runtime logs corresponding to the first version and the runtime logs corresponding to the second version is implemented through a fourth tool control. Illustratively, the fourth tool control is displayed, and in response to receiving a control trigger operation on the fourth tool control, the second comparison result between the runtime logs corresponding to the first version and the runtime logs corresponding to the second version is displayed.

[0129] In summary, during the implementation of visual programming, the automatic log code automatically collects the running information of the programming blocks while running the first program content, and displays the running logs of the corresponding running results to the user. This allows users to obtain the debugging logs without manually adding programming blocks for collecting running information when debugging the first visual program content, thus achieving automated generation of running logs during program debugging and improving the efficiency of human-computer interaction during the debugging process. At the same time, after debugging, users no longer need to delete some programming blocks, reducing the need for manual operation.

[0130] In this embodiment of the application, the user can seamlessly collect running information without manually changing the code of the first program content, and quickly obtain running logs through the tool controls provided by the user interface (UI). This allows the user to quickly retrieve running logs when needed, improving both the human-computer interaction efficiency of running log generation and the efficiency of running log retrieval.

[0131] In some optional embodiments, automated runtime log generation is achieved by inserting preset log code into the first program content. Please refer to... Figure 6 This document illustrates a flowchart of a visual programming method provided in an exemplary embodiment of this application. The method may include at least one of several steps (610-620), wherein steps (610-620) are performed in... Figure 2Before step 240 (e.g.) Figure 6 (as shown), or, executed in Figure 4 Before step 241 (not shown in the figure).

[0132] Step 610: Insert log code into the first program content to obtain the second program content.

[0133] In this embodiment of the application, the log code used to extract runtime information is pre-designed code, that is, the log code is readily available code that can be directly obtained.

[0134] Optionally, in response to receiving the code execution operation, log code is inserted into the first program content to obtain the second program content; or, in response to receiving the content generation operation for the first program content, log code is inserted into the first program content to obtain the second program content, wherein the content generation operation is used to instruct at least one programming block selected by the first account to be programmed into the first program content.

[0135] In some embodiments, programming blocks need to be translated into corresponding functional code so that the compiler can understand and translate them into machine code, thereby enabling the computer hardware to directly understand and execute them. In related technologies, such as... Figure 7 As shown, the programming block 710 used by the user during the programming process will be directly translated into function code 720. Therefore, if the user needs to obtain the running information of the programming block 710, they need to manually add the programming block 710 that implements the extraction of running information, so that the translated function code 720 contains the code that can extract running information.

[0136] In this embodiment, a code execution log module is provided at the underlying level. This allows the log code and functional code to be automatically combined when the programming blocks are translated into functional code to obtain the second program content. Illustratively, at least one template code associated with a programming block is obtained as log code. The template code is a predefined code framework used to collect execution information. The programming blocks in the first program content are translated into functional code, and the functional code and template code are combined to obtain the second program content.

[0137] like Figure 8 As shown, it illustrates a schematic diagram of the translation process of a programming block provided in an exemplary embodiment of this application. A first program content 810 including a programming block 811 is obtained by the user. When the first program content 810 is instructed to be run, the programming block 811 is translated into function code 821, and the template code obtained as log code 822 is combined with the function code 821 to obtain a second program content 820.

[0138] Step 620: Obtain the running result corresponding to at least one programming block and the running log corresponding to the running result by running the second program content.

[0139] In some embodiments, by executing the functional code in the second program content, the running result corresponding to at least one programming block is obtained; by executing the template code in the second program content, the running log corresponding to the running result is obtained.

[0140] In some embodiments, the execution process of the template code is implemented as follows: executing the template code to generate template content corresponding to the template code, wherein the template content includes at least one candidate parameter; obtaining the parameter value corresponding to at least one candidate parameter based on the running result; assigning the above parameter value to the candidate parameter in the template content to obtain a log item; and generating a running log based on the log item.

[0141] Optionally, when generating log entries corresponding to programming blocks, parameter values ​​obtained from the execution results are passed to candidate parameters in the template content through a preset Application Programming Interface (API) to assign values ​​to the candidate parameters. In one example, the aforementioned preset API can be implemented as the Blocky API.

[0142] like Figure 9 As shown, it illustrates the process of generating log entries corresponding to programming blocks provided in an exemplary embodiment of this application. After the candidate parameters 911 in the template content 910 are passed to specific parameter values ​​931 through the preset API 920, the corresponding log entries 930 are obtained.

[0143] In some embodiments, a programming block can correspond to multiple instances. Therefore, the programming block can also be executed under different triggers. It is evident that when generating log entries, the trigger identifier and the programming block identifier are needed to distinguish which programming block under which trigger produced the log entry. Illustratively, the log entry generation method can also be implemented as follows: Execute template code to generate template content corresponding to the template code, wherein the template content includes at least one candidate parameter; obtain the first identifier corresponding to the programming block and the second identifier corresponding to the trigger group to which the programming block is attached; obtain the event parameter value generated by the programming block after triggering the operation event, wherein the event parameter value is used to describe the event state of the operation event; assign values ​​to the candidate parameters in the template content using the first identifier, the second identifier, and the event parameter value to obtain the log entry.

[0144] like Figure 10As shown, it illustrates a schematic diagram of the log item generation process provided by an exemplary embodiment of this application. When generating a log item 1040 through template content 1010, the corresponding trigger 1020 is determined according to the trigger identifier, and the programming block 1030 mounted on the trigger 1020 is determined according to the programming block identifier. Then, the corresponding log item 1040 is generated according to the parameter values ​​obtained by the programming block 1030 during the translation process.

[0145] In some embodiments, different template codes are required for extracting runtime information for programming blocks that implement different operation events. Illustratively, at least two candidate template codes and a first event type corresponding to each candidate template code are obtained, wherein the first event type indicates the event type described by the template content corresponding to the candidate template code; a second event type corresponding to the programming block is obtained, wherein the second event type indicates the event type of the operation event that the programming block can trigger; based on the matching degree between the first event type and the second event type, at least one template code associated with the programming block is selected from the at least two candidate template codes.

[0146] In some embodiments, during the execution of the second program content, log entries generated based on log codes are stored in a log storage system. After the second program content has finished running, the execution log is displayed according to the user's needs. Figure 11 As shown, it illustrates a schematic diagram of a log generation process provided by an exemplary embodiment of this application. Log entries 1120 are generated by log code 1111 in the second program content 1110. Log entries 1120 are stored in the log storage system 1130. After the second program content 1110 has finished running, the running log is displayed to the user through the log viewing system 1140.

[0147] For example, such as Figure 12 As shown, a flowchart of the operation log generation provided by an exemplary embodiment of this application is illustrated. The process includes: 1201, the user writes programming blocks; 1202, generating function code corresponding to the programming blocks; 1203, inserting log code; 1204, running the combination of function code and log code; 1205, collecting operation information through log code during operation to obtain log items; 1206, storing log items.

[0148] In summary, during the implementation of visual programming, the automatic log code automatically collects the running information of the programming blocks while running the first program content, and displays the running logs of the corresponding running results to the user. This allows users to obtain the debugging logs without manually adding programming blocks for collecting running information when debugging the first visual program content, thus achieving automated generation of running logs during program debugging and improving the efficiency of human-computer interaction during the debugging process. At the same time, after debugging, users no longer need to delete some programming blocks, reducing the need for manual operation.

[0149] In this embodiment of the application, by adding automated log code, the cost of debugging program content for users can be greatly reduced. Even when there is a very large number of programming blocks or the program has parallel logic, the running information of each programming block can be collected, which improves the efficiency of program debugging in visual programming.

[0150] In some optional embodiments, the visual programming method provided in this application can be applied to programming enlightenment scenarios. For example, a company launches a visual programming application for programming beginners, which users can use online or download. Taking user A downloading and using the visual programming application via a terminal as an example, after downloading and opening the application, a programming interface is displayed. User A constructs the first program content using programming blocks within the interface, or directly imports the first program content into the interface. User A runs the first program content through code execution, and the running results and logs of the first program content are displayed to user A. The running logs are automatically collected by the visual programming application through log code generated during the running of the first program content. For example, a visual programming application provides a beginner user (A) with basic programming function blocks (e.g., input function "input", print function "print", if-else conditional function, for loop function, etc.) to enable user A to learn basic programming functions. The runtime log automatically generated by the visual programming application includes the output information, timestamp information, log level information, log source information, context information, performance information, debugging information, and dependency information of the aforementioned basic programming functions. For instance, when the basic programming function in the first program is a for loop function, the corresponding runtime log includes the assignment results of variables in each loop and the final output result of the function. It is evident that this method can lower the barrier to entry for beginners in visual programming, reduce the number of interactive operations required for beginners when debugging program content, and improve the human-computer interaction efficiency during the debugging process.

[0151] In some optional embodiments, the visual programming method provided in this application can be applied to game development scenarios. For example, in game development, complex program content needs to be constructed. Using visual programming can simplify the development process and reduce programming errors. After the developer runs the visual programming application, a programming interface is displayed. The developer constructs the first program content using programming blocks within the interface, or directly imports the first program content into the interface. The developer runs the first program content through code execution operations. The running results and running logs of the first program content are displayed to the developer. These running logs are collected by the visual programming application through automatically generated log code when running the first program content. For example, a visual programming application provides developers with modular game function blocks (e.g., functions for implementing character jump operations, functions for implementing character skill usage, functions for implementing character displacement operations, etc.) to enable developers to efficiently complete the game development process using these blocks. The runtime log automatically generated by the visual programming application includes the output information, timestamp information, log level information, log source information, context information, performance information, debugging information, dependency information, etc. of the aforementioned modular game function blocks. For instance, when the modular game function blocks in the first program content include a function for implementing character jump operations, the generated runtime log includes the input timestamp of the jump operation, the operation intensity signal of the jump operation, the height value and coordinate information reached by the character when performing the jump operation, and the landing coordinates of the character after performing the jump operation.

[0152] It is worth noting that the visual programming method provided in this application embodiment can also be applied to UGC content production scenarios, digital art creation scenarios, education and training scenarios, personal development scenarios, etc. provided in game applications, without specific limitations.

[0153] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0154] Please refer to Figure 13 The diagram illustrates a block diagram of a visual programming apparatus provided in one embodiment of this application.

[0155] Display module 1310 is used to display first program content, the first program content including at least one programming block, the programming block being a visual unit used to represent programming logic in visual programming;

[0156] The receiving module 1320 is used to receive code execution operations targeting the content of the first program;

[0157] The display module 1310 is also used to display the running result corresponding to the at least one programming block in response to the code running operation;

[0158] The display module 1310 is also used to display the running log corresponding to the running result. The running log includes running information generated by the at least one programming block during the running process. The running information is information collected by the log code automatically generated in the first program content.

[0159] In some optional embodiments, the display module 1310 is further configured to display a first tool control, which provides the query function for the running log;

[0160] The display module 1310 is further configured to display a running log corresponding to the running result in response to receiving a control trigger operation for the first tool control.

[0161] In some optional embodiments, the display module 1310 is further configured to display the first tool control when the first program content has finished running; or, when at least one piece of running information is generated during the running of the first program content; or, when a running error occurs in the first program content; or, when the running environment of the first program content is a test environment.

[0162] In some alternative embodiments, such as Figure 14 As shown, the device further includes:

[0163] The code processing module 1330 is used to insert the log code into the first program content to obtain the second program content;

[0164] The code execution module 1340 is used to obtain the execution result corresponding to the at least one programming block and the execution log corresponding to the execution result by running the second program content.

[0165] In some optional embodiments, the code processing module 1330 is further configured to, in response to receiving the code execution operation, insert the log code into the first program content to obtain the second program content; or, in response to receiving a content generation operation for the first program content, insert the log code into the first program content to obtain the second program content, wherein the content generation operation is used to instruct the programming of the at least one programming block selected by the first account into the first program content.

[0166] In some optional embodiments, the code processing module 1330 further includes:

[0167] The acquisition unit 1331 is used to acquire at least one template code associated with the programming block as the log code, wherein the template code is a predefined code framework for collecting the running information;

[0168] Translation unit 1332 is used to translate the programming blocks in the first program content into functional codes;

[0169] Unit 1333 is used to combine the function code and the template code to obtain the second program content.

[0170] In some optional embodiments, the code execution module 1340 is further configured to obtain the execution result corresponding to the at least one programming block by executing the functional code in the second program content;

[0171] The code execution module 1340 is further configured to obtain the execution log corresponding to the execution result by executing the log code in the second program content.

[0172] In some optional embodiments, the log code is implemented as template code, which is a predefined code framework for collecting the runtime information;

[0173] The code execution module 1340 also includes:

[0174] Execution unit 1341 is used to execute the template code and generate template content corresponding to the template code, wherein the template content includes at least one candidate parameter;

[0175] The acquisition unit 1342 is used to acquire the parameter value corresponding to the at least one candidate parameter based on the running result;

[0176] The assignment unit 1343 is used to assign the parameter value to the candidate parameter in the template content to obtain a log item;

[0177] The generation unit 1344 is used to generate the running log based on the log item.

[0178] In some optional embodiments, the acquisition unit 1342 is further configured to acquire a first identifier corresponding to the programming block and a second identifier corresponding to the trigger group attached to the programming block;

[0179] The acquisition unit 1342 is further configured to acquire the event parameter value generated by the programming block after the operation event is triggered, and the event parameter value is used to describe the event state of the operation event;

[0180] The assignment unit 1343 is further configured to assign values ​​to the candidate parameters in the template content using the first identifier, the second identifier, and the event parameter value, thereby obtaining the log item.

[0181] In some optional embodiments, the acquisition unit 1331 is further configured to acquire at least two candidate template codes and a first event type corresponding to each of the at least two candidate template codes, wherein the first event type is used to indicate the event type described by the template content corresponding to the candidate template code;

[0182] The acquisition unit 1331 is further configured to acquire a second event type corresponding to the programming block, wherein the second event type is used to indicate the event type of the operation event that the programming block can trigger;

[0183] The acquisition unit 1331 is further configured to filter from the at least two candidate template codes to obtain at least one template code associated with the programming block based on the matching degree between the first event type and the second event type.

[0184] In some optional embodiments, the first program content includes at least one trigger group, the trigger group including the at least one programming block;

[0185] The display module 1310 is also used to display trigger group candidates corresponding to the at least one trigger group respectively;

[0186] The display module 1310 is further configured to, in response to receiving a selection operation that selects a first trigger group candidate from at least one trigger group candidate, display a running log of the running result corresponding to the first trigger group, wherein the first trigger group corresponds to the first trigger group candidate.

[0187] In some optional embodiments, the operation log includes at least one log entry indicating the triggering of at least one operational event;

[0188] The display module 1310 is also used to display a jump control corresponding to the log item, the jump control being used to jump to the position of the programming block used to trigger the at least one operation event in the first program content;

[0189] The display module 1310 is further configured to, in response to receiving a control trigger operation for the jump control, display the first program content and jump to the first position where the programming block corresponding to the at least one operation event is located.

[0190] In some optional embodiments, the display module 1310 is further configured to display a second tool control, which is used to implement the export function of the running log;

[0191] The device further includes:

[0192] The export module 1350 is also configured to, in response to receiving a control trigger operation for the second tool control, export the running log and generate a corresponding running log file.

[0193] In some optional embodiments, the display module 1310 is further configured to display a third tool control, which is configured to implement the function of comparing the running log with the historical running log, and the historical running log is configured to indicate the running information generated during the running process of the first program content in a historical period.

[0194] The display module 1310 is further configured to, in response to receiving a control trigger operation for the third tool control, display a first comparison result between the running log and the historical running log, the first comparison result being used to indicate the difference between the running log and the historical running log.

[0195] In some optional embodiments, the first comparison result includes at least one of the following:

[0196] The first comparison information is between the running information corresponding to the same interactive operation of different interactive elements, wherein the interactive element is the element in the interactive interface generated after running the first program content that is used to implement the interactive operation.

[0197] The second comparison information between the runtime information corresponding to different interactive operations of the same interactive element;

[0198] Third comparison information between runtime information corresponding to different operation sequences within the same interactive operation group;

[0199] The fourth comparison information between sets of input interactive operations during operation;

[0200] The fifth comparison information is between the running log and the historical running log, and at least one of the following: output information, timestamp information, log level information, log source information, context information, performance information, debugging information, and dependency information.

[0201] In some optional embodiments, the first program content corresponds to a third program content, and the first program content and the third program content are program content of the same visual programming project under different versions, the first program content corresponds to the first version, and the third program content corresponds to the second version;

[0202] The display module 1310 is also used to display a fourth tool control, which is used to provide a comparison function of the running logs of program content between at least two versions;

[0203] The display module 1310 is further configured to, in response to receiving a control trigger operation for the fourth tool control, display a second comparison result between the running log corresponding to the first version and the running log corresponding to the second version, the second comparison result being used to indicate the difference between the running log corresponding to the first version and the running log corresponding to the second version.

[0204] In summary, during the implementation of visual programming, the automatic log code automatically collects the running information of the programming blocks while running the first program content, and displays the running logs of the corresponding running results to the user. This allows users to obtain the debugging logs without manually adding programming blocks for collecting running information when debugging the first visual program content, thus achieving automated generation of running logs during program debugging and improving the efficiency of human-computer interaction during the debugging process. At the same time, after debugging, users no longer need to delete some programming blocks, reducing the need for manual operation.

[0205] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0206] Please refer to Figure 15 This diagram illustrates a structural block diagram of a computer device 1500 provided in one embodiment of this application. The computer device 1500 may be... Figure 1 The terminal in the computer system shown is used to implement the visual programming method provided in the above embodiments. Specifically:

[0207] Typically, computer device 1500 includes a processor 1501 and a memory 1502.

[0208] Processor 1501 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1501 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0209] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1502 are used to store a computer program configured to be executed by one or more processors to implement the above-described visual programming method.

[0210] In some embodiments, the computer device 1500 may also optionally include other components 1503: a peripheral device interface and at least one peripheral device. The processor 1501, memory 1502, and peripheral device interface can be connected via a bus or signal lines. Each peripheral device can be connected to the peripheral device interface via a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of: radio frequency circuitry, a display screen, audio circuitry, and a power supply.

[0211] Those skilled in the art will understand that Figure 15 The structure shown does not constitute a limitation on the computer device 1500, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0212] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein a computer program is stored in the storage medium, and the computer program, when executed by a processor, implements the above-described visual programming method. Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0213] In an exemplary embodiment, a computer program product is also provided, the computer program product including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the computer device to perform the above-described visual programming method.

[0214] It should be noted that the data collection and processing in this application should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0215] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0216] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A visual programming method, characterized in that, The method includes: Display the first program content, which includes at least one programming block, the programming block being a visual unit used to represent programming logic in visual programming; Receive code execution operations targeting the content of the first program; In response to the code execution operation, the execution result corresponding to the at least one programming block is displayed; Display the running log corresponding to the running result. The running log includes running information generated during the running of the at least one programming block. The running information is information collected by the log code automatically generated in the first program content.

2. The method according to claim 1, characterized in that, The display of the running log corresponding to the running results includes: Display a first tool control, which provides the function of querying the running log; In response to receiving a control trigger operation for the first tool control, a running log corresponding to the running result is displayed.

3. The method according to claim 2, characterized in that, The first tool control for display includes: The first tool control is displayed when the first program content has finished running; or, If at least one piece of runtime information is generated during the execution of the first program content, the first tool control is displayed; or, If a runtime error occurs in the first program, the first tool control is displayed; or, When the first program content is running in a test environment, the first tool control is displayed.

4. The method according to any one of claims 1 to 3, characterized in that, Before displaying the running log corresponding to the running result, the following is also included: Insert the log code into the first program content to obtain the second program content; The execution results corresponding to the at least one programming block and the execution log corresponding to the execution results are obtained by running the second program content.

5. The method according to claim 4, characterized in that, The step of inserting the log code into the first program content to obtain the second program content includes: In response to receiving the code execution operation, the log code is inserted into the first program content to obtain the second program content; or... In response to receiving a content generation operation for the first program content, the log code is inserted into the first program content to obtain second program content, wherein the content generation operation is used to instruct the programming of at least one programming block selected by the first account into the first program content.

6. The method according to claim 4, characterized in that, The step of inserting the log code into the first program content to obtain the second program content includes: Obtain at least one template code associated with the programming block as the log code, wherein the template code is a predefined code framework for collecting the runtime information; Translate the programming blocks in the first program content into functional codes; The second program content is obtained by combining the functional code and the template code.

7. The method according to claim 6, characterized in that, The step of obtaining at least one template code associated with the programming block as the log code includes: Obtain at least two candidate template codes and a first event type corresponding to each of the at least two candidate template codes, wherein the first event type is used to indicate the event type described by the template content corresponding to the candidate template code; Obtain the second event type corresponding to the programming block, whereby the second event type indicates the type of operation event that the programming block can trigger; Based on the matching degree between the first event type and the second event type, the template code associated with at least one programming block is selected from the at least two candidate template codes.

8. The method according to claim 4, characterized in that, The step of obtaining the running result corresponding to the at least one programming block by running the second program content, and the running log corresponding to the running result, includes: By executing the functional code in the second program content, the running result corresponding to the at least one programming block is obtained; By executing the log code in the second program content, the running log corresponding to the running result is obtained.

9. The method according to claim 8, characterized in that, The log code is implemented as template code, which is a predefined code framework for collecting the runtime information. The step of obtaining the running log corresponding to the running result by executing the log code in the second program content includes: Execute the template code to generate template content corresponding to the template code, the template content including at least one candidate parameter; Based on the running results, obtain the parameter values ​​corresponding to the at least one candidate parameter; The candidate parameters in the template content are assigned values ​​using the parameter values ​​to obtain log items; The runtime log is generated based on the log entries.

10. The method according to claim 9, characterized in that, The step of obtaining the parameter value corresponding to the at least one candidate parameter based on the running result includes: Obtain the first identifier corresponding to the programming block, and the second identifier corresponding to the trigger group attached to the programming block; Obtain the event parameter value generated by the programming block after the operation event is triggered, and the event parameter value is used to describe the event state of the operation event; The step of assigning values ​​to the candidate parameters in the template content using the parameter values ​​to obtain log items includes: The candidate parameters in the template content are assigned values ​​using the first identifier, the second identifier, and the event parameter value to obtain the log item.

11. The method according to any one of claims 1 to 3, characterized in that, The first program content includes at least one trigger group, and the trigger group includes the at least one programming block; The display of the running log corresponding to the running results includes: Display the trigger group candidates corresponding to each of the at least one trigger group; In response to receiving a selection operation to select a first trigger group candidate from at least one trigger group candidate, the runtime log of the runtime result corresponding to the first trigger group is displayed, wherein the first trigger group corresponds to the first trigger group candidate.

12. The method according to any one of claims 1 to 3, characterized in that, The operation log includes at least one log entry, which is used to indicate the triggering record of at least one operation event; The method further includes: Display a jump control corresponding to the log item, the jump control being used to jump to the location of the programming block used to trigger the at least one operation event in the first program content; In response to receiving a control trigger operation for the jump control, the first program content is displayed, and the program jumps to the first position where the programming block corresponding to the at least one operation event is located.

13. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Display a second tool control, which is used to implement the export function of the running log; In response to receiving a control trigger operation for the second tool control, the running log is exported and a corresponding running log file is generated.

14. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The third tool control is displayed, which is used to implement the function of comparing the running log with the historical running log. The historical running log is used to indicate the running information generated during the running process of the first program content in a historical period. In response to receiving a control trigger operation for the third tool control, a first comparison result between the running log and the historical running log is displayed, the first comparison result being used to indicate the difference between the running log and the historical running log.

15. The method according to claim 14, characterized in that, The first comparison result includes at least one of the following: The first comparison information is between the running information corresponding to the same interactive operation of different interactive elements, wherein the interactive element is the element in the interactive interface generated after running the first program content that is used to implement the interactive operation. The second comparison information between the runtime information corresponding to different interactive operations of the same interactive element; Third comparison information between runtime information corresponding to different operation sequences within the same interactive operation group; The fourth comparison information between sets of input interactive operations during operation; The fifth comparison information is between the running log and the historical running log, and at least one of the following: output information, timestamp information, log level information, log source information, context information, performance information, debugging information, and dependency information.

16. The method according to any one of claims 1 to 3, characterized in that, The first program content corresponds to the third program content. The first program content and the third program content are program contents of the same visual programming project under different versions. The first program content corresponds to the first version, and the third program content corresponds to the second version. The method further includes: Display a fourth tool control, which provides a function to compare the running logs of program content between at least two versions; In response to receiving a control trigger operation for the fourth tool control, a second comparison result is displayed between the running logs corresponding to the first version and the running logs corresponding to the second version. The second comparison result is used to indicate the differences between the running logs corresponding to the first version and the running logs corresponding to the second version.

17. A visual programming device, characterized in that, The device includes: A display module is used to display first program content, which includes at least one programming block. The programming block is a visual unit used to represent programming logic in visual programming. The receiving module is used to receive code execution operations targeting the content of the first program; The display module is also used to display the running result corresponding to the at least one programming block in response to the code running operation; The display module is also used to display the running log corresponding to the running result. The running log includes running information generated by the at least one programming block during the running process. The running information is information collected by the log code automatically generated in the first program content.

18. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory storing a computer program, which is loaded and executed by the processor to implement the visual programming method as described in any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the visual programming method as described in any one of claims 1 to 16.

20. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, and a processor reads from and executes the computer program to implement the visual programming method as described in any one of claims 1 to 16.