CN115250237B - Rule engine method and device for Internet of things - Google Patents

Rule engine method and device for Internet of things Download PDF

Info

Publication number
CN115250237B
CN115250237B CN202210839188.3A CN202210839188A CN115250237B CN 115250237 B CN115250237 B CN 115250237B CN 202210839188 A CN202210839188 A CN 202210839188A CN 115250237 B CN115250237 B CN 115250237B
Authority
CN
China
Prior art keywords
rule
actor
message
chain
rule chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210839188.3A
Other languages
Chinese (zh)
Other versions
CN115250237A (en
Inventor
丁梦浩
李利民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Software Group Co Ltd
Original Assignee
Inspur Software Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Software Group Co Ltd filed Critical Inspur Software Group Co Ltd
Priority to CN202210839188.3A priority Critical patent/CN115250237B/en
Publication of CN115250237A publication Critical patent/CN115250237A/en
Application granted granted Critical
Publication of CN115250237B publication Critical patent/CN115250237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/16Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using machine learning or artificial intelligence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of rule engines, in particular to a rule engine method of the Internet of things, which comprises the following steps: s1, realizing a rule chain based on an Actor distributed concurrency model, applying an Actor, receiving the message by the application Actor when the equipment sends the message to a platform, and sending the message to a user Actor corresponding to the supervised message; s2, a visual rule chain is realized at the front end; and S3, combining the rule chain with equipment and products. Compared with the prior art, the rule engine with the visualized rule chain has the advantages that the rule engine is visualized, so that the configuration is more flexible and the realized functions are more perfect when the rule engine is configured.

Description

Rule engine method and device for Internet of things
Technical Field
The invention relates to the technical field of rule engines, and particularly provides a method and a device for a rule engine of the Internet of things.
Background
The Internet of things is divided into a perception layer, a network layer, a platform layer and an application layer. The internet of things platform realizes equipment access, equipment management, security management, message communication and the like, is responsible for integrating the data collected by the sensing layer, processing the data and submitting effective information to the application layer for use.
The rule engine is an important function of the platform layer of the Internet of things, and can process data transmitted by equipment with the help of the rule engine and the message queue, so that rich functions of equipment message reminding, equipment alarming, data storage, equipment calling, third party service calling, message forwarding and the like are realized.
The concept of the Actor distributed concurrency model is that everything is an Actor, all logic and modules can be regarded as the Actor, all the actors can communicate with each other, a rule chain is realized through the Actor, and large-scale equipment access can be realized.
The Internet of things rule engine collects data on an Internet of things platform layer, analyzes the data and controls the flow direction of the data. In the existing rule engines, some rule chains which do not support visualization are arranged, so that the rule engines can only forward messages reported by equipment and cannot forward messages with changed equipment states when forwarding data; when subscribing to the topic, the filtering function is lacking, the function is single, and the like. For a rule engine with a visual rule chain, a large amount of JS codes need to be written when the rule chain is configured, and a certain difficulty is brought to use.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides the rule engine method of the Internet of things, which has strong practicability.
The invention further aims to provide the rule engine device of the internet of things, which is reasonable in design, safe and applicable.
The technical scheme adopted for solving the technical problems is as follows:
an internet of things rule engine method comprises the following steps:
s1, realizing a rule chain based on an Actor distributed concurrency model, applying an Actor, receiving the message by the application Actor when the equipment sends the message to a platform, and sending the message to a user Actor corresponding to the supervised message;
s2, a visual rule chain is realized at the front end;
and S3, combining the rule chain with equipment and products.
Further, in step S1, the user Actor finds the device ID according to the message, and further finds the corresponding device Actor;
the device Actor transmits the outbound message back to the user Actor, and the user Actor processes the message and then transmits the message to the rule chain Actor of the corresponding device, wherein the rule chain Actor can judge whether a rule node Actor exists or not.
Further, whether a rule node Actor exists is judged, if yes, the message is transmitted to the rule node Actor, the rule node Actor processes a message payload according to node processing logic, and sends operations such as the message to a third party, and then an outbound message is generated.
Further, the outbound message is transmitted back to the rule chain Actor, the rule chain Actor judges the relationship between the rule node actors, and the message is transmitted to the rule node Actor or other rule chain actors.
Further, in step S2, the front end implements a visualized rule chain, the back end transmits the information of the rule node to the front end, the front end completes mapping of the patterned node and the rule node of the back end, and implements a patterned node of the front end for each back end Actor, and the front end flexibly constructs the rule chain in a visualized manner.
Further, in step S3, a rule chain is combined with the device and the product, the rule obtains the product and the device information, and the nodes of the rule chain for screening, converting, filtering and obtaining the information are configured.
Further, the rule chains of the products inherit from the default rule chains, and each product has own rule chain when the product is created;
when the equipment is created, the product to which the equipment belongs is selected, and the equipment inherits the information of rule chains, attributes, functions and alarm settings of the product to which the equipment belongs.
Further, the device selects to use the rule chain of the product, or inherits the rule chain of the product and then creates a new rule chain;
the device selection to create a new rule chain may add some special configuration to a particular device.
An internet of things rule engine apparatus comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program to execute an internet of things rule engine method.
Compared with the prior art, the rule engine method and the rule engine device for the Internet of things have the following outstanding beneficial effects:
the invention can realize the basic functions of the Internet of things engine such as equipment linkage, data forwarding and the like. The rule engine with the visual rule chain enables configuration to be more flexible and functions to be more perfect when the rule engine is configured through the visual rule engine.
When the rule chain is configured, the attributes of the products and the equipment can be obtained, and when the functions of filtering, forwarding and the like of the rule chain are used, complex programs are not required to be written, so that the configuration of the rule chain is simplified.
The rule chain is associated with the product and the equipment, the relation between the rule chain and the product equipment is clear, and when the equipment uses the rule engine, the rule chain of the product can be used, or the rule chain of the product can be inherited and then the part of the special modification can be carried out.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a rule engine method of the Internet of things;
FIG. 2 is a schematic diagram of an Actor model rule chain in an Internet of things rule engine method;
FIG. 3 is a schematic diagram of rule chains and product, equipment associations in an Internet of things rule engine method;
FIG. 4 is a schematic diagram of a rules engine of a physical network in an Internet of things rules engine method;
fig. 5 is a basic functional schematic diagram of a rule engine in an internet of things rule engine method.
Detailed Description
In order to provide a better understanding of the aspects of the present invention, the present invention will be described in further detail with reference to specific embodiments. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
A preferred embodiment is given below:
as shown in fig. 1-5, the rule engine method of the internet of things in this embodiment includes the following steps:
s1, realizing a rule chain based on an Actor distributed concurrency model, applying an Actor, receiving the message by the application Actor when the equipment sends the message to a platform, and sending the message to a user Actor corresponding to the supervised message.
The user Actor finds the equipment ID according to the message, and then finds the corresponding equipment Actor; the device Actor transmits the outbound message back to the user Actor, the user Actor processes the message and then transmits the message to the rule chain Actor of the corresponding device, and the rule chain Actor judges whether a rule node Actor exists or not;
if so, the message is transmitted to a rule node Actor, which processes the message payload according to the node processing logic, such as screening data, transforming data, saving data, creating an alarm, sending a message to a third party, and the like.
Then generating an outbound message; the outbound message is transmitted back to the rule chain actors, the rule chain actors judge the relationship among the rule node actors, and the message is transmitted to the rule node actors or other rule chain actors.
S2, the front end realizes a visualized rule chain, the back end transmits information (name, description and required information) of the rule nodes to the front end, the front end completes mapping of the graphical nodes and the rule nodes of the back end, the front end realizes a graphical node of the front end for each back end Actor, and the front end can flexibly construct the rule chain in a visualized mode.
S3, combining the rule chain with the equipment and the product to realize the function that the rule chain can acquire information such as the attribute, the function and the like of the product and the equipment; and meanwhile, the functions of inheritance and modification of the rule chains of the products and the devices are realized.
The rule chain can acquire information of products and equipment, and when nodes of the rule chain are configured for screening, converting, filtering and acquiring information, a large number of JS codes can be prevented from being written, and configuration difficulty is reduced.
The rule chains of the products inherit from the default rule chains, and each product has its own rule chain when the product is created. When the equipment is created, the product to which the equipment belongs is selected, and the equipment inherits information such as rule chains, attributes, functions, alarm settings and the like of the product to which the equipment belongs, so that one equipment in the product can be simply added.
The device may choose to use the rule chain of the product to which it belongs or inherit the rule chain of the product and then create a new rule chain. The device selection to create a new rule chain may add some special configuration to a particular device.
Based on the above method, an internet of things rule engine device in this embodiment includes: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program to execute an internet of things rule engine method.
The above specific embodiments are merely illustrative of specific cases of the present invention, and the scope of the present invention includes, but is not limited to, the specific embodiments described above, and any suitable changes or substitutions made by one of ordinary skill in the art, which are in accordance with the method and apparatus claims of the rule engine of the internet of things of the present invention, shall fall within the scope of the present invention.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (6)

1. The rule engine method of the Internet of things is characterized by comprising the following steps of:
s1, realizing a rule chain based on an Actor distributed concurrency model, applying an Actor, receiving the message by the application Actor when the equipment sends the message to a platform, and sending the message to a user Actor corresponding to the supervised message;
s2, a visual rule chain is realized at the front end;
s3, combining the rule chain with equipment and products;
combining a rule chain, equipment and a product, wherein the rule acquires product and equipment information, and configures nodes for screening, converting, filtering and acquiring information of the rule chain;
the rule chain of the product inherits from the default rule chain, and each product has own rule chain when the product is created;
when equipment is created, selecting a product to which the equipment belongs, and inheriting the rule chain, attribute, function and alarm setting information of the product to which the equipment belongs;
the device selects to use the rule chain of the product, or inherits the rule chain of the product and then creates a new rule chain;
the device selection to create a new rule chain may add some special configuration to a particular device.
2. The method of claim 1, wherein in step S1, the user Actor finds a device ID according to the message, and further finds a corresponding device Actor;
the device Actor transmits the outbound message back to the user Actor, and the user Actor processes the message and then transmits the message to the rule chain Actor of the corresponding device, wherein the rule chain Actor can judge whether a rule node Actor exists or not.
3. The method of claim 1 or 2, wherein it is determined whether a rule node Actor is present, and if so, the message is transmitted to the rule node Actor, which processes the message payload according to the node processing logic, sends the message operation to a third party, and then generates the outbound message.
4. A method according to claim 3, wherein the outbound message is sent back to a rule chain Actor, the rule chain Actor determines the relationship between rule node actors, and the message is sent to the rule node Actor or other rule chain Actor.
5. The method of rule engine of internet of things according to claim 3, wherein in step S2, the front end realizes a visualized rule chain, the back end transmits information of rule nodes to the front end, the front end completes mapping of the graphical nodes and the rule nodes of the back end, the front end realizes a graphical node of the front end for each back end Actor, and the front end flexibly constructs the rule chain in a visualized manner.
6. An internet of things rule engine apparatus, comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor being configured to invoke the machine readable program to perform the method of any of claims 1 to 5.
CN202210839188.3A 2022-07-18 2022-07-18 Rule engine method and device for Internet of things Active CN115250237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210839188.3A CN115250237B (en) 2022-07-18 2022-07-18 Rule engine method and device for Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210839188.3A CN115250237B (en) 2022-07-18 2022-07-18 Rule engine method and device for Internet of things

Publications (2)

Publication Number Publication Date
CN115250237A CN115250237A (en) 2022-10-28
CN115250237B true CN115250237B (en) 2024-04-12

Family

ID=83699675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210839188.3A Active CN115250237B (en) 2022-07-18 2022-07-18 Rule engine method and device for Internet of things

Country Status (1)

Country Link
CN (1) CN115250237B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278384B (en) * 2023-11-21 2024-03-15 千巡科技(深圳)有限公司 Linkage alarm realization method, system and device based on rule chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941420A (en) * 2019-11-22 2020-03-31 绿漫科技有限公司 Rule engine system and method based on Actor model
CN112612604A (en) * 2020-12-14 2021-04-06 上海哔哩哔哩科技有限公司 Task scheduling method and device based on Actor model
CN113296983A (en) * 2021-06-03 2021-08-24 上海托旺数据科技有限公司 Internet of things platform supporting high data concurrency
CN114338738A (en) * 2021-12-23 2022-04-12 中国联合网络通信集团有限公司 Actor model-based rule engine and scene linkage implementation method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8141139B2 (en) * 2007-11-14 2012-03-20 International Business Machines Corporation Federated single sign-on (F-SSO) request processing using a trust chain having a custom module
US10542046B2 (en) * 2018-06-07 2020-01-21 Unifyvault LLC Systems and methods for blockchain security data intelligence
GB201810645D0 (en) * 2018-06-28 2018-08-15 Microsoft Technology Licensing Llc Generalized actor model programming

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941420A (en) * 2019-11-22 2020-03-31 绿漫科技有限公司 Rule engine system and method based on Actor model
CN112612604A (en) * 2020-12-14 2021-04-06 上海哔哩哔哩科技有限公司 Task scheduling method and device based on Actor model
CN113296983A (en) * 2021-06-03 2021-08-24 上海托旺数据科技有限公司 Internet of things platform supporting high data concurrency
CN114338738A (en) * 2021-12-23 2022-04-12 中国联合网络通信集团有限公司 Actor model-based rule engine and scene linkage implementation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Actor模型的浮式保障平台数据采集系统设计;陆俊杰;计算机测量与控制;全文 *

Also Published As

Publication number Publication date
CN115250237A (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN102436371B (en) Method and device for constructing context-aware middleware facing to pervasive environment
CN109086894A (en) A kind of warning message centring system of facing area genco
CN106446256B (en) Industrial real-time production information perception system based on context calculation
US20170078448A1 (en) Systems and Methods For Socializing Machines Using Autonomous Software Agents
JP2007531939A (en) Provision of corporate information
CN106973118A (en) Generation and the method and apparatus of subscribing notification
CN110188099A (en) A kind of data managing method and device
CN107220301A (en) The data monitoring method and device of a kind of configurableization
CN115250237B (en) Rule engine method and device for Internet of things
CN111935241B (en) Edge service intelligent cooperation method based on data distribution network
CN114189444A (en) Method for managing industrial end equipment, time-sensitive network controller and system
Alaya et al. FRAMESELF: an ontology‐based framework for the self‐management of machine‐to‐machine systems
CN104517189A (en) Event-based system and event-based method for cooperation among workflows
CN114124649B (en) Gateway communication method, system and gateway equipment based on MQTT and message contract
Solmaz et al. ALACA: A platform for dynamic alarm collection and alert notification in network management systems
Singh et al. Event handling for distributed real-time cyber-physical systems
Bhargavi et al. Dynamic complex event processing—adaptive rule engine
CN103546433B (en) Information synchronization system and method
WO2020037634A1 (en) Information monitoring system and method for industrial control device network, computer readable storage medium, and computer device
Cafezeiro et al. Specifying ubiquitous systems through the algebra of contextualized ontologies
CN105607983A (en) Data exception monitoring method and apparatus
Schreiber et al. Context-aware self adapting systems: a ground for the cooperation of data, software, and services
Pan et al. Quality monitoring and measuring for internet of services
CN105725991B (en) health monitoring system based on intelligent agent
Koziuk et al. Mobile context-addressable messaging with dl-lite domain model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant