Internet of Things data processing method and device
Through pre-configured rule templates and adjustable rule node processing methods, the problem of insufficient support for the Internet of Things rule engine in business computing scenarios is solved, and flexible configuration and complex business processing of IoT business rules are realized, ensuring data Real-time and stability of processing.
Patent Information
- Application Number
- CN202411157108.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing IoT rule engine has low support in business computing scenarios, cannot flexibly configure business rules, cannot handle complex business models, and will affect the real-time and stability of data processing when adjusting business rules.
Provide an IoT data processing method, using pre-configured rule templates to process device data, support the connection and operation parameter adjustment of multiple rule nodes, and flexibly configure rule templates according to business goals to ensure real-time and stability of computing tasks. .
It realizes flexible configuration and complex business processing of IoT business rules, ensures real-time and stability of data processing, and supports the processing of multiple IoT business scenarios.
Smart Images

Figure CN119155352A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of Internet of Things, and in particular, to a method and device for processing Internet of Things data. Background Art
[0002] The IoT rule engine is a component embedded in an application that accepts data input, interprets business rules, and makes business decisions based on business rules. Current rule engines do not support business computing scenarios and have low usability. For example, it is inconvenient to reconfigure business rules and cannot handle complex businesses. Summary of the invention
[0003] In view of this, the purpose of the embodiments of the present application is to provide an Internet of Things data processing method and device.
[0004] Based on the above purpose, the embodiment of the present application provides an Internet of Things data processing method, including:
[0005] Receive device data;
[0006] Processing the device data using a rule template pre-configured according to the business objective to obtain a processing result; wherein the rule template includes a plurality of rule nodes, the connection order of the plurality of rule nodes is determined according to the business objective, and each rule node has an operation parameter pre-configured according to the business objective;
[0007] The processing result is sent to the target component configured by the business target.
[0008] Optionally, the method further includes:
[0009] When the business goal changes, the operating parameters of the rule node are adjusted according to the changed business goal, and / or the connection order of multiple rule nodes is adjusted.
[0010] Optionally, the processing of the device data using a rule template preconfigured according to a business objective includes:
[0011] Each rule node processes the device data or the intermediate data of the device data in sequence according to the configured operating parameters and in the connection order; wherein the intermediate data of the device data is obtained after the rule node processes the device data.
[0012] Optionally, the operating parameters include one or more of processing rules for the device data and / or intermediate data, execution conditions of rule nodes, and data flow conditions.
[0013] Optionally, the processing rule is a method for the rule node to process the device data and / or intermediate data; the data flow condition is that for two rule nodes with a connection relationship, when the previous rule node executes until the set data flow condition is met, the subsequent rule node continues to execute; the execution condition includes the requirements that need to be met when the rule node is executed.
[0014] Optionally, the rule template includes an original data set for storing the device data, a data flow data set for storing the intermediate data, and a global data set for storing global variables.
[0015] Optionally, the data in the global data set is stored in the form of key-value pairs in a first memory space based on a global identifier; the data in the data flow data set is stored in the form of key-value pairs in a second memory space based on a flow identifier; and the data in the original data set is stored in the form of key-value pairs in a third memory space based on an original identifier.
[0016] Optionally, the multiple rule nodes further include complex business processing nodes;
[0017] The processing of the device data using a rule template pre-configured according to a business objective also includes:
[0018] The complex business processing node reads intermediate data from the data flow data set, processes the intermediate data according to preset complex business rules, obtains complex business rule data, and writes the complex business rule data into the data flow data set; wherein the complex business rules are composed of multiple preset single processing rules.
[0019] Optionally, the method further includes:
[0020] A data table corresponding to the rule template is established, and the data table is used to save user information, the type of each rule node included in the rule template, and the operating parameters of each rule node.
[0021] The present application also provides an IoT data processing device, including:
[0022] A receiving module, used for receiving device data;
[0023] A processing module, used to process the device data using a rule template pre-configured according to the business objective to obtain a processing result; wherein the rule template includes a plurality of rule nodes, the connection order of the plurality of rule nodes is determined according to the business objective, and each rule node has an operation parameter pre-configured according to the business objective;
[0024] The sending module is used to send the processing result to the target component configured by the business target.
[0025] From the above, it can be seen that in the IoT data processing method and device provided by the embodiment of the present application, the user selects multiple rule nodes according to the business objectives, configures the connection relationship and operation parameters of the rule nodes, generates a rule template, uses the rule template to process the device data reported by the device, obtains the processing result, and sends the processing result to the target component. The rule template configuration is convenient and flexible, can support the processing scenarios of multiple IoT business rules, and is highly practical. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the business processing flow of the rule engine of an embodiment of the present application;
[0029] Figure 3 A graphical example diagram of a rule template according to an embodiment of the present application;
[0030] Figure 4 This is an example diagram of parameter configuration of a rule node in an embodiment of the present application;
[0031] Figure 5 This is a block diagram of the device structure of an embodiment of the present application;
[0032] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0034] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0035] As described in the background technology section, the IoT rule engine in the related technology does not support business computing scenarios. For example, it is not possible to flexibly and easily configure business rules for different business needs, and it is not possible to expand business functions; it is not possible to flexibly adjust the configured business rules; it is limited by the computing framework for implementing the rule engine, and there is a stop window period for computing tasks when adjusting business rules, that is, the adjustment of business rules will cause the interruption of computing tasks, affecting the real-time performance of data processing; data processing nodes need to use third-party interfaces to exchange data, and when the third-party interfaces are abnormal, it will affect stability and reliability; and it is unable to handle more complex business models.
[0036] In view of this, an embodiment of the present application provides an Internet of Things data processing method, which implements an Internet of Things rule engine based on a camel framework. For device data reported by devices in the Internet of Things, the device data is processed using a rule template pre-configured according to a business goal to obtain a processing result, and the processing result is sent to a target component configured by the business goal. The rule template can be flexibly configured according to the target business. When the target business changes, the rule template can be adjusted accordingly by simply modifying the operating parameters of the rule node. The real-time nature of the computing task can be guaranteed. The flow of message data is realized based on camel routing rules, which can ensure stability and reliability. Complex business processing nodes are realized by extending camel components, which can realize complex business processing.
[0037] The technical solution of the present application is further described in detail below through specific embodiments.
[0038] like Figure 1 , 2 As shown, the embodiment of the present application provides an Internet of Things data processing method, including:
[0039] S101: receiving device data;
[0040] In this embodiment, several devices are deployed in the Internet of Things, which collects data from each device and monitors, dispatches, and controls each device. Different types of devices are deployed in different application scenarios. For example, in the smart home scenario, the Internet of Things uniformly monitors various home devices, and in the industrial control scenario, the Internet of Things uniformly monitors various sensors, industrial equipment, etc.; accordingly, the device data includes device identification, device status (switch status, battery status, connection status, etc.), temperature and humidity data, water level data, voltage and current data, etc. The specific application scenarios, device types, and device data of the Internet of Things are not specifically limited.
[0041] S102: Processing the device data using a rule template pre-configured according to the business objective to obtain a processing result; wherein the rule template includes a plurality of rule nodes, the connection order of the plurality of rule nodes is determined according to the business objective, and each rule node has an operation parameter pre-configured according to the business objective;
[0042] S103: Send the processing result to the target component configured by the business target.
[0043] In this embodiment, in order to realize the monitoring of various types of devices by the Internet of Things, various types of devices uniformly report device data to a terminal used to realize the monitoring function of the Internet of Things, such as a central control platform or an edge-side control terminal. Such terminals uniformly collect device data of various types of devices, process the device data, and then uniformly dispatch and control various types of devices according to business needs. The executor of the Internet of Things data processing method provided in this embodiment is the terminal used to realize the monitoring function of the Internet of Things. Due to the variety of device types, the control methods of devices of the same or different types may be the same or different. It is necessary to formulate corresponding business rules in combination with specific business objectives, and process and regulate the reported device data according to the business logic corresponding to the business rules.
[0044] In this embodiment, the corresponding rule template is configured according to the business goal, and the device data reported by the device is processed using the rule template. After processing, the processing result is sent to the configured target component, thereby realizing the collection, processing and management of device data. For example, the business logic of the configured rule template is to alarm when the liquid level data collected by the liquid level meter at a specific location reaches a preset height threshold. The rule template filters the liquid level data at the specific location from the collected device data, determines whether the liquid level data reaches the height threshold, and controls the alarm unit to alarm when the height threshold is reached.
[0045] In some implementations, a rule engine for the Internet of Things is implemented based on the camel architecture, and corresponding rule templates are configured in the rule engine according to business objectives. The device data is transmitted to the rule engine via the data access component according to a preset protocol (e.g., Kafka, MQTT, HTTP), and the rule engine processes the reported device data using the configured rule template. Among them, the rule template defines the processing process of data flow, and the rule instance is a physical computing resource started by the camel routing engine operation management according to the processing process defined by the rule template. After the rule template is configured, the process of processing device data can be realized by starting and running the rule instance.
[0046] In some methods, when a user configures a rule template, he or she can also configure user information, that is, configure a rule template with user attributes. After configuration, the rule instance is associated with the user information to abstract the rule instance class, and the user manages the rule instance class within the scope of authority. For example, user A can modify and adjust the rule template A1 configured by him or her with information related to user A.
[0047] In this embodiment, the rule template includes multiple rule nodes, each rule node has a corresponding data processing function, and the selection of rule nodes, the operation parameters of rule nodes, and the connection order between rule nodes are all determined according to business objectives. Among them, the operation parameters of the rule nodes include one or more of the processing rules for device data and / or intermediate data, the execution conditions of the rule nodes, and the data flow conditions. Intermediate data refers to the data processed by the rule node on the original device data.
[0048] In some methods, the processing rules for device data and / or intermediate data define the specific methods for rule nodes to process device data and / or intermediate data, including but not limited to filtering device data and / or intermediate data according to set filtering conditions, calculating device data and / or intermediate data according to set calculation methods, converting device data and / or intermediate data according to set conversion methods, performing conditional judgment processing on device data and / or intermediate data according to set judgment conditions, and processing intermediate data according to set complex business rules.
[0049] The data flow condition refers to two rule nodes with a connection relationship, that is, two rule nodes with a sequential execution relationship. When the previous rule node (the rule node executed first) executes to meet the set data flow condition, the subsequent rule node (the rule node executed later) continues to execute. Among them, the data flow condition includes reaching the set execution time, the successful execution of the previous rule node, etc. For example, when the set delay time is reached, the previous rule node sends data to the subsequent rule node.
[0050] The execution conditions in the rule node include the requirements that are met when the rule node is executed. For example, when the rule node receives device data from a certain device and the device data is greater than the corresponding threshold value set, the forwarding of a certain data is executed. Considering that in some scenarios, the device data is in a state of continuous change, the set threshold can be set as a fixed threshold or a dynamically changing threshold. In some methods, a window function can be used to calculate the mean of the device data within a certain period of time as the threshold. The window function interval time (window time range) and sliding time (time interval for window calculation) can also be set to adjust the time for calculating the mean.
[0051] In some ways, rule nodes can be implemented based on component components in the camel architecture, and the types and functions of rule nodes can be flexibly expanded according to the scenario. The business encapsulation of rule nodes also meets the expansion requirements of distributed systems, such as supporting spring cloud and dubbo microservice frameworks. For rule nodes with large computational workloads, multi-threading can be used for concurrent computing to improve data processing efficiency.
[0052] In some embodiments, the device data is processed using a rule template preconfigured according to a business objective, including:
[0053] Each rule node processes the device data or the intermediate data of the device data in sequence according to the configured operating parameters and in the connection order; wherein the intermediate data of the device data is obtained after the rule node processes the device data.
[0054] In this embodiment, after configuring the rule template, when receiving device data, the rule template can be used to process the device data. During processing, each rule node of the rule template processes the device data and / or intermediate data in turn according to the set connection relationship, and each rule node processes the device data and / or intermediate data according to the set operating parameters. For example, the first rule node filters the received device data according to the set filtering conditions to obtain the device data that meets the filtering conditions (belonging to the intermediate data), the second rule node continues to convert the device data that meets the filtering conditions to obtain the converted device data (belonging to the intermediate data), the third rule node judges the converted device data according to the set judgment conditions, and when it is determined that the converted device data meets the set alarm conditions, the alarm unit is triggered to issue an alarm.
[0055] In some embodiments, the rule template includes an original data set for storing original device data, a data flow data set for storing intermediate data processed by the rule node, and a global data set for storing global variables. That is, in the process of data processing by the rule template, the original data set, the data flow data set, and the global data set are uniformly used to provide data support, so as to facilitate different levels of data processing based on different data sets at different stages of the process processing. For example, when a rule node processes the intermediate data in the data flow data set, it is necessary to read the corresponding original data in the original data set at the same time for comparison.
[0056] The original data set contains the originally reported device data and the corresponding attribute information. The attribute information of the device data includes business-related information such as data type, data unit, and data name. The attribute of the device data is set to read-only, that is, only device data can be read from the original data set. The data flow data set contains the intermediate data and the corresponding attribute information generated after any rule node processes the device data and / or intermediate data. The attribute information of the intermediate data includes the rule node identifier (that is, which rule node is the processing result of the intermediate data), type, etc.
[0057] Specifically, in the data processing process of the rule template, when the rule node needs to process the device data, the device data is read from the original data set; when the rule node needs to process the intermediate data, the intermediate data is read from the data flow data set; when the rule node generates intermediate data after processing, the intermediate data is written into the data flow data set.
[0058] In some methods, the data in the global data set is stored in the form of key-value pairs in a first memory space based on a global identifier, so that the rule node can read the required global variables from the first memory space in the manner of key-value pairs, for example, the key is the device model, and the value is a certain data value of the device. The data in the data flow data set is stored in the form of key-value pairs in a second memory space based on a flow identifier, so that the rule node can read the required intermediate data from the second memory space in the manner of key-value pairs. The data in the original data set is stored in the form of key-value pairs in a third memory space based on an original identifier, so that the rule node can read the required original data from the third memory space in the manner of key-value pairs.
[0059] like Figure 3 As shown, in some embodiments, the plurality of rule nodes include a filtering node, a delay node, a message distribution node, and an alarm node;
[0060] Use pre-configured rule templates to process device data based on business objectives, including:
[0061] The filtering node reads the device data from the original data set, filters the device data according to the preset filtering conditions, obtains the filtered device data, and writes the filtered device data into the data flow data set;
[0062] The delay node reads the filtered device data from the data flow data set, and waits for the set delay time when the filtered device data reaches the preset threshold; when the delay time is reached, the message distribution node is used to distribute the device data that reaches the threshold to the alarm node, and the alarm node is used for alarm processing.
[0063] This embodiment provides a rule template configuration method in an application scenario. In this scenario, temperature sensors are arranged at key locations of the warehouse. When the temperature rises to the temperature threshold and maintains for a period of time, an alarm is issued and the reported temperature value is recorded. In order to achieve this business goal, a filtering node, a delay node, a message distribution node, and an alarm node are selected, and the operating parameters of each node are configured according to the business goal. The filtering node is used to filter out the device data required to be monitored from the device data of each device received, that is, the temperature value monitored by the temperature sensor arranged at the key position; the delay node determines that the monitored temperature value reaches the set temperature threshold, and after reaching the temperature threshold for a period of time, an alarm is triggered, that is, the message distribution node is used to send the relevant information of the temperature sensor that reaches the temperature threshold to the alarm node, and the alarm node issues an alarm. The alarm node can also issue an alarm according to different alarm levels according to the specific situation of exceeding the temperature threshold. At the same time, the message distribution node can also send the relevant information of the temperature sensor that reaches the temperature threshold to the data storage node, and the data storage node is used to save the key data of monitoring.
[0064] In some embodiments, the plurality of rule nodes further include a complex business processing node; processing the device data using a rule template preconfigured according to a business objective further includes:
[0065] The complex business processing node reads the intermediate data from the data flow data set, processes the intermediate data according to the preset complex business rules, obtains the complex business rule data, and writes the complex business rule data into the data flow data set.
[0066] In this embodiment, in order to support complex business processing, a complex business processing node can be configured, and the complex business processing node reads intermediate data from the data flow data set, processes the intermediate data according to the set complex business rules, obtains complex business rule data, and then writes the complex business rule data into the data flow data set. Among them, the complex business rules are composed of multiple preset single processing rules, such as filtering rules, mean calculation rules, distribution rules, etc. The complex business processing node can be regarded as a composite rule node with multiple data processing functions. The complex business processing node is combined with a complex event processing engine in the component component, and the complex event processing engine siddhi is used to process the intermediate data according to the set complex business rules. In terms of technical implementation, the complex business processing node parses and converts the configured complex business rules to obtain a running task suitable for the complex event processing engine to process. When the complex business processing node processes the intermediate data, the complex event processing engine is called to perform complex pattern detection processing on the intermediate data according to the running task, and the processing result is returned to the complex business processing node after processing. For example, the data flow data set contains the liquid level data of multiple liquid level gauges that meet the screening conditions. The complex business node reads the liquid level data of each device from the data flow data set, and uses the complex event processing engine to determine in turn whether the liquid level data of each device reaches the first threshold. For the liquid level data of each device, it is determined by comparison whether it shows an upward trend compared with the previous liquid level data.
[0067] In some methods, the data interaction between the complex event processing engine Siddhi and the component is implemented through Java multi-threading. Since it is a multi-threaded asynchronous operation, thread lock technology is used to protect the data. For example, fair locks are added to the data (multiple threads obtain locks in the order in which they are applied for, and the threads will directly enter the queue. Only the first thread in the queue can obtain the lock) to ensure the correctness and integrity of data operations performed by different tasks.
[0068] In some embodiments, when a business goal changes, the operating parameters of the rule nodes are adjusted according to the changed business goal, and / or the connection order of multiple rule nodes is adjusted.
[0069] In the related technology, the rule engine implemented based on the flink and spark framework needs to generate business logic in advance using sql or java language and submit it to the flink or spark cluster, which is then parsed into computing tasks by the cluster. When the business goal changes, the current computing task needs to be stopped, and the changed business logic is regenerated by adjusting the code and submitted to the cluster. The cluster parses and generates new computing tasks, and executes the new computing tasks to achieve the changed business goals. The above process has a stop window period for the computing task, and cannot process device data in real time.
[0070] The rule engine provided in this embodiment configures the rule template according to the business goal. When the business goal changes, the overall function of the rule template can be adjusted by directly adjusting the operating parameters of one or more rule nodes in the rule template according to the changed business goal, and / or adjusting the execution order between the rule nodes. The changed business goal can be achieved by using the adjusted rule template, thereby meeting different business needs. That is, the purpose of updating the business goal can be achieved by simply adjusting the operating parameters of the rule nodes and adjusting the order of the nodes. There is no need to readjust the code, upload, and parse processes. The adjustment configuration is convenient and can ensure the real-time nature of business processing. For example, the initially configured rule template can achieve the business goal of starting the alarm when the liquid level rises to the first threshold. When the business goal is changed to start the alarm when the liquid level rises to the second threshold, it is only necessary to adjust the operating parameters of the rule nodes and adjust the threshold in the judgment condition from the first threshold to the second threshold. There is no need to restart the rule instance corresponding to the rule template.
[0071] It should be noted that the order of rule nodes needs to be adjusted according to certain rules based on the functions of the rule nodes. For example, for a rule node for intermediate data processing, it cannot be the first node because it needs to obtain the processing result of the previous rule node first.
[0072] In some embodiments, the rule template also includes a data table for storing user information, rule nodes and their operating parameters, that is, after the user configures the rule template, a data table corresponding to the rule template is established, and the data table is used to store user information, the type of each rule node included in the rule template, the operating parameters of each rule node, etc. When the rule template is readjusted, the corresponding data items in the data table are updated synchronously, that is, when the business objectives are changed and the operating parameters of the rule nodes are adjusted, the operating parameters of the corresponding rule nodes in the data table are updated synchronously.
[0073] In order to improve the data processing rate, when using rule templates for data processing, each rule node and the corresponding operating parameters are read from the data table for caching, and the rule nodes and their operating parameters are read from the cache for business logic processing; when adjusting the rule template, the corresponding data items in the data table and the cache are updated synchronously to achieve the effect of instant change. In some methods, the operating parameters of the rule nodes in the cache are encapsulated into a rule node configuration encapsulation class, and the rule node directly accesses the rule node configuration encapsulation class when executing to execute the corresponding business logic; when adjusting, the data items in the rule node configuration encapsulation class are updated, and the rule node accesses the updated rule node configuration encapsulation class to achieve the changed business goals.
[0074] In some embodiments, the configuration of the rule template is implemented based on a visual graphical interface. The user can select the required rule nodes in the visual graphical interface, configure the connection relationship between the rule nodes by connecting lines between the rule nodes, and enter the configured operating parameters through the configuration box of the rule node. For example, enter the node name in the configuration box to name the rule node, enter the filtering condition, so that the rule node filters the reported device data according to the filtering condition, such as Figure 4 As shown, the screening conditions include, for example, device type, device name, device attributes, etc. The rule node screens out the device data to be processed from all reported device data according to the set device type, device name, and device attributes.
[0075] In some ways, a visual graphical interface is developed based on the vue front-end technology, which is easy to operate and flexible to configure. In terms of technical implementation, the front-end interface encapsulates the configuration information related to the rule nodes of the rule template into interface parameters based on the pre-defined data exchange specification and passes it to the back-end business logic interface. The business logic interface receives the passed parameters, obtains the connection information between the rule nodes, the running parameters of the rule nodes, etc. through parsing, and generates the router (routing) rules for executing the business logic based on the parsed information. The camel framework executes the router rules to implement the corresponding business logic.
[0076] In some methods, the target components include but are not limited to alarm units, devices in the Internet of Things, other terminal devices, etc., which can be flexibly configured according to business objectives. For example, when the state of device B is detected to have changed, a control signal is sent to device C; when the state of device D is detected to have changed, a notification message is sent to the user terminal, etc.
[0077] In the IoT data processing method provided in the embodiment of the present application, the user can select the rule node in the visual graphical interface, determine the connection relationship between the rule nodes, configure the operation parameters of the rule node, and generate the corresponding rule template. Utilize each rule node in the rule template to process the device data and / or intermediate data in sequence according to the configured business rules, so as to implement the predetermined business logic and achieve the business goals. When the business goals change, only the operation parameters of the rule node need to be adjusted, and there is no need to restart the rule instance to meet the real-time requirements; the rule node supports the configuration of various business rules, and can support complex business processing by calling the complex event processing engine; based on the camel routing rules, the data flow between the rule nodes can be realized, which can ensure stability and reliability.
[0078] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0079] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0080] like Figure 5 As shown, an embodiment of the present application provides a data processing device, including:
[0081] A receiving module, used for receiving device data;
[0082] A processing module, used to process the device data using a rule template pre-configured according to the business objective to obtain a processing result; wherein the rule template includes a plurality of rule nodes, the connection order of the plurality of rule nodes is determined according to the business objective, and each rule node has an operation parameter pre-configured according to the business objective;
[0083] The sending module is used to send the processing results to the target component configured by the business goal.
[0084] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0085] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0086] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0087] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0088] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0089] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0090] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0091] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0092] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0093] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0094] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0095] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0096] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0097] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0098] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present disclosure.
Claims
1. A method for processing Internet of Things data, characterized in that: include: Receive device data; Processing the device data using a rule template pre-configured according to the business objective to obtain a processing result; wherein the rule template includes a plurality of rule nodes, the connection order of the plurality of rule nodes is determined according to the business objective, and each rule node has an operation parameter pre-configured according to the business objective; The processing result is sent to the target component configured by the business target.
2. The method according to claim 1, characterized in that Also includes: When the business goal changes, the operating parameters of the rule node are adjusted according to the changed business goal, and / or the connection order of multiple rule nodes is adjusted.
3. The method according to claim 1, characterized in that The processing of the device data using a rule template pre-configured according to a business objective includes: Each rule node processes the device data or the intermediate data of the device data in sequence according to the configured operating parameters and in the connection order; wherein the intermediate data of the device data is obtained after the rule node processes the device data.
4. The method according to claim 3, characterized in that The operation parameters include one or more of the processing rules for the device data and / or intermediate data, the execution conditions of the rule nodes, and the data flow conditions.
5. The method according to claim 4, characterized in that The processing rule is the method by which the rule node processes the device data and / or intermediate data; the data flow condition is that for two rule nodes with a connection relationship, when the previous rule node is executed to meet the set data flow condition, the subsequent rule node continues to execute; the execution condition includes the requirements that need to be met when the rule node is executed.
6. The method according to claim 3, characterized in that: The rule template includes an original data set for storing the device data, a data flow data set for storing the intermediate data, and a global data set for storing global variables.
7. The method according to claim 6, characterized in that The data in the global data set is stored in a first memory space based on a global identifier in the form of a key-value pair; the data in the data flow data set is stored in a second memory space based on a flow identifier in the form of a key-value pair; The data in the original data set is stored in a third memory space based on the original identifier in the form of key-value pairs.
8. The method according to claim 6, characterized in that The multiple rule nodes also include complex business processing nodes; The processing of the device data using a rule template preconfigured according to the business objective also includes: The complex business processing node reads intermediate data from the data flow data set, processes the intermediate data according to preset complex business rules, obtains complex business rule data, and writes the complex business rule data into the data flow data set; wherein the complex business rules are composed of multiple preset single processing rules.
9. The method according to claim 1 or 2, characterized in that: Also includes: A data table corresponding to the rule template is established, and the data table is used to save user information, the type of each rule node included in the rule template, and the operating parameters of each rule node.
10. An Internet of Things data processing device, characterized in that: include: A receiving module, used for receiving device data; A processing module, used to process the device data using a rule template pre-configured according to the business objective to obtain a processing result; wherein the rule template includes a plurality of rule nodes, the connection order of the plurality of rule nodes is determined according to the business objective, and each rule node has an operation parameter pre-configured according to the business objective; The sending module is used to send the processing result to the target component configured by the business target.
Citation Information
Patent Citations
Service orchestration execution method based on rule engine and related equipment
CN114443042A
Service processing method and device based on rule engine, computer equipment and medium
CN115033816A
