Data processing method and device of Internet of Things platform, equipment and medium
By adopting a combination of streaming modules and multiple gateways in the Internet of Things platform, the problem of low efficiency of the IoT platform when processing a large amount of device data is solved, and efficient and real -time data processing capabilities have been achieved.
Patent Information
- Application Number
- CN202411549580.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-01-28
AI Technical Summary
When the number of devices connected to the Internet of Things platform is large, the data volume is large, resulting in low data processing efficiency.
The combination scheme of the stream processing module and multiple gateways, the stream processing module is connected to each gateway, and each gateway is connected to one or more data source devices. The flow processing module obtains the device data sent by the gateway, finds the target plug -in matching the gateway, and processes data based on the target plug -in to obtain the processing result and sends it to the downstream module.
It improved the data processing efficiency of the IoT platform on large -scale data, realized the real -time and efficiency of data processing, and adapted the data collection and processing of various software and hardware platforms or devices.
Smart Images

Figure CN119383205A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a data processing method, device, equipment and medium for an Internet of Things platform. Background Art
[0002] With the development of science and technology, Internet of Things technology is constantly improving.
[0003] Among them, the Internet of Things platform aims to converge multiple devices into a network by adopting technologies such as 5G, Bluetooth, Lora, NB-Iot and wired transmission, and conduct data collection, process control and equipment monitoring on multiple devices to achieve interconnection and interaction between things and things, and between things and people.
[0004] However, when the number of devices connected to the IoT platform is large, the amount of data that the IoT platform needs to process is large and the data processing efficiency is low. Summary of the invention
[0005] The present invention provides a data processing method, device, equipment and medium for an Internet of Things platform, which are used to solve the defects in the related art that when the number of devices connected to the Internet of Things platform is large, the amount of data to be processed by the Internet of Things platform is large and the data processing efficiency is low, thereby improving the data processing efficiency of the Internet of Things platform for large-scale data.
[0006] In a first aspect, the present invention provides a data processing method for an Internet of Things platform, wherein the Internet of Things platform includes a stream processing module and multiple gateways, wherein the stream processing module is connected to each of the gateways, and each of the gateways is connected to one or more data source devices; the method includes: The streaming processing module obtains the converted device data sent by any gateway, wherein the converted device data is obtained by the gateway converting the device data based on a preset IoT dictionary object model, and the device data is collected by the gateway from the connected data source device based on a predefined data protocol; The streaming processing module searches for a target plug-in matching the gateway among multiple plug-ins in a preset plug-in pool; The stream processing module performs stream processing on the converted device data based on the target plug-in to obtain a corresponding processing result; The stream processing module sends the processing result to the downstream module for processing.
[0007] Optionally, the streaming processing module searches for a target plug-in matching the gateway from among multiple plug-ins in a preset plug-in pool, including: The streaming processing module obtains the device identification of the gateway; The streaming processing module searches for a corresponding target plug-in identifier in a preset identifier correspondence relationship according to the device identifier of the gateway; wherein the identifier correspondence relationship includes a correspondence relationship between multiple device identifiers of the gateways and multiple plug-in identifiers, and one plug-in identifier corresponds to one or more device identifiers of the gateways; The stream processing module determines a corresponding plug-in from a plurality of plug-ins in the preset plug-in pool according to the target plug-in identifier, and uses the corresponding plug-in as the target plug-in.
[0008] Optionally, the data source device is a camera device, an environmental parameter sensor or a vehicle-mounted central processing unit, and the device data is an image frame sequence obtained by shooting by the camera device, environmental data obtained by detection by the environmental parameter sensor or processing data of the vehicle-mounted central processing unit.
[0009] Optionally, the downstream module is an internal storage module, an internal business processing module or an external module.
[0010] Optionally, the Internet of Things platform further includes a device monitoring module and an alarm module; the method further includes: The streaming processing module obtains the keep-alive alarm information regularly sent by the device monitoring module, wherein the keep-alive alarm information is generated by the device monitoring module according to the heartbeat data of the data source device sent by the gateway, and the heartbeat data is collected by the gateway from the data source device; When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, the alarm is issued through the alarm module.
[0011] Optionally, when the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, the alarm module issues an alarm, including: When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, it determines the alarm mode and target alarm device corresponding to the data source device; The stream processing module outputs corresponding alarm information to the target alarm device based on the alarm mode.
[0012] Optionally, the alarm method includes email alarm, telephone alarm and / or text message alarm.
[0013] In a second aspect, the present invention provides a data processing device for an Internet of Things platform, wherein the Internet of Things platform includes a stream processing module and a plurality of gateways, wherein the stream processing module is connected to each of the gateways, and each of the gateways is connected to one or more data source devices; the device is applied to the stream processing module; and the device includes: An acquisition unit, used for acquiring the converted device data sent by the gateway; wherein the converted device data is obtained by the gateway converting the device data based on a preset IoT dictionary model, and the device data is collected by the gateway from the connected data source device based on a predefined data protocol; A search unit, used to search for a target plug-in matching the gateway among multiple plug-ins in a preset plug-in pool; A processing unit, configured to perform streaming processing on the converted device data based on the target plug-in to obtain a corresponding processing result; The sending unit is used to send the processing result to the downstream module for processing.
[0014] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data processing method of the Internet of Things platform of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data processing method for an Internet of Things platform of the first aspect or any corresponding embodiment thereof.
[0016] The data processing method, device, equipment and medium of the Internet of Things platform provided by the present invention include a streaming processing module and multiple gateways in the Internet of Things platform, the streaming processing module is connected to each gateway, and each gateway is connected to one or more data source devices. The streaming processing module obtains the converted device data sent by the gateway for any gateway; wherein the converted device data is obtained by the gateway converting the device data based on the preset Internet of Things dictionary object model, and the device data is collected by the gateway from the connected data source device based on the predefined data protocol; the streaming processing module searches for the target plug-in matching the gateway among the multiple plug-ins in the preset plug-in pool; the streaming processing module performs streaming processing on the converted device data based on the target plug-in to obtain the corresponding processing result; the streaming processing module sends the processing result to the downstream module for processing. The present invention can connect different data source devices to the Internet of Things platform based on multiple gateways, and can realize the collection of device data in different data source devices and data conversion and streaming processing based on the data protocols used by multiple gateways, the Internet of Things dictionary object model and the plug-ins in the preset plug-in pool, thereby improving the data processing efficiency of the Internet of Things platform for large-scale data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flowchart of a data processing method for an Internet of Things platform provided by an embodiment of the present invention; Figure 2 A flowchart of another data processing method for an Internet of Things platform provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a data processing device for an Internet of Things platform provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Combine the following Figure 1-Figure 2 The data processing method of the Internet of Things platform of the present invention is described.
[0021] like Figure 1 As shown, this embodiment proposes a first data processing method for an Internet of Things platform, wherein the Internet of Things platform includes a stream processing module and multiple gateways, the stream processing module is connected to each gateway, and each gateway is connected to one or more data source devices. The method may include the following steps: S101. The streaming processing module obtains the converted device data sent by any gateway; wherein the converted device data is obtained by the gateway converting the device data based on a preset IoT dictionary model, and the device data is collected by the gateway from the connected data source device based on a predefined data protocol.
[0022] Specifically, the stream processing module is a module that can perform stream processing on data.
[0023] Among them, the data source device is the device or platform that needs to be connected to the Internet of Things platform.
[0024] Specifically, the gateway can collect device data from the connected data source device through a predefined data protocol.
[0025] Optionally, the data source device is a camera device, an environmental parameter sensor or a vehicle-mounted central processing unit, and the device data is an image frame sequence obtained by shooting the camera device, environmental data obtained by detection by the environmental parameter sensor, or processing data of the vehicle-mounted central processing unit.
[0026] Among them, the IoT dictionary object model can be a data model defined by the IoT platform for different types of data source devices, which can be used to specify the data format, data type, data field and other information of the data source device. The gateway needs to convert and adapt the collected device data according to the IoT dictionary object model so that the IoT platform can correctly understand and process the data.
[0027] Specifically, after the gateway obtains the device data from the data source device, it can convert the device data based on the IoT dictionary model to obtain the corresponding converted device data, and then send the converted device data to the streaming processing module for data processing.
[0028] It is understandable that in this embodiment, different gateways can be customized to connect the gateways to corresponding types of data source devices. The gateways can collect device data from corresponding types of data source devices through predefined data protocols.
[0029] S102: The streaming processing module searches for a target plug-in that matches the gateway among multiple plug-ins in a preset plug-in pool.
[0030] It should be noted that, in this embodiment, corresponding plug-ins may be set in advance for different gateways, thereby realizing the corresponding relationship between the data source device, the gateway and the plug-in.
[0031] The target plug-in is the plug-in in the plug-in pool that is compatible with the gateway.
[0032] Specifically, the streaming processing module may search for a plug-in that matches the gateway from among multiple plug-ins included in a preset plug-in pool and use the plug-in as the target plug-in.
[0033] It is understandable that when the stream processing module receives the converted device data sent by any gateway, it can search for the target plug-in corresponding to the gateway in the preset plug-in pool to achieve dynamic loading and adaptation of the plug-in.
[0034] Optionally, step S102 may include: The streaming processing module obtains the device identification of the gateway; The streaming processing module searches for the corresponding target plug-in identifier in a preset identifier correspondence relationship according to the device identifier of the gateway; wherein the identifier correspondence relationship includes the correspondence relationship between the device identifiers of multiple gateways and the multiple plug-in identifiers, and one plug-in identifier corresponds to the device identifiers of one or more gateways; The stream processing module determines a corresponding plug-in from a plurality of plug-ins in a preset plug-in pool according to the target plug-in identifier, and uses the corresponding plug-in as the target plug-in.
[0035] Specifically, in the identifier correspondence, one plug-in identifier may correspond to one gateway device identifier or multiple gateway device identifiers, that is, there may be a one-to-many relationship between the plug-in identifier and the gateway device identifier.
[0036] It is understandable that each plug-in in the plug-in pool has a unique corresponding plug-in identifier. This embodiment can determine the unique corresponding plug-in in the preset plug-in pool according to the plug-in identifier.
[0037] S103: The stream processing module performs stream processing on the converted device data based on the target plug-in to obtain corresponding processing results.
[0038] Specifically, when receiving the converted device data sent by any gateway, the stream processing module may determine the target plug-in corresponding to the gateway, and perform stream processing on the converted device data based on the target plug-in.
[0039] S104: The stream processing module sends the processing result to the downstream module for processing.
[0040] Optionally, the downstream module may be an internal storage module, an internal business processing module or an external module.
[0041] Among them, the internal storage module can be a storage module in the Internet of Things platform, and the internal business processing module can be a module in the Internet of Things platform used to continue to perform related business processing on the above processing results.
[0042] Specifically, the external module is a data processing module outside the Internet of Things platform and connected to the Internet of Things platform.
[0043] The data processing method of the Internet of Things platform proposed in this embodiment includes a streaming processing module and multiple gateways in the Internet of Things platform, the streaming processing module is connected to each gateway, and each gateway is connected to one or more data source devices. For any gateway, the streaming processing module obtains the converted device data sent by the gateway; wherein the converted device data is obtained by the gateway converting the device data based on the preset Internet of Things dictionary object model, and the device data is collected by the gateway from the connected data source device based on the predefined data protocol; the streaming processing module searches for the target plug-in matching the gateway among the multiple plug-ins in the preset plug-in pool; the streaming processing module performs streaming processing on the converted device data based on the target plug-in to obtain the corresponding processing result; the streaming processing module sends the processing result to the downstream module for processing. This embodiment can connect different data source devices to the Internet of Things platform based on multiple gateways, and can realize the collection of device data in different data source devices and data conversion and streaming processing based on the data protocols used by multiple gateways, the Internet of Things dictionary object model and the plug-ins in the preset plug-in pool, thereby improving the data processing efficiency of the Internet of Things platform for large-scale data.
[0044] like Figure 2 As shown, in another data processing method for an Internet of Things platform proposed in this embodiment, the Internet of Things platform may include a streaming processing module, multiple gateways, a device monitoring module and an alarm module.
[0045] The gateway can collect device data from connected data source devices through data protocols such as HTTP, MQTT, TCP, UDP and SDK. The gateway can convert device data based on the IoT dictionary model to obtain converted device data, and send the converted device data to the streaming processing module. The streaming processing module can determine the target plug-in corresponding to the gateway in the preset plug-in pool, dynamically load the plug-in, and automatically adapt the data in Kafka / MQTT according to the task processing developed by IoT, and send the data processing results such as data analysis results to Kafka, and send them to the storage module or business processing module through Kafka for corresponding processing. Among them, the streaming processing module can also send the data processing results to the external module. Among them, the external module can be an external interface and an external platform, such as an external MQTT or a Kafka external development interface.
[0046] It should be noted that the data source device cannot access the IoT system independently. Therefore, for each data source device, an access gateway is required to perform protocol conversion to realize data collection of the data source device and access the IoT system for data management according to the IoT dictionary object model. Specific access gateways use various protocols (http, mqtt, tcp, udp, sdk, etc.) to access the IoT system and perform data collection, access and conversion based on the specific object model of the IoT platform. The required data is reported to kafka / mqtt for subsequent processing. The gateways are not connected to each other. When a new platform or device needs to be added, there is no need to modify and reconstruct the existing system. A new gateway can be directly added. Each gateway is independently developed and tested without interfering with each other.
[0047] Regarding the preset plug-in pool, the device data of the data source device can be connected to the IoT platform through a specific gateway. The IoT platform provides protocols such as Http and MQTT to report information data to the platform. According to the customized gateway, a plug-in corresponding to the specific needs is developed and reserved in the preset plug-in pool. After loading the task, flink automatically adapts the specific parsing plug-in and the customized gateway to parse and process the data. The platform can store the processed data or perform unified planning and management display. The plug-ins in the preset plug-in pool can be reused according to user needs, or the plug-ins specifically required by the user can be configured to improve the parsing speed, reduce dictionary redundancy, and thus improve the streaming processing speed. The plug-in parsing data can rely on the setting of the IoT object model to parse and process the required data. The plug-in pool supports multi-language plug-in (js / sql / java / c++ / python, etc.) mechanism. Developers can use more familiar languages to write plug-ins to complete specific parsing and matching of data. And because the gateways do not interfere with each other, plug-in development greatly supports code reuse and improves development efficiency.
[0048] like Figure 2 As shown, the Internet of Things platform may also include a device monitoring module and an alarm module, and the data processing method of the Internet of Things platform may also include: The streaming processing module obtains the keep-alive alarm information sent regularly by the device monitoring module. The keep-alive alarm information is generated by the device monitoring module according to the heartbeat data of the data source device sent by the gateway. The heartbeat data is collected by the gateway from the data source device. When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, an alarm is issued through the alarm module.
[0049] Specifically, the gateway can collect heartbeat data from the data source device and send it to the device monitoring module for analysis to determine whether the operating status of the data source device is abnormal, so that the background technicians can determine the operating status of the data source device in the device monitoring module.
[0050] It can be understood that this embodiment can implement keep-alive monitoring of each data source device, and when an abnormality is detected in a data source device, an alarm message can be output to a designated device or a technician.
[0051] Optionally, when the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, the alarm module issues an alarm, including: When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, it determines the alarm mode and target alarm device corresponding to the data source device; The stream processing module outputs corresponding alarm information to the target alarm device based on the alarm mode.
[0052] Optionally, the alarm method includes email alarm, telephone alarm and / or SMS alarm.
[0053] Regarding the device monitoring module, this embodiment can monitor the data information collected by the customized gateway to keep it alive, and monitor the online and offline status of the devices or platforms collected by the corresponding gateway in real time. The device monitoring module displays the heartbeat data of the data source device corresponding to the gateway, and reports the heartbeat data to redis, which is convenient for the stream processing module to perform alarm monitoring and processing.
[0054] Regarding the stream processing module, the data processed by the plug-in analysis is reported to the stream processing module, and the data is reported in the kafka or mqtt mode. The gateway data of multiple platforms can be integrated and collected, and flink is used for unified stream processing. The self-developed task parsing function is used to dynamically load the plug-ins in the plug-in pool, and the plug-ins matched by the customized gateway are automatically adapted for data processing. The processed data can be sent to the kafka middleware, and then the business function processing of other business modules is performed. This framework can be used for real-time data streaming processing, can process large-scale data streams, and has the characteristics of low latency and high throughput. The data collected by the IoT system needs to be processed and analyzed in real time, and the data needs to be processed and responded to in time. The use of stream processing can achieve high-speed and large-scale data flow, so as to achieve the effect of real-time processing. In addition, each plug-in is independent of each other and does not interfere with each other, which ensures the decoupling of each module, and can also conveniently and safely provide external data docking. The use of stream processing is mainly to improve the processing capability, accuracy and timeliness of data. Stream processing also has the function of monitoring alarm information, so that alarm data can be processed in real time and sent to the alarm module for alarm processing. like Figure 2 As shown, the stream processing module can send the alarm result to Kafka, and then send it to the alarm module for alarm.
[0055] Regarding other modules, such as internal storage modules, internal business processing modules and downstream modules. Internally, it can realize internal functions such as data storage, business processing, and data display. Externally, it can conveniently and quickly provide external interfaces, and can also provide externally specified Kafka or MQTT and other secure docking methods, which improves the system expansion capability. The alarm module can assist users in real-time monitoring of the status of the connected platform or equipment, and can respond to abnormal situations in a timely manner.
[0056] It should be noted that in this embodiment, the data collected by the Internet of Things platform can be processed by plug-in development technology to form a model data after regular processing, the flink middleware performs specific matching processing, and the plug-in in the dynamic loading plug-in pool is automatically adapted to the gateway for corresponding data parsing processing. Then the processed message data is saved to the database or continues to flow to the next message middleware. The Internet of Things business processing function processes the stream-processed data according to business needs, thereby improving the efficiency and real-time performance of the Internet of Things platform in processing data and being able to adapt to data collection and processing of various software and hardware platforms or devices at the same time, thereby effectively improving the access types of the Internet of Things platform, enabling the platform to better and more widely access various devices, and improving the compatibility and scalability of the platform. This embodiment adopts streaming processing mainly to improve the processing response speed of the Internet of Things platform to the collected real-time data, and streaming processing has the characteristics of processing large-scale unpredictable data data streams. Using it here for data processing can not only improve the real-time processing capability of data, but also obtain the processed data quickly and quickly, and it has strong scalability and is easy to connect to other platforms.
[0057] This embodiment can solve the problems of the Internet of Things platform when collecting data, such as the large amount of data cannot be processed in time, the timeliness of data cannot be guaranteed, and the system is too large to be easily maintained. This embodiment can efficiently and quickly process the data collected by the Internet of Things platform and ensure the real-time display of data.
[0058] This embodiment can be designed from the aspects of the implementation function of plug-in development streaming processing, the implementation performance of plug-in development streaming processing, the implementation real-time of plug-in development streaming processing, and the implementation scalability of plug-in development streaming processing. Different from the ordinary data processing method, it can quickly and efficiently perform data parsing and processing, realize efficient and real-time data parsing, and enhance the timeliness of data and the scalability of the platform. It has good scalability, real-time and usability. And this embodiment can adopt plug-in development streaming processing, and different plug-in pools can be used for different users, which greatly reduces the redundancy of the Internet of Things system and makes the system more lightweight. And it greatly improves the scalability of internal and external docking. The alarm module is also added to the stream processing to improve the real-time and timeliness of the alarm.
[0059] The limitations of the related technologies for data collection and access of various data source devices are relatively large and incompatible. This embodiment can implement a plug-in analysis and streaming processing solution for the data of each data source device. While improving the timeliness and efficiency of data processing, it also greatly improves the scalability of the platform.
[0060] The data processing method for the Internet of Things platform proposed in this embodiment, the streaming processing module can dynamically load multiple plug-ins of the preset plug-in pool and automatically match the target plug-in that matches the gateway, and stream the converted device data based on the target plug-in to obtain the processing result of the corresponding Internet of Things dictionary object model and send it to the downstream module for processing. The present invention can improve the data processing efficiency of the Internet of Things platform for large-scale data, improve the real-time performance of data processing, and at the same time can adapt to data collection and processing of various software and hardware platforms or devices, significantly improving the access types of the Internet of Things platform, so that the platform can access a wider range of devices, improve the platform scalability, and facilitate docking with other platforms. The present invention aims to solve the problems of the Internet of Things platform when collecting data, such as the large amount of data that cannot be processed in time, the inability to guarantee the timeliness of data, and the system being too large to be easily maintained.
[0061] like Figure 3 As shown, this embodiment proposes a data processing device for an Internet of Things platform, wherein the Internet of Things platform includes a stream processing module and multiple gateways, wherein the stream processing module is connected to each gateway, and each gateway is connected to one or more data source devices. The device is applied to the stream processing module, and the device includes: The acquisition unit 301 is used to acquire the converted device data sent by the gateway; wherein the converted device data is obtained by the gateway converting the device data based on the preset IoT dictionary model, and the device data is collected by the gateway from the connected data source device based on a predefined data protocol; A search unit 302 is used to search for a target plug-in that matches the gateway among multiple plug-ins in a preset plug-in pool; The processing unit 303 is used to perform streaming processing on the converted device data based on the target plug-in to obtain corresponding processing results; The sending unit 304 is used to send the processing result to the downstream module for processing.
[0062] It should be noted that the processing of the acquisition unit 301, the search unit 302, the processing unit 303 and the sending unit 304 and the beneficial effects thereof can be respectively referred to in Figure 1 Steps S101 to S104 in the above are not described in detail.
[0063] Optionally, the searching unit 302 is further configured to: Get the device ID of the gateway; According to the device identification of the gateway, the corresponding target plug-in identification is searched in the preset identification correspondence relationship; wherein the identification correspondence relationship includes the correspondence relationship between the device identifications of multiple gateways and the multiple plug-in identifications, and one plug-in identification corresponds to the device identifications of one or more gateways; According to the target plug-in identifier, a corresponding plug-in is determined from multiple plug-ins in the preset plug-in pool and used as the target plug-in.
[0064] Optionally, the data source device is a camera device, an environmental parameter sensor or a vehicle-mounted central processing unit, and the device data is an image frame sequence obtained by shooting the camera device, environmental data obtained by detection by the environmental parameter sensor, or processing data of the vehicle-mounted central processing unit.
[0065] Optionally, the downstream module is an internal storage module, an internal business processing module or an external module.
[0066] Optionally, the IoT platform also includes a device monitoring module and an alarm module. The above device also includes: The alarm unit is used to obtain the keep-alive alarm information sent regularly by the device monitoring module. The keep-alive alarm information is generated by the device monitoring module based on the heartbeat data of the data source device sent by the gateway. The heartbeat data is collected by the gateway from the data source device. When the data source device is determined to be abnormal based on the keep-alive alarm information, an alarm is issued through the alarm module.
[0067] Optionally, the alarm unit is also used to: When it is determined that the data source device is abnormal according to the keep-alive alarm information, the alarm mode and target alarm device corresponding to the data source device are determined; based on the alarm mode, the corresponding alarm information is output to the target alarm device.
[0068] Optionally, the alarm method includes email alarm, telephone alarm and / or SMS alarm.
[0069] The data processing device of the Internet of Things platform proposed in this embodiment includes a streaming processing module and multiple gateways in the Internet of Things platform. The streaming processing module is connected to each gateway, and each gateway is connected to one or more data source devices. For any gateway, the streaming processing module obtains the converted device data sent by the gateway; wherein the converted device data is obtained by the gateway converting the device data based on the preset Internet of Things dictionary object model, and the device data is collected by the gateway from the connected data source device based on the predefined data protocol; the streaming processing module searches for the target plug-in matching the gateway among the multiple plug-ins in the preset plug-in pool; the streaming processing module performs streaming processing on the converted device data based on the target plug-in to obtain the corresponding processing result; the streaming processing module sends the processing result to the downstream module for processing. This embodiment can connect different data source devices to the Internet of Things platform based on multiple gateways, and can realize the collection of device data in different data source devices and data conversion and streaming processing based on the data protocols used by multiple gateways, the Internet of Things dictionary object model and the plug-ins in the preset plug-in pool, thereby improving the data processing efficiency of large-scale data.
[0070] The data processing device of the Internet of Things platform in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0071] The embodiment of the present invention also provides a computer device having the above Figure 3 The data processing device of the Internet of Things platform is shown.
[0072] See also Figure 4 , a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0073] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0074] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0075] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0076] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.
[0077] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0078] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data processing method for an Internet of Things platform, characterized in that: The Internet of Things platform includes a streaming processing module and multiple gateways, the streaming processing module is connected to each of the gateways, and each of the gateways is connected to one or more data source devices; the method includes: The streaming processing module obtains the converted device data sent by any gateway, wherein the converted device data is obtained by the gateway converting the device data based on a preset IoT dictionary object model, and the device data is collected by the gateway from the connected data source device based on a predefined data protocol; The streaming processing module searches for a target plug-in matching the gateway among multiple plug-ins in a preset plug-in pool; The stream processing module performs stream processing on the converted device data based on the target plug-in to obtain a corresponding processing result; The stream processing module sends the processing result to the downstream module for processing.
2. The method according to claim 1, characterized in that The stream processing module searches for a target plug-in matching the gateway among multiple plug-ins in a preset plug-in pool, including: The streaming processing module obtains the device identification of the gateway; The streaming processing module searches for a corresponding target plug-in identifier in a preset identifier correspondence relationship according to the device identifier of the gateway; wherein the identifier correspondence relationship includes a correspondence relationship between multiple device identifiers of the gateways and multiple plug-in identifiers, and one plug-in identifier corresponds to one or more device identifiers of the gateways; The stream processing module determines a corresponding plug-in from a plurality of plug-ins in the preset plug-in pool according to the target plug-in identifier, and uses the corresponding plug-in as the target plug-in.
3. The method according to claim 1, characterized in that The data source device is a camera device, an environmental parameter sensor or a vehicle-mounted central processing unit, and the device data is an image frame sequence obtained by shooting by the camera device, environmental data obtained by detection by the environmental parameter sensor or processing data of the vehicle-mounted central processing unit.
4. The method according to claim 1, characterized in that The downstream module is an internal storage module, an internal business processing module or an external module.
5. The method according to claim 1, characterized in that The Internet of Things platform also includes a device monitoring module and an alarm module; the method also includes: The streaming processing module obtains the keep-alive alarm information regularly sent by the device monitoring module, wherein the keep-alive alarm information is generated by the device monitoring module according to the heartbeat data of the data source device sent by the gateway, and the heartbeat data is collected by the gateway from the data source device; When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, the alarm is issued through the alarm module.
6. The method according to claim 5, characterized in that When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, the alarm is issued through the alarm module, including: When the stream processing module determines that the data source device is abnormal according to the keep-alive alarm information, it determines the alarm mode and target alarm device corresponding to the data source device; The stream processing module outputs corresponding alarm information to the target alarm device based on the alarm mode.
7. The method according to claim 6, characterized in that The warning method includes email warning, telephone warning and / or text message warning.
8. A data processing device for an Internet of Things platform, characterized in that: The Internet of Things platform includes a streaming processing module and multiple gateways, the streaming processing module is connected to each of the gateways, and each of the gateways is connected to one or more data source devices; The device is applied to the stream processing module; The device comprises: An acquisition unit, configured to acquire the converted device data sent by the gateway; wherein the converted device data is obtained by the gateway converting the device data based on a preset IoT dictionary model, and the device data is collected by the gateway from the connected data source device based on a predefined data protocol; A search unit, used to search for a target plug-in matching the gateway among multiple plug-ins in a preset plug-in pool; A processing unit, configured to perform streaming processing on the converted device data based on the target plug-in to obtain a corresponding processing result; The sending unit is used to send the processing result to the downstream module for processing.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data processing method of the Internet of Things platform according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data processing method for the Internet of Things platform according to any one of claims 1 to 7.