Data processing and forwarding system and method based on Internet of Things platform
By using message queues to transmit messages between the IoT platform and the distributed streaming platform, and defining rules for data processing and forwarding, the existing technology problems of difficulty in development and high maintenance costs of the big data platform are solved, and data is realized. Real-time processing and specific scenario business binding improve data utilization.
Patent Information
- Application Number
- CN202310256027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2024-09-10
AI Technical Summary
The existing IoT platform data processing solutions are difficult to develop, cannot meet business needs, are difficult to bind to the IoT platform, and the maintenance cost of the big data platform is high.
Adopt a data processing and forwarding system based on the Internet of Things platform and distributed streaming processing platform to transmit messages through message queues. Define rules including Topic type, forwarding fields, forwarding conditions, forwarding targets, execution conditions and execution actions to achieve real-time data processing and forwarding.
It reduces development difficulty and maintenance costs, improves data utilization, realizes business binding and data processing and forwarding in specific scenarios, and has lightweight characteristics.
Smart Images

Figure CN118626285A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Things, and in particular relates to a data processing and forwarding system and method based on an Internet of Things platform. Background Art
[0002] The current IoT platform has many types of data and a large amount of data, but not all data is valuable. How to obtain and effectively use valuable data is crucial. The existing solution for processing IoT platform data is based on the built-in rule engine module of middleware such as EMQX to filter the data, and then send the data to the big data platform for processing.
[0003] The existing development method requires developers to be familiar with the functions of each module component of the middleware. Secondary development is difficult and it is difficult to meet specific business needs. It can only process the original data and cannot process the extended data. It is difficult to bind with the IoT platform to complete the triggering of characteristic scenes and actions. In addition, the big data platform is large and heavy, and the maintenance and operation costs are high. Summary of the invention
[0004] The purpose of the present invention is to overcome the existing development methods, which require developers to be familiar with the functions of each module component of the middleware, and the difficulty of secondary development is large. It is difficult to meet the specific needs of the business, and can only process the original data, and cannot process according to the extended data. It is difficult to bind with the Internet of Things platform to complete the triggering of characteristic scenes and actions, and the big data platform is large and heavy, and the maintenance and operation costs are high.
[0005] In order to achieve the above object, the present invention proposes a data processing and forwarding system based on the Internet of Things platform, the system comprising:
[0006] The IoT platform is used to create and manage rules, convert rules into tasks and deploy them on the distributed stream processing platform for execution; it is also used to execute actions based on the rules; and
[0007] Distributed stream processing platform, used to provide a support environment for task operation.
[0008] As an improvement of the above system, the system further comprises:
[0009] Message queues are used to store messages in a queue format and serve as containers for transmitting messages between the IoT platform and the distributed streaming processing platform.
[0010] As an improvement of the above system, the content of the rule includes: Topic type, forwarding field, forwarding condition, forwarding target, execution condition and execution action; wherein,
[0011] Topic type is used to configure the type of data collected by the rule;
[0012] The forwarding field is the data field that needs to be obtained during forwarding;
[0013] The forwarding condition is the condition that needs to be met when forwarding data;
[0014] The forwarding target is the source of the data to be forwarded;
[0015] Execution conditions are the conditions that need to be met when data triggers the execution of the scenario;
[0016] The execution action is the specific action information to be performed when the execution scenario is triggered.
[0017] As an improvement of the above system, the tasks include data processing tasks and data forwarding tasks;
[0018] The data processing task first cleans the data that meets the execution conditions, then processes the data according to the execution action, and adds the execution action command to the data;
[0019] The data forwarding task is to forward the forwarding field of the data to the forwarding target according to the forwarding condition.
[0020] As an improvement of the above system, the processing process of the data processing task is as follows:
[0021] Receive data of the type defined in the rule from the message queue;
[0022] Clean the data;
[0023] Process the received data according to the defined rules and add execution action commands;
[0024] Send the processed data to the message queue.
[0025] As an improvement of the above system, the execution process of the data forwarding task is:
[0026] Receive data with specified rules from the message queue;
[0027] According to the forwarding conditions and forwarding targets defined in the rules, the data is sent to the data source or sent to the data source through a message queue.
[0028] The present application also provides a method for data processing and forwarding based on the IoT platform, based on the above system implementation, the method includes:
[0029] Step S1: The IoT platform sends data to the distributed streaming processing platform;
[0030] Step S2: The distributed streaming processing platform receives the data, processes the data, and sends the processed data to the IoT platform;
[0031] The distributed streaming processing platform receives data and forwards it to the data source;
[0032] Step S3: The IoT platform receives data sent by the distributed streaming processing platform and executes actions according to the rules.
[0033] As an improvement of the above method, the data transmission between the IoT platform and the distributed streaming processing platform uses a message queue as an intermediary, the data is first sent to the message queue, and the other party obtains the data from the message queue.
[0034] Compared with the prior art, the advantages of the present invention are:
[0035] The present invention provides a method for data processing and forwarding, which can process and forward the IoT data collected by the IoT platform in real time, and perform simple logical processing according to different business scenarios, thereby improving data utilization and making the data bring more value.
[0036] The present invention does not require developers to master the above-mentioned complex development technologies and the operation and maintenance of the big data platform, which reduces the technical threshold and usage costs, and can realize the processing and forwarding of data and business binding for specific scenarios, and has the characteristics of being lightweight. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 The figure shows a working sequence diagram of the data processing and forwarding method based on the Internet of Things platform. DETAILED DESCRIPTION
[0038] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.
[0039] The present application provides a data processing and forwarding system based on the Internet of Things platform, which includes the Internet of Things platform, a message queue and a distributed streaming processing platform.
[0040] The IoT platform is used to create and manage rules, convert rules into tasks and run them on the distributed streaming processing platform; it is also used to execute actions based on the rules.
[0041] The created rule information mainly includes rule name, topic type, rule description, forwarding field, forwarding condition, forwarding target, execution condition, execution action, etc.
[0042] The Topic type is used to configure the type of data collected by the rule, such as device message reporting, device attribute reporting, etc.
[0043] The rule description is a description of the rule information.
[0044] The forwarding field is the data field that needs to be obtained.
[0045] The forwarding condition is the condition that needs to be met when forwarding data.
[0046] The execution condition is the condition that needs to be met when the data triggers the execution scenario.
[0047] The forwarding target is the data source to which the data is to be forwarded, including Mysql, Kafka, Http, etc.
[0048] The execution action is the specific action information to be performed when the execution scenario is triggered, such as setting a device attribute to 1, issuing an alarm, etc.
[0049] The tasks include data processing tasks and data forwarding tasks.
[0050] The data processing task first cleans the data that meets the execution conditions, then processes the data according to the execution action, and adds the execution action command to the data.
[0051] The data forwarding task is to forward the forwarding field of the data to the forwarding target according to the forwarding conditions.
[0052] Message queue, used to store messages in queue mode, as a container for transmitting messages between the IoT platform and the distributed streaming processing platform;
[0053] Distributed stream processing platform, used to provide a support environment for task operation.
[0054] The present application also provides a data processing and forwarding method based on the Internet of Things platform, which creates and manages rules for the massive data of the Internet of Things platform, filters and processes the data according to the defined rules, and associates it with related services and scenarios to complete the directional forwarding of data and the execution of scenario actions. This method is based on a distributed streaming processing platform, and according to the rules created and generated by the platform, it processes the data of the Internet of Things platform in real time, forwards it to the specified data source, and associates it with specific scenario services to trigger corresponding execution actions.
[0055] like Figure 1 As shown, the data processing and forwarding method based on the IoT platform includes:
[0056] Step 1: The user creates specific rule information on the IoT platform.
[0057] Step 2: Start the created rules on the IoT platform.
[0058] Step 3: The IoT platform converts the created rule information into data processing tasks and deploys them on the distributed streaming processing platform.
[0059] Step 4: The IoT platform converts the created rule information into a data forwarding task and deploys it on the distributed streaming processing platform.
[0060] Step 5: The IoT platform sends the data to the message queue.
[0061] Step 6: The data processing task receives data of the type defined in the rule from the message queue.
[0062] Step 7: The data processing task first cleans the data that meets the execution conditions (for example, removes invalid data, etc.), then processes the data according to the execution action, and adds the execution action command to the data.
[0063] Step 8: The data processing task sends the processed data to the message queue.
[0064] Step 9: The data forwarding task receives data with specified rules from the message queue.
[0065] Step 10: The data forwarding task sends the data to the destination data source or forwards it to the destination data source through a message queue according to the forwarding conditions and forwarding targets defined in the rules.
[0066] Step 11: The IoT platform consumes the data in the message queue and completes the execution action specified by the execution action command in the rule.
[0067] Let's take an actual data processing process as an example to describe it:
[0068] The user creates a data forwarding rule on the IoT platform. In the rule, the Topic type is device attribute reporting, the forwarding field is deviceId (device id), the forwarding condition is deviceId (device id) = 1, and the forwarding target is kafka.
[0069] After starting this rule, the data forwarding task will filter the received data of device attribute reporting type, take out the deviceId field in the data that satisfies deviceId (device id) = 1, and forward it to the corresponding kafka data source.
[0070] The user creates a scene linkage rule on the IoT platform. The Topic type in the rule is device attribute reporting, the execution condition is that the switch attribute value of the device with deviceId (device id) = 1 is on, and the execution action is that the switch attribute value of the device with deviceId (device id) = 2 is set to on.
[0071] After starting this rule, the data processing task will judge and process the data of the device attribute reporting type received. If the switch attribute value in the reported data with deviceId (device id) = 1 is on, then the switch attribute value of the device with deviceId (device id) = 2 will be set to on and write data as the execution action command. After the IoT platform obtains the data, it will set the switch attribute value of the device with deviceId (device id) = 2 to write on.
[0072] The data processing and forwarding system based on the IoT platform provided in this application can process and forward the IoT data collected by the IoT platform in real time, and perform simple logical processing according to different business scenarios to improve data utilization and make the data bring more value.
[0073] This application does not require developers to master the above-mentioned complex development technologies and the operation and maintenance of the big data platform, which reduces the technical threshold and usage costs, and can realize data processing and forwarding and business binding for specific scenarios, and has the characteristics of being lightweight.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention and should be included in the scope of the claims of the present invention.
Claims
1. A data processing and forwarding system based on the Internet of Things platform, characterized in that: The system comprises: The IoT platform is used to create and manage rules, convert rules into tasks and deploy them on the distributed stream processing platform for execution; it is also used to execute actions based on the rules; and Distributed stream processing platform, used to provide a support environment for task operation.
2. The data processing and forwarding system based on the Internet of Things platform according to claim 1 is characterized in that: The system further comprises: Message queues are used to store messages in a queue format and serve as containers for transmitting messages between the IoT platform and the distributed streaming processing platform.
3. The data processing and forwarding system based on the Internet of Things platform according to claim 1 is characterized in that: The content of the rule includes: Topic type, forwarding field, forwarding condition, forwarding target, execution condition and execution action; wherein, Topic type is used to configure the type of data collected by the rule; The forwarding field is the data field that needs to be obtained during forwarding; The forwarding condition is the condition that needs to be met when forwarding data; The forwarding target is the source of the data to be forwarded; Execution conditions are the conditions that need to be met when data triggers the execution of the scenario; The execution action is the specific action information to be performed when the execution scenario is triggered.
4. The data processing and forwarding system based on the Internet of Things platform according to claim 1 is characterized in that: The tasks include data processing tasks and data forwarding tasks; The data processing task first cleans the data that meets the execution conditions, then processes the data according to the execution action, and adds the execution action command to the data; The data forwarding task is to forward the forwarding field of the data to the forwarding target according to the forwarding condition.
5. The data processing and forwarding system based on the Internet of Things platform according to claim 4 is characterized in that: The processing process of the data processing task is as follows: Receive data of the type defined in the rule from the message queue; Clean the data; Process the received data according to the defined rules and add execution action commands; Send the processed data to the message queue.
6. The data processing and forwarding system based on the Internet of Things platform according to claim 4 is characterized in that: The execution process of the data forwarding task is as follows: Receive data with specified rules from the message queue; According to the forwarding conditions and forwarding targets defined in the rules, the data is sent to the data source or sent to the data source through a message queue.
7. A method for data processing and forwarding based on an Internet of Things platform, implemented based on any system according to any one of claims 1 to 6, the method comprising: Step S1: The IoT platform sends data to the distributed streaming processing platform; Step S2: The distributed streaming processing platform receives the data, processes the data, and sends the processed data to the IoT platform; The distributed streaming processing platform receives data and forwards it to the data source; Step S3: The IoT platform receives data sent by the distributed streaming processing platform and executes actions according to the rules.
8. The method for data processing and forwarding based on the Internet of Things platform according to claim 7, characterized in that: The data transmission between the IoT platform and the distributed streaming processing platform uses the message queue as an intermediary. The data is first sent to the message queue, and the other party obtains the data from the message queue.
