CN118170362A - Module creation method and device based on visual programming, electronic equipment and medium - Google Patents

Module creation method and device based on visual programming, electronic equipment and medium Download PDF

Info

Publication number
CN118170362A
CN118170362A CN202211537481.0A CN202211537481A CN118170362A CN 118170362 A CN118170362 A CN 118170362A CN 202211537481 A CN202211537481 A CN 202211537481A CN 118170362 A CN118170362 A CN 118170362A
Authority
CN
China
Prior art keywords
module
custom
creation
area
function
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.)
Pending
Application number
CN202211537481.0A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Robot Technology Co Ltd
Original Assignee
Beijing Xiaomi Robot Technology 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 Beijing Xiaomi Robot Technology Co Ltd filed Critical Beijing Xiaomi Robot Technology Co Ltd
Priority to CN202211537481.0A priority Critical patent/CN118170362A/en
Publication of CN118170362A publication Critical patent/CN118170362A/en
Pending legal-status Critical Current

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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The disclosure relates to a module creation method, a device, an electronic device and a medium based on visual programming. The method comprises the following steps: responding to a custom module creation operation, displaying a module creation page, wherein the module creation page comprises a first module display area and a module creation area; and sequentially moving the plurality of functional modules in the first module display area to the module creation area to create a custom module, wherein the plurality of functional modules in the custom module are sequentially connected, and the functional modules are used for controlling the intelligent equipment to execute corresponding actions. The method enriches the modules which can be used in the visual programming process by creating the custom modules, can directly use the custom modules in the visual programming process, does not need to combine a plurality of functional modules, and is more convenient and quicker to use.

Description

基于可视化编程的模块创建方法、装置、电子设备及介质Module creation method, device, electronic device and medium based on visual programming

技术领域Technical Field

本公开涉及计算机技术领域,尤其涉及一种基于可视化编程的模块创建方法、装置、电子设备及介质。The present disclosure relates to the field of computer technology, and in particular to a module creation method, device, electronic device and medium based on visual programming.

背景技术Background technique

在计算机技术领域中,可视化编程是指允许用户通过图形化的操作程序元素来创建程序,并基于创建的程序来控制智能设备,该智能设备可以是机器人、机器狗或者其他智能设备。In the field of computer technology, visual programming refers to allowing users to create programs by graphically operating program elements and control intelligent devices based on the created programs. The intelligent devices can be robots, robot dogs or other intelligent devices.

相关技术中,电子设备向用户提供了一些基础功能模块,用户可以通过移动基础功能模块进行可视化的编程操作,从而控制智能设备实现基础功能模块对应的操作。但是,提供的基础功能模块较为单一,从而导致智能设备所能够实现的操作有限,存在局限性。In the related art, electronic devices provide users with some basic function modules, and users can perform visual programming operations by moving the basic function modules, thereby controlling the smart device to implement the operations corresponding to the basic function modules. However, the basic function modules provided are relatively single, which leads to limited operations that can be implemented by smart devices and has limitations.

发明内容Summary of the invention

为克服相关技术中存在的问题,本公开提供一种基于可视化编程的模块创建方法、装置、电子设备及介质。In order to overcome the problems existing in the related art, the present disclosure provides a module creation method, device, electronic device and medium based on visual programming.

根据本公开实施例的第一方面,提供一种基于可视化编程的模块创建方法,应用于电子设备,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a module creation method based on visual programming is provided, which is applied to an electronic device, and the method includes:

响应于自定义模块创建操作,显示模块创建页面,所述模块创建页面包括第一模块显示区域和模块创建区域;In response to the custom module creation operation, displaying a module creation page, the module creation page including a first module display area and a module creation area;

将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,创建自定义模块,所述自定义模块中的所述多个功能模块依次连接,所述功能模块用于控制智能设备执行对应的动作。Move the multiple function modules in the first module display area to the module creation area in sequence to create a custom module. The multiple function modules in the custom module are connected in sequence. The function modules are used to control the smart device to perform corresponding actions.

在一些实施例中,所述将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,创建自定义模块,包括:In some embodiments, the step of sequentially moving the plurality of function modules in the first module display area to the module creation area to create a custom module includes:

将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,得到模块组合,并运行所述模块组合;Moving the plurality of function modules in the first module display area to the module creation area in sequence to obtain a module combination, and running the module combination;

在所述模块组合可运行的情况下,对所述模块组合进行保存,得到所述自定义模块。When the module combination is executable, the module combination is saved to obtain the custom module.

在一些实施例中,所述第一模块显示区域包括多个功能类型,每个所述功能类型包括多个功能模块,所述将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,得到模块组合,包括:In some embodiments, the first module display area includes a plurality of function types, each of the function types includes a plurality of function modules, and the plurality of function modules in the first module display area are sequentially moved to the module creation area to obtain a module combination, including:

响应于对目标功能类型的选择操作,显示属于所述目标功能类型的功能模块,所述目标功能类型为所述多个功能类型中的任一功能类型;In response to a selection operation on a target function type, displaying function modules belonging to the target function type, the target function type being any one of the multiple function types;

将属于所述目标功能类型的多个功能模块依次移动至所述模块创建区域,得到所述模块组合。Move multiple function modules belonging to the target function type to the module creation area in sequence to obtain the module combination.

在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:

将属于所述目标功能类型的至少一个功能模块依次移动至所述任务编辑区域,并响应于对除所述目标功能类型之外的其他功能类型的选择操作,显示属于所述其他功能类型的功能模块,将属于所述其他功能类型的至少一个功能模块依次移动至所述任务编辑区域,得到所述模块组合。Move at least one function module belonging to the target function type to the task editing area in sequence, and in response to a selection operation of other function types except the target function type, display the function modules belonging to the other function types, and move at least one function module belonging to the other function types to the task editing area in sequence to obtain the module combination.

在一些实施例中,所述第一模块显示区域包括自定义功能类型,所述将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,创建自定义模块之后,所述方法还包括:In some embodiments, the first module display area includes a custom function type, and after the plurality of function modules in the first module display area are sequentially moved to the module creation area and the custom module is created, the method further includes:

响应于对所述自定义功能类型的选择操作,显示所述自定义模块。In response to a selection operation on the custom function type, the custom module is displayed.

在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:

响应于对所述自定义模块的编辑操作,编辑所述自定义模块,得到更新后的自定义模块。In response to the editing operation on the custom module, the custom module is edited to obtain an updated custom module.

在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:

响应于对所述自定义模块的分享操作,将所述自定义模块分享至目标页面。In response to a sharing operation on the custom module, the custom module is shared to a target page.

在一些实施例中,所述响应于自定义模块创建操作,显示模块创建页面,包括:In some embodiments, in response to the custom module creation operation, displaying a module creation page includes:

显示可视化编程页面;Display the visual programming page;

响应于对所述可视化编程页面中自定义模块配置选项的选择操作,显示所述自定义模块配置选项对应的创建控件;In response to a selection operation on a custom module configuration option in the visual programming page, displaying a creation control corresponding to the custom module configuration option;

响应于对所述创建控件的选择操作,显示所述模块创建页面。In response to a selection operation on the creation control, the module creation page is displayed.

在一些实施例中,所述响应于对所述创建控件的选择操作,显示所述模块创建页面,包括:In some embodiments, in response to the selection operation of the creation control, displaying the module creation page includes:

响应于对所述创建控件的选择操作,显示创建模块窗口;In response to a selection operation on the creation control, displaying a creation module window;

在所述创建模块窗口中,输入待创建的自定义模块的模块名称;In the Create Module window, enter the module name of the custom module to be created;

响应于对所述模块名称的确定操作,显示所述模块创建页面。In response to the determination operation of the module name, the module creation page is displayed.

在一些实施例中,所述将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,创建自定义模块之后,所述方法还包括:In some embodiments, after the plurality of function modules in the first module display area are sequentially moved to the module creation area and a custom module is created, the method further comprises:

基于所述自定义模块,创建目标任务;Based on the custom module, create a target task;

基于所述目标任务,控制智能设备,以使所述智能设备按照所述目标任务中的所述自定义模块执行对应的动作。Based on the target task, the smart device is controlled so that the smart device performs corresponding actions according to the custom module in the target task.

在一些实施例中,所述基于所述自定义模块,创建目标任务,包括:In some embodiments, the creating a target task based on the custom module includes:

显示任务编辑页面,所述任务编辑页面包括第二模块显示区域和任务编辑区域;Displaying a task editing page, wherein the task editing page includes a second module display area and a task editing area;

将所述第二模块显示区域中的所述自定义模块,移动至任务编辑区域,得到目标任务。Move the custom module in the second module display area to the task editing area to obtain the target task.

在一些实施例中,所述将所述第二模块显示区域中的所述自定义模块,移动至任务编辑区域,得到目标任务,包括:In some embodiments, moving the custom module in the second module display area to the task editing area to obtain the target task includes:

将所述第二模块显示区域中的多个功能模块以及所述自定义模块,依次移动至任务编辑区域,并将所述多个功能模块和所述自定义模块依次连接,得到所述目标任务,其中,并第一个模块与所述任务编辑区域中的开始模块相连接,所述第一个模块为所述自定义模块或者所述多个功能模块中的任一模块。Move the multiple function modules and the custom module in the second module display area to the task editing area in sequence, and connect the multiple function modules and the custom module in sequence to obtain the target task, wherein the first module is connected to the start module in the task editing area, and the first module is the custom module or any one of the multiple function modules.

根据本公开实施例的第二方面,提供一种基于可视化编程的模块创建装置,应用于电子设备,所述装置包括:According to a second aspect of an embodiment of the present disclosure, there is provided a module creation device based on visual programming, which is applied to an electronic device, and the device includes:

页面显示模块,被配置为响应于自定义模块创建操作,显示模块创建页面,所述模块创建页面包括第一模块显示区域和模块创建区域;A page display module, configured to display a module creation page in response to a custom module creation operation, wherein the module creation page includes a first module display area and a module creation area;

创建模块,被配置为将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,创建自定义模块,所述自定义模块中的所述多个功能模块依次连接,所述功能模块用于控制智能设备执行对应的动作。A creation module is configured to move multiple functional modules in the first module display area to the module creation area in sequence to create a custom module, in which the multiple functional modules are connected in sequence, and the functional module is used to control the smart device to perform corresponding actions.

在一些实施例中,所述创建模块,被配置为:In some embodiments, the creation module is configured to:

将所述第一模块显示区域中的多个功能模块依次移动至所述模块创建区域,得到模块组合,并运行所述模块组合;Moving the plurality of function modules in the first module display area to the module creation area in sequence to obtain a module combination, and running the module combination;

在所述模块组合可运行的情况下,对所述模块组合进行保存,得到所述自定义模块。When the module combination is executable, the module combination is saved to obtain the custom module.

在一些实施例中,所述第一模块显示区域包括多个功能类型,每个所述功能类型包括多个功能模块,所述创建模块,被配置为:In some embodiments, the first module display area includes multiple function types, each of the function types includes multiple function modules, and the creation module is configured to:

响应于对目标功能类型的选择操作,显示属于所述目标功能类型的功能模块,所述目标功能类型为所述多个功能类型中的任一功能类型;In response to a selection operation on a target function type, displaying function modules belonging to the target function type, the target function type being any one of the multiple function types;

将属于所述目标功能类型的多个功能模块依次移动至所述模块创建区域,得到所述模块组合。Move multiple function modules belonging to the target function type to the module creation area in sequence to obtain the module combination.

在一些实施例中,所述创建模块,被配置为:In some embodiments, the creation module is configured to:

将属于所述目标功能类型的至少一个功能模块依次移动至所述任务编辑区域,并响应于对除所述目标功能类型之外的其他功能类型的选择操作,显示属于所述其他功能类型的功能模块,将属于所述其他功能类型的至少一个功能模块依次移动至所述任务编辑区域,得到所述模块组合。Move at least one function module belonging to the target function type to the task editing area in sequence, and in response to a selection operation of other function types except the target function type, display the function modules belonging to the other function types, and move at least one function module belonging to the other function types to the task editing area in sequence to obtain the module combination.

在一些实施例中,所述第一模块显示区域包括自定义功能类型,所述装置还包括:In some embodiments, the first module display area includes a custom function type, and the device further includes:

自定义模块显示模块,被配置为响应于对所述自定义功能类型的选择操作,显示所述自定义模块。The custom module display module is configured to display the custom module in response to a selection operation on the custom function type.

在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:

自定义模块更新模块,被配置为响应于对所述自定义模块的编辑操作,编辑所述自定义模块,得到更新后的自定义模块。The custom module updating module is configured to edit the custom module in response to an editing operation on the custom module to obtain an updated custom module.

在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:

自定义模块分享模块,被配置为响应于对所述自定义模块的分享操作,将所述自定义模块分享至目标页面。The custom module sharing module is configured to share the custom module to a target page in response to a sharing operation on the custom module.

在一些实施例中,所述页面显示模块,被配置为:In some embodiments, the page display module is configured to:

显示可视化编程页面;Display the visual programming page;

响应于对所述可视化编程页面中自定义模块配置选项的选择操作,显示所述自定义模块配置选项对应的创建控件;In response to a selection operation on a custom module configuration option in the visual programming page, displaying a creation control corresponding to the custom module configuration option;

响应于对所述创建控件的选择操作,显示所述模块创建页面。In response to a selection operation on the creation control, the module creation page is displayed.

在一些实施例中,所述页面显示模块,被配置为:In some embodiments, the page display module is configured to:

响应于对所述创建控件的选择操作,显示创建模块窗口;In response to a selection operation on the creation control, displaying a creation module window;

在所述创建模块窗口中,输入待创建的自定义模块的模块名称;In the Create Module window, enter the module name of the custom module to be created;

响应于对所述模块名称的确定操作,显示所述模块创建页面。In response to the determination operation of the module name, the module creation page is displayed.

在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:

任务创建模块,被配置为基于所述自定义模块,创建目标任务;A task creation module, configured to create a target task based on the custom module;

设备控制模块,被配置为基于所述目标任务,控制智能设备,以使所述智能设备按照所述目标任务中的所述自定义模块执行对应的动作。The device control module is configured to control the smart device based on the target task so that the smart device performs corresponding actions according to the custom module in the target task.

在一些实施例中,所述任务创建模块,被配置为:In some embodiments, the task creation module is configured to:

显示任务编辑页面,所述任务编辑页面包括第二模块显示区域和任务编辑区域;Displaying a task editing page, wherein the task editing page includes a second module display area and a task editing area;

将所述第二模块显示区域中的所述自定义模块,移动至任务编辑区域,得到目标任务。Move the custom module in the second module display area to the task editing area to obtain the target task.

在一些实施例中,所述任务创建模块,被配置为:In some embodiments, the task creation module is configured to:

将所述第二模块显示区域中的多个功能模块以及所述自定义模块,依次移动至任务编辑区域,并将所述多个功能模块和所述自定义模块依次连接,得到所述目标任务,其中,并第一个模块与所述任务编辑区域中的开始模块相连接,所述第一个模块为所述自定义模块或者所述多个功能模块中的任一模块。Move the multiple function modules and the custom module in the second module display area to the task editing area in sequence, and connect the multiple function modules and the custom module in sequence to obtain the target task, wherein the first module is connected to the start module in the task editing area, and the first module is the custom module or any one of the multiple function modules.

根据本公开实施例的第三方面,提供一种电子设备,包括:According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

处理器;processor;

用于存储处理器可执行指令的存储器;a memory for storing processor-executable instructions;

其中,所述处理器被配置为执行如本公开实施例的第一方面中任一项所述的基于可视化编程的模块创建方法。The processor is configured to execute the module creation method based on visual programming as described in any one of the first aspects of the embodiments of the present disclosure.

根据本公开实施例的第四方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如本公开实施例的第一方面中任一项所述的基于可视化编程的模块创建方法。According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a module creation method based on visual programming as described in any one of the first aspect of an embodiment of the present disclosure.

采用本公开的上述方法,具有以下有益效果:The above method of the present disclosure has the following beneficial effects:

本公开实施例提供的基于可视化编程的模块创建方法,响应于自定义模块创建操作,显示包括第一模块显示区域和模块创建区域的模块创建页面,在模块创建页面中,将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,该自定义模块中的多个功能模块依次连接,该自定义模块包含了该多个功能模块的功能,即该自定义模块用于控制设备依次执行该多个功能模块对应的动作,通过创建自定义模块,丰富了可视化编程时可使用的模块,并且,可以在可视化编程过程中直接使用自定义模块,无需再对多个功能模块进行组合,使自定义模块可以重复使用,使用时更加方便快捷。The module creation method based on visual programming provided by the embodiment of the present disclosure responds to the custom module creation operation and displays a module creation page including a first module display area and a module creation area. In the module creation page, multiple functional modules in the first module display area are moved to the module creation area in sequence to create a custom module. The multiple functional modules in the custom module are connected in sequence. The custom module includes the functions of the multiple functional modules, that is, the custom module is used to control the device to execute the actions corresponding to the multiple functional modules in sequence. By creating the custom module, the modules that can be used in the visual programming are enriched, and the custom module can be directly used in the visual programming process without combining multiple functional modules, so that the custom module can be reused, which is more convenient and quick to use.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

图1是根据一示例性的实施例示出的一种基于可视化编程的模块创建方法的流程图;FIG1 is a flow chart showing a module creation method based on visual programming according to an exemplary embodiment;

图2是根据一示例性的实施例示出的一种基于可视化编程的模块创建方法的流程图;FIG2 is a flow chart showing a module creation method based on visual programming according to an exemplary embodiment;

图3是根据一示例性的实施例示出的一种可视化编程页面的示意图;FIG3 is a schematic diagram of a visual programming page according to an exemplary embodiment;

图4是根据一示例性的实施例示出的一种模块创建页面的示意图;FIG4 is a schematic diagram of a module creation page according to an exemplary embodiment;

图5是根据一示例性的实施例示出的一种模块创建页面的示意图;FIG5 is a schematic diagram showing a module creation page according to an exemplary embodiment;

图6是根据一示例性的实施例示出的一种可视化编程页面的示意图;FIG6 is a schematic diagram of a visual programming page according to an exemplary embodiment;

图7是根据一示例性的实施例示出的一种模块创建页面的示意图;FIG7 is a schematic diagram showing a module creation page according to an exemplary embodiment;

图8是根据一示例性的实施例示出的一种基于可视化编程控制设备的方法的流程图;FIG8 is a flow chart showing a method for controlling a device based on visual programming according to an exemplary embodiment;

图9是根据一示例性的实施例示出的一种基于可视化编程的模块创建装置的装置框图;FIG9 is a device block diagram showing a module creation device based on visual programming according to an exemplary embodiment;

图10是根据一示例性的实施例示出的一种电子设备的框图。Fig. 10 is a block diagram of an electronic device according to an exemplary embodiment.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

本公开实施例提供的基于可视化编程的模块创建方法由电子设备执行,该电子设备为终端,例如,终端为智能手机、平板电脑、笔记本电脑、台式电脑等,该终端还可以被称为用户设备、便携式终端、膝上型终端、台式终端等名称。The module creation method based on visual programming provided by the embodiment of the present disclosure is executed by an electronic device, which is a terminal. For example, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc. The terminal can also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, etc.

图1是根据一示例性的实施例示出的一种基于可视化编程的模块创建方法的流程图,该方法由电子设备执行,参见图1,该方法包括以下步骤:FIG. 1 is a flow chart of a module creation method based on visual programming according to an exemplary embodiment. The method is executed by an electronic device. Referring to FIG. 1 , the method includes the following steps:

步骤S101,响应于自定义模块创建操作,显示模块创建页面,模块创建页面包括第一模块显示区域和模块创建区域。Step S101, in response to a custom module creation operation, a module creation page is displayed, the module creation page including a first module display area and a module creation area.

本公开实施例中,为了基于可视化编程创建自定义模块,提供了模块创建页面,该模块创建页面中包括第一模块显示区域和模块创建区域,该第一模块显示区域中包括多个功能模块,每个功能模块用于控制智能设备执行对应的动作,且每个功能模块可实现的功能为单一功能,例如,一个功能模块只能控制智能设备执行一个动作,模块创建区域用于基于功能模块创建自定义模块。In an embodiment of the present disclosure, in order to create a custom module based on visual programming, a module creation page is provided, which includes a first module display area and a module creation area. The first module display area includes multiple functional modules, each functional module is used to control the smart device to perform a corresponding action, and the function that can be realized by each functional module is a single function. For example, a functional module can only control the smart device to perform one action. The module creation area is used to create a custom module based on the functional module.

步骤S102,将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,自定义模块中的多个功能模块依次连接,功能模块用于控制智能设备执行对应的动作。Step S102, multiple function modules in the first module display area are moved to the module creation area in sequence, a custom module is created, multiple function modules in the custom module are connected in sequence, and the function modules are used to control the smart device to perform corresponding actions.

由于功能模块的功能单一,例如某一个功能模块只能控制智能设备执行站立动作,另一个功能模块只能控制智能设备执行前进动作,那么如果想要实现控制智能设备执行站立并前进这一连续动作,则需要对两个功能模块进行组合,这样的话如果需要多次控制智能设备执行这一连续动作,则需要多次对功能模块进行组合,效率较低。本公开实施例中,为了减少组合的次数,提高效率,先将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,该自定义模块中包括了多个功能模块,因此,在需要控制智能设备执行依次连接的多个功能模块对应的一系列动作时,可以直接使用该自定义模块,而无需使用多个功能模块进行组合。该移动是指选中第一模块显示区域中的功能模块并将功能模块移动至模块创建区域。在得到的自定义模块中该多个功能模块依次连接,多个功能模块可以是按照移动至模块创建区域的顺序依次连接,也可以是多个功能模块移动至模块创建区域后,再在模块创建区域通过移动功能模块,调整多个功能模块之间的连接顺序。Since the function of the functional module is single, for example, a certain functional module can only control the intelligent device to perform a standing action, and another functional module can only control the intelligent device to perform a forward action, then if you want to realize the continuous action of controlling the intelligent device to perform standing and forward, you need to combine the two functional modules. In this way, if you need to control the intelligent device to perform this continuous action multiple times, you need to combine the functional modules multiple times, which is inefficient. In the embodiment of the present disclosure, in order to reduce the number of combinations and improve efficiency, the multiple functional modules in the first module display area are first moved to the module creation area in sequence, and a custom module is created. The custom module includes multiple functional modules. Therefore, when it is necessary to control the intelligent device to perform a series of actions corresponding to the multiple functional modules connected in sequence, the custom module can be directly used without using multiple functional modules for combination. The movement refers to selecting the functional module in the first module display area and moving the functional module to the module creation area. In the obtained custom module, the multiple functional modules are connected in sequence, and the multiple functional modules can be connected in sequence in the order of moving to the module creation area, or after the multiple functional modules are moved to the module creation area, the connection order between the multiple functional modules is adjusted by moving the functional modules in the module creation area.

本公开实施例提供的基于可视化编程的模块创建方法,响应于自定义模块创建操作,显示包括第一模块显示区域和模块创建区域的模块创建页面,在模块创建页面中,将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,该自定义模块中的多个功能模块依次连接,该自定义模块包含了该多个功能模块的功能,即该自定义模块用于控制设备依次执行该多个功能模块对应的动作,通过创建自定义模块,丰富了可视化编程时可使用的模块,并且,可以在可视化编程过程中直接使用自定义模块,无需再对多个功能模块进行组合,使自定义模块可以重复使用,使用时更加方便快捷。The module creation method based on visual programming provided by the embodiment of the present disclosure responds to the custom module creation operation and displays a module creation page including a first module display area and a module creation area. In the module creation page, multiple functional modules in the first module display area are moved to the module creation area in sequence to create a custom module. The multiple functional modules in the custom module are connected in sequence. The custom module includes the functions of the multiple functional modules, that is, the custom module is used to control the device to execute the actions corresponding to the multiple functional modules in sequence. By creating the custom module, the modules that can be used in the visual programming are enriched, and the custom module can be directly used in the visual programming process without combining multiple functional modules, so that the custom module can be reused, which is more convenient and quick to use.

图2是根据一示例性的实施例示出的一种基于可视化编程的模块创建方法的流程图,该方法由电子设备执行,参见图2,该方法包括以下步骤:FIG. 2 is a flow chart of a module creation method based on visual programming according to an exemplary embodiment. The method is executed by an electronic device. Referring to FIG. 2 , the method includes the following steps:

步骤S201,显示可视化编程页面。Step S201, displaying a visual programming page.

其中,可视化编程页面用于进行可视化编程,该可视化编程页面包括动作执行配置选项、自定义模块配置选项以及序列动作配置选项,这三种配置选项对应不同的编辑操作,本公开实施例中是针对自定义模块配置选项,创建自定义模块进行说明。Among them, the visual programming page is used for visual programming. The visual programming page includes action execution configuration options, custom module configuration options and sequence action configuration options. These three configuration options correspond to different editing operations. In the embodiment of the present disclosure, the creation of a custom module is explained for the custom module configuration option.

在一些实施例中,电子设备中安装有控制应用程序,响应于对该控制应用程序的启动操作,开启该控制应用程序,显示该控制应用的初始界面,响应于对该初始界面中的可视化编程按钮的触发操作,显示该可视化编程页面。In some embodiments, a control application is installed in the electronic device. In response to a startup operation on the control application, the control application is opened and an initial interface of the control application is displayed. In response to a trigger operation on a visual programming button in the initial interface, the visual programming page is displayed.

步骤S202,响应于对可视化编程页面中自定义模块配置选项的选择操作,显示自定义模块配置选项对应的创建控件。Step S202, in response to a selection operation on a custom module configuration option in a visual programming page, displaying a creation control corresponding to the custom module configuration option.

用户为了创建新的自定义模块,选中自定义模块配置选项,在可视化编程页面中显示该自定义模块配置选项对应的创建控件,该创建新建控件用于触发创建自定义模块。例如,参见图3所示的可视化编程页面301,其中,自定义模块配置选项被选中,在该可视化编程页面显示有自定义模块配置选项对应的创建控件。In order to create a new custom module, the user selects the custom module configuration option, and the creation control corresponding to the custom module configuration option is displayed in the visual programming page, and the creation control is used to trigger the creation of the custom module. For example, referring to the visual programming page 301 shown in FIG3, the custom module configuration option is selected, and the creation control corresponding to the custom module configuration option is displayed in the visual programming page.

步骤S203,响应于对创建控件的选择操作,显示模块创建页面。Step S203: In response to the selection operation of the creation control, a module creation page is displayed.

其中,选择操作包括对创建控件的单击操作、双击操作等操作。用户在选择了创建控件之后,显示模块创建页面,该模块创建页面包括第一模块显示区域和模块创建区域。其中,第一模块显示区域显示有多个功能模块,模块创建区域用于创建自定义模块。例如,参见图4所示的模块创建页面,在该模块创建页面的左侧显示有模块列表,该模块列表中包括运动、控制、时间、展示等多种类型的功能模块,右侧显示有模块创建区域。Among them, the selection operation includes single-click operation, double-click operation and other operations on the creation control. After the user selects the creation control, the module creation page is displayed, and the module creation page includes a first module display area and a module creation area. Among them, the first module display area displays multiple functional modules, and the module creation area is used to create a custom module. For example, referring to the module creation page shown in Figure 4, a module list is displayed on the left side of the module creation page, and the module list includes various types of functional modules such as motion, control, time, and display, and a module creation area is displayed on the right side.

在一些实施例中,模块显示区域包括多个功能类型,每个功能类型包括多个功能模块。例如,参见图5所示的模块创建页面,选中第一模块显示区域中的运动类型,显示属于该运动类型的多个功能模块:用于设置前进或后退时长的模块、用于控制机器狗站立或者趴下的模块等。In some embodiments, the module display area includes multiple function types, and each function type includes multiple function modules. For example, referring to the module creation page shown in FIG5 , a motion type in the first module display area is selected, and multiple function modules belonging to the motion type are displayed: a module for setting the forward or backward time length, a module for controlling the robot dog to stand up or lie down, etc.

在一些实施例中,响应于对创建控件的选择操作,显示创建模块窗口;在创建模块窗口中,输入待创建的自定义模块的模块名称;响应于对模块名称的确定操作,显示模块创建页面。例如,参见图6所示的可视化编程页面601,在该可视化编程页面601中显示创建模块窗口,用户可以在该创建模块窗口中的名称输入区域输入自定义模块的名称,然后点击“确认”,再显示后续的模块创建页面。In some embodiments, in response to the selection operation of the creation control, a module creation window is displayed; in the module creation window, the module name of the custom module to be created is input; in response to the confirmation operation of the module name, a module creation page is displayed. For example, referring to the visual programming page 601 shown in FIG6 , a module creation window is displayed in the visual programming page 601, and the user can input the name of the custom module in the name input area of the module creation window, and then click “Confirm” to display the subsequent module creation page.

在一些实施例中,由于后续自定义模块创建之后还需要先测试该自定义模块是否能够运行,因此该模块创建区域还包括开始模块,将自定义模块中的第一个功能模块与开始模块连接,从而使该自定义模块能够运行。例如,参见图4或图5所示的模块创建页面中的开始模块“开始运行程序”。In some embodiments, since it is necessary to test whether the custom module can run after the subsequent custom module is created, the module creation area also includes a start module, and the first functional module in the custom module is connected to the start module, so that the custom module can run. For example, refer to the start module "Start running the program" in the module creation page shown in Figure 4 or Figure 5.

步骤S204,将第一模块显示区域中的多个功能模块依次移动至模块创建区域,得到模块组合,并运行模块组合。Step S204, moving the multiple function modules in the first module display area to the module creation area in sequence to obtain a module combination, and running the module combination.

本公开实施例中,在创建自定义模块时,是通过将第一模块显示区域中的功能模块移动至模块创建区域,在模块创建区域对多个功能模块进行组合,得到模块组合。其中,移动功能模块是指用户选中功能模块,然后将功能模块从第一模块显示区域移动至模块创建区域。例如,用户点击功能模块,然后在长按操作功能模块的通知,进行移动操作,将功能模块从第一模块显示区域移动至模块创建区域。In the disclosed embodiment, when creating a custom module, the function module in the first module display area is moved to the module creation area, and multiple function modules are combined in the module creation area to obtain a module combination. Among them, moving a function module means that the user selects the function module and then moves the function module from the first module display area to the module creation area. For example, the user clicks on the function module, and then long presses the notification of the function module to perform a move operation, and moves the function module from the first module display area to the module creation area.

其中,模块组合中的多个功能模块依次连接,多个功能模块依次连接是指多个功能模块按照预设顺序连接在一起,该预设顺序可以是多个功能模块移动至模块创建区域的顺序,也可以是预先设置的其他顺序。例如,参见图5所示的功能模块,每个功能模块上侧有一个凹槽,下侧有一个凸起,且凹槽和凸起可以匹配,在进行连接时将前一个功能模块的凸起与下一个功能模块的凹槽匹配,从而将两个功能模块进行连接。Among them, multiple functional modules in the module combination are connected in sequence, and multiple functional modules are connected in sequence means that multiple functional modules are connected together in a preset order, and the preset order can be the order in which multiple functional modules are moved to the module creation area, or can be other pre-set orders. For example, referring to the functional modules shown in Figure 5, each functional module has a groove on the upper side and a protrusion on the lower side, and the groove and the protrusion can match. When connecting, the protrusion of the previous functional module is matched with the groove of the next functional module, so that the two functional modules are connected.

在一些实施例中,由于第一模块显示区域包括多个功能类型,每个功能类型包括多个功能模块,则用于创建自定义模块的多个功能模块可以是属于同一功能类型的功能模块,那么将第一模块显示区域中的多个功能模块依次移动至模块创建区域,得到模块组合,包括:响应于对目标功能类型的选择操作,显示属于目标功能类型的功能模块,目标功能类型为多个功能类型中的任一功能类型;将属于目标功能类型的多个功能模块依次移动至模块创建区域,得到模块组合。In some embodiments, since the first module display area includes multiple function types, each function type includes multiple function modules, the multiple function modules used to create the custom module can be function modules belonging to the same function type, then the multiple function modules in the first module display area are moved to the module creation area in turn to obtain a module combination, including: in response to a selection operation on a target function type, displaying the function modules belonging to the target function type, the target function type is any function type among the multiple function types; moving the multiple function modules belonging to the target function type to the module creation area in turn to obtain a module combination.

在一些实施例中,用于创建目标任务的多个功能模块可以是属于不同功能类型的功能模块,那么将第一模块显示区域中的多个功能模块依次移动至模块创建区域,得到模块组合,包括:将属于目标功能类型的至少一个功能模块依次移动至任务编辑区域,并响应于对除目标功能类型之外的其他功能类型的选择操作,显示属于其他功能类型的功能模块,将属于其他功能类型的至少一个功能模块依次移动至任务编辑区域,得到模块组合。其中,其他功能类型可以是一个或者多个,且每个功能类型中所选择的功能模块可以为一个或者多个,本公开实施例对此不做限制。In some embodiments, the multiple function modules used to create the target task may be function modules of different function types, then the multiple function modules in the first module display area are moved to the module creation area in sequence to obtain a module combination, including: moving at least one function module belonging to the target function type to the task editing area in sequence, and in response to the selection operation of other function types other than the target function type, displaying the function modules of other function types, and moving at least one function module belonging to other function types to the task editing area in sequence to obtain a module combination. Among them, the other function types may be one or more, and the function modules selected in each function type may be one or more, which is not limited in the embodiments of the present disclosure.

本公开实施例中,运行模块组合是指:运行该模块组合,生成该模块组合对应的编程代码,使智能设备基于该编程代码执行对应的动作。如果智能设备能够所执行的动作与模块组合中的多个功能模块对应的动作一致,则说明该功能模块能够正常运行,如果智能设备能够所执行的动作与模块组合中的多个功能模块对应的动作不一致,则说明该功能模块不能够正常运行,需要重新调整该模块组合。In the disclosed embodiment, running the module combination means: running the module combination, generating a programming code corresponding to the module combination, and making the smart device perform a corresponding action based on the programming code. If the action that the smart device can perform is consistent with the actions corresponding to the multiple functional modules in the module combination, it means that the functional module can operate normally. If the action that the smart device can perform is inconsistent with the actions corresponding to the multiple functional modules in the module combination, it means that the functional module cannot operate normally and the module combination needs to be readjusted.

可选地,电子设备需要在与智能设备进行通信连接的情况下,运行模块组合,使智能设备基于生成的编程代码执行对应的动作。例如,电子设备与智能设备之间可以通过蓝牙进行无线通信连接,当然也可以采用其他方式进行连接,本公开实施例对通信连接的具体方式不做限制。Optionally, the electronic device needs to run the module combination when communicating with the smart device, so that the smart device performs corresponding actions based on the generated programming code. For example, the electronic device and the smart device can be connected by wireless communication via Bluetooth, and of course other methods can be used for connection. The embodiments of the present disclosure do not limit the specific method of communication connection.

步骤S205,在模块组合可运行的情况下,对模块组合进行保存,得到自定义模块。Step S205, when the module combination is executable, the module combination is saved to obtain a custom module.

在得到模块组合之后,不同功能模块之间有可能没有连接好,或者其他的问题导致模块组合不能正常运行,在模块组合不能正常运行的情况下,保存该模块组合,得到的自定义模块也不能够正常运行,会影响后续自定义模块的使用,因此本公开实施例中,在模块组合可运行的情况下,对模块组合进行保存,得到自定义模块,以保证该自定义模块在后续可以正常使用。例如,自定义模块包含了控制站起来的模块、控制往前走的模块以及控制左转的模块,且这三个模块依次连接,则自定义模块能够控制智能设备执行连续的动作:站起来、往前走、左转。After obtaining the module combination, different functional modules may not be connected well, or other problems may cause the module combination to fail to operate normally. In the case that the module combination fails to operate normally, the module combination is saved, and the obtained custom module also fails to operate normally, which will affect the use of the subsequent custom module. Therefore, in the embodiment of the present disclosure, when the module combination is operable, the module combination is saved to obtain the custom module to ensure that the custom module can be used normally in the future. For example, the custom module includes a module for controlling standing up, a module for controlling walking forward, and a module for controlling turning left, and these three modules are connected in sequence, then the custom module can control the smart device to perform continuous actions: standing up, walking forward, and turning left.

在一些实施例中,对模块组合进行保存包括:对多个功能模块以及多个功能模块之间的连接顺序进行保存。In some embodiments, saving the module combination includes: saving multiple functional modules and the connection order between the multiple functional modules.

在一些实施例中,在得到了自定义模块之后,第一模块显示区域会包括自定义功能类型,例如,参见图7所示的模块创建页面,与图5相比,在第一模块显示区域多了“自定义”类型。之后,响应于对自定义功能类型的选择操作,显示自定义模块,用户即可采用显示的自定义模块创建任务。In some embodiments, after obtaining a custom module, the first module display area will include a custom function type, for example, referring to the module creation page shown in FIG7 , compared with FIG5 , a "custom" type is added to the first module display area. Afterwards, in response to a selection operation of the custom function type, the custom module is displayed, and the user can use the displayed custom module to create a task.

在一些实施例中,将创建的自定义模块添加到自定义功能类型之后,还可以响应于对自定义模块的编辑操作,编辑自定义模块,得到更新后的自定义模块。也就是说,自定义模块在创建之后还可以更改,例如可以调整自定义模块中的功能模块的连接顺序,或者,删除自定义模块中的功能模块,或者在自定义模块中添加新的功能模块等。In some embodiments, after the created custom module is added to the custom function type, the custom module can be edited in response to an edit operation on the custom module to obtain an updated custom module. That is, the custom module can be modified after creation, for example, the connection order of the function modules in the custom module can be adjusted, or the function modules in the custom module can be deleted, or new function modules can be added to the custom module, etc.

在一些实施例中,响应于对自定义模块的分享操作,将自定义模块分享至目标页面,该目标页面可以为控制应用程序中的页面,使用该控制应用程序的用户可以在该目标页面中查看该自定义模块并使用该自定义模块。In some embodiments, in response to a sharing operation on a custom module, the custom module is shared to a target page, which may be a page in a control application, and a user of the control application may view and use the custom module in the target page.

本公开实施例提供的基于可视化编程的模块创建方法,响应于自定义模块创建操作,显示包括第一模块显示区域和模块创建区域的模块创建页面,在模块创建页面中,将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,该自定义模块中的多个功能模块依次连接,该自定义模块包含了该多个功能模块的功能,即该自定义模块用于控制设备依次执行该多个功能模块对应的动作,通过创建自定义模块,丰富了可视化编程时可使用的模块,并且,可以在可视化编程过程中直接使用自定义模块,无需再对多个功能模块进行组合,使自定义模块可以重复使用,使用时更加方便快捷。The module creation method based on visual programming provided by the embodiment of the present disclosure responds to the custom module creation operation and displays a module creation page including a first module display area and a module creation area. In the module creation page, multiple functional modules in the first module display area are moved to the module creation area in sequence to create a custom module. The multiple functional modules in the custom module are connected in sequence. The custom module includes the functions of the multiple functional modules, that is, the custom module is used to control the device to execute the actions corresponding to the multiple functional modules in sequence. By creating the custom module, the modules that can be used in the visual programming are enriched, and the custom module can be directly used in the visual programming process without combining multiple functional modules, so that the custom module can be reused, which is more convenient and quick to use.

在一些实施例中,在创建了自定义模块之后,还可以基于该自定义模块创建目标任务,然后基于目标任务,控制智能设备,以使智能设备按照目标任务中的自定义模块执行对应的动作。In some embodiments, after creating a custom module, a target task may be created based on the custom module, and then based on the target task, the smart device may be controlled so that the smart device performs corresponding actions according to the custom module in the target task.

图8是根据一示例性的实施例示出的一种基于可视化编程控制设备的方法的流程图,该方法由电子设备执行,该方法包括以下步骤:FIG8 is a flowchart of a method for controlling a device based on visual programming according to an exemplary embodiment. The method is executed by an electronic device and includes the following steps:

步骤S801,显示任务编辑页面,该任务编辑页面包括第二模块显示区域和任务编辑区域。Step S801: displaying a task editing page, which includes a second module display area and a task editing area.

本公开实施例中,为了基于可视化编程对智能设备进行控制,提供了任务编辑页面,该任务编辑页面中包括第二模块显示区域和任务编辑区域,该第二模块显示区域中包括多个功能模块以及至少一个自定义模块,每个功能模块和自定义模块用于控制智能设备执行对应的动作,任务编辑区域用于创建任务,且该任务编辑区域包括开始模块,该开始模块为任务的初始模块,用于指示一个任务的开始。。In the embodiment of the present disclosure, in order to control the intelligent device based on visual programming, a task editing page is provided, the task editing page includes a second module display area and a task editing area, the second module display area includes multiple function modules and at least one custom module, each function module and custom module is used to control the intelligent device to perform a corresponding action, the task editing area is used to create a task, and the task editing area includes a start module, the start module is the initial module of the task, and is used to indicate the start of a task. .

在一些实施例中,显示可视化编程页面,响应于对可视化编程页面中动作执行配置选项的选择操作,显示动作执行配置选项对应的新建控件,响应于对新建控件的选择操作,显示任务编辑页面。其中,可视化编程页面用于进行可视化编程,该可视化编程页面包括动作执行配置选项、自定义模块配置选项以及序列动作配置选项,这三种配置选项对应不同的编辑操作,本公开实施例中是针对动作执行配置选项,创建目标任务控制智能设备进行说明。In some embodiments, a visual programming page is displayed, and in response to a selection operation of an action execution configuration option in the visual programming page, a newly created control corresponding to the action execution configuration option is displayed, and in response to the selection operation of the newly created control, a task editing page is displayed. The visual programming page is used for visual programming, and the visual programming page includes an action execution configuration option, a custom module configuration option, and a sequence action configuration option. These three configuration options correspond to different editing operations. In the embodiment of the present disclosure, the action execution configuration option is used to create a target task to control the smart device for explanation.

可选地,用户为了创建新的任务,选中动作执行配置选项,在可视化编程页面中显示该动作执行配置选项对应的新建控件,该新建控件用于触发新建任务。选择操作是指对新建控件的单击操作、双击操作等操作。用户在选择了新建控件之后,显示任务编辑页面。Optionally, in order to create a new task, the user selects an action execution configuration option, and a new control corresponding to the action execution configuration option is displayed in the visual programming page, and the new control is used to trigger the new task. The selection operation refers to a single-click operation, a double-click operation, and the like on the new control. After the user selects the new control, the task editing page is displayed.

可选地,响应于对新建控件的选择操作,先显示新建任务窗口;在新建任务窗口中,输入目标任务的任务名称;响应于对任务名称的确定操作,显示任务编辑页面。Optionally, in response to a selection operation on a new control, a new task window is first displayed; in the new task window, a task name of the target task is input; in response to a confirmation operation on the task name, a task editing page is displayed.

步骤S802,将第二模块显示区域中的自定义模块,移动至任务编辑区域,得到目标任务。Step S802, moving the custom module in the second module display area to the task editing area to obtain the target task.

本公开实施例中,在创建目标任务时,通过将第二模块显示区域中的自定义模块移动至任务编辑区域,得到目标任务。其中,移动自定义模块是指用户选中自定义模块,然后将自定义模块从第二模块显示区域移动至任务编辑区域。例如,用户点击自定义模块,然后在长按操作自定义模块的同时,进行移动操作,将自定义模块从第二模块显示区域移动至任务编辑区域。In the embodiment of the present disclosure, when creating a target task, the target task is obtained by moving the custom module in the second module display area to the task editing area. Moving the custom module means that the user selects the custom module and then moves the custom module from the second module display area to the task editing area. For example, the user clicks on the custom module and then performs a move operation while long pressing the custom module to move the custom module from the second module display area to the task editing area.

在一些实施例中,由于第二模块显示区域中还包括其他的功能模块,因此,可以将第二模块显示区域中的多个功能模块以及自定义模块,依次移动至任务编辑区域,并将多个功能模块和自定义模块依次连接,得到目标任务,其中,并第一个模块与任务编辑区域中的开始模块相连接,第一个模块为自定义模块或者多个功能模块中的任一模块。其中,将多个功能模块和自定义模块依次连接是指多个功能模块和自定义模块按照预设顺序连接在一起,该预设顺序可以是多个功能模块和自定义模块移动至任务编辑区域的顺序,也可以是预先设置的其他顺序。In some embodiments, since the second module display area also includes other functional modules, multiple functional modules and custom modules in the second module display area can be moved to the task editing area in sequence, and the multiple functional modules and custom modules are connected in sequence to obtain the target task, wherein the first module is connected to the start module in the task editing area, and the first module is a custom module or any module of the multiple functional modules. Wherein, connecting multiple functional modules and custom modules in sequence means that multiple functional modules and custom modules are connected together in a preset order, and the preset order can be the order in which the multiple functional modules and custom modules are moved to the task editing area, or can be other pre-set orders.

在一些实施例中,得到目标任务之后,还可以重新调整目标任务中的多个功能模块和自定义模块的连接顺序,或者,删除目标任务中的功能模块或者自定义模块,或者,在目标任务中增加新的功能模块或者自定义模块,得到更新后的目标任务。In some embodiments, after obtaining the target task, the connection order of multiple functional modules and custom modules in the target task can be readjusted, or the functional modules or custom modules in the target task can be deleted, or new functional modules or custom modules can be added to the target task to obtain an updated target task.

步骤S803,基于目标任务,控制智能设备,以使智能设备按照目标任务中的自定义模块执行对应的动作。Step S803: Based on the target task, control the smart device so that the smart device performs corresponding actions according to the custom module in the target task.

在一些实施例中,响应于对目标任务的运行操作,生成目标任务对应的编程代码,将编程代码发送至智能设备,以使智能设备基于编程代码依次执行目标任务中每个模块对应的动作。In some embodiments, in response to the running operation of the target task, a programming code corresponding to the target task is generated, and the programming code is sent to the smart device so that the smart device executes the actions corresponding to each module in the target task in sequence based on the programming code.

对于对目标任务的运行操作,在一些实施例中,运行操作包括立即运行操作、周期运行操作和定时运行操作中的任一种,立即运行操作是指在生成编程代码后立即发送至智能设备,周期运行操作是指在生成编程代码后按照预设周期发送至智能设备,定时运行操作是指在生成编程代码后按照预设时间点发送至智能设备。可选地,通过设置执行模块确定运行操作所属的类型,例如,该执行模式包括立即执行、定时执行以及周期执行,在选择了立即执行时,后续执行的运行操作即为立即运行操作,在选择了周期执行时,后续执行的运行操作即为周期运行操作,在选择了定时执行时,后续执行的操作即为定时运行操作。For the operation of the target task, in some embodiments, the operation includes any one of an immediate operation, a periodic operation, and a scheduled operation. The immediate operation refers to sending the programming code to the smart device immediately after the programming code is generated, the periodic operation refers to sending the programming code to the smart device according to a preset period after the programming code is generated, and the scheduled operation refers to sending the programming code to the smart device according to a preset time point after the programming code is generated. Optionally, the type of the operation is determined by setting the execution module. For example, the execution mode includes immediate execution, scheduled execution, and periodic execution. When immediate execution is selected, the subsequent execution is the immediate operation. When periodic execution is selected, the subsequent execution is the periodic operation. When scheduled execution is selected, the subsequent execution is the scheduled operation.

在一些实施例中,每个功能模块具有对应的编程代码,对于自定义模块来说,需要生成该自定义模块对应的编程代码时,获取该自定义模块中包括的每个功能模块对应的编程代码,将每个功能模块对应的编程代码按照每个功能模块在自定义模块中的连接顺序进行组合,得到自定义模块对应的编程代码。因此对于仅包含自定义模块的目标任务来说,生成目标任务对应的编程代码,包括:获取该自定义模块中包括的每个功能模块对应的编程代码,将每个功能模块对应的编程代码按照每个功能模块在自定义模块中的连接顺序进行组合,得到目标任务对应的编程代码。In some embodiments, each functional module has a corresponding programming code. For a custom module, when it is necessary to generate the programming code corresponding to the custom module, the programming code corresponding to each functional module included in the custom module is obtained, and the programming code corresponding to each functional module is combined according to the connection order of each functional module in the custom module to obtain the programming code corresponding to the custom module. Therefore, for a target task that only includes custom modules, generating the programming code corresponding to the target task includes: obtaining the programming code corresponding to each functional module included in the custom module, combining the programming code corresponding to each functional module according to the connection order of each functional module in the custom module, and obtaining the programming code corresponding to the target task.

在一些实施例中,对于包含多个功能模块和自定义模块的目标任务来说,生成目标任务对应的编程代码,包括:确定该目标任务中的多个功能模块以及自定义模块中的每个功能模块对应的编程代码,并将多个功能模块以及自定义模块中的每个功能模块对应的编程代码,按照该多个功能模块和自定义模块的连接顺序进行组合,得到目标任务对应的编程代码。In some embodiments, for a target task including multiple functional modules and a custom module, generating a programming code corresponding to the target task includes: determining the programming code corresponding to each of the multiple functional modules in the target task and the custom modules, and combining the programming codes corresponding to each of the multiple functional modules and the custom modules according to the connection order of the multiple functional modules and the custom modules to obtain the programming code corresponding to the target task.

本公开实施例提供的这种可视化编程方式,只需要在设置每个功能模块时,编写每个功能模块对应的编程代码,之后重复使用每个功能模块对应的编程代码即可,用户不需要重复编写相同的编程代码,节省了编程时间,提高了编程效率。The visual programming method provided by the embodiment of the present disclosure only requires writing the programming code corresponding to each functional module when setting each functional module, and then reusing the programming code corresponding to each functional module. Users do not need to repeatedly write the same programming code, which saves programming time and improves programming efficiency.

对于智能设备来说,该智能设备需要通过编程代码进行控制,因此电子设备将编程代码发送给智能设备,智能设备运行该编程代码,从而依次执行目标任务中每个功能模块和自定义模块对应的动作。例如,目标任务中的多个功能模块和自定义模块编写了一个连续的动作,如连续的动作为站起来、作揖、往前走、左转,生成目标任务对应的编程代码,传给机器狗的底层,使机器狗能够依次执行该连续的动作中的每一个动作。For smart devices, the smart devices need to be controlled by programming codes, so the electronic device sends the programming codes to the smart device, and the smart device runs the programming codes to sequentially execute the actions corresponding to each functional module and custom module in the target task. For example, multiple functional modules and custom modules in the target task write a continuous action, such as standing up, bowing, walking forward, and turning left. The programming code corresponding to the target task is generated and transmitted to the bottom layer of the robot dog, so that the robot dog can sequentially execute each action in the continuous action.

在一些实施例中,在智能设备依次执行目标任务中每个功能模块对应的动作时,在任务编辑区域,对智能设备当前执行的动作对应的功能模块或自定义模块进行突出显示。也就是说,智能设备在运行编程代码的过程中,能够将当前的运行情况反馈给电子设备,在电子设备中通过对智能设备当前执行的动作对应的功能模块或自定义模块进行突出显示,从而将智能设备当前执行的操作直观的在任务编辑区域中进行显示,并且,还可以对比突出显示的模块和智能设备执行的动作,使用户了解智能设备是否是按照当前的目标任务来执行动作的,如果不是可以使用户及时发现。其中,对功能模块和自定义模块进行突出显示是指将该功能模块和自定义模块显示为预设颜色,或者将该功能模块和自定义模块显示为与其他未执行对应的动作的模块不同的颜色。In some embodiments, when the smart device sequentially executes the action corresponding to each functional module in the target task, the functional module or custom module corresponding to the action currently executed by the smart device is highlighted in the task editing area. That is to say, in the process of running the programming code, the smart device can feed back the current operation status to the electronic device, and in the electronic device, the functional module or custom module corresponding to the action currently executed by the smart device is highlighted, so that the operation currently executed by the smart device is intuitively displayed in the task editing area, and the highlighted module and the action executed by the smart device can be compared to let the user know whether the smart device is executing the action according to the current target task, and if not, the user can find it in time. Among them, highlighting the functional module and the custom module means displaying the functional module and the custom module as a preset color, or displaying the functional module and the custom module as a different color from other modules that have not executed the corresponding action.

在一些实施例中,电子设备需要在与智能设备进行通信连接的情况下,基于目标任务控制智能设备。例如,电子设备与智能设备之间可以通过蓝牙进行无线通信连接,当然也可以采用其他方式进行连接,本公开实施例对通信连接的具体方式不做限制。In some embodiments, the electronic device needs to control the smart device based on the target task when communicating with the smart device. For example, the electronic device and the smart device can be connected by wireless communication via Bluetooth, or other methods can be used for connection. The embodiments of the present disclosure do not limit the specific method of communication connection.

另外,在一些实施例中,还可以保存目标任务,在保存目标任务后,在可视化编程页面显示目标任务,之后,需要再次运行该目标任务时,可以直接在可视化编程页面选择该目标任务进行运行。可选地,响应于对任务编辑页面中的保存控件的触发操作,保存目标任务。In addition, in some embodiments, the target task can also be saved. After the target task is saved, the target task is displayed on the visual programming page. Later, when the target task needs to be run again, the target task can be directly selected on the visual programming page to run. Optionally, the target task is saved in response to a trigger operation of a save control in the task editing page.

本公开实施例提供的基于可视化编程控制设备的方法,在包括第二模块显示区域和任务编辑区域的任务编辑页面,将第二模块显示区域中的自定义模块和多个功能模块移动至任务编辑区域,得到目标任务,该目标任务中的多个功能模块和自定义模块依次连接,也即是通过创建目标任务,将多个功能模块和自定义模块进行组合,从而基于目标任务可以控制智能设备按照目标任务中多个功能模块和自定义模块的连接顺序依次执行对应的动作,相比于相关技术中的单一基础功能模块,通过创建目标任务对智能设备能够进行更为复杂的控制,丰富了对智能设备的控制方式。The method for controlling a device based on visual programming provided by an embodiment of the present disclosure includes, on a task editing page including a second module display area and a task editing area, moving a custom module and multiple functional modules in the second module display area to the task editing area to obtain a target task, wherein multiple functional modules and custom modules in the target task are connected in sequence, that is, by creating a target task, multiple functional modules and custom modules are combined, so that based on the target task, the intelligent device can be controlled to perform corresponding actions in sequence according to the connection sequence of multiple functional modules and custom modules in the target task. Compared with the single basic functional module in the related art, more complex control of the intelligent device can be performed by creating a target task, thereby enriching the control method of the intelligent device.

并且,本公开实施例提供了一个可视化的编程平台,用户可以基于该可视化的编程平台对智能设备进行可视化编程控制,并且该可视化的编程平台具有强大的专业性,支持专业的参数和模块,能够进行专业的测试和操作。对于用户来说,该可视化的编程平台具有非常丰富的可玩性,有利于帮助用户进行可视化编程的学习教育。Furthermore, the disclosed embodiment provides a visual programming platform, based on which users can perform visual programming control on smart devices, and the visual programming platform has strong professionalism, supports professional parameters and modules, and can perform professional testing and operations. For users, the visual programming platform has very rich playability, which is conducive to helping users learn and educate visual programming.

图9是根据一示例性的实施例示出的一种基于可视化编程的模块创建装置的装置框图,应用于电子设备,参见图9,该装置包括:FIG9 is a device block diagram of a module creation device based on visual programming according to an exemplary embodiment, which is applied to an electronic device. Referring to FIG9 , the device includes:

页面显示模块901,被配置为响应于自定义模块创建操作,显示模块创建页面,模块创建页面包括第一模块显示区域和模块创建区域;The page display module 901 is configured to display a module creation page in response to a custom module creation operation, wherein the module creation page includes a first module display area and a module creation area;

创建模块902,被配置为将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,自定义模块中的多个功能模块依次连接,功能模块用于控制智能设备执行对应的动作。The creation module 902 is configured to move multiple functional modules in the first module display area to the module creation area in sequence, create a custom module, and connect multiple functional modules in the custom module in sequence. The functional module is used to control the smart device to perform corresponding actions.

本公开实施例提供的基于可视化编程的模块创建装置,响应于自定义模块创建操作,显示包括第一模块显示区域和模块创建区域的模块创建页面,在模块创建页面中,将第一模块显示区域中的多个功能模块依次移动至模块创建区域,创建自定义模块,该自定义模块中的多个功能模块依次连接,该自定义模块包含了该多个功能模块的功能,即该自定义模块用于控制设备依次执行该多个功能模块对应的动作,通过创建自定义模块,丰富了可视化编程时可使用的模块,并且,可以在可视化编程过程中直接使用自定义模块,无需再对多个功能模块进行组合,使自定义模块可以重复使用,使用时更加方便快捷。The module creation device based on visual programming provided by the embodiment of the present disclosure responds to the custom module creation operation and displays a module creation page including a first module display area and a module creation area. In the module creation page, multiple functional modules in the first module display area are moved to the module creation area in sequence to create a custom module. The multiple functional modules in the custom module are connected in sequence. The custom module includes the functions of the multiple functional modules, that is, the custom module is used to control the device to execute the actions corresponding to the multiple functional modules in sequence. By creating the custom module, the modules that can be used in the visual programming are enriched, and the custom module can be directly used in the visual programming process without combining multiple functional modules, so that the custom module can be reused, which is more convenient and quick to use.

在一些实施例中,创建模块902,被配置为:In some embodiments, the creation module 902 is configured to:

将第一模块显示区域中的多个功能模块依次移动至模块创建区域,得到模块组合,并运行模块组合;Move multiple function modules in the first module display area to the module creation area in sequence to obtain a module combination, and run the module combination;

在模块组合可运行的情况下,对模块组合进行保存,得到自定义模块。When the module combination is operable, the module combination is saved to obtain a custom module.

在一些实施例中,第一模块显示区域包括多个功能类型,每个功能类型包括多个功能模块,创建模块902,被配置为:In some embodiments, the first module display area includes multiple function types, each function type includes multiple function modules, and the creation module 902 is configured to:

响应于对目标功能类型的选择操作,显示属于目标功能类型的功能模块,目标功能类型为多个功能类型中的任一功能类型;In response to a selection operation on a target function type, displaying function modules belonging to the target function type, where the target function type is any one of the plurality of function types;

将属于目标功能类型的多个功能模块依次移动至模块创建区域,得到模块组合。Move multiple function modules belonging to the target function type to the module creation area in sequence to obtain a module combination.

在一些实施例中,创建模块902,被配置为:In some embodiments, the creation module 902 is configured to:

将属于目标功能类型的至少一个功能模块依次移动至任务编辑区域,并响应于对除目标功能类型之外的其他功能类型的选择操作,显示属于其他功能类型的功能模块,将属于其他功能类型的至少一个功能模块依次移动至任务编辑区域,得到模块组合。Move at least one function module belonging to the target function type to the task editing area in sequence, and in response to the selection operation of other function types except the target function type, display the function modules belonging to other function types, and move at least one function module belonging to other function types to the task editing area in sequence to obtain a module combination.

在一些实施例中,第一模块显示区域包括自定义功能类型,装置还包括:In some embodiments, the first module display area includes a custom function type, and the device further includes:

自定义模块显示模块,被配置为响应于对自定义功能类型的选择操作,显示自定义模块。The custom module display module is configured to display the custom module in response to a selection operation on the custom function type.

在一些实施例中,装置还包括:In some embodiments, the apparatus further comprises:

自定义模块更新模块,被配置为响应于对自定义模块的编辑操作,编辑自定义模块,得到更新后的自定义模块。The custom module updating module is configured to edit the custom module in response to an editing operation on the custom module to obtain an updated custom module.

在一些实施例中,装置还包括:In some embodiments, the apparatus further comprises:

自定义模块分享模块,被配置为响应于对自定义模块的分享操作,将自定义模块分享至目标页面。The custom module sharing module is configured to share the custom module to a target page in response to a sharing operation on the custom module.

在一些实施例中,页面显示模块901,被配置为:In some embodiments, the page display module 901 is configured to:

显示可视化编程页面;Display the visual programming page;

响应于对可视化编程页面中自定义模块配置选项的选择操作,显示自定义模块配置选项对应的创建控件;In response to a selection operation of a custom module configuration option in the visual programming page, displaying a creation control corresponding to the custom module configuration option;

响应于对创建控件的选择操作,显示模块创建页面。In response to a selection operation on the create control, a module creation page is displayed.

在一些实施例中,页面显示模块901,被配置为:In some embodiments, the page display module 901 is configured to:

响应于对创建控件的选择操作,显示创建模块窗口;In response to a selection operation on a creation control, displaying a creation module window;

在创建模块窗口中,输入待创建的自定义模块的模块名称;In the Create Module window, enter the module name of the custom module to be created;

响应于对模块名称的确定操作,显示模块创建页面。In response to the determination operation on the module name, a module creation page is displayed.

在一些实施例中,装置还包括:In some embodiments, the apparatus further comprises:

任务创建模块,被配置为基于自定义模块,创建目标任务;The task creation module is configured to create a target task based on the custom module;

设备控制模块,被配置为基于目标任务,控制智能设备,以使智能设备按照目标任务中的自定义模块执行对应的动作。The device control module is configured to control the smart device based on the target task so that the smart device performs corresponding actions according to the custom module in the target task.

在一些实施例中,任务创建模块,被配置为:In some embodiments, the task creation module is configured to:

显示任务编辑页面,任务编辑页面包括第二模块显示区域和任务编辑区域;Displaying a task editing page, the task editing page includes a second module display area and a task editing area;

将第二模块显示区域中的自定义模块,移动至任务编辑区域,得到目标任务。Move the custom module in the second module display area to the task editing area to obtain the target task.

在一些实施例中,任务创建模块,被配置为:In some embodiments, the task creation module is configured to:

将第二模块显示区域中的多个功能模块以及自定义模块,依次移动至任务编辑区域,并将多个功能模块和自定义模块依次连接,得到目标任务,其中,并第一个模块与任务编辑区域中的开始模块相连接,第一个模块为自定义模块或者多个功能模块中的任一模块。Move multiple functional modules and custom modules in the second module display area to the task editing area in sequence, and connect the multiple functional modules and custom modules in sequence to obtain the target task, wherein the first module is connected to the start module in the task editing area, and the first module is a custom module or any module among the multiple functional modules.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

本公开实施例还提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行上述实施例中的基于可视化编程的模块创建方法。An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the module creation method based on visual programming in the above embodiment.

图10是根据一示例性的实施例示出的一种电子设备1000的框图。FIG. 10 is a block diagram of an electronic device 1000 according to an exemplary embodiment.

参照图10,电子设备1000可以包括以下一个或多个组件:处理组件1002,存储器1004,电源组件1006,多媒体组件1008,音频组件1010,输入/输出(I/O)的接口1012,传感器组件1014,以及通信组件1016。10 , the electronic device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input/output (I/O) interface 1012 , a sensor component 1014 , and a communication component 1016 .

处理组件1002通常控制电子设备1000的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1002可以包括一个或多个处理器1020来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1002可以包括一个或多个模块,便于处理组件1002和其他组件之间的交互。例如,处理组件1002可以包括多媒体模块,以方便多媒体组件1008和处理组件1002之间的交互。The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.

存储器1004被配置为存储各种类型的数据以支持在电子设备1000的操作。这些数据的示例包括用于在电子设备1000上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1004可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1004 is configured to store various types of data to support operations on the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

电源组件1006为电子设备1000的各种组件提供电源。电源组件1006可以包括电源管理系统,一个或多个电源,及其他与为电子设备1000生成、管理和分配电力相关联的组件。The power supply component 1006 provides power to various components of the electronic device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1000.

多媒体组件1008包括在所述电子设备1000和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1008包括一个前置摄像头和/或后置摄像头。当电子设备1000处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and/or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

音频组件1010被配置为输出和/或输入音频信号。例如,音频组件1010包括一个麦克风(MIC),当电子设备1000处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1004或经由通信组件1016发送。在一些实施例中,音频组件1010还包括一个扬声器,用于输出音频信号。The audio component 1010 is configured to output and/or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the electronic device 1000 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.

I/O接口1012为处理组件1002和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。I/O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

传感器组件1014包括一个或多个传感器,用于为电子设备1000提供各个方面的状态评估。例如,传感器组件1014可以检测到电子设备1000的打开/关闭状态,组件的相对定位,例如所述组件为电子设备1000的显示器和小键盘,传感器组件1014还可以检测电子设备1000或电子设备1000一个组件的位置改变,用户与电子设备1000接触的存在或不存在,电子设备1000方位或加速/减速和电子设备1000的温度变化。传感器组件1014可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1014还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1014还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic device 1000. For example, the sensor assembly 1014 can detect the open/closed state of the electronic device 1000, the relative positioning of components, such as the display and keypad of the electronic device 1000, and the sensor assembly 1014 can also detect the position change of the electronic device 1000 or a component of the electronic device 1000, the presence or absence of user contact with the electronic device 1000, the orientation or acceleration/deceleration of the electronic device 1000, and the temperature change of the electronic device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信组件1016被配置为便于电子设备1000和其他设备之间有线或无线方式的通信。电子设备1000可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1016经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1016还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,电子设备1000可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1004,上述指令可由电子设备1000的处理器1020执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

本公开实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述实施例中的基于可视化编程的模块创建方法。The embodiments of the present disclosure also provide a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the module creation method based on visual programming in the above embodiments.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims (15)

1. A method of creating a module based on visual programming, applied to an electronic device, the method comprising:
responding to a custom module creation operation, displaying a module creation page, wherein the module creation page comprises a first module display area and a module creation area;
And sequentially moving the plurality of functional modules in the first module display area to the module creation area to create a custom module, wherein the plurality of functional modules in the custom module are sequentially connected, and the functional modules are used for controlling the intelligent equipment to execute corresponding actions.
2. The module creation method according to claim 1, wherein sequentially moving the plurality of function modules in the first module display area to the module creation area creates a custom module, comprising:
Sequentially moving a plurality of functional modules in the first module display area to the module creation area to obtain a module combination, and operating the module combination;
And under the condition that the module combination is operable, storing the module combination to obtain the custom module.
3. The module creation method according to claim 2, wherein the first module display area includes a plurality of function types, each of the function types includes a plurality of function modules, and the sequentially moving the plurality of function modules in the first module display area to the module creation area, to obtain a module combination, includes:
responding to a selection operation of a target function type, and displaying a function module belonging to the target function type, wherein the target function type is any one of the function types;
and sequentially moving the plurality of function modules belonging to the target function type to the module creation area to obtain the module combination.
4. A module creation method according to claim 3, characterized in that the method further comprises:
And sequentially moving at least one function module belonging to the target function type to the task editing area, displaying the function modules belonging to other function types in response to the selection operation of the other function types except the target function type, and sequentially moving at least one function module belonging to the other function types to the task editing area to obtain the module combination.
5. The module creation method of claim 1, wherein the first module display area includes a custom function type, the sequentially moving the plurality of function modules in the first module display area to the module creation area, and after creating the custom module, the method further comprises:
and responding to the selection operation of the custom function type, and displaying the custom module.
6. The module creation method of claim 5, further comprising:
And responding to the editing operation of the custom module, editing the custom module, and obtaining the updated custom module.
7. The module creation method of claim 6, further comprising:
And responding to the sharing operation of the custom module, and sharing the custom module to a target page.
8. The module creation method of claim 1, wherein the displaying the module creation page in response to the custom module creation operation comprises:
Displaying a visual programming page;
Responding to the selection operation of the custom module configuration options in the visual programming page, and displaying the creation controls corresponding to the custom module configuration options;
and responding to the selection operation of the creation control, and displaying the module creation page.
9. The module creation method of claim 8, wherein the displaying the module creation page in response to a selection operation of the creation control comprises:
Responding to the selection operation of the creation control, and displaying a creation module window;
inputting the module name of the custom module to be created in the creation module window;
And responding to the determining operation of the module name, and displaying the module creation page.
10. The module creation method according to claim 1, wherein the sequentially moving the plurality of function modules in the first module display area to the module creation area creates a custom module, the method further comprising:
creating a target task based on the custom module;
and controlling the intelligent equipment based on the target task so as to enable the intelligent equipment to execute corresponding actions according to the self-defining module in the target task.
11. The module creation method according to claim 10, wherein the creating a target task based on the custom module includes:
Displaying a task editing page, wherein the task editing page comprises a second module display area and a task editing area;
And moving the custom module in the second module display area to a task editing area to obtain a target task.
12. The method for creating a module according to claim 11, wherein said moving the custom module in the second module display area to a task editing area to obtain a target task includes:
And sequentially moving the plurality of functional modules and the custom module in the second module display area to a task editing area, and sequentially connecting the plurality of functional modules and the custom module to obtain the target task, wherein a first module is connected with a starting module in the task editing area, and the first module is the custom module or any one of the plurality of functional modules.
13. A module creation apparatus based on visual programming, the apparatus comprising:
The page display module is configured to respond to a custom module creation operation, display a module creation page, and the module creation page comprises a first module display area and a module creation area;
The creation module is configured to sequentially move the plurality of functional modules in the first module display area to the module creation area to create a custom module, the plurality of functional modules in the custom module are sequentially connected, and the functional modules are used for controlling the intelligent device to execute corresponding actions.
14. An electronic device, comprising:
A processor;
A memory for storing processor-executable instructions;
Wherein the processor is configured to perform the visualization programming based module creation method of any of claims 1-12.
15. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the visualization programming-based module creation method of any of claims 1-12.
CN202211537481.0A 2022-12-02 2022-12-02 Module creation method and device based on visual programming, electronic equipment and medium Pending CN118170362A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211537481.0A CN118170362A (en) 2022-12-02 2022-12-02 Module creation method and device based on visual programming, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211537481.0A CN118170362A (en) 2022-12-02 2022-12-02 Module creation method and device based on visual programming, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN118170362A true CN118170362A (en) 2024-06-11

Family

ID=91357102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211537481.0A Pending CN118170362A (en) 2022-12-02 2022-12-02 Module creation method and device based on visual programming, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN118170362A (en)

Similar Documents

Publication Publication Date Title
CN105893136B (en) Multitask management method and device
CN112738618B (en) Video recording method and device and electronic equipment
US11188203B2 (en) Method for generating multimedia material, apparatus, and computer storage medium
CN113238752B (en) Code generation method, device, electronic equipment and storage medium
CN106250162A (en) A multi-task operation method in instant navigation and intelligent rearview mirror
CN106775202A (en) A kind of method and device of information transfer
CN104636170A (en) Application acquiring method and device and electronic device
EP3798936A1 (en) Method and device for managing information
CN111371952A (en) Application icon management method and device
CN112632939B (en) Data processing method, data display method, device and storage medium
CN114727150B (en) Video editing method, video editing device and storage medium
CN113359978A (en) Control method and device of multimedia equipment, electronic equipment and storage medium
CN113010157A (en) Code generation method and device
CN118170362A (en) Module creation method and device based on visual programming, electronic equipment and medium
CN113919311B (en) Data display method and device, electronic equipment and storage medium
CN104793859A (en) Layout method and device of application interface
CN118170081A (en) Method, device, electronic device and medium for controlling equipment based on visual programming
CN112581102B (en) Task management method, device, electronic device and storage medium
CN116931777A (en) Drag-based prediction model generation method, data set prediction method and device
CN114036114A (en) Method and device for displaying attachment in online document, electronic equipment and storage medium
CN117215682B (en) Interactive event execution method and device, electronic device, and storage medium
CN112015310A (en) Obtaining a cover of an electronic icon and a cover setting method, device and electronic device
CN118605777B (en) Object variable data setting method, device, electronic device and storage medium
CN114697723B (en) Video generation method, device and medium
US20240221253A1 (en) Picture editing method, electronic device, 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