CN107222527B - Method for controlling internet of things equipment to operate in different modes through configuration file - Google Patents
Method for controlling internet of things equipment to operate in different modes through configuration file Download PDFInfo
- Publication number
- CN107222527B CN107222527B CN201710346800.2A CN201710346800A CN107222527B CN 107222527 B CN107222527 B CN 107222527B CN 201710346800 A CN201710346800 A CN 201710346800A CN 107222527 B CN107222527 B CN 107222527B
- Authority
- CN
- China
- Prior art keywords
- configuration
- mode
- module
- list
- internet
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000011161 development Methods 0.000 claims abstract description 32
- 230000001419 dependent effect Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
A method for controlling the mode-based operation of Internet of things equipment through a configuration file is characterized in that a developer sends the configuration file to the Internet of things equipment, and the Internet of things equipment automatically configures an operation mode and controls a function module to work when detecting an application or a user operation command according to the configuration file; the method comprises the steps of developing a development environment running on a computer and middleware software running on the equipment of the Internet of things. The invention provides a method for controlling the split-mode operation of Internet of things equipment through a configuration file, which has low development cost and low equipment firmware updating cost.
Description
Technical Field
The invention belongs to an operation control method of equipment of the Internet of things, and relates to a method for controlling the mode-divided operation of the equipment of the Internet of things through a configuration file.
Background
Many internet of things devices, particularly internet of things devices for data acquisition and monitoring applications, are often designed to intermittently acquire transmission data at a very low duty cycle to reduce power consumption. This design, while beneficial to increasing the duration of the device's operation using the battery, is not conducive to user interaction with the device. For example, when deploying a device, a user wants the device to quickly send data to detect whether the installation is correct; in maintaining a device, users often desire to be able to perform point-to-point, delay-free interactions with the device to detect device failures. Document [1 ]]Ming Xia,Yabo Dong,Wenyuan Xu,Xiangyang Li andDongming Lu.MC2Multimode User-centralized Design of Wireless Sensor Networks for Long-Term monitoring, ACM Transactions on Sensor Networks, Vol.10, No.3,2014 (summer, Dongbowave, Xuwenyuan, Li Zhengyang and Ludong Ming, MC)2ACM sensor network, volume 10, No.3, 2014) proposes a method for operating Internet of things equipment in different modes, that is, the equipment can switch modes and operate corresponding functional modules according to application or user operation commands, so that the monitoring of application performance is not interfered, and the operation efficiency of a user is improved. However, this approach greatly increases the complexity of device firmware development. Because the developer not only needs to develop a plurality of functional modules, but also writes logic for performing mode module switching operation according to an application or a user operation command. At the same time, a large device firmware update overhead is also incurred.
Disclosure of Invention
In order to overcome the defects that the development cost of the existing internet-of-things equipment split-mode operation mode is high and the equipment firmware updating cost is high, the invention provides a method for controlling the split-mode operation of the internet-of-things equipment through a configuration file, wherein the development cost is low and the equipment firmware updating cost is low.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a method for controlling the mode-based operation of Internet of things equipment through a configuration file is characterized in that a developer sends the configuration file to the Internet of things equipment, and the Internet of things equipment automatically configures an operation mode and controls a function module to work when detecting an application or a user operation command according to the configuration file;
developing a development environment running on a computer and middleware software running on equipment of the Internet of things;
the development environment receives and processes configuration information provided by a developer, receives and compiles module implementation codes provided by the developer, and sends a configuration file formed after processing and a module implementation library formed after compiling to the Internet of things equipment in a separated manner;
after receiving the configuration file and the module implementation library, the Internet of things equipment middleware software firstly runs a default mode according to a default mode ID according to configuration information contained in the configuration file; when an operating system event is detected, matching three fields of a command interface, a command type and command data configured by each command in a command configuration list one by one, detecting whether a command exists or not, and returning an accurate command ID; then, according to the command ID and the current mode ID, the corresponding operation configuration is retrieved from the operation configuration list, and according to a next mode ID designated in the retrieved operation configuration, the current mode is stopped, and all modules in the current mode are stopped, and then the designated next mode is run.
Further, in a development environment running on the development computer, the configuration file includes four parts: a mode configuration list, a module configuration list, a command configuration list, and an operation configuration list.
Still further, the mode configuration list includes a default mode ID, and a plurality of mode configurations, each mode configuration including a mode ID and a mode name.
The module configuration list comprises a plurality of module configurations, and each module configuration comprises a module ID, a module name, a father mode ID, a dependent module ID list, a parameter list, a module implementation function name and a module implementation function address.
The command configuration list contains a plurality of command configurations, each command configuration including a command ID, a command interface, a command type, and command data.
The operation configuration list comprises a plurality of operation configurations, each operation configuration comprising: command ID, current mode ID, and next mode ID.
The method for binding the module configuration and the module implementation library by the development environment running on the development computer comprises the following steps: the developer provides module implementation code and configuration information, including module implementation function names, to the development environment. The development environment compiles the module implementation code, searches the address of the name function in the MAP file generated after compilation, and assigns the obtained address to the module implementation function address in the module configuration.
Furthermore, in the middleware software running on the internet of things equipment, the running method of the mode is as follows: dividing all modules to which the mode belongs into an operation list and a preparation list according to configuration information; firstly, adding all modules of which the dependent module ID lists are not empty into a preparation list, and adding all modules of which the dependent module ID lists are empty into a running list for concurrent scheduling and running; when the module is operated, the middleware software operates the function in the module implementation library pointed by the module implementation function address in the module configuration, and transmits the parameters in the parameter list in the module configuration to the function; and then continuously detecting whether all modules depended by the modules in the preparation list are executed, and if so, adding the modules into the running list for concurrent scheduling and running. All executed modules will be removed from the run list.
The technical conception of the invention is as follows: in order to reduce the development cost of the split-mode operation of the Internet of things equipment, the invention provides a method for controlling the split-mode operation of the Internet of things equipment through a configuration file. A developer only needs to write an operation configuration file of a mode and a module, the Internet of things equipment can automatically manage the mode and the module according to the configuration file, and the mode and the module are automatically switched to operate when an application and user operation command is detected. Therefore, the method can greatly reduce development expenditure. Meanwhile, only the configuration file needs to be sent to update the mode module operation mechanism, so that the method can greatly reduce the expense of updating the equipment firmware.
The invention has the following beneficial effects: the development overhead is small, and the equipment firmware updating overhead is small.
Drawings
Fig. 1 is a schematic diagram of a method for controlling the split-mode operation of internet-of-things equipment through a configuration file.
Fig. 2 is a configuration file composition diagram.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, in a method for controlling the mode-based operation of internet of things equipment through a configuration file, a developer sends the configuration file to the internet of things equipment, and the internet of things equipment automatically configures an operation mode and controls a function module to work when detecting an application or a user operation command according to the configuration file;
developing a development environment running on a computer and middleware software running on equipment of the Internet of things;
the development environment receives and processes configuration information provided by a developer, receives and compiles module implementation codes provided by the developer, and sends a configuration file formed after processing and a module implementation library formed after compiling to the Internet of things equipment in a separated manner;
after receiving the configuration file and the module implementation library, the Internet of things equipment middleware software firstly runs a default mode according to a default mode ID according to configuration information contained in the configuration file; when an operating system event is detected, matching three fields of a command interface, a command type and command data configured by each command in a command configuration list one by one, detecting whether a command exists or not, and returning an accurate command ID; then, according to the command ID and the current mode ID, the corresponding operation configuration is retrieved from the operation configuration list, and according to a next mode ID designated in the retrieved operation configuration, the current mode is stopped, and all modules in the current mode are stopped, and then the designated next mode is run.
Further, referring to fig. 2, in the development environment running on the development computer, the configuration file includes four contents: a mode configuration list, a module configuration list, a command configuration list, and an operation configuration list.
Still further, the mode configuration list includes a default mode ID, and a plurality of mode configurations, each mode configuration including a mode ID and a mode name.
The module configuration list comprises a plurality of module configurations, and each module configuration comprises a module ID, a module name, a father mode ID, a dependent module ID list, a parameter list, a module implementation function name and a module implementation function address.
The command configuration list contains a plurality of command configurations, each command configuration including a command ID, a command interface, a command type, and command data.
The operation configuration list comprises a plurality of operation configurations, each operation configuration comprising: command ID, current mode ID, and next mode ID.
The method for binding the module configuration and the module implementation library by the development environment running on the development computer comprises the following steps: the developer provides module implementation code and configuration information, including module implementation function names, to the development environment. The development environment compiles the module implementation code, searches the address of the name function in the MAP file generated after compilation, and assigns the obtained address to the module implementation function address in the module configuration.
Furthermore, in the middleware software running on the internet of things equipment, the running method of the mode is as follows: dividing all modules to which the mode belongs into an operation list and a preparation list according to configuration information; firstly, adding all modules of which the dependent module ID lists are not empty into a preparation list, and adding all modules of which the dependent module ID lists are empty into a running list for concurrent scheduling and running; when the module is operated, the middleware software operates the function in the module implementation library pointed by the module implementation function address in the module configuration, and transmits the parameters in the parameter list in the module configuration to the function; and then continuously detecting whether all modules depended by the modules in the preparation list are executed, and if so, adding the modules into the running list for concurrent scheduling and running. All executed modules will be removed from the run list.
Claims (8)
1. A method for controlling the mode-divided operation of Internet of things equipment through a configuration file is characterized in that: the method comprises the following steps that a developer sends a configuration file to the Internet of things equipment, and the Internet of things equipment automatically configures an operation mode and controls a functional module to work when detecting an application or user operation command according to the configuration file;
developing a development environment running on a computer and middleware software running on equipment of the Internet of things;
the development environment receives and processes configuration information provided by a developer, receives and compiles module implementation codes provided by the developer, and sends a configuration file formed after processing and a module implementation library formed after compiling to the Internet of things equipment in a separated manner;
after receiving the configuration file and the module implementation library, the Internet of things equipment middleware software firstly runs a default mode according to a default mode ID according to configuration information contained in the configuration file; when an operating system event is detected, matching three fields of a command interface, a command type and command data configured by each command in a command configuration list one by one, detecting whether a command exists or not, and returning an accurate command ID; then, according to the command ID and the current mode ID, the corresponding operation configuration is retrieved from the operation configuration list, and according to a next mode ID designated in the retrieved operation configuration, the current mode is stopped, and all modules in the current mode are stopped, and then the designated next mode is run.
2. The method for controlling split-mode operation of internet-of-things devices through configuration files according to claim 1, wherein: in a development environment running on the development computer, the configuration file comprises four parts of contents: a mode configuration list, a module configuration list, a command configuration list, and an operation configuration list.
3. The method for controlling the split-mode operation of the internet-of-things equipment according to claim 2 through the configuration file, wherein the method comprises the following steps: the mode configuration list contains a default mode ID and a plurality of mode configurations, each mode configuration including a mode ID and a mode name.
4. The method for controlling the split-mode operation of the internet-of-things equipment according to claim 2 through the configuration file, wherein the method comprises the following steps: the module configuration list comprises a plurality of module configurations, and each module configuration comprises a module ID, a module name, a father mode ID, a dependent module ID list, a parameter list, a module implementation function name and a module implementation function address.
5. The method for controlling the split-mode operation of the internet-of-things equipment according to claim 2 through the configuration file, wherein the method comprises the following steps: the command configuration list contains a plurality of command configurations, each command configuration including a command ID, a command interface, a command type, and command data.
6. The method for controlling the split-mode operation of the internet-of-things equipment according to claim 2 through the configuration file, wherein the method comprises the following steps: the operation configuration list comprises a plurality of operation configurations, each operation configuration comprising: command ID, current mode ID, and next mode ID.
7. The method for controlling the split-mode operation of the internet-of-things equipment according to claim 3 through the configuration file, wherein the method comprises the following steps: the method for binding the module configuration and the module implementation library by the development environment running on the development computer comprises the following steps: the developer provides module realization codes and configuration information to the development environment, wherein the module realization codes and the configuration information comprise module realization function names; the development environment compiles the module implementation code, searches the address of the name function in the MAP file generated after compilation, and assigns the obtained address to the module implementation function address in the module configuration.
8. The method for controlling the split-mode operation of the internet-of-things equipment through the configuration file according to any one of claims 1 to 7, wherein the method comprises the following steps: in the middleware software running on the Internet of things equipment, the running method of the mode is as follows: dividing all modules to which the mode belongs into an operation list and a preparation list according to configuration information; firstly, adding all modules of which the dependent module ID lists are not empty into a preparation list, and adding all modules of which the dependent module ID lists are empty into a running list for concurrent scheduling and running; when the module is operated, the middleware software operates the function in the module implementation library pointed by the module implementation function address in the module configuration, and transmits the parameters in the parameter list in the module configuration to the function; and then continuously detecting whether all modules depended by the modules in the preparation list are executed completely, if so, adding the modules into the running list for concurrent scheduling and running, and removing all executed modules from the running list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710346800.2A CN107222527B (en) | 2017-05-16 | 2017-05-16 | Method for controlling internet of things equipment to operate in different modes through configuration file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710346800.2A CN107222527B (en) | 2017-05-16 | 2017-05-16 | Method for controlling internet of things equipment to operate in different modes through configuration file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107222527A CN107222527A (en) | 2017-09-29 |
CN107222527B true CN107222527B (en) | 2020-05-05 |
Family
ID=59945524
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710346800.2A Active CN107222527B (en) | 2017-05-16 | 2017-05-16 | Method for controlling internet of things equipment to operate in different modes through configuration file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107222527B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110320992B (en) * | 2019-06-28 | 2020-12-04 | 兆讯恒达科技股份有限公司 | Method for configuring and managing power consumption |
CN113298487B (en) * | 2021-04-25 | 2023-03-24 | 蒲惠智造科技股份有限公司 | Intelligent manufacturing execution process management system and method based on cloud big data platform |
CN113485727A (en) * | 2021-08-23 | 2021-10-08 | 一飞(海南)科技有限公司 | Design method, system, terminal and unmanned aerial vehicle supported by formation aircraft firmware |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101977237A (en) * | 2010-11-10 | 2011-02-16 | 南京信息职业技术学院 | Configurable wireless application design and development method |
CN102722396A (en) * | 2012-06-11 | 2012-10-10 | 山东中创软件商用中间件股份有限公司 | Method and system for loading components |
CN103218220A (en) * | 2013-02-25 | 2013-07-24 | 上海谐宇网络科技有限公司 | Dynamic pluggable component based-Internet of things middleware system |
CN103279376A (en) * | 2011-10-17 | 2013-09-04 | 霍尼韦尔国际公司 | Methods and reconfigurable systems to incorporate customized executable code within a condition based health maintenance system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7127480B2 (en) * | 2003-12-04 | 2006-10-24 | International Business Machines Corporation | System, method and program for backing up a computer program |
-
2017
- 2017-05-16 CN CN201710346800.2A patent/CN107222527B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101977237A (en) * | 2010-11-10 | 2011-02-16 | 南京信息职业技术学院 | Configurable wireless application design and development method |
CN103279376A (en) * | 2011-10-17 | 2013-09-04 | 霍尼韦尔国际公司 | Methods and reconfigurable systems to incorporate customized executable code within a condition based health maintenance system |
CN102722396A (en) * | 2012-06-11 | 2012-10-10 | 山东中创软件商用中间件股份有限公司 | Method and system for loading components |
CN103218220A (en) * | 2013-02-25 | 2013-07-24 | 上海谐宇网络科技有限公司 | Dynamic pluggable component based-Internet of things middleware system |
Non-Patent Citations (1)
Title |
---|
MC2: Multimode User-Centric Design of Wireless Sensor Networks for Long-Term Monitoring;MING XIA,YABO DONG,WENYUAN XU,XIANGYANG LI,DONGMING LU;《ACM Transactions on Sensor Networks》;20140430;第10卷(第3期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN107222527A (en) | 2017-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103176824B (en) | A kind of method and device of system upgrade | |
CN101876940B (en) | Automatic test method and device | |
CN107222527B (en) | Method for controlling internet of things equipment to operate in different modes through configuration file | |
CN110990019B (en) | Java class analysis method and device, storage medium and electronic equipment | |
CN105204913A (en) | Method and system for running Linux application on Android operating system and system | |
FI125558B (en) | Device for controlling sensors | |
CN104885055A (en) | Method and device for application data synchronization | |
CN103324495A (en) | Method and system for data center server boot management | |
CN103761088A (en) | Multiple operation system switching method applicable to ARM (advanced risc machine) framework mobile equipment | |
CN106371847B (en) | CPCI bus RS422 communication driving method and system under Windows xp system | |
CN110633091A (en) | Electronic module and software wireless upgrading method thereof | |
WO2017040535A1 (en) | Compact schedules for resource-constrained devices | |
CN103576656A (en) | Method, device and system for controlling household appliances | |
CN105591778A (en) | Method and system for updating configuration file in distributed system | |
EP3516850A1 (en) | Systems and methods for sharing application data between isolated applications executing on one or more application platforms | |
CN110825409B (en) | Parameter management method, electronic device and computer storage medium | |
CN104166570A (en) | On-line file updating method, equipment and system | |
CN105183657A (en) | System and method for testing WEB interface | |
CN103440146A (en) | BIOS updating method based on cloud storage | |
CN104657292A (en) | Method and device for separating hardware drive from operating system | |
CN109947576A (en) | A kind of method of virtual machine internal broker program management | |
CN107911816B (en) | Starting method for multi-mode IoT device, multi-mode IoT device and storage medium | |
CN105354066A (en) | OTA (over the air) downloading method, device and intelligent terminal | |
KR101498756B1 (en) | Embedded device for managing battery, software installation device and method thereof | |
CN103902312B (en) | The sending method and device of a kind of application program |
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 |