Graphical programming method, device, equipment and storage medium

By organizing multiple objects into the same fleet in the graphical programming tool and controlling them using unified code, the problem of the object control logic in the existing technology is solved, and the programming efficiency and debugging efficiency are improved .

CN118132059BActive Publication Date: 2024-12-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410341037.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2024-12-17
Estimated Expiration
2044-03-22

AI Technical Summary

Technical Problem

In the prior art, when it is necessary to implement the same control logic for multiple objects, it is still necessary to program each object separately, resulting in low programming efficiency, and frequent switching of different objects when viewing and modifying codes, reducing debugging. efficiency.

Method used

In the code editing interface of the graphical programming tool, users are allowed to join multiple objects to the same fleet, and use a set of graphical code to uniformly control the objects in the fleet, avoid repeated programming and improve programming efficiency.

Benefits of technology

It realizes unified control over multiple objects, reduces the complexity of code writing and debugging, and improves programming efficiency and debugging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118132059B_ABST
    Figure CN118132059B_ABST
Patent Text Reader

Abstract

The present application discloses a graphical programming method, device, equipment and storage medium, and relates to the field of computer technology. The method includes: displaying a code editing interface of a graphical programming tool, the code editing interface includes a plurality of preset graphical codes; in response to an editing operation on a first graphical code among the plurality of preset graphical codes, displaying the edited first graphical code, the edited first graphical code is used to add at least one object to a first formation; in response to an editing operation on a second graphical code among the plurality of preset graphical codes, displaying the edited second graphical code; running the graphical programming result to control at least one object in the first formation, the graphical programming result includes the edited first graphical code and the edited second graphical code. The above method improves programming efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a graphical programming method, apparatus, device and storage medium. Background Art

[0002] With the development of computer technology, the technology of using graphical building blocks for graphical programming has become increasingly mature. Graphical building blocks can also be understood as graphical codes, which encapsulate programming languages. Users can implement graphical programming by dragging graphical building blocks.

[0003] In the related art, when multiple objects need to be controlled separately, graphical programming is generally performed for each object separately. Even if the actions to be performed by multiple objects are the same, that is, when multiple objects are controlled to implement the same control logic (such as all need to move 5 meters to the left), each object needs to be programmed separately.

[0004] Therefore, in the above-mentioned related technologies, when controlling multiple objects to implement the same control logic, it is still necessary to program the multiple objects separately, that is, repeated programming occurs, resulting in low programming efficiency. Summary of the invention

[0005] The embodiments of the present application provide a graphical programming method, apparatus, device and storage medium, which can improve the efficiency of graphical programming. The technical solutions proposed in this application are as follows:

[0006] According to one aspect of an embodiment of the present application, a graphical programming method is provided, the method comprising:

[0007] Displaying a code editing interface of a graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects;

[0008] In response to an editing operation on a first graphical code among the plurality of preset graphical codes, displaying the edited first graphical code, wherein the first graphical code is used to add at least one object to the same formation, and the edited first graphical code is used to add at least one object to the first formation;

[0009] In response to an editing operation on a second graphical code among the plurality of preset graphical codes, displaying the edited second graphical code, wherein the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation;

[0010] The graphical programming result is run to control at least one object in the first formation, wherein the graphical programming result includes the edited first graphical code and the edited second graphical code.

[0011] According to one aspect of an embodiment of the present application, a graphical programming device is provided, the device comprising:

[0012] An interface display module, used to display a code editing interface of a graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects;

[0013] a graphical code display module, configured to display an edited first graphical code in response to an edit operation on a first graphical code among the plurality of preset graphical codes, wherein the first graphical code is used to add at least one object to the same formation, and the edited first graphical code is used to add at least one object to the first formation;

[0014] The graphical code display module is further configured to, in response to an editing operation on a second graphical code among the plurality of preset graphical codes, display an edited second graphical code, wherein the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation;

[0015] The running module is used to run the graphical programming result to control at least one object in the first formation, and the graphical programming result includes the edited first graphical code and the edited second graphical code.

[0016] According to one aspect of an embodiment of the present application, a computer device is provided, the computer device comprising 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-mentioned graphical programming method.

[0017] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned graphical programming method.

[0018] According to one aspect of an embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is loaded and executed by a processor to implement the above-mentioned graphical programming method.

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

[0020] By editing the first graphical code in the code editing interface of the graphical programming tool, at least one object can be added to the first formation. By editing the second graphical code, the edited second graphical code is used to uniformly control at least one object in the first formation. Running the graphical programming result including the edited first graphical code and the edited second graphical code can achieve unified control of at least one object added to the first formation. The technical solution provided by the embodiment of the present application uses the first graphical code to compile objects that need to execute the same code logic into the first formation, so that at least one object added to the first formation shares the same edited second graphical code, without the need for repeated programming, thereby improving programming efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

[0022] Figure 2 It is an interface diagram of a graphical programming method provided by the relevant technology;

[0023] Figure 3 It is an interface diagram of a graphical programming method provided by the relevant technology;

[0024] Figure 4 It is an interface diagram of a graphical programming method provided by the relevant technology;

[0025] Figure 5 It is an interface diagram of a graphical programming method provided by the relevant technology;

[0026] Figure 6 It is an interface diagram of a graphical programming method provided by the relevant technology;

[0027] Figure 7 It is an interface diagram of a graphical programming method provided by the relevant technology;

[0028] Figure 8 This is an interface diagram of a graphical programming method provided by an embodiment of the present application;

[0029] Fig. 9 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

[0030] Fig.10 is a schematic diagram of a virtual scene interface provided by an embodiment of the present application;

[0031] Fig.11 is a schematic diagram of a code editing interface provided by an embodiment of the present application;

[0032] Fig.12is a flowchart of a graphical programming method provided by an embodiment of the present application;

[0033] Fig.13 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

[0034] Fig.14 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

[0035] Fig.15 is a flowchart of a graphical programming method provided by another embodiment of the present application;

[0036] Fig.16 is a schematic diagram of an object selection method provided by an embodiment of the present application;

[0037] Fig.17 is a schematic diagram of an object selection method provided by another embodiment of the present application;

[0038] Fig.18 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

[0039] Fig.19 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

[0040] Fig. 20 is a block diagram of an object status updating method provided by an embodiment of the present application;

[0041] Fig.21 is a block diagram of an object status updating method provided by another embodiment of the present application;

[0042] Fig. 22 is a block diagram of an object status updating method provided by another embodiment of the present application;

[0043] Fig.23 It is a schematic diagram of code operation provided by an embodiment of the present application;

[0044] Fig.24 is a schematic diagram of interface switching provided by an embodiment of the present application;

[0045] Fig.25 is a flowchart of a graphical programming method provided by another embodiment of the present application;

[0046] Fig.26 is a schematic diagram of a function panel interface provided by an embodiment of the present application;

[0047] Fig. 27 is a schematic diagram of a function panel interface provided by another embodiment of the present application;

[0048] Fig.28 is a flowchart of a method for executing a graphical code provided by an embodiment of the present application;

[0049] Fig.29 is a flowchart of a method for executing a graphical code provided by another embodiment of the present application;

[0050] Fig.30 is a flowchart of a method for executing a graphical code provided by another embodiment of the present application;

[0051] Fig.31 It is a schematic diagram of a compilation process provided by an embodiment of the present application;

[0052] Fig.32 is a schematic diagram of a component structure provided by an embodiment of the present application;

[0053] Fig.33 It is a code schematic diagram provided by an embodiment of the present application;

[0054] Fig.34 is a block diagram of a graphical programming device provided by one embodiment of the present application;

[0055] Fig.35 is a block diagram of a graphical programming device provided by another embodiment of the present application;

[0056] Fig.36 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0058] Before introducing the technical solution of the present application, some terms involved in the present application are explained. The following related explanations can be combined arbitrarily with the technical solution of the embodiment of the present application as optional solutions, and they all belong to the protection scope of the embodiment of the present application. The embodiment of the present application includes at least part of the following contents.

[0059] Graphical programming: The programming language is encapsulated in graphical building blocks, and programming can be completed by dragging the building blocks to build. It is generally used for programming learning among teenagers or beginners.

[0060] IDE (Integrated Development Environment): used to provide a development environment for applications, generally including tools such as code editors, compilers, debuggers, and graphical user interfaces.

[0061] Virtual scene: A mode in a graphical programming tool that displays a virtual scene in non-running static and running states.

[0062] Code editing: A mode in a graphical programming tool that displays graphical building block codes and allows users to add, delete, write and run codes.

[0063] Please refer to Figure 1 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application. The solution implementation environment may include: a terminal device 10 and a server 20.

[0064] The terminal device 10 includes, but is not limited to, mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances and other electronic devices. The client of the target application can be installed in the terminal device 10. Optionally, the target application can be an application that needs to be downloaded and installed, or it can be a click-to-use application, which is not limited in the embodiments of the present application.

[0065] In an embodiment of the present application, the above-mentioned target application may be an application with programming functions, such as an integrated development environment provided in the target application, in which the user can write code, compile code and run code. Exemplarily, the target application includes a graphical programming tool. Exemplarily, the graphical programming tool provides a plurality of preset graphical codes (i.e., graphical building blocks), and the target application may encapsulate the programming language in the graphical code, so that the graphical code is presented to the user in the form of building blocks or other graphics, and the user can drag these graphical codes to implement programming. Exemplarily, the target application may directly obtain the encapsulated graphical code and directly provide it to the user for use. The present application does not limit the specific functions of the target application. The types of the target application may be test applications, development applications, game applications, virtual reality (VR) applications, augmented reality (AR) applications, etc., and the embodiments of the present application do not limit the specific categories of the target application. In other embodiments, the target application may be considered as a separate functional module, such as being implemented as one of the functional modules in the application to be developed. Exemplarily, a client of the target application program is running in the terminal device 10 .

[0066] The server 20 is used to provide background services for the client of the target application in the terminal device 10. For example, the server 20 can be an independent physical server, or 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 communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to these.

[0067] The terminal device 10 and the server 20 can communicate with each other via a network, which can be a wired network or a wireless network.

[0068] The method provided in the embodiment of the present application, the execution subject of each step may be a computer device. The computer device may be any electronic device with data storage and processing capabilities. For example, the computer device may be Figure 1 The terminal device 10 may also be a server 20.

[0069] The following is a brief description of the virtual drone as an example. With the development of artificial intelligence, programming methods based on graphical programming tools are becoming increasingly mature. The graphical programming tools provided by some applications do not rely on the hardware environment, only require the network, and have a high degree of standardization.

[0070] However, in the related art, when it comes to the need to group multiple objects to achieve an overall consistent operating effect, the code can only be copied and written for different objects separately. The process is cumbersome and repetitive, and it will also increase the number of building block codes, which is not conducive to improving the efficiency of building block code writing.

[0071] In some embodiments, Figure 2 As shown, a user interface 200 provided by a graphical programming tool in the related art includes a building block area, an editing area, a stage area, and a material area. The interface layout is relatively fixed. The user selects building blocks in the building block area according to his needs, splices building blocks in the editing area, and selects materials from the material area. After that, click the run button to preview the effect in the stage area. Of course, if you want to achieve the same running effect for different objects, you need to switch different objects in the actual programming process to add and write codes respectively.

[0072] In some embodiments, Figure 3 As shown, when you want to control the object 300, you need to splice the building blocks in the editing area to obtain the building block code 301 of the control object 300. In some embodiments, Figure 4As shown, when you want to control object 400, you need to splice blocks in the editing area to obtain the block code 401 of the control object 400. Even if you need to control object 300 and object 400 to achieve the same operating effect, in the actual coding process, you need to switch different objects to add and write codes respectively.

[0073] In some embodiments, Figure 5 As shown, another graphical programming tool in the related art provides a user interface 500 including a stage area, a material area, a block preset area, and a block editing area. The interface layout is relatively fixed. Users select blocks in the block preset area according to their needs, assemble blocks in the block editing area, and after selecting materials from the material area, click the run button to preview the effect in the stage area. Of course, if you want to achieve the same running effect for different objects, you also need to switch different objects in the actual programming process to add and write codes respectively.

[0074] In some embodiments, Figure 6 As shown, when you want to control the object 600, you need to splice the building blocks in the editing area to obtain the building block code 601 of the control object 600. In some embodiments, Figure 7 As shown, when you want to control object 700, you need to splice blocks in the editing area to obtain the block code 701 of the control object 700. Even if you need to control object 600 and object 700 to achieve the same operating effect, in the actual coding process, you need to switch different objects to add and write codes respectively.

[0075] In the above-mentioned related technologies, it is impossible to use only one set of building block codes to realize the control of objects in multiple stage areas. If you want to achieve an overall unified operating effect for multiple objects during the code writing process, you need to repeatedly write multiple sets of codes, and the process is cumbersome and complicated. In addition, when viewing and modifying the code for different objects, you need to switch back and forth to different objects, which greatly reduces the efficiency of debugging (viewing and modifying code).

[0076] The technical solution provided in the embodiment of the present application innovatively provides building block codes in the building block preset area that can simultaneously control multiple drones to join a formation. Users can use the building blocks to add multiple drones to a formation according to actual needs, and use a set of codes to complete the flight control of the entire drone formation, thereby improving the efficiency of code writing, thereby realizing group control, interconnected performances, and formation flight of virtual drones.

[0077] This application provides a set of building blocks to simultaneously control the flight states of multiple virtual drones, such as formation control, interconnected performances, and formation flying. Users only need to add a set of building block codes and modify the parameters of the building block codes to formulate the code to a formation composed of multiple virtual drones, thereby simplifying the code writing process and improving writing efficiency. Avoid the tedious operation of switching back and forth between different objects during debugging (viewing and modifying building block codes) to improve debugging efficiency. In the process of adjusting parameters, the interactive form supports the use of box selection to improve the efficiency of selecting and grouping multiple drones.

[0078] Before introducing the specific method of the present application, the application scenario of the graphical programming method applied to the graphical programming tool in the present application is first exemplified. Of course, it should be known that the following application scenario is only an example and is not limited to this.

[0079] In some embodiments, the graphical programming method and code execution method in the embodiments of the present application can be used in the field of UGC (User generated content). Exemplarily, UGC means that users can display or provide their original content to other users. Exemplarily, UGC can be used in the field of games, animation production, self-media, etc. Exemplarily, only UGC in the field of games is taken as an example, and the graphical programming method mentioned in this application and the following code execution method are specifically described. Exemplarily, the target application is an application that allows users to customize the game, such as the target application provides an interface that allows users to customize the game, which is called a game customization interface. In the game customization interface, multiple preset graphical codes are displayed, and the graphical codes are used to process one or more objects. Of course, the objects here include but are not limited to any controllable objects, such as the objects in the virtual scene, such as virtual animals, virtual plants, virtual cars, virtual buildings, etc., which are objects that may appear in the game that the user wants to customize. In some embodiments, in response to an editing operation on a first graphical code among a plurality of preset graphical codes, the edited first graphical code is displayed, the first graphical code is used to add at least one object to the same formation, and the edited first graphical code is used to add at least one object to the first formation. Exemplarily, multiple virtual stars are organized into the same formation to control their moving direction. Exemplarily, multiple virtual plants are organized into the same formation to control their growth direction and growth speed. In some embodiments, in response to an editing operation on a second graphical code among a plurality of preset graphical codes, the edited second graphical code is displayed, the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation. Exemplarily, the user can achieve unified control of each object in the formation by editing the second graphical code. In some embodiments, after the user edits the first graphical code and the second graphical code, the graphical programming result including the edited first graphical code and the edited second graphical code is run to control at least one object in the first formation. For example, when the user clicks "Run", the following code execution method is executed, and the virtual scene constructed by the user can be seen, and the objects in the virtual scene move, such as a team of virtual cars on the street driving in the direction defined by the user, and multiple virtual birds in the sky flying along the tracks defined by the user. Users can construct game scenes, game levels, etc. through graphical programming.

[0080] In some embodiments, the graphical programming method in the embodiments of the present application is used for animation development. In the target application, the developer adds a new scene and multiple animation objects, configures each animation object, and uses a graphical building block code to control these animation objects, including forming a formation, and uses a second graphical code to control the animation objects in the formation. Exemplarily, a preview interface is also provided in the graphical programming tool, in which the control process of each animation object can be previewed while running the graphical programming result. Exemplarily, when the animation presented in the preview interface meets expectations, the previewed animation is directly used as the generated animation.

[0081] In other embodiments, the graphical programming method in the embodiments of the present application is used to control virtual drones. Exemplarily, the target application provides a virtual drone flight environment and drones. Exemplarily, the combined drone formation is controlled by graphical building block codes to realize dynamic changes such as interconnected performances and flights of the formation. Exemplarily, a building block code (i.e., a second graphical code) that can simultaneously control multiple drones to join the formation is provided in the building block preset area. Users can use the building block to add multiple drones to the formation according to actual use, and use a set of codes to complete the flight control of the entire drone formation, thereby improving the efficiency of writing code, thereby realizing formation control, interconnected performances, formation flight, etc. of virtual drones.

[0082] In some embodiments, the graphical programming method in the embodiments of the present application is used to control actual objects. Exemplarily, the specific parameters of multiple actual objects (such as multiple real toys, drones, light bulbs), etc. are imported into the target application, and the multiple actual objects are bound to the terminal device where the target application is located. Exemplarily, the combination of the multiple actual object formations is controlled by graphical building block codes to realize dynamic changes such as interconnected performances and flights of the formations. Exemplarily, multiple actual objects are added to the formation according to the second graphical code. When the second graphical code is run, control signals are sent to multiple actual objects to control the actual objects to perform corresponding actions, thereby realizing the use of a set of codes to complete the joint control of multiple actual objects and improve programming efficiency.

[0083] The following takes a virtual drone as an example to illustrate the specific application scenarios of the present application in conjunction with the accompanying drawings.

[0084] In some embodiments, Figure 8As shown, a user download interface 800 is provided in the target application. When the user clicks to purchase the target application, the programming function provided by the target application can be used. Of course, it can also be provided to users for free download without the need for users to purchase. After the user has the authority to use the target application, a function selection interface 801 is displayed, and the user can select simulation programming 802 in the function selection interface 801. After the user selects simulation programming 802, a user login interface 803 is displayed. The user can choose different accounts to log in to the target application. After the user logs in to the target application, a programming mode selection interface 804 is displayed, in which the user can select graphical programming or other programming modes, which is not limited in this application.

[0085] In some embodiments, Fig. 9 As shown, after the user selects graphical programming, an object quantity selection interface 900 is displayed, and the user can configure the number of objects by himself, such as configuring only one drone. Exemplarily, after the user configures the number of objects, a scene selection interface 901 is displayed, and the user can configure the scene where the object is located by himself, such as configuring the scene to be xx smart city. After the user configures the object and scene, a virtual scene interface 902 is displayed, and the virtual scene and the object 903 created in the scene are displayed in the virtual scene interface.

[0086] In some embodiments, Fig.10 As shown, the user interface provided by the graphical programming tool includes a virtual scene interface 1000. In some embodiments, the virtual scene interface 1000 includes a scene area, a navigation toolbar, a map navigation area, and a function panel area.

[0087] In some embodiments, Fig.11 As shown, the user interface provided for the graphical programming tool also includes a code editing interface 1100. In some embodiments, the code editing interface 1100 includes a building block preset area, a building block editing area, a navigation toolbar, a map navigation area, and a function panel area.

[0088] In some embodiments, the user can drag and drop the preset building block code in the code editing interface 1100 and edit it to obtain the edited building block code. When the edited building block code is run, the control process of the object in the virtual scene can be seen in the virtual scene interface 1000.

[0089] In the technical solution provided by the embodiment of the present application, a first graphical code and a second graphical code are preset in the building block preset area, and at least one object is added to the same formation through the first graphical code, and unified control of at least one object added to the same formation is achieved through the second graphical code. This avoids repeated code writing and speeds up code writing efficiency.

[0090] The above is the relevant introduction related to the present application. The graphical programming method proposed in the embodiment of the present application is explained below in combination with specific embodiments.

[0091] Please refer to Fig.12 , which shows a flowchart of a graphical programming method provided by an embodiment of the present application. The execution subject of each step of the method can be the terminal device 10 introduced above, or the client of the target application running on the terminal device 10, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method may include at least one of the following steps (1210-1240).

[0092] Step 1210, displaying a code editing interface of a graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects.

[0093] In some embodiments, the graphical programming tool is an application program or a functional module in an application program that provides a graphical programming function. Exemplarily, the graphical programming tool is the above-mentioned target application program. Exemplarily, the graphical programming tool is a graphical programming module in the above-mentioned target application program. Exemplarily, the graphical programming tool provides a graphical programming function.

[0094] In some embodiments, the code editing interface of the graphical programming tool is an interface provided by the graphical programming tool for editing code (including graphical code). Fig.13 As shown, the code editing interface can be interpreted broadly, that is, the complete user interface 1300 is considered to be the code editing interface, and the complete user interface 1300 includes at least one of the block preset area 1303, the function panel area, the navigation toolbar, and the map navigation area in addition to the block editing area 1304. Of course, the code editing interface proposed in this application can also be interpreted in a narrow sense, that is, only including the block editing area 1304. At this time, the preset block code is not displayed in the block editing area 1304, but is displayed in the block preset area 1303.

[0095] In some embodiments, the code editing interface includes multiple preset graphical codes. Exemplarily, multiple preset graphical codes are displayed in the building block preset area 1303. The graphical code in the embodiment of the present application refers to a code displayed in the form of a graphic, and the graphical code encapsulates a programming language. Different graphical codes encapsulate different programming languages, that is, different control logics for objects.

[0096] In some embodiments, the graphical code includes at least two categories. The first type of graphical code is used to control a single object, and can only control a single object. The second type of graphical code is used to control a formation, which includes at least one object. When there are multiple objects in the formation, the graphical code can control multiple objects in the formation. Exemplarily, the preset graphical code may include at least one graphical code of the second type, and of course, in addition to the graphical code of the second type, it may also include at least one graphical code of the first type. The embodiments of the present application do not limit the types of preset graphical codes.

[0097] The objects in the embodiments of the present application include but are not limited to virtual objects or real objects. When the object is a real object, the object can be an active or inactive object in the real world, such as a real drone, a light bulb, a toy car, etc. When the object is a virtual object, the object can be an active or inactive object in a virtual scene, such as a virtual drone, a virtual light bulb, a virtual car, etc. In some embodiments, when the object is a virtual object, the virtual object can be created by a user. When the object is a real object, the graphical programming tool can be connected to at least one real object, and when the graphical programming result is run using the graphical programming tool, a control signal can be sent to at least one real object to control the at least one real object.

[0098] Step 1220, in response to an editing operation on a first graphical code among multiple preset graphical codes, display the edited first graphical code, the first graphical code is used to add at least one object to the same formation, and the edited first graphical code is used to add at least one object to the first formation.

[0099] In some embodiments, in response to the operation of selecting at least one graphical code in the building block preset area, a plurality of selected graphical codes are displayed in the building block editing area 1304. Exemplarily, the code editing interface includes a first graphical code 1301 and a second graphical code 1302. Exemplarily, the first graphical code 1301 and the second graphical code 1302 can be edited respectively to obtain the edited first graphical code and the edited second graphical code.

[0100] Of course, when the default first graphical code meets the user's needs, the first graphical code may not be further edited. For example, if the first graphical code defaults to adding drone 1 to formation 1, and the user's needs are also to add drones to formation 1, the first graphical code may not be edited.

[0101] In some embodiments, the first graphical code is a graphical code for adding at least one object to the same formation. Exemplarily, the editing operation on the first graphical code includes at least one of an editing operation on an object configuration area in the first graphical code and an editing operation on a formation configuration area in the first graphical code. Fig.14 As shown, the editing operation for the first graphical code 1400 can be considered to include at least one of the editing operation for the object configuration area 1401 in the first graphical code and the editing operation for the formation configuration area 1402 in the first graphical code. Exemplarily, the first graphical code displays the text "UAV (No. 1) joins formation (1)", wherein the position of the brackets allows the user to edit, that is, not only the object to join the formation can be selected, but also the formation to join can be selected. Exemplarily, the editing operation for the object configuration area is used to configure the object to join the formation, and the editing operation for the formation configuration area is used to configure the formation to join.

[0102] In some embodiments, the editing operation on the first graphical code can be considered as an operation to edit the first graphical code. This application does not limit the specific operation type of the operation, such as the operation is at least one of a click operation, a long press operation, a sliding operation, an input operation, etc.

[0103] In some embodiments, the edited first graphical code includes identification information of the selected objects. For example, if object 1 and object 2 are selected to join formation 1, 1 and 2 are displayed in the edited first graphical code.

[0104] Step 1230, in response to an editing operation on a second graphical code among multiple preset graphical codes, the edited second graphical code is displayed, the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation.

[0105] In some embodiments, the second graphical code is a graphical code for unified control of at least one object in the first formation. Exemplarily, the editing operation on the second graphical code includes at least one of an editing operation on a formation configuration area in the second graphical code and an editing operation on a parameter configuration area in the second graphical code. Fig.13As shown, the second graphical code displays the text "Set the flight speed of formation (1) to (x) m / s", wherein the position of the brackets allows the user to edit, that is, not only can the formation be configured, such as configuring the formation to be formation 1, but also the control parameters of the graphical code can be configured, such as configuring the flight speed to be 10 m / s. Exemplarily, the editing operation for the formation configuration area is used to configure the formation controlled by the graphical code, and the editing operation for the parameter configuration area is used to configure the control parameters of the graphical code.

[0106] In some embodiments, the edited first graphical code sets object 1, object 2, and object 3 to join formation 1, and the edited second graphical code sets formation 1 to move 5m to the left. Then, when the edited first graphical code and the edited second graphical code are run, the edited second graphical code can uniformly control object 1, object 2, and object to move 5m to the left.

[0107] Step 1240 , running the graphical programming result to control at least one object in the first formation, the graphical programming result including the edited first graphical code and the edited second graphical code.

[0108] In some embodiments, before step 1240, the step further includes displaying a graphical programming result. Exemplarily, the edited graphical code displayed in the building block editing area is referred to as a graphical programming result.

[0109] In some embodiments, the graphical programming result includes the edited first graphical code and the edited second graphical code. Of course, the graphical programming result may also include the edited third graphical code. The edited third graphical code may be the graphical code of the first type mentioned above, or the graphical code of the second type mentioned above, that is, the edited third graphical code may control one or more objects. That is, each object in the embodiment of the present application is allowed to be organized into formations and controlled together, or may be controlled individually, and the present application does not limit this. It should be understood that each object in the present application is a singleton, that is, each object independently becomes an instance, because it is impossible to group and control multiple objects together in the relevant technology, but only to control them separately. The technical solution provided in the embodiment of the present application can not only control a single object, but also control multiple formations at the same time, and uniformly control different objects in each formation, which is conducive to improving the diversity and flexibility of object control.

[0110] In some embodiments, a run control is displayed. In response to an operation on the run control, a graphical programming result is run. In some embodiments, Fig.13As shown, in response to an operation on the running control 1305 , the graphical programming result in the building block editing area 1304 is run to control at least one object in the formation 1 .

[0111] The controls in the embodiments of the present application are all user interface (UI) controls. UI controls are any visual controls or elements that can be seen on the user interface of an application, such as pictures, input boxes, text boxes, buttons, labels and other controls. Some of these UI controls respond to user operations, such as run controls, and run graphical programming results. The UI controls involved in the embodiments of the present application include, but are not limited to: run controls.

[0112] The technical solution provided by the embodiment of the present application can add at least one object to the first formation by editing the first graphical code in the code editing interface of the graphical programming tool, and by editing the second graphical code, the edited second graphical code is used to uniformly control at least one object in the first formation, and the graphical programming result including the edited first graphical code and the edited second graphical code is run to achieve unified control of at least one object added to the first formation. The technical solution provided by the embodiment of the present application can add objects that need to execute the same code logic to the first formation through the first graphical code, so that at least one object added to the first formation shares the same edited second graphical code, without the need for repeated programming, thereby improving programming efficiency.

[0113] Please refer to Fig.15 , which shows a flowchart of a graphical programming method provided by another embodiment of the present application. The execution subject of each step of the method can be the terminal device 10 introduced above, or the client of the target application running on the terminal device 10, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (1510-1550).

[0114] Step 1510, displaying a code editing interface of a graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects.

[0115] Step 1520 , in response to a triggering operation on the object configuration area in the first graphical code, an object selection interface is displayed, wherein a plurality of elements are displayed in the object selection interface, and each element corresponds to an object.

[0116] In some embodiments, the first graphical code includes an object configuration area, and the object configuration area is used to configure at least one object added to the same formation.

[0117] In some embodiments, the object configuration area is a sub-area of ​​the displayed first graphical code. The present application does not limit the display position of the object configuration area in the user interface, such as the object configuration area is in the middle of the first graphical code.

[0118] In some embodiments, the object selection interface is displayed in full screen or non-full screen. Fig.14 As shown, in response to the object configuration area 1401 in the first graphical code, an object selection interface 1403 is displayed.

[0119] In some embodiments, the object selection interface includes multiple elements, each element corresponds to an object. Exemplarily, each element corresponds to the number of an object. For example, the objects created in the virtual scene are numbered to obtain numbers 1 to N, where N is a positive integer. Number 1 corresponds to object 1, number 2 corresponds to object 2, and so on. In other embodiments, each element corresponds to a thumbnail of an object. This form is suitable for situations where the appearance of each object is quite different. When the appearance of the object is quite different, the object can be represented by a thumbnail of the object, such as using a head picture of each object to represent the object. Exemplarily, the object selection interface includes a head picture of the object person, a head picture of the object puppy, a head picture of the object kitten, and so on. The user can determine the corresponding object by directly selecting the corresponding picture.

[0120] Of course, this application also does not limit the arrangement order and arrangement position of the multiple elements in the object selection interface. For example, they can be arranged from top to bottom in ascending order of numbers, or from left to right in the chronological order of object creation.

[0121] Step 1530 , in response to a selection operation on at least one first element among the multiple elements, displaying the edited first graphical code, and adding an object corresponding to the at least one first element to a first formation.

[0122] In some embodiments, the first element is the element to which the selection operation points. Exemplarily, the selection operation for at least one first element among the multiple elements is an operation of selecting the at least one first element. The present application does not limit the operation type of the operation, such as the selection operation is a click operation, a long press operation, a sliding operation, etc.

[0123] In some embodiments, the selection operation includes a click operation on each first element. That is, the user only needs to click the element that he wants to add to the formation, and when the user wants to cancel the selection, he can click again. Fig.16As shown in 1600 of , when selecting an element, you can directly click the element. When deselecting an element, as shown in Fig.16 As shown in 1610 , clicking the element again will deselect the element.

[0124] In some embodiments, the selection operation is a selection operation starting from the first position and ending at the second position, and the element included in the selection area constructed by the first position and the second position is the first element. In some embodiments, a rectangular box formed by long pressing and sliding from the first position to the second position is the selection area. When the user wants to cancel the selection, he can simply long press the selection again. In some embodiments, Fig.17 As shown in 1700 of , when selecting an element, you can directly long-press the element to select it (that is, the frame selection operation). When deselecting the element, as shown in Fig.17 As shown in 1710 , long pressing the selected element in the box again will deselect the element.

[0125] In some embodiments, Fig.18 As shown in sub-figure a of , users can edit the graphical code in the code editing interface. Fig.18 As shown in sub-figure b of , the user drags multiple graphical codes from the building block preset area to the code editing area. Fig.18 As shown in sub-figure c of FIG. 1 , the user can edit the first graphical code 1800. Fig.19 As shown in sub-figure d of FIG. 1801 , the user can select multiple first elements after triggering the display object selection interface 1801. Fig.19 As shown in sub-figure e of , after the editing of the first graphical code is exited, the edited first graphical code 1900 is displayed.

[0126] The technical solution provided by the embodiment of the present application provides two methods for selecting elements. For the first method, the selection operation is a click operation, that is, a click operation is performed once for all elements pointed to by objects that want to be included in the same formation. This method ensures the accuracy of the selection and avoids selection errors. For the second method, the selection operation is a box selection operation, that is, a large number of elements can be selected at one time. This method ensures the efficiency of the selection. When a large number of objects need to be selected to join the formation, it is faster to use the second method.

[0127] In some embodiments, in response to a trigger operation on an object configuration area in a first graphical code, states corresponding to a plurality of elements are determined according to a correspondence between elements and objects; when an element corresponds to an object that has been created in a virtual scene, the element is in an unselected state; and when an element does not correspond to an object that has been created in a virtual scene, the element is in an uncreated state.

[0128] Exemplarily, M elements are preset, that is, at most M objects are allowed to appear in the scene, and M is a positive integer. When the number of objects created in the scene does not exceed M, there are elements without corresponding objects, that is, they are in an uncreated state.

[0129] In some embodiments, for the m-th element among multiple elements, when the m-th element is selected and the state of the m-th element is in an uncreated state, the state of the m-th element is not changed; when the m-th element is selected and the state of the m-th element is in an unselected state, the state of the m-th element is changed to a selected state, where m is a positive integer. In some embodiments, when the m-th element is deselected and the state of the m-th element is in a selected state, the state of the m-th element is changed to an unselected state.

[0130] Exemplarily, click on the m-th element. If the element is in an unselected state, it is determined that the element is in a selected state. Exemplarily, click on the element again, then the element changes from a selected state to an unselected state.

[0131] Exemplarily, long-press to select the m-th element by frame selection. If the element is in an unselected state, it is determined that the element is in a selected state. Exemplarily, long-press to select the element by frame selection again, then the element changes from a selected state to an unselected state.

[0132] Exemplarily, click or long-press to select the m-th element by frame selection. If the element is in an uncreated state, the state of the element remains unchanged.

[0133] Please refer to Fig. 20 , which shows a block diagram of an object state update method provided by an embodiment of the present application. As Fig. 20 shown in 2000 of, taking the object as a drone as an example, click on the drone parameters (i.e., the object configuration area) in the drone formation-related building blocks (i.e., the first graphical code), and a drone formation selection drone pop-up box (i.e., the object selection interface) pops up. Here, the interface of the extended pop-up box is utilized. Create a custom input type FieldFormationDronePopup that inherits from the Blockly.FieldTextInput class, and handle click events and display the selection drone pop-up box (abbreviated as the pop-up box) in this input type. Assume that the maximum number of drones that can be added to the scene is M, and the numbers 1 to M are fixedly displayed in the pop-up box, representing the drones numbered 1 to M created in the creation order. Each number has three states, namely uncreated, unselected, and selected. The uncreated state means that there is no drone with this serial number in the scene. If the number of drones in the scene is n (n < M), then the drones numbered n + 1 to M are in an uncreated state; the unselected state means that the drone with this serial number is not selected; the selected state means that the drone with this serial number has been selected.

[0134] Please refer to Fig.21 , which shows a block diagram of an object status update method provided by another embodiment of the present application. Fig.21 As shown in 2100, taking the object as a drone as an example, for a click operation, if the serial number (that is, the above-mentioned element) is currently in an uncreated state, then the serial number is not clickable, does not respond to the click operation, and remains in an uncreated state; if the serial number is currently in an unselected state, then after clicking the serial number, the serial number is changed to a selected state, and at the same time, the drone entry corresponding to the serial number in the function panel area is highlighted and flashed to prompt the user, and the drone logo corresponding to the map navigation area is also highlighted to prompt the user; if the serial number is currently in a selected state, then after clicking the serial number, the serial number is changed to an unselected state, and at the same time, the drone entry corresponding to the serial number in the function panel area is highlighted and flashed in another way (distinguished from the above-mentioned selected state) to prompt the user, and the drone logo corresponding to the map navigation area is also highlighted in another way (distinguished from the above-mentioned selected state) to prompt the user.

[0135] Please refer to Fig. 22 , which shows a block diagram of an object status update method provided by another embodiment of the present application. Fig. 22 As shown in 2200, taking the object as a drone as an example, the state of the serial number (that is, the above-mentioned element) outside the box (referring to the box of the selection area) is not changed. For all serial numbers in the box, the following operations are performed. If the serial number is currently in an uncreated state, then the serial number does not change its state and remains in an uncreated state; if the serial number is currently in an unselected state, then the serial number is changed to a selected state, and at the same time, the drone entry corresponding to the serial number in the function panel area is highlighted and flashed to prompt the user, and the drone logo corresponding to the map navigation area is also highlighted to prompt the user; if the serial number is currently in a selected state, then the serial number is changed to an unselected state, and at the same time, the drone entry corresponding to the serial number in the function panel area is highlighted and flashed in another way (distinguished from the above-mentioned selected state) to prompt the user, and the drone logo corresponding to the map navigation area is also highlighted in another way (distinguished from the above-mentioned selected state) to prompt the user.

[0136] In some embodiments, the first element in the selected state is displayed differently from other elements in the unselected state. In some embodiments, the first element in the selected state is displayed differently from other elements in the unselected state in terms of color, brightness, grayscale, etc.

[0137] In some embodiments, the object corresponding to the first element in the selected state and the objects corresponding to other elements in the unselected state are displayed separately in the virtual scene. In some embodiments, when the user selects a target element in the object selection interface, the object corresponding to the target element in the selected state is highlighted in the virtual scene, while the objects pointed to by the unselected elements are not highlighted. That is, if the user selects several elements, the objects corresponding to these elements are highlighted in the virtual scene, and the highlight display here also includes flashing display, yellow display, etc.

[0138] In some embodiments, the mark of the object corresponding to the first element in the selected state in the map navigation interface is displayed separately from the marks of the objects corresponding to other elements in the unselected state in the map navigation interface, wherein the map navigation interface displays a map of the virtual scene and the marks of each created object in the virtual scene in the map. In some embodiments, the map navigation interface here corresponds to the above-mentioned map navigation area. The mark of the object corresponding to the first element in the selected state in the map navigation interface is highlighted, and the highlighting here also includes flashing display, yellow display, etc. The mark in the embodiment of the present application is also used to indicate the object, such as the mark is at least one of the head picture, number, and logo of the object.

[0139] In some embodiments, the identification of the object corresponding to the first element in the selected state in the function panel interface is displayed separately from the identification of the objects corresponding to other elements in the unselected state in the function panel interface, wherein the function panel interface is used to display the configuration information corresponding to each created object in the virtual scene, and the configuration information includes the identification of the object. In some embodiments, the function panel interface here corresponds to the above-mentioned function panel area. The identification of the object corresponding to the first element in the selected state in the function panel interface is highlighted, and the highlighting here also includes flashing display, yellow display, etc.

[0140] In some embodiments, the above-mentioned several distinctions are displayed differently.

[0141] The technical solution provided in the embodiment of the present application allows users to clearly know which objects are selected by distinguishing the selected objects from other objects in the map navigation interface, function panel interface, and object selection interface during the object selection process, thereby more intuitively observing whether the selection is wrong, so that users can make timely modifications.

[0142] In some embodiments, the triggering operation on the object configuration area in the first graphical code and the selection operation on at least one first element among the multiple elements are two-step operations, or they can be a one-step sliding operation without releasing the hand. When the triggering operation on the object configuration area in the first graphical code and the selection operation on at least one first element among the multiple elements are a one-step sliding operation without releasing the hand, for example, the triggering operation on the object configuration area in the first graphical code is long pressed to call out the object selection interface, and without releasing the hand, elements to be added to the same formation can be continuously selected on the object interface to reduce the operation steps.

[0143] In some embodiments, at least one object joining the same formation is configured using the method shown in step 1520 and step 1530. In other embodiments, identification information of at least one object joining the same formation can be directly input in the object configuration area, and at least one object joining the first formation is determined based on the input identification information of the at least one object. The input can be text input or voice input.

[0144] The above steps 1520 and 1530 illustrate a method for configuring at least one object to join the same formation. In other embodiments, the following steps 1560 (not shown in the figure) and 1570 (not shown in the figure) are also used to configure at least one object to join the same formation.

[0145] Step 1560, in response to a trigger operation on the object configuration area in the first graphical code, a virtual scene interface in an editing state is displayed, wherein the virtual scene interface displays a virtual scene and objects created in the virtual scene, and different objects have different positions in the virtual scene.

[0146] Exemplarily, objects in the virtual scene interface in the editing state are allowed to be edited, which is distinguished from the previous virtual scene interface.

[0147] For example, and the above Fig.14 Similar to the object selection interface 1403 in FIG. 1 , the virtual scene interface in the editing state is displayed in a non-full screen form.

[0148] Exemplarily, the virtual scene interface in the editing state is displayed in full screen form. That is, in response to the triggering operation on the object configuration area in the first graphical code, the virtual scene interface in the editing state is displayed in full screen.

[0149] Step 1570 , in response to a selection operation on at least one first object among the created objects, displaying the edited first graphical code, and adding the at least one first object to the first formation.

[0150] In some embodiments, the selection operation for at least one first object among the created objects is an operation of selecting the at least one object. In some embodiments, the selection operation includes a click operation for each object. In some embodiments, the selection operation is a box selection operation starting from the third position and ending at the fourth position, and the objects included in the box selection area constructed by the third position and the fourth position are the selected objects. This is similar to the above, and reference is made to the above explanations, and no further elaboration is given.

[0151] In some embodiments, the edited first graphical code includes identification information of the selected objects. For example, if object 1 and object 2 are selected to join formation 1, identification 1 and identification 2 are displayed in the edited first graphical code.

[0152] The technical solution provided in the embodiment of the present application allows the user to directly select objects in the virtual scene to join the formation, making the selection of objects more intuitive and less prone to errors, which is conducive to improving programming efficiency.

[0153] The above embodiment specifically introduces how to configure the object selected to join the formation. Of course, the formation pointed to by the first graphical code can also be configured.

[0154] In some embodiments, the first graphical code further includes a formation configuration area, and the formation configuration area is used to configure a formation to which at least one object joins.

[0155] In some embodiments, in response to a trigger operation on a formation configuration area in a first graphical code, a formation selection interface is displayed, in which multiple formation numbers are displayed, and each formation number corresponds to a formation; in response to a selection operation on a first formation number among multiple formation numbers, an edited first graphical code is displayed, and the formation corresponding to the first formation number is the first formation.

[0156] In some embodiments, the triggering operation for the formation configuration area in the first graphical code and the selection operation for the first formation number among multiple formation numbers are two-step operations, or they can be a one-step sliding operation without letting go. When the triggering operation for the formation configuration area in the first graphical code and the selection operation for the first formation number among multiple formation numbers are a one-step sliding operation without letting go, for example, long pressing the triggering operation of the formation configuration area in the first graphical code to call out the formation selection interface, without letting go, continue to slide to the first formation number on the object interface to reduce the number of operation steps.

[0157] In other embodiments, the identification information of the formation to be joined can be directly input in the formation configuration area, and the formation to be pointed to is determined according to the input formation identification information. The input can be text input or voice input.

[0158] Step 1540, in response to an editing operation on a second graphical code among multiple preset graphical codes, display the edited second graphical code, the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation.

[0159] Step 1550 , running the graphical programming result to control at least one object in the first formation, the graphical programming result including the edited first graphical code and the edited second graphical code.

[0160] In some embodiments, the graphical programming result is run to display the control process of at least one object in the first formation in the virtual scene. If the graphical programming result requires that formation 1 be controlled to fly 10 meters to the left, and formation 1 includes object 1 and object 2, then an animation of controlling both object 1 and object 2 to fly 10 meters to the left is displayed in the virtual scene. Fig.23 As shown, in response to the operation on the running control 2301, the graphical programming result is run, and the control process 2302 of at least one object in the first formation is displayed in the virtual scene.

[0161] The technical solution provided in the embodiment of the present application can provide the running results to the user in an animated manner for preview, which is conducive to the user to quickly discover problems in the graphical programming results, so as to quickly modify them and improve programming efficiency.

[0162] In some embodiments, at least one of a scene control and a code editing control is displayed; the scene control is used to switch the display of a virtual scene interface, which includes a virtual scene and objects created in the virtual scene; the code editing control is used to switch the display of a code editing interface. The graphical programming result is run, and in response to a trigger operation on the scene control, the virtual scene interface is displayed, and the control process of at least one object in the first formation in the virtual scene is displayed in the virtual scene interface; in response to a trigger operation on the code editing control, the code editing interface is redisplayed, and the code editing interface includes the graphical programming result.

[0163] In some embodiments, Fig.24As shown, a scene control 2401 and a code editing control 2402 are displayed. In response to a trigger operation on the scene control 2401, a virtual scene interface 2400 is displayed. In response to a trigger operation on the code editing control 2402, a code editing interface 2404 is displayed. That is, through the scene control and the code editing control, the switching between the virtual scene interface and the code editing interface can be realized. Of course, the two can also be displayed on the same screen, such as displaying the virtual scene interface on the left and the code editing interface on the right. Of course, the code editing interface can also be displayed in full screen, and the virtual scene interface can be displayed in a picture-in-picture format.

[0164] In some embodiments, in response to a formation setting operation for a target object among objects created in a virtual scene interface, a formation selection interface is displayed, wherein the formation selection interface includes multiple formation numbers, each formation number corresponding to a formation; in response to a selection operation for a second formation number among multiple formation numbers, the target object is determined to join the formation corresponding to the second formation number. In this way, the formation of an object can be modified directly in the virtual scene interface, such as long pressing the target object in the virtual scene interface to display a formation selection interface; in response to a selection operation for a second formation number among multiple formation numbers, the target object is determined to join the formation corresponding to the second formation number. By directly modifying the formation in the scene and combining the code with the scene, it is beneficial to improve the flexibility of code editing and improve programming efficiency.

[0165] Exemplarily, modifications to the formation in interfaces other than the code editing interface will be synchronized to the edited first graphical code and the edited second graphical code, so that the scene and the code remain synchronized to avoid errors.

[0166] The technical solution provided in the embodiment of the present application switches the display of the virtual scene interface and the code editing interface or displays them on the same screen, making it convenient for users to edit the code and view the control process of each object in the scene at the same time, which is conducive to improving programming efficiency.

[0167] Please refer to Fig.25 , which shows a flowchart of a graphical programming method provided by another embodiment of the present application. The execution subject of each step of the method can be the terminal device 10 introduced above, or the client of the target application running on the terminal device 10, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (2510-2570).

[0168] Step 2510, in response to a triggering operation on an object creation control in a function panel interface, configuration information corresponding to a newly added object is displayed in the function panel interface, and the function panel interface is used to display configuration information corresponding to each created object in a virtual scene.

[0169] In some embodiments, in response to a triggering operation on an object creation control in a function panel interface, configuration information corresponding to a newly added object displayed in the function panel interface is initialized information, or in other words, default configuration information.

[0170] In some embodiments, in response to a triggering operation on an object creation control in the function panel interface, a newly added object is displayed in the virtual scene.

[0171] In some embodiments, Fig.26 As shown, in response to a triggering operation on an object creation control 2600 in a function panel interface, configuration information 2601 corresponding to a newly added object is displayed in the function panel interface.

[0172] Step 2520: In response to the modification operation on the configuration information corresponding to the newly added object, display the modified configuration information.

[0173] In other embodiments, in addition to modifying the configuration information corresponding to the newly added object, the configuration information corresponding to other created objects may also be modified.

[0174] In some embodiments, Fig. 27 As shown, in response to a modification operation on the configuration information 2701 corresponding to the created object, the modified configuration information is displayed.

[0175] Step 2530: Display the newly added object created based on the modified configuration information in the virtual scene.

[0176] In some embodiments, the newly added object is modified in the virtual scene based on the modified configuration information.

[0177] In some embodiments, an object 2702 corresponding to the modified configuration information is displayed in the virtual scene.

[0178] In some embodiments, the function panel interface includes a search input field.

[0179] Exemplarily, the search bar is used to search for a created object and view configuration information of the object.

[0180] In some embodiments, in response to an input operation on a search input bar, search information for a created object input in the search input bar is displayed; and configuration information corresponding to the object pointed to by the search information is displayed.

[0181] In some embodiments, the computer device matches the keywords in the search information with the configuration information of each created object according to the search information input by the user, and determines the created object with the highest matching degree as the object pointed to by the search information. Further, the configuration information corresponding to the object pointed to by the search information is displayed.

[0182] Considering that when a user has created a large number of objects, it is impossible to display all the configuration information of all the created objects in one interface, so the user needs to pull down or scroll to find the relevant object. Therefore, the technical solution provided by the embodiment of the present application provides a search bar to facilitate the user to quickly search for the relevant object, so as to quickly view the configuration information of the object and modify the configuration information, which is conducive to improving information processing efficiency.

[0183] In some embodiments, the function panel interface includes tabs corresponding to each created object.

[0184] The tabs in the embodiments of the present application should be interpreted broadly, that is, each object corresponds to a tab, and the tab is used to characterize a specific element of the object, such as a control, logo, thumbnail, etc. The reason why the tab is displayed is that the tab area is small, and more tabs can be displayed in a smaller area, that is, the tabs corresponding to multiple created objects can be displayed in a small area. For example, M labels are displayed in the function panel interface, and each label corresponds to a created object.

[0185] In some embodiments, in response to the selection operation of the target tab in the tabs corresponding to each created object, the configuration information corresponding to the object pointed to by the target tab is displayed. Exemplarily, the configuration information of the object pointed to by the target tab is quickly displayed by selecting the target tab. This method improves the efficiency of information display.

[0186] In some embodiments, in response to a delete operation on a target tab, the object pointed to by the target tab is deleted from the virtual scene. Exemplarily, deleting the target tab can quickly delete the object pointed to by the tab. This method improves the efficiency of object deletion.

[0187] In some embodiments, in response to a formation setting operation for a target tab, the formation to which the object pointed to by the target tab joins is changed. Exemplarily, in response to a formation setting operation for a target tab, a formation selection interface is displayed, and the formation to which the object pointed to by the target tab joins is reselected on the formation selection interface. This method realizes quick configuration of formations, which is conducive to improving programming efficiency.

[0188] In some embodiments, the function panel interface also displays controls corresponding to each formation. Exemplarily, in response to a click operation on a target control in a control corresponding to each formation, the configured objects under the formation corresponding to the target control are displayed. Exemplarily, when the configured objects under the formation corresponding to the target control are displayed, all objects under the formation and other objects in the virtual scene are displayed separately. Exemplarily, objects in the formation corresponding to the target control can be added or deleted. Exemplarily, the objects under each formation can also be quickly viewed in the function panel interface, and the location of each object under the formation can also be viewed in the scene. In addition, objects can be quickly deleted or added, which is conducive to improving the flexibility and efficiency of programming.

[0189] Step 2540, displaying a code editing interface of the graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects.

[0190] Step 2550, in response to an editing operation on a first graphical code among multiple preset graphical codes, display the edited first graphical code, the first graphical code is used to add at least one object to the same formation, and the edited first graphical code is used to add at least one object to the first formation.

[0191] Step 2560, in response to an editing operation on a second graphical code among multiple preset graphical codes, display the edited second graphical code, the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation.

[0192] Step 2570, running the graphical programming result to control at least one object in the first formation, the graphical programming result including the edited first graphical code and the edited second graphical code.

[0193] The above is an introduction to the graphical programming method. The following is a detailed explanation of how to run the graphical programming results after programming using the graphical programming tool in conjunction with the following embodiments.

[0194] Of course, it should be understood that the following graphical code execution method and the above-mentioned graphical programming method can be executed by the same computer device or by different computer devices. When executed by the same computer device, an application program that supports programming functions and code execution functions is running on the computer device. When executed by different computer devices, the first computer device executes the above-mentioned graphical programming method to obtain a graphical programming result, and the first computer device sends the graphical programming result to the second computer device, and the second computer device executes the graphical programming result. An application program that supports programming functions is running on the first computer device, and an application program that supports code execution functions is running on the second computer device.

[0195] It should also be noted that the edited first graphical code and the edited second graphical code included in the graphical programming result in the graphical programming method are considered to be the first graphical code and the second graphical code in the graphical programming result mentioned in the graphical code execution method described below. Since the following embodiment is the code execution side, the graphical code mentioned in the following embodiment is considered to be edited, that is, in the following embodiment, the first graphical code directly replaces the edited first graphical code, the second graphical code replaces the edited second graphical code, and the third graphical code is considered to be the edited third graphical code.

[0196] Please refer to Fig.28 , which shows a flowchart of a graphical code execution method provided by an embodiment of the present application. The execution subject of each step of the method can be the terminal device 10 introduced above, or the client of the target application running on the terminal device 10, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (2810-2830).

[0197] Step 2810, obtaining a graphical programming result, where the graphical programming result includes a plurality of graphical codes executed in sequence, and the graphical codes are used to process one or more virtual objects in the virtual scene.

[0198] In some embodiments, a graphical programming result is obtained, and the graphical programming result includes a plurality of graphical codes, which are graphical codes edited by a programmer. Exemplarily, the graphical codes in the graphical programming result are arranged in a certain order, such as from top to bottom, from left to right, and so on. Exemplarily, when the graphical programming result is executed, the graphical codes in the graphical programming result are executed in sequence. In some embodiments, each graphical code corresponds to a control code logic, that is, a programming language encapsulated in the graphical code. Exemplarily, different graphical codes correspond to different control code logics, that is, different programming languages ​​encapsulated in the graphical code.

[0199] In some embodiments, the virtual scene is a virtual environment created (or provided) by the application program for the user. The virtual environment can be a simulation of the real world, a semi-simulation and semi-fictitious three-dimensional world, or a purely fictitious three-dimensional world. The virtual environment can be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment.

[0200] In some embodiments, a virtual object is an movable object in a virtual environment. The movable object may be at least one of a virtual drone, a virtual character, a virtual animal, and a cartoon character. In some embodiments, when the virtual environment is a three-dimensional virtual environment, the virtual object may be a three-dimensional virtual model, and each virtual object has its own shape and volume in the three-dimensional virtual environment, occupying a portion of the space in the three-dimensional virtual environment. Optionally, the virtual object is a three-dimensional character constructed based on three-dimensional human skeleton technology, and the virtual object achieves different external images by wearing different skins. In some implementations, the virtual object may also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.

[0201] Step 2820, executing the first graphical code included in the graphical programming result, and adding at least one virtual object in the virtual scene to the first formation.

[0202] In some embodiments, the first graphical code is a graphical code for adding at least one virtual object in a virtual scene to a first formation. In response to a user editing operation on the first graphical code during programming, the edited first graphical code includes first configuration information. The first configuration information includes identification information of the first formation and identification information corresponding to at least one virtual object added to the first formation. In some embodiments, the identification information here is information used to characterize the formation or object, such as a number, a label, a sequence number, etc. Fig.19As shown, the edited first graphical code 1900 shows that drones 1 and 2 join formation 1, and drones 1 and 2 and the formation are the first configuration information included in the edited first graphical code.

[0203] In some embodiments, when the code is executed, at least one virtual object in the virtual scene is added to the first formation according to the first configuration information included in the first graphical code.

[0204] Exemplarily, the identification information corresponding to at least one virtual object joining the first formation in the first configuration information is bound to the identification information of the first formation, that is, at least one virtual object joining the first formation can be quickly found based on the identification information of the first formation.

[0205] Exemplarily, a correspondence table between virtual objects and formations is established based on the identification information corresponding to at least one virtual object joining the first formation in the first configuration information and the identification information of the first formation. That is, according to the identification information of the first formation, at least one virtual object joining the first formation can be quickly found from the correspondence table.

[0206] Exemplarily, according to the identification information corresponding to at least one virtual object added to the first formation in the first configuration information and the identification information of the first formation, a dynamic link is established between the first formation and at least one virtual object added to the first formation. For example, a dynamic link is established between formation 1 and virtual object 1, a dynamic link is established between formation 1 and virtual object 2, and a dynamic link is established between formation 1 and virtual object 3. That is, when the second graphical code is executed, that is, when each object in the formation is controlled, the dynamic link of the first formation is used to link to the virtual object added to the first formation. This method directly constructs a dynamic link to find the virtual object added to the formation, which not only avoids the construction of a correspondence table or a binding relationship, but also enables rapid positioning to improve search efficiency.

[0207] Step 2830, executing the second graphical code included in the graphical programming result to uniformly control at least one virtual object added to the first formation.

[0208] In some embodiments, the second graphical code is a graphical code for unified control of each virtual object in the first formation. In response to the user's editing operation on the second graphical code during the programming process, the edited second graphical code includes second configuration information. The second configuration information includes identification information and control parameter information of the first formation.

[0209] The technical solution provided by the embodiment of the present application obtains the graphical programming result; executes the first graphical code included in the graphical programming result, thereby realizing the addition of at least one virtual object in the virtual scene to the first formation; and executes the second graphical code included in the graphical programming result, thereby realizing the unified control of at least one virtual object added to the first formation. The technical solution provided by the embodiment of the present application uses the first graphical code to organize objects that need to execute the same code logic into the first formation, so that at least one object added to the first formation shares a second graphical code, and the execution of the second graphical code can realize the unified control of at least one virtual object in the same formation, without the need to obtain repeated programming codes to control each virtual object separately, which is conducive to improving the execution efficiency of the code.

[0210] Please refer to Fig.29 , which shows a flowchart of a graphical code execution method provided by another embodiment of the present application. The execution subject of each step of the method can be the terminal device 10 introduced above, or the client of the target application running on the terminal device 10, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (2910-2950).

[0211] Step 2910, obtaining a graphical programming result, where the graphical programming result includes a plurality of graphical codes executed in sequence, and the graphical codes are used to process one or more virtual objects in the virtual scene.

[0212] Step 2920: execute the first graphical code included in the graphical programming result to add at least one virtual object in the virtual scene to the first formation.

[0213] Step 2930, obtaining a control logic code corresponding to the second graphical code, where the control logic code refers to a programming language encapsulated in the second graphical code.

[0214] In some embodiments, a programming language encapsulated in the second graphical code is acquired to obtain a control code logic corresponding to the second graphical code.

[0215] Step 2940, determine at least one virtual object to join the first formation.

[0216] In some embodiments, since the identification information corresponding to at least one virtual object joining the first formation and the identification information of the first formation have been bound, at least one virtual object joining the first formation can be quickly found directly based on the identification information of the first formation.

[0217] Exemplarily, since a correspondence table is established between virtual objects and formations, at least one virtual object added to the first formation can be quickly found from the correspondence table directly based on the identification information of the first formation.

[0218] Exemplarily, since a dynamic link has been established between the first formation and at least one virtual object that joins the first formation, the dynamic link of the first formation is directly used to link to at least one virtual object that joins the first formation. This method of directly building a dynamic link to find the virtual object that joins the formation can improve the search efficiency.

[0219] Step 2950: Execute the control logic code to uniformly control at least one virtual object added to the first formation.

[0220] In some embodiments, after determining at least one virtual object, the control logic code is used to control the at least one virtual object separately, that is, the at least one virtual object is controlled separately at the same time. Exemplarily, the control code logic is a programming language that controls flying 1 meter to the left, and this programming language is used to control at least one virtual object in the formation.

[0221] In some embodiments, when controlling at least one virtual object, there is no order of precedence. Exemplarily, the target application includes multiple executors, and the sth executor is used to execute the control logic code to control the sth virtual object added to the first formation, where s is a positive integer. Multiple executors synchronously control virtual objects, which is conducive to speeding up processing speed and improving code execution efficiency.

[0222] In some embodiments, there is a second graphical code, which has an execution condition, that is, the second graphical code can be executed only when the virtual object satisfies the condition. The execution condition of the second graphical code is described below as an example.

[0223] In some embodiments, the above method further includes at least one of the following steps S1 to S3 (not shown in the figure).

[0224] Step S1, obtaining state information corresponding to at least one virtual object added to the first formation, where the state information is used to reflect the real-time state of the virtual object.

[0225] In some embodiments, the state information includes the current position information, color information, shape information, etc. of the virtual object. In some embodiments, before executing the second graphical code, it is determined whether at least one virtual object of the first formation meets the execution condition of the second graphical code.

[0226] Step S2, when the status information corresponding to at least one virtual object added to the first formation does not meet the execution condition of the second graphical code, continue to control the at least one virtual object added to the first formation until the status information corresponding to at least one virtual object added to the first formation meets the execution condition of the second graphical code.

[0227] Exemplarily, the execution condition of the second graphical code is that the longest distance between the two virtual objects joining the first formation does not exceed 5 meters, then the state information corresponding to at least one virtual object joining the first formation is obtained, and if it is determined that the longest distance between the two virtual objects joining the first formation is 3 meters, then the execution of the second graphical code is allowed at this time. Exemplarily, if it is determined that the longest distance between the two virtual objects joining the first formation is 6 meters, then the execution of the second graphical code is not allowed at this time. Exemplarily, when the execution of the second graphical code is not allowed, it is necessary to continue to control the at least one virtual object joining the first formation until the state information corresponding to the at least one virtual object joining the first formation meets the execution condition of the second graphical code.

[0228] Step S3, when the state information corresponding to the at least one virtual object added to the first formation meets the execution condition of the second graphical code, execute the control logic code to uniformly control the at least one virtual object added to the first formation.

[0229] The above steps S1 to S3 introduce how to execute graphical codes simultaneously. Taking the graphical code as a building block code as an example, when a drone in the group executes a building block, if the current state does not meet the prerequisite for executing the building block, other drones need to wait for the drone to adjust its state to a state that satisfies the execution of the building block. The drone formation executor will check the status of all drones in the group. If it meets the requirements, the building block will be executed; if not, the drone that does not meet the execution of the building block will adjust its state, and the drone formation executor (see the explanation of the following embodiment) will check the status of all drones in the group again in the next main loop of the life cycle, and repeat the cycle until all drones meet the state of executing the building block. For example, there are 3 drones in drone formation A, namely 1, 2, and 3. To let formation A perform circular motion around a point p, it is necessary to wait for drones 1, 2, and 3 to spin to a direction perpendicular to the current position and the line connecting the center of the circle, and then perform circular motion together.

[0230] In some embodiments, the above method further includes at least one of the following steps S4 to S6 (not shown in the figure).

[0231] Step S4, for the kth virtual object among the at least one virtual object, after executing the control logic code to control the kth virtual object, determining that the kth virtual object is in a state where the execution of the second graphical code is completed, k is a positive integer.

[0232] In some embodiments, a flag is set for all virtual objects, and when the kth virtual object is in a state where the execution of the second graphical code is completed, the value of the flag is a first value.

[0233] Exemplarily, when the control logic code is executed to control the kth virtual object, the value of the flag bit of the kth virtual object is changed from the second value to the first value. Exemplarily, the original value of the flag bit is the second value.

[0234] Step S5, when the control logic code is executed and the kth virtual object is not controlled, it is determined that the kth virtual object is in a state where the second graphical code has not been executed, and the first value represents the execution completion state.

[0235] In some embodiments, when the kth virtual object is in an incomplete execution state of the second graphical code, the value of the flag bit is a second numerical value, and the second numerical value represents the incomplete execution state.

[0236] Exemplarily, when the control logic code is executed and the kth virtual object is not controlled, the value of the flag bit of the kth virtual object is not changed. Exemplarily, the original value of the flag bit is the second value.

[0237] Step S6, traverse at least one virtual object added to the first formation, and when at least one virtual object added to the first formation is in a state where the execution of the second graphical code is completed, execute the third graphical code, where the third graphical code is the graphical code that follows the second graphical code in the graphical programming result.

[0238] In some embodiments, when the flag bits of at least one virtual object added to the first formation are all the first value, it is considered that all of the at least one virtual object added to the first formation is in a state where the execution of the second graphical code is completed, and the execution of the next graphical code of the second graphical code is allowed. In some embodiments, when one of the flag bits of at least one virtual object added to the first formation is the second value, it is considered that not all of the at least one virtual object added to the first formation is in a state where the execution of the second graphical code is completed, and the execution of the next graphical code of the second graphical code is not allowed.

[0239] The above steps S4 to S6 introduce how to determine whether the graphical code has been executed. When the building block starts to execute, a flag (completed) is set to false for all drones in the group. When the building block is executed, the value of the flag is changed to true. The drone formation executor checks the value of the flag of the drones in the group in each main loop of the life cycle. If the flag of any drone is false, it means that the execution of the building block of this group of drones has not been completed. Otherwise, it means that the building block of this group of drones has been executed and the subsequent building blocks can continue to be executed. For example, there are 3 drones in drone formation A, namely 1, 2, and 3. To move formation A to a certain point p, it is necessary to wait until drones 1, 2, and 3 have all flown to point p before executing the subsequent building blocks.

[0240] In some embodiments, the code type of the second graphical code is the first type or the second type.

[0241] In some embodiments, when the code type of the second graphical code is the first type, the control type of the second graphical code for at least one virtual object in the first formation is instantaneous control, and the instantaneous control refers to modifying the attributes of the virtual object, such as modifying the color of the virtual object, modifying the light of the virtual object, modifying the clothes of the virtual object, etc.

[0242] In some embodiments, when the code type of the second graphical code is the second type, the control type of the second graphical code for at least one virtual object in the first formation is continuous control, and continuous control refers to controlling the virtual object for a first duration, such as controlling the virtual object to fly left at speed a for 1 minute, controlling the virtual object to fly around point b for 5 seconds, controlling the virtual object to stay still for 1 hour, and so on.

[0243] In some embodiments, when the code type of the second graphical code is the second type, before executing the second graphical code, it is necessary to determine whether at least one virtual object joining the first formation meets the execution condition. Exemplarily, when the code type of the second graphical code is the second type, when executing the second graphical code, it is necessary to determine whether the execution of the second graphical code is completed.

[0244] In some embodiments, when the code type of the second graphical code is the second type, before executing the second graphical code, it is not necessary to determine whether the at least one virtual object joining the first formation meets the execution condition. Exemplarily, when the code type of the second graphical code is the second type, when executing the second graphical code, it is not necessary to determine whether the execution of the second graphical code is completed.

[0245] In some embodiments, when the code type of the second graphical code is the first type, before executing the second graphical code, it is necessary to determine whether at least one virtual object joining the first formation meets the execution condition. Exemplarily, when the code type of the second graphical code is the first type, when executing the second graphical code, it is necessary to determine whether the execution of the second graphical code is completed.

[0246] In some embodiments, when the code type of the second graphical code is the first type, before executing the second graphical code, it is not necessary to determine whether the at least one virtual object joining the first formation meets the execution condition. Exemplarily, when the code type of the second graphical code is the first type, when executing the second graphical code, it is not necessary to determine whether the execution of the second graphical code is completed.

[0247] In some embodiments, the drone formation blocks (i.e., graphical codes) can be divided into two categories according to the execution time of the blocks. The first category (i.e., the graphical codes of the first type mentioned above) are blocks that do not need to be executed for a period of time (such as setting properties such as speed or light, and the block is considered to be executed after the properties are modified), and no special processing is required; the second category (i.e., the graphical codes of the second type mentioned above) are blocks that need to be executed for a period of time (such as a drone flying forward at a speed of t for t time, and the block is considered to be executed after t time), and a group of drones executing blocks for a period of time requires special processing. Exemplarily, the special processing includes the above steps S1 to S6, that is, judging whether at least one virtual object joining the first formation meets the execution conditions and judging whether the graphical code has been executed.

[0248] The embodiment of the present application takes into account that the graphical code of instantaneous control generally only needs to modify the value of the corresponding position, and the possibility of error is small, so there is no need to judge whether the execution conditions are met and whether the execution is completed, while the graphical code of continuous control usually needs to be executed for a period of time, especially when there are many virtual objects in the formation, it is relatively easy to make mistakes, so for the graphical code of continuous control, it is necessary to judge whether the execution conditions are met and whether the execution is completed. This processing method is conducive to ensuring the smooth execution of the graphical code and reducing the possibility of errors.

[0249] The technical solution provided in the embodiment of the present application also provides an error correction function for the formation.

[0250] Exemplarily, after obtaining at least one virtual object added to the formation according to the first graphical code, the rationality of the at least one virtual object being included in the same team is judged. If the judgment result is unreasonable, the execution of the code is suspended, and a formation error correction prompt message is sent. The formation error correction prompt message is used to be displayed on the user interface for the user to view, so as to modify the formation in time. If the judgment result is reasonable, the formation error correction prompt message is not sent. Exemplarily, the formation error correction prompt message includes the status information of the unreasonable virtual object, and the unreasonable virtual object is a virtual object that is considered not to be included in the formation.

[0251] Exemplarily, the position information of each virtual object added to the formation is obtained. When there is a virtual object with a large position deviation, the judgment result is unreasonable. For example, if there are 10 virtual objects in a formation, the distance between 9 virtual objects is less than the threshold, and only the distance between the 10th virtual object and the 9 virtual objects is greater than the threshold, then it is considered that there is an error in the 10th virtual object, and the judgment result is unreasonable. When there is no virtual object with a large position deviation, the judgment result is reasonable.

[0252] Exemplarily, historical formation information (historical formations and objects that joined the formation) is obtained, and the current formation information is compared with the historical formation information. When the error is greater than a threshold, the result is judged to be unreasonable. Exemplarily, historical formation information (historical formations and objects that joined the formation) is obtained, and the current formation information is compared with the historical formation information. When the error is less than a threshold, the result is judged to be reasonable.

[0253] The technical solution provided by the embodiment of the present application is that each time a graphical programming result is obtained from the graphical programming result, when the first graphical code is detected according to the execution order, the rationality is first judged, and then the first graphical code is executed after it is reasonable. This method can avoid explicit errors in advance and report them to the user in time, which is conducive to the user to modify them in time, thereby improving the execution efficiency of the code.

[0254] Please refer to Fig.30 , which shows a flowchart of a graphical code execution method provided by an embodiment of the present application. The execution subject of each step of the method can be the terminal device 10 introduced above, or the client of the target application running on the terminal device 10, or the server 20. In the following method embodiment, for the convenience of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (3010-3030).

[0255] Step 3010, obtaining a graphical programming result, where the graphical programming result includes a plurality of graphical codes executed in sequence, and the graphical codes are used to process one or more virtual objects in the virtual scene.

[0256] Step 3020, based on the first configuration information, update the first correspondence table to obtain an updated first correspondence table, the first correspondence table is used to record the correspondence between the formation and the virtual object, and the updated first correspondence table records the correspondence between the identification information of the first formation and the identification information corresponding to at least one virtual object added to the first formation.

[0257] In some embodiments, when executing the graphical programming result, each time the first graphical code is encountered, the first correspondence table is updated once. When the first graphical code is encountered for the first time in executing the graphical programming result, the first correspondence table is created according to the first configuration information in the first graphical code. When the first graphical code is encountered again subsequently, only the first correspondence table needs to be updated.

[0258] In some embodiments, the first graphical code includes first configuration information, the first configuration information is used to configure virtual objects included in the first formation, and the first configuration information includes identification information of the first formation and identification information corresponding to at least one virtual object added to the first formation.

[0259] In some embodiments, before step 3030, the second graphical code is compiled, and if the compilation is successful, the compiled control logic code corresponding to the second graphical code is obtained, and the compiled control logic code is executed to control at least one virtual object added to the first formation, and the control logic code refers to the programming language encapsulated in the second graphical code; if the compilation is unsuccessful, a modification prompt information is sent, and the modification prompt information is used to indicate that the second graphical code is edited. Exemplarily, the modification prompt information includes text prompt information, voice broadcast information, picture prompt information, etc.

[0260] In some embodiments, when executing the code, the programming language encapsulated in the graphical code needs to be compiled to obtain the compiled code that can be executed. For example, the graphical code is translated into C# code that can be run by Unity. In some embodiments, in addition to compiling the second graphical code, other graphical codes in the graphical programming result also need to be compiled.

[0261] In some embodiments, Fig.31As shown in 3100, the user operates the graphical code. In the building block editing interface, the graphical code (building block) is operated (including dragging, combining, etc.), and the graphical code is compiled after clicking the run control. After the compiler compiles, if there is an error, it will prompt that there is a problem with the code, and the user is asked to modify and try again; if there is no error, the code will start to run.

[0262] Step 3030: execute the second graphical code included in the graphical programming result to uniformly control at least one virtual object added to the first formation.

[0263] In some embodiments, the second graphical code includes second configuration information, the second configuration information is used to indicate the first formation and parameters for controlling the first formation, and the second configuration information includes identification information and control parameter information of the first formation.

[0264] In some embodiments, the identification information of the first formation is used to search for at least one virtual object added to the first formation from the updated first correspondence table, and the control parameter information is used to modify the original logic code corresponding to the second graphical code to obtain the control logic code corresponding to the second graphical code, where the control logic code refers to the programming language encapsulated in the second graphical code.

[0265] In some embodiments, the identification information here is information used to characterize the formation, such as number, label, serial number, etc. In some embodiments, the second graphical code is "Formation 1 flies 1 meter to the left", then the identification information of the first formation included in the second configuration information is "Formation 1", and the control parameter information is "left, 1 meter". Exemplarily, the original control code logic corresponding to the second graphical code is consistent, that is, the programming language encapsulated in the second graphical code is consistent, then whether flying left or right, only the control parameters are different, and the original control code logic is consistent, so you only need to modify the control parameters in the programming language to get the control logic code corresponding to the second graphical code.

[0266] In some embodiments, the control parameter information in the second configuration information is used to modify the programming language encapsulated in the second graphical code to obtain a modified programming language, and the modified programming language is used to control at least one virtual object added to the first formation.

[0267] In some embodiments, third configuration information is obtained, and the third configuration information is used to configure the virtual object created in the virtual scene. The third configuration information includes identification information of the created virtual object and instance information of the created virtual object, and the instance information is used to indicate configuration information corresponding to the virtual object.

[0268] Exemplarily, the user can create a new virtual object in the graphical programming tool, and can also modify the configuration information of the new virtual object, so the instance information of the virtual object is determined according to the last saved created virtual object and its corresponding configuration information.

[0269] In some embodiments, the second correspondence table is updated according to the third configuration information to obtain an updated second correspondence table, wherein the second correspondence table is used to record the correspondence between the virtual object and the instance information, and the instance information is used to provide configuration information corresponding to the virtual object when executing the second graphical code to control the virtual object.

[0270] Exemplarily, the second correspondence table is constructed according to the instance information of the original created virtual object.

[0271] In some embodiments, for a first virtual object among the created virtual objects, when executing the second graphical code to control the first virtual object, instance information of the first virtual object is found from the updated second correspondence table according to identification information of the first virtual object.

[0272] Exemplarily, the computer device pre-stores an original second correspondence table, and the second correspondence table is used to record the correspondence between the virtual object and the instance information. That is, the virtual objects configured in the virtual scene are recorded in a table form. Exemplarily, the identification information of each virtual object corresponds to the instance information of the virtual object. Exemplarily, the instance information includes the configuration information of the virtual object, and the configuration information includes the position, color, light, etc. of the virtual object.

[0273] In some embodiments, the instance information of the first virtual object in the second correspondence table is updated according to the control result of the first virtual object.

[0274] Exemplarily, when the control logic code corresponding to the second graphical code is used to control the first virtual object, the virtual object is controlled based on the instance information of the virtual object. Therefore, when the control starts, the corresponding instance information needs to be found. When the control ends, the configuration information of the virtual object changes, and the instance information of the first virtual object needs to be updated using the changed configuration information.

[0275] In some embodiments, when the second graphical code is executed and the first virtual object is not controlled, the instance information of the first virtual object in the second correspondence table is not updated.

[0276] Exemplarily, when the second graphical code is executed and the first virtual object is not controlled, it means that the first virtual object is not controlled, and the configuration information is not changed, and there is no need to update the instance information of the first virtual object in the second correspondence table.

[0277] Still taking the virtual drone as an example, the core of code control of drone formation lies in the realization of runtime. The drone formation runtime relies on the life cycle provided by Unity. In each main loop of the life cycle, the status of the drone is updated according to the properties of each drone (properties refer to the basic properties of the drone, such as speed and direction. The motion of the drone in this frame is calculated according to the properties, and the position, orientation and other status of the drone are updated). The target application of drone formation runtime includes two parts: formation drone manager and drone formation executor.

[0278] Please refer to Fig.32 , which shows a schematic diagram of the component structure provided by an embodiment of the present application. Fig.32 As shown in 3200, the formation drone manager class is a singleton (a singleton is a creational design pattern that ensures that a class has only one instance and provides a global node for accessing the instance), and provides the following functions, including adding a new drone, deleting a drone, modifying drone information, obtaining a drone instance through the drone's identification information (a drone instance refers to the specific implementation of a drone object), adding a drone to a formation, deleting a drone from a formation, and obtaining a list of identification information of a group of drones through the formation's identification information. All operations performed by the user on the drone in the function panel interface are managed by the formation drone manager. Exemplarily, the formation drone manager maintains each virtual object in the formation and the instance information of each virtual object. Exemplarily, the formation drone manager is used to dynamically update at least one of the above-mentioned first correspondence table and the above-mentioned second correspondence table.

[0279] The drone formation executor class is created and dynamically mounted by the drone formation runtime class. It is responsible for executing the lifecycle state management of the user code. The drone formation executor class inherits from the Unity script base class Monobehaviour and is driven by the Mono script lifecycle function to decide whether to execute the next operation of the user code, thereby driving the drone formation runtime to execute the next operation and update the status of all drones. In other words, the drone formation executor is used to execute the control logic code corresponding to each graphical code to control at least one virtual object in the formation, update its properties or control its movement.

[0280] In some embodiments, when the edited graphical code is compiled, the graphical code for controlling a single virtual object includes the identification information of the drone, and the graphical code for controlling a formation (including the first graphical code and the second graphical code) includes the identification information of the formation. Taking the virtual object as a drone as an example, the drone formation manager has a correspondence table between the identification information of the drone and the instance information of the drone. The instance information of the corresponding drone can be obtained through the identification information of the drone, and the drone can be controlled after the instance information of the drone is obtained.

[0281] like Fig.33 As shown, the edited graphical code 3300 is used to control a single drone, and the control logic code 3301 corresponding to the edited graphical code 3300 includes the identification information (droneID) of the single drone. The edited first graphical code 3302 is used to add the virtual object drone to a formation, and the control logic code 3303 corresponding to the edited first graphical code 3302 includes the identification information (droneID) of the drone and the identification information (formationID) of the added formation.

[0282] The technical solution provided in the embodiment of the present application uses the first configuration information to construct a first correspondence table, that is, to establish a correspondence between a formation and a virtual object, and constructs a second correspondence table according to the third configuration information, that is, a correspondence between a virtual object and an instance. The identification information of the virtual object added to the formation can be found from the first object relationship table through the second configuration information, and then the instance information of the virtual object added to the formation can be found by searching the second correspondence table, thereby realizing control over the virtual object. The technical solution provided in the embodiment of the present application can realize rapid search for virtual objects, which is conducive to realizing unified control over virtual objects in the formation, thereby improving code execution efficiency.

[0283] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0284] Please refer to Fig.34 , which shows a block diagram of a graphical programming device provided by an embodiment of the present application. Fig.34 As shown, the device 3400 may include: an interface display module 3410 , a graphical code display module 3420 , and an operation module 3430 .

[0285] The interface display module 3410 is used to display the code editing interface of the graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects;

[0286] A graphical code display module 3420, configured to display an edited first graphical code in response to an edit operation on a first graphical code among the plurality of preset graphical codes, wherein the first graphical code is used to add at least one object to the same formation, and the edited first graphical code is used to add at least one object to the first formation;

[0287] The graphical code display module 3420 is further configured to, in response to an editing operation on a second graphical code among the plurality of preset graphical codes, display an edited second graphical code, wherein the second graphical code is used to uniformly control at least one object in the same formation, and the edited second graphical code is used to uniformly control at least one object in the first formation;

[0288] The running module 3430 is used to run the graphical programming result to control at least one object in the first formation, and the graphical programming result includes the edited first graphical code and the edited second graphical code.

[0289] In some embodiments, the first graphical code includes an object configuration area, and the object configuration area is used to configure at least one object to be added to the same formation.

[0290] In some embodiments, the graphical code display module 3420 is used to display an object selection interface in response to a trigger operation on the object configuration area in the first graphical code, wherein the object selection interface displays multiple elements, each element corresponding to an object.

[0291] The graphical code display module 3420 is used to display the edited first graphical code in response to a selection operation on at least one first element among the multiple elements, and the object corresponding to the at least one first element is added to the first formation.

[0292] In some embodiments, the selection operation includes a click operation on each of the first elements.

[0293] In some embodiments, the selection operation is a box selection operation starting from the first position and ending at the second position, and the element included in the box selection area constructed by the first position and the second position is the first element.

[0294] In some embodiments, the first element in a selected state is displayed separately from other elements in an unselected state; or, the object corresponding to the first element in a selected state is displayed separately from the objects corresponding to other elements in an unselected state in the virtual scene; or, the mark of the object corresponding to the first element in a selected state in a map navigation interface is displayed separately from the marks of the objects corresponding to other elements in an unselected state in the map navigation interface, wherein the map navigation interface displays a map of the virtual scene and the marks of each created object in the virtual scene in the map; or, the identifier of the object corresponding to the first element in a selected state in a function panel interface is displayed separately from the identifier of the object corresponding to other elements in an unselected state in the function panel interface, wherein the function panel interface is used to display configuration information corresponding to each created object in the virtual scene, and the configuration information includes the identifier of the object.

[0295] In some embodiments, Fig.35 As shown, the device also includes a state adjustment module 3440.

[0296] In some embodiments, the state adjustment module 3440 is used to respond to a trigger operation on the object configuration area in the first graphical code, and determine the states corresponding to the multiple elements according to the correspondence between the elements and the objects. When the element corresponds to an object created in the virtual scene, the element is in an unselected state; when the element does not correspond to an object created in the virtual scene, the element is in an uncreated state.

[0297] The state adjustment module 3440 is also used for, for the mth element among the multiple elements, when the mth element is selected and the state of the mth element is an uncreated state, not changing the state of the mth element; and when the mth element is selected and the state of the mth element is an unselected state, changing the state of the mth element to a selected state, where m is a positive integer.

[0298] The state adjustment module 3440 is further configured to change the state of the mth element to an unselected state when the mth element is deselected and the state of the mth element is a selected state.

[0299] In some embodiments, the first graphical code includes an object configuration area, and the object configuration area is used to configure at least one object to be added to the same formation.

[0300] In some embodiments, the graphical code display module 3420 is used to display a virtual scene interface in an editing state in response to a trigger operation on the object configuration area in the first graphical code, wherein the virtual scene interface displays a virtual scene and objects created in the virtual scene, and different objects have different positions in the virtual scene.

[0301] In some embodiments, the graphical code display module 3420 is used to display the edited first graphical code in response to a selection operation on at least one first object among the created objects, and the at least one first object is added to the first formation.

[0302] In some embodiments, the first graphical code also includes a formation configuration area, and the formation configuration area is used to configure the formation that the at least one object joins.

[0303] In some embodiments, the graphical code display module 3420 is also used to display a formation selection interface in response to a trigger operation on the formation configuration area in the first graphical code, wherein multiple formation numbers are displayed in the formation selection interface, and each formation number corresponds to a formation.

[0304] The graphical code display module 3420 is further used to display the edited first graphical code in response to a selection operation on a first formation number among the multiple formation numbers, and the formation corresponding to the first formation number is the first formation.

[0305] In some embodiments, the interface display module 3410 is also used to respond to a trigger operation on an object creation control in a function panel interface, and display configuration information corresponding to a newly added object in the function panel interface. The function panel interface is used to display configuration information corresponding to each created object in the virtual scene, and the configuration information includes an identifier of the object.

[0306] The interface display module 3410 is further configured to display the modified configuration information in response to a modification operation on the configuration information corresponding to the newly added object.

[0307] The interface display module 3410 is further configured to display the newly added object created based on the modified configuration information in the virtual scene.

[0308] In some embodiments, the function panel interface includes a search input field.

[0309] In some embodiments, the interface display module 3410 is further configured to display search information for the created object input in the search input bar in response to an input operation on the search input bar.

[0310] The interface display module 3410 is also used to display the configuration information corresponding to the object pointed to by the search information.

[0311] In some embodiments, the function panel interface includes tabs corresponding to each created object.

[0312] In some embodiments, the interface display module 3410 is also used to display configuration information corresponding to the object pointed to by the target tab in response to a selection operation of the target tab in the tabs corresponding to the respective created objects; or, in response to a deletion operation on the target tab, delete the object pointed to by the target tab from the virtual scene; or, in response to a formation setting operation on the target tab, change the formation to which the object pointed to by the target tab joins.

[0313] In some embodiments, the running module 3430 is used to run the graphical programming result to display the control process of at least one object in the first formation in the virtual scene.

[0314] In some embodiments, the interface display module 3410 is also used to display at least one of a scene control and a code editing control; the scene control is used to switch display of a virtual scene interface, the virtual scene interface includes a virtual scene and objects created in the virtual scene, and the code editing control is used to switch display of the code editing interface.

[0315] The interface display module 3410 is also used to run the graphical programming results, and in response to a triggering operation on the scene control, display the virtual scene interface, and display the control process of at least one object in the first formation in the virtual scene in the virtual scene interface.

[0316] The interface display module 3410 is further used to redisplay the code editing interface in response to a triggering operation on the code editing control, wherein the code editing interface includes the graphical programming result.

[0317] In some embodiments, the interface display module 3410 is also used to display a formation selection interface in response to a formation setting operation for a target object among the created objects in the virtual scene interface, wherein the formation selection interface includes multiple formation numbers, each formation number corresponding to a formation; in response to a selection operation for a second formation number among the multiple formation numbers, determine that the target object joins the formation corresponding to the second formation number.

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

[0319] Please refer to Fig.36 , which shows a block diagram of a computer device 3600 provided in one embodiment of the present application. The computer device 3600 may be any electronic device with data calculation, processing and storage capabilities. The computer device 3600 may be used to implement the graphical programming method provided in the above embodiment.

[0320] Typically, the computer device 3600 includes: a processor 3601 and a memory 3602 .

[0321] The processor 3601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 3601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 3601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 3601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 3601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

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

[0323] Those skilled in the art will understand that Fig.36 The structure shown in the figure does not constitute a limitation on the computer device 3600, and may include more or less components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0324] In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned graphical programming method is implemented. Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0325] In an exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program, the computer program being 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, so that the computer device executes the above-mentioned graphical programming method.

[0326] It should be noted that the relevant data collection and processing in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0327] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.

[0328] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A graphical programming method, It is characterized in that The method comprises: Displaying a code editing interface of a graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects; In response to an editing operation on a first graphical code among the plurality of preset graphical codes, displaying the edited first graphical code, wherein the first graphical code is used to add a plurality of objects to the same formation, and the edited first graphical code includes first configuration information, which is used to add the plurality of objects to the first formation; In response to an editing operation on a second graphical code among the plurality of preset graphical codes, an edited second graphical code is displayed, wherein the second graphical code is used to uniformly control a plurality of objects in a same formation; the edited second graphical code includes second configuration information, wherein the second configuration information includes identification information and control parameter information of the first formation, and the edited second graphical code is used to uniformly control a plurality of objects in the first formation, and when the code type of the edited second graphical code is the first type, the uniform control is instantaneous control, and the instantaneous control refers to modifying the attributes of the object; Running a graphical programming result to control a plurality of objects in the first formation, the graphical programming result comprising the edited first graphical code and the edited second graphical code; The running of the graphical programming result to control the multiple objects in the first formation includes: Through the second configuration information, the identification information of the object joining the first formation is found from the first correspondence table constructed using the first configuration information; by searching the second correspondence table constructed using the third configuration information, the instance information of the object joining the first formation is found; the first correspondence table includes the correspondence between formations and objects, the second correspondence table includes the correspondence between objects and instances, and the third configuration information is used to configure the virtual objects created in the virtual scene.

2. The method according to claim 1, It is characterized in that The first graphical code includes an object configuration area, and the object configuration area is used to configure multiple objects added to the same formation; In response to the editing operation on the first graphical code among the plurality of preset graphical codes, displaying the edited first graphical code comprises: In response to a trigger operation on the object configuration area in the first graphical code, an object selection interface is displayed, wherein a plurality of elements are displayed in the object selection interface, each element corresponding to an object; In response to a selection operation on a plurality of first elements among the plurality of elements, the edited first graphical code is displayed, and objects corresponding to the plurality of first elements are added to the first formation.

3. The method according to claim 2, It is characterized in that The selection operation includes a click operation on each of the first elements.

4. The method according to claim 2, It is characterized in that The selection operation is a frame selection operation starting from the first position and ending at the second position, and the element included in the frame selection area constructed by the first position and the second position is the first element.

5. The method according to claim 2, It is characterized in that The first element in the selected state is displayed separately from other elements in the unselected state; or, The object corresponding to the first element in the selected state and the objects corresponding to other elements in the unselected state are displayed separately in the virtual scene; or, The mark of the object corresponding to the first element in the selected state in the map navigation interface is displayed separately from the marks of the objects corresponding to other elements in the unselected state in the map navigation interface, wherein the map navigation interface displays a map of the virtual scene and the marks of each created object in the virtual scene in the map; or, The identifier of the object corresponding to the first element in a selected state in the function panel interface is displayed separately from the identifiers of the objects corresponding to other elements in an unselected state in the function panel interface, wherein the function panel interface is used to display the configuration information corresponding to each created object in the virtual scene, and the configuration information includes the identifier of the object.

6. The method according to claim 2, It is characterized in that The method further comprises: In response to a trigger operation on the object configuration area in the first graphical code, determining states corresponding to the plurality of elements according to a correspondence between elements and objects, wherein when the element corresponds to an object that has been created in the virtual scene, the element is in an unselected state, and when the element does not correspond to an object that has been created in the virtual scene, the element is in an uncreated state; For an mth element among the multiple elements, when the mth element is selected and the state of the mth element is an uncreated state, the state of the mth element is not changed; when the mth element is selected and the state of the mth element is an unselected state, the state of the mth element is changed to a selected state, where m is a positive integer; When the m-th element is deselected and the state of the m-th element is a selected state, the state of the m-th element is changed to an unselected state.

7. The method according to claim 1, It is characterized in that The first graphical code includes an object configuration area, and the object configuration area is used to configure multiple objects added to the same formation; In response to the editing operation on the first graphical code among the plurality of preset graphical codes, displaying the edited first graphical code comprises: In response to a trigger operation on the object configuration area in the first graphical code, a virtual scene interface in an editing state is displayed, wherein the virtual scene interface displays a virtual scene and objects created in the virtual scene, and different objects have different positions in the virtual scene; In response to a selection operation on a plurality of first objects among the created objects, the edited first graphical code is displayed, and the plurality of first objects are added to the first formation.

8. The method according to claim 2 or 7, It is characterized in that The first graphical code also includes a formation configuration area, and the formation configuration area is used to configure the formations to be joined by the multiple objects; the method also includes: In response to a trigger operation on the formation configuration area in the first graphical code, a formation selection interface is displayed, wherein a plurality of formation numbers are displayed in the formation selection interface, and each formation number corresponds to a formation; In response to a selection operation on a first formation number among the multiple formation numbers, the edited first graphical code is displayed, and the formation corresponding to the first formation number is the first formation.

9. The method according to claim 1, It is characterized in that The method further comprises: In response to a trigger operation on an object creation control in a function panel interface, configuration information corresponding to a newly added object is displayed in the function panel interface, wherein the function panel interface is used to display configuration information corresponding to each created object in a virtual scene; In response to a modification operation on the configuration information corresponding to the newly added object, displaying the modified configuration information; The newly added object created based on the modified configuration information is displayed in the virtual scene.

10. The method according to claim 9, It is characterized in that The function panel interface includes a search input bar; the method further includes: In response to an input operation on the search input bar, displaying search information for the created object input in the search input bar; Display the configuration information corresponding to the object pointed to by the search information.

11. The method according to claim 9, It is characterized in that The function panel interface includes tabs corresponding to each created object; the method further includes: In response to a selection operation of a target tab in the tabs corresponding to the created objects, displaying configuration information corresponding to the object pointed to by the target tab; or In response to a deletion operation on the target tab, the object pointed to by the target tab is deleted from the virtual scene; or, In response to a team setting operation for the target tab, the team to which the object pointed to by the target tab joins is changed.

12. The method according to claim 1, It is characterized in that The running of the graphical programming result to control the multiple objects in the first formation includes: The graphical programming result is run to display the control process of the multiple objects in the first formation in the virtual scene.

13. The method according to claim 12, It is characterized in that The method further comprises: Display at least one of a scene control and a code editing control; the scene control is used to switch and display a virtual scene interface, the virtual scene interface includes a virtual scene and objects created in the virtual scene, and the code editing control is used to switch and display the code editing interface; The step of running the graphical programming result to display the control process of the plurality of objects in the first formation in a virtual scene includes: Running the graphical programming result, in response to a triggering operation on the scene control, displaying the virtual scene interface, and displaying the control process of the plurality of objects in the first formation in the virtual scene in the virtual scene interface; The method further comprises: In response to a triggering operation on the code editing control, the code editing interface is redisplayed, the code editing interface including the graphical programming result.

14. The method according to claim 13, It is characterized in that The method further comprises: In response to a formation setting operation for a target object among the objects created in the virtual scene interface, displaying a formation selection interface, wherein the formation selection interface includes a plurality of formation numbers, each formation number corresponding to a formation; In response to a selection operation on a second formation number among the multiple formation numbers, it is determined that the target object joins the formation corresponding to the second formation number.

15. A graphical programming device, It is characterized in that The device comprises: An interface display module, used to display a code editing interface of a graphical programming tool, wherein the code editing interface includes a plurality of preset graphical codes, and the graphical codes are used to process one or more objects; a graphical code display module, configured to display an edited first graphical code in response to an edit operation on a first graphical code among the plurality of preset graphical codes, wherein the first graphical code is used to add a plurality of objects to the same formation, and the edited first graphical code includes first configuration information for adding the plurality of objects to the first formation; The graphical code display module is further used to respond to an editing operation on a second graphical code among the plurality of preset graphical codes, and display an edited second graphical code, wherein the second graphical code is used to uniformly control a plurality of objects in a same formation; the edited second graphical code includes second configuration information, wherein the second configuration information includes identification information and control parameter information of the first formation, and the edited second graphical code is used to uniformly control a plurality of objects in the first formation, and when the code type of the edited second graphical code is the first type, the uniform control is instantaneous control, and the instantaneous control refers to modifying the attributes of the object; An operation module, used for operating a graphical programming result to control a plurality of objects in the first formation, wherein the graphical programming result includes the edited first graphical code and the edited second graphical code; The running of the graphical programming result to control the multiple objects in the first formation includes: Through the second configuration information, the identification information of the object joining the first formation is found from the first correspondence table constructed using the first configuration information; by searching the second correspondence table constructed using the third configuration information, the instance information of the object joining the first formation is found; the first correspondence table includes the correspondence between formations and objects, the second correspondence table includes the correspondence between objects and instances, and the third configuration information is used to configure the virtual objects created in the virtual scene.

16. The device according to claim 15, It is characterized in that The first graphical code includes an object configuration area, and the object configuration area is used to configure multiple objects added to the same formation; the graphical code display module is used to: In response to a trigger operation on the object configuration area in the first graphical code, an object selection interface is displayed, wherein a plurality of elements are displayed in the object selection interface, each element corresponding to an object; In response to a selection operation on a plurality of first elements among the plurality of elements, the edited first graphical code is displayed, and objects corresponding to the plurality of first elements are added to the first formation.

17. The device according to claim 16, It is characterized in that The selection operation includes a click operation on each of the first elements.

18. The device according to claim 16, It is characterized in that The selection operation is a frame selection operation starting from the first position and ending at the second position, and the element included in the frame selection area constructed by the first position and the second position is the first element.

19. The device according to claim 16, It is characterized in that The first element in the selected state is displayed separately from other elements in the unselected state; or, The object corresponding to the first element in the selected state and the objects corresponding to other elements in the unselected state are displayed separately in the virtual scene; or, The mark of the object corresponding to the first element in the selected state in the map navigation interface is displayed separately from the marks of the objects corresponding to other elements in the unselected state in the map navigation interface, wherein the map navigation interface displays a map of the virtual scene and the marks of each created object in the virtual scene in the map; or, The identifier of the object corresponding to the first element in a selected state in the function panel interface is displayed separately from the identifiers of the objects corresponding to other elements in an unselected state in the function panel interface, wherein the function panel interface is used to display the configuration information corresponding to each created object in the virtual scene, and the configuration information includes the identifier of the object.

20. The device according to claim 16, It is characterized in that The device also includes a state adjustment module, which is used to: In response to a trigger operation on the object configuration area in the first graphical code, determining states corresponding to the plurality of elements according to a correspondence between elements and objects, wherein when the element corresponds to an object that has been created in the virtual scene, the element is in an unselected state, and when the element does not correspond to an object that has been created in the virtual scene, the element is in an uncreated state; For an mth element among the multiple elements, when the mth element is selected and the state of the mth element is an uncreated state, the state of the mth element is not changed; when the mth element is selected and the state of the mth element is an unselected state, the state of the mth element is changed to a selected state, where m is a positive integer; When the m-th element is deselected and the state of the m-th element is a selected state, the state of the m-th element is changed to an unselected state.

21. The device according to claim 15, It is characterized in that The first graphical code includes an object configuration area, and the object configuration area is used to configure multiple objects added to the same formation; the graphical code display module is used to: In response to a trigger operation on the object configuration area in the first graphical code, a virtual scene interface in an editing state is displayed, wherein the virtual scene interface displays a virtual scene and objects created in the virtual scene, and different objects have different positions in the virtual scene; In response to a selection operation on a plurality of first objects among the created objects, the edited first graphical code is displayed, and the plurality of first objects are added to the first formation.

22. The device according to claim 16 or 21, It is characterized in that The first graphical code also includes a formation configuration area, and the formation configuration area is used to configure the formations to be joined by the multiple objects; the graphical code display module is also used to: In response to a trigger operation on the formation configuration area in the first graphical code, a formation selection interface is displayed, wherein a plurality of formation numbers are displayed in the formation selection interface, and each formation number corresponds to a formation; In response to a selection operation on a first formation number among the multiple formation numbers, the edited first graphical code is displayed, and the formation corresponding to the first formation number is the first formation.

23. The device according to claim 15, It is characterized in that The interface display module is also used for: In response to a trigger operation on an object creation control in a function panel interface, configuration information corresponding to a newly added object is displayed in the function panel interface, wherein the function panel interface is used to display configuration information corresponding to each created object in a virtual scene; In response to a modification operation on the configuration information corresponding to the newly added object, displaying the modified configuration information; The newly added object created based on the modified configuration information is displayed in the virtual scene.

24. The device according to claim 23, It is characterized in that The function panel interface includes a search input bar; the interface display module is also used to: In response to an input operation on the search input bar, displaying search information for the created object input in the search input bar; Display the configuration information corresponding to the object pointed to by the search information.

25. The device according to claim 23, It is characterized in that The function panel interface includes tabs corresponding to each created object; the interface display module is also used to: In response to a selection operation of a target tab in the tabs corresponding to the created objects, displaying configuration information corresponding to the object pointed to by the target tab; or, In response to a deletion operation on the target tab, deleting the object pointed to by the target tab from the virtual scene; or, In response to a team setting operation for the target tab, the team to which the object pointed to by the target tab joins is changed.

26. The device according to claim 15, It is characterized in that The operation module is used to: The graphical programming result is run to display the control process of the multiple objects in the first formation in the virtual scene.

27. The device according to claim 16, It is characterized in that The interface display module is further used to display at least one of a scene control and a code editing control; the scene control is used to switch and display a virtual scene interface, the virtual scene interface includes a virtual scene and objects created in the virtual scene, and the code editing control is used to switch and display the code editing interface; The interface display module is further used to run the graphical programming result, and in response to a triggering operation on the scene control, display the virtual scene interface, and display the control process of the multiple objects in the first formation in the virtual scene in the virtual scene interface; The interface display module is further used to redisplay the code editing interface in response to a triggering operation on the code editing control, wherein the code editing interface includes the graphical programming result.

28. The device according to claim 27, It is characterized in that The interface display module is also used for: In response to a formation setting operation for a target object among the objects created in the virtual scene interface, displaying a formation selection interface, wherein the formation selection interface includes a plurality of formation numbers, each formation number corresponding to a formation; In response to a selection operation on a second formation number among the multiple formation numbers, it is determined that the target object joins the formation corresponding to the second formation number.

29. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the graphical programming method according to any one of claims 1 to 14.

30. A computer readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the graphical programming method according to any one of claims 1 to 14.

31. A computer program product, It is characterized in that The computer program product comprises a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the graphical programming method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Control method and device of object in game, computer equipment and storage medium

    CN110354494A

  • Controlling device and drone controlling method

    CN110825121A

  • Object-based multi-granularity formation motion visualization method

    CN113535872A

  • Unmanned underwater vehicle formation control simulation method, system and equipment

    CN116841208A

  • Formation control method and device in game and electronic equipment

    CN117046100A