Ward dynamic rule decision-making method based on Internet of Things and multiple agents
By using the dynamic rule-based decision-making method of IoT and multi-agent, and by integrating standardized event flow and three-core-GR(1), the adaptability and security of static rules in the ward environment are solved, realizing fast, unique and safe ward decision-making, and improving the real-time performance and reliability of the system.
Patent Information
- Application Number
- CN202511731835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-17
AI Technical Summary
In existing IoT ward systems, static rules are difficult to cope with complex and ever-changing ward environments, cannot adjust the operation mode of medical equipment and the response strategies of medical staff in a timely manner, are difficult to update and are prone to errors, lack the separation and coordination channels of perception, decision-making and execution roles, cannot quickly form a unique and consistent treatment combination, and lack formal security verification.
A dynamic rule-based decision-making method based on the Internet of Things and multiple agents is adopted. By standardizing event flow and multi-agent collaboration, a three-core-GR(1) synthesis and window counting are introduced to quickly generate a unique disposal plan, and perform formal verification and incremental updates to support the dynamic rule generation and execution of parameter changes.
It significantly improves the real-time nature and security of ward decision-making, reduces manual intervention, improves trigger accuracy and execution reliability, avoids rule jitter and conflicts, and supports rapid adaptation to changes in patient status and environment.
Smart Images

Figure CN121545697A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical Internet of Things (IoT) technology, and in particular to a dynamic rule-based decision-making method for wards based on IoT and multi-agent systems. Background Technology
[0002] In existing IoT systems, rule engines are widely used to process data generated by IoT devices and make corresponding decisions. Traditional rule engines typically execute operations based on pre-defined static rules, which has many limitations in hospital ward scenarios. They struggle to cope with the complex and ever-changing environment within wards. For example, a patient's condition may suddenly change, and static rules cannot promptly adjust the operating modes of medical equipment and the response strategies of medical staff. Furthermore, as the number of IoT devices in hospital wards increases and patient needs diversify, adding or modifying rules in the rule engine becomes extremely difficult, consuming significant time and manpower costs, and is prone to introducing new errors.
[0003] Such systems focus on data collection and visualization. Rules are usually implemented using static thresholds, sequential processes, or simple subscription and publication, which makes it difficult to express constraints and relationships across patients, devices, and time windows. The decision-making entities are mostly single-point services or scripts, lacking the separation of roles and collaborative channels for perception, decision-making, and execution, which easily leads to multiple conflicting instructions being issued concurrently within the same time period.
[0004] In ward scenarios characterized by multiple events, resource limitations, and mutual exclusion, existing solutions typically only address post-event conflict resolution or manual intervention, failing to establish a unique and consistent treatment combination within the timeframe. Rule updates often rely on complete replacements or full reloads, making it difficult to perform localized incremental updates based on changes in parameters such as thresholds, resources, and window limits, leading to decision jitter and slow recovery. Furthermore, the lack of formal security checks before deployment makes it difficult to provide provable correctness in the sense of "achievable and not exceeding limits," and the absence of a stable mechanism to feed back feedback and effect evaluations to rule synthesis and context updates after execution further complicates matters.
[0005] Therefore, how to provide a dynamic rule-based decision-making method for wards based on the Internet of Things and multi-agent systems is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a dynamic rule-based decision-making method for wards based on the Internet of Things and multi-agent systems. This invention is based on standardized event flow and multi-agent collaboration, and introduces a three-core-GR(1) synthesis and window counting. Under mutual exclusion and resource constraints, it can quickly provide a unique solution. After formal verification, it can be verified before distribution and traceable after distribution. It supports incremental parameter updates and significantly improves real-time performance and security.
[0007] A ward dynamic rule-based decision-making method based on the Internet of Things and multi-agent technology according to an embodiment of the present invention includes the following steps:
[0008] Establish a unified abstract interface and resource directory, collect ward-related data including vital signs, ward environment and medical equipment status, and perform data standardization including time synchronization, time sequence alignment, noise reduction and anomaly detection to obtain a standardized event stream;
[0009] Construct three types of agent agents, including perception agents, decision agents, and execution agents; configure and publish message bus and topic set; publish status messages based on standardized event flow and establish intent and instruction channels to form inter-agent communication channels.
[0010] Complex event processing and semantic fusion are performed based on inter-agent communication channels to generate disposal trigger conditions;
[0011] Based on the triggering conditions, candidate treatment intent sets are generated in the dimensions of disease condition, environment, and equipment control, and arranged into a set of rule templates according to the prescribed fields;
[0012] Based on the rule template set and preset security constraints, the three-core-GR(1) reactive synthesis is called to complete the cost-optimal decision within the win set within the windowed active time limit, generate a dynamic rule set, and perform incremental resynthesis based on parameter change events;
[0013] Based on a dynamic set of rules, mutual exclusion and resource constraint checks are performed to form a complete handling plan within a preset time limit;
[0014] Formal security verification is performed on the disposal plan to obtain the verified disposal decision. If the decision fails, the rollback is rolled back according to the aforementioned rollback clause, and the candidate disposal and rule template are regenerated.
[0015] The verified decision-making process is translated into device protocol instructions at the edge computing node and issued. The execution agent then controls the process, collects the execution results, and records trigger events and compliance logs. This information is also used to update the dynamic rule set.
[0016] Optionally, obtaining the standardized event flow specifically includes:
[0017] Through sensing intelligent agents, real-time data related to wards, including vital signs, ward environment, and medical equipment status, is collected. At the same time, a unified abstract interface and resource catalog are established for ward-related data, registering unique identifiers, units, locations, and security boundaries. A reference time is set, fixed offsets and clock drift are corrected, a fixed sampling interval is set to align the grid, irregular samples are resampled according to the grid and interpolated, and a time-corrected and aligned raw record set is output. At the same time, the device identifiers and firmware versions of IoT devices, gateways, and sensors are registered.
[0018] The original record set is denoised and anomaly detected. A sliding weighted average smoothing with fixed length, positive weights and a weight sum of one is used. The standardized deviation is calculated with the median as the center and the median of the absolute deviation from the median as the scale. The deviation is compared with a preset threshold, anomaly labels are retained, and anomaly points are replaced to obtain a denoised dataset with anomaly labels.
[0019] Based on the denoised and anomaly-marked dataset, an entry containing the data source identifier, timestamp, denoised value, anomaly mark, unit and location is generated at each alignment time. The normalized event stream is merged in chronological order to ensure that the time monotonicity corresponds to the mark.
[0020] Optionally, the formation of the inter-agent communication channel specifically includes:
[0021] Runtime instances are created for three types of intelligent agents, including perceptual agents, decision-making agents, and execution agents. Configuration files are loaded, unique identifiers and access credentials are assigned, and the agent is associated with its ward, bed, and controllable equipment list. The input of the perceptual agent is set as a standardized event flow and the output is set as a status message. The input of the decision-making agent is set as a status message and the output is set as a treatment intention. The input of the execution agent is set as a command and the output is set as an execution feedback. Heart rate and health check strategies are set and the processes of the three types of intelligent agents are started, forming an instantiated and online agent set.
[0022] Deploy an IoT message bus and create status, intent, instruction and feedback topics; define message fields, encoding rules, retention period, order and acknowledgment level; issue connection parameters to three types of intelligent agents and establish long connections; convert standardized event streams into a publisher of status messages; enable sensing intelligent agents to continuously write status messages into status topics; obtain a set of available topics; the topics represent named channels on the publish and subscribe message bus and carry the corresponding data.
[0023] Based on a set of topics, three types of agents are bound to publish and subscribe relationships and routing rules are configured. The perception agent publishes to the state topic, the decision agent receives the state topic and publishes it to the intent topic, and the execution agent subscribes to the instruction topic and publishes it to the feedback topic, which is then fed back to other decision agents for experience sharing and collaborative optimization. Routing filtering and isolation strategies are set according to the patient room and equipment type. Message confirmation, failure retry, and dead letter forwarding are enabled to achieve end-to-end connectivity and receipt verification. The continuous message stream of the state topic is used as the input for the generation of subsequent trigger conditions, and the intent and instruction topics are used as the input and output channels for the generation of treatment and the execution of equipment. The output is a stable inter-agent communication channel.
[0024] Optionally, the process of generating the disposal triggering condition specifically includes:
[0025] Subscribe to status topics from the inter-agent communication channel and continuously read standardized event streams. Aggregate and deduplicate events according to patient identifier, device identifier, and time order to establish an assessment time sequence that progresses at a fixed step size. Generate a corresponding time window for each assessment time. The window retains the original fields and abnormal markers of three types of records: vital signs, ward environment, and device status. The output is the original sequence of the window.
[0026] Within each time window, thresholds, consecutive hit durations, and sampling tolerances are set for vital sign records, and upper and lower limits and mutual exclusion markers are set for environmental and equipment records. The records are compared in the order of the tags. When consecutive hits are achieved or a single hit is achieved within the allowable delay, a hit entry is generated. The hit entry includes the tag name, start and end time, peak or minimum value, involved equipment, and abnormal tag processing results. All hit entries within the window are summarized into a single index hit record.
[0027] Semantic fusion is performed based on single-index hit records. According to the mapping relationship from data source to semantic concept and the pre-set ontology, the vital signs hit items and environment and equipment hit items are combined in a fixed AND, OR and NOT manner to generate composite conditions. For each composite condition, a disposal trigger condition item is generated and written into the disposal trigger condition queue in the order of evaluation time.
[0028] Optionally, the formation of the rule template set specifically includes:
[0029] Receive treatment trigger conditions, lock the associated patients and target devices one by one, read the latest status values, calculate target values for treatment-related adjustable parameters in the disease dimension, calculate increments for temperature, humidity and lighting in the environmental dimension, give status for parameters of controllable devices in the device control dimension, generate treatment entries for each item and number them, and add them to the candidate list.
[0030] The candidate list is checked and pruned item by item. The output of each item is compared with the allowable range maintained by the system. If it exceeds the limit, the target value is adjusted to the nearest allowable boundary. The target device is checked to see if it is online and not occupied. If it does not meet the requirements, it is replaced with a similar device or marked as postponed. The execution is evaluated to see if it can be completed within the time limit specified by the triggering condition. If it exceeds the time limit, the magnitude is reduced or it is split into multiple steps. Otherwise, the item is deleted. For multiple mutually exclusive items, only one is kept according to priority. For multiple items to be executed at the same time, they are kept in order of resource limit from high to low until the limit is not exceeded, thus obtaining the executable list.
[0031] The executable list is arranged into a rule list, sorted from high to low priority and execution cost, and each item is written as a rule line. The rule line includes the trigger source number, trigger time, target object, specific action, and target value. The rule lines are appended to the rule list in the order of trigger time, and the rule list is used to form a set of rule templates.
[0032] Optionally, the generation process of the dynamic rule set specifically includes:
[0033] Receive the rule template set and the preset security constraints in the security constraint library, call the three-core-GR(1) reactive synthesis, the GR(1) reactive synthesis is to calculate the win set by nested fixed points of the controllable predecessor under the alternating action of the environment and system, and extract the deterministic strategy. The three-core-GR(1) reactive synthesis is based on GR(1) reactive synthesis, using window counting to achieve bounded activity, limiting the strategy search to the win set and using the minimum lexicographical order of the cost vector as the adjudication criterion. The win set is the set of legal states, and the threshold and time window parameter changes are only performed on the affected state subgraph for incremental updates of fixed points. Expand the trigger, action and time limit fields in the rule template one by one, set a response window with a fixed number of steps and establish a corresponding counter. When a request appears and has not yet been achieved, increment the counter in each sampling step. When it is achieved, clear it. When the upper limit of the window is reached, mark it as timeout and switch to the preset degradation path. Write the response window and counting logic into the specification and generate the synthesis input.
[0034] Based on the comprehensive input, construct the environment input, read the trigger, action and time limit fields in the rule template, load the security constraints and resource boundaries, and call the three-core-GR(1) reactive synthesis to obtain a set of legal states that can meet the specifications and a list of actions for each state;
[0035] Cost adjudication is performed only within the set of legal states. In order, the changes in equipment parameters, execution energy consumption, and steady-state impact on target deviation of the candidate actions in the list of actionable actions are compared. The smaller one is selected in order. If they are all the same, an action is selected in a fixed and repeatable order to obtain the unique action corresponding to each state.
[0036] The unique action and window counting logic are implemented as a dynamic rule set. Each rule is written with a trigger source, unique action, response window limit and window counting logic. The window counting logic is to attach a countdown to each rule that needs to be completed within a time limit. Each cycle runs in a fixed order of first judging whether it has been completed, then decrementing the remaining number of steps, and degrading when the limit is exhausted. Deterministic rule entries are output according to the rule template and trigger time order.
[0037] When the parameters of the given parameter library are updated, incremental resynthesis is performed to calculate the affected win set difference. Only the states involved in the difference are regenerated into a list of actionable actions and the cost is adjudicated according to the sequential rules. Unaffected states retain their original actions. After merging, an updated dynamic rule set is formed.
[0038] Optionally, the formation of the treatment plan specifically includes:
[0039] Receive a dynamic rule set, obtain the device online status from status topics and feedback topics, read the resource limit, remove expired rules or rules with insufficient remaining steps, and form a list to be processed.
[0040] Perform mutual exclusion and resource checks on the pending list. For parallel items with the same equipment, parameters, or opposite modes, only those with higher priority and closer deadlines are retained. Each item is checked against the resource limit. If the limit is exceeded, the magnitude is reduced, the item is postponed to the available window, or an equivalent device is replaced. Items that still do not meet the requirements are marked as temporarily suspended and removed.
[0041] The rules that pass the inspection are grouped by target object and equipment, and the parameter changes, energy consumption and target deviation values are compared in turn. They are determined by fixed numbers, and start times are assigned to reserved items to ensure completion within the deadline and remaining steps. The results are then compiled into a complete disposal plan.
[0042] Optionally, the obtained verified processing decision specifically includes:
[0043] Receive the handling plan, load the current version of the security constraints and parameter library, verify the device occupancy and resource limit one by one, check the consistency between the instruction and the current mode of the device, synchronously compare the trigger source and the target object, mark non-compliant items as failures and record the reasons;
[0044] Counting is performed based on the response window and remaining steps for each rule. If the target is not met, the count is decremented at each step and compared with the upper limit. If it is expected that the rule cannot be completed within the remaining steps and deadline, it is marked as timeout and unqualified. Completion sequence and checkpoints are generated for qualified items.
[0045] Read the recent status and feedback records of the corresponding ward and equipment, drive the execution according to the treatment plan, observe vital signs, environmental parameters and equipment status trajectory and compare them with the preset acceptance range. When all pass, output the verified treatment decision.
[0046] Optionally, the recording of the triggering event and the compliance log specifically includes:
[0047] At the edge computing node, the verified and processed decision is received, and a device instruction packet is generated one by one according to the rule items. The instruction packet is encapsulated into a message format that can be sent with the instruction subject, and the sending channel and service quality level are recorded.
[0048] The instruction message is published to the instruction topic, which is received by the execution agent and sent to the corresponding device. It waits for the device to acknowledge the message. If no acknowledgement is received, it is resent at the timeout point with the maximum number of retries. If the retry still fails, a rollback operation is performed and the error reason code and context information are written. At the same time, the received acknowledgement, start time, end time and execution result are published in the feedback topic.
[0049] The system collects execution results from feedback topics and device-side receipts, extracts key measurement values, achievement criteria, and window count status, generates performance evaluation results, writes them to compliance logs and audit logs, saves them to the parameter library, and publishes parameter update events for further updating of the dynamic rule set.
[0050] The beneficial effects of this invention are:
[0051] This invention uses standardized event flow and communication channels with three types of intelligent agents: perception, decision-making, and execution. It transforms multi-source heterogeneous ward data into computable and traceable triggering conditions under a unified timeline, avoiding missed detections, false triggers, and manual intervention caused by traditional static thresholds and script-based processes, thereby improving the accuracy and real-time performance of triggering.
[0052] This invention is based on rule template set and three-core-GR(1) reactive synthesis. Under the window counting guarantee, the lexicographical order is decided in the win set to ensure that a unique dynamic rule with lower cost and controlled delay is given under the premise of satisfying safety and activity constraints, effectively suppressing parameter oscillation, instruction conflict and repeated issuance.
[0053] This invention exposes risks of overreach and unreachability in advance by performing mutual exclusion and resource checks and formal security verification on the disposal plan before it is issued, thus significantly reducing the execution failure rate on the clinical and equipment sides.
[0054] This invention translates the solution into device protocol instructions and obtains receipts, forming a closed-loop record from triggering to execution to feedback, which is compliant and auditable.
[0055] This invention performs feedback to generate parameter updates and triggers incremental resynthesis, making only local corrections to the affected states and rules, avoiding the latency and jitter caused by full reload, and enabling the system to quickly adapt to changes in patient status, environment and resources. Attached Figure Description
[0056] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0057] Figure 1 This is a flowchart of a dynamic rule-based decision-making method for wards based on the Internet of Things and multi-agent systems proposed in this invention;
[0058] Figure 2 This is a schematic diagram of a dynamic rule-based decision-making method for wards based on the Internet of Things and multi-agent systems proposed in this invention. Detailed Implementation
[0059] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0060] refer to Figure 1-2 A dynamic rule-based decision-making method for wards based on the Internet of Things and multi-agent systems includes the following steps:
[0061] Establish a unified abstract interface and resource directory, collect ward-related data including vital signs, ward environment and medical equipment status, and perform data standardization including time synchronization, time sequence alignment, noise reduction and anomaly detection to obtain a standardized event stream;
[0062] Construct three types of agent agents, including perception agents, decision agents, and execution agents; configure and publish message bus and topic set; publish status messages based on standardized event flow and establish intent and instruction channels to form inter-agent communication channels.
[0063] Complex event processing and semantic fusion are performed based on inter-agent communication channels to generate disposal trigger conditions;
[0064] Based on the triggering conditions, candidate treatment intent sets are generated in the dimensions of disease condition, environment, and equipment control, and arranged into a set of rule templates according to the prescribed fields;
[0065] Based on the rule template set and preset security constraints, the three-core-GR(1) reactive synthesis is called to complete the cost-optimal decision within the win set within the windowed active time limit, generate a dynamic rule set, and perform incremental resynthesis based on parameter change events;
[0066] Based on a dynamic set of rules, mutual exclusion and resource constraint checks are performed to form a complete handling plan within a preset time limit;
[0067] Formal security verification is performed on the disposal plan to obtain the verified disposal decision. If the decision fails, the rollback is rolled back according to the aforementioned rollback clause, and the candidate disposal and rule template are regenerated.
[0068] The verified decision-making process is translated into device protocol instructions at the edge computing node and issued. The execution agent then controls the process, collects the execution results, and records trigger events and compliance logs. This information is also used to update the dynamic rule set.
[0069] This invention achieves a fully automated closed loop from ward data collection, event fusion, rule generation to execution feedback through IoT data acquisition and multi-agent collaboration. This enables ward treatment rules to have dynamic update and adaptive decision-making capabilities, significantly reducing manual intervention and improving the real-time performance and security of decision-making.
[0070] In this embodiment, obtaining the standardized event flow specifically includes:
[0071] Through sensing intelligent agents, real-time data related to wards, including vital signs, ward environment, and medical equipment status, is collected. At the same time, a unified abstract interface and resource catalog are established for ward-related data, registering unique identifiers, units, locations, and security boundaries. A reference time is set, fixed offsets and clock drift are corrected, a fixed sampling interval is set to align the grid, irregular samples are resampled according to the grid and interpolated, and a time-corrected and aligned raw record set is output. At the same time, the device identifiers and firmware versions of IoT devices, gateways, and sensors are registered.
[0072] The original record set is denoised and anomaly detected. A sliding weighted average smoothing with fixed length, positive weights and a weight sum of one is used. The standardized deviation is calculated with the median as the center and the median of the absolute deviation from the median as the scale. The deviation is compared with a preset threshold, anomaly labels are retained, and anomaly points are replaced to obtain a denoised dataset with anomaly labels.
[0073] Based on the denoised and anomaly-marked dataset, an entry containing the data source identifier, timestamp, denoised value, anomaly mark, unit and location is generated at each alignment time. The normalized event stream is merged in chronological order to ensure that the time monotonicity corresponds to the mark.
[0074] This invention performs time synchronization, time sequence alignment, and anomaly detection on multi-source ward data through a unified abstract interface and resource catalog, achieving data standardization across devices and systems, ensuring the consistency and reliability of subsequent analysis and decision inputs, and improving the accuracy and stability of ward data processing.
[0075] In this embodiment, the formation of the inter-agent communication channel specifically includes:
[0076] Runtime instances are created for three types of intelligent agents, including perceptual agents, decision-making agents, and execution agents. Configuration files are loaded, unique identifiers and access credentials are assigned, and the agent is associated with its ward, bed, and controllable equipment list. The input of the perceptual agent is set as a standardized event flow and the output is set as a status message. The input of the decision-making agent is set as a status message and the output is set as a treatment intention. The input of the execution agent is set as a command and the output is set as an execution feedback. Heart rate and health check strategies are set and the processes of the three types of intelligent agents are started, forming an instantiated and online agent set.
[0077] Deploy an IoT message bus and create status, intent, instruction and feedback topics; define message fields, encoding rules, retention period, order and acknowledgment level; issue connection parameters to three types of intelligent agents and establish long connections; convert standardized event streams into a publisher of status messages; enable sensing intelligent agents to continuously write status messages into status topics; obtain a set of available topics; the topics represent named channels on the publish and subscribe message bus and carry the corresponding data.
[0078] Based on a set of topics, three types of agents are bound to publish and subscribe relationships and routing rules are configured. The perception agent publishes to the state topic, the decision agent receives the state topic and publishes it to the intent topic, and the execution agent subscribes to the instruction topic and publishes it to the feedback topic, which is then fed back to other decision agents for experience sharing and collaborative optimization. Routing filtering and isolation strategies are set according to the patient room and equipment type. Message confirmation, failure retry, and dead letter forwarding are enabled to achieve end-to-end connectivity and receipt verification. The continuous message stream of the state topic is used as the input for the generation of subsequent trigger conditions, and the intent and instruction topics are used as the input and output channels for the generation of treatment and the execution of equipment. The output is a stable inter-agent communication channel.
[0079] This invention constructs three types of intelligent agents—perception, decision-making, and execution—and establishes a communication channel based on a message bus to achieve multi-level information interaction of status, intent, and instructions. This ensures efficient and orderly transmission of ward events from collection to response, and enhances the system's distributed collaboration and real-time response capabilities.
[0080] In this embodiment, the process of generating the disposal triggering condition specifically includes:
[0081] Subscribe to status topics from the inter-agent communication channel and continuously read standardized event streams. Aggregate and deduplicate events according to patient identifier, device identifier, and time order to establish an assessment time sequence that progresses at a fixed step size. Generate a corresponding time window for each assessment time. The window retains the original fields and abnormal markers of three types of records: vital signs, ward environment, and device status. The output is the original sequence of the window.
[0082] Within each time window, thresholds, consecutive hit durations, and sampling tolerances are set for vital sign records, and upper and lower limits and mutual exclusion markers are set for environmental and equipment records. The records are compared in the order of the tags. When consecutive hits are achieved or a single hit is achieved within the allowable delay, a hit entry is generated. The hit entry includes the tag name, start and end time, peak or minimum value, involved equipment, and abnormal tag processing results. All hit entries within the window are summarized into a single index hit record.
[0083] Semantic fusion is performed based on single-index hit records. According to the mapping relationship from data source to semantic concept and the pre-set ontology, the vital signs hit items and environment and equipment hit items are combined in a fixed AND, OR and NOT manner to generate composite conditions. For each composite condition, a disposal trigger condition item is generated and written into the disposal trigger condition queue in the order of evaluation time.
[0084] This invention transforms multidimensional ward data into logically related triggering conditions through complex event processing and semantic fusion, enabling the system to move from single signal recognition to multi-condition dynamic judgment, achieving intelligent linkage triggering between patient condition, environment, and equipment status, and enhancing decision-making accuracy.
[0085] In this embodiment, the formation of the rule template set specifically includes:
[0086] Receive treatment trigger conditions, lock the associated patients and target devices one by one, read the latest status values, calculate target values for treatment-related adjustable parameters in the disease dimension, calculate increments for temperature, humidity and lighting in the environmental dimension, give status for parameters of controllable devices in the device control dimension, generate treatment entries for each item and number them, and add them to the candidate list.
[0087] The candidate list is checked and pruned item by item. The output of each item is compared with the allowable range maintained by the system. If it exceeds the limit, the target value is adjusted to the nearest allowable boundary. The target device is checked to see if it is online and not occupied. If it does not meet the requirements, it is replaced with a similar device or marked as postponed. The execution is evaluated to see if it can be completed within the time limit specified by the triggering condition. If it exceeds the time limit, the magnitude is reduced or it is split into multiple steps. Otherwise, the item is deleted. For multiple mutually exclusive items, only one is kept according to priority. For multiple items to be executed at the same time, they are kept in order of resource limit from high to low until the limit is not exceeded, thus obtaining the executable list.
[0088] The executable list is arranged into a rule list, sorted from high to low priority and execution cost, and each item is written as a rule line. The rule line includes the trigger source number, trigger time, target object, specific action, and target value. The rule lines are appended to the rule list in the order of trigger time, and the rule list is used to form a set of rule templates.
[0089] This invention maps the triggering conditions of the disposal to a set of rule templates and generates candidate intentions and execution parameters in multiple dimensions to form a customizable and combinable rule structure, making dynamic rule generation more flexible and supporting rapid rule reconstruction and expansion under multiple objectives and constraints.
[0090] In this embodiment, the process of generating the dynamic rule set specifically includes:
[0091] Receive the rule template set and the preset security constraints in the security constraint library, call the three-core-GR(1) reactive synthesis, the GR(1) reactive synthesis is to calculate the win set by nested fixed points of the controllable predecessor under the alternating action of the environment and system, and extract the deterministic strategy. The three-core-GR(1) reactive synthesis is based on GR(1) reactive synthesis, using window counting to achieve bounded activity, limiting the strategy search to the win set and using the minimum lexicographical order of the cost vector as the adjudication criterion. The win set is the set of legal states, and the threshold and time window parameter changes are only performed on the affected state subgraph for incremental updates of fixed points. Expand the trigger, action and time limit fields in the rule template one by one, set a response window with a fixed number of steps and establish a corresponding counter. When a request appears and has not yet been achieved, increment the counter in each sampling step. When it is achieved, clear it. When the upper limit of the window is reached, mark it as timeout and switch to the preset degradation path. Write the response window and counting logic into the specification and generate the synthesis input.
[0092] Based on the comprehensive input, construct the environment input, read the trigger, action and time limit fields in the rule template, load the security constraints and resource boundaries, and call the three-core-GR(1) reactive synthesis to obtain a set of legal states that can meet the specifications and a list of actions for each state;
[0093] Cost adjudication is performed only within the set of legal states. In order, the changes in equipment parameters, execution energy consumption, and steady-state impact on target deviation of the candidate actions in the list of actionable actions are compared. The smaller one is selected in order. If they are all the same, an action is selected in a fixed and repeatable order to obtain the unique action corresponding to each state.
[0094] The unique action and window counting logic are implemented as a dynamic rule set. Each rule is written with a trigger source, unique action, response window limit and window counting logic. The window counting logic is to attach a countdown to each rule that needs to be completed within a time limit. Each cycle runs in a fixed order of first judging whether it has been completed, then decrementing the remaining number of steps, and degrading when the limit is exhausted. Deterministic rule entries are output according to the rule template and trigger time order.
[0095] When the parameters of a given parameter library are updated, incremental resynthesis is performed to calculate the affected winset difference:
[0096] ;
[0097] in, This represents the difference increment of the winning set. Indicates the current parameter set. This represents the updated set of parameters. Indicates the old parameter set The calculated win set Represents the union, Represents the working set. This indicates a controllable precursor operator. Let represent the smallest fixed point of the working set. The difference set is used to regenerate the list of possible actions for the states involved in the difference and complete the cost decision according to the sequential rules. The unaffected states retain their original actions. After merging, an updated dynamic rule set is formed.
[0098] This invention introduces a three-core-GR(1) reactive synthesis algorithm, which realizes the automatic generation and local resynthesis of dynamic rules through window counting, bounded activity and win set cost optimal decision, so that the system does not need to recalculate the whole when updating parameters, significantly reducing the computational delay and maintaining the stability of the strategy.
[0099] In this embodiment, the formation of the treatment plan specifically includes:
[0100] Receive a dynamic rule set, obtain the device online status from status topics and feedback topics, read the resource limit, remove expired rules or rules with insufficient remaining steps, and form a list to be processed.
[0101] Perform mutual exclusion and resource checks on the pending list. For parallel items with the same equipment, parameters, or opposite modes, only those with higher priority and closer deadlines are retained. Each item is checked against the resource limit. If the limit is exceeded, the magnitude is reduced, the item is postponed to the available window, or an equivalent device is replaced. Items that still do not meet the requirements are marked as temporarily suspended and removed.
[0102] The rules that pass the inspection are grouped by target object and equipment, and the parameter changes, energy consumption and target deviation values are compared in turn. They are determined by fixed numbers, and start times are assigned to reserved items to ensure completion within the deadline and remaining steps. The results are then compiled into a complete disposal plan.
[0103] This invention uses a mutual exclusion and resource constraint checking mechanism to automatically detect and eliminate conflicts in a multi-device, multi-task parallel execution environment, forming a unique and consistent handling plan. This effectively prevents resource overruns and command competition, ensuring the coordination and safe execution of ward operations.
[0104] In this embodiment, the obtained verified processing decision specifically includes:
[0105] Receive the handling plan, load the current version of the security constraints and parameter library, verify the device occupancy and resource limit one by one, check the consistency between the instruction and the current mode of the device, synchronously compare the trigger source and the target object, mark non-compliant items as failures and record the reasons;
[0106] Counting is performed based on the response window and remaining steps for each rule. If the target is not met, the count is decremented at each step and compared with the upper limit. If it is expected that the rule cannot be completed within the remaining steps and deadline, it is marked as timeout and unqualified. Completion sequence and checkpoints are generated for qualified items.
[0107] Read the recent status and feedback records of the corresponding ward and equipment, drive the execution according to the treatment plan, observe vital signs, environmental parameters and equipment status trajectory and compare them with the preset acceptance range. When all pass, output the verified treatment decision.
[0108] This invention verifies the security and accessibility of the handling scheme before actual execution through formal security verification and digital twin simulation, identifies risks in advance and handles them according to the rollback mechanism, ensures the reliability of equipment command issuance and the traceability of results, and significantly reduces the execution error rate.
[0109] In this embodiment, the recording of the triggering event and the compliance log specifically includes:
[0110] At the edge computing node, the verified and processed decision is received, and a device instruction packet is generated one by one according to the rule items. The instruction packet is encapsulated into a message format that can be sent with the instruction subject, and the sending channel and service quality level are recorded.
[0111] The instruction message is published to the instruction topic, which is received by the execution agent and sent to the corresponding device. It waits for the device to acknowledge the message. If no acknowledgement is received, it is resent at the timeout point with the maximum number of retries. If the retry still fails, a rollback operation is performed and the error reason code and context information are written. At the same time, the received acknowledgement, start time, end time and execution result are published in the feedback topic.
[0112] The system collects execution results from feedback topics and device-side receipts, extracts key measurement values, achievement criteria, and window count status, generates performance evaluation results, writes them to compliance logs and audit logs, saves them to the parameter library, and publishes parameter update events for further updating of the dynamic rule set.
[0113] This invention translates and collects device protocol commands at edge nodes, writes the execution results into compliance and audit logs, and generates parameter update events for dynamic rule re-integration, realizing a closed-loop feedback from triggering to execution to optimization, thereby improving the system's continuous evolution capability.
[0114] Example 1:
[0115] To verify the feasibility of this invention in practice, it was applied to a typical ward scenario in a city's inpatient department. The ward was configured with a combination of multi-source sensing and controllable devices: bedside monitoring collected heart rate, blood pressure, and blood oxygen levels; environmental monitoring collected temperature, humidity, illuminance, and noise levels; and device monitoring controlled infusion pumps, ventilators, and ward lighting. All data was aggregated to an edge computing node via a gateway. On average, approximately 80 status messages were generated per bed per minute, resulting in a large cumulative message volume throughout the day. Traditional threshold alarms and script-based alerts were prone to conflicts and delays under high concurrency, necessitating frequent manual intervention.
[0116] When applied in this scenario, bedside monitoring, environmental sensing, and device status are first unified onto the same timeline. The edge side completes time synchronization, alignment, and anomaly marking to form a subscribing event stream. The perception agent only publishes the status, the decision agent subscribes to the status and publishes the intent, the agent executes the subscription instructions and publishes feedback, and the communication channel maintains order and a acknowledgment mechanism.
[0117] Subsequently, the matching relationship between vital signs and environmental tags is compared within a sliding window, and the results are merged into composite conditions to generate trigger entries for handling. Actions, cutoffs, mutual exclusions, and rollbacks are written into the rule template. This invention maps the template to a synthesis input, introduces a window upper limit and a counter to ensure that the trigger must be achieved within a finite number of steps. The synthesis process only retains actions that are still in the win set after execution, and selects a unique action within the win set in order of smaller parameter changes, lower energy consumption, and smaller target deviation. The resulting dynamic rule set enters mutual exclusion and resource checks, automatically eliminating parallel writing and opposite modes with the same equipment and parameters. After calculating resource usage, it performs reduction, postponement, or replacement of equivalent equipment to obtain executable combinations and schedules. The handling scheme enters formal safety verification to expose out-of-bounds and unreachable risks in advance. Those that fail are rolled back according to the rollback clause and the template is regenerated, and the loop is closed again until it passes. Timeout and retry settings are attached when the scheme is issued, and feedback is used for parameter updates and to trigger incremental resynthesis, which only modifies the affected subgraph, ensuring stability during continuous operation.
[0118] Under the premise of the same bed capacity and equipment configuration, the traditional threshold and script scheme was used as the baseline. The traditional threshold and script scheme refers to the practice of determining whether an alarm is triggered based on a fixed threshold, and then issuing equipment instructions in a fixed order by a preset script. This approach is difficult to handle cross-time windows and multi-source constraints, conflict resolution and resource allocation, has poor adaptability and relies on manual intervention. The experimental comparison data within the continuous observation period are shown in Table 1.
[0119] Table 1 Comparison of the present invention with the baseline scheme
[0120] Indicator Item Baseline scheme This invention Improvement range Trigger accuracy 88.6% 96.2% +7.6pp Decision delay 45.0s 8.7s −80.7% First-time success rate 90.4% 97.8% +7.4pp Mutual exclusion conflict incident / day 6.3 0.5 −92.1% On-time achievement rate within the window 83.1% 95.4% +12.3pp Failure rate 2.9% 0.6% −79.3% Incremental recombinant median time 8.5s 0.12s −98.6% Human intervention rate 22.0% 7.0% -15.0pp
[0121] As shown in Table 1, this invention significantly outperforms the baseline in key aspects. The trigger accuracy rate increased to 96.2%, a 7.6 percentage point increase; the decision latency decreased to 8.7 seconds, an 80.7% reduction; the first-time success rate increased to 97.8%, a 7.4 percentage point increase; and the number of mutual exclusion conflicts decreased from 6.3 per day to 0.5. In terms of timeliness, the on-time achievement rate within the window increased from 83.1% to 95.4%; execution reliability improved, with the failure rate decreasing to 0.6%; it also supports rapid closed-loop processing of parameter events, with a median incremental resynthesis time of only 0.12 seconds; and the overall manual intervention rate decreased from 22.0% to 7.0%, verifying the comprehensive advantages of this invention in real-time performance, determinism, and maintainability.
[0122] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for dynamic rule decision of a ward based on Internet of Things and multi-agent, characterized in that, The method comprises the following steps: establishing a unified abstract interface and a resource directory, collecting ward-related data, standardizing the data, and obtaining a standardized event stream; building three types of agent proxies, publishing state messages based on the standardized event stream, establishing an intention and instruction channel, and forming a communication channel between the proxies; performing complex event processing and semantic fusion based on the communication channel between the proxies, and generating a treatment trigger condition; generating a candidate treatment intention set in the dimensions of illness, environment and equipment control according to the treatment trigger condition, and arranging the set into a rule template set according to specified fields; based on the rule template set and the preset safety constraints, calling a three-core-GR(1) reactive synthesis, completing the optimal decision-making in the winning set within the windowed active time limit, generating a dynamic rule set, and performing incremental re-synthesis based on parameter change events; performing mutual exclusion and resource constraint checking based on the dynamic rule set, and forming a treatment plan within a preset time limit; performing formal safety verification on the treatment plan to obtain a verified treatment decision; translating the verified treatment decision into device protocol instructions on the edge computing node and issuing them, collecting the execution effect and recording the trigger events and compliance logs, and simultaneously updating the dynamic rule set. 2.The ward dynamic rule decision method based on the Internet of Things and multi-agent according to claim 1, wherein The standardized event stream is obtained by: collecting ward-related data in real time through a perception agent, establishing a unified abstract interface and a resource directory for the ward-related data, setting a reference time, correcting fixed offset and clock drift, setting a fixed sampling interval to align the grid, resampling and interpolating irregular samples according to the grid, and outputting a time-corrected and aligned original record set; performing denoising and anomaly detection on the original record set, calculating the standard deviation and comparing it with the preset threshold, retaining the anomaly label, replacing the abnormal points, and obtaining a denoised data set with an anomaly label; based on the denoised data set with an anomaly label, generating an entry containing data source identification, timestamp, denoised value, anomaly label, unit and position at each aligned time, and merging the standardized event stream in chronological order. 3.The ward dynamic rule decision method based on the Internet of Things and multi-agent according to claim 1, characterized in that, The formation of the communication channel between the proxies comprises: creating running instances for the three types of agents including perception agents, decision agents and execution agents, loading configuration files, assigning unique identifiers and access credentials, associating the corresponding ward, bed and controllable device list, setting up heartbeat and health check strategies and starting the processes of the three types of agents, and forming an agent set; deploying an Internet of Things message bus and creating state, intention, instruction and feedback topics, issuing connection parameters to the three types of agents and establishing long connections, converting the standardized event stream into a state message publisher, and enabling the perception agent to continuously write state messages to the state topic to obtain a usable topic set; based on the topic set, binding the publishing and subscribing relationship for the three types of agents and configuring routing rules, the perception agent publishes to the state topic, the decision agent receives the state topic and publishes to the intention topic, the execution agent subscribes to the instruction topic and publishes to the feedback topic, and the routing filtering and isolation strategies are set according to the ward, room and device type, and the communication channel between the proxies is output.
4. The method of claim 1, wherein the method is based on Internet of Things and multi-agent dynamic rules decision of ward. The generation process of the treatment trigger condition comprises: Subscribe to status topics from the inter-agent communication channel and continuously read standardized event streams. Aggregate and deduplicate events according to patient identifier, device identifier and time order to establish an evaluation time sequence. Generate a corresponding time window for each evaluation time and output the original sequence of the window. Within each time window, thresholds, continuous hit durations, and sampling tolerances are set for vital sign records, and upper and lower bounds and mutual exclusion markers are set for environmental and equipment records. The records are compared according to the tag order to generate hit entries. All hit entries within the window are summarized into single-index hit records. Based on the semantic fusion of single-index hit records, the vital signs hit entries and environment and equipment hit entries are combined in a fixed AND, OR, and NOT manner to generate composite conditions, and a disposal trigger condition entry is generated for each composite condition.
5. The method of claim 1, wherein the method is based on Internet of Things and multi-agent dynamic rules decision of ward. The formation of the rule template set specifically includes: Receive treatment trigger conditions, lock the associated patients and target devices one by one, read the latest status values, calculate target values for treatment-related adjustable parameters in the disease dimension, calculate increments for temperature, humidity and lighting in the environmental dimension, give status for parameters of controllable devices in the device control dimension, generate treatment entries for each item and number them, and add them to the candidate list. The candidate list is verified and pruned item by item. The output of each item is compared with the allowable range of system maintenance. The target device is checked to see if it is online and not occupied. The execution can be completed within the time limit specified by the triggering conditions. For multiple mutually exclusive items, only one is kept according to priority to obtain the executable list. The executable list is arranged into a rule list, sorted from high to low priority and execution cost, each item is written as a rule line, and the rule lines are added to the rule list in the order of trigger time. The rule list is then used to form a set of rule templates.
6. The method of claim 1, wherein the method is based on Internet of Things and multi-agent dynamic rules decision of ward. The process of generating the dynamic rule set specifically includes: Receive the rule template set and preset security constraints, call the three-core-GR(1) reactive synthesis, the three-core-GR(1) reactive synthesis is based on GR(1) reactive synthesis, and uses window counting to achieve bounded activity, limits the strategy search to the win set and uses the minimum lexicographical order of the cost vector as the adjudication criterion, the win set is the legal state set, and the threshold and time window parameter changes are only performed on the affected state subgraph for incremental updates of fixed points, expand the trigger, action and time limit fields in the rule template one by one, set a fixed number of response windows and establish corresponding counters, increment the counter in each sampling step when the request appears and has not yet been fulfilled, write the response window and counting logic into the specification and generate the synthesis input; Based on the comprehensive input, construct the environment input, read the trigger, action and time limit fields in the rule template, load the security constraints and resource boundaries, and call the three-core-GR(1) reactive synthesis to obtain the legal state set and the list of actions for each state; Cost adjudication is performed only within the set of legal states. In order, the changes in device parameters, execution energy consumption, and steady-state impact on target deviation of candidate actions in the list of actionable actions are compared. The smaller value is selected in order to obtain the unique action corresponding to each state. The unique action and window counting logic are implemented as a dynamic rule set. Each rule is written with a trigger source, unique action, response window limit and window counting logic, and deterministic rule entries are output according to the rule template and trigger time order. When the parameters of the given parameter library are updated, incremental resynthesis is performed to calculate the affected win set difference. Only the states involved in the difference are regenerated into a list of actionable actions and the cost is adjudicated according to the sequential rules. Unaffected states retain their original actions. After merging, an updated dynamic rule set is formed.
7. The method of claim 1, wherein the method is based on Internet of Things and multi-agent dynamic rules decision of ward. The specific steps involved in formulating the proposed solution are as follows: Receive a dynamic rule set, obtain the device online status from status topics and feedback topics, read the resource limit, remove expired rules or rules with insufficient remaining steps, and form a list to be processed. Perform mutual exclusion and resource checks on the pending list, verifying each item and setting resource limits; The rules that pass the inspection are grouped by target object and equipment, and the parameter changes, energy consumption and target deviation values are compared in turn. They are then determined by fixed numbering, and the results are compiled into a complete handling plan. 8.The ward dynamic rule decision method based on the Internet of Things and multi-agent according to claim 1, wherein, The specific steps for obtaining the verified processing decision include: Receive the handling plan, load the current version of the security constraints and parameter library, verify the device occupancy and resource limit one by one, check the consistency between the instruction and the current mode of the device, synchronously compare the trigger source and the target object, mark non-compliant items as failures and record the reasons; Counting is performed based on the response window and remaining steps for each rule. If the rule is not met, the count is decremented at each step and compared with the upper limit. A completion sequence and checkpoints are generated for qualified items. Read the recent status and feedback records of the corresponding ward and equipment, drive the execution according to the treatment plan, observe vital signs, environmental parameters and equipment status trajectory and compare them with the preset acceptance range. When all pass, output the verified treatment decision. 9.The ward dynamic rule decision method based on the Internet of Things and multi-agent according to claim 1, wherein, The specific records of the triggering events and compliance logs include: At the edge computing node, the verified and processed decision is received, and a device instruction packet is generated one by one according to the rule items. The instruction packet is encapsulated into a message format that can be sent with the instruction subject, and the sending channel and service quality level are recorded. The instruction message is published to the instruction topic, which is received by the executing intelligent agent and sent to the corresponding device. The agent waits for the device's response and simultaneously publishes the received response, start time, end time and execution result in the feedback topic. The system collects execution results from feedback topics and device-side receipts, extracts key measurement values, achievement criteria, and window count status, generates performance evaluation results, writes them to compliance logs and audit logs, saves them to the parameter library, and publishes parameter update events for further updating of the dynamic rule set.
Citation Information
Cited By
Brain-computer interface smart home multi-device cooperative control method and system
CN122112649A
Brain-computer interface intelligent home multi-device cooperative control method and system
CN122112649B