CN118132059A - Graphical programming method, device, equipment and storage medium - Google Patents

Graphical programming method, device, equipment and storage medium Download PDF

Info

Publication number
CN118132059A
CN118132059A CN202410341037.4A CN202410341037A CN118132059A CN 118132059 A CN118132059 A CN 118132059A CN 202410341037 A CN202410341037 A CN 202410341037A CN 118132059 A CN118132059 A CN 118132059A
Authority
CN
China
Prior art keywords
graphical
formation
code
graphical code
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410341037.4A
Other languages
Chinese (zh)
Other versions
CN118132059B (en
Inventor
吴企帅
王兴
王博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202410341037.4A priority Critical patent/CN118132059B/en
Publication of CN118132059A publication Critical patent/CN118132059A/en
Application granted granted Critical
Publication of CN118132059B publication Critical patent/CN118132059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a graphical programming method, a graphical programming device, graphical programming equipment and a graphical programming storage medium, and relates to the technical field of computers. The method comprises the following steps: displaying a code editing interface of the graphical programming tool, wherein the code editing interface comprises a plurality of preset graphical codes; responding to the editing operation of a first graphical code in a plurality of preset graphical codes, displaying the edited first graphical code, wherein the edited first graphical code is used for adding at least one object into a first formation; responding to the editing operation of a second graphical code in a plurality of preset graphical codes, and displaying the edited second graphical code; and running a graphical programming result to control at least one object in the first formation, wherein the graphical programming result comprises the edited first graphical code and the edited second graphical code. The method improves programming efficiency.

Description

图形化编程方法、装置、设备及存储介质Graphical programming method, device, equipment and storage medium

技术领域Technical Field

本申请涉及计算机技术领域,特别涉及一种图形化编程方法、装置、设备及存储介质。The present application relates to the field of computer technology, and in particular to a graphical programming method, apparatus, device and storage medium.

背景技术Background technique

随着计算机技术的发展,利用图形化积木来进行图形化编程的技术日益成熟。图形化积木也可以理解为图形化代码,其中封装有编程语言。用户拖动图形化积木即可实现图形化编程。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.

相关技术中,当需要对多个对象分别进行控制时,一般是为每一个对象分别进行一次图形化编程。即使多个对象所要执行的动作是一致的,也即控制多个对象实现相同的控制逻辑(如均需向左移动5米)时,也需要对各个对象分别进行编程。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.

因此,上述相关技术中,当控制多个对象实现相同的控制逻辑时,仍然需要对多个对象分别进行编程,也即出现了重复编程,从而导致编程效率较低。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

本申请实施例提供了一种图形化编程方法、装置、设备及存储介质,能够提升图形化编程效率。本申请提出的技术方案如下: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:

根据本申请实施例的一个方面,提供了一种图形化编程方法,所述方法包括:According to one aspect of an embodiment of the present application, a graphical programming method is provided, the method comprising:

显示图形化编程工具的代码编辑界面,所述代码编辑界面中包括多个预设的图形化代码,所述图形化代码用于对一个或多个对象进行处理;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 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;

响应于针对所述多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,所述第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,所述编辑后的第二图形化代码用于对所述第一编队中的至少一个对象进行统一控制;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;

运行图形化编程结果,以对所述第一编队中的至少一个对象进行控制,所述图形化编程结果包括所述编辑后的第一图形化代码和所述编辑后的第二图形化代码。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.

根据本申请实施例的一个方面,提供了一种图形化编程装置,所述装置包括:According to one aspect of an embodiment of the present application, a graphical programming device is provided, the device comprising:

界面显示模块,用于显示图形化编程工具的代码编辑界面,所述代码编辑界面中包括多个预设的图形化代码,所述图形化代码用于对一个或多个对象进行处理;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 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;

所述图形化代码显示模块,还用于响应于针对所述多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,所述第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,所述编辑后的第二图形化代码用于对所述第一编队中的至少一个对象进行统一控制;The graphical code display module is further used to display the edited second graphical code in response to an editing operation on a second graphical code among the plurality of preset graphical codes, 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;

运行模块,用于运行图形化编程结果,以对所述第一编队中的至少一个对象进行控制,所述图形化编程结果包括所述编辑后的第一图形化代码和所述编辑后的第二图形化代码。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.

根据本申请实施例的一个方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现上述图形化编程方法。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.

根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述图形化编程方法。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.

根据本申请实施例的一个方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序由处理器加载并执行以实现上述图形化编程方法。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.

本申请实施例提供的技术方案可以带来如下有益效果:The technical solution provided in the embodiments of the present application can bring the following beneficial effects:

通过在图形化编程工具的代码编辑界面,对第一图形化代码进行编辑,能够将至少一个对象加入第一编队,通过对第二图形化代码进行编辑,编辑后的第二图形化代码用于对第一编队中的至少一个对象进行统一控制,运行包括该编辑后的第一图形化代码和编辑后的第二图形化代码的图形化编程结果,能够实现对于加入该第一编队的至少一个对象的统一控制。本申请实施例提供的技术方案,通过第一图形化代码将需要执行相同代码逻辑的对象编入第一编队,使得加入第一编队的至少一个对象共用同一个编辑后的第二图形化代码,无需重复编程,提高编程效率。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

图1是本申请一个实施例提供的方案实施环境的示意图;FIG1 is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;

图2是相关技术提供的图形化编程方法的界面图;FIG2 is an interface diagram of a graphical programming method provided by the related art;

图3是相关技术提供的图形化编程方法的界面图;FIG3 is an interface diagram of a graphical programming method provided by the related art;

图4是相关技术提供的图形化编程方法的界面图;FIG4 is an interface diagram of a graphical programming method provided by the related art;

图5是相关技术提供的图形化编程方法的界面图;FIG5 is an interface diagram of a graphical programming method provided by the related art;

图6是相关技术提供的图形化编程方法的界面图;FIG6 is an interface diagram of a graphical programming method provided by the related art;

图7是相关技术提供的图形化编程方法的界面图;FIG7 is an interface diagram of a graphical programming method provided by the related art;

图8是本申请一个实施例提供的图形化编程方法的界面图;FIG8 is an interface diagram of a graphical programming method provided by an embodiment of the present application;

图9是本申请另一个实施例提供的图形化编程方法的界面图;FIG9 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

图10是本申请一个实施例提供的虚拟场景界面的示意图;FIG10 is a schematic diagram of a virtual scene interface provided by an embodiment of the present application;

图11是本申请一个实施例提供的代码编辑界面的示意图;FIG11 is a schematic diagram of a code editing interface provided by an embodiment of the present application;

图12是本申请一个实施例提供的图形化编程方法的流程图;FIG12 is a flowchart of a graphical programming method provided by one embodiment of the present application;

图13是本申请另一个实施例提供的图形化编程方法的界面图;FIG13 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

图14是本申请另一个实施例提供的图形化编程方法的界面图;FIG14 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

图15是本申请另一个实施例提供的图形化编程方法的流程图;FIG15 is a flowchart of a graphical programming method provided by another embodiment of the present application;

图16是本申请一个实施例提供的对象选择方法的示意图;FIG16 is a schematic diagram of an object selection method provided by an embodiment of the present application;

图17是本申请另一个实施例提供的对象选择方法的示意图;FIG17 is a schematic diagram of an object selection method provided by another embodiment of the present application;

图18是本申请另一个实施例提供的图形化编程方法的界面图;FIG18 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

图19是本申请另一个实施例提供的图形化编程方法的界面图;FIG19 is an interface diagram of a graphical programming method provided by another embodiment of the present application;

图20是本申请一个实施例提供的对象状态更新方法的框图;FIG20 is a block diagram of an object status updating method provided by an embodiment of the present application;

图21是本申请另一个实施例提供的对象状态更新方法的框图;FIG21 is a block diagram of an object status updating method provided by another embodiment of the present application;

图22是本申请另一个实施例提供的对象状态更新方法的框图;FIG22 is a block diagram of an object status updating method provided by another embodiment of the present application;

图23是本申请一个实施例提供的代码运行的示意图;FIG23 is a schematic diagram of code operation provided by an embodiment of the present application;

图24是本申请一个实施例提供的界面切换的示意图;FIG24 is a schematic diagram of interface switching provided by an embodiment of the present application;

图25是本申请另一个实施例提供的图形化编程方法的流程图;FIG25 is a flowchart of a graphical programming method provided by another embodiment of the present application;

图26是本申请一个实施例提供的功能面板界面的示意图;FIG26 is a schematic diagram of a function panel interface provided by an embodiment of the present application;

图27是本申请另一个实施例提供的功能面板界面的示意图;FIG27 is a schematic diagram of a function panel interface provided by another embodiment of the present application;

图28是本申请一个实施例提供的图形化代码的执行方法的流程图;FIG28 is a flowchart of a method for executing a graphical code according to an embodiment of the present application;

图29是本申请另一个实施例提供的图形化代码的执行方法的流程图;FIG29 is a flowchart of a method for executing a graphical code according to another embodiment of the present application;

图30是本申请另一个实施例提供的图形化代码的执行方法的流程图;FIG30 is a flowchart of a method for executing a graphical code according to another embodiment of the present application;

图31是本申请一个实施例提供的编译流程的示意图;FIG31 is a schematic diagram of a compilation process provided by an embodiment of the present application;

图32是本申请一个实施例提供的组件结构的示意图;FIG32 is a schematic diagram of a component structure provided by an embodiment of the present application;

图33是本申请一个实施例提供的代码示意图;FIG33 is a schematic diagram of a code provided by an embodiment of the present application;

图34是本申请一个实施例提供的图形化编程装置的框图;FIG34 is a block diagram of a graphical programming device provided by one embodiment of the present application;

图35是本申请另一个实施例提供的图形化编程装置的框图;FIG35 is a block diagram of a graphical programming device provided by another embodiment of the present application;

图36是本申请一个实施例提供的计算机设备的结构框图。FIG36 is a structural block diagram of a computer device provided in one embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

在介绍本申请技术方案之前,先对本申请涉及的一些名词进行解释说明。以下相关解释作为可选方案与本申请实施例的技术方案可以进行任意结合,其均属于本申请实施例的保护范围。本申请实施例包括以下内容中的至少部分内容。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.

图形化编程:将编程语言封装在图形化积木中,拖动积木块进行搭建即可完成编程,一般应用于青少年或初学者群体的编程学习。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.

IDE(Integrated Development Environment,集成开发环境):用于给应用程序提供开发环境,一般包括代码编辑器、编译器、调试器和图形用户界面等工具。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.

虚拟场景:图形化编程工具中一种带有虚拟场景非运行静态和运行态下展示的模式。Virtual scene: A mode in a graphical programming tool that displays a virtual scene in non-running static and running states.

代码编辑:图形化编程工具中一种展示图形化积木代码,用户可添加、删除、编写代码并运行的模式。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.

请参考图1,其示出了本申请一个实施例提供的方案实施环境的示意图。该方案实施环境可以包括:终端设备10和服务器20。Please refer to FIG1 , 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 .

终端设备10包括但不限于手机、平板电脑、智能语音交互设备、游戏主机、可穿戴设备、多媒体播放设备、PC(Personal Computer,个人计算机)、车载终端、智能家电等电子设备。终端设备10中可以安装目标应用程序的客户端。可选地,该目标应用程序可以是需要下载安装的应用程序,也可以是即点即用的应用程序,本申请实施例对此不作限定。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.

在本申请实施例中,上述目标应用程序可以是具有编程功能的应用程序,如该目标应用程序中提供有集成开发环境,在该集成开发环境中用户可以编写代码、编译代码以及运行代码。示例性地,该目标应用程序中包括图形化编程工具。示例性地,该图形化编程工具中提供有多个预设的图形化代码(也即图形化积木),该目标应用程序可以将编程语言封装在该图形化代码中,让该图形化代码以积木或者其他图形形式展现给用户,用户能够拖动这些图形化代码,以实现编程。示例性地,该目标应用程序可以直接获取以封装好的图形化代码,直接提供给用户使用。本申请对于目标应用程序具体具有的功能不作限定。该目标应用程序的种类可以是测试类应用程序、开发类应用程序、游戏类应用程序、虚拟现实(Virtual Reality,简称VR)类应用程序、增强现实(Augmented Reality,简称AR)类应用程序等,本申请实施例对目标应用程序的具体类别不作限定。在另一些实施例中,该目标应用程序可以认为是单独的功能模块,如实现成为待开发应用程序中的其中一个功能模块。示例性地,终端设备10中运行有上述目标应用程序的客户端。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 .

服务器20用于为终端设备10中的目标应用程序的客户端提供后台服务。例如,服务器20可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器,但并不局限于此。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.

终端设备10和服务器20之间可通过网络进行互相通信。该网络可以是有线网络,也可以是无线网络。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.

本申请实施例提供的方法,各步骤的执行主体可以是计算机设备。计算机设备可以是任何具备数据的存储和处理能力的电子设备。例如,计算机设备可以是图1中的终端设备10,也可以是服务器20。In 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 the terminal device 10 in FIG. 1 , or may be the server 20.

下面以对象为虚拟无人机为例,作以下简要说明。随着人工智能的发展,立足于图形化编程工具的编程方法日益成熟。一些应用程序所提供的图形化编程工具不依赖于硬件环境,仅需要网络,且标准化程度高。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 are highly standardized.

然而,相关技术中,对于涉及到需要对多个对象进行编组实现整体一致的运行效果时,只能是对不同的对象分别进行代码的复制编写,流程较繁琐重复同时也会增加积木代码数量,不利于积木代码编写效率的提升。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.

在一些实施例中,如图2所示,相关技术中一种图形化编程工具提供的用户界面200中包括积木区、编辑区、舞台区以及素材区,界面布局相对固定,用户根据自己的需要在积木区中挑选积木,编辑区中拼接积木,并且从素材区中选定素材后,点击运行按钮即可在舞台区中预览效果。当然,如果想要对不同对象实现相同的运行效果,在实际编程过程中需要切换不同的对象分别进行代码的添加编写。In some embodiments, as shown in FIG. 2 , 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.

在一些实施例中,如图3所示,当想要控制对象300时,需要在编辑区拼接积木,得到控制对象300的积木代码301。在一些实施例中,如图4所示,当想要控制对象400时,需要在编辑区拼接积木,得到控制对象400的积木代码401。即使需要控制对象300和对象400实现相同的运行效果,在实际编代码的过程中,也需要切换不同的对象分别进行代码的添加和编写。In some embodiments, as shown in FIG3 , when you want to control object 300, you need to assemble blocks in the editing area to obtain block code 301 for controlling object 300. In some embodiments, as shown in FIG4 , when you want to control object 400, you need to assemble blocks in the editing area to obtain block code 401 for controlling 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 between different objects to add and write code respectively.

在一些实施例中,如图5所示,相关技术中另一种图形化编程工具提供的用户界面500中包括舞台区、素材区、积木预设区以及积木编辑区。界面布局相对固定,用户根据自己的需要在积木预设区中挑选积木,积木编辑区中拼接积木,并且从素材区中选定素材后,点击运行按钮即可在舞台区中预览效果。当然,如果想要对不同对象实现相同的运行效果,在实际编程过程中也需要切换不同的对象分别进行代码的添加编写。In some embodiments, as shown in FIG5 , 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, and the user selects blocks in the block preset area according to their needs, splices blocks in the block editing area, and after selecting materials from the material area, clicks 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 separately.

在一些实施例中,如图6所示,当想要控制对象600时,需要在编辑区拼接积木,得到控制对象600的积木代码601。在一些实施例中,如图7所示,当想要控制对象700时,需要在编辑区拼接积木,得到控制对象700的积木代码701。即使需要控制对象600和对象700实现相同的运行效果,在实际编代码的过程中,也需要切换不同的对象分别进行代码的添加和编写。In some embodiments, as shown in FIG6 , when you want to control object 600, you need to assemble blocks in the editing area to obtain a block code 601 for controlling object 600. In some embodiments, as shown in FIG7 , when you want to control object 700, you need to assemble blocks in the editing area to obtain a block code 701 for controlling object 700. Even if you want to control object 600 and object 700 to achieve the same operating effect, in the actual coding process, you need to switch between different objects to add and write codes respectively.

上述相关技术中无法仅使用一套积木代码来实现对多个舞台区中的对象进行控制,编写代码过程中如果想要实现对多个对象进行整体统一的运行效果需要重复编写多套代码,流程繁琐复杂;另外,在查看和修改针对不同对像的代码时需要来回切换到不同的对象,大大降低了调试(查看修改代码)的效率。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).

本申请实施例提供的技术方案,在积木预设区开创性地提供可同时控制多台无人机加入编队的积木代码,用户可以根据实际利用该积木将多台无人机加入编队,并使用一套代码来完成对整个无人机编队的飞行控制,提升编写代码的效率,从而实现虚拟无人机的群组控制、互联表演、编队飞行。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.

本申请提供了一套积木来同时控制多个虚拟无人机的编队控制、互联表演、编队飞行等飞行状态,用户仅需要添加一套积木代码并通过修改积木代码的参数将该代码制定到多个虚拟无人机组成的编队上,从而简化代码编写流程,提升编写效率。规避在调试时(查看和修改积木代码)需要在不同对像之间来回切换的繁琐操作,提升调试效率。调整参数的过程中在交互形式上支持通过框选的方式来提升选中并编组多个无人机的效率。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.

在介绍本申请具体的方法之前,先对本申请中的应用于图形化编程工具的图形化编程方法的应用场景作示例性说明。当然应当知道的是,下述应用场景仅为举例说明,实际并不仅限于此。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.

在一些实施例中,本申请实施例中的图形化编程方法和代码执行方法,可以用于UGC(User generated content,用户原创内容)领域中。示例性地,UGC是指用户可以将自己原创的内容展示或者提供给其他用户。示例性地,UGC可以运用在游戏领域中,动画制作领域、自媒体领域等等。示例性地,仅以在游戏领域中的UGC为例,结合本申请中提及的图形化编程方法以及下述代码执行方法作具体说明。示例性地,目标应用程序是允许用户对游戏进行自定义的应用程序,如该目标应用程序中提供有允许用户对游戏进行自定义的界面,称为游戏自定义界面。在该游戏自定义界面中显示有多个预设的图形化代码,图形化代码用于对一个或多个对象进行处理。当然,这里的对象包括但不限于任何可控制的对象,如该对象为虚拟场景中的对象,如虚拟动物、虚拟植物、虚拟小汽车、虚拟建筑等等,这些对象是用户想要自定义的游戏中可能出现的对象。在一些实施例中,响应于针对多个预设的图形化代码中第一图形化代码的编辑操作,显示编辑后的第一图形化代码,第一图形化代码用于将至少一个对象加入同一个编队,编辑后的第一图形化代码用于将至少一个对象加入第一编队。示例性地,将多个虚拟星星编入同一个编队,控制其移动方向。示例性地,将多个虚拟植物编入同一个编队,控制其生长方向和生长速度。在一些实施例中,响应于针对多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,编辑后的第二图形化代码用于对第一编队中的至少一个对象进行统一控制。示例性地,用户通过对第二图形化代码进行编辑,能够实现对于编队中各个对象的统一控制。在一些实施例中,在用户对第一图形化代码和第二图形化代码进行编辑之后,运行包括该编辑后的第一图形化代码和编辑后的第二图形化代码的图形化编程结果,以对第一编队中的至少一个对象进行控制。示例性地,当用户点击运行之后,执行下述代码执行方法,可以看到由用户自行构建的虚拟场景,且该虚拟场景中的对象发生运动,如街道上一队虚拟小汽车朝着用户自定义的方向行驶,天空中的多个虚拟小鸟沿着由用户自定义的轨迹飞行。用户可以通过图形化编程,来构建游戏场景、游戏关卡等等。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 taking UGC in the field of games as an example, 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.

在一些实施例中,利用本申请实施例中的图形化编程方法,进行动画开发。开发人员在目标应用程序中,新增场景,且增加多个动画对象,并对每个动画对象进行配置,利用图形化积木代码来对这些动画对象进行控制,包括进行编队,利用第二图形化代码对编队中的动画对象进行控制。示例性地,该图形化编程工具中还提供有预览界面,预览界面中可以在运行该图形化编程结果的同时,来预览到对各个动画对象的控制过程。示例性地,当预览界面中呈现的动画符合预期时,直接将预览到的动画作为生成的动画。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.

在另一些实施例中,利用本申请实施例中的图形化编程方法,进行虚拟无人机控制。示例性地,目标应用程序提供虚拟的无人机飞行环境和无人机。示例性地,通过图形化积木代码来控制组合无人机编队组合并实现编队的互联表演、飞行等动态变化。示例性地,在积木预设区开创性地提供可同时控制多台无人机加入编队的积木代码(也即第二图形化代码),用户可以根据实际利用该积木将多台无人机加入编队,并使用一套代码来完成对整个无人机编队的飞行控制,提升编写代码的效率,从而实现虚拟无人机的编队控制、互联表演、编队飞行等。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.

在一些实施例中,利用本申请实施例中的图形化编程方法,进行实际对象控制。示例性地,将多个实际对象(如多个真实的玩具、无人机、灯泡)等等的具体参数导入目标应用程序中,并将多个实际对象和该目标应用程序所在的终端设备进行绑定。示例性地,通过图形化积木代码来控制组合该多个实际对象编队组合并实现编队的互联表演、飞行等动态变化。示例性地,根据第二图形化代码将多个实际对象加入编队,当运行该第二图形化代码时,给多个实际对象发送控制信号,控制该实际对象执行相应的动作,实现了使用一套代码来完成对多个实际对象的共同控制,提高编程的效率。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 the dynamic changes of the interconnected performances, flights, etc. 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 the efficiency of programming.

下面以对象为虚拟无人机为例,结合附图对本申请的具体应用场景作示例性说明。The following takes a virtual drone as an example to illustrate the specific application scenarios of the present application in combination with the accompanying drawings.

在一些实施例中,如图8所示,在目标应用程序中提供有用户下载界面800,当用户点击购买该目标应用程序时,能够使用该目标应用程序所提供的编程功能。当然,也可以无需用户购买,而免费提供给用户下载使用。当用户拥有使用该目标应用程序的权限之后,显示功能选择界面801,用户可以在该功能选择界面801中选择仿真编程802。当用户选择了仿真编程802之后,显示用户登录界面803。用户可以选择的不同的账号登录该目标应用程序。当用户登录进该目标应用程序之后,显示编程模式选择界面804,在该界面中用户可以选择图形化编程,也可以选择其他编程模式,本申请对此不作限定。In some embodiments, as shown in Figure 8, 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.

在一些实施例中,如图9所示,在用户选择了图形化编程之后,显示对象数量选择界面900,用户可以自行配置对象的数量,如仅配置一台无人机。示例性地,在用户配置完对象的数量之后,显示场景选择界面901,用户可以自行配置对象所在的场景,如配置场景为xx智慧城市。在用户配置完对象和场景之后,显示虚拟场景界面902,该虚拟场景界面中显示有该虚拟场景以及在该场景中创建的对象903。In some embodiments, as shown in FIG9 , 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.

在一些实施例中,如图10所示,该图形化编程工具提供的用户界面中包括虚拟场景界面1000。在一些实施例中,虚拟场景界面1000中包括场景区、导航工具栏、地图导航区、功能面板区。In some embodiments, as shown in Figure 10, 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.

在一些实施例中,如图11所示,对于该图形化编程工具提供的用户界面中还包括代码编辑界面1100。在一些实施例中,代码编辑界面1100中包括积木预设区、积木编辑区、导航工具栏、地图导航区、功能面板区。In some embodiments, as shown in Figure 11, 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.

在一些实施例中,用户可以在代码编辑界面1100中拖拽预设的积木代码并进行编辑,以得到编辑后的积木代码。当运行编辑后的积木代码时,可以在虚拟场景界面1000中看到在虚拟场景中对该对象的控制过程。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.

本申请实施例提供的技术方案中在积木预设区预设了第一图形化代码和第二图形化代码,通过第一图形化代码实现了将至少一个对象加入同一个编队,通过第二图形化代码实现了对于加入同一个编队的至少一个对象的统一控制。避免了代码的重复编写,加快了代码的编写效率。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.

以上是与本申请有关的相关介绍,下面结合具体实施例对本申请实施例提出的图形化编程方法作解释说明。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.

请参考图12,其示出了本申请一个实施例提供的图形化编程方法的流程图。该方法各步骤的执行主体可以是上文介绍的终端设备10,也可以是终端设备10上运行的目标应用程序的客户端,还可以是服务器20。在下文方法实施例中,为了便于描述,仅以各步骤的执行主体为“计算机设备”进行介绍说明。该方法可以包括如下几个步骤(1210~1240)中的至少一个步骤。Please refer to Figure 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 can include at least one of the following steps (1210-1240).

步骤1210,显示图形化编程工具的代码编辑界面,代码编辑界面中包括多个预设的图形化代码,图形化代码用于对一个或多个对象进行处理。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.

在一些实施例中,图形化编程工具是提供有图形化编程功能的应用程序或者应用程序中的一个功能模块。示例性地,该图形化编程工具为上述目标应用程序。示例性地,该图形化编程工具为上述目标应用程序中的一个图形化编程模块。示例性地,该图形化编程工具提供有图形化编程功能。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.

在一些实施例中,图形化编程工具的代码编辑界面是图形化编程工具提供的用于对代码(包括图形化代码)进行编辑的界面。示例性的,如图13所示,代码编辑界面可以作宽泛性解释,也即完整的用户界面1300认为是代码编辑界面,完整的用户界面1300中除了包括积木编辑区1304以外,还包括积木预设区1303、功能面板区、导航工具栏、地图导航区中的至少之一。当然,本申请中提出的代码编辑界面也可以作狭义解释,也即仅包括积木编辑区1304。此时,预设的积木代码并不显示在积木编辑区1304,而显示在积木预设区1303。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). Exemplarily, as shown in Figure 13, 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 building block preset area 1303, the function panel area, the navigation toolbar, and the map navigation area in addition to the building 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 building block editing area 1304. At this time, the preset building block code is not displayed in the building block editing area 1304, but is displayed in the building block preset area 1303.

在一些实施例中,代码编辑界面中包括多个预设的图形化代码。示例性地,在积木预设区1303中显示有多个预设的图形化代码。本申请实施例中的图形化代码是指以图形的形式展现出来的代码,该图形化代码中封装有编程语言,不同的图形化代码其所封装的编程语言不同,也即对对象的控制逻辑不同。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.

在一些实施例中,图形化代码包括至少两类。第一种类型的图形化代码用于控制单个对象,且只能控制单个对象。第二种类型的图形化代码用于控制一个编队,该编队内包括至少一个对象。当该编队内存在多个对象时,该图形化代码可以控制该编队内的多个对象。示例性地,预设的图形化代码可以包括至少一个第二种类型的图形化代码,当然除了第二种类型的图形化代码之外,还可以包括至少一个第一种类型的图形化代码。本申请实施例对于预设的图形化代码的种类不作限定。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.

本申请实施例中的对象包括但不限于虚拟对象或者真实对象。当对象为真实对象时,该对象可以为真实世界中的可活动或不可活动对象,如真实的无人机、灯泡、玩具汽车等等。当对象为虚拟对象时,该对象可以为虚拟场景中的可活动或不可活动对象,如虚拟无人机、虚拟灯泡、虚拟汽车等等。在一些实施例中,当对象为虚拟对象时,该虚拟对象可以由用户创建。当该对象为真实对象时,可以将该图形化编程工具与至少一个真实对象建立连接,当利用图形化编程工具运行图形化编程结果时,能够给至少一个真实对象发送控制信号,以对至少一个真实对象进行控制。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.

步骤1220,响应于针对多个预设的图形化代码中第一图形化代码的编辑操作,显示编辑后的第一图形化代码,第一图形化代码用于将至少一个对象加入同一个编队,编辑后的第一图形化代码用于将至少一个对象加入第一编队。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.

在一些实施例中,响应于选择积木预设区中至少一个图形化代码的操作,在积木编辑区1304中显示多个被选中的图形化代码。示例性地,代码编辑界面中包括第一图形化代码1301和第二图形化代码1302。示例性地,可以对第一图形化代码1301和第二图形化代码1302分别进行编辑,得到编辑后的第一图形化代码和编辑后的第二图形化代码。In some embodiments, in response to the operation of selecting at least one graphical code in the building block preset area, multiple 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.

当然,在默认的第一图形化代码满足用户需求时,也可以不对该第一图形化代码进行进一步编辑。如,该第一图形化代码中默认是将无人机1加入编队1,而用户的需求也是将无人机加入编队1,则可以不对第一图形化代码进行编辑。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.

在一些实施例中,第一图形化代码是用于将至少一个对象加入同一个编队的图形化代码。示例性地,针对第一图形化代码的编辑操作包括针对第一图形化代码中对象配置区的编辑操作、针对第一图形化代码中编队配置区的编辑操作中的至少之一。在一些实施例中,如图14所示,针对第一图形化代码1400的编辑操作可以认为包括针对第一图形化代码中对象配置区1401的编辑操作、针对第一图形化代码中编队配置区1402的编辑操作中的至少之一。示例性地,该第一图形化代码中显示有文字“无人机(1号)加入编队(1)”,其中,括号的位置允许被用户编辑,也即不仅能够对加入编队的对象进行选择,也可以选择加入的编队。示例性地,针对对象配置区的编辑操作用于配置加入编队的对象,针对编队配置区的编辑操作用于配置加入的编队。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. In some embodiments, as shown in FIG. 14 , the editing operation on the first graphical code 1400 can be considered to include at least one of an editing operation on an object configuration area 1401 in the first graphical code and an editing operation on a 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 be added to the formation can be selected, but also the formation to be added can be selected. Exemplarily, the editing operation on the object configuration area is used to configure the object to be added to the formation, and the editing operation on the formation configuration area is used to configure the formation to be added.

在一些实施例中,针对第一图形化代码的编辑操作可以认为对第一图形化代码进行编辑的操作,对于该操作的具体操作类型本申请不作限定,如该操作为点击操作、长按操作、滑动操作、输入操作等等中的至少之一。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.

在一些实施例中,编辑后的第一图形化代码包括被选中的对象的标识信息,如选中对象1和对象2加入编队1,则在编辑后的第一图形化代码中显示1和2。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.

步骤1230,响应于针对多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,编辑后的第二图形化代码用于对第一编队中的至少一个对象进行统一控制。Step 1230, 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.

在一些实施例中,第二图形化代码是用于对第一编队中的至少一个对象进行统一控制的图形化代码。示例性地,针对第二图形化代码的编辑操作包括针对第二图形化代码中编队配置区的编辑操作、针对第二图形化代码中参数配置区的编辑操作中的至少之一。在一些实施例中,如图13所示,第二图形化代码中的显示有文字“设置编队(1)飞行速度为(x)米/秒”,其中,括号的位置允许被用户编辑,也即不仅能够编队进行配置,如配置编队为编队1,也可以对该图形化代码的控制参数进行配置,如配置飞行速度为10米/秒。示例性地,针对编队配置区的编辑操作用于配置该图形化代码所控制的编队,针对参数配置区的编辑操作用于配置该图形化代码的控制参数。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. In some embodiments, as shown in FIG13 , the second graphical code is displayed with the text “Set the flight speed of formation (1) to (x) meters per second”, wherein the position of the brackets allows the user to edit, that is, not only the formation can be configured, such as configuring the formation to formation 1, but also the control parameters of the graphical code can be configured, such as configuring the flight speed to 10 meters per second. Exemplarily, the editing operation on the formation configuration area is used to configure the formation controlled by the graphical code, and the editing operation on the parameter configuration area is used to configure the control parameters of the graphical code.

在一些实施例中,编辑后的第一图形化代码中设置了对象1、对象2、对象3加入了编队1,编辑后的第二图形化代码中设置编队1向左移动5m,则当运行编辑后的第一图形化代码和编辑后的第二图形化代码时,编辑后的第二图形化代码可以统一控制对象1、对象2、对象向左移动5m。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.

步骤1240,运行图形化编程结果,以对第一编队中的至少一个对象进行控制,图形化编程结果包括编辑后的第一图形化代码和编辑后的第二图形化代码。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.

在一些实施例中,在步骤1240之前,还包括显示图形化编程结果。示例性地,将积木编辑区所显示的经过编辑后的图形化代码称为图形化编程结果。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 called a graphical programming result.

在一些实施例中,图形化编程结果包括编辑后的第一图形化代码和编辑后的第二图形化代码。当然,图形化编程结果中还可以包括编辑后的第三图形化代码。该编辑后的第三图形化代码可以是上述第一类型的图形化代码,也可以上述第二类型的图形化代码,也即该编辑后的第三图形化代码可以对一个或多个对象进行控制。也即,本申请实施例中的各个对象允许被编成编队一起控制,也可以被单独控制,本申请对此不作限定。应当明白的是,本申请中的各个对象均为单例,也即每个对象独立成为一个实例,因为相关技术中才无法对多个对象一起进行编组控制,而只能分别控制。本申请实施例提供的技术方案不仅可以控制单个对象,还可以同时控制多个编队,对每个编队中的不同对象分别进行统一控制,有利于提高对象控制的多样性和灵活性。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 can only be controlled 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.

在一些实施例中,显示运行控件。响应于针对运行控件的操作,运行图形化编程结果。在一些实施例中,如图13所示,响应于针对运行控件1305的操作,运行积木编辑区1304中的图形化编程结果,以对编队1中的至少一个对象进行控制。In some embodiments, a run control is displayed. In response to an operation on the run control, the graphical programming result is run. In some embodiments, as shown in FIG. 13 , in response to an operation on the run 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 .

本申请实施例中的控件均为用户界面(User Interface,简称UI)控件,UI控件是在应用程序的用户界面上能够看见的任何可视控件或元素,比如,图片、输入框、文本框、按钮、标签等控件,其中一些UI控件响应用户的操作,比如,运行控件,运行图形化编程结果。本申请实施例中涉及的UI控件,包括但不限于:运行控件。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.

本申请实施例提供的技术方案通过在图形化编程工具的代码编辑界面,对第一图形化代码进行编辑,能够将至少一个对象加入第一编队,通过对第二图形化代码进行编辑,编辑后的第二图形化代码用于对第一编队中的至少一个对象进行统一控制,运行包括该编辑后的第一图形化代码和编辑后的第二图形化代码的图形化编程结果,能够实现对于加入该第一编队的至少一个对象的统一控制。本申请实施例提供的技术方案,通过第一图形化代码将需要执行相同代码逻辑的对象编入第一编队,使得加入第一编队的至少一个对象共用同一个编辑后的第二图形化代码,无需重复编程,提高编程效率。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.

请参考图15,其示出了本申请另一个实施例提供的图形化编程方法的流程图。该方法各步骤的执行主体可以是上文介绍的终端设备10,也可以是终端设备10上运行的目标应用程序的客户端,还可以是服务器20。在下文方法实施例中,为了便于描述,仅以各步骤的执行主体为“计算机设备”进行介绍说明。该方法可以包括如下几个步骤(1510~1550)中的至少一个步骤。Please refer to Figure 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).

步骤1510,显示图形化编程工具的代码编辑界面,代码编辑界面中包括多个预设的图形化代码,图形化代码用于对一个或多个对象进行处理。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.

步骤1520,响应于针对第一图形化代码中的对象配置区的触发操作,显示对象选择界面,对象选择界面中显示有多个元素,每个元素对应于一个对象。Step 1520 , 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, and each element corresponds to an object.

在一些实施例中,第一图形化代码中包括对象配置区,对象配置区用于配置加入同一个编队的至少一个对象。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.

在一些实施例中,对象配置区域是显示的第一图形化代码的一块子区域。对于该对象配置区在用户界面中的显示位置本申请不作限定,如该对象配置区在第一图形化代码的中间位置。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.

在一些实施例中,对象选择界面以全屏形式显示或者非全屏形式显示。示例性地,当对象选择界面为非全屏形式显示时,如图14所示,响应于针对第一图形化代码中的对象配置区1401,显示对象选择界面1403。In some embodiments, the object selection interface is displayed in full screen or non-full screen. Exemplarily, when the object selection interface is displayed in non-full screen, as shown in FIG14 , in response to the object configuration area 1401 in the first graphical code, the object selection interface 1403 is displayed.

在一些实施例中,对象选择界面上包括多个元素,每个元素对应一个对象。示例性地,每个元素对应一个对象的编号。如将虚拟场景中已创建的对象进行编号,得到编号1~N,N为正整数。编号1对应对象1,编号2对应对象2,以此类推。在另一些实施例中,每个元素对应一个对象的缩略图,此种形式适用于每个对象的外形相差较大的情况。当对象的外形相差较大时,可以用该对象的缩略图来表征该对象,如用每个对象的头部图片来表征该对象。示例性地,对象选择界面中包括对象人的头部图片、对象小狗的头部图片、对象小猫的头部图片等等,用户直接选择对应的图片即可确定对应的对象。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.

当然,对于该多个元素在该对象选择界面中的排列顺序和排列位置本申请同样不作限定,如按照编号从小到大的顺序从上到下排列,也可以按照对象创建的时间顺序从左到右排列。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.

步骤1530,响应于针对多个元素中的至少一个第一元素的选择操作,显示编辑后的第一图形化代码,至少一个第一元素对应的对象加入第一编队。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.

在一些实施例中,第一元素是选择操作指向的元素。示例性地,针对多个元素中的至少一个第一元素的选择操作是选择该至少一个第一元素的操作。本申请对于该操作的操作类型不作限定,如该选择操作是点击操作、长按操作、滑动操作等等。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.

在一些实施例中,选择操作包括针对各个第一元素的点击操作。也即,用户需要直接点击想要加入编队的元素即可,当用户想要取消选中时,直接再次点击即可。在一些实施例中,如图16的1600所示,在选择元素时,直接对元素进行点击操作即可,当取消选择元素时,如图16的1610所示,再次点击该元素,则取消选择该元素。In some embodiments, the selection operation includes a click operation on each first element. That is, the user only needs to directly click on the element that he wants to add to the formation, and when the user wants to cancel the selection, he can directly click again. In some embodiments, as shown in 1600 of Figure 16, when selecting an element, the element can be directly clicked, and when the element is canceled, as shown in 1610 of Figure 16, the element is clicked again to cancel the selection.

在一些实施例中,选择操作为以第一位置为起点,且以第二位置为终点的框选操作,第一位置和第二位置所构建的框选区域中包括的元素为第一元素。在一些实施例中,从第一位置长按滑动至第二位置,所构成的矩形框为该框选区域。当用户想要取消选中时,直接再次长按框选即可。在一些实施例中,如图17的1700所示,在选择元素时,直接对元素进行长按框选(也即框选操作)即可,当取消选择元素时,如图17的1710所示,再次长按框已选择的元素,则取消选择该元素。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. In some embodiments, a long press and slide from the first position to the second position forms a rectangular box for the box selection area. When the user wants to cancel the selection, just long press the box again. In some embodiments, as shown in 1700 of Figure 17, when selecting an element, you can directly long press the element to select it (that is, the box selection operation). When you deselect an element, as shown in 1710 of Figure 17, long press the selected element again to deselect the element.

在一些实施例中,如图18的子图a所示,用户可以在代码编辑界面中对图形化代码进行编辑。如图18的子图b所示,用户从积木预设区中拖动了多个图形化代码至代码编辑区。如图18的子图c所示,用户可以对其中的第一图形化代码1800进行编辑。如图19的子图d所示,用户可以在触发显示对象选择界面1801之后,选择多个第一元素。如图19的子图e所示,当退出对第一图形化代码的编辑之后,显示编辑后的第一图形化代码1900。In some embodiments, as shown in sub-picture a of FIG. 18 , a user can edit a graphical code in the code editing interface. As shown in sub-picture b of FIG. 18 , a user drags a plurality of graphical codes from the block preset area to the code editing area. As shown in sub-picture c of FIG. 18 , a user can edit the first graphical code 1800 therein. As shown in sub-picture d of FIG. 19 , a user can select a plurality of first elements after triggering the display object selection interface 1801. As shown in sub-picture e of FIG. 19 , after exiting the editing of the first graphical code, the edited first graphical code 1900 is displayed.

本申请实施例提供的技术方案,提供了两种选择元素的选择方式。对于第一种方式的选择操作为点击操作,也即对于所有想要编入同一个编队的对象指向的元素,均执行一次点击操作,此种方式保证了选择的准确度,避免选择出错。对于第二种方式的选择操作为框选操作,也即一次性可以选择大量的元素,此种方式保证了选择的效率,在需要选择较多数量的对象加入编队时,采用第二种方式更加快捷。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.

在一些实施例中,响应于针对第一图形化代码中的对象配置区的触发操作,根据元素和对象的对应关系,确定多个元素分别对应的状态,当元素对应有虚拟场景中已创建的对象时,元素处于未选中状态,当元素不对应有虚拟场景中已创建的对象时,元素处于未创建状态。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 created in a virtual scene, the element is in an unselected state; and when an element does not correspond to an object created in a virtual scene, the element is in an uncreated state.

示例性地,预设M个元素,也即允许场景中最多出现M个对象,M为正整数。当场景中创建的对象不超过M个时,存在元素没有对应的对象,也即处于未创建状态。Exemplarily, M elements are preset, that is, a maximum of M objects are allowed to appear in the scene, where M is a positive integer. When no more than M objects are created in the scene, there is an element without a corresponding object, that is, it is in an uncreated state.

在一些实施例中,对于多个元素中的第m个元素,在第m个元素被选择,且第m个元素的状态为未创建状态的情况下,不变更第m个元素的状态;在第m个元素被选择,且第m个元素的状态为未选中状态的情况下,更改第m个元素的状态为选中状态,m为正整数。在一些实施例中,在第m个元素被取消选择,且第m个元素的状态为选中状态的情况下,更改第m个元素的状态为未选中状态。In some embodiments, 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, 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. In some embodiments, when the mth element is deselected and the state of the mth element is a selected state, the state of the mth element is changed to an unselected state.

示例性地,点击第m个元素,如果该元素处于未选中状态,则确定该元素处于选中状态。示例性地,再次点击该元素,则该元素从选中状态变为未选中状态。Exemplarily, the mth element is clicked, and if the element is in an unselected state, it is determined that the element is in a selected state. Exemplarily, the element is clicked again, and the element changes from a selected state to an unselected state.

示例性地,长按框选第m个元素,如果该元素处于未选中状态,则确定该元素处于选中状态。示例性地,再次长按框选该元素,则该元素从选中状态变为未选中状态。Exemplarily, the mth element is long-pressed to be selected, and if the element is in an unselected state, it is determined that the element is in a selected state. Exemplarily, the element is long-pressed again to be selected, and the element changes from a selected state to an unselected state.

示例性地,点击或长按框选第m个元素,如果该元素处于未创建状态,则该元素的状态保持不变。Exemplarily, click or long press to select the mth element. If the element is in an uncreated state, the state of the element remains unchanged.

请参考图20,其示出了本申请一个实施例提供的对象状态更新方法的框图。如图20的2000所示,以对象为无人机为例,点击无人机编队相关积木(也即第一图形化代码)中的无人机参数(也即对象配置区),弹出无人机编队选择无人机弹框(也即对象选择界面),这里利用了扩展弹框的接口。创建一个继承自Blockly.FieldTextInput类的自定义的输入类型FieldFormationDronePopup,在该输入类型中处理点击事件并显示选择无人机弹框(简称弹框)。假设场景中最多支持添加无人机的数量为M,弹框中固定显示编号1到M共M个数字,代表按照创建顺序创建的1到M号无人机。每个编号有3种状态,分别是未创建,未选中和已选中。未创建状态表示场景中没有该序号的无人机,如果场景中的无人机数量为n(n<M),那么n+1到M号是未创建状态;未选中状态表示该序号无人机没有被选中;已选中状态表示该序号无人机已经被选中。Please refer to Figure 20, which shows a block diagram of an object state update method provided by an embodiment of the present application. As shown in 2000 of Figure 20, 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 block (i.e., the first graphical code), and the drone formation selection drone pop-up box (i.e., the object selection interface) pops up, where the interface of the extended pop-up box is used. Create a custom input type FieldFormationDronePopup inherited from the Blockly.FieldTextInput class, in which the click event is processed and the drone selection pop-up box (referred to as the pop-up box) is displayed. Assuming that the maximum number of drones supported in the scene is M, the pop-up box is fixed with a total of M numbers from 1 to M, representing drones 1 to M created in the order of creation. Each number has three states, namely, uncreated, unselected, and selected. The uncreated state indicates 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 n+1 to M are uncreated states; the unselected state indicates that the drone with this serial number has not been selected; the selected state indicates that the drone with this serial number has been selected.

请参考图21,其示出了本申请另一个实施例提供的对象状态更新方法的框图。如图21的2100所示,以对象为无人机为例,针对点击操作,如果该序号(也即上述元素)当前是未创建状态,那么该序号不可点击,不响应点击操作,仍然是未创建状态;如果该序号当前是未选中状态,那么点击该序号后,该序号改为已选中状态,同时在功能面板区该序号对应的无人机条目高亮闪烁提示用户,地图导航区对应的无人机标识也高亮提示用户;如果该序号当前是已选中状态,那么点击该序号后,该序号改为未选中状态,同时在功能面板区该序号对应的无人机条目另种高亮闪烁(与上述选中状态区分)提示用户,地图导航区对应的无人机标识也另种高亮(与上述选中状态区分)提示用户。Please refer to Figure 21, which shows a block diagram of an object state update method provided by another embodiment of the present application. As shown in 2100 of Figure 21, taking the object as a drone as an example, for the click operation, if the serial number (that is, the above-mentioned element) is currently in an uncreated state, then the serial number cannot be clicked, 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.

请参考图22,其示出了本申请另一个实施例提供的对象状态更新方法的框图。如图22的2200所示,以对象为无人机为例,不改变框(是指框选区域的框)外的序号(也即上述元素)状态。针对框内的所有序号,都执行以下操作。如果该序号当前是未创建状态,那么该序号不改变状态,仍然是未创建状态;如果该序号当前是未选中状态,那么该序号改为已选中状态,同时在功能面板区该序号对应的无人机条目高亮闪烁提示用户,地图导航区对应的无人机标识也高亮提示用户;如果该序号当前是已选中状态,那么该序号改为未选中状态,同时在功能面板区该序号对应的无人机条目另种高亮闪烁(与上述选中状态区分)提示用户,地图导航区对应的无人机标识也另种高亮(与上述选中状态区分)提示用户。Please refer to Figure 22, which shows a block diagram of an object state update method provided by another embodiment of the present application. As shown in 2200 of Figure 22, 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.

在一些实施例中,处于选中状态的所述第一元素,和处于未选中状态的其它元素区别显示。在一些实施例中,处于选中状态的所述第一元素,和处于未选中状态的其它元素的显示颜色、亮度、灰度等不相同。In some embodiments, the first element in the selected state is displayed differently from other elements in the unselected state. In some embodiments, the display color, brightness, grayscale, etc. of the first element in the selected state and other elements in the unselected state are different.

在一些实施例中,处于选中状态的所述第一元素对应的对象,和处于未选中状态的其它元素对应的对象在虚拟场景中区别显示。在一些实施例中,当用户在对象选择界面中选择了目标元素时,处于选中状态的目标元素对应的对象在虚拟场景中高亮显示,而未被选中的元素指向的对象未高亮显示。也即,用户选择了几个元素,则这几个元素对应的对象在虚拟场景中高亮显示,这里的高亮显示还包括闪烁显示、标黄显示等等。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.

在一些实施例中,处于选中状态的所述第一元素对应的对象在地图导航界面中的标记,和处于未选中状态的其它元素对应的对象在所述地图导航界面中的标记区别显示,其中,所述地图导航界面中显示有所述虚拟场景的地图,以及所述虚拟场景中各个已创建的对象在所述地图中的标记。在一些实施例中,这里的地图导航界面对应上述的地图导航区。处于选中状态的所述第一元素对应的对象在地图导航界面中的标记被高亮显示,这里的高亮显示还包括闪烁显示、标黄显示等等。本申请实施例中的标记同样用于指示该对象,如该标记是对象的头部图片、编号、标识中的至少之一。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.

在一些实施例中,处于选中状态的所述第一元素对应的对象在功能面板界面中的标识,和处于未选中状态的其它元素对应的对象在所述功能面板界面中的标识区别显示,其中,所述功能面板界面用于显示所述虚拟场景中各个已创建的对象分别对应的配置信息,所述配置信息包括所述对象的标识。在一些实施例中,这里的功能面板界面对应上述的功能面板区。处于选中状态的所述第一元素对应的对象在功能面板界面中的标识被高亮显示,这里的高亮显示还包括闪烁显示、标黄显示等等。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.

在一些实施例中,上述几种区别显示各不相同。In some embodiments, the above-mentioned several distinctions are displayed differently.

本申请实施例提供的技术方案,通过在选择对象的过程中,在地图导航界面、功能面板界面、对象选择界面中将选中的对象和其他对象区别显示,能够让用户明确哪些对象是被选择的,从而更直观地观察选择是否出错,以便于用户及时修改。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.

在一些实施例中,针对第一图形化代码中的对象配置区的触发操作和针对多个元素中的至少一个第一元素的选择操作为两步操作,也可以是不松手的一步滑动操作。当针对第一图形化代码中的对象配置区的触发操作和针对多个元素中的至少一个第一元素的选择操作为不松手的一步滑动操作时,如长按第一图形化代码中的对象配置区的触发操作呼出对象选择界面,在不松手的情况下,在对象界面上继续选择加入同一编队的元素,以减少操作步骤。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.

在一些实施例中,如步骤1520和步骤1530所示的方法来配置加入同一个编队的至少一个对象。在另一些实施例中,可以在对象配置区直接输入加入同一个编队的至少一个对象的标识信息,根据输入的至少一个对象的标识信息,确定加入第一编队的至少一个对象。该输入可以为文字输入或语音输入。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.

上述步骤1520和步骤1530示出了一种配置加入同一个编队的至少一个对象的方法。在另一些实施例中,也采用下述步骤1560(图中未示出)和步骤1570(图中未示出)来配置加入同一个编队的至少一个对象。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.

步骤1560,响应于针对第一图形化代码中的对象配置区的触发操作,显示处于编辑状态的虚拟场景界面,虚拟场景界面中显示有虚拟场景以及虚拟场景中已创建的对象,不同的对象在虚拟场景中的位置不同。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.

示例性地,处于编辑状态的虚拟场景界面中的对象允许被编辑,与之前的虚拟场景界面区分。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.

示例性地,和上述图14中的对象选择界面1403类似,处于编辑状态的虚拟场景界面以非全屏形式显示。Exemplarily, similar to the object selection interface 1403 in FIG. 14 , the virtual scene interface in the editing state is displayed in a non-full screen format.

示例性地,处于编辑状态的虚拟场景界面以全屏形式显示。也即响应于针对第一图形化代码中的对象配置区的触发操作,全屏显示处于编辑状态的虚拟场景界面。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.

步骤1570,响应于针对已创建的对象中的至少一个第一对象的选择操作,显示编辑后的第一图形化代码,至少一个第一对象加入第一编队。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.

在一些实施例中,针对已创建的对象中的至少一个第一对象的选择操作是选择该至少一个对象的操作。在一些实施例中,选择操作包括针对各个对象的点击操作。在一些实施例中,选择操作为以第三位置为起点,且以第四位置为终点的框选操作,第三位置和第四位置所构建的框选区域中包括的对象为选中的对象。此处和上述类似,参考上述解释说明,不作赘述。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.

在一些实施例中,编辑后的第一图形化代码包括被选中的对象的标识信息,如选中对象1和对象2加入编队1,则在编辑后的第一图形化代码中显示标识1和标识2。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.

本申请实施例提供的技术方案允许用户直接在虚拟场景中选择对象加入编队,使得对于对象的选择更加直观,不容易出错,有利于提高编程效率。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.

上述实施例具体介绍了如何对选择加入编队的对象,当然也可以对第一图形化代码指向的编队进行配置。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.

在一些实施例中,第一图形化代码中还包括编队配置区,编队配置区用于配置至少一个对象加入的编队。In some embodiments, the first graphical code also includes a formation configuration area, and the formation configuration area is used to configure a formation to which at least one object joins.

在一些实施例中,响应于针对第一图形化代码中的编队配置区的触发操作,显示编队选择界面,编队选择界面中显示有多个编队号码,每个编队号码对应于一个编队;响应于针对多个编队号码中的第一编队号码的选择操作,显示编辑后的第一图形化代码,第一编队号码对应的编队为第一编队。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.

在一些实施例中,针对第一图形化代码中的编队配置区的触发操作和针对多个编队号码中的第一编队号码的选择操作为两步操作,也可以是不松手的一步滑动操作。当针对第一图形化代码中的编队配置区的触发操作和针对多个编队号码中的第一编队号码的选择操作为不松手的一步滑动操作时,如长按第一图形化代码中的编队配置区的触发操作呼出编队选择界面,在不松手的情况下,在对象界面上继续滑动至第一编队号码,以减少操作步骤。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.

在另一些实施例中,可以在编队配置区直接输入加入编队的标识信息,根据输入的编队的标识信息,确定指向的编队。该输入可以为文字输入或语音输入。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 identification information of the formation. The input can be text input or voice input.

步骤1540,响应于针对多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,编辑后的第二图形化代码用于对第一编队中的至少一个对象进行统一控制。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.

步骤1550,运行图形化编程结果,以对第一编队中的至少一个对象进行控制,图形化编程结果包括编辑后的第一图形化代码和编辑后的第二图形化代码。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.

在一些实施例中,运行所述图形化编程结果,显示在虚拟场景中对所述第一编队中至少一个对象的控制过程。如图形化编程结果中要求控制编队1向左飞行10米,编队1中包括对象1和对象2,则在虚拟场景中显示控制对象1和对象2均向左飞行10米的动画。在一些实施例中,如图23所示,响应于针对运行控件2301的操作,运行所述图形化编程结果,显示在虚拟场景中对所述第一编队中至少一个对象的控制过程2302。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. In some embodiments, as shown in FIG23 , in response to an operation on the running control 2301, the graphical programming result is run to display the control process 2302 of at least one object in the first formation in the virtual scene.

本申请实施例提供的技术方案,能够将运行结果以动画的方式提供给用户进行预览,有利于用户快速发现图形化编程结果中出现的问题,从而快速修改,提高编程效率。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.

在一些实施例中,显示场景控件、代码编辑控件中的至少之一;场景控件用于切换显示虚拟场景界面,虚拟场景界面中包括虚拟场景以及虚拟场景中已创建的对象,代码编辑控件用于切换显示代码编辑界面。运行图形化编程结果,响应于对场景控件的触发操作,显示虚拟场景界面,在虚拟场景界面中显示在虚拟场景中对第一编队中至少一个对象的控制过程;响应于对代码编辑控件的触发操作,重新显示代码编辑界面,代码编辑界面中包括图形化编程结果。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.

在一些实施例中,如图24所示,显示场景控件2401和代码编辑控件2402。响应于对场景控件2401的触发操作,显示虚拟场景界面2400。响应于对代码编辑控件2402的触发操作,显示代码编辑界面2404。也即,通过场景控件和代码编辑控件,可以实现虚拟场景界面和代码编辑界面的切换,当然,二者也可以同屏显示,如左侧显示虚拟场景界面,右侧显示代码编辑界面。当然,也可以全屏显示代码编辑界面,而以画中画形式显示虚拟场景界面。In some embodiments, as shown in FIG. 24 , 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.

在一些实施例中,响应于针对虚拟场景界面中已创建的对象中目标对象的编队设置操作,显示编队选择界面,编队选择界面中包括多个编队号码,每个编队号码对应一个编队;响应于针对多个编队号码中第二编队号码的选择操作,确定目标对象加入第二编队号码对应的编队。此种方式可以直接在虚拟场景界面中对对象的编队进行修改,如在虚拟场景界面中长按目标对象,显示编队选择界面;响应于对多个编队号码中第二编队号码的选择操作,确定目标对象加入第二编队号码对应的编队。通过直接在场景中修改编队,将代码和场景结合,有利于提高代码编辑的灵活性,提高编程的效率。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.

示例性地,在除了代码编辑界面以外的其他界面对编队的修改会同步给编辑后的第一图形化代码和编辑后的第二图形化代码,使得场景和代码保持同步,避免出错。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.

本申请实施例提供的技术方案,将虚拟场景界面和代码编辑界面的切换显示或者同屏显示,方便用户兼顾编辑代码以及查看场景中对各个对象的控制过程,有利于提高编程效率。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.

请参考图25,其示出了本申请另一个实施例提供的图形化编程方法的流程图。该方法各步骤的执行主体可以是上文介绍的终端设备10,也可以是终端设备10上运行的目标应用程序的客户端,还可以是服务器20。在下文方法实施例中,为了便于描述,仅以各步骤的执行主体为“计算机设备”进行介绍说明。该方法可以包括如下几个步骤(2510~2570)中的至少一个步骤。Please refer to Figure 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).

步骤2510,响应于针对功能面板界面中的对象创建控件的触发操作,在功能面板界面中显示新增对象对应的配置信息,功能面板界面用于显示虚拟场景中各个已创建的对象分别对应的配置信息。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.

在一些实施例中,响应于针对功能面板界面中的对象创建控件的触发操作,在功能面板界面中显示的新增对象对应的配置信息为初始化的信息,或者说是默认的配置信息。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.

在一些实施例中,响应于针对功能面板界面中的对象创建控件的触发操作,在虚拟场景中显示新增对象。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.

在一些实施例中,如图26所示,响应于针对功能面板界面中的对象创建控件2600的触发操作,在功能面板界面中显示新增对象对应的配置信息2601。In some embodiments, as shown in FIG. 26 , in response to a trigger 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.

步骤2520,响应于针对新增对象对应的配置信息的修改操作,显示修改后的配置信息。Step 2520: In response to the modification operation on the configuration information corresponding to the newly added object, display the modified configuration information.

在另一些实施例中,除了对新增对象对应的配置信息进行修改之外,还可以对其他已创建的对象对应的配置信息进行修改。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.

在一些实施例中,如图27所示,响应于针对已创建的对象对应的配置信息2701的修改操作,显示修改后的配置信息。In some embodiments, as shown in FIG. 27 , in response to a modification operation on configuration information 2701 corresponding to a created object, the modified configuration information is displayed.

步骤2530,在虚拟场景中显示基于修改后的配置信息创建的新增对象。Step 2530: Display the newly added object created based on the modified configuration information in the virtual scene.

在一些实施例中,在虚拟场景中基于修改后的配置信息修改新增对象。In some embodiments, the newly added object is modified in the virtual scene based on the modified configuration information.

在一些实施例中,在虚拟场景中显示基于修改后的配置信息对应的对象2702。In some embodiments, an object 2702 corresponding to the modified configuration information is displayed in the virtual scene.

在一些实施例中,功能面板界面中包括搜索输入栏。In some embodiments, the function panel interface includes a search input field.

示例性地,该搜索栏用于对已创建的对象进行搜索已查看该对象的配置信息。Exemplarily, the search bar is used to search for a created object and view configuration information of the object.

在一些实施例中,响应于针对搜索输入栏的输入操作,显示在搜索输入栏输入的针对已创建的对象的搜索信息;显示搜索信息指向的对象对应的配置信息。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.

在一些实施例中,计算机设备根据用户输入的搜索信息,将搜索信息中的关键词和各个已创建的对象的配置信息进行匹配,将匹配度最高的已创建的对象确定为该搜索信息指向的对象。进一步地,将搜索信息指向的对象对应的配置信息显示出来。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.

考虑到当用户已创建的对象较多时,无法将全部的已创建的对象的配置信息全部显示在一个界面中,因此需要用户下拉或者滚动以找到相关对象。因此,本申请实施例提供的技术方案提供有搜索栏为方便用户快速搜索到相关对象,从而快捷查看该对象的配置信息,以对该配置信息进行修改,有利于提高信息处理效率。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.

在一些实施例中,功能面板界面中包括各个已创建的对象分别对应的页签。In some embodiments, the function panel interface includes tabs corresponding to each created object.

本申请实施例中的页签应该作宽泛性解释,也即,每个对象对应一个页签,页签是用来表征该对象的特定元素,如控件、标识、缩略图等等。之所以显示页签,是因为页签面积较小,能够在较小的面积里面显示较多的页签,也即可以将多个已创建的对象分别对应的页签均显示在一小块区域内。比如,功能面板界面中显示M个标号,每个标号对应一个已创建的对象。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 tabs are 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.

在一些实施例中,响应于针对各个已创建的对象分别对应的页签中目标页签的选择操作,显示目标页签指向的对象对应的配置信息。示例性地,选择目标页签,快捷显示该页签指向的对象的配置信息。此种方式提高了信息显示效率。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.

在一些实施例中,响应于针对目标页签的删除操作,将目标页签指向的对象从虚拟场景中删除。示例性地,删除目标页签,能够快捷删除该页签指向的对象。此种方式提高了对象删除的效率。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.

在一些实施例中,响应于针对目标页签的编队设置操作,更改目标页签指向的对象所加入的编队。示例性地,响应于针对目标页签的编队设置操作,显示编队选择界面,在该编队选择界面上重新选择目标页签指向的对象所加入的编队。此种方式实现了对于编队的快捷配置,有利于提高编程效率。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.

在一些实施例中,功能面板界面中还显示有针对各个编队分别对应的控件。示例性地,响应于针对各个编队分别对应的控件中目标控件的点击操作,显示该目标控件对应的编队下已配置的对象。示例性地,当显示该目标控件对应的编队下已配置的对象时,虚拟场景中的所有该编队下的对象和其他对象区别显示。示例性地,可以新增或者删除该目标控件对应的编队中的对象。示例性地,在功能面板界面也可以快速查看每个编队下的对象,同时还可以对应到场景中查看该编队下每个对象所在的位置,另外还可以快捷删除或新增对象,有利于提升编程的灵活性和效率。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.

步骤2540,显示图形化编程工具的代码编辑界面,代码编辑界面中包括多个预设的图形化代码,图形化代码用于对一个或多个对象进行处理。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.

步骤2550,响应于针对多个预设的图形化代码中第一图形化代码的编辑操作,显示编辑后的第一图形化代码,第一图形化代码用于将至少一个对象加入同一个编队,编辑后的第一图形化代码用于将至少一个对象加入第一编队。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.

步骤2560,响应于针对多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,编辑后的第二图形化代码用于对第一编队中的至少一个对象进行统一控制。Step 2560, 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.

步骤2570,运行图形化编程结果,以对第一编队中的至少一个对象进行控制,图形化编程结果包括编辑后的第一图形化代码和编辑后的第二图形化代码。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.

以上是针对图形化编程方法的介绍,下面对于利用图形化编程工具编程之后,如何具体运行该图形化编程结果结合以下实施例作具体解释说明。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.

当然应当理解的是,下述图形化代码的执行方法和上述图形化编程方法可以由同一计算机设备执行,也可以由不同计算机设备执行。当由同一计算机设备执行时,该计算机设备上运行有支持编程功能以及代码运行功能的应用程序。当由不同计算机设备执行时,第一计算机设备执行上述图形化编程方法以得到图形化编程结果,第一计算机设备将图形化编程结果发送给第二计算机设备,由第二计算机设备执行该图形化编程结果。第一计算机设备上运行有支持编程功能的应用程序,而第二计算机设备上运行有支持代码运行功能的应用程序。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.

另外需要说明的是,在上述图形化编程方法中图形化编程结果中包括的编辑后的第一图形化代码和编辑后的第二图形化代码,认为是下述图形化代码的执行方法中提及的图形化编程结果中的第一图形化代码和第二图形化代码。由于下述实施例为代码执行侧,因此在下述实施例中提及的图形化代码认为是经过编辑后的,也即下述实施例中直接以第一图形化代码代替上述编辑后的第一图形化代码,以第二图形化代码代替上述编辑后的第二图形化代码,第三图形化代码认为是上述编辑后的第三图形化代码。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.

请参考图28,其示出了本申请一个实施例提供的图形化代码的执行方法的流程图。该方法各步骤的执行主体可以是上文介绍的终端设备10,也可以是终端设备10上运行的目标应用程序的客户端,还可以是服务器20。在下文方法实施例中,为了便于描述,仅以各步骤的执行主体为“计算机设备”进行介绍说明。该方法可以包括如下几个步骤(2810~2830)中的至少一个步骤。Please refer to Figure 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).

步骤2810,获取图形化编程结果,图形化编程结果包括多个按序执行的图形化代码,图形化代码用于对虚拟场景中的一个或多个虚拟对象进行处理。Step 2810, obtaining a graphical programming result, the graphical programming result including a plurality of graphical codes executed in sequence, the graphical codes being used to process one or more virtual objects in the virtual scene.

在一些实施例中,获取图形化编程结果,该图形化编程结果中包括多个图形化代码,这些图形化代码是被编程人员编辑后的图形化代码。示例性地,图形化编程结果中的图形化代码按照一定的顺序排列,如从上到下的顺序、从左到右的顺序等等。示例性地,当执行该图形化编程结果时,按照图形化编程结果中的图形化代码的顺序依次执行。在一些实施例中,每个图形化代码对应有控制代码逻辑,也即封装在图形化代码中的编程语言。示例性地,不同的图形化代码对应的控制代码逻辑不同,也即封装在该图形化代码中的编程语言不同。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.

在一些实施例中,虚拟场景是该应用程序中为用户编程所创建(或提供)的虚拟环境。该虚拟环境可以是对真实世界的仿真世界,也可以是半仿真半虚构的三维世界,还可以是纯虚构的三维世界。虚拟环境可以是二维虚拟环境、2.5维虚拟环境和三维虚拟环境中的任意一种。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-simulated and semi-imaginary three-dimensional world, or a purely imaginary 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.

在一些实施例中,虚拟对象是在虚拟环境中的可活动对象。该可活动对象可以是虚拟无人机、虚拟人物、虚拟动物、动漫人物中的至少一种。在一些实施例中,当虚拟环境为三维虚拟环境时,虚拟对象可以是三维虚拟模型,每个虚拟对象在三维虚拟环境中具有自身的形状和体积,占据三维虚拟环境中的一部分空间。可选地,虚拟对象是基于三维人体骨骼技术构建的三维角色,该虚拟对象通过穿戴不同的皮肤来实现不同的外在形象。在一些实现方式中,虚拟对象也可以采用2.5维或2维模型来实现,本申请实施例对此不加以限定。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.

步骤2820,执行图形化编程结果中包括的第一图形化代码,将虚拟场景中的至少一个虚拟对象加入第一编队。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.

在一些实施例中,第一图形化代码是用于将虚拟场景中的至少一个虚拟对象加入第一编队的图形化代码。响应于用户在编程过程中对第一图形化代码的编辑操作,则经过编辑后的第一图形化代码包括第一配置信息。该第一配置信息中包括第一编队的标识信息和加入第一编队的至少一个虚拟对象分别对应的标识信息。在一些实施例中,这里的标识信息是用于表征该编队或者对象的信息,如编号、标号、序号等等。如图19所示,编辑后的第一图形化代码1900中显示有无人机1号2号加入编队1,则无人机1号2号以及编队是该编辑后的第一图形化代码中包括的第一配置信息。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's editing operation on the first graphical code during the programming process, 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 number, label, serial number, etc. As shown in Figure 19, the edited first graphical code 1900 shows that drones 1 and 2 have joined formation 1, then drones 1 and 2 and the formation are the first configuration information included in the edited first graphical code.

在一些实施例中,在代码执行时,根据第一图形化代码中包括的第一配置信息,将虚拟场景中的至少一个虚拟对象加入第一编队。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.

示例性地,根据第一配置信息中的加入第一编队的至少一个虚拟对象分别对应的标识信息和第一编队的标识信息进行绑定,也即实现了根据第一编队的标识信息,可以快速查找到加入该第一编队中的至少一个虚拟对象。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.

示例性地,根据第一配置信息中的加入第一编队的至少一个虚拟对象分别对应的标识信息和第一编队的标识信息,建立虚拟对象和编队的对应关系表,也即实现了根据第一编队的标识信息,可以快速从对应关系表中查找到加入该第一编队中的至少一个虚拟对象。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.

示例性地,根据第一配置信息中的加入第一编队的至少一个虚拟对象分别对应的标识信息和第一编队的标识信息,建立该第一编队分别和加入第一编队的至少一个虚拟对象之间的动态链接。如编队1和虚拟对象1建立动态链接,编队1和虚拟对象2建立动态链接,编队1和虚拟对象3建立动态链接,也即实现了当执行第二图形化代码时,也即控制编队中的各个对象时,通过第一编队的动态链接,链接到加入该第一编队的虚拟对象。此种方式直接构建动态链接来查找到加入编队的虚拟对象,不仅可以规避构建对应关系表或绑定关系,还能够实现快速定位,以提高查找效率。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.

步骤2830,执行图形化编程结果中包括的第二图形化代码,对加入第一编队的至少一个虚拟对象进行统一控制。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.

在一些实施例中,第二图形化代码是用于第一编队中的各个虚拟对象进行统一控制的图形化代码。响应于用户在编程过程中对第二图形化代码的编辑操作,则经过编辑后的第二图形化代码包括第二配置信息。该第二配置信息中包括第一编队的标识信息和控制参数信息。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.

本申请实施例提供的技术方案通过获取图形化编程结果;执行图形化编程结果中包括的第一图形化代码,实现了将虚拟场景中的至少一个虚拟对象加入第一编队;执行图形化编程结果中包括的第二图形化代码,实现了对加入第一编队的至少一个虚拟对象的统一控制。本申请实施例提供的技术方案,通过第一图形化代码将需要执行相同代码逻辑的对象编入第一编队,使得加入第一编队的至少一个对象共用一个第二图形化代码,执行第二图形化代码即可实现对处于同一编队的至少一个虚拟对象的统一控制,无需获取重复的编程代码来对各个虚拟对象分别控制,有利于提高代码的执行效率。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.

请参考图29,其示出了本申请另一个实施例提供的图形化代码的执行方法的流程图。该方法各步骤的执行主体可以是上文介绍的终端设备10,也可以是终端设备10上运行的目标应用程序的客户端,还可以是服务器20。在下文方法实施例中,为了便于描述,仅以各步骤的执行主体为“计算机设备”进行介绍说明。该方法可以包括如下几个步骤(2910~2950)中的至少一个步骤。Please refer to Figure 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).

步骤2910,获取图形化编程结果,图形化编程结果包括多个按序执行的图形化代码,图形化代码用于对虚拟场景中的一个或多个虚拟对象进行处理。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.

步骤2920,执行图形化编程结果中包括的第一图形化代码,将虚拟场景中的至少一个虚拟对象加入第一编队。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.

步骤2930,获取第二图形化代码对应的控制逻辑代码,控制逻辑代码是指封装在第二图形化代码中的编程语言。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.

在一些实施例中,获取封装在第二图形化代码中的编程语言,得到第二图形化代码对应的控制代码逻辑。In some embodiments, the programming language encapsulated in the second graphical code is acquired to obtain the control code logic corresponding to the second graphical code.

步骤2940,确定加入第一编队的至少一个虚拟对象。Step 2940, determine at least one virtual object to join the first formation.

在一些实施例中,由于加入第一编队的至少一个虚拟对象分别对应的标识信息和第一编队的标识信息已经被绑定,则直接根据第一编队的标识信息,可以快速查找到加入该第一编队中的至少一个虚拟对象。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.

示例性地,由于虚拟对象和编队之间建立有对应关系表,直接根据第一编队的标识信息,可以快速从对应关系表中查找到加入该第一编队中的至少一个虚拟对象。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.

示例性地,由于已建立第一编队分别和加入第一编队的至少一个虚拟对象之间的动态链接,则直接通过第一编队的动态链接,链接到加入该第一编队的至少一个虚拟对象。此种方式直接构建动态链接来查找到加入编队的虚拟对象,能够提高查找效率。Exemplarily, since dynamic links have 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.

步骤2950,执行控制逻辑代码,对加入第一编队的至少一个虚拟对象进行统一控制。Step 2950: execute the control logic code to uniformly control at least one virtual object added to the first formation.

在一些实施例中,在确定出至少一个虚拟对象之后,利用控制逻辑代码对至少一个虚拟对象分别进行控制,也即,同时对至少一个虚拟对象分别进行控制。示例性地,控制代码逻辑是一段控制向左飞1米的编程语言,则将这一段编程语言分别用来控制该编队中的至少一个虚拟对象。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.

在一些实施例中,在对至少一个虚拟对象进行控制时,无先后之分。示例性地,该目标应用程序中包括多个执行器,第s个执行器用于执行控制逻辑代码,对加入第一编队的第s个虚拟对象进行控制,s为正整数。多个执行器同步来控制虚拟对象,有利于加快处理速度,提高代码执行效率。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.

在一些实施例中,存在第二图形化代码,其具有执行条件,也即需要当虚拟对象满足条件时,才能执行该第二图形化代码。下面对于第二图形化代码的执行条件作以下示例性说明。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.

在一些实施例中,上述方法还包括以下步骤S1~S3(图中未示出)中的至少一个步骤。In some embodiments, the above method further includes at least one of the following steps S1 to S3 (not shown in the figure).

步骤S1,获取加入第一编队的至少一个虚拟对象分别对应的状态信息,状态信息用于反映虚拟对象的实时状态。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.

在一些实施例中,状态信息包括该虚拟对象当前的位置信息、颜色信息、外形信息等等。在一些实施例中,在执行第二图形化代码之前,先对第一编队的至少一个虚拟对象是否满足第二图形化代码的执行条件进行判断。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.

步骤S2,在加入第一编队的至少一个虚拟对象分别对应的状态信息不满足第二图形化代码的执行条件的情况下,对加入第一编队的至少一个虚拟对象继续进行控制,直到加入第一编队的至少一个虚拟对象分别对应的状态信息满足第二图形化代码的执行条件。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.

示例性地,第二图形化代码的执行条件为加入第一编队的两个虚拟对象之间的最长距离不超过5米,则获取加入第一编队的至少一个虚拟对象分别对应的状态信息,如果判断出加入第一编队的两个虚拟对象之间的最长距离为3米,则此时允许执行第二图形化代码。示例性地,如果判断出加入第一编队的两个虚拟对象之间的最长距离为6米,则此时不允许执行第二图形化代码。示例性地,在不允许执行第二图形化代码的情况下,需要对加入第一编队的至少一个虚拟对象继续进行控制,直到加入第一编队的至少一个虚拟对象分别对应的状态信息满足第二图形化代码的执行条件。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.

步骤S3,在加入第一编队的至少一个虚拟对象分别对应的状态信息满足第二图形化代码的执行条件的情况下,执行控制逻辑代码,对加入第一编队的至少一个虚拟对象进行统一控制。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, the control logic code is executed to uniformly control the at least one virtual object added to the first formation.

以上步骤S1~S3介绍了如何同时执行图形化代码。以图形化代码为积木代码为例,组内某无人机在执行积木时,如果当前状态不满足执行积木的前提,其他无人机需要等待该无人机调整状态到满足执行积木的状态。无人机编队执行器会检查组内所有无人机状态,如果满足,则执行积木;如果不满足,那么不满足执行积木的无人机会调整状态,无人机编队执行器(参见下述实施例的解释说明)在生命周期下个主循环中再次检查组内所有无人机状态,往复循环,直至所有无人机都满足执行积木的状态。示例性地,无人机编队A中有1、2、3共3个无人机,让编队A围绕某点p执行圆周运动,需要等待1、2、3无人机自旋至当前位置和圆心连线垂直的方向,之后一起执行圆周运动。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.

在一些实施例中,上述方法还包括以下步骤S4~S6(图中未示出)中的至少一个步骤。In some embodiments, the above method further includes at least one of the following steps S4 to S6 (not shown in the figure).

步骤S4,对于至少一个虚拟对象中的第k个虚拟对象,在执行控制逻辑代码,对第k个虚拟对象进行控制之后,确定第k个虚拟对象处于对第二图形化代码的执行完毕状态,k为正整数。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, where k is a positive integer.

在一些实施例中,为所有的虚拟对象设置标志位,当第k个虚拟对象处于对第二图形化代码的执行完毕状态,标志位的值为第一数值。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.

示例性地,当执行控制逻辑代码,对第k个虚拟对象进行控制时,改变第k个虚拟对象的标志位的值,从第二数值改变为第一数值。示例性地,标志位的原始数值为第二数值。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.

步骤S5,在执行控制逻辑代码,未对第k个虚拟对象进行控制时,确定第k个虚拟对象处于对第二图形化代码的未执行完毕状态,第一数值代表执行完毕状态。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.

在一些实施例中,当第k个虚拟对象处于对第二图形化代码的执行未完毕状态,标志位的值为第二数值,第二数值代表执行未完毕状态。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.

示例性地,当执行控制逻辑代码,未对第k个虚拟对象进行控制时,不改变第k个虚拟对象的标志位的值。示例性地,标志位的原始数值为第二数值。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.

步骤S6,遍历加入第一编队的至少一个虚拟对象,在加入第一编队的至少一个虚拟对象全部处于对第二图形化代码的执行完毕状态的情况下,执行第三图形化代码,第三图形化代码是图形化编程结果中位于第二图形化代码之后的图形化代码。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.

在一些实施例中,当加入第一编队的至少一个虚拟对象的标志位全部为第一数值时,认为加入第一编队的至少一个虚拟对象全部处于对第二图形化代码的执行完毕状态,此时允许执行第二图形化代码的下一个图形化代码。在一些实施例中,当加入第一编队的至少一个虚拟对象的标志位中存在一个为第二数值时,认为加入第一编队的至少一个虚拟对象并非全部处于对第二图形化代码的执行完毕状态,此时不允许执行第二图形化代码的下一个图形化代码。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.

以上步骤S4~S6介绍了如何判断图形化代码是否执行完毕。在积木开始执行时,为组内所有无人机设置一个标志位(completed)为false,积木执行完毕,改变标志位的值为true。无人机编队执行器在生命周期每个主循环中检查组内无人机的标志位的值,如果任一个无人机标志位为false,表示该组无人机积木执行尚未完成,否则表示该组无人机积木执行完毕,可以继续执行后面的积木。示例性地,无人机编队A中有1、2、3共3个无人机,让编队A运动到某点p,需要等待1、2、3无人机都飞行到点p后再执行后面的积木。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.

在一些实施例中,第二图形化代码的代码类型为第一类型或第二类型。In some embodiments, the code type of the second graphical code is the first type or the second type.

在一些实施例中,在第二图形化代码的代码类型为第一类型的情况下,第二图形化代码针对第一编队中的至少一个虚拟对象的控制类型为瞬时性控制,瞬时性控制是指对虚拟对象的属性进行修改。示例性地,如修改虚拟对象的颜色、修改虚拟对象的灯光、修改虚拟对象的衣服等等。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.

在一些实施例中,在第二图形化代码的代码类型为第二类型的情况下,第二图形化代码针对第一编队中的至少一个虚拟对象的控制类型为持续性控制,持续性控制是指对虚拟对象进行第一时长的控制。如控制虚拟对象向左飞以速度a飞行1分钟,如控制虚拟对象绕点b飞行5秒,如控制虚拟对象原地保持不动1小时等等。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.

在一些实施例中,当第二图形化代码的代码类型为第二类型的情况下,在执行该第二图形化代码之前,需要判断加入第一编队的至少一个虚拟对象是否满足执行条件。示例性地,当第二图形化代码的代码类型为第二类型的情况下,在执行该第二图形化代码时,需要判断是否对该第二图形化代码执行完毕。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.

在一些实施例中,当第二图形化代码的代码类型为第二类型的情况下,在执行该第二图形化代码之前,不需要判断加入第一编队的至少一个虚拟对象是否满足执行条件。示例性地,当第二图形化代码的代码类型为第二类型的情况下,在执行该第二图形化代码时,不需要判断是否对该第二图形化代码执行完毕。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.

在一些实施例中,当第二图形化代码的代码类型为第一类型的情况下,在执行该第二图形化代码之前,需要判断加入第一编队的至少一个虚拟对象是否满足执行条件。示例性地,当第二图形化代码的代码类型为第一类型的情况下,在执行该第二图形化代码时,需要判断是否对该第二图形化代码执行完毕。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.

在一些实施例中,当第二图形化代码的代码类型为第一类型的情况下,在执行该第二图形化代码之前,不需要判断加入第一编队的至少一个虚拟对象是否满足执行条件。示例性地,当第二图形化代码的代码类型为第一类型的情况下,在执行该第二图形化代码时,不需要判断是否对该第二图形化代码执行完毕。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.

在一些实施例中,对于无人机编队积木(也即图形化代码),按照积木执行时间可以分成2类,第一类(也即上述第一类型的图形化代码)是不需要执行一段时间的积木(比如设置速度或者灯光等属性,修改属性后认为该积木执行完毕),不需要特殊处理;第二类(也即上述第二类型的图形化代码)是需要执行一段时间的积木(比如无人机以t速度向前飞行t时间,t时间后认为该积木执行完毕),其中一组无人机执行一段时间的积木需要特殊处理。示例性地,特殊处理包括以上步骤S1~步骤S6,也即判断加入第一编队的至少一个虚拟对象是否满足执行条件以及判断对该图形化代码是否执行完毕。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.

本申请实施例考虑到瞬时性控制的图形化代码一般只要修改对应位置的数值即可,出错可能性较小,所以无需判断是否满足执行条件以及是否执行完毕,而持续性控制的图形化代码通常需要执行一段时间,尤其在编队内存在较多虚拟对象时,相对较为容易出错,因此对于持续性控制的图形化代码需要判断是否满足执行条件以及是否执行完毕。此种处理方式有利于保证图形化代码的顺利执行,减少出错可能。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.

本申请实施例提供的技术方案还提供有对编队的纠错功能。The technical solution provided in the embodiment of the present application also provides an error correction function for the formation.

示例性地,在根据第一图形化代码,获取到加入编队中的至少一个虚拟对象之后,对该至少一个虚拟对象编入同一队的合理性进行判断,在判断结果为不合理的情况下,暂停执行代码,且发送编队纠错提示信息,该编队纠错提示信息用于展示在用户界面上,给用户进行查看,从而及时对编队进行修改。在判断结果为合理的情况下,不发送编队纠错提示信息。示例性地,该编队纠错提示信息包括不合理虚拟对象的状态信息,该不合理虚拟对象是被认为是不应当编入该编队的虚拟对象。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.

示例性地,获取加入编队中的各个虚拟对象的位置信息,当存在位置偏差较大的虚拟对象时,判断结果为不合理。如一个编队中有10个虚拟对象,有9个虚拟对象彼此之间的距离小于阈值,而仅有第10个虚拟对象和这9个虚拟对象的距离均大于阈值,则认为这第10个虚拟对象存在误差,判断结果为不合理。当不存在位置偏差较大的虚拟对象时,判断结果为合理。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.

示例性地,获取历史编队信息(历史的编队以及加入编队的对象),将当前编队信息和历史编队信息进行比较,当误差大于阈值时,判断结果为不合理。示例性地,获取历史编队信息(历史的编队以及加入编队的对象),将当前编队信息和历史编队信息进行比较,当误差小于阈值时,判断结果为合理。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.

本申请实施例提供的技术方案,从图形化编程结果中每获取一次图形化编程结果时,按照执行顺序检测到第一图形化代码时,先对合理性进行判断,在合理之后,再执行该第一图形化代码。此种方式可以提前规避显性错误,并及时报送给用户,有利于用户及时修改,从而提升代码的执行效率。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.

请参考图30,其示出了本申请一个实施例提供的图形化代码的执行方法的流程图。该方法各步骤的执行主体可以是上文介绍的终端设备10,也可以是终端设备10上运行的目标应用程序的客户端,还可以是服务器20。在下文方法实施例中,为了便于描述,仅以各步骤的执行主体为“计算机设备”进行介绍说明。该方法可以包括如下几个步骤(3010~3030)中的至少一个步骤。Please refer to Figure 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).

步骤3010,获取图形化编程结果,图形化编程结果包括多个按序执行的图形化代码,图形化代码用于对虚拟场景中的一个或多个虚拟对象进行处理。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.

步骤3020,根据第一配置信息,更新第一对应关系表,得到更新后的第一对应关系表,第一对应关系表用于记录编队和虚拟对象之间的对应关系,更新后的第一对应关系表中记录有第一编队的标识信息和加入第一编队的至少一个虚拟对象分别对应的标识信息之间的对应关系。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.

在一些实施例中,在执行图形化编程结果时,每遇到一次第一图形化代码,则对第一对应关系表更新一次。在执行图形化编程结果中第一次碰到第一图形化代码时,根据第一图形化代码中的第一配置信息,创建第一对应关系表。当后续再次遇到第一图形化代码时,只需要对该第一对应关系表进行更新即可。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.

在一些实施例中,第一图形化代码中包括第一配置信息,第一配置信息用于对第一编队包括的虚拟对象进行配置,第一配置信息包括第一编队的标识信息和加入第一编队的至少一个虚拟对象分别对应的标识信息。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.

在一些实施例中,在步骤3030之前,对第二图形化代码进行编译,在编译成功的情况下,得到第二图形化代码对应的编译后的控制逻辑代码,编译后的控制逻辑代码被运行以控制加入第一编队的至少一个虚拟对象,控制逻辑代码是指封装在第二图形化代码中的编程语言;在编译不成功的情况下,发送修改提示信息,修改提示信息用于指示对第二图形化代码进行编辑。示例性地,修改提示信息包括文字提示信息、语音播报信息、图片提示信息等等。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.

在一些实施例中,在执行代码时,需要对封装在图形化代码中的编程语言进行编译,以得到可以被执行的编译后的代码。如将图形化代码翻译成Unity可以运行的C#代码。在一些实施例中,除了对第二图形化代码进行编译之外,还需要对图形化编程结果中的其他图形化代码进行编译。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.

在一些实施例中,如图31的3100所示,用户操作的是图形化代码,在积木编辑界面对图形化代码(积木块)进行操作(包括拖拽、组合等),点击运行控件后,对图形化代码进行编译。经过编译器编译后,如果有报错,会提示代码有问题,请用户修改后重试;如果没有报错,则开始运行代码。In some embodiments, as shown in 3100 of FIG. 31 , the user operates the graphical code, operates the graphical code (building block) in the building block editing interface (including dragging, combining, etc.), and clicks the run control to compile the graphical code. After the compiler compiles, if there is an error, it will prompt that there is a problem with the code, and ask the user to modify it and try again; if there is no error, the code will start to run.

步骤3030,执行图形化编程结果中包括的第二图形化代码,对加入第一编队的至少一个虚拟对象进行统一控制。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.

在一些实施例中,第二图形化代码中包括第二配置信息,第二配置信息用于指示第一编队以及对第一编队进行控制的参数,第二配置信息中包括第一编队的标识信息和控制参数信息。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.

在一些实施例中,第一编队的标识信息用于从更新后的第一对应关系表中查找得到加入第一编队的至少一个虚拟对象,控制参数信息用于对第二图形化代码对应的原始逻辑代码进行修改,得到第二图形化代码对应的控制逻辑代码,控制逻辑代码是指封装在第二图形化代码中的编程语言。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.

在一些实施例中,这里的标识信息是用于表征该编队的信息,如编号、标号、序号等等。在一些实施例中,第二图形化代码为“编队1向左飞行1米”,则第二配置信息中包括的第一编队的标识信息为“编队1”,和控制参数信息为“左、1米”。示例性地,第二图形化代码对应的原始控制代码逻辑是一致的,也即封装在该第二图形化代码中的编程语言是一致,那么无论是向左飞行还是向右飞行,仅仅是控制参数不同,而原始控制代码逻辑一致,因此只需要修改编程语言中的控制参数即可得到第二图形化代码对应的控制逻辑代码。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.

在一些实施例中,利用第二配置信息中的控制参数信息,修改第二图形化代码中封装的编程语言,得到修改后的编程语言,利用修改后的编程语言对加入第一编队的至少一个虚拟对象进行控制。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.

在一些实施例中,获取第三配置信息,第三配置信息用于对在虚拟场景中已创建的虚拟对象进行配置,第三配置信息包括已创建的虚拟对象的标识信息和已创建的虚拟对象的实例信息,实例信息用于指示虚拟对象对应的配置信息。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.

示例性地,用户可以在图形化编程工具中创建新增虚拟对象,还可以对该新增虚拟对象的配置信息进行修改,因此根据最后保存的已创建的虚拟对象和其对应的配置信息来确定该虚拟对象的实例信息。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.

在一些实施例中,根据第三配置信息,更新第二对应关系表,得到更新后的第二对应关系表,第二对应关系表用于记录虚拟对象和实例信息之间的对应关系,实例信息用于在执行第二图形化代码对虚拟对象进行控制时提供虚拟对象对应的配置信息。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.

示例性地,根据原始的已创建的虚拟对象的实例信息,来构建第二对应关系表。Exemplarily, the second correspondence table is constructed according to the instance information of the original created virtual object.

在一些实施例中,针对已创建的虚拟对象中的第一虚拟对象,在执行第二图形化代码,对第一虚拟对象进行控制的情况下,根据第一虚拟对象的标识信息,从更新后的第二对应关系表中查找得到第一虚拟对象的实例信息。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.

示例性地,计算机设备预先存储了原始的第二对应关系表,第二对应关系表用于记录虚拟对象和实例信息之间的对应关系。也即,将虚拟场景中已配置的虚拟对象以表格形式记录。示例性地,每个虚拟对象的标识信息对应该虚拟对象的实例信息。示例性地,实例信息中包括该虚拟对象的配置信息,该配置信息包括该虚拟对象的位置、颜色、灯光等等。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.

在一些实施例中,根据对第一虚拟对象的控制结果,更新第二对应关系表中第一虚拟对象的实例信息。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.

示例性地,当利用第二图形化代码对应的控制逻辑代码来对第一虚拟对象进行控制时,是在该虚拟对象的实例信息的基础上对该虚拟对象进行控制的。因此,当开始控制时,需要查找到对应的实例信息。当控制结束之后,该虚拟对象的配置信息发生改变,此时需要利用该发生改变的配置信息去更新该第一虚拟对象的实例信息。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 changed configuration information needs to be used to update the instance information of the first virtual object.

在一些实施例中,在执行第二图形化代码,未对第一虚拟对象进行控制的情况下,不更新第二对应关系表中第一虚拟对象的实例信息。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.

示例性地,在执行第二图形化代码,未对第一虚拟对象进行控制的情况下,说明第一虚拟对象未被控制,则配置信息未发生变化,无需更新第二对应关系表中第一虚拟对象的实例信息。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.

仍以虚拟对象为虚拟无人机为例,代码控制无人机编队的核心在于运行时的实现,无人机编队运行时依赖Unity提供的生命周期,在生命周期每个主循环中根据每个无人机的属性(属性指的是无人机的速度、方向等基本属性,根据属性计算出该帧无人机的运动,更新无人机的位置、朝向等状态),更新无人机的状态。无人机编队运行时目标应用程序中包括编队无人机管理器和无人机编队执行器两部分。Still taking the virtual drone as an example, the core of code control of drone formation lies in the implementation at runtime. The drone formation runtime relies on the life cycle provided by Unity. In each main loop of the life cycle, the drone status is updated according to the attributes of each drone (attributes refer to the basic attributes of the drone, such as speed and direction. The motion of the drone in this frame is calculated according to the attributes, and the position, orientation and other states of the drone are updated). The target application of drone formation runtime includes two parts: formation drone manager and drone formation executor.

请参考图32,其示出了本申请一个实施例提供的组件结构示意图。如图32的3200所示,编队无人机管理器类是一个单例(单例是一种创建型设计模式,保证一个类只有一个实例,并提供一个访问该实例的全局节点),对外提供了以下功能,包括新增无人机,删除无人机,修改无人机信息,通过无人机的标识信息获取无人机实例(无人机实例指的是无人机对象的具体实现),将无人机加入编队,将无人机从编队删除,通过编队的标识信息获取一组无人机的标识信息的列表。用户在功能面板界面对无人机的所有操作都受到编队无人机管理器的管理。示例性地,编队无人机管理器维护编队中的各个虚拟对象以及各个虚拟对象的实例信息。示例性地,编队无人机管理器用于对于上述第一对应关系表和上述第二对应关系表中的至少之一进行动态更新。Please refer to Figure 32, which shows a schematic diagram of the component structure provided by an embodiment of the present application. As shown in 3200 of Figure 32, 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 to the outside, 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 a group of drone identification information through the formation's identification information. All operations of 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.

无人机编队执行器类由无人机编队运行时类创建并动态挂载,它负责执行用户代码的生命周期状态管理。无人机编队执行器类继承自Unity脚本基类Monobehaviour,由Mono脚本生命周期函数驱动,决定是否执行用户代码下一步操作,从而推动无人机编队运行时执行下一步操作并更新所有无人机的状态。也即,无人机编队执行器用于执行各个图形化代码对应的控制逻辑代码,以控制编队内的至少一个虚拟对象,更新其属性或者控制其移动。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.

在一些实施例中,编辑后的图形化代码在被编译时,控制单个虚拟对象的图形化代码中包含无人机的标识信息,控制编队(包括第一图形化代码和第二图形化代码)的图形化代码包含编队的标识信息。以虚拟对象为无人机为例,无人机编队管理器中有无人机的标识信息和无人机的实例信息的对应关系表,通过无人机的标识信息可以获取到对应的无人机的实例信息,获取到无人机的实例信息后就对该无人机进行控制。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.

如图33所示,编辑后的图形化代码3300用于对单个无人机进行控制,编辑后的图形化代码3300对应的控制逻辑代码3301中包括单个无人机的标识信息(droneID)。编辑后的第一图形化代码3302用于对将虚拟对象无人机加入编队,编辑后的第一图形化代码3302对应的控制逻辑代码3303中包括无人机的标识信息(droneID)和加入的编队的标识信息(formationID)。As shown in FIG33 , 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.

本申请实施例提供的技术方案通过利用第一配置信息来构建第一对应关系表,也即建立编队和虚拟对象的对应关系,根据第三配置信息来构建第二对应关系表,也即虚拟对象和实例的对应关系,通过第二配置信息可以从第一对象关系表中查找到加入编队的虚拟对象的标识信息,再通过查找第二对应关系表可以查找到该加入编队的虚拟对象的实例信息,从而实现对于虚拟对象的控制。本申请实施例提供的技术方案能够实现对于虚拟对象的快速查找,从而有利于实现对于编队内的虚拟对象的统一控制,从而提升代码执行效率。The technical solution provided by 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 joining the formation can be found from the first object relationship table through the second configuration information, and the instance information of the virtual object joining the formation can be found by searching the second correspondence table, thereby realizing control over the virtual object. The technical solution provided by 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.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。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.

请参考图34,其示出了本申请一个实施例提供的图形化编程装置的框图。如图34所示,该装置3400可以包括:界面显示模块3410、图形化代码显示模块3420以及运行模块3430。Please refer to FIG34 , which shows a block diagram of a graphical programming device provided by an embodiment of the present application. As shown in FIG34 , the device 3400 may include: an interface display module 3410 , a graphical code display module 3420 , and an operation module 3430 .

界面显示模块3410,用于显示图形化编程工具的代码编辑界面,所述代码编辑界面中包括多个预设的图形化代码,所述图形化代码用于对一个或多个对象进行处理;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;

图形化代码显示模块3420,用于响应于针对所述多个预设的图形化代码中第一图形化代码的编辑操作,显示编辑后的第一图形化代码,所述第一图形化代码用于将至少一个对象加入同一个编队,所述编辑后的第一图形化代码用于将至少一个对象加入第一编队;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;

图形化代码显示模块3420,还用于响应于针对所述多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,所述第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,所述编辑后的第二图形化代码用于对所述第一编队中的至少一个对象进行统一控制;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;

运行模块3430,用于运行图形化编程结果,以对所述第一编队中的至少一个对象进行控制,所述图形化编程结果包括所述编辑后的第一图形化代码和所述编辑后的第二图形化代码。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.

在一些实施例中,所述第一图形化代码中包括对象配置区,所述对象配置区用于配置加入同一个编队的至少一个对象。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.

在一些实施例中,图形化代码显示模块3420,用于响应于针对所述第一图形化代码中的所述对象配置区的触发操作,显示对象选择界面,所述对象选择界面中显示有多个元素,每个元素对应于一个对象。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.

图形化代码显示模块3420,用于响应于针对所述多个元素中的至少一个第一元素的选择操作,显示所述编辑后的第一图形化代码,所述至少一个第一元素对应的对象加入所述第一编队。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.

在一些实施例中,所述选择操作包括针对各个所述第一元素的点击操作。In some embodiments, the selection operation includes a click operation on each of the first elements.

在一些实施例中,所述选择操作为以第一位置为起点,且以第二位置为终点的框选操作,所述第一位置和所述第二位置所构建的框选区域中包括的元素为所述第一元素。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.

在一些实施例中,处于选中状态的所述第一元素,和处于未选中状态的其它元素区别显示;或者,处于选中状态的所述第一元素对应的对象,和处于未选中状态的其它元素对应的对象在虚拟场景中区别显示;或者,处于选中状态的所述第一元素对应的对象在地图导航界面中的标记,和处于未选中状态的其它元素对应的对象在所述地图导航界面中的标记区别显示,其中,所述地图导航界面中显示有所述虚拟场景的地图,以及所述虚拟场景中各个已创建的对象在所述地图中的标记;或者,处于选中状态的所述第一元素对应的对象在功能面板界面中的标识,和处于未选中状态的其它元素对应的对象在所述功能面板界面中的标识区别显示,其中,所述功能面板界面用于显示所述虚拟场景中各个已创建的对象分别对应的配置信息,所述配置信息包括所述对象的标识。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.

在一些实施例中,如图35所示,所述装置还包括状态调整模块3440。In some embodiments, as shown in FIG. 35 , the device further includes a state adjustment module 3440 .

在一些实施例中,状态调整模块3440,用于响应于针对所述第一图形化代码中的所述对象配置区的触发操作,根据元素和对象的对应关系,确定所述多个元素分别对应的状态,当所述元素对应有虚拟场景中已创建的对象时,所述元素处于未选中状态,当所述元素不对应有虚拟场景中已创建的对象时,所述元素处于未创建状态。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.

状态调整模块3440,还用于对于所述多个元素中的第m个元素,在所述第m个元素被选择,且所述第m个元素的状态为未创建状态的情况下,不变更所述第m个元素的状态;在所述第m个元素被选择,且所述第m个元素的状态为未选中状态的情况下,更改所述第m个元素的状态为选中状态,m为正整数。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.

状态调整模块3440,还用于在所述第m个元素被取消选择,且所述第m个元素的状态为选中状态的情况下,更改所述第m个元素的状态为未选中状态。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.

在一些实施例中,所述第一图形化代码中包括对象配置区,所述对象配置区用于配置加入同一个编队的至少一个对象。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.

在一些实施例中,图形化代码显示模块3420,用于响应于针对所述第一图形化代码中的所述对象配置区的触发操作,显示处于编辑状态的虚拟场景界面,所述虚拟场景界面中显示有虚拟场景以及所述虚拟场景中已创建的对象,不同的对象在所述虚拟场景中的位置不同。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.

在一些实施例中,图形化代码显示模块3420,用于响应于针对所述已创建的对象中的至少一个第一对象的选择操作,显示所述编辑后的第一图形化代码,所述至少一个第一对象加入所述第一编队。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.

在一些实施例中,所述第一图形化代码中还包括编队配置区,所述编队配置区用于配置所述至少一个对象加入的编队。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.

在一些实施例中,图形化代码显示模块3420,还用于响应于针对所述第一图形化代码中的所述编队配置区的触发操作,显示编队选择界面,所述编队选择界面中显示有多个编队号码,每个编队号码对应于一个编队。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.

图形化代码显示模块3420,还用于响应于针对所述多个编队号码中的第一编队号码的选择操作,显示所述编辑后的第一图形化代码,所述第一编队号码对应的编队为所述第一编队。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.

在一些实施例中,界面显示模块3410,还用于响应于针对功能面板界面中的对象创建控件的触发操作,在所述功能面板界面中显示新增对象对应的配置信息,所述功能面板界面用于显示虚拟场景中各个已创建的对象分别对应的配置信息,所述配置信息包括所述对象的标识。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.

界面显示模块3410,还用于响应于针对所述新增对象对应的配置信息的修改操作,显示修改后的配置信息。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.

界面显示模块3410,还用于在所述虚拟场景中显示基于所述修改后的配置信息创建的所述新增对象。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.

在一些实施例中,所述功能面板界面中包括搜索输入栏。In some embodiments, the function panel interface includes a search input field.

在一些实施例中,界面显示模块3410,还用于响应于针对所述搜索输入栏的输入操作,显示在所述搜索输入栏输入的针对所述已创建的对象的搜索信息。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.

界面显示模块3410,还用于显示所述搜索信息指向的对象对应的配置信息。The interface display module 3410 is also used to display the configuration information corresponding to the object pointed to by the search information.

在一些实施例中,所述功能面板界面中包括各个已创建的对象分别对应的页签。In some embodiments, the function panel interface includes tabs corresponding to each created object.

在一些实施例中,界面显示模块3410,还用于响应于针对所述各个已创建的对象分别对应的页签中目标页签的选择操作,显示所述目标页签指向的对象对应的配置信息;或者,响应于针对所述目标页签的删除操作,将所述目标页签指向的对象从虚拟场景中删除;或者,响应于针对所述目标页签的编队设置操作,更改所述目标页签指向的对象所加入的编队。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.

在一些实施例中,运行模块3430,用于运行所述图形化编程结果,显示在虚拟场景中对所述第一编队中至少一个对象的控制过程。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.

在一些实施例中,界面显示模块3410,还用于显示场景控件、代码编辑控件中的至少之一;所述场景控件用于切换显示虚拟场景界面,所述虚拟场景界面中包括虚拟场景以及所述虚拟场景中已创建的对象,所述代码编辑控件用于切换显示所述代码编辑界面。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.

界面显示模块3410,还用于运行所述图形化编程结果,响应于对所述场景控件的触发操作,显示所述虚拟场景界面,在所述虚拟场景界面中显示在所述虚拟场景中对所述第一编队中至少一个对象的控制过程。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.

界面显示模块3410,还用于响应于对所述代码编辑控件的触发操作,重新显示所述代码编辑界面,所述代码编辑界面中包括所述图形化编程结果。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.

在一些实施例中,界面显示模块3410,还用于响应于针对所述虚拟场景界面中所述已创建的对象中目标对象的编队设置操作,显示编队选择界面,所述编队选择界面中包括多个编队号码,每个编队号码对应一个编队;响应于针对所述多个编队号码中第二编队号码的选择操作,确定所述目标对象加入所述第二编队号码对应的编队。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.

需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。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.

请参考图36,其示出了本申请一个实施例提供的计算机设备3600的结构框图。该计算机设备3600可以是任何具备数据计算、处理和存储能力的电子设备。该计算机设备3600可用于实现上述实施例中提供的图形化编程方法。Please refer to Figure 36, which shows a block diagram of a computer device 3600 provided in one embodiment of the present application. The computer device 3600 can be any electronic device with data calculation, processing and storage capabilities. The computer device 3600 can be used to implement the graphical programming method provided in the above embodiment.

通常,计算机设备3600包括有:处理器3601和存储器3602。Typically, the computer device 3600 includes: a processor 3601 and a memory 3602 .

处理器3601可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器3601可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(FieldProgrammable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器3601也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器3601可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器3601还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。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.

存储器3602可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器3602还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器3602中的非暂态的计算机可读存储介质用于存储计算机程序,所述计算机程序经配置以由一个或者一个以上处理器执行,以实现上述图形化编程方法。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.

本领域技术人员可以理解,图36中示出的结构并不构成对计算机设备3600的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art will appreciate that the structure shown in FIG. 36 does not limit the computer device 3600 and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序在被处理器执行时以实现上述图形化编程方法。可选地,该计算机可读存储介质可以包括:ROM(Read-Only Memory,只读存储器)、RAM(Random AccessMemory,随机存取存储器)、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取存储器可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取存储器)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。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).

在示例性实施例中,还提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序存储在计算机可读存储介质中。计算机设备的处理器从所述计算机可读存储介质中读取所述计算机程序,所述处理器执行所述计算机程序,使得所述计算机设备执行上述图形化编程方法。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.

需要说明的是,本申请中相关数据收集处理在实例应用时应该严格根据相关国家法律法规的要求,获取个人信息主体的知情同意或单独同意,并在法律法规及个人信息主体的授权范围内,开展后续数据使用及处理行为。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.

应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。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 with each other 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.

以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。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 (18)

1.一种图形化编程方法,其特征在于,所述方法包括:1. A graphical programming method, 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 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; 响应于针对所述多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,所述第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,所述编辑后的第二图形化代码用于对所述第一编队中的至少一个对象进行统一控制;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; 运行图形化编程结果,以对所述第一编队中的至少一个对象进行控制,所述图形化编程结果包括所述编辑后的第一图形化代码和所述编辑后的第二图形化代码。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. 2.根据权利要求1所述的方法,其特征在于,所述第一图形化代码中包括对象配置区,所述对象配置区用于配置加入同一个编队的至少一个对象;2. The method according to claim 1, characterized in that 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; 所述响应于针对所述多个预设的图形化代码中第一图形化代码的编辑操作,显示编辑后的第一图形化代码,包括:In response to an editing operation on a 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 at least one first element among the plurality of elements, the edited first graphical code is displayed, and an object corresponding to the at least one first element is added to the first formation. 3.根据权利要求2所述的方法,其特征在于,所述选择操作包括针对各个所述第一元素的点击操作。3 . The method according to claim 2 , wherein the selection operation comprises a click operation on each of the first elements. 4.根据权利要求2所述的方法,其特征在于,所述选择操作为以第一位置为起点,且以第二位置为终点的框选操作,所述第一位置和所述第二位置所构建的框选区域中包括的元素为所述第一元素。4. The method according to claim 2 is characterized in that 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. 5.根据权利要求2所述的方法,其特征在于,5. The method according to claim 2, 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.根据权利要求2所述的方法,其特征在于,所述方法还包括:6. The method according to claim 2, 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; 对于所述多个元素中的第m个元素,在所述第m个元素被选择,且所述第m个元素的状态为未创建状态的情况下,不变更所述第m个元素的状态;在所述第m个元素被选择,且所述第m个元素的状态为未选中状态的情况下,更改所述第m个元素的状态为选中状态,m为正整数;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; 在所述第m个元素被取消选择,且所述第m个元素的状态为选中状态的情况下,更改所述第m个元素的状态为未选中状态。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.根据权利要求1所述的方法,其特征在于,所述第一图形化代码中包括对象配置区,所述对象配置区用于配置加入同一个编队的至少一个对象;7. The method according to claim 1, characterized in that 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; 所述响应于针对所述多个预设的图形化代码中第一图形化代码的编辑操作,显示编辑后的第一图形化代码,包括:In response to an editing operation on a 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 at least one first object among the created objects, the edited first graphical code is displayed, and the at least one first object is added to the first formation. 8.根据权利要求2或7所述的方法,其特征在于,所述第一图形化代码中还包括编队配置区,所述编队配置区用于配置所述至少一个对象加入的编队;所述方法还包括:8. The method according to claim 2 or 7, characterized in that the first graphical code further includes a formation configuration area, and the formation configuration area is used to configure the formation to which the at least one object joins; the method further 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.根据权利要求1所述的方法,其特征在于,所述方法还包括:9. The method according to claim 1, 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.根据权利要求9所述的方法,其特征在于,所述功能面板界面中包括搜索输入栏;所述方法还包括:10. The method according to claim 9, characterized in that the function panel interface includes a search input bar; the method further comprises: 响应于针对所述搜索输入栏的输入操作,显示在所述搜索输入栏输入的针对所述已创建的对象的搜索信息;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.根据权利要求9所述的方法,其特征在于,所述功能面板界面中包括各个已创建的对象分别对应的页签;所述方法还包括:11. The method according to claim 9, characterized in that the function panel interface includes tabs corresponding to each created object; the method further comprises: 响应于针对所述各个已创建的对象分别对应的页签中目标页签的选择操作,显示所述目标页签指向的对象对应的配置信息;或者,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.根据权利要求1所述的方法,其特征在于,所述运行图形化编程结果,以对所述第一编队中的至少一个对象进行控制,包括:12. The method according to claim 1, wherein the step of running the graphical programming result to control at least one object in the first formation comprises: 运行所述图形化编程结果,显示在虚拟场景中对所述第一编队中至少一个对象的控制过程。The graphical programming result is run to display the control process of at least one object in the first formation in the virtual scene. 13.根据权利要求12所述的方法,其特征在于,所述方法还包括:13. The method according to claim 12, 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 at least one object 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 in the virtual scene interface a control process of at least one object in the first formation in the virtual scene; 所述方法还包括:The method further comprises: 响应于对所述代码编辑控件的触发操作,重新显示所述代码编辑界面,所述代码编辑界面中包括所述图形化编程结果。In response to a triggering operation on the code editing control, the code editing interface is redisplayed, and the code editing interface includes the graphical programming result. 14.根据权利要求13所述的方法,其特征在于,所述方法还包括:14. The method according to claim 13, 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.一种图形化编程装置,其特征在于,所述装置包括:15. A graphical programming device, 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 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; 所述图形化代码显示模块,还用于响应于针对所述多个预设的图形化代码中第二图形化代码的编辑操作,显示编辑后的第二图形化代码,所述第二图形化代码用于对同一个编队中的至少一个对象进行统一控制,所述编辑后的第二图形化代码用于对所述第一编队中的至少一个对象进行统一控制;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; 运行模块,用于运行图形化编程结果,以对所述第一编队中的至少一个对象进行控制,所述图形化编程结果包括所述编辑后的第一图形化代码和所述编辑后的第二图形化代码。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. 16.一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现如权利要求1至14任一项所述的图形化编程方法。16. A computer device, characterized in that the computer device comprises 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. 17.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现如权利要求1至14任一项所述的图形化编程方法。17. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the graphical programming method according to any one of claims 1 to 14. 18.一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序,所述计算机程序存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机程序,以实现如权利要求1至14任一项所述的图形化编程方法。18. A computer program product, characterized in that the computer program product comprises a computer program, 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.
CN202410341037.4A 2024-03-22 2024-03-22 Graphical programming method, device, equipment and storage medium Active CN118132059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410341037.4A CN118132059B (en) 2024-03-22 2024-03-22 Graphical programming method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410341037.4A CN118132059B (en) 2024-03-22 2024-03-22 Graphical programming method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118132059A true CN118132059A (en) 2024-06-04
CN118132059B CN118132059B (en) 2024-12-17

Family

ID=91240306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410341037.4A Active CN118132059B (en) 2024-03-22 2024-03-22 Graphical programming method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118132059B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190104012A (en) * 2019-08-16 2019-09-05 엘지전자 주식회사 Method for controlling vehicle in autonomous driving system and apparatus thereof
CN110354494A (en) * 2019-07-23 2019-10-22 网易(杭州)网络有限公司 The control method of object, device, computer equipment and storage medium in game
CN110825121A (en) * 2018-08-08 2020-02-21 纬创资通股份有限公司 Control device and unmanned aerial vehicle control method
KR20210118298A (en) * 2020-03-20 2021-09-30 경일대학교산학협력단 High efficiency drone work system and drone work method of parallel simultaneous work and continuous alternation
CN113535872A (en) * 2021-07-12 2021-10-22 中国人民解放军战略支援部队信息工程大学 Multi-granularity formation motion visualization method based on object
US20230058405A1 (en) * 2021-08-20 2023-02-23 Sony Group Corporation Unmanned aerial vehicle (uav) swarm control
CN116841208A (en) * 2023-08-30 2023-10-03 白杨时代(北京)科技有限公司 Unmanned underwater vehicle formation control simulation method, system and equipment
CN117046100A (en) * 2023-07-07 2023-11-14 网易(杭州)网络有限公司 Formation control method and device in game and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825121A (en) * 2018-08-08 2020-02-21 纬创资通股份有限公司 Control device and unmanned aerial vehicle control method
CN110354494A (en) * 2019-07-23 2019-10-22 网易(杭州)网络有限公司 The control method of object, device, computer equipment and storage medium in game
KR20190104012A (en) * 2019-08-16 2019-09-05 엘지전자 주식회사 Method for controlling vehicle in autonomous driving system and apparatus thereof
KR20210118298A (en) * 2020-03-20 2021-09-30 경일대학교산학협력단 High efficiency drone work system and drone work method of parallel simultaneous work and continuous alternation
CN113535872A (en) * 2021-07-12 2021-10-22 中国人民解放军战略支援部队信息工程大学 Multi-granularity formation motion visualization method based on object
US20230058405A1 (en) * 2021-08-20 2023-02-23 Sony Group Corporation Unmanned aerial vehicle (uav) swarm control
CN117046100A (en) * 2023-07-07 2023-11-14 网易(杭州)网络有限公司 Formation control method and device in game and electronic equipment
CN116841208A (en) * 2023-08-30 2023-10-03 白杨时代(北京)科技有限公司 Unmanned underwater vehicle formation control simulation method, system and equipment

Also Published As

Publication number Publication date
CN118132059B (en) 2024-12-17

Similar Documents

Publication Publication Date Title
CN103197929B (en) A kind of graphic programming system and method for children-oriented
US9478059B2 (en) Animated audiovisual experiences driven by scripts
US20080184139A1 (en) System and method for generating graphical user interfaces and graphical user interface models
CN109513212B (en) 2D mobile game UI (user interface) and scenario editing method and system
CN111857717B (en) UI editing method, device, equipment and computer readable storage medium
CN113434197B (en) Resource release method, device, computer equipment and computer readable storage medium
US20150026573A1 (en) Media Editing and Playing System and Method Thereof
CN111541914B (en) Video processing method and storage medium
CN109032568A (en) Generation method, terminal device and the storage medium of programmed logic
KR20170078651A (en) Authoring tools for synthesizing hybrid slide-canvas presentations
MX2008000515A (en) Smooth transitions between animations.
CN102662664A (en) Interface animation realization method and system
CN117082683B (en) Lighting effect applications, playback methods and devices, equipment and media of spliced lamps
CN105279222A (en) Media editing and playing method and system
KR101831802B1 (en) Method and apparatus for producing a virtual reality content for at least one sequence
CN102508662A (en) General mobile game development system and method based on BREW (Binary Runtime Environment for Wireless) platform
CN113254006B (en) Robot interaction method, system, device, electronic equipment and storage medium
CN115080016A (en) Method, device, device and medium for implementing extended function based on UE editor
US20110209117A1 (en) Methods and systems related to creation of interactive multimdedia applications
CN109391848A (en) A kind of interactive advertisement system
CN117234513A (en) Page data file generation method and device, electronic equipment, medium and product
CN113129436B (en) A method for generating three-dimensional presentations
CN113207039B (en) Video processing method and device, electronic equipment and storage medium
CN114130017A (en) Game engine-based interface deployment method, device, device and storage medium
CN118132059A (en) Graphical programming method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant