An internet of things intelligent rule engine optimization method, system, electronic device and program product of a large language model fusion

By generating and detecting IoT rules using a large language model, the applicability and intelligence issues of existing IoT rule engines are solved, enabling zero-code configuration and real-time rule activation, thereby improving the intelligence and rule management capabilities of IoT devices.

CN122132039APending Publication Date: 2026-06-02SHENZHEN HONGDIAN TECH CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HONGDIAN TECH CORP
Filing Date
2026-01-27
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing IoT rule engines rely on structured rule inputs, requiring users to write code or configure via JSON. This results in low applicability, weak semantic generalization, low intelligence, and non-technical personnel cannot independently configure rules. Furthermore, rule modifications require restarting the engine service.

Method used

It uses a large language model to generate structured rule requests, performs semantic conflict and rule overlap detection through multi-dimensional detection, achieves zero-code rule configuration, rules take effect in real time, supports A/B testing, and standardizes rule descriptions to support multi-device linkage.

Benefits of technology

It enables non-technical personnel to configure rules without writing technical statements, and the rules take effect in real time. It supports semantic-level conflict analysis and rule overlap detection, improving the intelligence level of IoT devices and the flexibility of rule configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132039A_ABST
    Figure CN122132039A_ABST
Patent Text Reader

Abstract

This invention discloses an optimization method, system, electronic device, and program product for an IoT intelligent rule engine that integrates a large language model, relating to the field of IoT technology. The method includes: generating a rule request corresponding to a large language model based on a user's input rule request; sending the generated rule request to the large language model; forwarding all deployed rules obtained from the rule engine and the structured rules returned from the large language model to the large language model for multi-dimensional detection; after multi-dimensional detection, forwarding the detected deployed rules and the structured rules to the rule engine for loading; and receiving a successful deployment response from the rule engine. This invention achieves natural language to structured rules through a large model, allowing non-technical personnel to configure rules with zero code without writing technical statements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to an IoT intelligent rule engine optimization method, system, electronic device, and program product that integrates a large language model. Background Technology

[0002] An IoT rule engine is a software component that plays a key role in IoT systems. It can process and make decisions on data generated by IoT devices in real time according to predefined rules.

[0003] Existing IoT rule engines rely on structured rule inputs, requiring users to write code or configure trigger conditions using JSON. Conflicts are resolved by manually setting rule priorities, and there is no semantic analysis capability. Furthermore, rule modifications require restarting the engine service. This results in non-technical personnel being unable to independently configure rules, leading to low applicability, weak semantic generalization ability, and low level of intelligence.

[0004] There is an urgent need for a new technical solution to optimize existing IoT rule engines. Summary of the Invention

[0005] The purpose of this invention is to provide an optimization method, system, electronic device, and program product for an IoT intelligent rule engine that integrates large language models, in order to solve the aforementioned technical problems. The various technical effects of the preferred solutions among the many technical solutions provided by this invention are detailed below.

[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention provides an optimization method for an IoT intelligent rule engine that integrates large language models, comprising: Based on the user's input rule request, generate a rule request corresponding to the large language model, and send the generated rule request to the large language model. All deployed rules obtained from the rule engine and the structured rules returned from the large language model are transferred to the large language model for multi-dimensional detection; After multi-dimensional detection, the deployed rules and structured rules that have been detected are forwarded to the rule engine for loading; Receive a successful deployment response returned by the rules engine.

[0007] In one or more embodiments, the rule request corresponding to the large language model includes natural language instructions, relevant device context, and rule template examples.

[0008] In one or more embodiments, the fields of the structured rule include a semantic description field, a trigger condition device field, an execution action field, and a scope field.

[0009] In one or more embodiments, the multi-dimensional detection includes semantic conflict detection and rule overlap detection, wherein the semantic conflict detection is used to analyze whether the intents of the rules conflict; the rule overlap detection is used to determine whether two rules simultaneously satisfy the following conditions: The detection equipment is the same or the controlled equipment is the same; The control variables are the same; The execution time periods overlap; When all of the above conditions are met, the judgment rules overlap.

[0010] In one or more embodiments, during the multi-dimensional detection process, when there is a conflict between the deployed rules and the intent corresponding to the structured rules, a conflict warning is displayed; when any two of the deployed rules and the structured rules overlap, a suggestion is displayed.

[0011] In one or more embodiments, the rule engine loads the detected deployed rules and the structured rules via an API.

[0012] In one or more embodiments, after successful deployment, the method further includes: The rule engine receives the status reported by the device, matches the status of the device with the loaded rule, and if the trigger condition device field of the loaded rule is consistent with the status of the device, it sends the execution action field of the loaded rule to the corresponding device.

[0013] According to another aspect of the present invention, an IoT intelligent rule engine system integrating a large language model is also provided, which is used to implement the IoT intelligent rule engine optimization method integrating a large language model described above, including a user layer, an intelligent processing layer, a rule execution layer and an IoT layer. The user layer includes a client, which generates a rule request corresponding to the large language model based on the user's input rule request, and sends the generated rule request to the large language model; it forwards all deployed rules obtained from the rule engine and the structured rules returned from the large language model to the large language model for multi-dimensional detection; after multi-dimensional detection, it forwards the detected deployed rules and structured rules to the rule engine for loading; and it receives a successful deployment response from the rule engine. The intelligent processing layer includes an intelligent processing module loaded with a large language model, which is used to form a unified rule description from the rule requests generated by the client to obtain structured rules. At the same time, it performs multi-dimensional detection on the structured rules and all deployed rules. The multi-dimensional detection includes semantic conflict detection and rule overlap detection. The rule execution layer includes a rule engine, which is used to load the rules detected by the intelligent processing module in real time, obtain the monitoring status of the device through sensor data stream, match the monitoring status of the device with the loaded rules, and issue control commands under the corresponding rules to devices that match. The Internet of Things (IoT) layer includes devices and sensors used to monitor the devices.

[0014] According to another aspect of the present invention, an electronic device is also provided, comprising: At least one processor; At least one memory used to store processor-executable instructions; The at least one processor executes the executable instructions to implement the IoT intelligent rule engine optimization method that integrates a large language model as described above.

[0015] According to another aspect of the present invention, a computer program product is also provided, including a computer program or instructions, which, when executed by a processor, implement the IoT intelligent rule engine optimization method that integrates a large language model as described above.

[0016] Implementing one of the above-described technical solutions of the present invention has the following advantages or beneficial effects: This invention achieves natural language to structured rules through a large model, enabling non-technical personnel to configure rules with zero code without writing technical statements; it also enables semantic-level conflict analysis and rule overlap detection through a large model, with rules taking effect in real time and supporting A / B testing for performance evaluation; and it unifies the rule structure through standardized rule descriptions, achieving compatibility with multiple devices. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart of an IoT intelligent rule engine optimization method that integrates a large language model, according to an embodiment of the present invention. Figure 2 This is a structural block diagram of an IoT intelligent rule engine system that integrates a large language model, according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the interaction between devices at each layer of an IoT intelligent rule engine system that integrates a large language model, according to an embodiment of the present invention. Figure 4This is a block diagram of an electronic device structure according to an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the present invention clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments, illustrating various exemplary embodiments that may be used to implement the present invention. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of the present invention disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of the present invention.

[0019] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0020] To illustrate the technical solution described in this invention, specific embodiments are described below, showing only the parts related to the embodiments of this invention.

[0021] Example 1: As Figure 1 As shown, this invention provides an optimization method for an IoT intelligent rule engine that integrates large language models, including: S100. Based on the user's input rule request, generate a rule request corresponding to the large language model and send the generated rule request to the large language model.

[0022] Based on the above embodiments, users can input natural language rules through the client interface, such as "Turn off the air conditioner when no one is in the meeting room." This step can be further executed through the client.

[0023] In one or more embodiments, the rule request corresponding to the large language model includes natural language instructions, relevant device context, and rule template examples.

[0024] The above natural language instructions, such as turning off the air conditioner when no one is in the meeting room, can be used as examples. The relevant device context can include detection devices and controlled devices; for example, a camera used to detect the number of people might be a detection device, while an air conditioner might be a controlled device. A rule template example can be a structured JSON document.

[0025] The large language model transforms rule requests into a unified rule description structure (rule template example). The specific program implementation is as follows: {"rule_id": "R202","semantic_desc": "Turn off the air conditioning when the meeting room is empty", "trigger": { "device": "camera", "state": "human_count == 0"}, "action": { "device": "air conditioner", "command": "turn_off"}, "scope": {"devices": ["camera", "air conditioner"],"variables": ["human_count", "power_status"]}}.

[0026] The `semantic_desc` field stores the natural language logic to achieve semantic description; the `scope` field clarifies the devices and variables affected by the rule, avoids execution ambiguity, and further achieves full-scenario coverage.

[0027] S200 will transfer all deployed rules obtained from the rule engine and the structured rules returned from the large language model to the large language model for multi-dimensional detection.

[0028] In this embodiment, the deployed rules mentioned above are rules that are already in effect and being executed. For example, rules such as turning off the air conditioning when the meeting room is empty, automatically turning on the air conditioning in the office area when the temperature exceeds 30 degrees Celsius, and automatically reminding property management to turn off lighting and electrical appliances at the end of the workday. These deployed rules are used as part of the large model's knowledge base to assist in generating rule descriptions for the large model.

[0029] The fields of the above structured rules include semantic description field (semantic_desc mentioned above), trigger condition device field (trigger.device mentioned above), execution action field (action.command mentioned above), and scope field (scope.devices mentioned above).

[0030] In one or more embodiments, multi-dimensional detection includes semantic conflict detection and rule overlap detection. Semantic conflict detection analyzes whether the intents of the rules conflict. Rule overlap detection checks whether the checking devices, control variables, and execution time periods corresponding to any two rules overlap.

[0031] Rule overlap detection is used to determine whether two rules simultaneously meet the following conditions: 1. The detection equipment or the controlled equipment is the same; 2. The control variables are the same; 3. There is an overlap in the execution time periods.

[0032] When all of the above conditions are met, the decision rules overlap. An example is given below: Rule A: Turn off the air conditioning in the office area from 18:00 to 07:00; Rule B: Turn on the air conditioning in the office area from 05:00 to 08:00; Overlapping conditions: Same equipment (air conditioner) + same control variable (on / off state) + overlapping time (05:00-07:00).

[0033] In a specific implementation, the aforementioned conflict detection is divided into two steps: the first step is to detect semantic conflicts in natural language using a large model, such as no one turning on the lights in the meeting room, or no one turning off the lights in the meeting room; the second step is to detect logical conflicts, such as duplicate configurations of the same rule, or simultaneous triggering of "turning on the lights" and "turning off the lights". Alternatively, a non-existent supported device function can be defined, such as defining the function to restart the meeting room projector, but the projector does not have a restart function.

[0034] Furthermore, during the multi-dimensional detection process, if there is a conflict between the intents of the deployed rules and the structured rules, a conflict warning will be displayed; if any two of the deployed rules and the structured rules overlap, a modification suggestion will be displayed (e.g., if the execution time periods mentioned above overlap, the modification suggestion is: it is recommended to turn on the lights from 7 am to 8 am).

[0035] In this embodiment, semantic-level conflict analysis and rule overlap detection are performed using a large language model, which can verify the compatibility of new rules with existing rules before deployment, thereby supporting A / B testing.

[0036] S300, after multi-dimensional detection, forwards the detected deployed rules and structured rules to the rule engine for loading.

[0037] In this step, the rule engine loads the detected deployed rules and structured rules via API. Understandably, rules are updated in real-time via API without requiring a service restart. Assume rule R001 (Turn off air conditioning when no one is in the meeting room) is already running, and we now want to deploy a new rule R002 (Turn on air conditioning when the temperature exceeds 30 degrees Celsius).

[0038] The traditional method is as follows: 1. Stop the rule engine service; 2. Modify the configuration file and add R002; 3. Restart the rule engine service; 4. R001 and R002 will take effect simultaneously.

[0039] The API approach for this application is as follows: POST / api / rules / load{ "rules": [{"rule_id": "R001","trigger": {"device": "camera", "state":"human_count == 0"},"action": {"device": "air conditioner", "command": "turn_off"}}, {"rule_id": "R002","trigger": {"device": "temperature sensor", "state": "temperature>30"},"action": {"device": "air conditioner", "command": "turn_on", "mode": "cooling"}}]}; Response: {"status": "success", "message": "The rule has been loaded in real time, no service restart is required"}.

[0040] Through the API calls mentioned above, the rule engine dynamically loads new rules without interrupting the service. Existing rule R001 continues to work normally, while the new rule R002 takes effect immediately.

[0041] S400 receives a successful deployment response from the rules engine.

[0042] In this embodiment, after successful deployment, the following steps are also included: The rule engine receives the status reported by the device (e.g., camera detected 0 people = 0), matches the device status with the loaded rules, and if the trigger condition device field of the loaded rule matches the device status, it sends the execution action field corresponding to the loaded rule (e.g., turn off the air conditioner) to the corresponding device. Upon receiving the execution action field (e.g., turn off the air conditioner), the corresponding device executes the action corresponding to the field (e.g., turn off the air conditioner).

[0043] This implementation uses a large model to convert natural language into structured rules, allowing non-technical personnel to configure rules with zero code without writing technical statements; it also enables semantic-level conflict analysis and rule overlap detection through the large model, with rules taking effect in real time and supporting A / B testing for performance evaluation; and it standardizes the rule description to unify the rule structure and achieves compatibility with multiple devices.

[0044] Example 2: Figure 2-3 As shown, this embodiment also provides an IoT intelligent rule engine system that integrates a large language model, used to implement the IoT intelligent rule engine optimization method that integrates a large language model as described in Embodiment 1, including a user layer, an intelligent processing layer, a rule execution layer, and an IoT layer.

[0045] The user layer includes a client, which generates a rule request corresponding to the large language model based on the user's input rule request, and sends the generated rule request to the large language model; it forwards all deployed rules obtained from the rule engine and the structured rules returned from the large language model to the large language model for multi-dimensional detection; after multi-dimensional detection, it forwards the detected deployed rules and structured rules to the rule engine for loading; and it receives a successful deployment response from the rule engine.

[0046] The intelligent processing layer includes an intelligent processing module loaded with a large language model, which is used to form a unified rule description from the rule requests generated by the client, resulting in structured rules. At the same time, it performs multi-dimensional detection on the structured rules and all deployed rules. The multi-dimensional detection includes semantic conflict detection and rule overlap detection.

[0047] The rule execution layer includes a rule engine, which loads the rules detected by the intelligent processing module in real time, obtains the monitoring status of the device through sensor data streams, matches the monitoring status of the device with the loaded rules, and issues control commands under the corresponding rules to the matching devices.

[0048] The Internet of Things (IoT) layer includes devices and sensors for monitoring these devices. In this embodiment, devices include, but are not limited to, air conditioners, smart lights, and smart doors and windows. Sensors include, but are not limited to, cameras, temperature sensors, photosensors, and smoke sensors.

[0049] It should be noted that the specific steps of the IoT intelligent rule engine optimization method involving the fusion of large language models and other technical features not covered in this embodiment are consistent with those in Embodiment 1.

[0050] This embodiment enhances the intelligence of IoT devices, enabling non-technical personnel to efficiently configure IoT devices in real time through zero-code rules without writing technical statements.

[0051] Example 3: Figure 4 As shown, this embodiment also provides an electronic device, including: One or more processors; One or more memories are used to store one or more computer programs, and one or more processors are used to execute the one or more computer programs stored in the memories, so that the one or more processors execute the features / steps of an IoT smart rule engine optimization method that integrates a large language model as described in Embodiment 1.

[0052] Furthermore, at the hardware level, the device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other necessary hardware. One or more embodiments of this application can be implemented in software, for example, by the processor reading the corresponding computer program from the non-volatile memory into memory and then running it.

[0053] Of course, in addition to the software implementation, one or more embodiments of this application do not exclude other implementation methods, such as logic devices or a combination of hardware and software. That is to say, the execution subject of the above processing flow is not limited to each logic module, but can also be hardware or logic devices.

[0054] Example 4: As will be understood by those skilled in the art, all or part of the features / steps of the above method embodiments can be implemented by methods, data processing systems, or computer programs. These features can be implemented without hardware, entirely in software, or in a combination of hardware and software. The aforementioned computer program can be stored in one or more computer-readable storage media. When the computer program is executed (e.g., by a processor), it performs the steps of the above-described embodiment of an IoT intelligent rule engine optimization method integrating a large language model.

[0055] The aforementioned storage media capable of storing program code include: static disks, solid-state drives, random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), optical storage devices, magnetic storage devices, flash memory, magnetic disks or optical disks, and / or combinations of the above devices, that is, they can be implemented by any type of volatile or non-volatile storage devices or combinations thereof.

[0056] Example 5: This example provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of an IoT intelligent rule engine optimization method that integrates a large language model as described in Example 1.

[0057] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the processes of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0058] The above description is merely a preferred embodiment of the present invention. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A method for optimizing an IoT intelligent rule engine that integrates a large language model, characterized in that, include: Based on the user's input rule request, generate a rule request corresponding to the large language model and send the generated rule request to the large language model; All deployed rules obtained from the rule engine and the structured rules returned from the large language model are transferred to the large language model for multi-dimensional detection; After multi-dimensional detection, the deployed rules and structured rules that have been detected are forwarded to the rule engine for loading; Receive a successful deployment response from the rules engine.

2. The method for optimizing an IoT intelligent rule engine that integrates a large language model according to claim 1, characterized in that, The rule request corresponding to the large language model includes natural language instructions, relevant device context, and rule template examples.

3. The method for optimizing an IoT intelligent rule engine that integrates a large language model according to claim 1, characterized in that, The fields of the structured rule include semantic description field, trigger condition device field, execution action field, and scope field.

4. The method for optimizing an IoT intelligent rule engine that integrates a large language model according to claim 1, characterized in that, The multi-dimensional detection includes semantic conflict detection and rule overlap detection, wherein the semantic conflict detection is used to analyze whether the intent of the rules is conflicting; The rule overlap detection is used to determine whether two rules simultaneously satisfy the following conditions: The detection equipment is the same or the controlled equipment is the same; The control variables are the same; The execution time periods overlap; When all of the above conditions are met, the judgment rules overlap.

5. The method for optimizing an IoT intelligent rule engine that integrates a large language model according to claim 4, characterized in that, During the multi-dimensional detection process, if there is a conflict between the deployed rules and the intents corresponding to the structured rules, a conflict warning will be displayed. If any two of the deployed rules and the structured rules overlap, a prompt or suggestion will be displayed.

6. The method for optimizing an IoT intelligent rule engine that integrates a large language model according to claim 1, characterized in that, The rule engine loads the deployed rules and the structured rules after they have been detected via an API.

7. The method for optimizing an IoT intelligent rule engine that integrates a large language model according to claim 3, characterized in that, After successful deployment, it also includes: The rule engine receives the status reported by the device, matches the status of the device with the loaded rule, and if the trigger condition device field of the loaded rule is consistent with the status of the device, it sends the execution action field of the loaded rule to the corresponding device.

8. An IoT intelligent rule engine system integrating a large language model, characterized in that, The method for optimizing an IoT intelligent rule engine that integrates a large language model as described in any one of claims 1 to 7 includes a user layer, an intelligent processing layer, a rule execution layer, and an IoT layer. The user layer includes a client, which generates a rule request corresponding to the large language model based on the user's input rule request, and sends the generated rule request to the large language model; it forwards all deployed rules obtained from the rule engine and the structured rules returned from the large language model to the large language model for multi-dimensional detection; after multi-dimensional detection, it forwards the detected deployed rules and structured rules to the rule engine for loading; and it receives a successful deployment response from the rule engine. The intelligent processing layer includes an intelligent processing module loaded with a large language model, which is used to form a unified rule description from the rule requests generated by the client to obtain structured rules. At the same time, it performs multi-dimensional detection on the structured rules and all deployed rules. The multi-dimensional detection includes semantic conflict detection and rule overlap detection. The rule execution layer includes a rule engine, which is used to load the rules detected by the intelligent processing module in real time, obtain the monitoring status of the device through sensor data stream, match the monitoring status of the device with the loaded rules, and issue control commands under the corresponding rules to devices that match. The Internet of Things (IoT) layer includes devices and sensors used to monitor the devices.

9. An electronic device, characterized in that, include: At least one processor; At least one memory used to store processor-executable instructions; The at least one processor implements an IoT smart rule engine optimization method that integrates a large language model as described in any one of claims 1 to 7 by running the executable instructions.

10. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the IoT intelligent rule engine optimization method that integrates a large language model as described in any one of claims 1 to 7.