[go: up one dir, main page]

CN112667276A - Online programming tool and method for intelligent control system - Google Patents

Online programming tool and method for intelligent control system Download PDF

Info

Publication number
CN112667276A
CN112667276A CN202011537098.6A CN202011537098A CN112667276A CN 112667276 A CN112667276 A CN 112667276A CN 202011537098 A CN202011537098 A CN 202011537098A CN 112667276 A CN112667276 A CN 112667276A
Authority
CN
China
Prior art keywords
package file
control system
code
target system
intelligent control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011537098.6A
Other languages
Chinese (zh)
Inventor
陈胜森
尹金鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cotell Intelligent Technology Shenzhen Co ltd
Original Assignee
Cotell Intelligent Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cotell Intelligent Technology Shenzhen Co ltd filed Critical Cotell Intelligent Technology Shenzhen Co ltd
Priority to CN202011537098.6A priority Critical patent/CN112667276A/en
Publication of CN112667276A publication Critical patent/CN112667276A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

本申请涉及一种用于智慧控制系统的在线编程工具及方法,属于系统设计技术的领域,在线编程工具包括代码库、存储单元、逻辑单元、编辑器、编译器和控制单元;代码库,存储有代码;逻辑单元,存储有执行逻辑;存储单元,存储有但不限于函数、参数和变量;编辑器,用于生成功能代码;编译器,用于将功能代码编译成编程语言,生成程序包文件;控制单元,用于将程序包文件通过调试工具发送至目标系统主机上,并接收目标系统主机解析程序包文件后返回的升级结果;并基于在线编程工具,提供一种用于智慧控制系统的在线编程方法。与相关技术相比,本申请具有改善智能家居控制系统维护成本较高的问题的效果。

Figure 202011537098

The present application relates to an online programming tool and method for an intelligent control system, belonging to the field of system design technology. The online programming tool includes a code library, a storage unit, a logic unit, an editor, a compiler and a control unit; There is code; logic unit, which stores execution logic; storage unit, which stores but is not limited to functions, parameters and variables; editor, which is used to generate function code; compiler, which is used to compile function code into programming language and generate program package file; a control unit for sending a program package file to a target system host through a debugging tool, and receiving an upgrade result returned by the target system host after parsing the program package file; and based on an online programming tool, provides an intelligent control system online programming method. Compared with the related art, the present application has the effect of improving the problem of high maintenance cost of the smart home control system.

Figure 202011537098

Description

一种用于智慧控制系统的在线编程工具及方法An online programming tool and method for intelligent control system

技术领域technical field

本申请涉及系统设计技术的领域,尤其是涉及一种用于智慧控制系统的在线编程方法及系统。The present application relates to the field of system design technology, and in particular, to an online programming method and system for an intelligent control system.

背景技术Background technique

智能家居控制系统(smarthome control system,SCS),也称为智慧控制系统,是以智能家居系统为平台,家居电气及家电设备为主要控制对象,利用综合布线技术、网络通信技术、安全防范技术、自动控制技术、音视频技术将家居有关的设备进行高效集成,构建高效的住宅设施与家庭日程实务的控制管理系统,提升家居智能、安全、便利、舒适,并能实现环保控制系统平台。Smart home control system (smarthome control system, SCS), also known as smart control system, is based on smart home system as a platform, home electrical and household appliances as the main control objects, using integrated wiring technology, network communication technology, security technology, Automatic control technology, audio and video technology efficiently integrate home-related equipment, build an efficient control and management system for residential facilities and family schedule practice, improve home intelligence, safety, convenience, comfort, and realize an environmental protection control system platform.

为了清除在智能家居控制系统运行中发生的故障和错误,以及为了使系统适应用户环境的变化,满足新提出的需要,也要对原系统做些局部的更新,这些工作都称为系统维护。In order to clear the faults and errors occurred in the operation of the smart home control system, and to adapt the system to changes in the user environment and meet the newly proposed needs, it is necessary to do some local updates to the original system. These tasks are called system maintenance.

在智能家居控制系统的系统维护工作中,一般维护人员现根据需要维护的功能编写/修改相应的代码,以形成数据包,再将数据包发送至智能家居控制系统实现更新或维护。但是,前期编写/修改代码需要耗费较长的时间,导致智能家居控制系统维护成本较高。In the system maintenance work of the smart home control system, the general maintenance personnel now write/modify the corresponding codes according to the functions that need to be maintained to form data packets, and then send the data packets to the smart home control system for update or maintenance. However, it takes a long time to write/modify the code in the early stage, resulting in high maintenance cost of the smart home control system.

发明内容SUMMARY OF THE INVENTION

为了改善智能家居控制系统维护成本较高的问题,本申请提供一种用于智慧控制系统的在线编程工具及方法。In order to improve the problem of high maintenance cost of the smart home control system, the present application provides an online programming tool and method for the smart control system.

第一方面,本申请提供一种用于智慧控制系统的在线编程工具,采用如下的技术方案:In the first aspect, the application provides an online programming tool for an intelligent control system, which adopts the following technical solutions:

一种用于智慧控制系统的在线编程工具,所述在线编程工具包括代码库、存储单元、逻辑单元、编辑器、编译器和控制单元;其中,An online programming tool for an intelligent control system, the online programming tool includes a code library, a storage unit, a logic unit, an editor, a compiler and a control unit; wherein,

所述代码库,存储有代码;The code base stores codes;

所述逻辑单元,存储有执行逻辑;The logic unit stores execution logic;

所述存储单元,存储有但不限于函数、参数和变量;The storage unit stores but is not limited to functions, parameters and variables;

所述编辑器,用于根据用户编辑的功能需求调用代码库中对应的代码、逻辑单元中对应的执行逻辑以及存储单元中对应的函数、参数和变量,生成功能代码;The editor is used to call the corresponding code in the code base, the corresponding execution logic in the logic unit, and the corresponding function, parameter and variable in the storage unit according to the functional requirements edited by the user, and generate the function code;

所述编译器,用于将功能代码编译成编程语言,生成程序包文件;以及,the compiler for compiling the function code into a programming language to generate a package file; and,

所述控制单元,用于发送升级命令给目标系统主机,在接收目标系统主机返回的控制命令后,将程序包文件通过调试工具发送至目标系统主机上,并接收目标系统主机解析程序包文件后返回的升级结果。The control unit is used to send an upgrade command to the target system host, after receiving the control command returned by the target system host, send the package file to the target system host through a debugging tool, and receive the target system host after parsing the package file. Returns the upgrade result.

通过采用上述技术方案,用户在编辑器上编辑功能需求后,编辑器根据用户的功能需求调用对应的代码、函数、参数变量和执行逻辑,自动生成功能代码,编译器将编辑器生成的功能代码编译成编程语言后生成程序包文件,控制单元发送升级命令给目标系统主机,并在接收到目标系统主机根据升级命令返回的控制命令后,将程序包文件发送给目标系统主机,功能代码自动生成,无需重复修改代码,程序包文件自动发送,生效速度快,且可以满足不同用户/客户的功能需求,能够提高目标系统的部署效率,从而能够改善智能家居控制系统维护成本较高的问题;此外,控制单元接收目标系统主机解析程序包文件后返回的升级结果,从而便于维护人员/用户及时得到升级是否成功。By adopting the above technical solution, after the user edits the functional requirements on the editor, the editor calls the corresponding codes, functions, parameter variables and execution logic according to the functional requirements of the user, and automatically generates the functional codes, and the compiler converts the functional codes generated by the editor into After compiling into a programming language, a program package file is generated, the control unit sends an upgrade command to the target system host, and after receiving the control command returned by the target system host according to the upgrade command, the program package file is sent to the target system host, and the function code is automatically generated. , no need to repeatedly modify the code, the program package file is automatically sent, the effective speed is fast, and it can meet the functional requirements of different users/customers, which can improve the deployment efficiency of the target system, thereby improving the maintenance cost of the smart home control system. , the control unit receives the upgrade result returned by the target system host after parsing the program package file, so as to facilitate maintenance personnel/users to timely obtain whether the upgrade is successful.

可选的,所述编程语言可以是二进制程序语言。Optionally, the programming language may be a binary programming language.

通过采用上述技术方案,二进制语言是面向机器的语言,从而便于使生成的程序包文件被各类计算机、计算设备等识别。By adopting the above technical solution, the binary language is a machine-oriented language, so that the generated program package file can be easily recognized by various computers, computing devices, and the like.

可选的,所述程序包文件能够被可编程逻辑控制器识别并执行。Optionally, the program package file can be recognized and executed by a programmable logic controller.

通过采用上述技术方案,程序包文件能够被单片机、PLC等可编程逻辑控制器识别并执行,从而提高在线编程工具的实用性。By adopting the above technical solution, the program package file can be recognized and executed by programmable logic controllers such as single-chip microcomputer and PLC, thereby improving the practicability of the online programming tool.

可选的,所述在线编程工具还包括UI界面,所述UI界面用于将用户编辑功能需求的过程进行可视化。Optionally, the online programming tool further includes a UI interface, and the UI interface is used to visualize the process of editing the functional requirements by the user.

通过采用上述技术方案,用户进行需求功能编辑时,能够通过UI界面实时查看已编辑的需求功能是否出现问题,来及时进行修改,能够降低生成的功能代码错误的几率,从而有助于改善智能家居控制系统维护成本较高的问题。By adopting the above technical solution, when the user edits the demand function, he can check whether there is a problem with the edited demand function through the UI interface in real time, so as to modify it in time, which can reduce the probability of the generated function code error, thereby helping to improve the smart home The problem of high maintenance cost of the control system.

可选的,所述调试工具包括但不限于socket工具。Optionally, the debugging tool includes but is not limited to a socket tool.

通过采用上述技术方案,socket工具能够帮助检查网络应用软件及硬件的通讯情况,以有助于向目标系统主机发送程序包文件。By adopting the above technical solution, the socket tool can help to check the communication status of the network application software and hardware, so as to help send the program package file to the target system host.

第二方面,本申请提供一种用于智慧控制系统的在线编程方法,采用如下的技术方案:In the second aspect, the application provides an online programming method for an intelligent control system, which adopts the following technical solutions:

一种用于智慧控制系统的在线编程方法,所述在线编程方法包括,An online programming method for an intelligent control system, the online programming method comprising,

功能代码生成,基于用户编辑的功能需求调用代码对应的代码、函数、参数、变量和执行逻辑,生成功能代码;Function code generation, based on the functional requirements edited by the user, the corresponding codes, functions, parameters, variables and execution logic of the code are called to generate function codes;

程序包文件生成,将功能代码编译成编程语言,生成程序包文件;Package file generation, compile function code into programming language, and generate package file;

程序包文件发送,将程序包文件转换成二进制代码发送给目标系统主机;以及,package file sending, which converts the package file into binary code and sends it to the target system host; and,

升级结果接收,接收目标系统主机解析程序包文件后返回的升级结果。The upgrade result is received, and the upgrade result returned by the target system host after parsing the package file is received.

通过采用上述技术方案,用户编辑功能需求后,能够根据用户编辑的功能需求调用对应的代码、函数、参数变量和执行逻辑,自动生成功能代码,并将生成的功能代码编译成编程语言后生成程序包文件,接着将程序包文件转换成二进制代码后发送给目标系统主机,功能代码自动生成,无需重复修改代码,程序包文件自动发送,生效速度快,且可以满足不同用户/客户的功能需求,能够提高目标系统的部署效率,从而有助于改善智能家居控制系统维护成本较高的问题;此外,能够接收目标系统主机解析程序包文件后返回的升级结果,从而便于维护人员/用户及时得到升级是否成功。By adopting the above technical solution, after the user edits the functional requirements, the corresponding codes, functions, parameter variables and execution logic can be called according to the functional requirements edited by the user, the function codes can be automatically generated, and the generated function codes can be compiled into a programming language to generate a program. package file, and then convert the package file into binary code and send it to the target system host, the function code is automatically generated, no need to repeatedly modify the code, the package file is automatically sent, the effective speed is fast, and it can meet the functional requirements of different users/customers, It can improve the deployment efficiency of the target system, thereby helping to improve the problem of high maintenance costs of the smart home control system; in addition, it can receive the upgrade results returned by the target system host after parsing the package file, so that maintenance personnel/users can be upgraded in time whether succeed.

可选的,所述程序包文件发送的具体方法包括,Optionally, the specific method for sending the package file includes:

向目标系统主机发送升级命令,并判断是否接收到目标系统主机接收升级命令后返回的控制命令;以及,Sending an upgrade command to the target system host, and judging whether the control command returned by the target system host after receiving the upgrade command is received; and,

若接收到返回的控制命令,则将程序包文件转换成二进制代码发送给目标系统主机,否则,重新发送升级命令。If the returned control command is received, the package file is converted into binary code and sent to the target system host; otherwise, the upgrade command is resent.

通过采用上述技术方案,将升级命令发送给目标系统主机,使目标系统主机配置好资源和端口供接收程序包文件,目标系统主机配置完成后,会返回控制命令,若配置不成功装置,则不返回控制命令,接收到返回的控制命令后,发送程序包文件,否则,重新发送升级命令,直至接收到控制命令,使得程序包文件被目标系统主机接收并解析成功的概率提高,有助降低程序包文件发送失败的几率。By adopting the above technical solution, the upgrade command is sent to the target system host, so that the target system host is configured with resources and ports for receiving package files. After the target system host is configured, it will return a control command. If the configuration is unsuccessful, the device will not be configured. Return the control command, after receiving the returned control command, send the package file, otherwise, resend the upgrade command until the control command is received, so that the probability of the package file being received and successfully parsed by the target system host increases, which helps to reduce the program The chance that the package file will fail to send.

可选的,所述程序包文件能够被可编程逻辑控制器识别并执行。Optionally, the program package file can be recognized and executed by a programmable logic controller.

通过采用上述技术方案,程序包文件能够被单片机、PLC等可编程逻辑控制器识别并执行,从而有助于提高实用性。By adopting the above technical solution, the program package file can be recognized and executed by programmable logic controllers such as single-chip microcomputer and PLC, thereby helping to improve practicability.

可选的,所述用户编辑功能需求的过程为可视化操作。Optionally, the process of editing the functional requirements by the user is a visual operation.

通过采用上述技术方案,用户进行需求功能编辑时,能够实时查看已编辑的需求功能是否出现问题,来及时进行修改,能够降低生成的功能代码错误的几率,从而有助于改善智能家居控制系统维护成本较高的问题。By adopting the above technical solution, when the user edits the demand function, he can check in real time whether there is a problem with the edited demand function, and then modify it in time, which can reduce the probability of errors in the generated function code, thereby helping to improve the maintenance of the smart home control system. higher cost issues.

第三方面,本申请提供一种计算机可读存储介质,采用如下的技术方案;In a third aspect, the present application provides a computer-readable storage medium using the following technical solutions;

一种计算机可读存储介质,存储有能够被处理器加载并执行如第二方面中任一种方法的计算机程序。A computer-readable storage medium storing a computer program capable of being loaded by a processor and executing any of the methods in the second aspect.

综上所述,本申请包括以下至少一种有益技术效果。To sum up, the present application includes at least one of the following beneficial technical effects.

附图说明Description of drawings

图1是本申请实施例的一种用于智慧控制系统的在线编程工具的结构示意图。FIG. 1 is a schematic structural diagram of an online programming tool for an intelligent control system according to an embodiment of the present application.

图2是本申请实施例的在线编程的流程图。FIG. 2 is a flowchart of online programming according to an embodiment of the present application.

图3是本申请实施例的一种用于智慧控制系统的在线编程方法的第一流程图。FIG. 3 is a first flowchart of an online programming method for an intelligent control system according to an embodiment of the present application.

图4是本申请实施例的一种用于智慧控制系统的在线编程方法的第二流程图。FIG. 4 is a second flowchart of an online programming method for an intelligent control system according to an embodiment of the present application.

附图标记说明:1、逻辑单元;2、代码库;3、存储单元;4、编辑器;5、编译器;6、UI界面;7、控制单元;8、目标系统主机。Description of reference numerals: 1. Logic unit; 2. Code library; 3. Storage unit; 4. Editor; 5. Compiler; 6. UI interface; 7. Control unit; 8. Target system host.

具体实施方式Detailed ways

以下结合附图1-4对本申请作进一步详细说明。The present application will be further described in detail below in conjunction with accompanying drawings 1-4.

智能家居控制系统(smarthome control system,SCS),也称为智慧控制系统,是以智能家居系统为平台,家居电气及家电设备为主要控制对象,利用综合布线技术、网络通信技术、安全防范技术、自动控制技术、音视频技术将家居有关的设备进行高效集成,构建高效的住宅设施与家庭日程实务的控制管理系统,提升家居智能、安全、便利、舒适,并能实现环保控制系统平台。Smart home control system (smarthome control system, SCS), also known as smart control system, is based on smart home system as a platform, home electrical and household appliances as the main control objects, using integrated wiring technology, network communication technology, security technology, Automatic control technology, audio and video technology efficiently integrate home-related equipment, build an efficient control and management system for residential facilities and family schedule practice, improve home intelligence, safety, convenience, comfort, and realize an environmental protection control system platform.

现今,已有智慧控制系统采用单片机方案,采用单片机芯片作为控制器,继电器作为通断开关,结合强弱电主板分离式设计,以C语言为底层程序实现。这种智慧控制系统,性能稳定,且功能强大。Today, the existing intelligent control system adopts the single-chip solution, using the single-chip chip as the controller, and the relay as the on-off switch, combined with the separate design of the main board for strong and weak current, and implemented with C language as the underlying program. This intelligent control system has stable performance and powerful functions.

本申请实施例公开一种用于智慧控制系统的在线编程工具。参照图1和图2,在线编程工具包括代码库2、存储单元3、逻辑单元1、编辑器4、编译器5和控制单元7;其中,The embodiment of the present application discloses an online programming tool for an intelligent control system. 1 and 2, the online programming tool includes a code library 2, a storage unit 3, a logic unit 1, an editor 4, a compiler 5 and a control unit 7; wherein,

代码库2,存储有代码;Code base 2, which stores code;

逻辑单元1,存储有执行逻辑;Logic unit 1, which stores execution logic;

存储单元3,存储有但不限于函数、参数和变量;The storage unit 3 stores but is not limited to functions, parameters and variables;

编辑器4,用于根据用户编辑的功能需求调用代码存储单元3中对应的代码、逻辑单元1中对应的执行逻辑以及存储单元3中对应的函数、参数和变量,生成功能代码;The editor 4 is used to call the corresponding code in the code storage unit 3, the corresponding execution logic in the logic unit 1, and the corresponding function, parameter and variable in the storage unit 3 according to the functional requirements edited by the user, and generate a function code;

编译器5,用于将功能代码编译成编程语言,生成程序包文件;以及,a compiler 5 for compiling the functional code into a programming language, generating a package file; and,

控制单元7,用于发送升级命令给目标系统主机8,在接收目标系统主机8返回的控制命令后,将程序包文件通过调试工具发送至目标系统主机8上,并接收目标系统主机8解析程序包文件后返回的升级结果。The control unit 7 is used to send the upgrade command to the target system host 8, after receiving the control command returned by the target system host 8, send the package file to the target system host 8 through the debugging tool, and receive the target system host 8 parsing program The upgrade result returned after the package file.

其中,编程语言可以是二级制程序语言,且程序包文件能够被可编程逻辑控制器识别并执行。目标系统主机8可能是智慧控制系统、楼宇控制系统等或类似系统的控制主机。执行逻辑包括各种类型的目标控制系统的软硬件设备的执行逻辑,例如,按键执行逻辑、开关执行逻辑等。The programming language may be a binary programming language, and the program package file can be recognized and executed by the programmable logic controller. The target system host 8 may be a control host of an intelligent control system, a building control system, or the like. The execution logic includes execution logic of various types of software and hardware devices of the target control system, for example, key execution logic, switch execution logic, and the like.

需要说明的是,程序包文件能够被可编程逻辑控制器识别并执行。使得程序包文件能够被采用单片机、PLC等方案的控制系统所解析。It should be noted that the program package file can be recognized and executed by the programmable logic controller. The program package file can be parsed by the control system using the single chip, PLC and other schemes.

上述在线编程工具的实施方式中,用户在编辑器4上编辑功能需求后,编辑器4根据用户的功能需求调用对应的代码、函数、参数变量和执行逻辑,自动生成功能代码,编译器5将编辑器4生成的功能代码编译成编程语言后生成程序包文件,控制单元7发送升级命令给目标系统主机8,并在接收到目标系统主机8根据升级命令返回的控制命令后,将程序包文件发送给目标系统主机8,功能代码自动生成,无需重复修改代码,程序包文件自动发送,生效速度快,且可以满足不同用户/客户的功能需求,能够提高目标系统的部署效率,从而能够改善智能家居控制系统维护成本较高的问题;此外,控制单元7接收目标系统主机8解析程序包文件后返回的升级结果,从而便于维护人员/用户及时得到升级是否成功。In the embodiment of the above-mentioned online programming tool, after the user edits the functional requirements on the editor 4, the editor 4 calls the corresponding code, function, parameter variable and execution logic according to the functional requirements of the user, and automatically generates the functional code, and the compiler 5 will The function code generated by the editor 4 is compiled into a programming language to generate a package file, the control unit 7 sends an upgrade command to the target system host 8, and after receiving the control command returned by the target system host 8 according to the upgrade command, the program package file is Send to the target system host 8, the function code is automatically generated, no need to repeatedly modify the code, the program package file is automatically sent, the effective speed is fast, and it can meet the functional requirements of different users/customers, which can improve the deployment efficiency of the target system, thereby improving intelligence. The maintenance cost of the home control system is relatively high; in addition, the control unit 7 receives the upgrade result returned by the target system host 8 after parsing the program package file, so as to facilitate maintenance personnel/users to timely obtain whether the upgrade is successful.

参照图1,作为在线编程工具的进一步实施方式,在线编程工具还包括UI界面6,UI界面6用于将用户编辑功能需求的过程进行可视化操作。Referring to FIG. 1 , as a further implementation of the online programming tool, the online programming tool further includes a UI interface 6, and the UI interface 6 is used to visually operate the process of editing the functional requirements by the user.

上述在线编程工具的进一步实施方式中,用户进行需求功能编辑时,能够通过UI界面6实时查看已编辑的需求功能是否出现问题,来及时进行修改,能够降低生成的功能代码错误的几率,从而有助于改善智能家居控制系统维护成本较高的问题。In a further embodiment of the above-mentioned online programming tool, when the user edits the required function, he can check whether there is a problem with the edited required function in real time through the UI interface 6, so as to modify it in time, which can reduce the probability that the generated function code is wrong, thereby having Help to improve the problem of high maintenance cost of smart home control system.

作为调试工具的一种实施方式,调试工具包括但不限于socket工具。socket工具能够帮助检查网络应用软件及硬件的通讯情况,以有助于向目标系统主机8发送程序包文件。As an implementation manner of the debugging tool, the debugging tool includes but is not limited to a socket tool. The socket tool can help to check the communication status of the network application software and hardware, so as to help send the package file to the target system host 8 .

以采用单片机方案的智慧控制系统为维护应用场景,用户编辑的功能需求包括一般设定、I/O设定、空调设定、红外设定、模式设定、组合案件设定和语音控制设定,这些功能需求均可以在UI界面显示,并进行设定。Taking the intelligent control system using the single-chip solution as the maintenance application scenario, the functional requirements edited by the user include general settings, I/O settings, air conditioning settings, infrared settings, mode settings, combination case settings and voice control settings. , these functional requirements can be displayed and set on the UI interface.

其中,一般设定包括酒店编号/家庭编号设置、温控器厂家选择、状态同步开关选择、开关背光类型选择、开关通讯类型选择、门牌输出类型选择、空调类型选择、窗帘电机类型选择、红外触发电平选择、门磁触发电平选择、拔卡延时设定、昼夜模式切换、空调季节模式选择等。Among them, the general settings include hotel number/family number setting, thermostat manufacturer selection, status synchronization switch selection, switch backlight type selection, switch communication type selection, house number output type selection, air conditioner type selection, curtain motor type selection, infrared triggering Level selection, door magnetic trigger level selection, card pull-out delay setting, day and night mode switching, air conditioning season mode selection, etc.

I/O设定包括输入编号设定、输入类型设定、输出类型设定、输出回路设定等。I/O setting includes input number setting, input type setting, output type setting, output circuit setting, etc.

空调设定包括多个空调的参数设定,其中,每个空调的配置包括空调的状态设定、空调模式设定和温控器ID设定等。The air conditioner setting includes parameter settings of a plurality of air conditioners, wherein the configuration of each air conditioner includes the state setting of the air conditioner, the setting of the air conditioner mode, and the setting of the thermostat ID.

红外设定包括新增红外区域设定、红外启用、回路ID设定和保持时长设置。Infrared settings include new infrared area settings, infrared enable, loop ID settings and hold time settings.

模式设定包括新增模式种类选择,其中,每个模式的配置包括每个活路上的类型(继电器、开关、窗帘、空调、调光和背景音乐等)以及各个类型的状态配置。当新增类型为灯光时,则灯光模式设定包括新增灯光组合设置、灯光组合执行条件设置、灯光组合下设备添加及添加的设备的状态配置。The mode setting includes the selection of new mode types. The configuration of each mode includes the type of each active circuit (relay, switch, curtain, air conditioner, dimming and background music, etc.) and the state configuration of each type. When the newly added type is light, the light mode setting includes the setting of the new light combination, the setting of the execution condition of the light combination, the device addition under the light combination and the state configuration of the added device.

组合案件设定包括组合案件的新增、执行逻辑选择及配置。The combination case setting includes the addition, execution logic selection and configuration of the combination case.

语音控制设定包括指令配置、名称配置、类型配置和回路ID配置。Voice control settings include command configuration, name configuration, type configuration, and loop ID configuration.

上述的功能需求的编辑过程在编辑器4上进行编辑,UI界面6将编辑过程进行可视化,以便于用户实时查看已编辑的功能是否出现错误,以便于及时修正。The editing process of the above functional requirements is edited on the editor 4, and the UI interface 6 visualizes the editing process, so that the user can check in real time whether there is an error in the edited function, so as to facilitate timely correction.

本申请提供的一种用于智慧控制系统的在线编程工具,可以基于Windows、Linux等系统实现,开发语言可以基于C语言,硬件基于单片机。其中,UI界面、可设定的功能可以根据不同人的功能喜好来进行配置。An online programming tool for an intelligent control system provided by this application can be implemented based on systems such as Windows and Linux, the development language can be based on C language, and the hardware can be based on single-chip microcomputer. Among them, the UI interface and the functions that can be set can be configured according to the functional preferences of different people.

本申请实施例还公开一种用于智慧控制系统的在线编程方法,参照图2和图3,在线编程方法包括,The embodiment of the present application also discloses an online programming method for an intelligent control system. Referring to FIG. 2 and FIG. 3 , the online programming method includes:

功能代码生成101,基于用户编辑的功能需求调用代码对应的代码、函数、参数、变量和执行逻辑,生成功能代码;The function code generation 101 is to call the corresponding code, function, parameter, variable and execution logic of the code based on the functional requirements edited by the user, and generate the function code;

程序包文件生成102,将功能代码变异成编程语言,生成程序包文件;Program package file generation 102, mutating function codes into programming languages, and generating program package files;

程序包文件发送103,将程序包文件转换成二进制代码发送给目标系统主机8;以及,package file sending 103, converting the package file into binary code and sending it to the target system host 8; and,

升级结果接收104,接收目标系统主机8解析程序包文件后返回的升级结果。The upgrade result receiving 104 receives the upgrade result returned by the target system host 8 after parsing the package file.

需要说明的是,程序包文件能够被可编程逻辑控制器识别并执行。返回的升级结果包括失败或成功,若返回的升级结果为失败,则维护人员可及时对目标系统主机8所在目标控制系统进行维护。It should be noted that the program package file can be recognized and executed by the programmable logic controller. The returned upgrade result includes failure or success. If the returned upgrade result is failure, the maintenance personnel can maintain the target control system where the target system host 8 is located in time.

上述在线编程方法的实施方式中,用户编辑功能需求后,能够根据用户编辑的功能需求调用对应的代码、函数、参数变量和执行逻辑,自动生成功能代码,并将生成的功能代码编译成编程语言后生成程序包文件,接着将程序包文件转换成二进制代码后发送给目标系统主机8,功能代码自动生成,无需重复修改代码,程序包文件自动发送,生效速度快,且可以满足不同用户/客户的功能需求,能够提高目标系统的部署效率,从而有助于改善智能家居控制系统维护成本较高的问题;此外,能够接收目标系统主机8解析程序包文件后返回的升级结果,从而便于维护人员/用户及时得到升级是否成功。In the embodiment of the above-mentioned online programming method, after the user edits the functional requirements, the corresponding codes, functions, parameter variables and execution logic can be called according to the functional requirements edited by the user, function codes are automatically generated, and the generated function codes are compiled into a programming language. After that, the package file is generated, and then the package file is converted into binary code and sent to the target system host 8. The function code is automatically generated, no need to repeatedly modify the code, the package file is automatically sent, the effective speed is fast, and it can meet the needs of different users/customers It can improve the deployment efficiency of the target system, thereby helping to improve the problem of high maintenance costs of the smart home control system; in addition, it can receive the upgrade results returned by the target system host 8 after parsing the package file, which is convenient for maintenance personnel. /Users get timely whether the upgrade was successful.

参照图2和图4,作为程序包文件发送103的一种实施方式,程序包文件发送103的具体步骤如下:2 and 4, as an implementation of the package file sending 103, the specific steps of the package file sending 103 are as follows:

1031、向目标系统主机8发送升级命令,并判断是否接收到目标系统主机8接收升级命令后返回的控制命令。1031. Send an upgrade command to the target system host 8, and determine whether a control command returned by the target system host 8 after receiving the upgrade command is received.

1032、若接收到返回的控制命令,则将程序包文件转换成二进制代码发送给目标系统主机8,否则,重新发送升级命令1032. If the returned control command is received, convert the package file into binary code and send it to the target system host 8; otherwise, resend the upgrade command

上述程序包文件发送103的实施方式中,将升级命令发送给目标系统主机8,使目标系统主机8配置好资源和端口供接收程序包文件,目标系统主机8配置完成后,会返回控制命令,若配置不成功装置,则不返回控制命令,接收到返回的控制命令后,发送程序包文件,否则,重新发送升级命令,直至接收到控制命令,使得程序包文件被目标系统主机8接收并解析成功的概率提高,有助降低程序包文件发送失败的几率。In the embodiment of the above-mentioned program package file sending 103, the upgrade command is sent to the target system host 8, so that the target system host 8 is configured with resources and ports for receiving the program package file, and after the target system host 8 is configured, the control command will be returned, If the configuration is unsuccessful, the control command will not be returned. After receiving the returned control command, the program package file will be sent. Otherwise, the upgrade command will be re-sent until the control command is received, so that the program package file will be received and parsed by the target system host 8. The increased probability of success helps reduce the chances of a failed package file delivery.

作为在线编程方法的进一步实施方式,用户编辑功能需求的过程为可视化操作。As a further implementation of the online programming method, the process of editing the functional requirements by the user is a visual operation.

上述在线编程方法的进一步实施方式中,用户进行需求功能编辑时,能够实时查看已编辑的需求功能是否出现问题,来及时进行修改,能够降低生成的功能代码错误的几率,从而有助于改善智能家居控制系统维护成本较高的问题。In a further implementation of the above online programming method, when the user edits the demand function, he can check in real time whether there is a problem with the edited demand function, and then modify it in time, which can reduce the probability of errors in the generated function code, thereby helping to improve intelligence. The problem of high maintenance cost of home control system.

本申请实施例还公开一种计算机可读存储介质,存储有能够被处理器加载并执行如一种用于智慧控制系统的在线编程方法中任一种方法的计算机程序。The embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program that can be loaded by a processor and executes any one of the online programming methods for an intelligent control system.

以上均为本申请的较佳实施例,并非依此限制本申请的保护范围,故:凡依本申请的结构、形状、原理所做的等效变化,均应涵盖于本申请的保护范围之内。The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Therefore: all equivalent changes made according to the structure, shape and principle of the present application should be covered within the scope of the present application. Inside.

Claims (10)

1.一种用于智慧控制系统的在线编程工具,其特征在于:所述在线编程工具包括代码库(2)、存储单元(3)、逻辑单元(1)、编辑器(4)、编译器(5)和控制单元(7);其中,1. an online programming tool for an intelligent control system, characterized in that: the online programming tool comprises a code library (2), a storage unit (3), a logic unit (1), an editor (4), a compiler (5) and the control unit (7); wherein, 所述代码库(2),存储有代码;The code base (2) stores codes; 所述逻辑单元(1),存储有执行逻辑;The logic unit (1) stores execution logic; 所述存储单元(3),存储有但不限于函数、参数和变量;The storage unit (3) stores but is not limited to functions, parameters and variables; 所述编辑器(4),用于根据用户编辑的功能需求调用代码库(2)中对应的代码、逻辑单元(1)中对应的执行逻辑以及存储单元(3)中对应的函数、参数和变量,生成功能代码;The editor (4) is used to invoke the corresponding code in the code base (2), the corresponding execution logic in the logic unit (1), and the corresponding functions, parameters and functions in the storage unit (3) according to the functional requirements edited by the user. variable, generate function code; 所述编译器(5),用于将功能代码编译成编程语言,生成程序包文件;以及,the compiler (5) for compiling the function code into a programming language to generate a package file; and, 所述控制单元(7),用于发送升级命令给目标系统主机(8),在接收目标系统主机(8)返回的控制命令后,将程序包文件通过调试工具发送至目标系统主机(8)上,并接收目标系统主机(8)解析程序包文件后返回的升级结果。The control unit (7) is used to send an upgrade command to the target system host (8), and after receiving the control command returned by the target system host (8), the package file is sent to the target system host (8) through a debugging tool , and receive the upgrade result returned by the target system host (8) after parsing the package file. 2.根据权利要求1所述的一种用于智慧控制系统的在线编辑装置,其特征在于:所述编程语言可以是二进制程序语言。2 . The online editing device for an intelligent control system according to claim 1 , wherein the programming language can be a binary programming language. 3 . 3.根据权利要求1或2所述的一种用于智慧控制系统的在线编辑装置,其特征在于:所述程序包文件能够被可编程逻辑控制器识别并执行。3 . The online editing device for an intelligent control system according to claim 1 or 2 , wherein the program package file can be recognized and executed by a programmable logic controller. 4 . 4.根据权利要求1所述的一种用于智慧控制系统的在线编辑装置,其特征在于:所述在线编程工具还包括UI界面(6),所述UI界面(6)用于将用户编辑功能需求的过程进行可视化。4. A kind of online editing device for intelligent control system according to claim 1, is characterized in that: described online programming tool also comprises UI interface (6), described UI interface (6) is used for editing user The process of functional requirements is visualized. 5.根据权利要求1所述的一种用于智慧控制系统的在线编辑装置,其特征在于:所述调试工具包括但不限于socket工具。5 . The online editing device for an intelligent control system according to claim 1 , wherein the debugging tools include but are not limited to socket tools. 6 . 6.一种用于智慧控制系统的在线编程方法,其特征在于:所述在线编程方法包括,6. An online programming method for an intelligent control system, characterized in that: the online programming method comprises, 功能代码生成,基于用户编辑的功能需求调用代码对应的代码、函数、参数、变量和执行逻辑,生成功能代码;Function code generation, based on the functional requirements edited by the user, the corresponding codes, functions, parameters, variables and execution logic of the code are called to generate function codes; 程序包文件生成,将功能代码编译成编程语言,生成程序包文件;Package file generation, compile function code into programming language, and generate package file; 程序包文件发送,将程序包文件转换成二进制代码发送给目标系统主机(8);以及,package file sending, converting the package file into binary code and sending it to the target system host (8); and, 升级结果接收,接收目标系统主机(8)解析程序包文件后返回的升级结果。The upgrade result is received, and the upgrade result returned by the target system host (8) after parsing the package file is received. 7.根据权利要求7所述的一种用于智慧控制系统的在线编程方法,其特征在于:所述程序包文件发送的具体方法包括,7. A kind of online programming method for intelligent control system according to claim 7, is characterized in that: the concrete method that described program package file is sent comprises, 向目标系统主机(8)发送升级命令,并判断是否接收到目标系统主机(8)接收升级命令后返回的控制命令;以及,Send an upgrade command to the target system host (8), and determine whether the control command returned after the target system host (8) receives the upgrade command is received; And, 若接收到返回的控制命令,则将程序包文件转换成二进制代码发送给目标系统主机(8),否则,重新发送升级命令。If the returned control command is received, the package file is converted into binary code and sent to the target system host (8), otherwise, the upgrade command is re-sent. 8.根据权利要求6或7所述的一种用于智慧控制系统的在线编程方法,其特征在于:所述程序包文件能够被可编程逻辑控制器识别并执行。8. An online programming method for an intelligent control system according to claim 6 or 7, wherein the program package file can be recognized and executed by the programmable logic controller. 9.根据权利要求7所述的一种用于智慧控制系统的在线编程方法,其特征在于:所述用户编辑功能需求的过程为可视化操作。9 . The online programming method for an intelligent control system according to claim 7 , wherein the process of editing the functional requirements by the user is a visual operation. 10 . 10.一种计算机可读存储介质,其特征在于:存储有能够被处理器加载并执行如权利要求6至8中任一种方法的计算机程序。10. A computer-readable storage medium, characterized in that: a computer program capable of being loaded by a processor and executing the method according to any one of claims 6 to 8 is stored thereon.
CN202011537098.6A 2020-12-23 2020-12-23 Online programming tool and method for intelligent control system Pending CN112667276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011537098.6A CN112667276A (en) 2020-12-23 2020-12-23 Online programming tool and method for intelligent control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011537098.6A CN112667276A (en) 2020-12-23 2020-12-23 Online programming tool and method for intelligent control system

Publications (1)

Publication Number Publication Date
CN112667276A true CN112667276A (en) 2021-04-16

Family

ID=75408087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011537098.6A Pending CN112667276A (en) 2020-12-23 2020-12-23 Online programming tool and method for intelligent control system

Country Status (1)

Country Link
CN (1) CN112667276A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114200885A (en) * 2021-12-06 2022-03-18 嘉兴立鸿科技有限公司 Programming method and device applied to programmable logic controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135891A (en) * 2006-09-01 2008-03-05 费舍-柔斯芒特系统股份有限公司 Graphical programming language object editing and reporting tool
US20140123104A1 (en) * 2011-07-06 2014-05-01 Abb Ag Method and device for the programming and configuration of a programmable logic controller
CN109117128A (en) * 2018-06-23 2019-01-01 上海泽阳智能科技有限公司 A kind of programing system for realizing same target
CN109871204A (en) * 2019-02-13 2019-06-11 智能佳(北京)机器人有限公司 Text visualizes visual programming integrating device, processing equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135891A (en) * 2006-09-01 2008-03-05 费舍-柔斯芒特系统股份有限公司 Graphical programming language object editing and reporting tool
US20140123104A1 (en) * 2011-07-06 2014-05-01 Abb Ag Method and device for the programming and configuration of a programmable logic controller
CN109117128A (en) * 2018-06-23 2019-01-01 上海泽阳智能科技有限公司 A kind of programing system for realizing same target
CN109871204A (en) * 2019-02-13 2019-06-11 智能佳(北京)机器人有限公司 Text visualizes visual programming integrating device, processing equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114200885A (en) * 2021-12-06 2022-03-18 嘉兴立鸿科技有限公司 Programming method and device applied to programmable logic controller

Similar Documents

Publication Publication Date Title
US8818346B2 (en) Wireless device with a control engine using functional block programming
US7640351B2 (en) Application updating in a home automation data transfer system
US7698448B2 (en) Proxy commands and devices for a home automation data transfer system
US7870232B2 (en) Messaging in a home automation data transfer system
Lamine et al. Remote control of a domestic equipment from an Android application based on Raspberry pi card
US20070256085A1 (en) Device types and units for a home automation data transfer system
US20230289198A1 (en) Configuring application scene
Cengic et al. On formal analysis of IEC 61499 applications, Part A: Modeling
CN104079653A (en) Smart home control method and system based on B/S framework
BRPI0611726A2 (en) apparatus for performing a useful duty cycle on a physical article
CN101145982A (en) A general gateway design method based on object model and protocol dynamic component configuration
US20070169074A1 (en) Upgrade apparatus and its method for home network system
CN106130838A (en) Smart Home steward system based on wechat
CN102789206B (en) The centralized safety logic control system mixed with distributed AC servo system in numerical control of machine tools
CN112667276A (en) Online programming tool and method for intelligent control system
CN110795105A (en) Automatic compiling and deploying method and system for power distribution automation master station system
CN114253531A (en) Micro-service publishing system
Vanus et al. Development of software tool for operational and technical functions control in the smart home with KNX technology
CN112711575A (en) Deployment method, system and related device of database cluster
JP2014203138A (en) Electronic device, verification method, and verification program
CN103576667A (en) Method, device and system for testing main control board
CN105446154A (en) Control method and system of Internet-of-Things household electric appliances
CN112445607A (en) Method and device for executing method function by application program
CN116974628A (en) Information acquisition method, information acquisition device, electronic equipment and computer readable storage medium
KR100643294B1 (en) Home network simulation system and method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210416

RJ01 Rejection of invention patent application after publication