Rule engine using method and rule engine
By introducing a rule engine into the IoT platform, obtaining access platform information and trigger conditions in real time, and determining and executing business rules, the problem of insufficient alarm mechanism of the existing IoT platform in industrial applications is solved, and faster response and lower development costs are achieved.
Patent Information
- Application Number
- PCT/CN2023/120741
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-15
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-20
AI Technical Summary
The existing Internet of Things platform's alarm mechanism is not flexible enough in industrial applications and cannot effectively deal with complex industrial application scenarios. The alarm rules in different industries are complex, resulting in large amounts of code, many logical branches, and huge maintenance workload.
Provide a rule engine usage method and rule engine, which can determine business rules based on the rule creation module, including message module, rule node module and rule chain module, determine business decisions based on business rules and platform trigger conditions, and execute business decisions to respond to user needs.
Reduces the workload of development and modification, can respond to customer needs faster, saves development costs, and improves the flexibility and adaptability of IoT platforms in industrial applications.
Smart Images

Figure CN2023120741_20032025_PF_FP_ABST
Abstract
Description
A rule engine using method and rule engine Technical Field
[0001] The embodiments of the present application relate to the field of Internet of Things technology, and in particular to a method for using a rule engine and a rule engine. Background Art
[0002] Alarm systems play a crucial role in industrial production. By sensing and monitoring various anomalies on-site and responding in real time, they provide timely warnings to relevant personnel when critical links fail or dangerous conditions develop, thus preventing accidents. Alarm systems can monitor and control production equipment, processes, and the environment, such as changes in parameters like temperature, pressure, humidity, and concentration. When these parameters exceed normal ranges or become abnormal, the system automatically triggers an alarm signal, prompting relevant personnel to take appropriate measures, such as emergency shutdowns, equipment parameter adjustments, and component replacements, to prevent equipment damage or personal injury. Alarm systems can also help companies improve production efficiency and quality, reduce operational errors and oversights, enhance the stability and reliability of production lines, optimize production planning and material distribution, and increase production efficiency.
[0003] Currently, most traditional IoT platforms are only effective in specific industrial sectors. One reason for this is that the device alarm mechanisms are closely tied to the business, lacking flexibility and adaptability to address complex industrial application scenarios. Furthermore, the alarm rules vary widely across different industries, making the code size, logic branching, and code maintenance workload unimaginable if implemented using traditional device alarm mechanisms.
[0004] Summary of the Invention
[0005] To this end, the embodiments of the present application provide a method for using a rule engine and a rule engine, which ingests real-time data, infers the data, and triggers corresponding actions based on the inference results to meet user needs, reduce the workload of development and modification, and can respond to customer needs more quickly while saving development costs.
[0006] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:
[0007] According to a first aspect of an embodiment of the present application, a method for using a rule engine is provided, the method comprising:
[0008] The rule engine obtains access platform information and platform trigger conditions in real time;
[0009] The rule creation module determines the business rules based on the access platform information and platform trigger conditions; the rule creation module includes a message module, a rule node module and a rule chain module; the message module is determined based on the message ID, message initiator, message type, message payload and metadata;
[0010] Determine business decisions based on the business rules and platform trigger conditions;
[0011] Execute business decisions and obtain business decision execution results.
[0012] Optionally, the rule node module is used to filter and convert access platform information and platform trigger conditions, generate one or more outgoing messages, perform operations or communicate with external systems, as well as node customization and data operations.
[0013] Optionally, the rule node module combines rule nodes in a chain structure, and when a rule node generates an outgoing message, specifies a relationship type for routing the outgoing message to the next rule node; the rule nodes include filter nodes, attribute set nodes, transformation nodes, action nodes and external nodes.
[0014] Optionally, the rule chain module includes a logical group of rule nodes and their relationships. The rule chain includes a root rule chain and other rule chains. The root rule chain is used to process all incoming messages and forward them to other rule chains for message processing.
[0015] Optionally, determining a business decision based on the business rules and platform triggering conditions includes:
[0016] When the platform triggering condition is met, the business rules are forwarded to the business decision middleware based on the data forwarding module;
[0017] The business decision middleware determines the business decision according to the business rules.
[0018] Optionally, the forwarding modes applied by the data forwarding module include data access service, distributed message service, application and data integration service, cloud log service, function workflow service, MapReduce service, cloud database service and object storage service.
[0019] Optionally, the method further includes:
[0020] When the device linkage triggering condition is met, the linkage action corresponding to the device linkage triggering condition is executed; the linkage action includes issuing a command, sending a notification, reporting an alarm, and restoring an alarm.
[0021] According to a second aspect of an embodiment of the present application, a rule engine is provided, comprising:
[0022] Information access module, used to obtain access platform information and platform trigger conditions in real time;
[0023] A rule creation module, configured to determine a business rule based on the access platform information and platform trigger conditions; the rule creation module includes a message module, a rule node module, and a rule chain module; the message module is determined based on a message ID, a message originator, a message type, a message payload, and metadata;
[0024] A data forwarding module, configured to determine a business decision based on the business rules and platform trigger conditions;
[0025] The business execution module is used to execute business decisions and obtain business decision execution results.
[0026] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.
[0027] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method described in the first aspect above.
[0028] In summary, the embodiments of the present application provide a method for using a rule engine and a rule engine, which obtains access platform information and platform trigger conditions in real time through the rule engine; determines business rules based on the access platform information and platform trigger conditions based on the rule creation module; the rule creation module includes a message module, a rule node module, and a rule chain module; the message module is determined based on the message ID, message initiator, message type, message payload, and metadata; determines business decisions based on the business rules and platform trigger conditions; executes business decisions, and obtains business decision execution results. By ingesting real-time data, reasoning about the data, and triggering corresponding actions based on the reasoning results to meet user needs, the workload of development and modification is reduced, and customer needs can be responded to more quickly while saving development costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other implementation drawings based on the provided drawings without inventive effort.
[0030] The structures, proportions, sizes, etc. illustrated in this specification are intended solely to complement the contents disclosed herein and to facilitate understanding and reading by persons skilled in the art. They are not intended to limit the conditions under which the present invention may be implemented and therefore have no substantive technical significance. Any structural modifications, changes in proportions, or adjustments in sizes, without affecting the efficacy and objectives of the present invention, shall remain within the scope of the technical contents disclosed herein.
[0031] FIG1 is a flow chart of a method for using a rule engine according to an embodiment of the present application;
[0032] FIG2 is a schematic diagram of a temperature monitoring scenario provided in an embodiment of the present application;
[0033] FIG3 is a block diagram of a rule engine provided in an embodiment of the present application;
[0034] FIG4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0035] FIG5 shows a schematic diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following describes the implementation of the present invention using specific embodiments. Those skilled in the art will readily understand the other advantages and benefits of the present invention from the disclosure herein. Obviously, the embodiments described are only a portion of the present invention, not all of it. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0037] First, the nouns or technical terms involved in the embodiments of the present application are explained.
[0038] 1. Industrial equipment alarm mechanism
[0039] The industrial equipment alarm mechanism is an important industrial safety measure. Through real-time perception and monitoring of production scenarios, when equipment abnormalities or changes in working status are detected, alarm signals in various forms such as sound, light, and vibration are promptly sent to relevant personnel so that personnel can take appropriate measures to prevent accidents.
[0040] Industrial equipment alarm mechanisms can automatically identify and address various faults and dangerous situations, such as overtemperature, excessive pressure, abnormal liquid levels, and current fluctuations. Furthermore, they can interact with other systems to initiate automatic shutdowns and power cuts. This highly effective alarm mechanism can significantly improve safety and reliability in production scenarios.
[0041] 2. Internet of Things Platform
[0042] The IoT platform is a comprehensive platform that integrates data collection, transmission, storage, processing, and analysis, and serves as the core infrastructure for IoT applications. It connects objects and people, and captures vast amounts of information and data, helping users better understand and control the physical world.
[0043] An IoT platform typically consists of multiple components, including a data acquisition module, a communication module, a data processing module, and an application interface module. The data acquisition module is responsible for collecting various types of sensor data, the communication module is responsible for transmitting this data to the cloud or other end devices, and the data processing module is responsible for analyzing and statistically processing the data to extract valuable information. The application interface module provides an open API to facilitate user development and integration.
[0044] Through the IoT platform, users can conduct intelligent monitoring, scheduling, and management, optimize operational efficiency and safety, reduce production and operating costs, and improve user satisfaction and market competitiveness. At the same time, the IoT platform can also support application needs in different industries and fields, such as smart cities, smart homes, smart healthcare, and smart factories.
[0045] 3. Database
[0046] A database is an electronic system that stores large amounts of organized data, organized according to specific rules. It can be used to manage, store, and retrieve a wide range of information, and provide data processing and updating services when needed. Databases are an indispensable component of modern information technology and have become the core of various software systems and network applications.
[0047] A database can be understood as a large collection of data, storing various types of data, such as text, numbers, images, audio, and video. When users need to process this data, they can use a database management system (DBMS) to perform operations such as querying, modifying, deleting, and adding data. A DBMS is a software system specifically designed for managing and operating databases. It includes various functional modules (such as data definition and data query) that help users quickly access and manipulate database data, and effectively manage and maintain it.
[0048] 4. Message Notification Service
[0049] Message notification services are a convenient and fast way to deliver information and communicate, enabling users to receive timely and accurate messages, reminders, and notifications. They can be delivered across multiple channels, such as mobile, email, and social media, helping users manage information and handle transactions more efficiently, improving productivity and collaboration.
[0050] Message notification services have a wide range of application scenarios, including internal enterprise management, social media, and e-commerce. In internal enterprise management, message notification services can be used to distribute time-sensitive employee tasks, notify meetings, provide attendance reminders, and notify emergency incidents. On social media, they help users stay up-to-date on news, information, and events, and facilitate communication and interaction. In e-commerce, message notification services can be used to monitor order status changes, payment status changes, logistics updates, and after-sales service.
[0051] The advantages of message notification services include fast information delivery, wide coverage, and accurate positioning. They can also categorize different types of messages, provide personalized push notifications, and provide scheduled reminders to meet user needs. Furthermore, by monitoring and managing the message delivery process, information security and privacy protection can be controlled.
[0052] FIG1 shows a method for using a rule engine provided by an embodiment of the present application, the method comprising:
[0053] Step 101: The rule engine obtains access platform information and platform trigger conditions in real time;
[0054] Step 102: A rule creation module determines a business rule based on the access platform information and platform trigger conditions; the rule creation module includes a message module, a rule node module, and a rule chain module; the message module is determined based on the message ID, message initiator, message type, message payload, and metadata;
[0055] Step 103: Determine a business decision based on the business rules and platform triggering conditions;
[0056] Step 104: Execute the business decision and obtain the business decision execution result.
[0057] In one possible implementation, the rule node module is used to filter and convert access platform information and platform trigger conditions, generate one or more outgoing messages, perform operations or communicate with external systems, as well as node customization and data operations.
[0058] In one possible implementation, the rule node module combines rule nodes in a chain structure, and when a rule node generates an outgoing message, specifies a relationship type for routing the outgoing message to the next rule node; the rule nodes include filter nodes, attribute set nodes, transformation nodes, action nodes, and external nodes.
[0059] In a possible implementation, the rule chain module includes a logical group of rule nodes and their relationships. The rule chain includes a root rule chain and other rule chains. The root rule chain is used to process all incoming messages and forward them to other rule chains for message processing.
[0060] In one possible implementation, determining a business decision based on the business rules and platform triggering conditions includes:
[0061] When the platform triggering condition is met, the business rules are forwarded to the business decision middleware based on the data forwarding module;
[0062] The business decision middleware determines the business decision according to the business rules.
[0063] In a possible implementation, the forwarding methods applied by the data forwarding module include data access service, distributed message service, application and data integration service, cloud log service, function workflow service, MapReduce service, cloud database service and object storage service.
[0064] In one possible implementation, the method further includes:
[0065] When the device linkage triggering condition is met, the linkage action corresponding to the device linkage triggering condition is executed; the linkage action includes issuing a command, sending a notification, reporting an alarm, and restoring an alarm.
[0066] The method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0067] The rule engine system in the industrial Internet of Things platform provided in the embodiment of the present application adopts a framework based on stream programming that supports highly customizable complex event processing, separates business decisions from application code, accepts data input, creates business rules, and makes business decisions based on business rules.
[0068] The rule engine system in the industrial Internet of Things platform includes a first module, a second module and a third module.
[0069] The first module includes the rule creation capability of the rule engine. The first module mainly includes a rule message module, a rule node module and a rule chain module.
[0070] 1. Rule Message Module
[0071] Rule messages are serialized data structures that represent various messages in the system. The rule message module receives any event, including device lifecycle events, REST API events, and RPC requests. Rule messages consist of a message ID, originator, type, payload, and metadata.
[0072] The message ID is a time-based universally unique identifier. The message originator is a device, asset, or other entity identifier. The message payload is a JSON message with the actual message payload. The metadata is a list of key-value pairs and other data about the message.
[0073] Message types include publishing telemetry, RPC requests from the server to the device, connection events, disconnection events, activity events, publishing attributes, RPC requests from the device to the server, inactivity events, entity creation events, entity update events, entity deletion events, entity assignment to user events, entity unassignment events, attribute update events, attribute deletion events, alarm events, and rule engine requests via the REST API.
[0074] 2. Rule Node Module
[0075] A rule node is the basic component and main logical unit of a rule engine. It processes a single incoming message at a time, filters, enriches, and transforms the incoming message, and generates one or more outgoing messages to perform operations or communicate with external systems. It provides node customization capabilities to implement data operations.
[0076] Rule nodes may be related to other rule nodes. Each relationship has a relationship type, which is a label that identifies the logical meaning of the relationship. When a rule node generates an outgoing message, it always specifies the relationship type used to route the message to the next node.
[0077] Rule nodes include filter nodes, attribute set nodes, transformation nodes, action nodes, and external nodes. Filter nodes are used for message filtering and routing, with successful filtering routing to the true chain and errors routing to the false chain. Attribute set nodes are used to update the metadata of incoming messages. Transformation nodes are used to modify message fields created by users, such as the initiator, type, payload, and metadata. Action nodes are used to perform various actions based on incoming messages. External nodes provide message and data routing to external middleware or other third-party cloud platforms for interaction with external systems.
[0078] 3. Rule Chain
[0079] A rule chain is a logical grouping of rule nodes and their relationships. It receives outbound messages from a node and sends them to the next node. Users can define a single "root" rule chain and multiple additional rule chains. The root rule chain processes all incoming messages and forwards them to other rule chains for further processing. Other rule chains can also forward messages to different rule chains.
[0080] The second module includes the data forwarding function of the rule engine. When the conditions meet the set rules, the rule engine will trigger the corresponding actions to meet the user's needs, and data forwarding is one of the executed actions.
[0081] The data forwarding function is used to provide a connection channel between the IoT platform and other cloud services, thereby achieving a smooth flow of device data to message middleware, storage, data analysis, and business applications. Data forwarding is mainly used for two major functions: data analysis and data storage.
[0082] Data forwarding methods for data analysis include data access services, distributed messaging services, application and data integration platforms, cloud logging services, function workflows, and MapReduce services. Data forwarding methods for data storage include cloud databases and object storage services.
[0083] When creating data forwarding rules, you need to write SQL to parse and process the JSON data reported by the device. SQL statements consist of a SELECT clause and a WHERE clause. Each clause cannot exceed 500 characters. Character sets such as Chinese are not currently supported. The contents of the SELECT and WHERE clauses are case-sensitive. Keywords such as SELECT, WHERE, and AS are not case-sensitive.
[0084] In the source data, the content in the body is the data reported by the device message. Set the trigger condition to occur when the temperature in the device-reported data is greater than 38 degrees, and filter out the device_id and content. When the temperature in the device-reported message is greater than 38 degrees, the message is forwarded.
[0085] The rule engine provides a variety of functions for SQL writing to implement diverse data processing. These functions include:
[0086] GET_TAG: Get the tag_value corresponding to the specified tag_key
[0087] CONTAINS_TAG: Determines whether the specified tag_key is contained
[0088] GET_SERVICE: Get the service with the specified service_id
[0089] GET_SERVICES: Get the services of the specified service_id and combine the results into an array
[0090] CONTAINS_SERVICES: Determines whether the specified service_id is included
[0091] GET_SERVICE_PROPERTIES: Get the properties field in the service of the specified service_id
[0092] GET_SERVICE_PROPERTY: Get the value of the specified property in the properties of the service with the specified service_id
[0093] STARTS_WITH: Determine whether the input value starts with prefix
[0094] ENDS_WITH: Determine whether the input value ends with suffix
[0095] CONCAT: used to concatenate strings and return the concatenated string
[0096] REPLACE: Replace a part of the string value
[0097] SUBSTRING: Get a substring of a string
[0098] When data forwarding targets (such as third-party application servers) are unable to quickly process IoT platform data due to performance issues, the unprocessed data will accumulate (or cache) on the IoT platform. Currently, the rule engine defaults to a maximum cache size of 1GB for a single data forwarding rule, with a maximum cache duration of 24 hours. If the maximum cache size or duration is exceeded, the oldest unprocessed data will be discarded until the cache size and duration are met.
[0099] The third module is used for device linkage of the rule engine. Like the data forwarding function in the second module, the device linkage function is also one of the preset actions executed when the conditions are met after the rule is created. Such as event alarms, topic notifications, device command issuance, etc. The device linkage rule parameters are described as follows:
[0100] Rule Name: the name of the created rule;
[0101] Activate rule: Check: After creating the rule, the rule is in the activated state. Uncheck: After creating the rule, the rule is in the inactivated state.
[0102] Rule type: Cloud rules: Created rules are executed on the cloud platform. Device-side rules: Created rules are sent to the device for execution, requiring the device to be equipped with an SDK with device-side rule engine capabilities;
[0103] Effective time: Always effective: no time limit, continuously check whether the current rule conditions are met. Specified time: you can select a time period to check whether the rule conditions are met at a specific time;
[0104] Description: Description of the rule;
[0105] Trigger conditions:
[0106] Conditions met: You can set all conditions or any one condition to trigger the device.
[0107] Device attribute trigger: The attributes reported by the device can be used as trigger conditions, such as: if the temperature is too high and reaches 80℃, shut down the device. Select device range: All devices: Set conditions for all devices under the selected product. Specified devices: Set conditions for specified devices under the selected product. Select service: After selecting the product, select the corresponding service type. Select attribute: Select the device attribute for reporting data after meeting the conditions. Data validity (seconds): The valid time of the data. Scheduled trigger: You can set the time point for the rule to be triggered. This condition is generally used for periodic trigger conditions. Daily scheduled trigger: You can choose to trigger at a specified time point every day. Scheduled trigger by policy: Time point: You can select the starting time point for the rule to be triggered. Number of repetitions: The number of times the rule is repeatedly triggered (1 to 1440 times). Interval (minutes): The time interval for repeatedly triggering the rule after the starting time point (1 to 1440 minutes).
[0108] Device Status Trigger: You can use the device's online or offline status as a trigger condition. Select the device range: All devices: Set the condition for all devices under the selected product. Specified devices: Set the condition for specific devices under the selected product. Select the trigger device status: Online: The device changes from offline to online. Offline: The device changes from online to offline. Online or offline: The device status changes. Status Duration: After the device status changes, the duration of the new status is (in minutes). The options are 0-60 minutes.
[0109] Execute action: Click Add Action to set the action to be executed after the rule is triggered.
[0110] Issue a command: Select the device, service, and command to which you want to issue a command, and then configure the command parameters.
[0111] Send notification: Select the region corresponding to the message cloud service, set the subject, select the message sending method, recipient and sending time, and execute the sending command.
[0112] Report alarm: define the alarm level, alarm name, alarm isolation level, and alarm content, etc. When the set conditions are triggered, a corresponding device alarm will be generated in the IoT platform operation and maintenance management interface. Alarm level: You can choose from prompt, minor, important, and urgent. Alarm isolation dimension: You can choose from three dimensions: user, resource space, and device. When you select different dimensions, the reported alarm will carry different dimension identifiers. For example, if you select the device dimension, the reported alarm will carry the device ID as the isolation identifier. Alarm name: the name of the reported alarm. Alarm content: the content that the reported alarm needs to carry.
[0113] Restore alarm: defines the alarm level, alarm name, alarm isolation level, and alarm content. The parameter description is the same as the report alarm parameter description above. It means clearing the alarm reported to the platform by the device.
[0114] The following is an example of the application of the rule engine system provided in the embodiment of the present application.
[0115] Based on the data collected by the temperature sensor, a product model is created in the device access service, the device is registered, and the device linkage rules are set. When the temperature is detected to be greater than 80 degrees, the platform automatically issues a command to shut down the device. The temperature monitoring scenario is shown in Figure 2:
[0116] Step A: Access the device access service and click Use Now to enter the device access console.
[0117] Step B: Select "Product" in the left navigation bar, click "Create Product", fill in the parameters, and click "Confirm". The product parameters are shown in Table 1:
[0118] Table 1 Product parameters
[0119] Step C: Select "Device > Device Registration" in the left navigation bar, click "Register Device" in the upper right corner, and fill in the device registration parameters. The device registration parameters are shown in Table 2:
[0120] Table 2 Device registration parameters
[0121] In step D, select "Rule > Device Linkage" in the left navigation bar, click the "Create Rule" button in the upper right corner, and fill in the rule content. The rule parameters are shown in Table 3:
[0122] Table 3. Creation rule parameters
[0123] As can be seen, the rule engine system provided in the embodiment of the present application is based on a framework that supports highly customizable complex event processing based on stream programming, which separates business decisions from application code, accepts data input, creates business rules, and makes business decisions based on business rules. Business rules are separated from the application system, and rules can be freely combined through rule components. The data collected and reported by the device can be processed by writing SQL or setting rules using the rule engine, and then forwarded to other related services for further data storage and analysis.
[0124] In summary, the embodiment of the present application provides a method for using a rule engine, which obtains access platform information and platform trigger conditions in real time through the rule engine; determines business rules based on the access platform information and platform trigger conditions based on the rule creation module; the rule creation module includes a message module, a rule node module and a rule chain module; the message module is determined based on the message ID, message initiator, message type, message payload and metadata; determines business decisions based on the business rules and platform trigger conditions; executes business decisions and obtains business decision execution results. By ingesting real-time data, reasoning about the data and triggering corresponding actions based on the reasoning results to meet user needs, the workload of development and modification is reduced, and customer needs can be responded to more quickly while saving development costs.
[0125] Based on the same technical concept, the embodiment of the present application further provides a rule engine, as shown in FIG3 , wherein the rule engine includes:
[0126] Information access module 301, used to obtain access platform information and platform trigger conditions in real time;
[0127] A rule creation module 302 is configured to determine a business rule based on the access platform information and platform trigger conditions based on a rule creation module; the rule creation module includes a message module, a rule node module, and a rule chain module; the message module is determined based on a message ID, a message originator, a message type, a message payload, and metadata;
[0128] The data forwarding module 303 is used to determine the business decision according to the business rules and platform trigger conditions;
[0129] The business execution module 304 is used to execute business decisions and obtain business decision execution results.
[0130] The embodiments of the present application also provide an electronic device corresponding to the method provided in the aforementioned embodiments. Please refer to Figure 4, which shows a schematic diagram of an electronic device provided in some embodiments of the present application. The electronic device 20 may include: a processor 200, a memory 201, a bus 202 and a communication interface 203, wherein the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and when the processor 200 runs the computer program, it executes the method provided in any of the aforementioned embodiments of the present application.
[0131] The memory 201 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The system network element and at least one other network element are connected via at least one physical port 203 (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, or the like.
[0132] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs. The processor 200 executes the programs upon receiving execution instructions. The method disclosed in any of the aforementioned embodiments of the present application may be applied to or implemented by the processor 200.
[0133] The processor 200 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 200 or by software instructions. The above processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 201 , and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.
[0134] The electronic device provided in the embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented by them.
[0135] An embodiment of the present application also provides a computer-readable storage medium corresponding to the method provided in the aforementioned embodiment. Please refer to Figure 5, which shows that the computer-readable storage medium is a CD 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by the processor, it will execute the method provided in any of the aforementioned embodiments.
[0136] It should be noted that examples of the computer-readable storage medium may also 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 optical or magnetic storage media, which are not listed here one by one.
[0137] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0138] It should be noted that:
[0139] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other device. Various general-purpose devices may also be used in conjunction with the teachings herein. Based on the above description, it is apparent that the structure required for constructing such devices is suitable. In addition, the present application is not directed to any specific programming language. It should be understood that various programming languages may be utilized to implement the present application described herein, and the above description of specific languages is provided for the purpose of disclosing the best mode of implementation of the present application.
[0140] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0141] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in fewer than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim itself serving as a separate embodiment of the present application.
[0142] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0143] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.
[0144] The various component embodiments of the present application can be implemented in hardware, or implemented in a software module running on one or more processors, or implemented in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the creation device of the virtual machine according to an embodiment of the present application. The application can also be implemented as a part or all of the equipment or device program (for example, computer program and computer program product) for performing the method described herein. Such a program realizing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0145] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0146] The above description is merely a preferred embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for using a rule engine, characterized in that: The method comprises: The rule engine obtains access platform information and platform trigger conditions in real time; The rule creation module determines the business rules according to the access platform information and the platform triggering conditions; the rule creation module includes a message module, a rule node module and a rule chain module; the message module is determined based on the message ID, the message initiator, the message type, the message payload and the metadata; Determine business decisions based on the business rules and platform trigger conditions; Execute business decisions and obtain business decision execution results.
2. The method according to claim 1, characterized in that The rule node module is used to filter and convert access platform information and platform trigger conditions, generate one or more outgoing messages, perform operations or communicate with external systems, as well as node customization and data operations.
3. The method according to claim 2, characterized in that The rule node module combines rule nodes in a chain structure, and when a rule node generates an outgoing message, specifies a relationship type for routing the outgoing message to the next rule node; the rule nodes include filter nodes, attribute set nodes, transformation nodes, action nodes and external nodes.
4. The method according to claim 1, characterized in that The rule chain module includes a logical group of rule nodes and their relationships. The rule chain includes a root rule chain and other rule chains. The root rule chain is used to process all incoming messages and forward them to other rule chains for message processing.
5. The method according to claim 1, characterized in that Determine business decisions based on the business rules and platform trigger conditions, including: When the platform triggering condition is met, the business rule is forwarded to the business decision middleware based on the data forwarding module; The business decision middleware determines the business decision according to the business rules.
6. The method according to claim 5, characterized in that The forwarding modes applied by the data forwarding module include data access service, distributed message service, application and data integration service, cloud log service, function workflow service, MapReduce service, cloud database service and object storage service.
7. The method according to claim 5, characterized in that The method further comprises: When the device linkage triggering condition is met, the linkage action corresponding to the device linkage triggering condition is executed; the linkage action includes issuing a command, sending a notification, reporting an alarm, and restoring an alarm.
8. A rule engine, characterized in that: The rule engine comprises: Information access module, used to obtain access platform information and platform trigger conditions in real time; A rule creation module, used to determine the business rules based on the access platform information and the platform triggering conditions; the rule creation module includes a message module, a rule node module and a rule chain module; the message module is determined based on the message ID, the message initiator, the message type, the message payload and the metadata; A data forwarding module, used to determine business decisions based on the business rules and platform trigger conditions; The business execution module is used to execute business decisions and obtain business decision execution results.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1-7.
Citation Information
Patent Citations
Real-time alarm system based on Siddhi
CN115033445A
Service rule configuration method, system and equipment based on rule engine and medium
CN115185613A
Policy decision method, apparatus and system, and storage medium, policy decision unit and cluster
WO2020063550A1
Cited By
Industrial mechanism model building and real-time calculation method, system, equipment and medium
CN119903090A
Visual arrangement method and device for internet of things rule chain, medium, product and equipment
CN120416043A
Internet of Things index calculation method and device based on rule chain modeling and medium
CN120567588A
Internet of things operation and maintenance system and method supporting automatic protocol expansion
CN120658595A
Intelligent ship service dynamic assembly method and system, storage medium and electronic equipment
CN121092151A