CN115756651A - Business module dynamic loading system and method based on Internet of things - Google Patents
Business module dynamic loading system and method based on Internet of things Download PDFInfo
- Publication number
- CN115756651A CN115756651A CN202211504350.2A CN202211504350A CN115756651A CN 115756651 A CN115756651 A CN 115756651A CN 202211504350 A CN202211504350 A CN 202211504350A CN 115756651 A CN115756651 A CN 115756651A
- Authority
- CN
- China
- Prior art keywords
- internet
- things
- service module
- terminal node
- dynamic loading
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the technical field of embedded software of the Internet of things, and discloses a dynamic loading system and a dynamic loading method for a business module based on the Internet of things, wherein the system comprises a networking basic platform, an Internet of things gateway, an Internet of things edge repeater and an Internet of things terminal node, the Internet of things basic platform manages, issues and controls the business module, the Internet of things gateway and the Internet of things edge repeater carry out data interaction, and the Internet of things terminal node controls the terminal equipment to work; the method comprises the following steps: the method comprises the steps that a system is constructed, an Internet of things basic platform issues a service module to an Internet of things terminal node or an Internet of things edge repeater, the Internet of things terminal node or the Internet of things edge repeater stores the service module, the Internet of things terminal node or the Internet of things edge repeater dynamically loads the stored service module according to requirements, and logic control of the service module is carried out on terminal equipment according to the loaded service module. The invention can realize the automatic independent loading of each service module component and reduce the upgrading cost.
Description
Technical Field
The invention relates to the technical field of embedded software of the Internet of things, in particular to a business module dynamic loading system and method based on the Internet of things.
Background
With the development of the internet of things technology, the embedded micro intelligent device will grow exponentially in the future, and the software design of the node is the key for stable and efficient operation of the whole system. If the internet of things equipment providing the internet of everything can not be reused on software, repeated manufacturing of hardware is inevitable, and the node with the over-the-air upgrading and dynamic loading is more vital and sustainable for the equipment with the solidified program.
Compared with the mature dynamic loading technology on the Linux operating system, the dynamic loading technology is used as a low-end device in the embedded market mastery, such as a common Cortex-M series embedded device, and lacks support for a dynamic loading program. The main reasons for this drawback are the limitations of ROM technology and the tension in memory usage, and it is therefore very important to improve the scalability of embedded devices.
The development resource demand of the operating system of the existing internet of things is more, but the upgrading cost of the existing system is higher, and the business function modules of the internet of things are not independent, so that the development of each product needs to be subjected to complete detail test, the efficiency is low, and the labor cost is high.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defects in the prior art, and provide a system and a method for dynamically loading service modules based on the internet of things, which can realize the automatic independent loading of each service module component and reduce the upgrade cost.
In order to solve the technical problem, the invention provides a service module dynamic loading system based on the internet of things, which comprises:
an Internet of things base platform, an Internet of things gateway, an Internet of things edge repeater and an Internet of things terminal node,
the basic platform of the Internet of things manages, issues and controls a service module; the internet of things gateway and the internet of things edge repeater carry out data interaction, the internet of things gateway and the internet of things edge repeater jointly construct an internet of things wireless transmission network, and the internet of things terminal node controls terminal equipment to work;
the Internet of things base platform issues the service module to the Internet of things terminal node through the Internet of things wireless transmission network, dynamically loads the service module, and performs logic control of the service module on terminal equipment according to the loaded service module.
In an embodiment of the present invention, the storage mode of the service module supports FLASH or EEPROM, the ELF file storing the service module includes a code segment, a data segment, an uninitialized segment, a redefined table and a symbol table, the file header of the ELF file includes a field required for dynamic loading, and the field required for dynamic loading includes a file class, an ELF file type, a platform attribute, a service module version number, a program entry address and a file header size.
In an embodiment of the present invention, when the service module is dynamically loaded, a plurality of service module files are simultaneously stored in the storage area of the dynamic loading file of the multi-service module dynamic loading system slice, and the plurality of service module files are simultaneously loaded and run.
In an embodiment of the present invention, the terminal nodes of the internet of things and the terminal devices form resource control systems, each resource control system includes at least one terminal node of the internet of things, and the terminal nodes of the internet of things control at least one terminal device of the internet of things.
In one embodiment of the invention, the internet of things edge repeater performs data interaction with the internet of things terminal node, and realizes service module logic control on a group of edge terminal equipment under the internet of things terminal node according to a loaded service module;
and the terminal nodes of the Internet of things realize data interaction among different terminal devices under the system through the edge repeaters of the Internet of things.
In an embodiment of the invention, a fault monitoring algorithm is arranged on the terminal node of the internet of things and used for monitoring the working state of the controlled terminal equipment;
the basic platform of the Internet of things is connected with a warning device, and the warning device is used for fault warning and energy consumption early warning;
the internet of things terminal node, the internet of things edge repeater and the internet of things gateway all adopt metal shells with functions of preventing surge and electromagnetic shielding.
The invention also provides a service module dynamic loading method based on the Internet of things, which comprises the following steps:
the method comprises the steps that a business module dynamic loading system based on the Internet of things is established, wherein the business module dynamic loading system comprises an Internet of things basic platform, an Internet of things gateway, an Internet of things edge repeater and an Internet of things terminal node, the Internet of things basic platform manages, issues and controls a business module, the Internet of things gateway and the Internet of things edge repeater carry out data interaction, and the Internet of things terminal node controls terminal equipment to work;
the basic platform of the internet of things issues the service module to the terminal node of the internet of things or the edge repeater of the internet of things, the terminal node of the internet of things or the edge repeater of the internet of things stores the service module, the terminal node of the internet of things or the edge repeater of the internet of things dynamically loads the stored service module according to the requirement, and the logic control of the service module is carried out on the terminal equipment according to the loaded service module.
In an embodiment of the present invention, the issuing, by the internet of things base platform, the service module to the internet of things terminal node or the internet of things edge repeater includes:
the basic platform of the Internet of things issues a service module and service information to the gateway of the Internet of things, the service module is issued in an ELF file mode, and the service information comprises an Internet of things terminal node or an Internet of things edge repeater of the service module to be executed and a calculation factor required by the execution of the service module;
and the gateway of the Internet of things sends the service module and the service information to a specified terminal node of the Internet of things or an edge repeater of the Internet of things according to the stored routing information.
In an embodiment of the present invention, the internet of things terminal node or internet of things edge repeater storage service module includes:
the terminal node of the Internet of things or the edge repeater of the Internet of things receives the ELF file and stores the ELF file in an off-chip FLASH service module file storage area, and stores service information corresponding to a service module;
and extracting necessary fields in the ELF file to generate a new service module file and storing the new service module file in an on-chip FLASH dynamic loading file storage area.
In an embodiment of the present invention, the dynamically loading and storing a service module according to a requirement by the internet of things terminal node or the internet of things edge repeater includes:
when the basic platform of the Internet of things issues a service module operation command, loading a new service module file stored in the on-chip FLASH dynamic loading file storage area;
analyzing the new service module file, releasing the code, data, symbol table and relocated entry positions in the file, and respectively allocating the addresses of the code and the data in the ROM and the RAM;
and linking and repositioning the codes and the data to corresponding positions, writing the codes into the ROM, and writing the data into the RAM to realize dynamic loading of the service module.
Compared with the prior art, the technical scheme of the invention has the following advantages:
according to the invention, the service modules are uniformly managed, issued and controlled through the basic platform of the Internet of things, and the service module unit is dynamically loaded, so that the automatic independent loading of each service module component is realized, the program updating of the whole system is avoided, the upgrading cost is reduced, and the problems of high upgrading cost and non-independent service function modules of the Internet of things system in the prior art are solved.
Drawings
In order that the present disclosure may be more readily and clearly understood, reference is now made to the following detailed description of the present disclosure taken in conjunction with the accompanying drawings, in which:
figure 1 is a schematic diagram of the structure of the system of the present invention,
figure 2 is a schematic diagram of internet of things over-the-air transmission in an embodiment of the invention,
figure 3 is a schematic diagram of the division of the storage space of the service module in the embodiment of the present invention,
figure 4 is a schematic diagram of a service module storing an ELF file in the embodiment of the present invention,
FIG. 5 is a flowchart of a method for dynamically loading service modules according to an embodiment of the present invention,
figure 6 is a schematic diagram of a process loading implementation in an embodiment of the present invention,
fig. 7 is a schematic diagram of an embodiment of a system.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
Example one
Referring to fig. 1, the present invention discloses a service module dynamic loading system based on the internet of things, which includes:
(1) The terminal node of the Internet of things: the dynamic loading system of the business module of each Internet of things is connected with a terminal node of the Internet of things, each intelligent terminal node can collect sensor data and control equipment, and the edge calculation of the equipment connected with the intelligent terminal node can be realized through the business module issued by the platform. The terminal nodes of the Internet of things control the terminal equipment to carry out data acquisition and calculation, the number of the terminal nodes of the Internet of things is at least equal to that of the resource control systems, and each resource control system corresponds to at least one terminal node of the Internet of things.
(2) Internet of things edge repeater: the Internet of things edge repeater and the Internet of things terminal node perform data interaction mutually, construct a networking wireless transmission network, and realize data interaction among all systems. The edge calculation of the equipment connected with the terminal node of the internet of things managed by the edge repeater of the internet of things can be realized through the service module issued by the platform.
In this embodiment, the internet of things edge repeater adopts a metal shell with surge prevention, electromagnetic prevention and high shell protection level, and the repeater comprises a power supply circuit and a network circuit. The equipment adopts an external EEPOM (chip) to store programs, an external FLASH is used for storing data or instructions and is provided with a temperature and humidity sensor to collect current environment data, and wireless internet of things with self-networking, outage and network disconnection self-recovery, network optimal path self-selection and link fault self-recovery are formed among the internet of things edge repeaters through a wireless network protocol.
(3) The gateway of the Internet of things: the internet of things gateway and the internet of things edge repeater interact data mutually, and a wireless transmission network is constructed through networking, so that information uploading and issuing are realized. The gateway of the Internet of things realizes the integral construction, management, distribution and scheduling of the energy-saving algorithm of the terminal node of the Internet of things. The energy-saving algorithm can be rapidly issued to each on-site internet of things terminal node through the internet of things basic platform, the internet of things gateway comprises an energy-saving operation chip, a power circuit and a network circuit, an external EEPOM (electronic engineering management and control) chip is used for storing programs, and data interaction is realized by utilizing a USB-OTG (universal serial bus-optical transport group) interface and an RS485 interface.
(4) Basic platform of the internet of things: the Internet of things base platform performs data interaction with the Internet of things gateway based on a flexible micro-service architecture, manages Internet of things equipment through the Internet of things base platform, and manages business decision operation and business modules of the Internet of things base platform layer. The basic platform management, distribution and control service module of the Internet of things comprises: inquiring a service module, loading the service module, unloading the service module and modifying parameters of the service module. Parameters of the business module can be modified through external input data, and the parameters can be historical experience values; and the input external data is issued to the corresponding Internet of things terminal node of each resource control system through the Internet of things basic platform through the Internet of things gateway and the Internet of things edge repeater.
The visualization function of the basic platform of the internet of things comprises a data display instrument panel, a chart, a project map and a data table, and the data components are used for displaying the collection of the internet of things, equipment statistics, geographic positions, metadata, a filter, software updating, current real-time data and historical data, and the data components can be configured on line, the data source and the visual representation mode are allowed to be changed, and the components can be configured through operation commands and equipment data interaction.
The Internet of things base platform, the Internet of things gateway, the Internet of things edge repeater and the Internet of things terminal node carry out message transmission through standard MQTT and HTTP Internet of things communication protocols, and the Internet of things base platform can establish a new Internet of things protocol to the platform.
The communication part adopts the modularized design, and can support Zigbee, loRa and other different network transmission modes. When a Zigbee wireless communication mode is used, the Internet of things edge repeater is responsible for managing networking terminal nodes, the Internet of things terminal nodes are responsible for equipment intervention, the Internet of things edge repeater is accessed into an Internet of things gateway which is responsible for managing the section, and the Internet of things gateway is in butt joint with an Internet of things basic platform to realize uplink and downlink transmission of data; when the LoRa wireless communication mode is used, a network of things edge repeater can be omitted, all the terminal nodes of the network of things in one region can be accessed into the network of things gateway responsible for managing the region, the network of things gateway is in butt joint with the basic platform of the network of things, and uplink and downlink transmission of data is achieved.
For the internet of things device, the embedded system software may be referred to as firmware, and includes a boot loader (bootloader), an operating system, a device driver, and application program code. The firmware is used as the core of the internet of things equipment, is used for controlling the safe and stable operation of the hardware equipment, and is responsible for coordinators to manage system resources and complete information transmission between the inside and the outside. When updating the device firmware, the embedded programming technology is used for downloading the version firmware into a FLASH area of the chip.
In a traditional firmware development process, after a section of code is compiled and linked as an executable program, a developer generally downloads data to be programmed into an equipment chip by using a special program burner, under the condition, upper computer software is connected with the burner through a serial bus, then the burner is connected to a chip to be written, and finally, the operations of erasing, checking, reading, writing and the like of the chip are realized through the upper computer software. There are also methods to isolate the application code from the boot code (bootloader), place the boot load area code at the beginning of the program, and the application code at the next free page of memory. The logic of program operation is controlled by the code segment and the interrupt vector table together, the two parts can not be shared, but the data segment is stored in the RAM when in operation and is automatically cleared after reset. The embedded firmware is generally generated by a user after compiling and linking according to a source code and is downloaded to the Internet of things equipment in a certain mode, and data is not lost under the condition that the equipment is powered off. The replacement of the program is generally done by downloading the compiled binary files (. Bin files) to the memory unit of the device.
The storage mode of the service module in this embodiment supports various modes such as FLASH or EEPROM. Aiming at small Internet of things equipment with limited resources, the invention does not need to replace an application code file of the embedded equipment, so that an ELF file for storing a service module is redesigned, only a code segment, a data segment, an uninitialized segment, a redefined table and a symbol table are reserved, a file header of the ELF file reserves a field required by dynamic loading, and the field required by the dynamic loading comprises a file class, an ELF file type, a platform attribute, a service module version number, a program entry address and a file header size. Relocatable binary ELF files (, o) are designed to accomplish the addition and modification of business logic. The structure of the relocatable binary ELF file is shown in Table 1:
TABLE 1 Structure Table for relocatable binary ELF files
ELF Header | ELF head |
.text Section | Compiled machine code |
.data Section | Read-only data and global variables |
.bss Section | Uninitialized global variables |
.symtab | Symbol table |
.rel.text | Text-context location list |
.rel.data | Data section location list |
.init | Program initialization segment |
.line | Machine instruction mapping |
.fini | End segment of program |
.debug | Debugging symbol table |
.strtab | Character string table with all sections |
Section Header Table | Festival head table |
The service module binary file is formed by combining 16 bytes Metadata and a compiled star-o file service logic file, and the structure of the Metadata format is shown in table 2:
table 2 structure table in Metadata format
Crc check value | Crc validation value | Firmware length | Signature ID | Firmware version number | Firmware information | Firmware content |
2Byte | 2Bytes | 2Bytes | 2Bytes | 4Bytes | 4Bytes | NBytes |
In this embodiment, when the service module is dynamically loaded, the multi-service module dynamic loading system slice dynamic loading file storage area stores a plurality of service module files simultaneously, and the plurality of service module files are loaded and run simultaneously.
In this embodiment, the terminal nodes of the internet of things and the terminal devices form resource control systems, each resource control system includes at least one terminal node of the internet of things, and the terminal nodes of the internet of things control at least one terminal device.
In this embodiment, the internet of things edge repeater performs data interaction with the internet of things terminal node, and implements service module logic control on a group of edge terminal devices under the internet of things terminal node according to the loaded service module; and the terminal nodes of the Internet of things realize data interaction among different terminal devices under the system through the edge repeaters of the Internet of things. The internet of things terminal nodes collect all the equipment data under the corresponding resource control systems, and send the equipment data collected under all the resource control systems to the internet of things terminal nodes under other resource control systems according to the internet of things edge repeater for temporary storage, so that the equipment data under all the resource control systems are stored in at least one internet of things terminal node corresponding to each resource control system.
When the basic platform of the internet of things controls the service module, data prediction is carried out according to uploaded real-time data and stored historical data, parameters of the service module are adjusted, control instructions are issued to terminal nodes of the internet of things under different resource control systems through the gateway of the internet of things and the edge repeater of the internet of things, and energy-saving control is carried out on each resource control system through the terminal nodes of the internet of things.
In the embodiment, the terminal node of the internet of things is provided with a fault monitoring algorithm for monitoring the working state of the controlled terminal equipment; and monitoring equipment abnormity according to the acquired equipment data, and adding the equipment data which is monitored abnormally last time to a training set of the fault monitoring algorithm in the terminal node of the Internet of things for training to obtain the optimized fault monitoring algorithm. The basic platform of the Internet of things is connected with a warning device, and the warning device is used for fault alarm and energy consumption early warning. The internet of things terminal node, the internet of things edge repeater and the internet of things gateway all adopt metal shells with functions of surge prevention and electromagnetic prevention.
Referring to fig. 2, fig. 2 is a schematic diagram of internet of things over-the-air transmission in the embodiment of the present invention. As shown in fig. 2, the over-the-air transmission process of the service module file includes:
(1) A TX (gateway of the Internet of things) segments a dynamic loading file to be updated, each 64 bytes is a section, a 6-byte frame header is added, and data are sent to an RX module (service module execution node) in a single-hop or multi-hop mode according to a stored routing table;
(2) The RX end receives wireless data to verify CRC) to reply TX (data frame is correct or wrong), if the data frame is wrong, the TX receives the RX frame and retransmits the frame data if the data frame is wrong, and if the data frame is retransmitted for 3 times, the TX module is still wrong, and the main process of the RX module stops upgrading; if the data is correct, the RX stores 64 bytes into an off-chip FLASH, and the TX module continues to send the next section of data;
(3) RX receives the last section of data and stores it in FLASH outside the chip, calculates CRC value of the service module file, compares it with the stored verification value in Metadata, if the same proves that the transmission of the service module file is correct, then enters into the dynamic loading process of the service module.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a partition of a service module storage space according to an embodiment of the present invention. As shown in fig. 3: in the embodiment of the invention, the size of the FLASH inside the embedded device is 128k bytes, and the size of the FLASH outside the embedded device is 512k bytes. The on-chip FLASH space division comprises an 8k byte boot code (bootloader) area, a 104k byte application code area, a 12k byte dynamic loading file storage area and a 4k file configuration area; the off-chip FLASH space partition comprises a 96 k-byte service module file storage area and 4 104 k-byte application code storage areas.
The service module file is stored in the service module file storage area of the FLASH outside the chip through air transmission, if the service module file is loaded into an ELF (x, o) service logic file compiled through a dynamic loading file storage area of the FLASH inside the chip, great challenges can be brought to the resource-limited node, the storage requirements of the FLASH inside the chip and the use of a memory can be reduced by effectively cutting the ELF file, more service modules can be stored under the limited resource, and particularly great convenience is brought to the node with the limited memory.
Referring to fig. 4, fig. 4 is a schematic diagram of a service module storing an ELF file according to an embodiment of the present invention. As shown in fig. 4: in the standard ELF file, many very few segments are defined, such as program initialization segment init, program termination segment fini, debugging segment debug, etc., and the service module ELF file stored in the storage area of the on-chip FLASH dynamic loading file only retains necessary segments, including code segment, data segment, uninitialized segment, redefinition table and symbol table. The standard ELF file header has 52 bytes, reserved fields are cut, and only fields required by dynamic loading are reserved, wherein the fields comprise file types, ELF file types, platform attributes, service module version numbers, program entry addresses and file header sizes.
The storage area of the on-chip FLASH dynamic loading file can simultaneously store a plurality of service module files, and the plurality of service module files can be loaded and operated simultaneously.
Example two
Referring to fig. 5, fig. 5 is a flow chart of dynamic loading of a service module in the embodiment of the present invention. The invention also discloses a service module dynamic loading method based on the Internet of things, which comprises the following steps:
s1: the method comprises the steps of establishing a business module dynamic loading system based on the Internet of things, wherein the business module dynamic loading system comprises an Internet of things basic platform, an Internet of things gateway, an Internet of things edge repeater and an Internet of things terminal node, the Internet of things basic platform manages, issues and controls a business module, the Internet of things gateway and the Internet of things edge repeater carry out data interaction, and the Internet of things terminal node controls terminal equipment to work.
S2: and the basic platform of the Internet of things issues the service module to the terminal node of the Internet of things or the edge repeater of the Internet of things.
S21: the basic platform of the Internet of things issues a service module and service information to the gateway of the Internet of things, the service module is issued in an ELF file mode, and the service information comprises a terminal node of the Internet of things or an edge repeater of the Internet of things, which needs to execute the service module, and a calculation factor needed by the execution of the service module;
s22: and the gateway of the Internet of things sends the service module and the service information to a specified terminal node of the Internet of things or an edge repeater of the Internet of things according to the stored routing information. And if the data is transmitted to the Internet of things edge repeater, the data is transmitted to the Internet of things terminal node by the Internet of things edge repeater.
S3: and the terminal node of the Internet of things or the edge repeater of the Internet of things stores a business module.
S31: the terminal node of the Internet of things or the edge repeater of the Internet of things receives the ELF file and stores the ELF file in an off-chip FLASH service module file storage area, and stores service information corresponding to a service module;
s32, extracting necessary fields in the ELF file to generate a new service module file and storing the new service module file in an on-chip FLASH dynamic loading file storage area.
S4: and the terminal node of the Internet of things or the edge repeater of the Internet of things dynamically loads the stored service module according to the requirement, and performs logic control on the service module on the terminal equipment according to the loaded service module.
S41: when the basic platform of the Internet of things issues a service module operation command, loading a new service module file stored in the FLASH dynamic loading file storage area in the chip;
s42: analyzing the new service module file, releasing the code, data, symbol table and relocated entry positions in the file, and respectively allocating the addresses of the code and the data in the ROM and the RAM;
s43, linking and repositioning the codes and the data to corresponding positions, writing the codes into the ROM, and writing the data into the RAM, thereby realizing dynamic loading of the service module.
As shown in fig. 5, according to the basic platform of the internet of things, the service module ELF file in the storage area of the on-chip FLASH dynamic loading file is loaded to analyze, the code, data, symbol table and relocation entry position in the file are released, the addresses of the code and data in the ROM and the RAM are respectively allocated, the code and data are linked and relocated to corresponding positions, the code is written into the ROM, and the data is written into the RAM, so that the dynamic loading of the service module is realized.
The method comprises the steps of defining arrays with certain sizes in a RAM and a FLASH, defining the arrays in the FLASH by adding a const limit symbol, storing array sections and BSS sections in the RAM, storing code sections and read-only data sections in the FLASH (the FLASH erasure must be erased in a whole page), writing each section of a relocated dynamic module into the arrays according to types before loading, then finding out the name and the running address of a function, and converting the address into a function pointer to execute a module program.
V/service module memory RAM mapping address
static uint32_t datamemory[DATAMEMORY_SIZE];
static uint8_t*datamemory_aligned=(uint8_t*)datamemory;
// service module code ROM mapping address
static const uint16_t textmemory[TEXTMEMORY_SIZE]={0};
Referring to fig. 6, fig. 6 is a schematic diagram illustrating an implementation of dynamic loading in an embodiment of the present invention. As shown in fig. 6, in the main execution program of static compilation, the loader _ update () function, the address textmemory of the code segment corresponds to the storage in the on-chip flash, and the code segment assembly information of the service module text and metadata are stored in the textmemory location; the pointer address of the loader _ update () function is the same as the memory mapping address in the map file, and the data and the bss of the service module are stored in the datamemory _ aligned position and are equivalent to the entry address of the function.
The service module processes the pseudo code:
void(*loader_fun)(void);
loader _ fun = loader _ update; // get function's pointer (/ loader _ fun) (); // Business model execution
EXAMPLE III
Referring to fig. 7, fig. 7 is a schematic diagram of an architecture of a specific implementation of the dynamic loading system for the service module of the internet of things in this embodiment. As shown in fig. 7, the system of the internet of things is divided into a sensing layer, a network layer and a platform layer in the present embodiment. The sensing layer comprises sensing equipment and enabling equipment of each system and an Internet of things terminal node at the tail end of the system; the network layer comprises each Internet of things edge relay device and an Internet of things gateway, and constructs a networking transmission network, and the device data in each system realizes the transverse transmission of the device data of each system by using the Internet of things edge relay device, thereby playing the role of uploading and issuing; the platform layer is an internet of things basic platform and is used for receiving uploaded data, displaying real-time data, historical data and predicted data, controlling issuing of the business module, achieving intelligent scheduling and setting a maintenance plan and the like according to the uploaded data.
In the embodiment, taking the underground space environment monitoring system as an example, the internet of things terminal node has a calculation factor required by the fan linkage service module, can operate the fan linkage service module, and can dynamically adjust related parameters in a dynamic loading mode to achieve optimal control; the repeater at the edge of the Internet of things is provided with a calculation factor required by the underground space dehumidification service module, can operate the underground space dehumidification service module, and dynamically adjusts related parameters in a dynamic loading mode to achieve optimal control.
The invention has the following beneficial effects:
(1) According to the invention, the service modules are uniformly managed, issued and controlled through the basic platform of the Internet of things, and the service module unit is dynamically loaded, so that the automatic independent loading of each service module component is realized, the program updating of the whole system is avoided, the upgrading cost is reduced, and the problems of high upgrading cost and non-independent service function modules of the Internet of things system in the prior art are solved.
(2) The invention redesigns the composition of the ELF file, reduces the consumption of memory resources and improves the execution efficiency of local dynamic loading.
(3) The invention also provides a relevant design on the protocol exchange of multiple networks, and can adapt to various networking modes on the deployment of the networks. Meanwhile, an access scheme of a platform end is provided, and the service module can be supervised through the platform. The historical data accumulated by the operation of the platform can be used for big data analysis and artificial intelligence decision making, and a data basis is provided for subsequent expansion.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications of the invention may be made without departing from the spirit or scope of the invention.
Claims (10)
1. A business module dynamic loading system based on the Internet of things is characterized in that: comprises an internet of things basic platform, an internet of things gateway, an internet of things edge repeater and an internet of things terminal node,
the basic platform of the Internet of things manages, issues and controls a service module; the internet of things gateway and the internet of things edge repeater carry out data interaction, the internet of things gateway and the internet of things edge repeater jointly construct an internet of things wireless transmission network, and the internet of things terminal node controls terminal equipment to work;
the Internet of things base platform issues the service module to the Internet of things terminal node through the Internet of things wireless transmission network, dynamically loads the service module, and performs logic control of the service module on terminal equipment according to the loaded service module.
2. The internet of things-based business module dynamic loading system of claim 1, wherein: the storage mode of the service module supports FLASH or EEPROM, an ELF file for storing the service module comprises a code segment, a data segment, an uninitialized segment, a redefined table and a symbol table, a file header of the ELF file comprises a field required by dynamic loading, and the field required by the dynamic loading comprises a file class, an ELF file type, a platform attribute, a service module version number, a program entry address and a file header size.
3. The internet of things-based business module dynamic loading system of claim 1, wherein: when the service module is dynamically loaded, a plurality of service module files are simultaneously stored in a dynamic loading file storage area of the multi-service module dynamic loading system slice, and the plurality of service module files are simultaneously loaded and operated.
4. The internet of things-based business module dynamic loading system of claim 1, wherein: the internet of things terminal nodes and the terminal equipment form resource control systems, each resource control system comprises at least one internet of things terminal node, and the internet of things terminal nodes control at least one terminal equipment.
5. The internet of things-based business module dynamic loading system of claim 1, wherein: the Internet of things edge repeater performs data interaction with the Internet of things terminal node, and realizes service module logic control on a group of edge terminal equipment under the Internet of things terminal node according to the loaded service module;
and the terminal nodes of the Internet of things realize data interaction among different terminal devices under the system through the edge repeaters of the Internet of things.
6. The internet of things-based business module dynamic loading system according to any one of claims 1 to 5, wherein: a fault monitoring algorithm is arranged on the terminal node of the Internet of things and used for monitoring the working state of the controlled terminal equipment;
the basic platform of the Internet of things is connected with a warning device, and the warning device is used for fault warning and energy consumption early warning;
the internet of things terminal node, the internet of things edge repeater and the internet of things gateway all adopt metal shells with functions of preventing surge and electromagnetic shielding.
7. A business module dynamic loading method based on the Internet of things is characterized by comprising the following steps:
the method comprises the steps that a business module dynamic loading system based on the Internet of things is established, wherein the business module dynamic loading system comprises an Internet of things basic platform, an Internet of things gateway, an Internet of things edge repeater and an Internet of things terminal node, the Internet of things basic platform manages, issues and controls a business module, the Internet of things gateway and the Internet of things edge repeater carry out data interaction, and the Internet of things terminal node controls terminal equipment to work;
the basic platform of the internet of things issues the service module to the terminal node of the internet of things or the edge repeater of the internet of things, the terminal node of the internet of things or the edge repeater of the internet of things stores the service module, the terminal node of the internet of things or the edge repeater of the internet of things dynamically loads the stored service module according to the requirement, and the logic control of the service module is carried out on the terminal equipment according to the loaded service module.
8. The dynamic loading method for the service module based on the internet of things as claimed in claim 7, wherein: the internet of things base platform issues the service module to the internet of things terminal node or the internet of things edge repeater, and the method comprises the following steps:
the basic platform of the Internet of things issues a service module and service information to the gateway of the Internet of things, the service module is issued in an ELF file mode, and the service information comprises an Internet of things terminal node or an Internet of things edge repeater of the service module to be executed and a calculation factor required by the execution of the service module;
and the gateway of the Internet of things sends the service module and the service information to a specified terminal node of the Internet of things or an edge repeater of the Internet of things according to the stored routing information.
9. The dynamic loading method for the service module based on the internet of things as claimed in claim 8, wherein: the internet of things terminal node or internet of things edge repeater storage service module comprises:
the terminal node of the Internet of things or the edge repeater of the Internet of things receives the ELF file and stores the ELF file in an off-chip FLASH service module file storage area, and stores service information corresponding to a service module;
and extracting necessary fields in the ELF file to generate a new service module file and storing the new service module file in an on-chip FLASH dynamic loading file storage area.
10. The dynamic loading method of business modules based on the internet of things of claim 9, wherein: the internet of things terminal node or internet of things edge repeater dynamically loads the stored service module according to the requirement, and the method comprises the following steps:
when the basic platform of the Internet of things issues a service module operation command, loading a new service module file stored in the FLASH dynamic loading file storage area in the chip;
analyzing the new service module file, releasing the code, data, symbol table and relocated entry positions in the file, and respectively allocating the addresses of the code and the data in the ROM and the RAM;
and linking and repositioning the codes and the data to corresponding positions, writing the codes into the ROM, and writing the data into the RAM to realize dynamic loading of the service module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211504350.2A CN115756651A (en) | 2022-11-28 | 2022-11-28 | Business module dynamic loading system and method based on Internet of things |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211504350.2A CN115756651A (en) | 2022-11-28 | 2022-11-28 | Business module dynamic loading system and method based on Internet of things |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115756651A true CN115756651A (en) | 2023-03-07 |
Family
ID=85339588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211504350.2A Pending CN115756651A (en) | 2022-11-28 | 2022-11-28 | Business module dynamic loading system and method based on Internet of things |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115756651A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024221475A1 (en) * | 2023-04-28 | 2024-10-31 | Zte Corporation | Method, device and computer program product for wireless communication |
-
2022
- 2022-11-28 CN CN202211504350.2A patent/CN115756651A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024221475A1 (en) * | 2023-04-28 | 2024-10-31 | Zte Corporation | Method, device and computer program product for wireless communication |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6405103B1 (en) | Building control system | |
CN102403034B (en) | DSP controls single-board device and remote upgrade method thereof and server | |
Marrón et al. | FlexCup: A flexible and efficient code update mechanism for sensor networks | |
CN106707848B (en) | A kind of the control program construction and method for down loading of control system | |
CN105318497A (en) | Updating method and device for operating parameters of air conditioning unit | |
CN103019779B (en) | A kind of method for updating program of FPGA/DSP embedded system | |
CN112929236B (en) | Broadband micropower wireless protocol interoperability test system for electricity consumption information acquisition system | |
CN107977217A (en) | The method of on-line loaded XILINX-FPGA multi versions more new procedures | |
CN108259231A (en) | Method for upgrading software, gateway, server and the system of smart machine | |
CN101814036A (en) | RF remote upgrading method and system | |
CN105487909B (en) | A method of reducing power equipment firmware upgrade amount | |
CN101606129A (en) | The equipment of the control system that is used to network | |
CN115756651A (en) | Business module dynamic loading system and method based on Internet of things | |
CN107402776A (en) | Bluetooth 4-based method for wirelessly upgrading stm32 singlechip controller firmware of mobile phone | |
CN109683941A (en) | A kind of answering machine method for upgrading software based on single-chip on-line loaded | |
CN101681266B (en) | Compiler and compiling method for a networked control system comprising a plurality of devices | |
CN105306544A (en) | Remote updating method | |
CN106998260A (en) | A kind of FPGA device upgrade method and system based on ethernet link | |
CN108933771A (en) | A kind of communications office site's device protocol analytic method of module level upgrading mode | |
CN104077159A (en) | Small cell system parameter attribute configuration method and device | |
CN112333278A (en) | Intelligent equipment upgrading method and system and intelligent equipment | |
CN109526017B (en) | Distributed small base station upgrading method and system | |
CN104407903B (en) | A kind of QSFP optical module remote upgrade methods based on Bootloader | |
CN112678396A (en) | Logistics goods monitoring terminal system and method based on NB-IoT | |
CN101515167A (en) | Method for realizing IEC61499 flexible function block by using IEC61131-3 function block |
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 |