Internet of things terminal application development method and platform

By encapsulating the interface functions for IoT terminal application development, the problems of long development time and low efficiency of power IoT terminal APP are solved, and efficient business terminal application development is achieved.

CN120848843APending Publication Date: 2025-10-28XUCHANG XJ SOFTWARE TECHNOLOGIES LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410506775.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

The development of power IoT terminal apps is time-consuming and inefficient, making it impossible to support the development and implementation of applications on a large scale with different business terminals.

Method used

The interface functions for processing business required for IoT terminal application development are encapsulated in the business configuration. By parsing the business configuration, the relevant interface functions are automatically called to perform business processing, and the processes of communication services, topic adaptation, message processing and reply services are unified.

Benefits of technology

It improved development efficiency, reduced the error rate, and enhanced the security and stability of the development platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848843A_ABST
    Figure CN120848843A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electric power Internet of Things, and particularly relates to an Internet of Things terminal application development method and platform. The Internet of Things terminal application development method comprises the following steps that a configuration file is analyzed, service configuration is loaded, the service configuration comprises application module configuration and subscription message configuration, and the application module configuration comprises a service dynamic link library packaged with a service processing function; the subscription message configuration comprises a subscription message receiving / replying theme and a subscription message processing / replying function; the subscribing module is connected with the internet-of-things server and subscribes to themes which can be processed by Receiving a message sent by the Internet of Things server, performing theme adaptation through a processing function of the subscription message, and calling a corresponding service processing function to process the message according to an adaptation result; and after the message is processed, sending the processed message which needs to be replied by subscribing the reply function of the message. And when APP development of different service terminals is carried out, the working efficiency of development is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power Internet of Things (IoT) technology, specifically relating to a method and platform for developing IoT terminal applications. Background Technology

[0002] The Internet of Things (IoT) technology for power systems can connect people, machines, and things in all aspects of energy production and consumption in real time online. It comprehensively supports and integrates power grid transmission, substation, distribution, enterprise operation and management, and external customer service, achieving a comprehensive improvement in the construction, management, and service levels of the power grid. Therefore, the functionalization of power IoT terminals into mobile apps has become a development trend for terminals under the power IoT framework. The MQTT bus, with its advantages of lightweight, high efficiency, scalability, and security, has become the standard for IoT data transmission. Through its publish / subscribe mechanism, the MQTT bus enables message exchange between power IoT terminal apps.

[0003] Power IoT terminals are used in substations, distribution systems, and power consumption. Developers need to develop various apps, including basic and business applications, based on the functions of different business terminals. The development of these apps all involve the MQTT bus. When developing apps for different business terminals, developers need to define and write various communication and processing standards themselves to connect to MQTT, subscribe to messages, match messages, process messages, respond to messages, and actively publish messages. This results in long development times and low efficiency, making it impossible to support the development and implementation of large-scale applications across different business terminals. Summary of the Invention

[0004] The purpose of this invention is to provide a method and platform for developing IoT terminal applications, in order to solve the problems of long development time and low efficiency when developing IoT terminal applications for different services.

[0005] To solve the above-mentioned technical problems, this invention provides a method for developing IoT terminal applications, comprising the following steps:

[0006] Parse the configuration file and load the business configuration, which includes application module configuration and subscription message configuration. The application module configuration includes a business dynamic link library that encapsulates business processing functions, and the subscription message configuration includes subscription message receiving / reply topics and subscription message processing / reply functions.

[0007] Connect to the IoT server and subscribe to topics that the application module can handle;

[0008] The system retrieves relevant messages from the IoT server using the subscribed topics, performs topic adaptation through the message processing function, and calls the corresponding business processing function to process the messages based on the adaptation results. After message processing, the system sends the messages that need to be replied to through the message reply function.

[0009] Furthermore, the service configuration also includes periodic message configuration, which includes periodic message topics and periodic message processing functions. The periodic message processing functions are used to directly process the received periodic messages.

[0010] Furthermore, the periodic message processing function is also used to determine whether there are periodic messages that need to be actively sent. If so, it is actively published.

[0011] Furthermore, the service configuration also includes a periodic mutation notification message topic and a periodic mutation notification message function. The periodic mutation notification message function is used to send a periodic mutation notification message topic when the period of a certain periodic message suddenly changes.

[0012] Furthermore, the subscription message configuration and periodic message configuration also include a message quality function to indicate whether a message is valid.

[0013] Furthermore, the subscription message configuration and periodic message configuration also include initialization functions for initializing data attributes.

[0014] Furthermore, the application module configuration also includes the total number of threads.

[0015] Furthermore, the IoT server adopts the MQTT protocol.

[0016] Furthermore, the system monitors the communication status with the IoT server, and if a connection failure is detected, a reconnection operation is performed.

[0017] The beneficial effects of the above technical solution are as follows: This invention is an improved invention that encapsulates the interface functions for processing business required during IoT terminal application development in the business configuration. During development, the IoT terminal application development platform only needs to parse the content in the business configuration to automatically call the relevant interface functions for business processing. Furthermore, the processes of communication services, topic adaptation, message processing, and reply services are fixed and unified, so that developers do not need to customize and write multiple communication and processing standards when developing APPs for different business terminals, thus improving development efficiency.

[0018] To address the aforementioned technical problems, this invention also provides an IoT terminal application development platform, which utilizes the aforementioned IoT terminal application development method to develop IoT terminal applications.

[0019] The beneficial effects of the above technical solution are as follows: This invention is an improved invention that encapsulates the interface functions for processing business required during IoT terminal application development in the business configuration. During development, the IoT terminal application development platform only needs to parse the content in the business configuration to automatically call the relevant interface functions for business processing. Furthermore, the processes of communication services, topic adaptation, message processing, and reply services are fixed and unified, so that developers do not need to customize and write multiple communication and processing standards when developing APPs for different business terminals, thus improving development efficiency. Attached Figure Description

[0020] Figure 1 This is a flowchart of the configuration file parsing process in an embodiment of the IoT terminal application development method of the present invention;

[0021] Figure 2 This is a flowchart of real-time message processing in an embodiment of the IoT terminal application development method of the present invention;

[0022] Figure 3 This is a flowchart of the processing cycle message in an embodiment of the IoT terminal application development method of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0024] This invention encapsulates the interface functions (such as business processing functions, subscription message processing / reply functions, periodic message processing functions, etc.) required for IoT terminal application development into the business configuration. During development, the IoT terminal application development platform only needs to parse the content in the business configuration to automatically call the relevant interface functions for business processing. Furthermore, the processes of communication services, topic adaptation, message processing, and reply services are fixed and unified, so that developers do not need to customize and write multiple processing interfaces when developing apps for different business terminals, thus improving development efficiency.

[0025] Example of IoT terminal application development method

[0026] This embodiment provides a method for developing IoT terminal applications, which will be described in detail below.

[0027] 1. Developers parse the configuration file to obtain the business configuration. The specific process is as follows: Figure 1 As shown.

[0028] 1) Based on the user business modules of the IoT terminal application to be developed, obtain the configuration file, and the IoT terminal application development platform loads the business configuration according to the configuration file.

[0029] Business configuration includes application module configuration and theme configuration. Application module configuration includes: business name, business dynamic link library, initialization function, and total number of threads. The business dynamic link library includes encapsulated business processing functions that handle specific business operations. Specifically, all business processing functions related to the business are encapsulated and compiled into a single library. During message processing, the IoT terminal application development platform can automatically call the corresponding business processing function in the business dynamic link library directory to parse and process the business based on the message theme adaptation result. The IoT terminal application development platform starts multiple threads to execute tasks simultaneously based on the total number of threads, further improving development efficiency.

[0030] The topic configuration includes periodic message configuration and subscription message configuration. Periodic message configuration includes the periodic message topic, periodic message processing function, message processing period, and message processing time point. Subscription message configuration includes the subscription message receiving / reply topic, subscription message processing / reply function, periodic mutation notification message topic, periodic mutation notification message function, and authentication interface. Both message configurations contain a message quality function and an initialization function. The message quality function indicates the quality of the transmitted data, i.e., whether the message is valid, and can use 0 or 1 to represent validity, such as 1 for valid data and 0 for invalid data. The initialization function initializes data attributes. The periodic mutation notification message function is used to send a periodic mutation notification message topic when the period of a certain periodic message suddenly changes, thereby enabling the IoT terminal application development platform to promptly learn of changes in user services.

[0031] 2) After successful loading, the application module configuration is parsed. After successful parsing, the business dynamic link library in the directory is loaded. Then, the business is parsed according to the corresponding business processing function in the business dynamic link library. After successful parsing, the parsed content is stored in memory. Based on the key value, the parsed content is saved into the business processing structure used to store the business by traversing the memory.

[0032] The parsing methods include automatic parsing or manual triggering. User business modules include basic applications and business applications, such as AC / DC sampling, input / output, application management, and data management.

[0033] 2. After the configuration file is parsed, the IoT terminal application development platform connects to the IoT server through the communication configuration to provide communication services and initializes the communication services. In this embodiment, the IoT server is an MQTT server using the MQTT protocol, and the communication configuration is MQTT configuration.

[0034] 3. The IoT terminal application development platform subscribes to messages and processes them over a period of time, and processes and replies to messages according to message type.

[0035] After the communication service is initialized, the IoT terminal application development platform executes the initialization function of the application module. After the application module is initialized, the IoT terminal application development platform subscribes to messages and processes periodic services. Based on the periodic message topic and the subscribed message receiving / reply topic, it subscribes to the topics that the application module can process from the MQTT server, and caches the messages received from the MQTT server into the queue through the caching mechanism.

[0036] The messages are divided into two types: one is messages sent in real time by business users, which are processed according to their subject, and the processing flow is as follows: Figure 2 As shown, the message subscription processing function adapts the topic in the received message message to the topic in the business processing structure. After adaptation, the IoT terminal application development platform calls the corresponding business processing function in the business dynamic link library directory to process the real-time message. After message processing, the message reply function sends the message that needs to be replied to after processing through the message subscription reply function. Another type is periodic messages, which refer to messages obtained by the terminal periodically, such as messages obtained during periodic data collection or periodic monitoring of device status. Periodic messages do not require topic adaptation, and the processing flow is as follows... Figure 3 As shown, the IoT terminal application development platform directly executes the periodic message processing function to process periodic messages, and then checks whether there are any periodic messages that need to be actively sent. If they need to be sent, it triggers the active sending mechanism to actively publish the message.

[0037] The IoT terminal application development platform monitors the communication status between the IoT terminal application development platform and the MQTT server. If it finds that the IoT terminal application development platform fails to connect to the MQTT server, it will reconnect.

[0038] IoT Terminal Application Development Platform Implementation Examples

[0039] The present invention provides an IoT terminal application development platform, which utilizes an IoT terminal application development method to develop IoT terminal applications. The specific implementation process of the method has been described in detail in the embodiments of the IoT terminal application development method, and will not be repeated here.

[0040] This invention encapsulates the interface functions required for IoT terminal application development within the business configuration. During development, the IoT terminal application development platform only needs to parse the content in the business configuration to automatically call the relevant interface functions for business processing. Furthermore, it standardizes and unifies the processes of MQTT communication service, topic adaptation, proactive uploading, message processing, and reply service, significantly improving development efficiency. Developers only need to focus on function implementation in subsequent business development, reducing the error rate during development and further improving the security, fault tolerance, and stability of the development platform.

Claims

1. A method for developing IoT terminal applications, characterized in that, Includes the following steps: Parse the configuration file and load the business configuration, which includes application module configuration and subscription message configuration. The application module configuration includes a business dynamic link library that encapsulates business processing functions, and the subscription message configuration includes subscription message receiving / reply topics and subscription message processing / reply functions. Connect to the IoT server and subscribe to topics that the application module can handle; The system retrieves relevant messages from the IoT server using the subscribed topics, performs topic adaptation through the message processing function, and calls the corresponding business processing function to process the messages based on the adaptation results. After message processing, the system sends the messages that need to be replied to through the message reply function.

2. The IoT terminal application development method according to claim 1, characterized in that, The service configuration also includes periodic message configuration, which includes periodic message topics and periodic message processing functions. The periodic message processing functions are used to directly process the received periodic messages.

3. The IoT terminal application development method according to claim 2, characterized in that, The periodic message processing function is also used to determine whether there are periodic messages that need to be actively sent. If so, it will actively publish the message.

4. The IoT terminal application development method according to claim 2 or 3, characterized in that, The service configuration also includes a periodic mutation notification message topic and a periodic mutation notification message function. The periodic mutation notification message function is used to send a periodic mutation notification message topic when the period of a certain periodic message suddenly changes.

5. The IoT terminal application development method according to claim 2 or 3, characterized in that, The subscription message configuration and periodic message configuration also include a message quality function, which is used to indicate whether a message is valid.

6. The IoT terminal application development method according to claim 2 or 3, characterized in that, The subscription message configuration and periodic message configuration also include initialization functions for initializing data attributes.

7. The IoT terminal application development method according to claim 1, characterized in that, The application module configuration also includes the total number of threads.

8. The IoT terminal application development method according to claim 1, characterized in that, The IoT server uses the MQTT protocol.

9. The IoT terminal application development method according to claim 1 or 8, characterized in that, Monitor the communication status with the IoT server, and if a connection failure is detected, perform a reconnection operation.

10. An IoT terminal application development platform, characterized in that, The IoT terminal application is developed using the IoT terminal application development method according to any one of claims 1-9.