Internet of Things (IoT) data acquisition methods, devices, storage media, and electronic devices
By using a microservice architecture and a four-tuple data processing method, the problems of low resource utilization and poor scalability in data collection of IoT devices are solved, achieving efficient data collection and improved stability, and supporting the rapid access of new protocols and applications.
Patent Information
- Application Number
- CN202511495612.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-10-20
AI Technical Summary
In existing IoT data acquisition methods, each IoT device requires an independent and complete data acquisition link, resulting in low resource utilization, poor scalability, and tight coupling between device protocol adaptation and data processing modules, making it difficult to maintain and upgrade independently, thus affecting data processing efficiency.
By adopting a microservice architecture, a batch collection strategy is generated by setting a device collection strategy for each IoT device, and a data read request is constructed using a four-tuple. The grouped IoT data is parsed and preprocessed, and then encapsulated and sent to the application system, thereby achieving resource sharing and reducing redundant communication.
It improves resource utilization efficiency, reduces communication resource overhead, enhances system scalability and stability, supports rapid access to new protocols and applications, and simplifies configuration management and independent upgrades of functional modules.
Smart Images

Figure CN120956771B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to an IoT data acquisition method, apparatus, storage medium, and electronic device. Background Technology
[0002] With the continuous development and evolution of IoT technology, its applications are becoming increasingly widespread, encompassing smart homes, smart appliances, smart cities, smart healthcare, industrial IoT, and agricultural IoT. For example, in the smart city sector, IoT technology is used to intelligently transform urban infrastructure, including but not limited to real-time traffic flow monitoring. Based on this monitoring, traffic light timings are automatically adjusted to optimize traffic flow, reduce congestion, and thus improve urban operational efficiency and residents' quality of life. As another example, in the industrial IoT sector, sensors monitor the real-time operating status and processes of production equipment, enabling timely detection and handling of faults, reducing equipment downtime. Furthermore, by monitoring equipment energy consumption, equipment operation can be optimized, improving production efficiency and product quality.
[0003] In the aforementioned IoT application scenarios, massive amounts of data need to be collected. IoT devices, such as various sensors (temperature and humidity sensors), actuators (pressure transmitters, PLC controllers), and smart devices (smart meters, cameras, access control devices), provide raw physical quantity measurements or status information, which are then connected to the IoT application system, such as a host computer, via wired or wireless (Ethernet, WiFi, 4G) methods. Before connecting to the IoT application system, a standardized data communication channel needs to be established between the IoT device and the host computer according to the communication protocol supported by the IoT device to achieve reliable data exchange. Then, the IoT device acquires data packets according to a preset collection strategy. The process begins with raw IoT data, including physical quantity measurements, status information, and alarm data. Next, data processing is performed, involving parsing, converting, verifying, and standardizing the collected IoT data to generate structured data that meets business requirements. For example, hexadecimal raw data is converted to floating-point numbers for parsing, and structured data in standard JSON format is generated for data format unification. Following this, structured data is distributed, where the processed structured data is encapsulated using the corresponding transmission protocol and pushed to the IoT application system (host computer) via a data communication channel, such as the target application system, database, or cloud platform. Finally, the host computer stores and applies the received data, for example, storing it in a time-series database or relational database.
[0004] However, the aforementioned IoT data acquisition methods suffer from low resource utilization because each IoT device requires an independent and complete data acquisition link to parse, transform, verify, and standardize the acquired IoT data (raw data). Each IoT device needs to be configured with corresponding resources for preprocessing. Furthermore, adding new protocols or data transmission methods requires modifications to the overall system architecture, such as corresponding changes to IoT devices and host computers, resulting in poor scalability. Moreover, the protocol adaptation, data processing, and data distribution modules of IoT devices are tightly coupled, forming a tightly coupled architecture that is difficult to maintain and upgrade independently. An anomaly in one link can affect the entire data acquisition process, leading to data processing anomalies and low data processing efficiency. Summary of the Invention
[0005] In view of this, the present invention provides an Internet of Things (IoT) data acquisition method, apparatus, storage medium, and electronic device.
[0006] Specifically, the present invention is achieved through the following technical solution:
[0007] According to a first aspect of the present invention, an Internet of Things (IoT) data acquisition method is provided, the IoT data acquisition method comprising:
[0008] Based on the IoT device group configured for the target data acquisition task, a corresponding device acquisition strategy is set for each IoT device in the IoT device group, and the device docking process between each IoT device is configured to establish a data communication channel with the IoT devices.
[0009] From the various device acquisition strategies, extract the device acquisition strategies with the same device docking process and consistent acquisition period, generate a batch acquisition strategy, and send it to the corresponding IoT device through the data communication channel of the device docking process. The IoT device is then scheduled to collect IoT data according to the corresponding device acquisition strategy in the batch acquisition strategy.
[0010] Based on the pre-set quadruple, construct an IoT data read request based on the IoT device, and read the corresponding group of IoT data from the IoT data collected by the IoT device.
[0011] The grouped IoT data is parsed and preprocessed. Based on the output object, output parameters and output address in the device acquisition strategy, the preprocessed grouped IoT data is encapsulated to obtain the IoT data group to be uploaded.
[0012] The IoT data set to be uploaded is sent to the application system corresponding to the output address using a data communication channel built based on the output object.
[0013] The IoT data acquisition method in this technical solution establishes a data communication channel with each IoT device by configuring a group of IoT devices for the target acquisition task, setting a corresponding device acquisition strategy for each IoT device, and configuring a device docking process between each IoT device. From the acquisition strategies of each device, device acquisition strategies with the same docking process and consistent acquisition period are extracted to generate a batch acquisition strategy, which is sent to the corresponding IoT device through the data communication channel of the docking process. The IoT device is then scheduled to acquire IoT data according to the corresponding device acquisition strategy in the batch acquisition strategy. An IoT data read request based on a pre-set four-tuple is constructed, and the corresponding grouped IoT data is read from the IoT data acquired by the IoT device. The grouped IoT data is parsed and preprocessed. Based on the output object, output parameters, and output address in the device acquisition strategy, the preprocessed grouped IoT data is encapsulated to obtain the IoT data group to be uploaded. The IoT data group to be uploaded is then sent to the application system corresponding to the output address using the data communication channel constructed based on the output object. In this way, by reading data from IoT devices and preprocessing the data based on the quadruple, each IoT device can share resources for data reading and preprocessing, effectively improving resource utilization efficiency. At the same time, by processing the acquisition strategies of each device to form a batch acquisition strategy, and by grouping the acquired data into multiple levels, the number of communication times is effectively reduced, redundant communication is reduced, communication resource overhead is reduced, and data transmission efficiency is improved.
[0014] According to a second aspect of the present invention, an Internet of Things (IoT) data acquisition device is provided, the IoT data acquisition device comprising:
[0015] The data acquisition strategy configuration module is used to set a corresponding data acquisition strategy for each IoT device in the IoT device group based on the IoT device group configured for the target data acquisition task, and to configure the device docking process with each IoT device to establish a data communication channel with the IoT devices.
[0016] The data acquisition and scheduling module is used to extract device acquisition strategies with the same device docking process and consistent acquisition period from the acquisition strategies of each device, generate a batch acquisition strategy, and send it to the corresponding IoT device through the data communication channel of the device docking process. The IoT device is then scheduled to perform IoT data acquisition according to the corresponding device acquisition strategy in the batch acquisition strategy.
[0017] The data acquisition and reading module is used to construct an IoT data reading request based on a pre-set four-tuple, and read the grouped IoT data corresponding to the IoT data reading request from the IoT data collected by the IoT device.
[0018] The data acquisition and distribution module is used to parse and preprocess the grouped IoT data. Based on the output object, output parameters and output address in the device acquisition strategy, the preprocessed grouped IoT data is encapsulated to obtain the IoT data group to be uploaded.
[0019] The data acquisition and upload module is used to send the IoT data group to be uploaded to the application system corresponding to the output address through a data communication channel built based on the output object.
[0020] According to a third aspect of the present invention, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the Internet of Things data acquisition method in any possible implementation of the first aspect.
[0021] According to a fourth aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the Internet of Things data acquisition method in any possible implementation of the first aspect. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating an Internet of Things (IoT) data acquisition method provided in an embodiment of the present invention.
[0025] Figure 2 This is a schematic diagram of an Internet of Things (IoT) data acquisition device provided in an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of an Internet of Things (IoT) data acquisition system provided in an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] With the rapid development of IoT technology, application scenarios such as Industry 4.0, smart buildings, and smart cities have placed higher demands on the data collection and processing of IoT devices. At the same time, IoT data collection systems built on IoT technology are connected to a large number of heterogeneous IoT devices, including but not limited to: industrial equipment and various sensors that support Modbus and Profibus protocols, building automation equipment and actuators that support BACnet and LonWorks protocols, and smart devices that support Message Queuing Telemetry Transport (MQTT) and CoAP protocols. In related technologies, data acquisition systems typically adopt a monolithic architecture, consisting of a host computer (IoT application system) and multiple IoT devices. Each IoT device integrates functions such as protocol parsing, data processing, and data distribution, requiring corresponding resources for processing, which reduces resource utilization efficiency. Furthermore, as the number and types of IoT devices connected to the data acquisition system increase, corresponding modifications to the system architecture are necessary. For example, adding a new IoT device protocol requires modifying the core system code, and adding a new data upload method requires recompiling and redeploying the system. Consequently, the data acquisition system cannot dynamically adapt to changes in business needs, resulting in poor scalability, difficult maintenance, and low resource utilization for monolithic architecture-based data acquisition systems.
[0030] Microservices are independent; each microservice can be deployed and execute subtasks independently. The microservices are loosely coupled. In this embodiment, the data collection service is split into multiple microservices, which are deployed independently. Therefore, the microservice architecture based on microservices is applied to IoT data collection.
[0031] This embodiment provides a modular IoT data acquisition method based on a microservice architecture to reduce the coupling between functional modules of various IoT devices in IoT data acquisition, thereby improving stability. It can support the rapid access of new protocols and applications, improving scalability. At the same time, it enables resource sharing and reuse of various functional modules, which can effectively improve resource utilization. Moreover, by providing a unified IoT device-data point configuration method, configuration management can be simplified. In addition, it supports independent upgrades and maintenance of functional modules, which can enhance service replaceability.
[0032] See Figure 1 This invention provides an Internet of Things (IoT) data acquisition method, which may include the following steps:
[0033] S101. Based on the IoT device group configured for the target data acquisition task, set a corresponding device acquisition strategy for each IoT device in the IoT device group, and configure the device docking process with each IoT device to establish a data communication channel with the IoT devices.
[0034] In this embodiment, a data acquisition system is constructed based on the target acquisition task. As an optional embodiment, the data acquisition system includes: IoT devices that need to acquire various types of IoT data, a host computer (application system), and a server that configures the device acquisition strategies for each IoT device and processes the IoT data acquired by each IoT device. The server configures a corresponding device acquisition strategy for each IoT device according to the target acquisition task. As an optional embodiment, the server includes, but is not limited to, an acquisition engine process.
[0035] In this embodiment, as an optional implementation, the device acquisition strategy includes, but is not limited to: target acquisition task identifier (referred to as product ID), IoT device identifier, sampling attribute identifier, acquisition period, starting address, address offset, data type, input parameters, output object, output address, and output parameters. Specifically, the target acquisition task identifier identifies the target acquisition task; the IoT device identifier identifies the IoT device performing IoT data acquisition; the sampling attribute identifier identifies the data points deployed on the IoT device; the acquisition period sets the time interval (sampling frequency) for IoT data acquisition, for example, sampling once every 15 seconds; the starting address represents the address corresponding to the first data point on the IoT device; the address offset represents the number of data points between the first and last data points on the IoT device, for example, the address offset is 0 for the first data point and 1 for the second data point; and the data type represents the IoT device... The data type obtained from the sampling of data points on the IoT device is categorized as follows: floating-point data, integer data, etc.; input parameters characterize the sampling signal type or function of the data points on the IoT device, such as voltage, current, temperature, humidity, power, etc.; output objects characterize the communication (transmission) protocol used when communicating with IoT devices and IoT application systems, such as Modbus, Profibus, BACnet, LonWorks, MQTT, CoAP, etc.; output address is the address of the IoT application system to which the server uploads data; output parameters characterize the data type received by the IoT application system corresponding to the output address.
[0036] In this embodiment, to facilitate a more intuitive and convenient setup of the device acquisition strategy, as another optional embodiment, the device acquisition strategy may further include: target acquisition task name (abbreviated as product name, corresponding to the target acquisition task identifier), IoT device name (corresponding to the IoT device identifier), activation, sampling attribute name (corresponding to the sampling attribute identifier), input object, writable, persistent, and data transformation. Specifically, activation indicates whether IoT data acquisition is performed; the input object is used to represent the data point on the IoT device in string format, for example, (1, 001) represents the first data point on the first IoT device; the input parameter indicates the sampling signal type of the data point on the IoT device; writable indicates whether IoT data is written locally; persistent indicates whether IoT data is persistently stored; and data transformation indicates whether the IoT data is truncated to a fractional degree.
[0037] In this embodiment, as an optional implementation, a corresponding device acquisition strategy is set for each IoT device in the IoT device group, including:
[0038] Based on the pre-set data point configuration file, the target acquisition task identifier, sampling attribute identifier, and IoT device identifier are set in the device acquisition strategy. The data point configuration file contains the mapping relationship between the target acquisition task sampling attribute identifier and the IoT device identifier.
[0039] In this embodiment, as an optional implementation, the data point configuration file includes, but is not limited to, an Excel spreadsheet configuration file. This allows for automatic configuration of the device acquisition strategy by loading the Excel spreadsheet configuration file, supporting hot updates of the configuration file without requiring a restart. As another optional implementation, other parameters of the device acquisition strategy can also be set in the Excel spreadsheet configuration file, thereby generating a device acquisition strategy corresponding to each IoT device based on the Excel spreadsheet configuration file.
[0040] In this embodiment, a data point is an IoT data acquisition or control object with a unique address and a clearly defined data type, connected through an access protocol in the IoT system, such as the Modbus protocol or the BACnet protocol. For example, it may include the following information:
[0041] IoT device name: Temperature and humidity sensor 001;
[0042] Access protocol: Modbus TCP protocol;
[0043] IoT device address: 192.168.1.100:502 / Slave ID:1 / Register 40001;
[0044] Data type: Float32;
[0045] Function: Reading temperature sensor values.
[0046] In this embodiment, as an optional implementation, the acquisition engine process is used to configure the device acquisition strategy and perform subsequent scheduling and IoT data preprocessing.
[0047] In this embodiment, as an optional embodiment, the device interoperability process with each IoT device is configured, including:
[0048] If the IoT device is a sensor, configure a Modbus interface process to communicate with the sensor based on the Modbus TCP / RTU protocol;
[0049] If the IoT device is an actuator, configure a BACnet interface process to communicate with the actuator based on the BACnet IP / MS-TP protocol;
[0050] If the IoT device is a smart device, configure an MQTT interface process to communicate with the smart device based on the MQTT protocol.
[0051] In this embodiment, sensors include, but are not limited to, temperature and humidity sensors; actuators include, but are not limited to, pressure transmitters and PLC controllers; and smart devices include, but are not limited to, smart meters, cameras, and access control devices. As an optional embodiment, other protocol integration processes can also be configured to support communication between other industrial protocols such as OPC-UA and DNP3 and other IoT devices. In this way, by classifying and deploying corresponding integration processes according to the communication protocol type of the IoT devices, with each communication protocol type corresponding to one integration process (instance), and all IoT devices sharing the integration process, there is no need to configure a data communication channel for each IoT device, effectively improving resource utilization efficiency.
[0052] S102. Extract the device acquisition strategies with the same device docking process and the same acquisition period from the acquisition strategies of each device, generate a batch acquisition strategy, and send it to the corresponding IoT device through the data communication channel of the device docking process. Schedule the IoT device to collect IoT data according to the corresponding device acquisition strategy in the batch acquisition strategy.
[0053] In this embodiment, the output objects in the device acquisition strategy are statistically analyzed to achieve initial grouping of the device acquisition strategies. For each initial group, device acquisition strategies with consistent acquisition periods are extracted, and the generated batch acquisition strategy containing multiple device acquisition strategies is sent to the IoT devices corresponding to the IoT device identifiers in the batch acquisition strategy. As an optional embodiment, the batch acquisition strategy is sent via broadcast.
[0054] In this embodiment, since each IoT device shares the resources of the acquisition engine process, in order to achieve orderly processing of the IoT data collected by each IoT device, the acquisition engine process forms a periodic task schedule based on a batch acquisition strategy to activate data points with different acquisition cycles for IoT data acquisition. As an optional embodiment, scheduling IoT devices to collect IoT data according to the corresponding device acquisition strategy in the batch acquisition strategy includes:
[0055] A111, Set the global run sequence number counter to generate run sequence numbers;
[0056] In this embodiment, as an optional implementation, the global running sequence counter is set to increment by 1 per second, and this embodiment does not limit this.
[0057] A112, perform a modulo operation on the running sequence number and the acquisition period in the batch acquisition strategy to obtain the activation time slice corresponding to the batch acquisition strategy;
[0058] A113 uses a time-slice polling method. When the activation time slice is reached, the batch acquisition strategy corresponding to the activation time slice is activated so that each IoT device corresponding to the batch acquisition strategy can collect IoT data.
[0059] In this embodiment, batch collection of data points with the same protocol and acquisition period can effectively reduce the number of network communications and improve collection efficiency.
[0060] S103. Construct an IoT data reading request based on the pre-set quadruple, and read the grouped IoT data corresponding to the IoT data reading request from the IoT data collected by the IoT device.
[0061] In this embodiment, as an optional embodiment, an IoT data read request based on an IoT device is constructed according to a pre-set four-tuple. The grouped IoT data corresponding to the IoT data read request is read from the IoT data collected by the IoT device, including:
[0062] A121, Scan the data point configuration table in the active state, extract the data points in the current acquisition period. The data point configuration table is obtained based on the acquisition period in each batch acquisition strategy. The data point configuration table in the active state consists of the data points in the current acquisition period within the device acquisition strategy.
[0063] A122, based on a pre-set quadruple, for each IoT device, the extracted data points within the current acquisition period are grouped and aggregated to obtain multiple data point aggregation groups corresponding to the IoT device;
[0064] In this embodiment, as an optional implementation, the quadruple includes, but is not limited to, the input object, input parameter, starting address, and data type. For example, data points with the same input object, input parameter, and data type can be aggregated into a group; that is, in an IoT device, data points that collect the same type of data can be grouped into a data point aggregation group.
[0065] A123, for each data point aggregation group, calculate the minimum and maximum address offset within the data point aggregation group to form a continuous address range, and generate an IoT data reading request based on the continuous address range of the data point aggregation group;
[0066] A124 generates a batch IoT data read request based on multiple IoT data read requests from the same IoT device, in order to obtain IoT data in a continuous address range corresponding to each IoT data read request, and thus obtain the grouped IoT data corresponding to the IoT data read request.
[0067] In this embodiment, generating batch IoT data read requests can save communication resources. Furthermore, reading IoT data collected from multiple data points of the same data type at once effectively reduces the number of communications. Based on a pre-set quadruple, the IoT data sampled from each data point within the current acquisition period of the IoT device is grouped and aggregated. As an optional embodiment, the batch IoT data read request includes multiple individual IoT data read requests. Each individual IoT data read request corresponds to a continuous address range covered by a data point aggregation group. Therefore, by sending a single read request, IoT data sampled from the data points corresponding to the continuous address range can be obtained, effectively reducing communication overhead.
[0068] In this embodiment, data points with consistent input objects, input parameters, and data types are aggregated into a group of IoT data within an acquisition period. For example, IoT data collected from multiple data points of the same type of signal by the same IoT device are aggregated in units of acquisition period. For instance, if an IoT device has 100 data points, of which 40 data points starting at address 0001 are used to collect voltage signals, up to address 0040, and 60 data points starting at address 0041 are used to collect current signals, up to address 0100, then within one acquisition period, the voltage signal data collected from the 40 data points is aggregated to obtain the voltage signal group data of the IoT device in that acquisition period, and the current signal data collected from the 60 data points is aggregated to obtain the current signal group data of the IoT device in that acquisition period.
[0069] In this embodiment, as an optional implementation, generating an IoT data read request based on the continuous address range of the data point aggregation group includes:
[0070] A131, construct a standardized request packet containing the target acquisition task identifier, input parameters, IoT device name, continuous address range, data type, and number of retries, the standardized request packet being used for a single read request;
[0071] A132 uses JSON format to encapsulate standardized request packets to obtain IoT data read requests.
[0072] In this embodiment, an IoT data read request is sent to a data point on the IoT device corresponding to the IoT device name to obtain the corresponding IoT data. Each data point corresponds to an address within a continuous address range. The retry count is the number of times the device can retry after failing to obtain the corresponding IoT data.
[0073] In this embodiment, the standardized request packet is encapsulated in JSON format, which can effectively ensure the data integrity of cross-process communication.
[0074] In this embodiment, as an optional implementation, a mapping table between standardized request packets and batch collection strategies can also be established to support accurate parsing of response data.
[0075] In this embodiment, an inter-process communication mechanism is established between the IoT device and the docking process. As an optional embodiment, Unix domain sockets are used to achieve efficient communication between the IoT device and the docking process.
[0076] S104. Parse and preprocess the grouped IoT data. Based on the output object, output parameters and output address in the device acquisition strategy, encapsulate the preprocessed grouped IoT data to obtain the IoT data group to be uploaded.
[0077] In this embodiment, as an optional implementation, IoT data (raw values) collected from each data point is extracted from the continuous data blocks of grouped IoT data according to the address offset. Data type parsing is performed to obtain the data type of IoT data. The data type includes, but is not limited to: 16-bit integer (h), 32-bit integer (i), single-precision floating-point (f), and double-precision floating-point (d). For the data parsed by data type parsing, a custom data conversion function is applied to realize mathematical operations such as scaling, offset, and precision control, as well as preprocessing such as data format conversion, unit conversion, numerical calculation, data verification, and outlier filtering.
[0078] In this embodiment, as an optional implementation, the preprocessed grouped IoT data is encapsulated according to the output object, output parameters, and output address in the device acquisition strategy to obtain the IoT data group to be uploaded, including:
[0079] A31. Based on the IoT device identifiers in the preprocessed grouped IoT data, the grouped IoT data is reorganized into device dimension data to obtain device data groups.
[0080] In this embodiment, as an optional embodiment, based on the IoT device identifiers in the preprocessed grouped IoT data, the grouped IoT data is reorganized into device-dimensional data to obtain a device data group, including:
[0081] A311, traverse the IoT device identifiers in each group of IoT data obtained from preprocessing, and obtain the group of IoT data corresponding to the same IoT device identifier;
[0082] A312, for each group of IoT data corresponding to the same IoT device identifier, forms a hierarchical structure of IoT device identifier and data point, thus obtaining the device data group.
[0083] In this embodiment, the device data group contains IoT data collected from multiple data points within an acquisition cycle. This makes it easier to locate data points based on abnormal IoT data after identifying them in the future, so as to process the data points accordingly.
[0084] A32 regroups the device data group according to the output object, output parameters and output address in the device acquisition strategy to obtain the IoT data group to be uploaded.
[0085] In this embodiment, as an optional implementation, the device data group is regrouped based on the triplet "output object + output parameter + output address". That is, the device data groups with the same output object, output parameter and output address are aggregated into a group. For example, IoT data sent to the same IoT application system (output address) are combined, so that the data of multiple devices are combined into a single message for batch transmission, reducing resource overhead.
[0086] In this embodiment, as another optional implementation, messages can be generated independently for each device data group and sent to the corresponding IoT application system based on the output object to support differentiated processing. In this way, by customizing the message processing script and setting the device data group transmission method, flexible expansion of business logic can be supported.
[0087] S105. The IoT data group to be uploaded is sent to the application system corresponding to the output address using the data communication channel built based on the output object.
[0088] In this embodiment, as an optional implementation, the IoT data set to be uploaded is sent to the application system corresponding to the output address using a data communication channel built based on the output object, including:
[0089] A411, for each target application system corresponding to the output address, constructs a data upload request based on the output object, including the target acquisition task identifier, output parameters, and data load. The data load is used to represent the amount of data in the IoT data group to be uploaded.
[0090] A412 uses JSON serialization to encapsulate the IoT data group to be uploaded to the target application system, and then encapsulates the JSON-serialized IoT data group in the data upload request based on the output object and uploads it to the target application system.
[0091] In this embodiment, JSON serialization ensures the complete transmission of complex data structures.
[0092] In this embodiment, as an optional embodiment, multiple data upload requests can also be sent to the data upload process in parallel via Unix domain sockets to perform parallel data upload.
[0093] In this embodiment, the execution results of each data upload request can also be collected to establish a success rate statistics mechanism.
[0094] In this embodiment, as an optional implementation, a data upload process is used to upload data to the target application system. The data upload process can be deployed according to the type of the target application system and supports multiple data push protocols and formats. For example, the data upload process includes, but is not limited to, MQTT upload processes, HTTP upload processes, and database write processes. Specifically, the MQTT upload process is used to upload data to the SCADA system, the HTTP upload process is used to upload data to the cloud platform, and the database write process is used to upload data to the database.
[0095] In this embodiment, as an optional implementation, the inter-process communication mechanism uses a message queue to achieve asynchronous data transmission, supporting load balancing and fault recovery.
[0096] In this embodiment, as an optional embodiment, the method further includes:
[0097] Based on the pre-set data storage strategy, persistent storage is performed on device data groups that conform to the data storage strategy.
[0098] In this embodiment, as an optional implementation, the data storage strategy includes, but is not limited to, a hierarchical storage strategy. For example, the hierarchical storage strategy adopts a storage architecture of "database partitioning by day + configurable table partitioning"; local storage is performed on the collected data of key data points; data points are stored in a single table; independent data tables are created according to IoT device identifiers; fine-grained data tables are created according to "IoT device identifiers and sampling attribute identifiers"; and complete data such as Unix timestamps, IoT device identifiers, sampling attribute identifiers, values, and status flags are recorded in the fine-grained data tables.
[0099] In this embodiment, as another optional embodiment, the persistent storage data is managed automatically, including but not limited to: implementing an automatic database file switching mechanism based on date; automatically cleaning up historical database files based on the configured data retention period; associating data storage with upload results and recording the complete lifecycle status of the data.
[0100] In this embodiment, multi-cycle concurrent control can be achieved through global counter modulo operations; a batch read strategy optimized for address continuity can automatically identify continuous address ranges and obtain the corresponding IoT data, reducing the number of device communications; aggregation operations based on quadruples further enable multi-dimensional grouping, reducing redundant communication and improving data transmission efficiency; and a hierarchical data reorganization mechanism enables data structure transformation from the address dimension to the device dimension, thereby achieving efficient collection and intelligent processing of IoT data, effectively reducing the resource overhead required for IoT data processing, and exhibiting good scalability and adaptability. Furthermore, a configurable storage tiering strategy supports flexible storage modes such as unified tables, device-partitioned tables, and attribute-partitioned tables.
[0101] This embodiment of the IoT data acquisition method decomposes the data acquisition process into independent functional modules (data points), and achieves inter-module communication through standardized interfaces (requests). This improves the stability and maintainability of the data acquisition system, enhances its scalability, supports rapid access to new protocols without modifying the core system, supports flexible integration with new application systems, enables functional expansion of acquisition tasks, supports a visual configuration interface, supports independent deployment and upgrades of functional modules, and provides a plug-in extension mechanism. It can be applied to the following application scenarios:
[0102] Independent data acquisition service application scenarios: Separating data acquisition from application systems and deploying data acquisition independently allows users to focus on the IoT data acquisition process within the IoT system, achieving loose coupling and high scalability overall.
[0103] Multi-protocol IoT device access application scenarios: It can connect IoT devices with different protocols such as Modbus devices, BACnet devices, and MQTT devices;
[0104] Multi-application data distribution scenarios: Collected IoT data can be simultaneously uploaded to multiple target host computer systems such as Supervisory Control and Data Acquisition (SCADA) systems, cloud platforms, and databases.
[0105] Based on the same inventive concept, such as Figure 2 As shown in the figure, this embodiment of the invention also provides an Internet of Things (IoT) data acquisition device, the device comprising:
[0106] The data acquisition strategy configuration module 201 is used to set a corresponding device acquisition strategy for each IoT device in the IoT device group based on the IoT device group configured for the target data acquisition task, and to configure the device docking process with each IoT device to establish a data communication channel with the IoT devices.
[0107] In this embodiment, as an optional embodiment, the device acquisition strategy includes: target acquisition task identifier, IoT device identifier, sampling attribute identifier, acquisition period, starting address, address offset, data type, input parameters, output object, output address, and output parameters.
[0108] In this embodiment, as an optional embodiment, the data acquisition strategy configuration module 201 is specifically used for:
[0109] Based on the pre-set data point configuration file, the target acquisition task identifier, sampling attribute identifier, and IoT device identifier are set in the device acquisition strategy. The data point configuration file contains the mapping relationship between the target acquisition task sampling attribute identifier and the IoT device identifier.
[0110] In this embodiment, as another optional embodiment, the data acquisition strategy configuration module 201 is further used for:
[0111] If the IoT device is a sensor, configure a Modbus interface process to communicate with the sensor based on the Modbus TCP / RTU protocol;
[0112] If the IoT device is an actuator, configure a BACnet interface process to communicate with the actuator based on the BACnet IP / MS-TP protocol;
[0113] If the IoT device is a smart device, configure an MQTT interface process to communicate with the smart device based on the MQTT protocol.
[0114] The data acquisition scheduling module 202 is used to extract the device acquisition strategies with the same device docking process and the same acquisition period from the acquisition strategies of each device, generate a batch acquisition strategy, send it to the corresponding IoT device through the data communication channel of the device docking process, and schedule the IoT device to perform IoT data acquisition according to the corresponding device acquisition strategy in the batch acquisition strategy.
[0115] In this embodiment, as an optional embodiment, the data acquisition and scheduling module 202 is specifically used for:
[0116] Configure a global run sequence number counter to generate run sequences;
[0117] Perform a modulo operation between the execution sequence number and the acquisition period in the batch acquisition strategy to obtain the activation time slice corresponding to the batch acquisition strategy;
[0118] Using a time-slice polling method, when the activation time slice is reached, the batch acquisition strategy corresponding to the activation time slice is activated, so that each IoT device corresponding to the batch acquisition strategy can collect IoT data.
[0119] The data acquisition and reading module 203 is used to construct an IoT data reading request based on a pre-set quadruple, and read the grouped IoT data corresponding to the IoT data reading request from the IoT data collected by the IoT device.
[0120] In this embodiment, as an optional embodiment, the data acquisition and reading module 203 is specifically used for:
[0121] Scan the data point configuration table that is in an active state and extract the data points within the current acquisition period. The data point configuration table is obtained based on the acquisition period in each batch acquisition strategy. The data point configuration table that is in an active state consists of the data points within the current acquisition period in the device acquisition strategy.
[0122] Based on the pre-set quadruple, for each IoT device, the extracted data points within the current acquisition period are grouped and aggregated to obtain multiple data point aggregation groups corresponding to the IoT device.
[0123] For each data point aggregation group, calculate the minimum and maximum address offsets within the data point aggregation group to form a continuous address range, and generate an IoT data read request based on the continuous address range of the data point aggregation group.
[0124] Based on multiple IoT data read requests from the same IoT device, a batch IoT data read request is generated to obtain IoT data in a continuous address range corresponding to each IoT data read request, thus obtaining the grouped IoT data corresponding to that IoT data read request.
[0125] The data collection and distribution module 204 is used to parse and preprocess the grouped IoT data. Based on the output object, output parameters and output address in the device collection strategy, the preprocessed grouped IoT data is encapsulated to obtain the IoT data group to be uploaded.
[0126] In this embodiment, as an optional embodiment, the data collection and distribution module 204 is specifically used for:
[0127] Based on the IoT device identifiers in the preprocessed grouped IoT data, the grouped IoT data is reorganized into device dimension data to obtain device data groups;
[0128] Based on the output object, output parameters, and output address in the device acquisition strategy, the device data group is regrouped to obtain the IoT data group to be uploaded.
[0129] The data acquisition and upload module 205 is used to send the IoT data group to be uploaded to the application system corresponding to the output address through a data communication channel built based on the output object.
[0130] In this embodiment, as an optional embodiment, the data collection and uploading module 205 is specifically used for:
[0131] For each target application system corresponding to the output address, a data upload request based on the output object is constructed, which includes the target acquisition task identifier, output parameters, and data payload. The data payload is used to represent the amount of data in the IoT data group to be uploaded.
[0132] The target application system uses JSON serialization to encapsulate the IoT data group to be uploaded. The JSON serialized IoT data group is then encapsulated in the data upload request based on the output object and sent to the target application system.
[0133] In this embodiment, as an optional embodiment, the device further includes:
[0134] The persistence module (not shown in the figure) is used to persistently store device data groups that conform to the pre-set data storage strategy.
[0135] Figure 3 This is a schematic diagram of an Internet of Things (IoT) data acquisition system provided in an embodiment of the present invention. Figure 3 As shown, the IoT data acquisition system includes: an acquisition engine process, a device docking process, a data upload process, IoT devices and application systems, among which...
[0136] Application systems are used to provide various business application systems, including but not limited to: SCADA systems, cloud platforms, databases, and other business systems.
[0137] SCADA systems are industrial monitoring and data acquisition systems.
[0138] A cloud platform is a platform for processing and storing data in the cloud.
[0139] A database is a local or remote data storage system;
[0140] Other business systems, including but not limited to: Enterprise Resource Planning (ERP), Manufacturing Execution System (MES), and other enterprise-level application systems.
[0141] The data upload process is used to provide data push services categorized by protocol, including but not limited to: MQTT upload process, HTTP upload process, database write process, and other upload service processes.
[0142] The MQTT upload process is used to push data to the SCADA system via the Message Queuing Telemetry Transport (MQTT) protocol.
[0143] The HTTP upload process is used to push data to the cloud platform via the HTTP / HTTPS protocol;
[0144] The database write process is used to write data into the database system;
[0145] Other upload service processes are used to support data push using protocols such as WebSocket and TCP.
[0146] The data acquisition engine process includes, but is not limited to:
[0147] Data point configuration table reading: Dynamically load data point configuration information from an Excel configuration file;
[0148] Scheduled scheduling: Performs data collection task scheduling, supports differentiated acquisition cycles for different data points, and enables priority management of data collection tasks.
[0149] Batch collection: Collecting data points with the same protocol and frequency in batches, and performing data aggregation processing and collection status management.
[0150] Data conversion: Performs data format conversion, unit conversion, and data validation and filtering.
[0151] Data upload: This involves managing the upload queue and implementing exception handling mechanisms. For example, it includes intelligent data routing, distributing data to different target application systems based on configuration; managing the upload queue to support batch and real-time sending; and implementing exception handling mechanisms, including retries and failover.
[0152] The device docking process is used to provide device communication services categorized by protocol, including but not limited to:
[0153] The Modbus interface process is used to handle device communication using the Modbus TCP / RTU protocol.
[0154] The BACnet interface process is used to handle communication between BACnet IP / MS-TP protocol devices.
[0155] The MQTT interface process is used to handle communication between devices using the MQTT protocol.
[0156] Other protocol integration services are used to support other industrial protocols such as OPC-UA and DNP3.
[0157] Internet of Things (IoT) devices are used to provide various IoT terminal devices, including but not limited to:
[0158] Temperature and humidity sensors are used in environmental monitoring equipment to acquire temperature and humidity data. They communicate and transmit the data using a Modbus interface process.
[0159] PLC controllers are industrial automation control devices that acquire PLC control parameters and use the BACnet interface process to communicate and transmit PLC control parameters.
[0160] Smart meters are power monitoring devices that acquire power data and transmit it via MQTT protocol communication.
[0161] Other IoT devices, including but not limited to various sensors and actuators.
[0162] In this embodiment, a three-layer process architecture is adopted, comprising a device docking process, a data acquisition engine process, and a data upload process. The device docking process communicates with devices using various protocols, the data acquisition engine process performs data processing and routing, and the data upload process pushes data to the target application system, achieving complete decoupling of device protocols, data processing, and data distribution. By defining the data exchange format between the device docking process and the data acquisition engine process, and the data distribution format between the data acquisition engine process and the data upload process, version compatibility management of protocols is achieved. This supports plug-in integration of new protocol adapters, dynamic loading of new data upload methods, and elastic scaling of service instances, reducing deployment and maintenance complexity. It effectively solves problems such as high coupling, poor scalability, and complex configuration in IoT data acquisition systems, supports edge-cloud hybrid deployment, adapts to different scales and scenario requirements, and provides a reliable technical foundation for large-scale IoT deployments, offering the following beneficial technical effects:
[0163] Modular design: Each functional module is deployed independently, with a loosely coupled architecture;
[0164] Protocol independent: The acquisition engine process is decoupled from the specific communication protocol and communicates with the device interface process and the data uploading process respectively;
[0165] Intelligent scheduling: Supports differentiated acquisition cycles and batch optimized acquisition;
[0166] Fault tolerance: It has a complete exception handling and recovery mechanism;
[0167] Horizontal scaling: Supports dynamic access for new protocols and applications.
[0168] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the Internet of Things data acquisition method in any of the above possible implementations.
[0169] Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0170] Based on the same inventive concept, see [link to inventive concept] Figure 4 This invention also provides an electronic device, including a memory 101 (e.g., non-volatile memory), a processor 102, and a computer program stored on the memory 101 and executable on the processor 102. When the processor 102 executes the program, it implements the steps of the IoT data acquisition method in any of the above possible implementations, which can be equivalent to the aforementioned IoT data acquisition device. Of course, the processor can also be used to process other data or perform calculations. This electronic device can be a PC, server, terminal, or other similar device.
[0171] like Figure 4 As shown, the electronic device may also include: memory 103, network interface 104, and internal bus 105. In addition to these components, other hardware may also be included, which will not be described in detail here.
[0172] It should be noted that the above-mentioned IoT data acquisition device can be implemented by software. As a logical device, it is formed by the processor 102 of the electronic device in which it is located reading the computer program instructions stored in the non-volatile memory into the memory 103 for execution.
[0173] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0174] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by special-purpose logic circuitry—such as FPGA (Field Programmable Gate Array) or ASIC (Application-Specific Integrated Circuit), and the device can also be implemented as special-purpose logic circuitry.
[0175] Suitable computers for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0176] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0177] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily used to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0178] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0179] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0180] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0181] The above are merely specific embodiments of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An Internet of Things data collection method, characterized by, The method comprises the following steps: Based on the Internet of Things device group configured for the target collection task, a corresponding device collection strategy is set for each Internet of Things device in the Internet of Things device group, a device docking process is configured between each Internet of Things device, a data communication channel is established with the Internet of Things device, and the docking process is classified and deployed according to the communication protocol type of the Internet of Things device. Each communication protocol type corresponds to a docking process, and the docking process is shared by each Internet of Things device of the communication protocol type; From each device collection strategy, device collection strategies with the same device docking process and consistent acquisition periods are extracted to generate batch collection strategies, which are sent to the corresponding Internet of Things device through the data communication channel of the device docking process. The Internet of Things device collects Internet of Things data according to the corresponding device collection strategy in the batch collection strategy. The acquisition period is used to set the time interval of Internet of Things data collection; According to the pre-set four-tuple, an Internet of Things data reading request based on the Internet of Things device is constructed, and the grouped Internet of Things data corresponding to the Internet of Things data reading request is read from the Internet of Things data collected from the Internet of Things device. The four-tuple includes: input object, input parameter, starting address, and data type. The input object is used to represent the data point on the Internet of Things device in the form of a string. The input parameter is used to represent the sampling signal type or function of the data point on the Internet of Things device. The starting address is used to represent the address corresponding to the first data point on the Internet of Things device. The data point is an Internet of Things data collection or control object connected through an access protocol in an Internet of Things system, which has a unique address identifier and a clear data type. The data type is used to represent the data category obtained by sampling the data point on the Internet of Things device. The data points with the same input object, input parameter and data type are aggregated into a data point aggregation group. For each data point aggregation group, the minimum and maximum values of the address offset in the data point aggregation group are calculated to form a continuous address interval. The Internet of Things data reading request is generated based on the continuous address interval of the data point aggregation group. The grouped Internet of Things data is analyzed and preprocessed, the grouped Internet of Things data obtained by preprocessing is encapsulated according to the output object, output parameter and output address in the device collection strategy, and a to-be-uploaded Internet of Things data group is obtained. The to-be-uploaded Internet of Things data group is uploaded to the application system corresponding to the output address through the data communication channel constructed based on the output object.
2. The IoT data collection method of claim 1, wherein, The method comprises the following steps: According to the pre-set data point configuration file, the target collection task identifier, the sampling attribute identifier and the Internet of Things device identifier in the device collection strategy are set. In the data point configuration file, the mapping relationship between the sampling attribute identifier and the Internet of Things device identifier under the target collection task is included.
3. The IoT data collection method of claim 1, wherein, If the Internet of Things device is a sensor, a Modbus docking process is configured to communicate with the sensor based on the Modbus TCP / RTU protocol. If the IoT device is an actuator, a BACnet interfacing process is configured to communicate with the actuator based on BACnet IP / MS-TP protocol; If the IoT device is a smart device, an MQTT interfacing process is configured to communicate with the smart device based on MQTT protocol.
4. The IoT data collection method of claim 1, wherein, The scheduling IoT device collects IoT data according to the corresponding device collection strategy in the batch collection strategy, including: Setting a global running serial number counter to generate a running serial number; Taking the running serial number and the acquisition period in the batch collection strategy as the modulus to obtain the activation time slice corresponding to the batch collection strategy; Using the time slice polling method, when the activation time slice is reached, the batch collection strategy corresponding to the activation time slice is activated, so that each IoT device corresponding to the batch collection strategy collects IoT data.
5. The IoT data collection method of any one of claims 1 to 4, wherein, The IoT data reading request based on the IoT device is constructed according to the pre-set four-tuple, and the grouped IoT data corresponding to the IoT data reading request is read from the IoT data collected from the IoT device, including: Scanning the data point configuration table in the active state to extract the data points in the current acquisition period, the data point configuration table is obtained according to the acquisition period in each batch collection strategy, and the data point configuration table in the active state is each data point in the current acquisition period in the device collection strategy; Based on the pre-set four-tuple, for each IoT device, the extracted data points in the current acquisition period are grouped and aggregated to obtain a plurality of data point aggregation groups corresponding to the IoT device; For each data point aggregation group, the minimum and maximum values of the address offset in the data point aggregation group are calculated to form a continuous address interval, and the IoT data reading request is generated based on the continuous address interval of the data point aggregation group; Based on the plurality of IoT data reading requests of the same IoT device, an IoT data batch reading request is generated to obtain the IoT data of the continuous address interval corresponding to each IoT data reading request, and the grouped IoT data corresponding to the IoT data reading request is obtained.
6. The IoT data collection method of any one of claims 1 to 4, wherein, The grouped IoT data obtained by preprocessing is encapsulated according to the output object, output parameter and output address in the device collection strategy to obtain a to-be-uploaded IoT data group, including: The device dimension data of the grouped IoT data is reorganized according to the IoT device identifier in the grouped IoT data obtained by preprocessing to obtain a device data group; The device data group is regrouped according to the output object, output parameter and output address in the device collection strategy to obtain a to-be-uploaded IoT data group.
7. The IoT data collection method of any one of claims 1 to 4, wherein, The device collection strategy includes: target collection task identifier, IoT device identifier, sampling attribute identifier, acquisition period, starting address, address offset, data type, input parameter, output object, output address, and output parameter.
8. An Internet of Things data collection device, characterized by, The IoT data collection device is used to execute the IoT data collection method of claim 1, including: The collection strategy configuration module is configured to set a corresponding device collection strategy for each Internet of Things device in the group of Internet of Things devices based on the group of Internet of Things devices configured for the target collection task, configure a device docking process with each Internet of Things device, and establish a data communication channel with the Internet of Things device. The data collection scheduling module is configured to extract device collection strategies with the same device docking process and consistent acquisition periods from each device collection strategy, generate a batch collection strategy, send the batch collection strategy to the corresponding Internet of Things device through the data communication channel of the device docking process, and schedule the Internet of Things device to collect Internet of Things data according to the corresponding device collection strategy in the batch collection strategy. The collection data reading module is configured to construct an Internet of Things data reading request based on an Internet of Things device according to a pre-set four-tuple, read grouped Internet of Things data corresponding to the Internet of Things data reading request from the Internet of Things data collected from the Internet of Things device. The collection data distribution module is configured to analyze and preprocess the grouped Internet of Things data, encapsulate the preprocessed grouped Internet of Things data according to the output object, output parameter, and output address in the device collection strategy, and obtain a set of Internet of Things data to be uploaded. The collection data uploading module is configured to upload the set of Internet of Things data to be uploaded to an application system corresponding to the output address using a data communication channel constructed based on the output object.
9. A storage medium, characterized by The storage medium stores programs or instructions, and the programs or instructions are run by the processor to implement the steps of the Internet of Things data collection method in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the programs to implement the steps of the Internet of Things data collection method in any one of claims 1 to 7.
Citation Information
Patent Citations
Data acquisition system and method
CN107885602A
Data acquisition method and device based on Internet of Things gateway, and computer equipment
CN120201058A