[go: up one dir, main page]

CN109800024B - Method and device for realizing physical hardware control program release and physical hardware control - Google Patents

Method and device for realizing physical hardware control program release and physical hardware control Download PDF

Info

Publication number
CN109800024B
CN109800024B CN201711115703.9A CN201711115703A CN109800024B CN 109800024 B CN109800024 B CN 109800024B CN 201711115703 A CN201711115703 A CN 201711115703A CN 109800024 B CN109800024 B CN 109800024B
Authority
CN
China
Prior art keywords
hardware
physical hardware
program
physical
action
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.)
Active
Application number
CN201711115703.9A
Other languages
Chinese (zh)
Other versions
CN109800024A (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.)
Makeblock Co Ltd
Original Assignee
Makeblock 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 Makeblock Co Ltd filed Critical Makeblock Co Ltd
Priority to CN201711115703.9A priority Critical patent/CN109800024B/en
Publication of CN109800024A publication Critical patent/CN109800024A/en
Application granted granted Critical
Publication of CN109800024B publication Critical patent/CN109800024B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

本发明涉及了一种物理硬件控制方法、实现物理硬件控制程序发布的方法、装置及电子设备,所述物理硬件控制方法包括:控制端由程序发布端下载已发布的物理硬件控制程序,物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块;加载物理硬件控制程序,通过程序加载建立与物理硬件之间的通信连接,并获取与硬件角色所配置动作块具有映射关系的动作描述信息;通过通信连接发送动作描述信息至物理硬件,通过动作描述信息定义的硬件角色可执行动作进行相关联物理硬件的动作控制。采用本发明能够充分利用已发布的物理硬件控制程序向物理硬件实施动作控制。

Figure 201711115703

The present invention relates to a physical hardware control method, a method, device and electronic equipment for realizing physical hardware control program release. The control program integrates the configuration file, hardware analysis protocol and hardware communication library. The configuration file is used to describe the hardware role associated with the physical hardware and the action blocks configured by the hardware role; load the physical hardware control program, and establish a relationship with the physical hardware through program loading. and obtain the action description information that has a mapping relationship with the action block configured by the hardware role; send the action description information to the physical hardware through the communication connection, and the hardware role defined by the action description information can execute the action to perform the associated physical hardware. Action control. By adopting the present invention, the released physical hardware control program can be fully utilized to implement motion control to the physical hardware.

Figure 201711115703

Description

实现物理硬件控制程序发布、物理硬件控制的方法及装置Method and device for realizing physical hardware control program release and physical hardware control

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种实现物理硬件控制程序发布、物理硬件控制的方法及装置。The present invention relates to the field of computer technology, and in particular, to a method and device for implementing physical hardware control program release and physical hardware control.

背景技术Background technique

随着计算机技术的发展,图形化编程也得以迅速地发展。图形化编程,是指构成代码的命令和参数等通过类似于积木形状的模块来实现,由此,即使用户不熟悉代码的命令和参数,或者不熟悉键盘操作,也能够仅通过鼠标将模块拖动至编程区来完成代码编辑。With the development of computer technology, graphical programming has also developed rapidly. Graphical programming means that the commands and parameters that make up the code are realized through modules similar to the shape of building blocks. Therefore, even if the user is not familiar with the commands and parameters of the code, or is not familiar with keyboard operation, he can drag the module only by the mouse. Move to the programming area to complete the code editing.

为了方便于广大图形化编程的爱好者之间的交流和学习,图形化编程现已支持将完成代码编辑的源码发布至指定网站,爱好者可以在指定网站以网页浏览的方式进行源码加载,以此实现源码浏览进而达到交流和学习的目的。In order to facilitate the communication and learning among the enthusiasts of graphical programming, graphical programming now supports publishing the source code of the completed code editing to the designated website. This implements source code browsing to achieve the purpose of communication and learning.

然而,对于用户而言,其所发布至指定网站上的源码作品仍然停留在演示阶段,尚无法进入到实际应用阶段,即让其他用户能够通过该源码作品对所拥有的物理硬件,例如,机器人,实施动作控制。However, for the user, the source code work published on the designated website is still in the demonstration stage and cannot enter the practical application stage, that is, other users can use the source code work to control the physical hardware they have, such as robots. , to implement motion control.

综上所述,如何将用户的源码作品推入实际应用阶段仍亟待解决。To sum up, how to push the user's source code works into the practical application stage still needs to be solved urgently.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,本发明的一个目的在于提供一种实现物理硬件控制程序发布、物理硬件控制的方法及装置。In order to solve the above technical problems, an object of the present invention is to provide a method and device for implementing physical hardware control program release and physical hardware control.

其中,本发明所采用的技术方案为:Wherein, the technical scheme adopted in the present invention is:

一种物理硬件控制方法,包括:控制端由程序发布端下载已发布的物理硬件控制程序,所述物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,所述配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块;加载所述物理硬件控制程序,通过程序加载建立与物理硬件之间的通信连接,并获取与所述硬件角色所配置动作块具有映射关系的动作描述信息;通过所述通信连接发送所述动作描述信息至所述物理硬件,通过所述动作描述信息定义的所述硬件角色可执行动作进行相关联物理硬件的动作控制。A physical hardware control method, comprising: a control terminal downloads a published physical hardware control program from a program publishing terminal, the physical hardware control program integrates a configuration file, a hardware analysis protocol and a hardware communication library, and the configuration file is used to describe The hardware role associated with the physical hardware and the action block configured by the hardware role; load the physical hardware control program, establish a communication connection with the physical hardware through program loading, and obtain a mapping with the action block configured by the hardware role The action description information of the relationship; the action description information is sent to the physical hardware through the communication connection, and the hardware role defined by the action description information can perform actions to control the action of the associated physical hardware.

一种实现物理硬件控制程序发布的方法,包括:程序制作端根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,获取所述物理硬件的配置文件;将硬件解析协议、硬件通信库和所述配置文件进行指定程序加载环境下的编译,生成物理硬件控制程序;为所述物理硬件向程序发布端请求发布所述物理硬件控制程序。A method for realizing the release of a physical hardware control program, comprising: a program making end obtains a configuration file of the physical hardware according to the addition of a hardware role associated with the physical hardware or the addition of an action block configured by the hardware role; , the hardware communication library and the configuration file are compiled under the specified program loading environment to generate a physical hardware control program; the physical hardware control program is requested to the program issuing end for the physical hardware to be released.

一种物理硬件控制装置,包括:程序下载模块,用于控制端由程序发布端下载已发布的物理硬件控制程序,所述物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,所述配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块;程序加载模块,用于加载所述物理硬件控制程序,通过程序加载建立与物理硬件之间的通信连接,并获取与所述硬件角色所配置动作块具有映射关系的动作描述信息;信息发送模块,用于通过所述通信连接发送所述动作描述信息至所述物理硬件,通过所述动作描述信息定义的所述硬件角色可执行动作进行相关联物理硬件的动作控制。A physical hardware control device, comprising: a program download module for a control terminal to download a published physical hardware control program from a program release terminal, the physical hardware control program is integrated with a configuration file, a hardware analysis protocol and a hardware communication library, so The configuration file is used to describe the hardware role associated with the physical hardware and the action block configured by the hardware role; the program loading module is used to load the physical hardware control program, and establishes a communication connection with the physical hardware through program loading, and Obtain the action description information that has a mapping relationship with the action block configured by the hardware role; the information sending module is configured to send the action description information to the physical hardware through the communication connection, and the action description information defined by the action description information The hardware roles can perform actions to control the actions of the associated physical hardware.

一种实现物理硬件控制程序发布的装置,包括:文件获取模块,用于程序制作端根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,获取所述物理硬件的配置文件;程序生成模块,用于将硬件解析协议、硬件通信库和所述配置文件进行指定程序加载环境下的编译,生成物理硬件控制程序;程序发布模块,用于为所述物理硬件向程序发布端请求发布所述物理硬件控制程序。A device for realizing physical hardware control program release, comprising: a file acquisition module for a program making end to acquire the configuration of the physical hardware according to the addition of a hardware role associated with the physical hardware or the addition of an action block configured by the hardware role file; a program generation module for compiling the hardware parsing protocol, the hardware communication library and the configuration file under a specified program loading environment to generate a physical hardware control program; a program release module for issuing a program for the physical hardware The terminal requests to release the physical hardware control program.

一种电子设备,包括处理器及存储器,所述存储器上存储有计算机可读指令,所述计算机可读指令被所述处理器执行时实现如上所述的方法。An electronic device includes a processor and a memory, where computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, the above method is implemented.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的方法。A computer-readable storage medium having a computer program stored thereon, the computer program implementing the method as described above when executed by a processor.

在上述技术方案中,控制端由程序发布端下载已发布的物理硬件控制程序,进而通过加载物理硬件控制程序建立与物理硬件之间的通信连接,并以此获取与物理硬件相关联硬件角色所配置动作块具有映射关系的动作描述信息,从而利用通信连接向物理硬件发送动作描述信息,使得物理硬件根据动作描述信息定义的硬件角色可执行动作执行相关的动作,也就是说,由于已发布的物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,使得其他用户能够充分利用已发布的物理硬件控制程序来向其所拥有的物理硬件实施动作控制,以此使得进行物理硬件控制程序发布的用户将其源码作品推入实际应用阶段,有效地解决了现有技术中源码作品发布仍停留在演示阶段的问题。In the above technical solution, the control terminal downloads the published physical hardware control program from the program publishing terminal, and then establishes a communication connection with the physical hardware by loading the physical hardware control program, and obtains all hardware roles associated with the physical hardware. The configuration action block has the action description information of the mapping relationship, so that the action description information is sent to the physical hardware by using the communication connection, so that the physical hardware can execute the action according to the hardware role defined by the action description information. The physical hardware control program integrates configuration files, hardware analysis protocols and hardware communication libraries, so that other users can make full use of the published physical hardware control programs to implement motion control to the physical hardware they own, so that the physical hardware control program can be executed. The published users push their source code works into the actual application stage, which effectively solves the problem that the source code works are released in the demonstration stage in the prior art.

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

附图说明Description of 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是根据本发明所涉及的实施环境的示意图。FIG. 1 is a schematic diagram of an implementation environment involved in accordance with the present invention.

图2是根据一示例性实施例示出的一种控制端的硬件结构框图。Fig. 2 is a block diagram showing the hardware structure of a control terminal according to an exemplary embodiment.

图3是根据一示例性实施例示出的一种程序制作端的硬件结构框图。FIG. 3 is a block diagram of a hardware structure of a program creation terminal according to an exemplary embodiment.

图4是根据一示例性实施例示出的一种物理硬件控制方法的流程图。Fig. 4 is a flow chart of a method for controlling physical hardware according to an exemplary embodiment.

图5是图4实施例中步骤330在一个实施例的流程图。FIG. 5 is a flowchart of step 330 in the embodiment of FIG. 4 in one embodiment.

图6是根据一示例性实施例示出的另一种物理硬件控制方法的流程图。Fig. 6 is a flowchart showing another physical hardware control method according to an exemplary embodiment.

图7是根据一示例性实施例示出的另一种物理硬件控制程序方法的流程图。Fig. 7 is a flow chart of another physical hardware control program method according to an exemplary embodiment.

图8是图7实施例中步骤430在一个实施例的流程图。FIG. 8 is a flowchart of step 430 in the embodiment of FIG. 7 in one embodiment.

图9是根据一示例性实施例示出的一种实现物理硬件控制程序发布的方法的流程图。Fig. 9 is a flow chart of a method for implementing physical hardware control program release according to an exemplary embodiment.

图10是根据一应用场景所示出的物理硬件控制程序生成过程的具体实现示意图。FIG. 10 is a schematic diagram of a specific implementation of a process of generating a physical hardware control program according to an application scenario.

图11是根据一应用场景所示出的物理硬件控制的具体实现实体图。FIG. 11 is a diagram showing a specific implementation of physical hardware control according to an application scenario.

图12是根据一示例性实施例示出的一种物理硬件控制装置的框图。Fig. 12 is a block diagram of a physical hardware control apparatus according to an exemplary embodiment.

图13是根据一示例性实施例示出的一种实现物理硬件控制程序发布的装置的框图。Fig. 13 is a block diagram of an apparatus for implementing physical hardware control program distribution according to an exemplary embodiment.

通过上述附图,已示出本发明明确的实施例,后文中将有更详细的描述,这些附图和文字描述并不是为了通过任何方式限制本发明构思的范围,而是通过参考特定实施例为本领域技术人员说明本发明的概念。By means of the above-mentioned drawings, which have shown specific embodiments of the present invention, a more detailed description will follow, these drawings and written descriptions are not intended to limit the scope of the inventive concept in any way, but by reference to specific embodiments. The concept of the present invention is explained to those skilled in the art.

具体实施方式Detailed ways

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

图1为一种物理硬件控制方法所涉及的实施环境的示意图。该实施环境包括控制端100、受控于控制端100而执行相关联硬件角色可执行动作相关动作的物理硬件120、向控制端100提供物理硬件控制程序的程序发布端200、以及为物理硬件向程序发布端200请求发布物理硬件控制程序的程序制作端300。FIG. 1 is a schematic diagram of an implementation environment involved in a physical hardware control method. The implementation environment includes a control terminal 100 , a physical hardware 120 that is controlled by the control terminal 100 to perform actions related to associated hardware roles, and a program publishing terminal 200 that provides the physical hardware control program to the control terminal 100 , and provides the physical hardware to the physical hardware. The program issuer 200 requests the program maker 300 to issue the physical hardware control program.

其中,其他用户110所在的控制端100可以是台式电脑、笔记本电脑、平板电脑、智能手机或者其他可运行物理硬件控制程序的电子设备,在此不进行限定。Wherein, the control terminal 100 where the other users 110 are located may be a desktop computer, a notebook computer, a tablet computer, a smart phone, or other electronic devices capable of running physical hardware control programs, which are not limited herein.

用户310所在的程序制作端300可以是台式电脑、笔记本电脑、平板电脑、智能手机或者其他提供用户编程功能的电子设备,在此不进行限定。The program making end 300 where the user 310 is located may be a desktop computer, a notebook computer, a tablet computer, a smart phone, or other electronic devices that provide user programming functions, which are not limited herein.

程序发布端200可以是一台服务器、或者由多台服务器构成的服务器集群,还可以是一个云计算中心,即由一整片服务器集群形成的虚拟计算平台。The program publishing end 200 may be a server, or a server cluster composed of multiple servers, or may be a cloud computing center, that is, a virtual computing platform formed by a whole server cluster.

物理硬件120,是独立于控制端100而存在于物理世界中的硬件设备,例如,可以是机器人,可以是传感器本身,也可以是装配了各种传感器并由一定形状壳体封装成的硬件设备,或者任一配备了通信接口(例如WIFI接口)的硬件设备。The physical hardware 120 is a hardware device that exists in the physical world independently of the control terminal 100. For example, it can be a robot, a sensor itself, or a hardware device assembled with various sensors and encapsulated by a certain shape shell , or any hardware device equipped with a communication interface (such as a WIFI interface).

物理硬件120将在控制端100的控制下,通过执行本发明所示的方法而能够通过已发布的物理硬件控制程序被执行与其相关联硬件角色可执行动作相关的动作。Under the control of the control terminal 100, the physical hardware 120 will be able to execute actions related to the executable actions of its associated hardware role through the published physical hardware control program by executing the method shown in the present invention.

在该实施环境中,通过程序发布端200与程序制作端300之间所形成的通信连接,用户310得以将由其源码作品所生成的物理硬件控制程序发布至程序发布端200,进而供其他用户110使用。In this implementation environment, through the communication connection formed between the program publishing end 200 and the program producing end 300, the user 310 can publish the physical hardware control program generated by his source code work to the program publishing end 200, and then make it available to other users 110. use.

对于其他用户110所在的控制端100而言,便能够由程序发布端200下载已发布的物理硬件控制程序,进而利用该物理硬件控制程序向其所拥有的物理硬件实施动作控制,由此将用户310的源码作品推入实际应用阶段。For the control terminal 100 where other users 110 are located, the program publishing terminal 200 can download the published physical hardware control program, and then use the physical hardware control program to implement motion control on the physical hardware owned by the user, so that the user The source code works of 310 are pushed into the practical application stage.

进一步地,控制端100进行着自身与物理硬件110二者之间的交互,控制端100唯一,所对应的物理硬件110可以是一个或者两个以上,并且可以是单一种类或者多种种类,在此不加以限定。Further, the control terminal 100 performs the interaction between itself and the physical hardware 110. The control terminal 100 is unique, and the corresponding physical hardware 110 may be one or more than one, and may be of a single type or multiple types. This is not limited.

请参阅图2,图2是根据一示例性实施例示出的一种控制端的框图。Please refer to FIG. 2 , which is a block diagram of a control terminal according to an exemplary embodiment.

需要说明的是,该控制端100只是一个适配于本发明的示例,不能认为是提供了对本发明的使用范围的任何限制。该控制端100也不能解释为需要依赖于或者必须具有图2中示出的示例性的控制端100中的一个或者多个组件。It should be noted that the control terminal 100 is only an example adapted to the present invention, and should not be considered as providing any limitation on the scope of use of the present invention. Neither should the console 100 be construed as requiring or necessarily having one or more components in the exemplary console 100 shown in FIG. 2 .

如图2所示,控制端100包括存储器101、存储控制器103、一个或多个(图2中仅示出一个)处理器105、外设接口107、射频模块109、定位模块111、摄像模块113、音频模块115、触控屏幕117以及按键模块119。这些组件通过一条或多条通讯总线/信号线121相互通讯。As shown in FIG. 2 , the control terminal 100 includes a memory 101 , a storage controller 103 , one or more (only one is shown in FIG. 2 ) processors 105 , a peripheral interface 107 , a radio frequency module 109 , a positioning module 111 , and a camera module 113 , an audio module 115 , a touch screen 117 and a key module 119 . These components communicate with each other via one or more communication bus/signal lines 121 .

其中,存储器101可用于存储软件程序以及模块,如本发明示例性实施例中的物理硬件控制方法及装置对应的程序指令及模块,处理器105通过运行存储在存储器101内的程序指令,从而执行各种功能以及数据处理,即完成物理硬件控制方法。The memory 101 can be used to store software programs and modules, such as program instructions and modules corresponding to the physical hardware control method and device in the exemplary embodiment of the present invention, and the processor 105 executes the program instructions stored in the memory 101 by running the program instructions. Various functions and data processing, that is, to complete the physical hardware control method.

存储器101作为资源存储的载体,可以是随机存储器、例如高速随机存储器、非易失性存储器,如一个或多个磁性存储装置、闪存、或者其它固态存储器。存储方式可以是短暂存储或者永久存储。As a carrier for resource storage, the memory 101 may be random access memory, such as high-speed random access memory, non-volatile memory, such as one or more magnetic storage devices, flash memory, or other solid-state memory. The storage method can be short-term storage or permanent storage.

外设接口107可以包括至少一有线或无线网络接口、至少一串并联转换接口、至少一输入输出接口以及至少一USB接口等,用于将外部各种输入/输出装置耦合至存储器101以及处理器105,以实现与外部各种输入/输出装置的通信。The peripheral interface 107 may include at least one wired or wireless network interface, at least one serial-parallel conversion interface, at least one input/output interface, and at least one USB interface, etc., for coupling various external input/output devices to the memory 101 and the processor 105 to communicate with various external input/output devices.

射频模块109用于收发电磁波,实现电磁波与电信号的相互转换,从而通过通讯网络与其他设备进行通讯。通信网络包括蜂窝式电话网、无线局域网或者城域网,上述通信网络可以使用各种通信标准、协议及技术。The radio frequency module 109 is used for receiving and sending electromagnetic waves to realize mutual conversion between electromagnetic waves and electrical signals, so as to communicate with other devices through a communication network. Communication networks include cellular telephone networks, wireless local area networks, or metropolitan area networks, which may use various communication standards, protocols, and technologies.

定位模块111用于获取控制端100的当前所在的地理位置。定位模块111的实例包括但不限于全球卫星定位系统(GPS)、基于无线局域网或者移动通信网的定位技术。The positioning module 111 is used to obtain the current geographic location of the control terminal 100 . Examples of the positioning module 111 include, but are not limited to, Global Positioning System (GPS), positioning technology based on a wireless local area network or a mobile communication network.

摄像模块113隶属于摄像头,用于拍摄图片或者视频。拍摄的图片或者视频可以存储至存储器101内,还可以通过射频模块109发送至上位机。The camera module 113 belongs to the camera and is used for taking pictures or videos. The captured pictures or videos can be stored in the memory 101 , and can also be sent to the host computer through the radio frequency module 109 .

音频模块115向用户提供音频接口,其可包括一个或多个麦克风接口、一个或多个扬声器接口以及一个或多个耳机接口。通过音频接口与其它设备进行音频数据的交互。音频数据可以存储至存储器101内,还可以通过射频模块109发送。The audio module 115 provides an audio interface to the user, which may include one or more microphone interfaces, one or more speaker interfaces, and one or more headphone interfaces. Interaction of audio data with other devices through the audio interface. The audio data can be stored in the memory 101 , and can also be transmitted through the radio frequency module 109 .

触控屏幕117在控制端100与用户之间提供一个输入输出界面。具体地,用户可通过触控屏幕117进行输入操作,例如点击、触摸、滑动等手势操作,以使控制端100对该输入操作进行响应。控制端100则将文字、图片或者视频任意一种形式或者组合所形成的输出内容通过触控屏幕117向用户显示输出。The touch screen 117 provides an input and output interface between the control terminal 100 and the user. Specifically, the user can perform an input operation through the touch screen 117 , such as a gesture operation such as clicking, touching, sliding, etc., so that the control terminal 100 responds to the input operation. The control terminal 100 displays the output content formed by any form or combination of text, picture or video to the user through the touch screen 117 .

按键模块119包括至少一个按键,用以提供用户向控制端100进行输入的接口,用户可以通过按下不同的按键使控制端100执行不同的功能。例如,声音调节按键可供用户实现对控制端100播放的声音音量的调节。The key module 119 includes at least one key to provide an interface for the user to input to the control terminal 100 , and the user can make the control terminal 100 perform different functions by pressing different keys. For example, the sound adjustment button can be used by the user to adjust the volume of the sound played by the control terminal 100 .

可以理解,图2所示的结构仅为示意,控制端100还可包括比图2中所示更多或更少的组件,或者具有与图2所示不同的组件。图2中所示的各组件可以采用硬件、软件或者其组合来实现。It can be understood that the structure shown in FIG. 2 is only for illustration, and the control terminal 100 may further include more or less components than those shown in FIG. 2 , or have different components from those shown in FIG. 2 . Each component shown in FIG. 2 may be implemented in hardware, software, or a combination thereof.

图3是根据一示例性实施例示出的一种程序制作端的硬件结构框图。需要说明的是,该程序制作端300只是一个适配于本发明的示例,不能认为是提供了对本发明的使用范围的任何限制。该程序制作端300也不能解释为需要依赖于或者必须具有图3中示出的示例性的程序制作端300中的一个或者多个组件。FIG. 3 is a block diagram of a hardware structure of a program creation terminal according to an exemplary embodiment. It should be noted that the program creation terminal 300 is only an example suitable for the present invention, and should not be considered as providing any limitation on the scope of use of the present invention. Nor should the programmer 300 be construed as requiring or necessarily having one or more components in the exemplary programmer 300 shown in FIG. 3 .

该程序制作端300的硬件结构可因配置或者性能的不同而产生较大的差异,如图3所示,程序制作端300包括:电源310、接口330、至少一存储器350、以及至少一中央处理器(CPU,Central Processing Units)370。The hardware structure of the program creation terminal 300 may vary greatly due to different configurations or performances. As shown in FIG. 3 , the program creation terminal 300 includes: a power supply 310 , an interface 330 , at least one memory 350 , and at least one central processing unit CPU (Central Processing Units) 370 .

其中,电源310用于为程序制作端300上的各硬件设备提供工作电压。The power supply 310 is used to provide working voltage for each hardware device on the program creation end 300 .

接口330包括至少一有线或无线网络接口331、至少一串并转换接口333、至少一输入输出接口335以及至少一USB接口337等,用于与外部设备通信。The interface 330 includes at least one wired or wireless network interface 331, at least one serial-parallel conversion interface 333, at least one input/output interface 335, and at least one USB interface 337, etc., for communicating with external devices.

存储器350作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,其上所存储的资源包括操作系统351、应用程序353及数据355等,存储方式可以是短暂存储或者永久存储。其中,操作系统351用于管理与控制程序制作端300上的各硬件设备以及应用程序353,以实现中央处理器370对海量数据355的计算与处理,其可以是WindowsServerTM、Mac OS XTM、UnixTM、LinuxTM、FreeBSDTM等。应用程序353是基于操作系统351之上完成至少一项特定工作的计算机程序,其可以包括至少一模块(图3中未示出),每个模块都可以分别包含有对程序制作端300的一系列计算机可读指令。数据355可以是存储于磁盘中的照片、图片等。The memory 350 is used as a carrier for resource storage, which can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc. The resources stored on it include the operating system 351, the application program 353 and the data 355, etc., and the storage method can be short-term storage or permanent storage. . Wherein, the operating system 351 is used to manage and control each hardware device and application program 353 on the program making end 300, so as to realize the calculation and processing of the massive data 355 by the central processing unit 370, which can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc. The application program 353 is a computer program based on the operating system 351 to complete at least one specific task, and it may include at least one module (not shown in FIG. 3 ), and each module may respectively include a function for the program making terminal 300. series of computer readable instructions. Data 355 may be photos, pictures, etc. stored on disk.

中央处理器370可以包括一个或多个以上的处理器,并设置为通过总线与存储器350通信,用于运算与处理存储器350中的海量数据355。The central processing unit 370 may include one or more processors, and is configured to communicate with the memory 350 through a bus, so as to operate and process the massive data 355 in the memory 350 .

如上面所详细描述的,适用本发明的程序制作端300将通过中央处理器370读取存储器350中存储的一系列计算机可读指令的形式进行物理硬件控制程序的发布,进而使得控制端通过下载的已发布物理硬件控制程序控制物理硬件来执行相关联硬件角色可执行动作相关的动作。As described in detail above, the program creation terminal 300 applicable to the present invention will issue the physical hardware control program in the form of reading a series of computer-readable instructions stored in the memory 350 by the central processing unit 370, so that the control terminal can download The published physical hardware control program controls the physical hardware to perform actions associated with the actions that the associated hardware character can perform.

此外,通过硬件电路或者硬件电路结合软件指令也能同样实现本发明,因此,实现本发明并不限于任何特定硬件电路、软件以及两者的组合。In addition, the present invention can also be implemented by hardware circuits or hardware circuits combined with software instructions. Therefore, implementation of the present invention is not limited to any specific hardware circuits, software, and combinations of the two.

请参阅图4,在一示例性实施例中,一种物理硬件控制方法适用于图1所示实施环境的控制端100,该控制端100的结构可以如图2所示。Referring to FIG. 4 , in an exemplary embodiment, a physical hardware control method is applicable to the control terminal 100 of the implementation environment shown in FIG. 1 , and the structure of the control terminal 100 may be as shown in FIG. 2 .

该种物理硬件控制方法可以由控制端100执行,可以包括以下步骤:This physical hardware control method can be executed by the control terminal 100, and can include the following steps:

步骤310,控制端由程序发布端下载已发布的物理硬件控制程序。In step 310, the control terminal downloads the released physical hardware control program from the program distribution terminal.

物理硬件控制程序,是指可独立运行于控制端的可执行程序,且该可执行程序被控制端运行时能够使得控制端向物理硬件实施动作控制。The physical hardware control program refers to an executable program that can run independently on the control terminal, and when the executable program is run by the control terminal, enables the control terminal to perform motion control on the physical hardware.

对于程序发布端而言,物理硬件控制程序是由程序制作端为物理硬件请求发布的,以此便能够向控制端提供已发布的物理硬件控制程序。For the program publishing side, the physical hardware control program is issued by the program producing side for the physical hardware request, so that the published physical hardware control program can be provided to the control side.

具体而言,物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库。其中,配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块。硬件解析协议负责配置文件的解析,以使控制端获知向物理硬件所实施的动作控制有哪些。硬件通信库则用于在控制端与物理硬件之间建立通信连接,尤其是在控制端与物理硬件的各零部件之间建立通信连接。例如,物理硬件为机器人,其各零部件包括机器人手臂、机器人腿等等,由此,通过硬件通信库,控制端便能够分别向机器人手臂、机器人腿实时动作控制,进而使得机器人手臂、机器人腿分别执行动作。Specifically, the physical hardware control program integrates configuration files, hardware resolution protocols and hardware communication libraries. The configuration file is used to describe the hardware roles associated with the physical hardware and the action blocks configured by the hardware roles. The hardware parsing protocol is responsible for parsing the configuration file, so that the control end can know which action controls are implemented to the physical hardware. The hardware communication library is used to establish a communication connection between the control terminal and the physical hardware, especially to establish a communication connection between the control terminal and various components of the physical hardware. For example, the physical hardware is a robot, and its components include robot arms, robot legs, etc. Therefore, through the hardware communication library, the control terminal can respectively control the movements of the robot arms and robot legs in real time, thereby making the robot arms and robot legs move in real time. Perform actions separately.

为此,用户所在程序制作端将物理硬件的配置文件、硬件解析协议和硬件通信库在指定程序加载环境下进行编译,以生成物理硬件控制程序。其中,指定程序加载环境包括但不限于安卓系统编译环境、MAC系统编译环境、Windows系统编译环境、Linux系统编译环境等。To this end, the user's program making side compiles the physical hardware configuration file, hardware parsing protocol and hardware communication library under the specified program loading environment to generate a physical hardware control program. The specified program loading environment includes, but is not limited to, an Android system compilation environment, a MAC system compilation environment, a Windows system compilation environment, a Linux system compilation environment, and the like.

也就是说,物理硬件控制程序包括多种文件类型的可执行文件,例如,APK文件类型的可执行文件、EXE文件类型的可执行文件等等,以便于物理硬件控制程序能够适用于不同控制端中部署的不同操作系统,具备很高的通用性。例如,APK文件类型的可执行文件适用于安卓系统,EXE文件类型的可执行文件适用于Windows系统。That is to say, the physical hardware control program includes executable files of various file types, for example, executable files of the APK file type, executable files of the EXE file type, etc., so that the physical hardware control program can be applied to different control terminals. The different operating systems deployed in the system have high versatility. For example, executable files of the APK file type are suitable for Android systems, and executable files of the EXE file type are suitable for Windows systems.

在物理硬件控制程序生成之后,程序制作端便将该物理硬件控制程序上传至程序发布端,由此,便为用户所拥有的物理硬件进行了物理硬件控制程序的发布,进而使得其他用户所在的控制端便能够由程序发布端下载该物理硬件控制程序,并以此向其所拥有的物理硬件实施动作控制。After the physical hardware control program is generated, the program production side uploads the physical hardware control program to the program publishing side, thereby publishing the physical hardware control program for the physical hardware owned by the user, thereby enabling other users to The control terminal can download the physical hardware control program from the program publishing terminal, and implement motion control to the physical hardware owned by the control terminal.

值得一提的是,物理硬件控制程序生成中,硬件解析协议和硬件通信库是预先整合形成的,即对物理硬件复杂的控制环境以沙盒包装方式进行简化处理得到,以此同时还能够有效降低其他用户的实际应用门槛。而对于配置文件而言,则是根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增来获取。在此,有必要对配置文件的获取进行详细地说明。It is worth mentioning that in the generation of the physical hardware control program, the hardware parsing protocol and the hardware communication library are pre-integrated, that is, the complex control environment of the physical hardware is simplified by sandbox packaging. Lower the practical application threshold for other users. For the configuration file, it is obtained according to the addition of a hardware role associated with the physical hardware or the addition of an action block configured by the hardware role. Here, it is necessary to describe the acquisition of the configuration file in detail.

首先进行说明的是,物理硬件,受控于控制端所实施的动作控制而通过自身所具备的零部件,例如,传感器、显示屏、马达以及各种零部件的组合,来执行相应动作,进而达到控制端向物理硬件进行动作控制的目的。First of all, it is explained that the physical hardware is controlled by the action control implemented by the control terminal and performs corresponding actions through its own components, such as sensors, display screens, motors and combinations of various components, and then To achieve the purpose of controlling the action of the control end to the physical hardware.

举例来说,通过马达以及各种零部件的组合,使得物理硬件具备运动功能。由控制端驱使马达启动,进而使得物理硬件上各种零部件的组合在马达的驱动下执行相关机械运动。For example, through the combination of motors and various components, physical hardware has motion functions. The control terminal drives the motor to start, so that the combination of various components on the physical hardware executes the relevant mechanical movement under the drive of the motor.

进一步地,不同的物理硬件,由其所特有的各种零部件组合而成,并以此能够被进行不同的动作控制。对于程序制作端而言,则向物理硬件提供可接入的交互平台,使得物理硬件随着接入交互平台而能够在接入的交互平台上进行相关联硬件角色可执行动作的展示,进而使得用户在该交互平台中能够根据所展示的硬件角色可执行动作而请求向程序发布端发布该物理硬件相关的物理硬件控制程序。Further, different physical hardware is composed of various unique parts and components, and thus can be controlled by different actions. For the program production side, an accessible interactive platform is provided to the physical hardware, so that the physical hardware can display the executable actions of the associated hardware role on the connected interactive platform as it is connected to the interactive platform, thereby making In the interactive platform, the user can request to release the physical hardware control program related to the physical hardware to the program publishing end according to the displayed hardware role that can perform actions.

其中,硬件角色是作为物理硬件在交互平台中的唯一存在形式,由此向用户提供与物理硬件及其所在物理世界的交互,即用户在交互平台对硬件角色所实施的动作控制将能够被映射至物理世界中其所拥有的物理硬件。同时,随着物理硬件控制程序的发布,用户在交互平台对硬件角色所实施的动作控制还能够被映射至物理世界中其他用户所拥有的物理硬件。Among them, the hardware role is the only existing form of physical hardware in the interactive platform, thereby providing users with interaction with the physical hardware and the physical world in which it is located, that is, the user's action control on the hardware role on the interactive platform will be able to be mapped. to the physical hardware it has in the physical world. At the same time, with the release of the physical hardware control program, the action control performed by the user on the hardware character on the interactive platform can also be mapped to the physical hardware owned by other users in the physical world.

基于图形化编程,在交互平台中,物理硬件相关联硬件角色的可执行动作被表征为动作块,并且通过构建动作块与动作描述信息之间的映射关系,使得动作描述信息所反映出代码的命令和参数等得以通过动作块来实现。Based on graphical programming, in the interactive platform, the executable actions of the hardware roles associated with physical hardware are represented as action blocks, and by building the mapping relationship between the action blocks and the action description information, the action description information reflects the code. Commands and parameters, etc. can be implemented through action blocks.

也就是说,交互平台中为物理硬件相关联硬件角色的可执行动作分别进行了动作块构建,不同的动作块被用于表征硬件角色不同的可执行动作。通过构建的动作块概括地描述了硬件角色可执行动作的名称、定义、参数、返回值等,并通过与该动作块具有映射关系的动作描述信息对硬件角色可执行动作的具体内容进行进一步定义。其中,具体内容基于代码模式下即是指代码、代码的命令、代码的参数、代码中变量、逻辑表达式、循环表达式等表示和表达等等。That is to say, action blocks are constructed for the executable actions of the hardware roles associated with the physical hardware in the interactive platform, and different action blocks are used to represent different executable actions of the hardware roles. The name, definition, parameters, return value, etc. of the executable action of the hardware role are generally described through the constructed action block, and the specific content of the executable action of the hardware role is further defined through the action description information that has a mapping relationship with the action block. . Among them, the specific content based on the code mode refers to the representation and expression of the code, the command of the code, the parameters of the code, the variables in the code, the logical expression, the loop expression, and the like.

由上可知,配置文件所承载的数据,大致分为两类,一类即物理硬件相关联的硬件角色,另一类则为硬件角色所配置的动作块。随着物理硬件相关联的硬件角色的新增,或者硬件角色所配置动作块的新增,配置文件要么为新增的硬件角色而创建,要么为已存在的硬件角色所新增动作块而修改。It can be seen from the above that the data carried by the configuration file is roughly divided into two categories, one is the hardware role associated with the physical hardware, and the other is the action block configured by the hardware role. With the addition of hardware roles associated with physical hardware, or the addition of action blocks configured by hardware roles, configuration files are either created for the newly added hardware roles, or modified for existing hardware roles. .

基于此,物理硬件控制程序生成中,当物理硬件相关联硬件角色的新增,或者硬件角色所配置动作块的新增,均能够触发配置文件的获取。Based on this, in the generation of the physical hardware control program, when a hardware role associated with the physical hardware is added, or an action block configured by the hardware role is added, the acquisition of the configuration file can be triggered.

进一步说明的是,配置文件,唯一对应于硬件角色,但是能够对应于该硬件角色所配置的一个或者多个动作块。配置文件包括资源信息以及配置信息。It is further explained that the configuration file only corresponds to the hardware role, but can correspond to one or more action blocks configured by the hardware role. The configuration file includes resource information and configuration information.

具体地,资源信息与所实现的硬件角色相关,资源信息指示了所实现硬件角色的名称,以及所实现硬件角色进行展示时的展示样式等。进一步地,资源信息包括硬件角色名称、硬件角色标识等。Specifically, the resource information is related to the implemented hardware role, and the resource information indicates the name of the implemented hardware role and the display style when the implemented hardware role is displayed. Further, the resource information includes hardware role names, hardware role identifiers, and the like.

配置信息则是与硬件角色名称所指示的硬件角色所配置的动作块相关,配置信息不仅指示了为硬件角色配置的动作块,还指示了动作块所属分类、名称、定义、参数、返回值、以及具体内容。该具体内容即是指可被渲染形成代码模式下代码信息的动作描述信息。The configuration information is related to the action block configured by the hardware role indicated by the hardware role name. The configuration information not only indicates the action block configured for the hardware role, but also indicates the category, name, definition, parameter, return value, and specific content. The specific content refers to action description information that can be rendered to form code information in the code mode.

亦即,配置文件实时地反映了用户进行图形化编程时所形成的源码,进而使得由此生成的物理硬件控制程序可视为用户的源码作品。That is, the configuration file reflects the source code formed when the user performs graphical programming in real time, so that the generated physical hardware control program can be regarded as the user's source code work.

由上可知,通过物理硬件控制程序中集成了配置文件、硬件解析协议、硬件通信库,使得物理硬件控制程序能够独立运行于控制端,而不必在指定网站以网页浏览方式进行源码加载,由此避免源码作品的发布仍停留在演示阶段。It can be seen from the above that the physical hardware control program integrates the configuration file, hardware analysis protocol, and hardware communication library, so that the physical hardware control program can run on the control side independently, without the need to load the source code by web browsing on the designated website. Avoid release of source work that remains in the demo stage.

步骤330,加载物理硬件控制程序,通过程序加载建立与物理硬件之间的通信连接,并获取与硬件角色所配置动作块具有映射关系的动作描述信息。Step 330: Load the physical hardware control program, establish a communication connection with the physical hardware through the program loading, and acquire action description information that has a mapping relationship with the action block configured by the hardware role.

对于控制端而言,在由程序发布端完成已发布的物理硬件控制程序下载之后,便能够通过该物理硬件控制程序在控制端中的运行,而向物理硬件实施动作控制。For the control terminal, after the published physical hardware control program is downloaded by the program publishing terminal, the physical hardware control program can be run in the control terminal to implement motion control to the physical hardware.

为此,不仅需要在控制端与物理硬件之间建立通信连接,而且还需要具体地获知硬件角色可执行动作有哪些,以便控制端基于该通信连接向物理硬件实施相关联硬件角色可执行动作相关的动作控制。To this end, it is not only necessary to establish a communication connection between the control terminal and the physical hardware, but also to know specifically which actions can be performed by the hardware role, so that the control terminal can implement the relevant hardware role executable actions to the physical hardware based on the communication connection. motion control.

在一示例性实施例的具体实现中,如图5所示,步骤330可以包括以下步骤:In a specific implementation of an exemplary embodiment, as shown in FIG. 5 , step 330 may include the following steps:

步骤331,在指定程序加载环境下进行物理硬件控制程序加载,由加载的物理硬件控制程序中提取配置文件、硬件解析协议和硬件通信库。Step 331 , load the physical hardware control program in the specified program loading environment, and extract the configuration file, the hardware parsing protocol and the hardware communication library from the loaded physical hardware control program.

如前所述,物理硬件控制程序,是程序控制端将物理硬件的配置文件、硬件解析协议和硬件通信库在指定程序加载环境下进行编译生成的。As mentioned above, the physical hardware control program is generated by the program control end compiling the configuration file of the physical hardware, the hardware parsing protocol and the hardware communication library in a specified program loading environment.

由此,该物理硬件控制程序是能够基于指定程序加载环境进行加载的,例如,指定程序加载环境为安卓系统编译环境,则基于安卓系统编译环境所进行的物理硬件控制程序加载即是加载物理硬件控制程序中APK文件类型的可执行文件。Therefore, the physical hardware control program can be loaded based on the specified program loading environment. For example, if the specified program loading environment is the Android system compilation environment, the physical hardware control program loading based on the Android system compilation environment is loading the physical hardware. Executable file that controls the APK file type in the program.

进一步地,物理硬件控制程序加载中,便能够从中提取得到配置文件、硬件解析协议和硬件通信库。Further, when the physical hardware control program is loaded, the configuration file, the hardware parsing protocol and the hardware communication library can be extracted from it.

在上述实现过程中,用户在指定程序加载环境下进行一次编译所形成的物理硬件控制程序即可适用于不同操作系统,即使得无论其他用户所在控制端中部署的是何种操作系统,由程序发布端所下载的物理硬件控制程序均能够独立运行于控制端中,由此具备了很高的通用性。In the above implementation process, the physical hardware control program formed by the user's one-time compilation under the specified program loading environment can be applied to different operating systems, that is, no matter what operating system is deployed in the control terminal of other users, the program can The physical hardware control programs downloaded by the publishing end can run independently in the control end, thus possessing high versatility.

此外,由于物理硬件控制程序的独立运行,不论其后续是否会被删除,均不会对控制端中部署的操作系统或者其它应用程序的运行产生任何的影响,充分地保障了系统运行的安全性和可靠性,有效地提高了用户的使用体验。In addition, due to the independent operation of the physical hardware control program, regardless of whether it will be deleted later, it will not have any impact on the operation of the operating system or other applications deployed in the control terminal, which fully guarantees the security of the system operation. and reliability, effectively improving the user experience.

步骤333,根据硬件解析协议由配置文件解析得到动作描述信息。In step 333, the action description information is obtained by parsing the configuration file according to the hardware parsing protocol.

动作描述信息,将随着与其具有映射关系的动作块的变化而发生改变,进而使得物理硬件相关联硬件角色可执行动作相应地增加。也就是说,当物理硬件相关联硬件角色可执行动作的新增,动作描述信息将随之发生变化,而发生变化的动作描述信息即被更新至配置文件中,以此保证了配置文件中的配置信息是与硬件角色可执行动作实现息息相关的。The action description information will change with the change of the action block that has a mapping relationship with it, so that the actions that can be performed by the hardware role associated with the physical hardware are increased accordingly. That is to say, when an action is added to the hardware role associated with the physical hardware, the action description information will change accordingly, and the changed action description information will be updated to the configuration file, thus ensuring that the The configuration information is closely related to the implementation of the actions that the hardware role can perform.

因此,为了使控制端获知向物理硬件所实施的动作控制有哪些,在获得配置文件和硬件解析协议之后,便能够根据硬件解析协议进行配置文件的解析,以此得到动作描述信息。Therefore, in order to let the control end know which action controls are implemented to the physical hardware, after obtaining the configuration file and the hardware parsing protocol, it can parse the configuration file according to the hardware parsing protocol to obtain the action description information.

步骤335,利用硬件通信库在控制端与物理硬件之间建立通信连接。Step 335, establishing a communication connection between the control terminal and the physical hardware by using the hardware communication library.

通信连接,即是指在控制端与物理硬件之间进行数据传输的通道,而在该通道中传输的数据是满足硬件通信库中规定的数据格式、传输时序等等要求的,从而保证控制端与物理硬件之间数据传输的安全性和可靠性。The communication connection refers to the channel for data transmission between the control terminal and the physical hardware, and the data transmitted in this channel meets the requirements of the data format, transmission timing, etc. specified in the hardware communication library, so as to ensure that the control terminal Security and reliability of data transfers to and from physical hardware.

步骤350,通过通信连接发送动作描述信息至物理硬件,通过动作描述信息定义的硬件角色可执行动作进行相关联物理硬件的动作控制。Step 350: Send the action description information to the physical hardware through the communication connection, and perform the action of the hardware role defined by the action description information to control the action of the associated physical hardware.

在控制端与物理硬件之间的通信连接借由硬件通信库搭建完毕之后,对于物理硬件而言,便能够接收到由控制端下发的动作描述信息,进而按照动作描述信息所定义的硬件角色可执行动作执行相关动作。After the communication connection between the control terminal and the physical hardware is established by the hardware communication library, the physical hardware can receive the action description information issued by the control terminal, and then follow the hardware role defined by the action description information. An executable action executes the associated action.

通过如上所述的过程,对于用户而言,在为其所拥有的物理硬件新增相关联硬件角色,或者为已关联硬件角色新增可执行动作时,随之触发获取到的配置文件将被打包形成物理硬件控制程序,以此向程序发布端请求发布与该物理硬件相关的物理硬件控制程序。Through the above process, when a user adds an associated hardware role to the physical hardware he owns, or adds an executable action to an already associated hardware role, the configuration file that is triggered and acquired will be The physical hardware control program is packaged to form a request to the program issuing end to release the physical hardware control program related to the physical hardware.

对于其他用户而言,由程序发布端下载了该物理硬件控制程序,并通过该物理硬件控制程序对自身所拥有的物理硬件进行动作控制时,该物理硬件被控制执行的动作将是与用户所拥有物理硬件相关联硬件角色的可执行动作相符合的,由此,实现了将用户的源码作品由演示阶段推进至实际应用阶段。For other users, when the program publisher downloads the physical hardware control program and controls the physical hardware owned by the physical hardware control program, the physical hardware controlled and executed will be the same as that of the user. The executable actions of the hardware role associated with the physical hardware are consistent, thereby realizing the advancement of the user's source code work from the demonstration stage to the actual application stage.

此外,由于用户所发布的物理硬件控制程序具备了真正的生产力,针对图形化编程教学领域,有助于提升图形化编程学习者之间的互动,充分地激发每个学习者对图形化编程的兴趣体验。In addition, because the physical hardware control program released by the user has real productivity, aiming at the field of graphical programming teaching, it helps to improve the interaction between graphical programming learners and fully stimulate each learner's interest in graphical programming. Interested experience.

请参阅图6,在一示例性实施例中,如上所述的方法还可以包括以下步骤:Referring to FIG. 6, in an exemplary embodiment, the above-mentioned method may further include the following steps:

步骤410,通过程序加载启动物理硬件控制程序中携带的图形引擎。Step 410: Start the graphics engine carried in the physical hardware control program through program loading.

可以理解,想由程序发布端进行已发布物理硬件控制程序下载的其他用户可能并未拥有任何的物理硬件,此时,该其他用户则无法通过该物理硬件控制程序对其所拥有的物理硬件实施动作控制。It is understandable that other users who want to download the released physical hardware control program from the program publisher may not own any physical hardware. At this time, the other user cannot implement the physical hardware control program that they own through the physical hardware control program. Action control.

为此,在进行物理硬件控制程序发布之前,程序制作端还将添加图形引擎至物理硬件控制程序中,以通过物理硬件控制程序中所携带的图形引擎被启动,而向其他用户提供物理硬件相关联的硬件角色以及动作描述信息的展示。To this end, before the physical hardware control program is released, the program production side will also add a graphics engine to the physical hardware control program, so that the graphics engine carried in the physical hardware control program can be activated and provide other users with physical hardware related information. Linked hardware roles and display of action description information.

需要说明的是,图形引擎可以视为是能够为用户提供图形、数据等展示功能的应用程序,该应用程序可运行于控制端中。It should be noted that the graphics engine can be regarded as an application program that can provide users with display functions such as graphics and data, and the application program can run in the control terminal.

步骤430,在启动的图形引擎中展示动作描述信息以及物理硬件相关联的硬件角色。Step 430 , displaying the action description information and the hardware role associated with the physical hardware in the activated graphics engine.

在上述实施例的作用下,通过物理硬件控制程序中图形引擎的增添,无论其他用户是否拥有物理硬件,均可以在程序发布端下载已发布的物理硬件控制程序,并以此达到交流和学习的目的,充分地扩展了物理硬件控制的灵活性,进一步有效地提高了用户的使用体验。Under the action of the above embodiment, through the addition of a graphics engine in the physical hardware control program, no matter whether other users have physical hardware or not, they can download the published physical hardware control program at the program publishing end, so as to achieve communication and learning. The purpose is to fully expand the flexibility of physical hardware control, and further effectively improve the user experience.

请参阅图7,在一示例性实施例中,步骤430之前,如上所述的方法还可以包括以下步骤:Referring to FIG. 7, in an exemplary embodiment, before step 430, the above-mentioned method may further include the following steps:

步骤510,由物理硬件控制程序中的配置文件提取硬件角色标识。Step 510: Extract the hardware role identifier from the configuration file in the physical hardware control program.

如前所述,配置文件包括资源信息以及配置信息。As mentioned earlier, the configuration file includes resource information as well as configuration information.

其中,资源信息与所实现的硬件角色相关,资源信息指示了所实现硬件角色的名称,以及所实现硬件角色进行展示时的展示样式等。进一步地,资源信息包括硬件角色名称、硬件角色标识等。The resource information is related to the implemented hardware role, and the resource information indicates the name of the implemented hardware role and the display style when the implemented hardware role is displayed. Further, the resource information includes hardware role names, hardware role identifiers, and the like.

配置信息不仅指示了为硬件角色名称所指示的硬件角色配置的动作块,还指示了动作块所属分类、名称、定义、参数、返回值、以及具体内容。该具体内容即是指可被渲染形成代码模式下代码信息的动作描述信息。The configuration information not only indicates the action block configured for the hardware role indicated by the hardware role name, but also indicates the category, name, definition, parameter, return value, and specific content to which the action block belongs. The specific content refers to action description information that can be rendered to form code information in the code mode.

由此,硬件角色标识、动作描述信息均可以通过配置文件获取得到。Therefore, the hardware role identification and action description information can be obtained through the configuration file.

具体地,由配置文件中提取得到硬件角色标识。根据硬件解析协议对配置文件进行解析得到动作描述信息。Specifically, the hardware role identifier is extracted from the configuration file. The configuration file is parsed according to the hardware parsing protocol to obtain the action description information.

步骤530,对硬件角色标识进行图形界面元素渲染形成物理硬件相关联的硬件角色。Step 530 , performing graphical interface element rendering on the hardware character identifier to form a hardware character associated with the physical hardware.

步骤550,将动作描述信息渲染形成代码模式下的代码信息。Step 550: Render the action description information to form code information in the code mode.

首先说明的是,图形界面元素,也可以称之为用户界面元素,本实施例中指的是存在于图形引擎所提供的图形界面中的数字、文字、字母、字符、图案等等元素。First of all, it should be noted that a graphical interface element, which may also be called a user interface element, in this embodiment refers to elements such as numbers, characters, letters, characters, patterns, etc. existing in the graphical interface provided by the graphics engine.

应当理解,任何一种图形界面元素在图形界面中的存在形式是千变万化的,这都取决于图形界面元素渲染,以此使得不同的图形界面元素在图形界面中得以通过不同的存在形式进行展示。It should be understood that the existence forms of any kind of GUI elements in the GUI are ever-changing, which all depend on the rendering of the GUI elements, so that different GUI elements can be displayed in different forms in the GUI.

由上可知,通过图形界面元素渲染,物理硬件相关联的硬件角色可以由硬件角色标识渲染形成,代码信息则是由动作描述信息基于代码模式下的渲染形成的,进而方便于后续在图形引擎所提供的图形界面中进行展示。It can be seen from the above that, through the rendering of graphical interface elements, the hardware roles associated with physical hardware can be formed by rendering the hardware role identifiers, and the code information is formed by the action description information based on the rendering in the code mode, which is convenient for subsequent graphics engines. displayed in the provided graphical interface.

请参阅图8,在一示例性实施例中,步骤430可以包括以下步骤:Referring to FIG. 8, in an exemplary embodiment, step 430 may include the following steps:

步骤431,图形引擎提供的图形界面中进行舞台区域和代码区域的显示。In step 431, the stage area and the code area are displayed in the graphical interface provided by the graphics engine.

为了便于无法实施物理硬件动作控制的其他用户的交流和学习,在图形引擎提供的图形界面中,将为代码信息的展示设置代码区域,以及,为硬件角色可执行动作的展示设置舞台区域。In order to facilitate the communication and learning of other users who cannot implement physical hardware action control, in the graphical interface provided by the graphics engine, a code area will be set for the display of code information, and a stage area will be set for the display of the hardware character's executable actions.

具体地,对于发布物理硬件控制程序的用户而言,其在交互平台中选择一个或者两个以上的动作块拼接在一起,进而通过动作块之间的拼接关系以及各动作块所映射的动作描述信息,来保证向其所拥有物理硬件相关联的硬件角色实施动作控制。Specifically, for a user who publishes a physical hardware control program, he/she selects one or more action blocks in the interactive platform and splices them together, and then uses the splicing relationship between the action blocks and the action description mapped by each action block. information to ensure motion control is implemented to the hardware character associated with the physical hardware it owns.

而对于下载物理硬件控制程序的其他用户而言,通过物理硬件控制程序,其中所包含的动作描述信息被渲染形成代码模式下的代码信息,并被及时地显示在图形界面中,即动作块所映射的动作描述信息以及借助动作块的拼接关系所形成的动作描述信息之间的逻辑关系被直接反映在代码区域。For other users who download the physical hardware control program, the action description information contained in the physical hardware control program is rendered to form code information in code mode, and is displayed in the graphical interface in time, that is, the action block The logical relationship between the mapped action description information and the action description information formed by the splicing relationship of action blocks is directly reflected in the code area.

相应地,舞台区域,将针对代码区域反映出的动作块及其拼接关系,向其他用户展示出硬件角色被执行对应动作的动画效果。Correspondingly, the stage area will show to other users the animation effect of the hardware character being executed corresponding actions according to the action blocks reflected in the code area and their splicing relationship.

随着用户侧动作块不断地拼接变化,硬件角色可执行动作不断新增,从而不断丰富了用户侧硬件角色,进而也能够不断地丰富其他用户侧的硬件角色,相应地,也将不断地丰富硬件角色各自相关联的物理硬件,有利于增强物理硬件控制的灵活性。With the continuous splicing and changing of user-side action blocks, the executable actions of hardware roles are constantly added, which continuously enriches the user-side hardware roles, and further enriches other user-side hardware roles. Correspondingly, it will also continue to enrich The physical hardware associated with each hardware role is beneficial to enhance the flexibility of physical hardware control.

步骤433,在显示的代码区域中进行代码模式下代码信息的展示。Step 433, displaying the code information in the code mode in the displayed code area.

展示,可以是可编辑展示,还可以是不可编辑展示,在此不加以限定。The display may be an editable display or a non-editable display, which is not limited here.

可编辑展示是指其他用户可以在此基础上继续输入代码信息,以为硬件角色新增可执行动作,该新增的可执行动作是与输入的代码信息相符合的。一旦代码区域中输入了代码信息,代码区域显示相应代码信息时,在舞台区域中将相应地显示出硬件角色执行与该代码信息相符的动作。Editable display means that other users can continue to input code information on this basis to add executable actions for the hardware role, and the newly added executable actions are consistent with the input code information. Once the code information is entered in the code area, when the code area displays the corresponding code information, the stage area will correspondingly show that the hardware character performs the action consistent with the code information.

当然,为了保护用户所发布的源码作品,由已发布的物理硬件控制程序所形成的代码模式下的代码信息仅提供展示,而不能够被编辑,即向其他用户提供代码信息的不可编辑展示。Of course, in order to protect the source code work released by the user, the code information in the code mode formed by the released physical hardware control program is only provided for display, and cannot be edited, that is, the non-editable display of the code information is provided to other users.

步骤435,在显示的舞台区域中展示硬件角色按照动作描述信息执行动作的动画效果。Step 435 , displaying the animation effect of the hardware character performing the action according to the action description information in the displayed stage area.

如前所述,配置文件,唯一对应于硬件角色,但是能够对应于该硬件角色所配置的一个或者多个动作块。相应地,根据硬件解析协议对配置文件进行解析所得到的动作描述信息,所定义的硬件角色的可执行动作不局限于一个独立的动作,也可能是多个连续的动作。As mentioned above, a configuration file only corresponds to a hardware role, but can correspond to one or more action blocks configured by the hardware role. Correspondingly, according to the action description information obtained by parsing the configuration file according to the hardware parsing protocol, the executable action of the defined hardware role is not limited to an independent action, but may also be a plurality of consecutive actions.

因此,舞台区域所进行展示的硬件角色是唯一的,而控制该硬件角色所执行的动作可以是一个独立的动作,还可以是多个连续的动作,以此形成硬件角色执行动作的动画效果。Therefore, the hardware character displayed in the stage area is unique, and the action performed to control the hardware character may be an independent action or multiple continuous actions, thereby forming an animation effect of the hardware character performing actions.

通过上述实现过程,无论其他用户是否拥有自身的物理硬件,均可以在程序发布端中下载已发布的物理硬件控制程序,使得用户所发布的物理硬件控制程序被最大化地推进实际应用阶段,进一步地促进用户与其他用户之间的交流和学习。Through the above implementation process, no matter whether other users have their own physical hardware or not, they can download the released physical hardware control program in the program publishing terminal, so that the physical hardware control program released by the user can be promoted to the practical application stage to the maximum extent, and further to facilitate communication and learning between users and other users.

请参阅图9,在一示例性实施例中,一种实现物理硬件控制程序发布的适用于图1所示实施环境的程序制作端300,该程序制作端300的结构可以如图3所示。Referring to FIG. 9 , in an exemplary embodiment, a program creation terminal 300 suitable for the implementation environment shown in FIG. 1 that realizes the distribution of physical hardware control programs is shown. The structure of the program creation terminal 300 may be as shown in FIG. 3 .

该种实现物理硬件控制程序发布的方法可以由该程序制作端300执行,可以包括以下步骤:The method for implementing physical hardware control program release can be executed by the program making terminal 300, and can include the following steps:

步骤610,程序制作端根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,获取物理硬件的配置文件。Step 610, the program creation end obtains the configuration file of the physical hardware according to the addition of the hardware role associated with the physical hardware or the addition of the action block configured by the hardware role.

步骤630,将硬件解析协议、硬件通信库和配置文件进行指定程序加载环境下的编译,生成物理硬件控制程序。Step 630: Compile the hardware parsing protocol, the hardware communication library and the configuration file under the specified program loading environment to generate a physical hardware control program.

步骤650,为物理硬件向程序发布端请求发布物理硬件控制程序。Step 650 , for the physical hardware, request the program issuing end to release the physical hardware control program.

需要说明的是,步骤610至步骤630的执行不必依赖于用户的指示,即程序制作端可以主动根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,触发进行配置文件的获取,并以此生成物理硬件控制程序,并在每一次的硬件角色新增或者动作块新增中,都为更新的配置文件生成新的物理硬件控制程序,进而等待用户指示进行该物理硬件控制程序的发布。It should be noted that the execution of steps 610 to 630 does not have to depend on the user's instruction, that is, the program creator can actively trigger the configuration file according to the addition of the hardware role associated with the physical hardware or the addition of the action block configured by the hardware role. to obtain the physical hardware control program, and generate a new physical hardware control program for the updated configuration file every time the hardware role is added or the action block is added, and then wait for the user to instruct the physical hardware. Control program release.

进一步地,程序制作端进行物理硬件控制程序的发布是依赖于用户指示的,由此不仅有利于减少程序制作端与物理硬件之间的交互,降低二者之间的任务处理量,同时充分地保证了用户的实际需求。Further, the release of the physical hardware control program by the program production side depends on the user's instructions, which not only helps to reduce the interaction between the program production side and the physical hardware, but also reduces the task processing volume between the two. Guarantee the actual needs of users.

具体地,程序制作端对用户为执行物理硬件控制程序的发布而进行的触发操作进行检测,当检测到用户为执行物理硬件控制程序的发布的触发操作时,则为物理硬件向程序发布端请求发布物理硬件控制程序。Specifically, the program production end detects the trigger operation performed by the user to execute the release of the physical hardware control program, and when detecting the trigger operation performed by the user to execute the release of the physical hardware control program, the physical hardware requests the program release end Publish physical hardware control programs.

举例来说,在交互平台所提供的界面中,为执行物理硬件控制程序设置一相应的按钮。当用户点击该按钮,则表示用户需要进行物理硬件控制程序的发布,此时,物理硬件控制程序可以是预先生成的,即步骤610至步骤630不依赖于用户的指示执行,也可以是由此触发进行配置文件的获取,即步骤610至步骤630的执行依赖于用户的指示。此处,用户点击按钮即为用户为执行物理硬件控制程序发布所进行的触发操作。For example, in the interface provided by the interactive platform, a corresponding button is set for executing the physical hardware control program. When the user clicks this button, it means that the user needs to release the physical hardware control program. At this time, the physical hardware control program can be pre-generated, that is, steps 610 to 630 are executed independently of the user's instructions, or it can be executed from this Trigger to obtain the configuration file, that is, the execution of steps 610 to 630 depends on the user's instruction. Here, the user clicking the button is the triggering operation performed by the user to execute the release of the physical hardware control program.

当然,在其他应用场景中,触发操作还可以是滑动滑动条等等,在此不进行限定。Of course, in other application scenarios, the trigger operation may also be a sliding slider, etc., which is not limited here.

在一示例性实施例中,如上所述的方法还可以包括以下步骤:In an exemplary embodiment, the method as described above may further include the following steps:

将可进行物理硬件相关联硬件角色以及动作描述信息展示的图形引擎添加至物理硬件控制程序。A graphics engine capable of displaying physical hardware-related hardware roles and action description information is added to the physical hardware control program.

其中,动作描述信息用于描述硬件角色可执行动作。The action description information is used to describe the actions that the hardware character can perform.

以物理硬件为机器人为例,结合一应用场景来描述实现物理硬件控制程序发布,进而由发布的物理硬件控制程序向物理硬件进行动作控制的过程。Taking the physical hardware as a robot as an example, the process of realizing the release of the physical hardware control program is described in combination with an application scenario, and then the released physical hardware control program performs motion control to the physical hardware.

图10是根据一应用场景所示出的物理硬件控制程序生成过程的具体实现示意图。FIG. 10 is a schematic diagram of a specific implementation of a process of generating a physical hardware control program according to an application scenario.

如图10所示,用户侧,基于图形编辑器701所提供的图形化编程功能,机器人所接入的交互平台被新增相关联硬件角色,或者,新增相关联硬件角色配置的动作块时,触发获取配置文件702,进而与硬件通信库703、硬件解析协议、图形引擎在运行时环境706下进行编译704,由此生成多种不同文件类型的可执行文件,并打包形成物理硬件控制程序705所对应的可执行文件内容,进而向程序发布端请求发布。As shown in FIG. 10, on the user side, based on the graphical programming function provided by the graphical editor 701, an associated hardware role is added to the interactive platform accessed by the robot, or, when an action block configured with an associated hardware role is added , triggering the acquisition of the configuration file 702, and then compiling 704 with the hardware communication library 703, the hardware parsing protocol, and the graphics engine under the runtime environment 706, thereby generating executable files of various file types, and packaging them to form a physical hardware control program 705 corresponds to the executable file content, and then requests the program publishing end for publishing.

其中,运行时环境706是指物理硬件控制程序705将会被执行加载的部署于其他用户所在控制端的操作系统。Wherein, the runtime environment 706 refers to the operating system deployed on the control end where other users are located on which the physical hardware control program 705 will be executed and loaded.

图11是根据一应用场景所示出的物理硬件控制的具体实现实体图。FIG. 11 is a diagram showing a specific implementation of physical hardware control according to an application scenario.

如图11所示,其他用户侧,下载已发布的物理硬件控制程序705,并由其所对应的可执行文件内容805中提取得到配置文件801、图形引擎802、硬件解析协议803以及硬件通信库804。As shown in FIG. 11, other users download the published physical hardware control program 705, and extract the configuration file 801, graphics engine 802, hardware parsing protocol 803 and hardware communication library from its corresponding executable file content 805 804.

基于硬件通信库804在控制端与机器人806之间所建立的通信连接,通过硬件解析协议803对配置文件801进行解析所得到的动作描述信息被发送至机器人806,进而由此所定义的硬件角色可执行动作进行机器人806的动作控制。Based on the communication connection established between the control terminal and the robot 806 by the hardware communication library 804, the action description information obtained by parsing the configuration file 801 through the hardware parsing protocol 803 is sent to the robot 806, and then the hardware role defined by this is sent to the robot 806. Motion control of the robot 806 can be performed with an executable motion.

在本应用场景中,实现了用户源码作品由演示阶段到实际应用阶段的转化,且发布的物理硬件控制程序可独立执行而不会对部署的操作系统产生任何的影响,同时无需额外地安装其他应用程序,有助于用户源码作品的分享与传播,且有利于图形化编程爱好者之间的交流和学习。In this application scenario, the transformation of the user's source code works from the demonstration stage to the actual application stage is realized, and the released physical hardware control program can be executed independently without any impact on the deployed operating system, and no additional installation of other The application program is helpful for the sharing and dissemination of the user's source code works, and is also conducive to the communication and learning among graphic programming enthusiasts.

此外,辅以图形引擎所进行的代码信息展示,使得进行展示的代码信息能够被充分地理解,以此为图形化编程的学习提供了有效的辅助。In addition, the code information display performed by the graphics engine enables the displayed code information to be fully understood, thereby providing an effective assistance for the learning of graphic programming.

下述为本发明装置实施例,可以用于执行本发明所涉及的物理硬件控制方法。对于本发明装置实施例中未披露的细节,请参照本发明所涉及的物理硬件控制方法实施例。The following are apparatus embodiments of the present invention, which can be used to execute the physical hardware control method involved in the present invention. For details not disclosed in the apparatus embodiments of the present invention, please refer to the embodiments of the physical hardware control method involved in the present invention.

请参阅图12,在一示例性实施例中,一种物理硬件控制装置900包括但不限于:程序下载模块910、程序加载模块930和信息发送模块950。Referring to FIG. 12 , in an exemplary embodiment, a physical hardware control apparatus 900 includes but is not limited to: a program downloading module 910 , a program loading module 930 and an information sending module 950 .

其中,程序下载模块910用于控制端由程序发布端下载已发布的物理硬件控制程序,物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块。Among them, the program download module 910 is used for the control terminal to download the released physical hardware control program from the program issuing terminal. The physical hardware control program integrates a configuration file, a hardware analysis protocol and a hardware communication library, and the configuration file is used to describe the physical hardware associated The hardware role and the action blocks configured by the hardware role.

程序加载模块930用于加载物理硬件控制程序,通过程序加载建立与物理硬件之间的通信连接,并获取与硬件角色所配置动作块具有映射关系的动作描述信息。The program loading module 930 is used for loading a physical hardware control program, establishing a communication connection with the physical hardware through program loading, and acquiring action description information having a mapping relationship with the action block configured by the hardware role.

信息发送模块950用于通过通信连接发送动作描述信息至物理硬件,通过动作描述信息定义的硬件角色可执行动作进行相关联物理硬件的动作控制。The information sending module 950 is configured to send the action description information to the physical hardware through the communication connection, and the hardware role defined by the action description information can execute the action to control the action of the associated physical hardware.

需要说明的是,上述实施例所提供的物理硬件控制装置在向物理硬件实施动作控制时,仅以上述各功能模块的划分进行举例说明,实际程序中,可以根据需要而将上述功能分配由不同的功能模块完成,即物理硬件控制装置的内部结构将划分为不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that, when the physical hardware control device provided in the above embodiments implements motion control on physical hardware, only the division of the above-mentioned functional modules is used as an example for illustration. The functional modules are completed, that is, the internal structure of the physical hardware control device will be divided into different functional modules to complete all or part of the functions described above.

另外,上述实施例所提供的物理硬件控制装置与物理硬件控制方法的实施例属于同一构思,其中各个模块执行操作的具体方式已经在方法实施例中进行了详细描述,此处不再赘述。In addition, the physical hardware control apparatus and the physical hardware control method embodiments provided by the above embodiments belong to the same concept, and the specific manners in which each module performs operations have been described in detail in the method embodiments, which will not be repeated here.

请参阅图13,在一示例性实施例中,一种实现物理硬件控制程序发布的装置1000包括但不限于:文件获取模块1010、程序生成模块1030和程序发布模块1050。Referring to FIG. 13 , in an exemplary embodiment, an apparatus 1000 for implementing physical hardware control program release includes but is not limited to: a file acquisition module 1010 , a program generation module 1030 and a program release module 1050 .

其中,文件获取模块1010用于程序制作端根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,获取物理硬件的配置文件。The file obtaining module 1010 is used for the program production end to obtain the configuration file of the physical hardware according to the addition of a hardware role associated with the physical hardware or the addition of an action block configured by the hardware role.

程序生成模块1030用于将硬件解析协议、硬件通信库和配置文件进行指定程序加载环境下的编译,生成物理硬件控制程序。The program generation module 1030 is used for compiling the hardware parsing protocol, the hardware communication library and the configuration file under a specified program loading environment to generate a physical hardware control program.

程序发布模块1050用于为物理硬件向程序发布端请求发布物理硬件控制程序。The program release module 1050 is configured to request the release of the physical hardware control program from the program release end for the physical hardware.

需要说明的是,上述实施例所提供的实现物理硬件控制程序发布的装置在发布物理硬件控制程序时,仅以上述各功能模块的划分进行举例说明,实际程序中,可以根据需要而将上述功能分配由不同的功能模块完成,即实现物理硬件控制程序发布的装置的内部结构将划分为不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that, when the device for implementing physical hardware control program publishing provided by the above embodiment, when publishing the physical hardware control program, only the division of the above functional modules is used as an example for illustration. The allocation is completed by different functional modules, that is, the internal structure of the device for realizing the release of the physical hardware control program will be divided into different functional modules to complete all or part of the functions described above.

另外,上述实施例所提供的实现物理硬件控制程序发布的装置与实现物理硬件控制程序发布的方法的实施例属于同一构思,其中各个模块执行操作的具体方式已经在方法实施例中进行了详细描述,此处不再赘述。In addition, the device for implementing physical hardware control program publishing provided by the above embodiments and the embodiments of the method for implementing physical hardware control program publishing belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiment. , and will not be repeated here.

在一示例性实施例中,一种电子设备,包括处理器及存储器。In an exemplary embodiment, an electronic device includes a processor and a memory.

其中,存储器上存储有计算机可读指令,该计算机可读指令被处理器执行时实现如上所述的各实施例中的实现物理硬件控制程序发布的方法、以及物理硬件控制方法。The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, implements the method for implementing physical hardware control program distribution and the physical hardware control method in the foregoing embodiments.

在一示例性实施例中,一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上所述的各实施例中的实现物理硬件控制程序发布的方法、以及物理硬件控制方法。In an exemplary embodiment, a computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, implements the methods for implementing physical hardware control program distribution in the above-mentioned embodiments, and physical hardware control methods.

上述内容,仅为本发明的较佳示例性实施例,并非用于限制本发明的实施方案,本领域普通技术人员根据本发明的主要构思和精神,可以十分方便地进行相应的变通或修改,故本发明的保护范围应以权利要求书所要求的保护范围为准。The above contents are only preferred exemplary embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Those of ordinary skill in the art can easily make corresponding changes or modifications according to the main concept and spirit of the present invention, Therefore, the protection scope of the present invention should be subject to the protection scope required by the claims.

Claims (5)

1.一种物理硬件控制方法,其特征在于,包括:1. a physical hardware control method, is characterized in that, comprises: 控制端由程序发布端下载已发布的物理硬件控制程序,所述物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,所述配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块,其中,物理硬件相关联硬件角色的可执行动作被表征为所述动作块,所述硬件解析协议用于配置文件的解析,所述硬件通信库用于在控制端与物理硬件之间建立通信连接,所述硬件解析协议和所述硬件通信库是对物理硬件的控制环境以沙盒包装方式进行处理得到;The control terminal downloads the released physical hardware control program from the program issuing terminal. The physical hardware control program integrates a configuration file, a hardware analysis protocol and a hardware communication library. The configuration file is used to describe the hardware roles and hardware associated with the physical hardware. The action block configured by the role, wherein the executable action of the hardware role associated with the physical hardware is represented as the action block, the hardware parsing protocol is used for parsing the configuration file, and the hardware communication library is used to communicate with the controller at the control end. A communication connection is established between physical hardware, and the hardware parsing protocol and the hardware communication library are obtained by processing the control environment of the physical hardware in a sandbox packaging manner; 在指定程序加载环境下进行所述物理硬件控制程序加载,由加载的物理硬件控制程序中提取配置文件、硬件解析协议和硬件通信库;Loading the physical hardware control program under the specified program loading environment, extracting the configuration file, the hardware parsing protocol and the hardware communication library from the loaded physical hardware control program; 根据所述硬件解析协议由所述配置文件解析得到所述动作描述信息;及The action description information is obtained by parsing the configuration file according to the hardware parsing protocol; and 利用所述硬件通信库在所述控制端与物理硬件之间建立所述通信连接;Using the hardware communication library to establish the communication connection between the control terminal and the physical hardware; 通过所述通信连接发送动作描述信息至所述物理硬件,通过所述动作描述信息定义的所述硬件角色可执行动作进行相关联物理硬件的动作控制;Send action description information to the physical hardware through the communication connection, and the hardware role defined by the action description information can perform actions to control the action of the associated physical hardware; 通过所述程序加载启动所述物理硬件控制程序中携带的图形引擎;Start the graphics engine carried in the physical hardware control program by loading the program; 由所述物理硬件控制程序中的配置文件提取硬件角色标识;Extracting the hardware role identifier from the configuration file in the physical hardware control program; 对所述硬件角色标识进行图形界面元素渲染形成所述物理硬件相关联的硬件角色;及performing graphical interface element rendering on the hardware character identifier to form a hardware character associated with the physical hardware; and 将所述动作描述信息渲染形成代码模式下的代码信息;Rendering the action description information to form code information in the code mode; 所述图形引擎提供的图形界面中进行舞台区域和代码区域的显示;The display of the stage area and the code area is performed in the graphical interface provided by the graphics engine; 在显示的代码区域中进行代码模式下代码信息的展示;及Display code information in code mode in the displayed code area; and 在显示的舞台区域中展示所述硬件角色按照所述动作描述信息执行动作的动画效果。The animation effect of the hardware character performing the action according to the action description information is displayed in the displayed stage area. 2.一种实现物理硬件控制程序发布的方法,其特征在于,包括:2. a method for realizing physical hardware control program release, is characterized in that, comprises: 程序制作端根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,获取所述物理硬件的配置文件;The program making end obtains the configuration file of the physical hardware according to the addition of a hardware role associated with the physical hardware or the addition of an action block configured by the hardware role; 将硬件解析协议、硬件通信库和所述配置文件进行指定程序加载环境下的编译,生成物理硬件控制程序,其中,所述硬件解析协议用于配置文件的解析,所述硬件通信库用于在控制端与物理硬件之间建立通信连接,所述硬件解析协议和所述硬件通信库是对物理硬件的控制环境以沙盒包装方式进行处理得到;The hardware parsing protocol, the hardware communication library and the configuration file are compiled under the specified program loading environment to generate a physical hardware control program, wherein the hardware parsing protocol is used for parsing the configuration file, and the hardware communication library is used for A communication connection is established between the control terminal and the physical hardware, and the hardware parsing protocol and the hardware communication library are obtained by processing the control environment of the physical hardware in a sandbox packaging manner; 为所述物理硬件向程序发布端请求发布所述物理硬件控制程序;Requesting the release of the physical hardware control program from the program issuer for the physical hardware; 将可进行所述物理硬件相关联硬件角色以及动作描述信息展示的图形引擎添加至所述物理硬件控制程序,所述动作描述信息用于描述所述硬件角色可执行动作。A graphics engine capable of displaying the physical hardware-related hardware roles and action description information is added to the physical hardware control program, and the action description information is used to describe the actions executable by the hardware role. 3.一种物理硬件控制装置,其特征在于,包括:3. a physical hardware control device, is characterized in that, comprises: 程序下载模块,用于控制端由程序发布端下载已发布的物理硬件控制程序,所述物理硬件控制程序集成有配置文件、硬件解析协议和硬件通信库,所述配置文件用于描述物理硬件相关联的硬件角色以及硬件角色所配置的动作块,其中,物理硬件相关联硬件角色的可执行动作被表征为所述动作块,所述硬件解析协议用于配置文件的解析,所述硬件通信库用于在控制端与物理硬件之间建立通信连接,所述硬件解析协议和所述硬件通信库是对物理硬件的控制环境以沙盒包装方式进行处理得到;The program download module is used for the control terminal to download the released physical hardware control program from the program issuing terminal. The physical hardware control program integrates a configuration file, a hardware analysis protocol and a hardware communication library, and the configuration file is used to describe the physical hardware related The hardware role associated with the physical hardware and the action block configured by the hardware role, wherein the executable actions of the hardware role associated with the physical hardware are represented as the action block, the hardware parsing protocol is used for parsing configuration files, and the hardware communication library For establishing a communication connection between the control terminal and the physical hardware, the hardware parsing protocol and the hardware communication library are obtained by processing the control environment of the physical hardware in a sandbox packaging manner; 程序加载模块,用于在指定程序加载环境下进行所述物理硬件控制程序加载,由加载的物理硬件控制程序中提取配置文件、硬件解析协议和硬件通信库,根据所述硬件解析协议由所述配置文件解析得到所述动作描述信息,及利用所述硬件通信库在所述控制端与物理硬件之间建立所述通信连接;The program loading module is used to load the physical hardware control program under the specified program loading environment, and extract the configuration file, the hardware parsing protocol and the hardware communication library from the loaded physical hardware control program. The configuration file is parsed to obtain the action description information, and the communication connection is established between the control terminal and the physical hardware by using the hardware communication library; 信息发送模块,用于通过所述通信连接发送动作描述信息至所述物理硬件,通过所述动作描述信息定义的所述硬件角色可执行动作进行相关联物理硬件的动作控制;an information sending module, configured to send action description information to the physical hardware through the communication connection, and perform action control of the associated physical hardware through the hardware role defined by the action description information; 展示模块,用于通过所述程序加载启动所述物理硬件控制程序中携带的图形引擎,由所述物理硬件控制程序中的配置文件提取硬件角色标识,对所述硬件角色标识进行图形界面元素渲染形成所述物理硬件相关联的硬件角色,及将所述动作描述信息渲染形成代码模式下的代码信息,所述图形引擎提供的图形界面中进行舞台区域和代码区域的显示,在显示的代码区域中进行代码模式下代码信息的展示,及在显示的舞台区域中展示所述硬件角色按照所述动作描述信息执行动作的动画效果。A display module, configured to start the graphics engine carried in the physical hardware control program by loading the program, extract the hardware role identification from the configuration file in the physical hardware control program, and perform graphical interface element rendering on the hardware role identification Form the hardware role associated with the physical hardware, and render the action description information to form the code information under the code mode, the stage area and the code area are displayed in the graphical interface provided by the graphics engine, and the displayed code area is displayed. In the code mode, the code information is displayed in the code mode, and the animation effect of the hardware character performing the action according to the action description information is displayed in the displayed stage area. 4.一种实现物理硬件控制程序发布的装置,其特征在于,包括:4. a device for realizing physical hardware control program release, is characterized in that, comprises: 文件获取模块,用于程序制作端根据物理硬件相关联硬件角色的新增或者硬件角色所配置动作块的新增,获取所述物理硬件的配置文件;a file acquisition module, used for the program production side to acquire the configuration file of the physical hardware according to the addition of a hardware role associated with the physical hardware or the addition of an action block configured by the hardware role; 程序生成模块,用于将硬件解析协议、硬件通信库和所述配置文件进行指定程序加载环境下的编译,生成物理硬件控制程序,其中,所述硬件解析协议用于配置文件的解析,所述硬件通信库用于在控制端与物理硬件之间建立通信连接,所述硬件解析协议和所述硬件通信库是对物理硬件的控制环境以沙盒包装方式进行处理得到;The program generation module is used for compiling the hardware parsing protocol, the hardware communication library and the configuration file under a specified program loading environment to generate a physical hardware control program, wherein the hardware parsing protocol is used for parsing the configuration file, and the The hardware communication library is used to establish a communication connection between the control terminal and the physical hardware, and the hardware parsing protocol and the hardware communication library are obtained by processing the control environment of the physical hardware in a sandbox packaging manner; 图形引擎添加模块,用于将可进行所述物理硬件相关联硬件角色以及动作描述信息展示的图形引擎添加至所述物理硬件控制程序,所述动作描述信息用于描述所述硬件角色可执行动作;A graphics engine adding module, configured to add a graphics engine capable of displaying the physical hardware-related hardware roles and action description information to the physical hardware control program, and the action description information is used to describe the actions that the hardware role can perform. ; 程序发布模块,用于为所述物理硬件向程序发布端请求发布所述物理硬件控制程序。The program issuing module is configured to request the program issuing end for the physical hardware to issue the physical hardware control program. 5.一种电子设备,其特征在于,包括:5. An electronic device, characterized in that, comprising: 处理器;及processor; and 存储器,所述存储器上存储有计算机可读指令,所述计算机可读指令被所述处理器执行时实现如权利要求1至2中任一项所述的方法。a memory having computer readable instructions stored thereon, the computer readable instructions implementing the method of any one of claims 1 to 2 when executed by the processor.
CN201711115703.9A 2017-11-13 2017-11-13 Method and device for realizing physical hardware control program release and physical hardware control Active CN109800024B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711115703.9A CN109800024B (en) 2017-11-13 2017-11-13 Method and device for realizing physical hardware control program release and physical hardware control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711115703.9A CN109800024B (en) 2017-11-13 2017-11-13 Method and device for realizing physical hardware control program release and physical hardware control

Publications (2)

Publication Number Publication Date
CN109800024A CN109800024A (en) 2019-05-24
CN109800024B true CN109800024B (en) 2022-04-12

Family

ID=66554580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711115703.9A Active CN109800024B (en) 2017-11-13 2017-11-13 Method and device for realizing physical hardware control program release and physical hardware control

Country Status (1)

Country Link
CN (1) CN109800024B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176528B (en) * 2019-12-31 2021-10-29 欧普照明股份有限公司 Control method, control device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823666A (en) * 2013-11-05 2014-05-28 国电南瑞科技股份有限公司 Smart substation equipment visualized programming method
CN105467858A (en) * 2015-12-01 2016-04-06 西安电子科技大学 Graphical integrated development environment for control program of robot
CN105871691A (en) * 2016-04-29 2016-08-17 腾讯科技(深圳)有限公司 Communication system, method and device applied to intelligent toy system
CN106708535A (en) * 2017-01-09 2017-05-24 苏州乐派特机器人有限公司 Custom editing system and method applied to entity programming module

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6832181B1 (en) * 2000-11-03 2004-12-14 Hewlett-Packard Development Company, L.P. Method to distinguish between physical hardware and simulated hardware
JP2007536634A (en) * 2004-05-04 2007-12-13 フィッシャー−ローズマウント・システムズ・インコーポレーテッド Service-oriented architecture for process control systems
US20080082214A1 (en) * 2006-10-03 2008-04-03 Sabrina Haskell Method for animating a robot
CN102385509A (en) * 2010-08-31 2012-03-21 苏州大学 Graphical embedded type development method and platform
US8572556B2 (en) * 2010-12-31 2013-10-29 Starlims Corporation Graphically based method for developing connectivity drivers
CN103324755B (en) * 2013-07-09 2017-04-05 百度在线网络技术(北京)有限公司 The exhibiting method of application program, system and device
EP3223247A1 (en) * 2016-03-24 2017-09-27 Ecole Nationale de l'Aviation Civile Boolean object management in 3d display
CN106293753A (en) * 2016-08-16 2017-01-04 网易(杭州)网络有限公司 The development approach of editing machine and device, edit methods and editing machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823666A (en) * 2013-11-05 2014-05-28 国电南瑞科技股份有限公司 Smart substation equipment visualized programming method
CN105467858A (en) * 2015-12-01 2016-04-06 西安电子科技大学 Graphical integrated development environment for control program of robot
CN105871691A (en) * 2016-04-29 2016-08-17 腾讯科技(深圳)有限公司 Communication system, method and device applied to intelligent toy system
CN106708535A (en) * 2017-01-09 2017-05-24 苏州乐派特机器人有限公司 Custom editing system and method applied to entity programming module

Also Published As

Publication number Publication date
CN109800024A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
CN109358936B (en) Information processing method, device, storage medium, electronic device and system
JP7101780B2 (en) APP remote control method and related devices
Okediran et al. Mobile operating systems and application development platforms: A survey
CN101776994B (en) Systems and methods of an integrated hardware platform with distributed objects for Flash applications
CN108536468A (en) Configuration file obtaining method, providing method, device and equipment
CN107393013B (en) Virtual roaming file generation and display method, device, medium, equipment and system
CN110865863B (en) Interface display method and device for fast application and storage medium
US20250208890A1 (en) Xr application development system, method, device, and medium for terminal devices
WO2017107851A1 (en) Method and device for releasing and updating desktop application component
CN115098186A (en) Project processing method and device, computer equipment and storage medium
JP2024500263A (en) Cloud code development system, method, apparatus, device and storage medium
CN115131470A (en) A kind of graphic material synthesis method, device, electronic device and storage medium
CN107608691A (en) A kind of method for updating pages and device
CN105786452A (en) System and method for development of lightweight-class APP on mobile equipment
CN113127361A (en) Application program development method and device, electronic equipment and storage medium
CN109800024B (en) Method and device for realizing physical hardware control program release and physical hardware control
CN111290746B (en) Object access method, device, equipment and storage medium
CN105320499A (en) Adaptive method and related device of application program
CN116185197A (en) Method, device, device and storage medium for editing virtual objects
CN115691591A (en) Recording method and device, electronic equipment and storage medium
KR20130094003A (en) System and method for making hybrid application
CN103777929A (en) Simulative development system for program development and achieving method thereof
CN116149639A (en) Method and device for developing components, electronic equipment and storage medium
CN113448583A (en) Configuration development method and device based on Internet of things, terminal equipment and medium
CN118012407B (en) Data processing 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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for publishing physical hardware control programs and controlling physical hardware

Effective date of registration: 20231213

Granted publication date: 20220412

Pledgee: Bank of Beijing Limited by Share Ltd. Shenzhen branch

Pledgor: MAKEBLOCK Co.,Ltd.

Registration number: Y2023980071594

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20220412

Pledgee: Bank of Beijing Limited by Share Ltd. Shenzhen branch

Pledgor: MAKEBLOCK Co.,Ltd.

Registration number: Y2023980071594

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for implementing physical hardware control program release and physical hardware control

Granted publication date: 20220412

Pledgee: Bank of Beijing Limited by Share Ltd. Shenzhen branch

Pledgor: MAKEBLOCK Co.,Ltd.

Registration number: Y2025980002742

PE01 Entry into force of the registration of the contract for pledge of patent right