Multi-source sensing data fusion and event reasoning method based on edge computing and knowledge graph

By fusing multi-source sensing data through edge computing and knowledge graphs, combined with ultra-wideband positioning and non-intrusive load decomposition technology, multi-dimensional description of target object behavior and event recognition in home scenarios are achieved. This solves the false alarm and false negative problems in event recognition in existing technologies, and improves accuracy and privacy protection capabilities.

CN122310431APending Publication Date: 2026-06-30SHANDONG VOCATIONAL COLLEGE OF ECONOMICS & TRADE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG VOCATIONAL COLLEGE OF ECONOMICS & TRADE
Filing Date
2026-04-03
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing home monitoring solutions struggle to accurately identify abnormal events through multi-source information correlation analysis, leading to false alarms or missed alarms. Furthermore, they lack a unified modeling capability for the semantic relationships between multi-source observation facts, resulting in weak interpretability and tiered handling capabilities for event identification results.

Method used

A multi-source sensing data fusion method based on edge computing and knowledge graphs is adopted. The real-time location coordinates of the target object are obtained through ultra-wideband positioning technology, and the operating status of electrical appliances is identified by non-intrusive load decomposition technology. Event path reasoning is performed using knowledge graphs to achieve three-dimensional fusion perception of location information, electricity consumption behavior and time context.

Benefits of technology

It improves the accuracy and robustness of event recognition in home scenarios, reduces system deployment complexity and cost, and ensures privacy protection, making it suitable for home scenarios with high privacy requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122310431A_ABST
    Figure CN122310431A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-source sensing data fusion and event reasoning method based on edge computing and knowledge graphs, relating to the field of remote monitoring technology. The method includes the following steps: Step 1, synchronous acquisition of multi-source sensing data; Step 2, location semantic mapping and appliance operating status identification; Step 3, the edge gateway constructs a set of current observation facts based on the current functional area number, current area dwell time, appliance status register content, and the time interval to which the current timestamp belongs, determining the current event type and current event level; Step 4, the cloud server performs incremental updates to the home scene event knowledge graph based on event feedback records and distributes the updates to the edge gateway. This invention achieves three-dimensional fusion sensing of location information, electricity consumption behavior, and temporal context, possessing advantages such as strong privacy protection, good interpretability, and a response measure that matches the level of risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote monitoring technology, and in particular to a method for multi-source sensing data fusion and event reasoning based on edge computing and knowledge graphs. Background Technology

[0002] With the deepening trend of population aging and the continuous growth of home care demand, intelligent monitoring and abnormal event recognition technologies for home scenarios are receiving increasing attention. Existing home monitoring solutions typically use positioning devices, environmental sensors, power data acquisition devices, or voice interaction devices to sense the activity status of family members and the operating status of home devices, in order to respond promptly to events such as abnormal stays, falls, forgetting to turn off appliances, and unusual nighttime activities.

[0003] In existing technologies, one type of solution mainly relies on a single sensing source for event judgment. For example, it may determine whether a person has been staying in a bathroom, kitchen, or bedroom for an extended period based solely on their location information, or determine the on / off status of household appliances based solely on changes in total load power. While this type of solution is relatively simple to implement, it often only yields partial state conclusions due to the lack of correlation analysis between multi-source information. It struggles to accurately identify real events from the combined relationships between spatial location, duration of stay, time-of-day characteristics, and appliance status, making it prone to false alarms or missed alarms.

[0004] Another type of solution, while capable of simultaneously accessing multiple sensor data sources, typically only focuses on data aggregation or threshold rule judgment. For example, it compares location coordinates, time information, and appliance switch status with preset thresholds, triggering an alarm directly when any indicator exceeds the threshold. This type of solution lacks the ability to uniformly model the semantic relationships between multi-source observation facts, making it difficult to express the correlation constraints between "specific area—specific time period—specific appliance status—specific dwell time," and also difficult to deduce different event types and their levels based on different combinations of facts. This results in weak interpretability and tiered handling capabilities for event identification results. Summary of the Invention

[0005] The purpose of this invention is to provide a multi-source perception data fusion and event reasoning method based on edge computing and knowledge graphs, which realizes three-dimensional fusion perception of location information, electricity consumption behavior and time context, and has the beneficial effects of strong privacy protection, good interpretability and response measures that match the level of risk.

[0006] To address the aforementioned technical problems, this invention provides a method for multi-source perceptual data fusion and event reasoning based on edge computing and knowledge graphs, comprising the following steps: Step 1, Synchronous Acquisition of Multi-Source Sensing Data: The real-time location coordinate sequence of the ultra-wideband positioning tag worn by the target object is obtained through the ultra-wideband positioning anchor network deployed in the home scenario. The instantaneous current value sequence and instantaneous voltage value sequence of the total household load are obtained through the power acquisition terminal installed at the distribution box. The edge gateway adds a unified timestamp to the received real-time location coordinate sequence, instantaneous current value sequence and instantaneous voltage value sequence. Step 2, Location semantic mapping and appliance operating status identification: The edge gateway determines the current functional area number and current area stay duration of the target object based on the real-time location coordinate sequence and the pre-stored home space partition table. The edge gateway performs non-intrusive load decomposition processing on the instantaneous current value sequence and instantaneous voltage value sequence to identify the current operating status of each appliance and store it in the appliance status register. Step 3, Event path reasoning based on knowledge graph: The edge gateway constructs a set of current observation facts based on the current functional area number, the current stay duration in the current area, the contents of the appliance status register, and the time interval to which the current timestamp belongs. The edge gateway performs event path reasoning in the pre-stored home scene event knowledge graph based on the set of current observation facts to determine the current event type and the current event level. Step 4, tiered handling execution and incremental knowledge graph update: The edge gateway queries the tiered handling action table based on the current event level and executes the corresponding handling action sequence. The edge gateway determines the final event nature based on the handling feedback information and generates an event feedback record. The cloud server performs incremental updates to the home scene event knowledge graph based on the event feedback record and distributes it to the edge gateway.

[0007] Furthermore, in step 1, the specific process of the ultra-wideband positioning anchor network acquiring the real-time location coordinate sequence is as follows: the ultra-wideband positioning tag periodically sends ranging pulse signals to each ultra-wideband positioning anchor. After receiving the ranging pulse signals, each ultra-wideband positioning anchor records the reception time and reports it to the edge gateway. Based on the difference in reception time of each ultra-wideband positioning anchor and the known installation coordinates of each ultra-wideband positioning anchor, the edge gateway uses the time difference of arrival positioning algorithm to calculate the three-dimensional spatial coordinates of the ultra-wideband positioning tag. The edge gateway continuously executes the calculation process at a fixed period to form the real-time location coordinate sequence.

[0008] Furthermore, in step 1, the power acquisition terminal has a built-in current transformer and voltage transformer. The power acquisition terminal synchronously acquires the instantaneous current value and instantaneous voltage value of the main incoming line at a preset sampling rate. The power acquisition terminal transmits the instantaneous current value sequence and instantaneous voltage value sequence to the edge gateway in real time through a wireless communication link.

[0009] Furthermore, in step 2, the specific process by which the edge gateway determines the current functional area number is as follows: Each record in the home space partitioning table contains a functional area number, a functional area name, and a spatial boundary description stored in the form of a list of polygon vertex coordinates. The edge gateway extracts the target object plane coordinates of the current frame from the real-time location coordinate sequence, traverses each record in the home space partitioning table in turn, performs a ray-based point determination on each record, draws a ray from the target object plane coordinates in a fixed direction and calculates the number of intersections between the ray and each side of the polygon. If the number of intersections is odd, it is determined that the target object plane coordinates are located inside the currently traversed functional area, and the corresponding functional area number is recorded as the current functional area number.

[0010] Furthermore, in step 2, the edge gateway maintains a zone dwell timer. When the current functional zone number is the same in two consecutive frames, the timer value is accumulated by the time interval between the two frames. When the current functional zone number is different in two consecutive frames, the timer value is cleared to zero. The current timer value is the current zone dwell time.

[0011] Furthermore, in step 2, the specific process of non-intrusive load decomposition processing is as follows: The edge gateway segments the instantaneous current value sequence and the instantaneous voltage value sequence according to the power grid frequency cycle. It multiplies the instantaneous current value sequence and the instantaneous voltage value sequence in each power frequency cycle to obtain the instantaneous power value sequence and calculates the arithmetic mean to obtain the average active power value. The edge gateway performs a first-order difference operation on the average active power value time sequence to obtain the power change value sequence. When the absolute value of the power change value exceeds the preset power jump threshold, it determines that an appliance state switching event has occurred. The edge gateway extracts the instantaneous current value sequence before and after the occurrence of the appliance state switching event as a transient current waveform and performs a discrete Fourier transform to obtain the amplitude of each harmonic component. It compares the power change value and the amplitude of each harmonic component with the pre-stored appliance feature fingerprint table to identify the appliance number. It determines the on or off state of the appliance based on the positive or negative value of the power change value and updates the appliance state register.

[0012] Furthermore, in step 3, the family scene event knowledge graph is stored using a directed graph data structure, which includes an entity node table and a relationship edge table. Each record in the entity node table includes an entity node number, an entity type identifier, and a set of entity attribute fields. The entity type identifier can take values ​​such as region type, appliance type, time period type, behavior type, and risk type. Each record in the relationship edge table includes a relationship edge number, a starting entity node number, an ending entity node number, and a relationship type identifier.

[0013] Furthermore, in step 3, the current set of observed facts contains four observation fact items: the first observation fact item is the current functional area number, the second observation fact item is the dwell time interval identifier to which the current dwell time belongs, the third observation fact item is the set of all appliance numbers in the appliance status register that are in the on state, and the fourth observation fact item is the time period interval identifier to which the current timestamp belongs.

[0014] Furthermore, in step 3, the specific process of event path reasoning is as follows: The edge gateway retrieves the corresponding regional activation node in the entity node table based on the first observation fact item, and retrieves the corresponding time period activation node based on the fourth observation fact item; the edge gateway traverses the relational edge table to obtain the first candidate behavior node set associated with the regional activation node and the second candidate behavior node set associated with the time period activation node, and calculates the intersection of the two to obtain the regional and time period joint candidate behavior node set; the edge gateway performs electrical appliance constraint verification on each candidate behavior node in the regional and time period joint candidate behavior node set, and determines whether the third observation fact item satisfies the constraint conditions of the required electrical appliance number list field and the excluded electrical appliance number list field of the current candidate behavior node. The candidate behavior nodes that pass the verification constitute the electrical appliance constraint-restricted behavior node set; the edge gateway performs electrical appliance constraint verification on each candidate behavior node in the regional and time period joint candidate behavior node set. After constraint, each behavior node in the set of behavior nodes performs a stay duration anomaly assessment. The current stay duration in the area is compared with the lower limit and upper limit of the normal stay duration field values ​​of the current behavior node to determine whether the stay duration anomaly is marked as too short, too long, or normal. Behavior nodes marked as too short or too long are selected to form an abnormal behavior node set. The edge gateway traverses the relational edge table to search for associated candidate event nodes for each abnormal behavior node in the abnormal behavior node set. It determines whether the stay duration anomaly mark matches the trigger anomaly type field value of the candidate event node. Matching candidate event nodes are added to the trigger event node set. From the trigger event node set, the risk node with the highest risk level field value is selected to determine the current event type and the current event level.

[0015] Furthermore, in step 4, each record in the tiered response action table includes a risk level value and a response action code sequence. The response action codes in the response action code sequence correspond to voice inquiry actions, family member notification actions, cloud-based collaborative analysis actions, and emergency call actions in sequence. The response feedback information includes the target's voice response text, the event confirmation instruction or event cancellation instruction returned by the family member's terminal, and the collaborative analysis conclusion returned by the remote service platform. The final event classification value includes real event, false alarm event, and user-initiated cancellation event. The event feedback record includes the current functional area number, current area stay duration, third observation fact item, fourth observation fact item, current event type, current event level, and final event classification.

[0016] The multi-source perception data fusion and event reasoning method based on edge computing and knowledge graph of the present invention has the following beneficial effects: This invention, through the synergistic combination of ultra-wideband positioning technology and non-invasive load decomposition technology, achieves simultaneous acquisition of the spatial location status of target objects and the operational status of household appliances, forming a multi-source heterogeneous observation information set for home scenarios. Compared to solutions relying solely on a single positioning sensor, a single environmental sensor, or a single appliance monitoring device, this invention can simultaneously describe the behavioral context of the target object from multiple dimensions, including regional location, dwell time, time period characteristics, and appliance usage status. This significantly enhances the perceptual dimensions upon which event recognition depends, improving the accuracy and robustness of event judgment in complex home environments.

[0017] This invention employs an ultra-wideband positioning anchor network to acquire the real-time position coordinate sequence of the target object, exhibiting strong resistance to multipath interference and good indoor positioning stability. It can adapt to positioning needs in home scenarios with wall obstructions, furniture barriers, and complex electromagnetic environments. Furthermore, by deploying a single power acquisition terminal at the distribution box and combining it with non-intrusive load decomposition processing, this invention can identify the operating status of all appliances in the house, eliminating the need for separate sensors at each appliance. This effectively reduces system deployment complexity, installation costs, and subsequent maintenance difficulties, enhancing the feasibility and promotional value of the solution in real-world home scenarios.

[0018] This invention, without relying on continuous image acquisition by cameras, can construct the set of observed facts required for event reasoning using only location data and electrical parameter data. This not only obtains richer behavioral semantic information but also avoids the privacy exposure issues that are easily caused by image and video surveillance solutions, making it particularly suitable for home scenarios with high privacy protection requirements. Therefore, this invention ensures event recognition capabilities while also considering the daily privacy of family members and the user's acceptance. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the method flow for a multi-source perception data fusion and event reasoning method based on edge computing and knowledge graphs provided in an embodiment of the present invention. Detailed Implementation

[0020] refer to Figure 1 A multi-source perceptual data fusion and event reasoning method based on edge computing and knowledge graphs includes the following steps: Step 1, Synchronous Acquisition of Multi-Source Sensing Data: The real-time location coordinate sequence of the ultra-wideband positioning tag worn by the target object is obtained through the ultra-wideband positioning anchor network deployed in the home scenario. The instantaneous current value sequence and instantaneous voltage value sequence of the total household load are obtained through the power acquisition terminal installed at the distribution box. The edge gateway adds a unified timestamp to the received real-time location coordinate sequence, instantaneous current value sequence and instantaneous voltage value sequence. Step 2, Location semantic mapping and appliance operating status identification: The edge gateway determines the current functional area number and current area stay duration of the target object based on the real-time location coordinate sequence and the pre-stored home space partition table. The edge gateway performs non-intrusive load decomposition processing on the instantaneous current value sequence and instantaneous voltage value sequence to identify the current operating status of each appliance and store it in the appliance status register. Step 3, Event path reasoning based on knowledge graph: The edge gateway constructs a set of current observation facts based on the current functional area number, the current stay duration in the current area, the contents of the appliance status register, and the time interval to which the current timestamp belongs. The edge gateway performs event path reasoning in the pre-stored home scene event knowledge graph based on the set of current observation facts to determine the current event type and the current event level. Step 4, tiered handling execution and incremental knowledge graph update: The edge gateway queries the tiered handling action table based on the current event level and executes the corresponding handling action sequence. The edge gateway determines the final event nature based on the handling feedback information and generates an event feedback record. The cloud server performs incremental updates to the home scene event knowledge graph based on the event feedback record and distributes it to the edge gateway.

[0021] Intelligent security and remote linkage systems in home settings rely on real-time perception of target location information and household electricity status. To achieve this goal, this implementation method combines ultra-wideband positioning technology with power load acquisition technology. The two types of data are time-aligned at the edge gateway, providing a reliable data foundation for subsequent behavior analysis and risk inference.

[0022] The deployment of the ultra-wideband (UWB) positioning anchor network follows the geometric characteristics of the home space. In a typical home layout, at least three UWB anchors should be installed in each room requiring coverage to meet the minimum geometric constraints for 3D positioning. When the room area exceeds 20 square meters or there are many obstructions, it is recommended to increase the number of UWB anchors to four to improve positioning accuracy. UWB anchors are preferably installed in the four corners of the room ceiling, at a height between 2.4 and 2.8 meters from the ground. This height ensures good coverage of the indoor activity area while avoiding severe signal obstruction from furniture and other objects. All UWB anchors are connected to the edge gateway via wired Ethernet. Wired connections provide more stable data transmission and more accurate time synchronization compared to wireless connections.

[0023] The target user wears an ultra-wideband (UWB) positioning tag, which can take the form of a bracelet, pendant, or badge. The UWB tag contains an UWB radio frequency chip and a miniature battery, broadcasting ranging pulse signals to the surrounding environment at fixed intervals. These ranging pulse signals utilize UWB pulse radio technology, with pulse widths between 1 and 2 nanoseconds and a bandwidth exceeding 500 MHz. The extremely narrow time-domain characteristics of the UWB pulse signal enable centimeter-level ranging resolution, a capability unattainable by traditional narrowband wireless positioning technologies. The signal transmission period of the UWB tag is set between 100 and 500 milliseconds. Shorter transmission periods achieve higher location update rates but increase power consumption; longer transmission periods have the opposite effect. For elderly users with slower movement, a 200-millisecond transmission period is typically sufficient for behavioral monitoring while ensuring the UWB tag can operate continuously for more than 7 days on a single charge.

[0024] After receiving the ranging pulse signal, each ultra-wideband (UWB) positioning anchor point records the reception time using its built-in high-precision clock and reports the reception time data to the edge gateway via Ethernet. The edge gateway aggregates the reception time data from all UWB positioning anchor points and uses a time-difference-of-arrival (TDOA) positioning algorithm to calculate the three-dimensional spatial coordinates of the UWB positioning tag. The basic idea of ​​the TDOA positioning algorithm is to determine the location of the signal source by using the time difference in arrival of the ranging pulse signal at different UWB positioning anchor points. Since the propagation speed of electromagnetic waves in air is close to the speed of light, approximately 299,792,458 meters per second, nanosecond-level time differences correspond to decimeter-level or even centimeter-level distance differences.

[0025] Suppose the edge gateway receives the first... The reception time of each ultra-wideband positioning anchor point is ,in This indicates that the ranging pulse signal has reached the first... The reading of the local clock at each ultra-wideband positioning anchor point. The arrival time difference between the first ultra-wideband positioning anchor point and the second ultra-wideband positioning anchor point is denoted as . ,in The physical meaning is the time difference between the arrival times of the ranging pulse signal and the two anchor points. Multiplying this time difference by the speed of electromagnetic wave propagation... The distance difference between the ultra-wideband positioning tag and the two anchor points can be obtained. ,in The speed at which electromagnetic waves propagate in the air. Indicates the ultra-wideband positioning tag to the first The distance to the first anchor point and the distance to the second anchor point The difference in distances between the anchor points. Geometrically, the locus of points whose distance difference to two fixed points is constant is a hyperboloid with those two fixed points as foci. When there are more than three ultra-wideband positioning anchor points, multiple such hyperboloid equations can be established, and the intersection of these hyperboloids is the three-dimensional spatial coordinate of the ultra-wideband positioning tag.

[0026] The edge gateway uses an iterative least squares method to solve the aforementioned nonlinear equations. The iterative process begins with an initial position estimate, which can be set as the geometric center of the room. In each iteration, the edge gateway calculates the theoretical distance difference between the current position estimate and each ultra-wideband positioning anchor point, compares it with the actual measured distance difference, and adjusts the position estimate along the gradient direction based on the deviation. The iterative process continues until the change in the position estimate is less than a preset convergence threshold, typically set to 1 mm. In a typical home setting, the ultra-wideband positioning system can achieve a positioning accuracy of 10 cm to 30 cm, which is sufficient to distinguish whether a target object is located in different functional areas.

[0027] The edge gateway continuously executes the above calculation process at a fixed period. Each completed calculation generates a location data frame containing three-dimensional spatial coordinates. Continuous location data frames constitute the real-time location coordinate sequence of the target object. The generation period of the location data frames is consistent with the signal transmission period of the ultra-wideband positioning tag. With a transmission period of 200 milliseconds, the update frequency of the real-time location coordinate sequence is 5 frames per second.

[0028] The power acquisition terminal is installed at the main incoming line of the household distribution box to monitor the power consumption status of the entire household. The core components of the power acquisition terminal include a current transformer and a voltage transformer. The current transformer adopts an open-loop structure for easy installation on the main incoming line without interrupting power. The transformation ratio of the current transformer is selected based on the household's power capacity. For a household power distribution system with a total capacity of 40 amps, a current transformer with a transformation ratio of 100:1 is typically selected. This ratio means that when the primary current is 100 amps, the secondary output current is 1 amp. The voltage transformer is connected in parallel between the live and neutral wires of the main incoming line via two leads to measure the mains voltage.

[0029] The power acquisition terminal has a built-in high-speed analog-to-digital converter that synchronously acquires the secondary current of the current transformer and the output voltage of the voltage transformer at a sampling rate of 8,000 times per second. The 8,000 sampling rate per second is chosen because the mains frequency is 50 Hz, and one power frequency cycle lasts 20 milliseconds. 8,000 samples per second means acquiring 160 sampling points per power frequency cycle. This sampling density accurately captures the higher harmonic components of the current waveform, which are important characteristics that distinguish different types of electrical appliances. During the sampling process, current sampling and voltage sampling are strictly synchronized, with the time deviation between them controlled within 1 microsecond to ensure the accuracy of subsequent power calculations.

[0030] The power acquisition terminal transmits the collected instantaneous current and voltage value sequences to the edge gateway in real time via a wireless communication link. The wireless communication link can be implemented using Wi-Fi or Bluetooth Low Energy technology, and the data transmission rate must meet the real-time transmission requirements of the raw sampled data. With a configuration of 8000 samples per second and each sample value occupying 2 bytes, the data transmission rate for a single channel is 16 kilobytes per second, and the combined rate for both current and voltage channels is 32 kilobytes per second. This data volume is more than sufficient for existing home wireless networks.

[0031] The edge gateway incorporates a unified clock module. The clock source for this module can be a Network Time Protocol (NTP) server, a GPS timing signal, or a local high-precision crystal oscillator. In home environments with internet connectivity, NTP is preferred for clock synchronization, achieving an accuracy within 10 milliseconds. When receiving location data frames from an ultra-wideband positioning system (UWBS), the edge gateway appends a timestamp provided by the unified clock module to each frame. Similarly, when receiving sampling data from a power data acquisition terminal, it appends a timestamp to each batch of data. The timestamps use a unified format, accurate to the millisecond level, ensuring a consistent time reference for both location data from the UWBS and power data from the power acquisition terminal, laying the foundation for subsequent multi-source data fusion analysis.

[0032] As an optional implementation, when there are multiple target objects in a home setting, each person wears their own ultra-wideband positioning tag. Each ultra-wideband positioning tag is configured with a different identification code. When calculating the location coordinates, the edge gateway distinguishes the location data of different target objects according to the identification code and generates their own real-time location coordinate sequences.

[0033] As an alternative implementation, in addition to installing the power acquisition terminal at the main incoming line of the distribution box, additional power acquisition terminals can be installed on the branch circuits of key concern, such as the kitchen circuit and the bathroom circuit. This distributed acquisition method can provide more detailed information on appliance usage, but it will increase the system deployment cost.

[0034] After acquiring the real-time location coordinate sequence of the target object, the edge gateway needs to convert the abstract three-dimensional coordinates into functional area information with clear semantics. This conversion process is called location semantic mapping. Simultaneously, the edge gateway performs non-intrusive load decomposition processing on the power acquisition data to identify the operating status of each appliance in the household. The combination of location semantic information and appliance operating status information can provide rich contextual information for subsequent behavior pattern inference and health risk assessment.

[0035] The edge gateway's memory pre-stores a home space partitioning table, which is entered by installers or users via a companion mobile application during system initialization. The home space partitioning table records information about each functional area in the home environment in list form. Each record describes a functional area and includes three fields: functional area number, functional area name, and spatial boundary description. The functional area number is a unique integer identifier; for example, 1 represents the living room, 2 represents the master bedroom, 3 represents the bathroom, 4 represents the kitchen, and 5 represents the balcony. The functional area name is a human-readable textual description. The spatial boundary description is stored as a list of polygon vertex coordinates, recording the planar coordinates of each vertex of the functional area boundary polygon in the home coordinate system in clockwise or counterclockwise order. The home coordinate system is a two-dimensional Cartesian coordinate system with a fixed point in the home as its origin, and the coordinate unit is meters.

[0036] Taking a rectangular bathroom as an example, assuming its four corners have the following coordinates in the home coordinate system: bottom left corner: x-coordinate 5.0 meters, y-coordinate 2.0 meters; bottom right corner: x-coordinate 7.0 meters, y-coordinate 2.0 meters; top right corner: x-coordinate 7.0 meters, y-coordinate 4.0 meters; top left corner: x-coordinate 5.0 meters, y-coordinate 4.0 meters, then the spatial boundary description of this bathroom is stored as a list containing these four coordinate points, arranged in clockwise order. For irregularly shaped functional areas, the list of polygon vertex coordinates contains more coordinate points to accurately describe its boundary outline.

[0037] The edge gateway extracts the 3D spatial coordinates of the target object in the current frame from the real-time location coordinate sequence and projects them onto a horizontal plane to obtain the target object's planar coordinates. The projection operation simply ignores the height component in the 3D coordinates, retaining only the horizontal and vertical coordinates on the horizontal plane. This approach is based on the following considerations: In a home setting, functional area division is primarily based on the spatial distribution on the horizontal plane, rather than vertical height differences; for single-story residences, the target object is always on the same horizontal plane, and height information does not contribute to functional area determination; for multi-story residences, the floor where the target object is located can be pre-determined using height information, and then functional area determination can be performed in the corresponding planar coordinate system.

[0038] The edge gateway sequentially traverses each record in the home space partitioning table, performing a ray casting test on each record to determine if a point is inside a polygon. Ray casting is a classic algorithm in computational geometry for determining the positional relationship between a point and a polygon. Its basic principle is: draw a ray from the point to be determined in any fixed direction, calculate the number of intersections between the ray and the polygon boundary; if the number of intersections is odd, the point is determined to be inside the polygon; if the number of intersections is even, the point is determined to be outside the polygon. The geometric intuition behind this rule is that as the ray extends outward from the point, each crossing of the polygon boundary signifies an "entry" or "exit"; an odd number of crossings indicates the ray originates inside the polygon, and an even number of crossings indicates the ray originates outside the polygon.

[0039] In practice, the edge gateway draws a horizontal ray from the target object's planar coordinates in a due east direction (positive x-axis direction). For each edge of the polygon described by the polygon vertex coordinate list, the edge gateway determines whether the edge intersects with the ray. Let one edge of the polygon be a vertex... and vertex It is connected, among which The coordinates are , The coordinates are , and Let x and y represent the x-coordinates of the two vertices, respectively. and These represent the ordinates of the two vertices. The coordinates of the target object's plane are denoted as follows. ,in The x-coordinate of the target object. The vertical coordinate of the target object. The ray extending eastward and the edge... The condition for intersection is: edges Crossing the horizontal line where the ray is located, that is and Located respectively The two sides or one of them equal to And the intersection point is located at The due east direction, i.e., the x-coordinate of the intersection point is greater than .

[0040] The edge gateway traverses all edges of the currently recorded polygon, accumulating the number of edges intersecting with the ray; this number is the intersection point count. If the intersection point count is odd, it determines that the target object's planar coordinates are within the currently traversed functional area. The edge gateway records the functional area number of this record as the current functional area number and terminates the traversal process. If the intersection point count is even after traversing all records in the home space partition table, it indicates that the target object is outside all defined functional areas. The edge gateway sets the current functional area number to the special value 0, representing an unknown area.

[0041] The edge gateway maintains a zone dwell timer to record the continuous dwell time of a target object within the current functional area. The zone dwell timer operates as follows: when two consecutive frames of location data have the same current functional area number, it indicates that the target object is still within the same functional area, and the zone dwell timer's count is incremented by the time interval between the two frames. When two consecutive frames of location data have different current functional area numbers, it indicates that the target object has moved from one functional area to another, and the zone dwell timer's count is reset to zero and restarted. With a location data update frequency of 5 frames per second and a time interval of 200 milliseconds between frames, the zone dwell timer increments in 200-millisecond steps. The edge gateway records the current count of the zone dwell timer as the current zone dwell time, in seconds.

[0042] Non-intrusive load decomposition is a technology that identifies the operating status of individual appliances simply by monitoring the total household power load, without requiring separate monitoring equipment for each appliance, hence the name "non-intrusive." Its technical principle is that different types of appliances have different electrical characteristics, including rated power, startup transient waveforms, and steady-state current harmonic distribution. These characteristics are like the "fingerprints" of the appliances; by analyzing changes in these characteristics within the total load, the switching status of each appliance can be deduced.

[0043] The edge gateway's memory pre-stores an appliance feature fingerprint table. This table is built during system initialization through a learning process or pre-configured by the device manufacturer using typical characteristics of common household appliances. The appliance feature fingerprint table records the electrical characteristics of various appliances in a home environment in list form. Each record describes one appliance and includes five fields: appliance number, appliance name, rated power value, startup transient characteristic description, and steady-state current harmonic characteristic description. The appliance number is a unique integer identifier; for example, 1 represents an electric water heater, 2 represents a microwave oven, 3 represents a television, 4 represents an air conditioner, and 5 represents an electric wheelchair charger. The appliance name is a human-readable textual description. The rated power value is the power consumption of the appliance during normal operation, measured in watts. The startup transient characteristic description records the current waveform characteristics at the moment of appliance startup; for example, motor-type appliances exhibit a significant inrush current during startup. The steady-state current harmonic characteristic description records the harmonic composition of the current waveform when the appliance is operating stably, stored as a sequence of harmonic amplitude ratios with the fundamental amplitude as a reference.

[0044] The edge gateway performs non-intrusive load decomposition processing on the instantaneous current and voltage value sequences, as follows: First, the edge gateway segments the instantaneous current and voltage value sequences according to the power grid frequency cycle. The power grid frequency is 50 Hz, and one power frequency cycle lasts 20 milliseconds. At a sampling rate of 8000 times per second, each power frequency cycle contains 160 sampling points. The edge gateway segments the data into groups of 160 sampling points, with each segment corresponding to a complete power frequency cycle.

[0045] For each power frequency cycle, the edge gateway multiplies the instantaneous current and voltage sequences point by point to obtain the instantaneous power sequence for that cycle. Let the th... The instantaneous current value at each sampling point is The instantaneous voltage value is Then the first The instantaneous power value of each sampling point is ,in The unit is ampere. The unit is volt. The unit is watts. The edge gateway calculates the arithmetic mean of all 160 sampling points of the instantaneous power value sequence to obtain the average active power value for that power frequency cycle. The average active power value reflects the actual electrical energy consumed by the total household load during that cycle.

[0046] The edge gateway maintains a continuous time series of average active power values, appending it to the series each time a new average active power value is calculated. The edge gateway performs a first-order difference operation on the average active power value time series to obtain a power change value series. The first-order difference operation calculates the difference between two adjacent average active power values; that is, the power change value equals the average active power value of the current period minus the average active power value of the previous period. Each element in the power change value series reflects the change in the total household load power at the corresponding time.

[0047] When the absolute value of the power change at a certain moment in the power change value sequence exceeds a preset power jump threshold, the edge gateway determines that an appliance state switching event has occurred at that moment, i.e., an appliance has been turned on or off. The setting of the power jump threshold needs to balance detection sensitivity and false alarm rate. If the threshold is set too low, power fluctuations during normal appliance operation will be misjudged as state switching; if the threshold is set too high, the switching actions of low-power appliances will be missed. For typical household scenarios, a power jump threshold between 30 watts and 50 watts provides good detection performance.

[0048] Upon detecting an appliance state transition event, the edge gateway needs to further identify the type of appliance involved. The edge gateway extracts the instantaneous current value sequence within five power frequency cycles before and after the appliance state transition event as a transient current waveform, totaling 10 power frequency cycles (200 milliseconds). The transient current waveform contains the current change process before and after the appliance state transition, which contains characteristic information about the appliance type.

[0049] The edge gateway performs a Discrete Fourier Transform (DFT) on the transient current waveform, converting the time-domain current waveform into a frequency-domain representation of harmonic components. The result of the DFT is a set of complex coefficients, each corresponding to a specific frequency component, and the magnitude of the complex coefficient is the amplitude of that frequency component. The edge gateway extracts the amplitudes of the fundamental component (50 Hz) and the various harmonic components (100 Hz, 150 Hz, 200 Hz, etc.) to form a harmonic amplitude vector.

[0050] The edge gateway compares the power change value and harmonic amplitude vector of this appliance state switching event with each record in the appliance feature fingerprint table. The comparison process first filters candidate appliances with similar rated power values ​​based on the absolute value of the power change. Then, it calculates the similarity between the harmonic amplitude vector and the steady-state current harmonic characteristic description of each candidate appliance. The appliance with the highest similarity is selected as the appliance involved in this appliance state switching event, and its corresponding appliance number is the identification result. Similarity calculation can use metrics such as cosine similarity or Euclidean distance.

[0051] The sign of the power change value can be used to determine the direction of the appliance's state switching: if the power change value is positive, it indicates that the total household load power has increased, meaning that an appliance has switched from the off state to the on state; if the power change value is negative, it indicates that the total household load power has decreased, meaning that an appliance has switched from the on state to the off state.

[0052] The edge gateway maintains an appliance status register, which stores each appliance's ID and its current operating status in key-value pairs. The operating status can be either "on" or "off." During system initialization, all appliances in the appliance status register are set to "off." Whenever an appliance status transition event is detected and appliance identification is completed, the edge gateway updates the operating status of the corresponding appliance ID in the appliance status register based on the identified appliance ID and the direction of the status transition. The contents of the appliance status register reflect a snapshot of the operating status of each appliance in the home at the current moment, providing crucial information for subsequent behavioral pattern inference.

[0053] As an optional implementation, when multiple appliances turn on or off in a very short period of time, causing power changes to overlap, the edge gateway adopts an iterative decomposition strategy: first, it identifies the appliance with the largest power change value and deducts its contribution from the total power change; then, it repeats the above identification process for the residual power change until the residual power change is less than the power jump threshold.

[0054] As an alternative implementation, the appliance feature fingerprint table can be continuously updated through online learning. When a user actively marks the type of appliance corresponding to a certain appliance switching action through a mobile application, the edge gateway uses the power change value and harmonic features of that event as new samples to correct the feature description of the corresponding appliance in the appliance feature fingerprint table, so that the appliance identification accuracy gradually improves with the increase of usage time.

[0055] After the edge gateway completes location semantic mapping and appliance operating status identification, it needs to integrate this multi-source sensing information for intelligent reasoning to determine whether the target object is currently facing a health risk. Traditional rule-based judgment methods are difficult to handle the complexity and individual differences in home scenarios. Knowledge graphs, as a structured knowledge representation, can encode domain expert experience in the form of entities and relationships, and achieve flexible reasoning through path search on the graph. This implementation uses a home scenario event knowledge graph as the knowledge foundation for reasoning. By constructing a set of currently observed facts and performing path search within the knowledge graph, it achieves intelligent mapping from multi-source sensing data to risk event determination.

[0056] The edge gateway's memory pre-stores a knowledge graph of home scene events. This knowledge graph uses a directed graph data structure, consisting of an entity node table and a relationship edge table. A directed graph is a data structure composed of nodes and directed edges, where an edge points from one node to another, indicating a directional relationship between the two nodes. The advantages of using a directed graph structure to store knowledge are: firstly, directed graphs can naturally express asymmetric relationships between entities. For example, in the knowledge that "staying too long in the bathroom indicates a risk of falling," staying too long in the bathroom is the cause, and the risk of falling is the result; the relationship between the two is directional. Secondly, directed graphs support efficient path search algorithms, enabling rapid traversal of relevant nodes along the direction of the edges, achieving reasoning from known facts to unknown conclusions.

[0057] Each record in the entity node table describes an entity node, comprising three parts: entity node number, entity type identifier, and entity attribute field set. The entity node number is a unique integer identifier within the entire knowledge graph, used to reference the node in the relation edge table. The entity type identifier indicates the category to which the node belongs, with values ​​including five types: region type, appliance type, time period type, behavior type, and risk type. Different types of entity nodes have different attribute field sets, which store the node's specific attribute information in the form of a key-value pair list.

[0058] Region-type entity nodes represent various functional areas within a home. Their attribute field set includes a region ID field, the value of which corresponds one-to-one with the functional area ID in the home space partitioning table. For example, a region-type entity node representing a bathroom has a region ID value of 3, the same as the bathroom's functional area ID in the home space partitioning table. Through this correspondence, the edge gateway can associate the results of location semantic mapping with entity nodes in the knowledge graph.

[0059] The entity node for appliance type is used to represent various appliances in a household. Its attribute field set includes an appliance number field, the value of which corresponds one-to-one with the appliance number in the appliance feature fingerprint table. For example, an appliance type entity node representing an electric water heater has an appliance number field value of 1, which is the same as the appliance number of the electric water heater in the appliance feature fingerprint table.

[0060] Entity nodes of the time period type are used to represent different time intervals within a day. Their attribute field set includes a time period interval field, the value of which is an identifier describing a time range. The division of time period intervals can be set according to human physiological rhythms and lifestyle habits. A typical division is to divide the 24 hours of a day into the following time periods: midnight (0:00-6:00), morning (6:00-9:00), forenoon (9:00-12:00), midday (12:00-14:00), afternoon (14:00-18:00), evening (18:00-21:00), and night (21:00-24:00). The division of different time periods reflects the temporal regularity of human activity patterns. The same behavior occurring at different times may have different meanings; for example, spending 30 minutes in the bathroom at 3:00 AM is more likely to indicate an abnormal condition than spending the same amount of time during the day.

[0061] Entity nodes representing behavior types represent various activities that the target object may perform. Their attribute field set includes a list of required appliance numbers, a list of excluded appliance numbers, a minimum normal stay duration, and a maximum normal stay duration. The required appliance number list field records the appliance numbers typically required to perform this behavior; for example, the required appliance number list for the "shower" behavior includes the number of the water heater. The excluded appliance number list field records the appliance numbers incompatible with this behavior; for example, the excluded appliance number list for the "sleep" behavior might include the number of the television, since the television is typically not turned on during normal sleep. The minimum and maximum normal stay duration fields define the normal stay duration range in seconds within the corresponding area when performing this behavior. For example, the minimum normal stay duration for the "toilet" behavior could be set to 60 seconds, and the maximum normal stay duration could be set to 600 seconds, indicating that the normal toilet use behavior lasts between 1 and 10 minutes.

[0062] Entity nodes representing risk types are used to represent potential health risk events. Their attribute fields include a risk event name field, a risk level field value, and a trigger anomaly type field value. The risk event name field is a textual description of the risk event, such as "fall," "cardiovascular accident," or "hypoglycemic episode." The risk level field value is an integer representing the severity of the risk event; a higher value indicates a more severe risk. This implementation uses a risk level classification of 1 to 4, with level 1 being minor risk, level 2 being moderate risk, level 3 being high risk, and level 4 being emergency risk. The trigger anomaly type field value records the type of abnormal dwell time that triggers the risk determination, taking values ​​of either too short or too long. For example, the trigger anomaly type field value for the "fall" risk node is "too long," because after a fall, the target object may be unable to get up on its own, resulting in an abnormally prolonged dwell time in a certain area.

[0063] Each record in the relation edge table describes a directed relation edge, comprising four parts: relation edge number, starting entity node number, ending entity node number, and relation type identifier. The relation edge number is the unique identifier of the edge. The starting and ending entity node numbers point to two nodes in the entity node table, indicating that the edge points from the starting node to the ending node. The relation type identifier indicates the semantic relation type represented by this edge, with values ​​including regional association behavior, time-based association behavior, and behavior indication risk.

[0064] An edge relating to a region-related behavior type connects a region-type entity node and a behavior-type entity node, indicating that the behavior typically occurs within that region. For example, edges from the "Toilet" region node to the "Use the Toilet" behavior node, and edges from the "Toilet" region node to the "Shower" behavior node, both belong to the region-related behavior type. An edge relating to a time-related behavior type connects a time-time type entity node and a behavior-type entity node, indicating that the behavior typically occurs within that time period. For example, edges from the "Early Morning" node to the "Sleep" behavior node, and edges from the "Morning" node to the "Wash Up" behavior node, both belong to the time-time related behavior type. An edge indicating a behavior-risk type connects a behavior-type entity node and a risk-type entity node, indicating that an anomaly in the behavior may indicate a risk event. For example, an edge from the "Use the Toilet" behavior node to the "Fall" risk node indicates that an anomaly in the toilet behavior, especially an excessively long stay, may indicate a fall risk.

[0065] The edge gateway constructs a set of current observation facts based on the current functional area number, the current dwell time in the area, the contents of the appliance status register, and the time interval to which the current timestamp belongs. The set of current observation facts is a structured description of the target object's state at the current moment, containing four observation fact items.

[0066] The first observation fact is the current functional region number, which is directly taken from the output of the location semantic mapping. This observation fact identifies the current spatial location of the target object and serves as a spatial constraint for subsequent reasoning.

[0067] The second observation fact is the identifier of the dwell time interval to which the current dwell time belongs. The edge gateway discretizes the continuous dwell time values ​​into several intervals to facilitate comparison with the normal dwell time range of behavioral nodes in the knowledge graph. The dwell time intervals can be divided at equal intervals, such as 5 minutes (300 seconds) per interval, or at non-equal intervals to adapt to different scenario requirements. In this embodiment, the edge gateway directly uses the current dwell time value for subsequent comparisons, rather than the pre-discrete interval identifiers.

[0068] The third observation fact is a set of appliance IDs that are in the "on" state in the appliance status register. The edge gateway traverses all key-value pairs in the appliance status register, extracts the appliance IDs that are in the "on" state, and forms a set. This set reflects which appliances are currently running in the home, providing important clues for behavior inference. For example, if the water heater is on, the target is likely taking a shower.

[0069] The fourth observation fact is the time period identifier to which the current timestamp belongs. The edge gateway extracts the hour from the current timestamp and determines the time period it belongs to according to predefined time period division rules. For example, if the current timestamp is 3:15 AM, then the value of the fourth observation fact is the early morning time period.

[0070] After constructing the current set of observed facts, the edge gateway performs knowledge graph event path reasoning. The core idea of ​​event path reasoning is: starting from the known observed facts, it searches step by step along the relation edges in the knowledge graph to find the behavior nodes that match the current observed facts, then searches for related risk nodes from the behavior nodes, and finally arrives at a risk assessment conclusion. This process simulates the reasoning method of human experts—first judging what the target object might be doing based on the scene information, and then assessing whether there is a risk based on the degree of abnormality of the behavior.

[0071] The edge gateway first retrieves entity nodes from the entity node table of the home scene event knowledge graph. These entity nodes are identified as having a region type identifier and whose region number field value in the entity attribute field set is equal to the first observed fact item. The retrieved entity nodes are then marked as region-activated nodes. The concept of an activated node originates from research on neural networks and semantic networks, representing a node that is "activated" or "selected" in the current inference context. A region-activated node represents the corresponding spatial location of the target object in the knowledge graph.

[0072] The edge gateway retrieves entity nodes from the entity node table whose entity type is identified as time period and whose time period interval field value in the entity attribute field set is equal to the fourth observation fact item. The retrieved entity nodes are then marked as time period active nodes. Time period active nodes represent the corresponding representation of the current time in the knowledge graph.

[0073] The edge gateway traverses the relation edge table, filtering out all relation edges whose starting entity node number equals the entity node number of the region's active node and whose relation type is identified as region-related behavior. The terminating entity node numbers of these relation edges are then extracted to form the first candidate behavior node set. This first candidate behavior node set contains all possible behaviors within the current region, reflecting the constraint of spatial location on behavior possibilities. For example, if the region's active node is the restroom, the first candidate behavior node set might include behavior nodes such as using the toilet, showering, and washing up.

[0074] The edge gateway traverses the relationship edge table, filtering out all relationship edges whose starting entity node number equals the entity node number of the time-period activation node and whose relationship type is time-period related behavior. The terminating entity node numbers of these relationship edges are extracted to form the second candidate behavior node set. This second candidate behavior node set contains all possible behaviors within the current time period, reflecting the constraint of time on behavior probability. For example, if the time-period activation node is in the early morning, the second candidate behavior node set might include behavior nodes such as sleeping and using the toilet, while behavior nodes such as eating and going out are unlikely to appear in this set.

[0075] The edge gateway calculates the intersection of the first and second candidate behavior node sets to obtain the joint candidate behavior node set for the region and time period. The significance of the intersection operation is to identify behaviors that simultaneously satisfy both spatial and temporal constraints; these behaviors are the most likely to occur under the current spatiotemporal conditions. For example, if the target object is in the bathroom at 3:00 AM, the joint candidate behavior node set for the region and time period may only include the behavior of using the toilet, because the probability of showering or washing up in the bathroom at that time is very low.

[0076] The edge gateway performs appliance constraint verification on each candidate behavior node in the joint candidate behavior node set for the regional time period. The purpose of appliance constraint verification is to further eliminate candidate behaviors that do not conform to the actual situation by using the current appliance operating status information. For each candidate behavior node, the edge gateway reads its entity attribute field set from the entity node table and extracts the required appliance number list field and the excluded appliance number list field from it.

[0077] The edge gateway determines whether the third observation fact item contains all the appliance numbers in the required appliance number list field. This determination verifies whether the appliances necessary to perform the action are indeed turned on. For example, the required appliance number list for the shower action includes the water heater; if the water heater is not turned on, it is unlikely that the current action is a shower.

[0078] The edge gateway also determines whether the third observation fact item overlaps with the excluded appliance number list field. This determination verifies whether appliances incompatible with the behavior are indeed turned off. For example, if the excluded appliance number list for sleep behavior includes a television, and the television is currently on, then the current behavior is unlikely to be normal sleep behavior.

[0079] A candidate behavior node passes the appliance constraint verification only if both of the above conditions are met. The edge gateway constructs a set of appliance-constrained behavior nodes from the combined regional time-segment candidate behavior node set, comprising all candidate behavior nodes that have passed the appliance constraint verification. The behaviors in the appliance-constrained behavior node set are the most likely behaviors after comprehensively considering space, time, and appliance usage status.

[0080] The edge gateway performs a dwell time anomaly assessment on each behavior node in the set of behavior nodes after appliance constraints. The purpose of the dwell time anomaly assessment is to determine whether the dwell time of the target object in the current area deviates from the normal range, thereby identifying potential anomalies.

[0081] For each behavior node, the edge gateway reads its entity attribute field set from the entity node table and extracts the minimum and maximum normal stay duration field values. Let the minimum normal stay duration field value be... The maximum normal stay duration field value is the current stay duration in the area. ,in This indicates the minimum normal duration of time the user must remain in the corresponding area when performing this action. This indicates the longest normal duration of time the action will be performed within the corresponding area. This indicates the actual duration the target object has remained in the environment; all three values ​​are in seconds.

[0082] Edge gateway will and and Comparison: If If the dwell time of the behavior node is abnormal, then mark it as too short; if If the dwell time of the behavior node is abnormal, then mark it as an excessively long abnormality; if If so, the abnormality of the dwell time of the behavior node is marked as normal.

[0083] Excessively short and excessively long abnormalities correspond to two different types of potential risks. An excessively short abnormality may indicate that the target's behavior is unexpectedly interrupted, such as suddenly feeling unwell while using the toilet and hastily leaving. An excessively long abnormality may indicate that the target encountered difficulties in performing the behavior and was unable to complete it normally, such as being unable to get up after a fall, or experiencing confusion due to a sudden illness. In practical applications, excessively long abnormalities are a more common risk indicator, especially for elderly target individuals, as risk events such as falls, cardiovascular accidents, and hypoglycemic episodes often lead to an abnormally prolonged stay in a particular area.

[0084] The edge gateway selects behavioral nodes from the set of behavioral nodes constrained by electrical appliances, marking them as either too short or too long in terms of dwell time anomaly, thus forming a set of abnormal behavioral nodes. If all behavioral nodes in the set of behavioral nodes constrained by electrical appliances have dwell time anomaly marks as normal, then the set of abnormal behavioral nodes is empty, indicating that no abnormal behavior has been detected.

[0085] The edge gateway performs a risk event path search for each anomalous behavior node in the set of anomalous behavior nodes. The purpose of the risk event path search is to identify potential risk events associated with the current anomalous behavior and determine the risk level.

[0086] For each anomalous behavior node, the edge gateway traverses the relationship edge table, filtering out all relationship edges whose starting entity node number equals the entity node number of the anomalous behavior node and whose relationship type is identified as behavior indication risk. For each filtered relationship edge, the edge gateway reads the entity node corresponding to the ending entity node number of that relationship edge from the entity node table as a candidate event node.

[0087] The edge gateway extracts the trigger anomaly type field value from the entity attribute field set of candidate event nodes and determines whether the dwell time anomaly flag of the abnormal behavior node matches the trigger anomaly type field value. This matching determination ensures that the risk assessment is triggered only when the anomaly type matches the risk triggering condition. For example, if the trigger anomaly type field value for fall risk is "excessive dwell time anomaly," the fall risk assessment will only be triggered if the dwell time anomaly flag of the behavior node is "excessive dwell time anomaly"; if the dwell time anomaly flag is "excessive dwell time anomaly," the fall risk assessment will not be triggered.

[0088] If the dwell time anomaly flag matches the trigger anomaly type field value, the edge gateway adds the candidate event node to the trigger event node set. The trigger event node set contains all risk events that the current anomalous behavior may indicate. Since an anomalous behavior may be associated with multiple risk events simultaneously, the trigger event node set may contain multiple elements.

[0089] The edge gateway extracts the risk level field value from the entity attribute field set of each risk node in the trigger event node set, and selects the risk node with the highest risk level field value as the current highest risk node. The selection of the highest risk level is based on the principle of safety first—when multiple possible risk events exist, the most severe scenario should be handled to avoid delays in rescue due to underestimating the risk. The edge gateway records the risk event name field value from the entity attribute field set of the current highest risk node as the current event type, and the corresponding risk level field value as the current event level.

[0090] If the set of anomalous behavior nodes is empty, it means that no anomalous behavior has been detected, and the edge gateway sets the current event level to 0, indicating no risk. If the set of anomalous behavior nodes is not empty but the set of triggering event nodes is empty, it means that although anomalous behavior has been detected, the anomalous behavior is not associated with any known risk events, and the edge gateway also sets the current event level to 0.

[0091] As an optional implementation, when the set of behavioral nodes after electrical appliance constraint contains multiple behavioral nodes and there are multiple abnormal behavioral nodes, the edge gateway can perform risk event path search for each abnormal behavioral node, summarize all the risk-triggered nodes, and then select the one with the highest risk level.

[0092] As an alternative implementation, the edge gateway can introduce a confidence attribute into the knowledge graph, attaching a confidence value to each relation edge to indicate the reliability of the relation. During event path reasoning, the edge gateway can accumulate the confidence values ​​of each relation edge on the path to obtain the comprehensive confidence value for the final risk assessment, and output it along with the current event level, providing richer reference information for subsequent handling decisions.

[0093] After completing the knowledge graph event path reasoning and determining the current event type and level, the edge gateway needs to take corresponding measures based on the risk level. Different levels of risk events require different levels of response. Minor risks may only require a voice inquiry to confirm the target's status, while emergency risks require immediate contact with emergency services. This tiered response mechanism ensures that the response measures match the level of risk, avoiding overreaction to minor anomalies that could cause distress to the target and their family, while also ensuring a timely response to serious risks to gain valuable rescue time.

[0094] The edge gateway's memory pre-stores a tiered response action table, which records the response action sequence corresponding to each risk level in list form. Each record contains two fields: a risk level value and a response action code sequence. The risk level value is an integer, corresponding to the risk level field value of the risk node in the knowledge graph. The response action code sequence is an ordered list, where each element is a response action code, representing a specific response action type. The correspondence between response action codes and response action types is as follows: Code 1 corresponds to a voice inquiry action, Code 2 corresponds to a family notification action, Code 3 corresponds to a cloud-based collaborative analysis action, and Code 4 corresponds to an emergency call for help action.

[0095] A typical configuration of the tiered response action table is as follows: When the risk level is 1, the response action coding sequence contains only code 1, indicating that only the voice inquiry action is performed; when the risk level is 2, the response action coding sequence contains codes 1 and 2, indicating that the voice inquiry action is performed first, and if no satisfactory response is received, the family notification action is performed; when the risk level is 3, the response action coding sequence contains codes 1, 2, and 3, indicating that the voice inquiry action, the family notification action, and the cloud collaborative assessment action are performed in sequence; when the risk level is 4, the response action coding sequence contains codes 1, 2, 3, and 4, indicating that all four response actions are performed in sequence, and there is no need to wait for the response result of the preceding action when performing the emergency call action.

[0096] The edge gateway queries the tiered action table based on the current event level obtained through event path reasoning from the knowledge graph to retrieve the corresponding action code sequence. If the current event level is 0, it indicates that no risk has been detected, and the edge gateway does not execute any action, continuing to monitor the target object's status. If the current event level is greater than 0, the edge gateway executes the corresponding actions sequentially according to the order of the action codes in the action code sequence.

[0097] When performing a voice inquiry, the edge gateway sends a voice broadcast command to the smart speaker in the home environment. The voice broadcast command contains the text of the inquiry to be broadcast, which can be dynamically generated based on the current event type and the current functional area number. For example, if the current event type is a fall and the current functional area number corresponds to the bathroom, the inquiry text could be generated as, "You've been in the bathroom for a while now. Are you alright? If you need help, please say so." After receiving the voice broadcast command, the smart speaker plays the inquiry text through its speaker. After playback, the smart speaker activates its microphone to collect the target's voice response, with the collection duration set between 10 and 15 seconds to allow sufficient response time. The smart speaker then sends the collected voice data to the edge gateway. The edge gateway performs speech recognition processing on the voice data, converting the voice signal into text to obtain the response text. Speech recognition can use a locally deployed lightweight speech recognition engine or send the voice data to a cloud-based speech recognition service for processing.

[0098] When executing a family member notification, the edge gateway pushes an alarm message to pre-defined family member terminals. These terminals are typically the smartphones of the target family member, and the push notification identifier is configured by the user during system initialization. The alarm message includes the current event type and the current functional area number. The text content can be generated as "The intelligent monitoring system has detected an anomaly: Your family member may have fallen in the bathroom. Please check the situation as soon as possible." The alarm message is pushed to the family member terminal via the internet, and the terminal displays the alarm content as a notification pop-up or SMS. The family member terminal application provides "Confirm" and "Cancel" buttons, allowing the family member to choose the appropriate action based on the information provided.

[0099] When performing cloud-based collaborative analysis, the edge gateway sends a consultation request to the remote service platform. The remote service platform is an online service system operated by an institution or third-party service provider, offering remote doctor consultations. The consultation request includes the target's identity identifier and the current event type. The target's identity identifier is used by the remote service platform to access the target's health records, allowing the on-duty doctor to understand the target's medical history, medication history, and other background information. After receiving the consultation request, the remote service platform assigns it to the on-duty doctor, who can then conduct a remote consultation with the target via voice or video call to assess their health status and provide medical advice. After the consultation, the remote service platform sends the doctor's collaborative analysis conclusion to the edge gateway.

[0100] When executing an emergency call, the edge gateway sends a rescue request to the emergency dispatch system. The emergency dispatch system can be the 120 emergency dispatch platform operated by the city's emergency medical center or a third-party emergency rescue service platform. The rescue request includes the geographical location information of the home environment, which can be in the form of latitude and longitude coordinates or a detailed address. The rescue request may also include auxiliary information such as the current event type, basic information about the target, and contact information for family members, so that emergency personnel can make appropriate preparations before arriving at the scene. For Level 4 emergency risks, the edge gateway executes other response actions in parallel while sending the rescue request, rather than waiting for the response results of previous actions, to minimize the emergency response time.

[0101] After executing a response action, the edge gateway waits to receive feedback information. The source and content of the feedback information depend on the type of response action performed. For voice inquiry actions, the feedback information is the target's voice response text. The edge gateway performs semantic analysis on the response text to determine whether the target clearly indicates they are safe, requesting help, or has not responded effectively. For family notification actions, the feedback information is an event confirmation or cancellation command returned by the family member's terminal. An event confirmation command indicates that the family believes there is indeed a risk requiring further action, while an event cancellation command indicates that the family confirms the target is safe and the incident was a false alarm. For cloud-based collaborative assessment actions, the feedback information is a collaborative assessment conclusion returned by the remote service platform. This conclusion may include the doctor's assessment of the target's current condition and subsequent treatment recommendations.

[0102] The edge gateway comprehensively analyzes various handling feedback information to determine the final event classification. The final event classification includes three values: real event, false alarm event, and user-initiated cancellation event. If the target's voice response indicates a need for help, or family members confirm a risk, or a doctor's collaborative assessment indicates the need for intervention, the event is ultimately classified as a real event. If the target's voice response clearly indicates safety and family members confirm it's a false alarm, the event is ultimately classified as a false alarm event. If family members actively send a cancellation command through their own devices and explain the reason for cancellation, the event is ultimately classified as a user-initiated cancellation event. In cases where handling feedback information is incomplete or contradictory, the edge gateway, adhering to the principle of security priority, tends to classify the event as a real event to ensure the safety of the target.

[0103] The edge gateway compiles relevant information from this event into an event feedback record. The event feedback record includes seven fields: current functional area number, current area dwell time, third observation fact, fourth observation fact, current event type, current event level, and final event characterization. The current functional area number records the spatial location of the event; the current area dwell time records the actual dwell time of the target object at that location; the third observation fact records the operating status of the electrical appliance at the time of the event; the fourth observation fact records the time period of the event; the current event type and current event level record the system's judgment result; and the final event characterization records the nature of the event after verification and handling. The event feedback record completely preserves all the key information of a risk detection and handling process, providing a data foundation for subsequent knowledge graph updates and system optimization.

[0104] The edge gateway uploads event feedback records to the cloud server. The cloud server is a computing server deployed in an internet data center, with powerful computing and storage capabilities. It is responsible for aggregating event feedback records from multiple home edge gateways and optimizing and updating the home scene event knowledge graph based on this data.

[0105] The cloud server adjusts the lower and upper limits of the normal dwell time field for the corresponding behavioral nodes in the home scene event knowledge graph based on the received event feedback records. The basic logic of the adjustment is as follows: if the event is ultimately identified as a false alarm, it indicates that the system's judgment standard for dwell time may be too strict, and the cloud server appropriately expands the range of normal dwell time; if the event is ultimately identified as a real event, it indicates that the system's judgment standard is reasonable or may not be sensitive enough, and the cloud server maintains or appropriately tightens the range of normal dwell time.

[0106] Let's illustrate this with a specific adjustment process. Suppose an event feedback record shows: the current functional area number corresponds to the restroom, the current stay duration is 720 seconds (12 minutes), the current event type is "fall," and the event is ultimately classified as a false alarm. This means the system determined there was a fall risk when the target stayed in the restroom for 12 minutes and triggered an alarm, but verification revealed it to be a false alarm. The cloud server searches the knowledge graph for toilet-related behavior nodes associated with restrooms and the early morning time period, reading the current normal stay duration upper limit field value as 600 seconds (10 minutes). Since the actual stay of 720 seconds was confirmed as normal and not a fall, the cloud server adjusts the normal stay duration upper limit field value from 600 seconds to 780 seconds (13 minutes), adding a certain margin to the actual observed value. After the adjustment, a stay of the same duration will no longer trigger a fall risk alarm, thus reducing false alarms.

[0107] After adjusting the knowledge graph, the cloud server distributes the revised entity node table and relation edge table to the edge gateway to replace the locally stored family scene event knowledge graph. The distribution process can use incremental updates, transmitting only the changed node and edge records to reduce the amount of data transmitted over the network. Upon receiving the updated data, the edge gateway updates the family scene event knowledge graph in its local storage, enabling subsequent reasoning processes to use the optimized knowledge for decision-making.

[0108] This architecture, where cloud servers aggregate data and update the knowledge graph, and edge gateways use the updated knowledge graph for reasoning, forms a continuously improving closed-loop system. As the system runs longer and event feedback records accumulate, the normal dwell time range of each behavioral node in the knowledge graph gradually approaches the real-life patterns of the target object, thus improving the system's risk assessment accuracy.

[0109] As an optional implementation, the cloud server can use machine learning algorithms to analyze event feedback records, automatically discover missing behavioral patterns or risk associations in the knowledge graph, and add new entity nodes and relationship edges to the knowledge graph. For example, if multiple event feedback records show that the target object frequently visits the restroom during specific time periods and stays for short periods, the cloud server can infer that the target object may have frequent nocturia and add corresponding behavioral nodes and relationships to the knowledge graph.

[0110] As an alternative implementation, the cloud server can maintain independent versions of the knowledge graph for different families to adapt to the individual differences of different target groups. Each family's event feedback records are only used to update the knowledge graph version corresponding to that family, allowing the knowledge graph to gradually adapt to the lifestyle and health status of specific target groups. Simultaneously, the cloud server can aggregate and analyze the event feedback records of multiple families, extracting universal patterns to initialize the knowledge graph of newly connected families, thus enabling cross-family knowledge transfer.

[0111] As another optional implementation, the action coding sequence in the hierarchical action table can support conditional branching logic. For example, after performing a voice inquiry action, if the target clearly responds "I'm fine," the execution of subsequent actions is terminated; if the target does not respond or the response is unrecognizable, the next action is executed. This conditional branching logic allows the handling process to be flexibly adjusted according to the actual response, avoiding unnecessary actions. The present invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A method for multi-source perceptual data fusion and event reasoning based on edge computing and knowledge graphs, characterized in that: Includes the following steps: Step 1, Synchronous Acquisition of Multi-Source Sensing Data: The real-time location coordinate sequence of the ultra-wideband positioning tag worn by the target object is obtained through the ultra-wideband positioning anchor network deployed in the home scenario. The instantaneous current value sequence and instantaneous voltage value sequence of the total household load are obtained through the power acquisition terminal installed at the distribution box. The edge gateway adds a unified timestamp to the received real-time location coordinate sequence, instantaneous current value sequence and instantaneous voltage value sequence. Step 2, Location semantic mapping and appliance operating status identification: The edge gateway determines the current functional area number and current area stay duration of the target object based on the real-time location coordinate sequence and the pre-stored home space partition table. The edge gateway performs non-intrusive load decomposition processing on the instantaneous current value sequence and instantaneous voltage value sequence to identify the current operating status of each appliance and store it in the appliance status register. Step 3, Event path reasoning based on knowledge graph: The edge gateway constructs a set of current observation facts based on the current functional area number, the current stay duration in the current area, the contents of the appliance status register, and the time interval to which the current timestamp belongs. The edge gateway performs event path reasoning in the pre-stored home scene event knowledge graph based on the set of current observation facts to determine the current event type and the current event level. Step 4, tiered handling execution and incremental knowledge graph update: The edge gateway queries the tiered handling action table based on the current event level and executes the corresponding handling action sequence. The edge gateway determines the final event nature based on the handling feedback information and generates an event feedback record. The cloud server performs incremental updates to the home scene event knowledge graph based on the event feedback record and distributes it to the edge gateway.

2. The method according to claim 1, characterized in that, In step 1, the specific process of the ultra-wideband positioning anchor network acquiring the real-time location coordinate sequence is as follows: the ultra-wideband positioning tag periodically sends ranging pulse signals to each ultra-wideband positioning anchor. After receiving the ranging pulse signal, each ultra-wideband positioning anchor records the reception time and reports it to the edge gateway. The edge gateway calculates the three-dimensional spatial coordinates of the ultra-wideband positioning tag using the time difference of arrival positioning algorithm based on the difference in reception time of each ultra-wideband positioning anchor and the known installation coordinates of each ultra-wideband positioning anchor. The edge gateway continuously executes the calculation process at a fixed period to form the real-time location coordinate sequence.

3. The method according to claim 2, characterized in that, In step 1, the power acquisition terminal has built-in current transformers and voltage transformers. The power acquisition terminal synchronously acquires the instantaneous current value and instantaneous voltage value of the main incoming line at a preset sampling rate. The power acquisition terminal transmits the instantaneous current value sequence and instantaneous voltage value sequence to the edge gateway in real time through a wireless communication link.

4. The method according to claim 1, characterized in that, In step 2, the specific process by which the edge gateway determines the current functional area number is as follows: Each record in the home space partitioning table contains a functional area number, a functional area name, and a spatial boundary description stored in the form of a list of polygon vertex coordinates. The edge gateway extracts the target object plane coordinates of the current frame from the real-time location coordinate sequence, traverses each record in the home space partitioning table in turn, performs a ray-based point determination on each record, draws a ray from the target object plane coordinates in a fixed direction and calculates the number of intersections between the ray and each side of the polygon. If the number of intersections is odd, it is determined that the target object plane coordinates are located inside the currently traversed functional area, and the corresponding functional area number is recorded as the current functional area number.

5. The method according to claim 1, characterized in that, In step 2, the edge gateway maintains an area dwell timer. When the current functional area number is the same in two consecutive frames, the timer value is incremented by the time interval between the two frames. When the current functional area number is different in two consecutive frames, the timer value is reset to zero. The current timer value is the current area dwell time.

6. The method according to claim 1, characterized in that, In step 2, the specific process of non-intrusive load decomposition is as follows: The edge gateway segments the instantaneous current value sequence and instantaneous voltage value sequence according to the power grid frequency cycle. It multiplies the instantaneous current value sequence and instantaneous voltage value sequence point by point within each power frequency cycle to obtain the instantaneous power value sequence and calculates the arithmetic mean to obtain the average active power value. The edge gateway performs a first-order difference operation on the average active power value time sequence to obtain the power change value sequence. When the absolute value of the power change value exceeds the preset power jump threshold, it determines that an appliance state switching event has occurred. The edge gateway extracts the instantaneous current value sequence before and after the occurrence of the appliance state switching event as a transient current waveform and performs a discrete Fourier transform to obtain the amplitude of each harmonic component. It compares the power change value and the amplitude of each harmonic component with the pre-stored appliance feature fingerprint table to identify the appliance number. It determines the on or off state of the appliance based on the positive or negative sign of the power change value and updates the appliance state register.

7. The method according to claim 1, characterized in that, In step 3, the knowledge graph of family scene events is stored using a directed graph data structure, which includes an entity node table and a relationship edge table. Each record in the entity node table includes an entity node number, an entity type identifier, and a set of entity attribute fields. The entity type identifier can take the values ​​of region type, appliance type, time period type, behavior type, and risk type. Each record in the relationship edge table includes a relationship edge number, a starting entity node number, an ending entity node number, and a relationship type identifier.

8. The method according to claim 7, characterized in that, In step 3, the current set of observed facts contains 4 observation fact items. The first observation fact item is the current functional area number, the second observation fact item is the dwell time interval identifier to which the current area dwell time belongs, the third observation fact item is the set of all appliance numbers in the appliance status register that are in the on state, and the fourth observation fact item is the time period interval identifier to which the current timestamp belongs.

9. The method according to claim 8, characterized in that, In step 3, the specific process of event path reasoning is as follows: the edge gateway retrieves the corresponding regional activation node in the entity node table based on the first observation fact item, and retrieves the corresponding time period activation node based on the fourth observation fact item; The edge gateway traverses the relational edge table to obtain the first set of candidate behavior nodes associated with the region activation node and the second set of candidate behavior nodes associated with the time period activation node, and calculates the intersection of the two to obtain the joint candidate behavior node set for the region and time period. The edge gateway performs electrical appliance constraint verification on each candidate behavior node in the joint candidate behavior node set for the regional time period, and determines whether the third observation fact item satisfies the constraint conditions of the required electrical appliance number list field and the excluded electrical appliance number list field of the current candidate behavior node. The candidate behavior nodes that pass the verification constitute the set of behavior nodes after electrical appliance constraint. The edge gateway performs a dwell time anomaly assessment on each behavior node in the set of behavior nodes after electrical appliance constraints. It compares the current dwell time in the area with the lower limit field value and the upper limit field value of the normal dwell time of the current behavior node to determine whether the dwell time anomaly is marked as too short, too long, or normal. Behavior nodes marked as too short or too long are selected to form an abnormal behavior node set. The edge gateway iterates through the relational edge table for each abnormal behavior node in the abnormal behavior node set to search for associated candidate event nodes. It determines whether the stay duration anomaly label matches the trigger anomaly type field value of the candidate event node. If a match is found, the candidate event node is added to the trigger event node set. The risk node with the highest risk level field value is selected from the trigger event node set to determine the current event type and the current event level.

10. The method according to claim 1, characterized in that, In step 4, each record in the tiered response action table includes a risk level value and a response action code sequence. The response action codes in the response action code sequence correspond to voice inquiry action, family member notification action, cloud-based collaborative analysis action, and emergency call action in sequence. The response feedback information includes the target's voice response text, the event confirmation instruction or event cancellation instruction returned by the family member's terminal, and the collaborative analysis conclusion returned by the remote service platform. The final event classification value includes real event, false alarm event, and user-initiated cancellation event. The event feedback log includes the current functional area number, the current area stay duration, the third observation fact item, the fourth observation fact item, the current event type, the current event level, and the final event classification.