A household intelligent device data analysis method based on internet of things hardware
By building a time-series-spatial-aware hybrid index and a global metadata graph on home IoT edge devices, the problems of lengthy retrieval paths and storage wear are solved, enabling low-latency joint analysis and privacy protection across brand devices.
Patent Information
- Application Number
- CN202611304424.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies for home IoT edge hardware suffer from issues such as lengthy retrieval paths, bottlenecks in memory and computing resources, easy wear and tear on storage media, and privacy data exposure due to reliance on the cloud for joint analysis of cross-brand devices.
A time- and space-aware hybrid indexing structure is adopted to build a local graph index on edge devices. Combined with semantic incremental compression and sparse indexing, a global metadata graph is maintained through a central control node to achieve joint analysis of cross-brand devices and complete data processing and result fusion locally.
It reduces the memory footprint and computational complexity of high-dimensional searches, extends the lifespan of storage media, enables joint analysis across devices from different brands without uploading raw data, and protects user privacy.
Smart Images

Figure CN123157756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology for Internet of Things (IoT) smart devices, specifically a data analysis method for home smart devices based on IoT hardware. Background Technology
[0002] With the continuous growth in the number of smart home devices, home IoT edge hardware needs to process high-frequency time-series data generated by sensors and high-dimensional feature vector data generated by devices such as cameras at the same time. Existing time-series databases mostly use log structures and merging trees to improve write throughput, but they are mainly geared towards single-modality structured data. Vector retrieval usually uses hierarchical navigable small-world graphs and other approximate nearest neighbor algorithms to build indexes. Such indexes usually assume sufficient memory resources, and the cost of dynamically adding or deleting them after construction is high.
[0003] The closest existing technical solution to this invention is as follows: The smart home gateway stores time-series data and high-dimensional feature data in a local time-series database module and a vector retrieval module, respectively. The two indexing systems are independent of each other and do not perceive each other. The time-series database uses a traditional tree structure for indexing. When writing, it inserts data in the order of arrival or updates it in place. The vector retrieval module builds a static graph index for the data already in the database. When adding data, it needs to trigger a full or incremental reconstruction. When a user initiates a cross-modal or cross-device joint query, the gateway needs to first search in the two independent indexes, and then the upper-layer application pulls the original data of each device to the local database for secondary correlation and comparison before the result can be obtained. For joint analysis of cross-brand devices, it is also necessary to use the cloud data aggregation center to perform unified correlation queries.
[0004] In the above solutions, the independent indexing system leads to a lengthy retrieval path, and the memory and computing resources on the device side are prone to bottlenecks. The in-situ updates generated by the traditional indexing structure in high-frequency write scenarios will exacerbate the write amplification effect of the Flash storage medium and shorten the storage life. The joint analysis of cross-brand devices depends on aggregating the raw data to the cloud or local unified storage, which has technical defects such as exposure of user privacy data and inability to work normally in the absence of network. To address these issues, we propose a data analysis method for home smart devices based on IoT hardware. Summary of the Invention
[0005] The purpose of this invention is to provide a data analysis method for home smart devices based on Internet of Things (IoT) hardware.
[0006] The technical problem this invention aims to solve is: how to simultaneously support low-loss writing of high-frequency time-series data and low-latency retrieval of high-dimensional feature vectors on home IoT edge hardware with limited computing power and memory, and where the underlying storage media is prone to wear and tear, and how to achieve joint analysis of data between heterogeneous smart home devices from different brands without uploading raw user data to the cloud or relying on cross-brand device data aggregation.
[0007] To address the aforementioned technical problems, this invention provides a data analysis method for home smart devices based on Internet of Things (IoT) hardware. The method is applied to a home local area network (LAN) system composed of several edge devices and a central control node. The method includes: edge devices collecting local sensor data; establishing a prediction model based on the periodic patterns of historical device behavior; determining whether to write incremental data to a memory buffer based on the deviation between the actual collected value and the predicted value; when the data volume in the buffer reaches a threshold aligned with the erase block size of the Flash storage medium, sequentially writing the data to the Flash storage medium in an append-only manner and updating the sparse index; dividing the sensor data into windows according to a preset time window length; and performing local area network analysis within the corresponding time window. Candidate nodes are selected in the graph structure to establish graph edge connections, forming a time-series-spatial-aware hybrid index. Lifecycles are assigned to index nodes based on the historical activity cycle of the devices, and nodes that exceed their lifecycles are removed. The central control node maintains a global metadata graph that does not contain the original collected data. User analysis requests are transformed into structured semantic query graphs and matched with subgraphs of the global metadata graph to determine the relevant device set. The query is decomposed into local subqueries and distributed to the corresponding edge devices. Each edge device completes the retrieval based on the local hybrid index and only returns feature-level results. The central control node performs weighted fusion of each returned result based on temporal proximity, semantic relevance, and feature similarity to obtain the joint analysis results.
[0008] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0009] 1. This invention reduces the memory usage and computational complexity of high-dimensional retrieval by using a time window as a dynamic pruning condition for high-dimensional vector graph indexing, thus limiting the retrieval scope to local subgraphs that are strongly correlated with the query time.
[0010] 2. This invention avoids page splits and additional erase overhead caused by in-situ updates of traditional index structures by using semantic incremental compression based on the device behavior cycle and append writing of log structures aligned with Flash erase blocks, thereby reducing write amplification effect and extending the lifespan of storage media.
[0011] 3. This invention maintains a lightweight global metadata graph at the central control node, transforms complex queries into semantically constrained subqueries, and distributes them to each edge device for local execution. It only returns feature-level results and not the original data, thus achieving joint analysis between devices across brands without data aggregation, balancing analytical capabilities with user privacy protection requirements. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the edge device data acquisition, storage, and index construction process in an embodiment of the present invention;
[0013] Figure 2 This is a schematic diagram of the central control node query distribution, edge retrieval, and result fusion process in an embodiment of the present invention;
[0014] Figure 3 This is a schematic diagram of the complete business closed-loop process of the overall system in an embodiment of the present invention. Detailed Implementation
[0015] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0016] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0017] The method proposed in this invention operates within a home local area network and is composed of several edge devices and a central control node. The edge devices can be IoT hardware such as cameras, thermostats, and door and window sensors. Each edge device includes a data acquisition module, a semantic incremental compression module, a Flash log append storage module, and a local STH-Index module. The central control node can be a home smart central control gateway, including a query parsing module, a global metadata graph module, a subquery distribution module, and a result fusion module. The edge devices and the central control node communicate through a local area network interconnection protocol and are responsible for the collection, compression, and index maintenance of local data. The central control node is responsible for maintaining the global metadata graph and undertakes the tasks of query parsing, subquery distribution, and result fusion.
[0018] I. Time- and Space-Aware Lightweight Coupled Index Structure:
[0019] To address the challenge of simultaneously supporting time-series retrieval and high-dimensional vector retrieval on the edge device, a local time-series-space-aware hybrid index module (hereinafter referred to as the local hybrid index module) is constructed in the memory of the edge device. Its core idea is to use the time window as a dynamic pruning condition for the high-dimensional vector graph index.
[0020] During the index building phase, the time window length is first determined based on historical data statistics. The device startup time or the arrival time of the first data item is used as the reference start time. For newly arrived data points This data point contains high-dimensional feature vectors. timestamp and the identification of the equipment The time window number to which the data point belongs is calculated using the following formula:
[0021] ;
[0022] in, The calculated time window number, For data points The collection timestamp, For reference start time, The preset time window length;
[0023] Then, at the window In the corresponding local graph structure, with windows The candidate set is the existing nodes within its adjacent window. The candidate nodes are then compared with... The distance between nodes is used to establish graph edge connections between several candidate nodes with smaller distances. The distance calculation method is as follows:
[0024] ;
[0025] in, query vector With candidate node vectors The Euclidean distance between them For the feature vector dimension, , They are vectors and The Dimensional components;
[0026] For newly inserted nodes Assign lifecycle The calculation method is as follows:
[0027] ;
[0028] in, For nodes The lifecycle value, For equipment Historical average active cycle duration For equipment The historical standard deviation of the active cycle duration is used to correct for lifecycle estimates of irregularly active devices. , These are preset weighting coefficients used to balance the impact of the base cycle and volatility margin;
[0029] The system checks the expiration of index nodes every time a query is triggered or during regular background checks.
[0030] ;
[0031] in, The current system time, when At that time, node If a node is deemed expired, it is removed from the graph structure, and local connections are re-established with its original neighboring nodes to maintain the connectivity of the graph structure.
[0032] During the retrieval phase, given the query vector and query time range The local STH-Index module first determines the set of candidate time windows that overlap with the query time range according to the aforementioned window division method. Then, it only approaches the candidate time windows layer by layer from the entry node of each window using a greedy graph search method within the local graph structure corresponding to the candidate time windows. Finally, it returns the first few nodes with smaller distances as the retrieval results. In this way, the present invention reduces the high-dimensional retrieval that originally needed to be performed in the full data space to a small-scale graph search that is only performed in the local time window that is strongly related to the query time, thereby completing the joint retrieval of time series and vector under the condition of limited memory.
[0033] II. Semantic Compression and Log Structure Appending for Flash Wear Leveling:
[0034] To reduce the write amplification effect on the Flash storage medium caused by high-frequency timing writes, the semantic incremental compression module establishes a prediction model for each sensor data stream based on its historical periodicity pattern, and uses exponential smoothing to predict the value at the next moment:
[0035] ;
[0036] in, for The actual value collected at any given time. For the model in The predicted value given at any given time This is the model's prediction for the next time step. This is a preset smoothing coefficient, with a value ranging from 0 to 1;
[0037] exist Once the time data actually arrives, calculate the deviation between the actual value and the predicted value:
[0038] ;
[0039] Compare the absolute value of the deviation with the preset threshold Compare the data entries to determine whether they need to be persisted.
[0040] ;
[0041] when At that time, the timestamp and deviation amount of that moment. As an incremental record, it is written to the memory buffer when At this time, only the current state's continuous count is accumulated, without generating new persistent records, thereby eliminating redundant writes when the device is in a stable cycle state;
[0042] The memory buffer continuously aggregates incremental records from various sources. When the accumulated data in the buffer reaches the size of the target Flash media erase block... When the alignment threshold is reached, a disk write operation is triggered. The Flash log append storage module sequentially writes the aggregated data pages to the end of the Flash storage medium log area in a pure append mode, without making any in-place modifications to the written area. At the same time, the sparse index in memory is updated to record the mapping relationship between the time range corresponding to the data page and the device identifier to the physical offset address, for use in subsequent range queries.
[0043] During device idle periods, the system periodically triggers garbage collection in the background: selects data pages with a failure rate exceeding the preset merging threshold for merging, re-aggregates the still valid data and writes it to a new page, and performs wear leveling scheduling based on the historical erase count of each physical block, prioritizing the reuse of physical blocks with lower erase counts, thereby extending the overall storage media lifespan while reclaiming storage space;
[0044] The write amplification factor under the above mechanism can be expressed as:
[0045] ;
[0046] in, This refers to the actual amount of data physically written to the Flash storage medium. To reduce the actual amount of logical data generated at the application layer, this invention uses semantic incremental compression. The size of the data itself, and by appending writes to avoid the additional erase overhead caused by in-place updates, thus... Compared to traditional tree-based index structures, it significantly reduces costs;
[0047] III. Semantic Graph Analysis of Edge Federated Systems Without Data Aggregation:
[0048] To enable joint analysis of heterogeneous devices across brands without uploading raw data, the global metadata graph module maintains the global metadata graph locally on the central control node. The nodes in the graph are semantic tags for each access edge device, including metadata such as device type, room, and available data modalities. The edges are semantic associations between devices based on historical co-occurrence statistics or user-preset rules. This graph does not store any device's raw data.
[0049] When a user initiates a natural language analysis request, the query parsing module transforms it into a structured semantic query graph, which contains target entities, time constraints, and relational constraints. The central control node performs subgraph matching of this structured semantic query graph with the global metadata graph, and filters out the set of devices related to this query based on the semantic labels of nodes and edge relationships.
[0050] The subquery distribution module decomposes the structured semantic query graph into several local subqueries according to the data modalities that each device in the relevant device set can provide. Each local subquery is expressed in a form that the local STH-Index module can directly accept, that is, it includes feature vector constraints and time range constraints. The central control node distributes each local subquery to the corresponding edge device through the local area network interconnection protocol. Each edge device completes local calculations locally according to the aforementioned hybrid index retrieval method to obtain local feature-level results, including anomaly scores, feature vector summaries, event tags, and other information. Only the local feature-level results are sent back to the central control node. The sent-back content does not contain privacy data such as original images and voice.
[0051] The results fusion module calculates and sorts the fusion score for each returned result according to the following formula:
[0052] ;
[0053] in, Candidate results The fusion score, For the result The time proximity between the corresponding event and the query time constraint. For the result The semantic correlation between the corresponding device and the query target in the global metadata graph. For the result The feature similarity is calculated locally by the edge device. , , The preset weighting coefficients are given, and they satisfy the following conditions: Central control node based on The candidate results are ranked, and the results with the highest scores are taken as the joint analysis output.
[0054] IV. Overall Method Flow Closed Loop:
[0055] This invention connects the above three technical solutions into a closed-loop whole: edge devices continuously collect data, perform semantic incremental compression judgment, local append writing and sparse index updates, and simultaneously maintain the local STH-Index. For local single-device queries, the results can be directly hit in the local STH-Index and returned. For cross-device joint queries, the central control node performs global metadata graph matching and query rewriting, distributes the results to relevant edge devices for local retrieval, and then the central control node merges and outputs the results. The two main lines of data writing index construction and query retrieval response are both built on the same local storage and index foundation, forming a complete closed-loop technical solution.
[0056] V. Alternative Implementation Methods:
[0057] In an alternative implementation, the graph structure of the local STH-Index module may not adopt the modified hierarchical navigable small-world graph, but instead adopt a spatial partitioning tree structure. The time window dimension is also introduced as an additional partitioning criterion to construct a joint structure combining the time window and the spatial partitioning tree. This is suitable for application scenarios with low vector dimensions or data distributions that are more suitable for tree partitioning. It can also achieve the technical effect of limiting the search range to a local time window to reduce the computation and memory overhead on the edge.
[0058] In another alternative implementation, the edge federation semantic graph query process can be decentralized instead of having the central control node uniformly maintain the global metadata graph and perform subgraph matching. That is, each edge device broadcasts its own semantic tag summary through the local area network. The device initiating the query temporarily builds a local query alliance and directly negotiates with the target device to distribute subqueries, collect feature results, and then merges them on its own. Thus, even in a networking scenario without a single central control node, the effect of cross-device joint analysis without aggregating the original data can still be achieved.
[0059] Those skilled in the art can fully implement this invention on ARM Cortex-A series or equivalent computing power IoT hardware based on the above-described embodiments and formulas, and can adaptively adjust the preset parameters according to actual application scenarios.
[0060] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.
Claims
1. A data analysis method for home smart devices based on Internet of Things (IoT) hardware, characterized in that, The method is applied to a home LAN system consisting of several edge devices and a central control node, including: Edge devices collect local sensor data, which includes high-dimensional feature vectors, timestamps, and the identifier of the device to which they belong; A prediction model is established based on the periodic patterns of the device's historical behavior to obtain the predicted value of the sensor data. The deviation between the actual collected value and the predicted value is calculated. When the absolute value of the deviation reaches a preset threshold, the corresponding timestamp and the deviation amount are written as incremental data into the memory buffer. When the absolute value of the deviation does not reach the preset threshold, no new incremental data is generated. When the amount of incremental data aggregated in the memory buffer reaches a threshold that is aligned with the erase block size of the Flash storage medium, the aggregated data is sequentially written to the end of the log area of the Flash storage medium in an append manner, and the sparse index of the mapping relationship between the record data page and the device identifier to the physical offset address is updated in memory. The sensor data is divided into windows according to timestamps based on a preset time window length to obtain the time window number to which each data point belongs. In the local graph structure corresponding to the time window number, the existing nodes in the current time window and adjacent time windows are used as candidate sets. The distance between the candidate nodes and the high-dimensional feature vectors of the data points to be inserted is calculated. The nodes are sorted in ascending order of distance, and a preset number of candidate nodes are selected to establish graph edge connections, thus forming a time-space-aware hybrid index. Based on the historical average active cycle duration and the historical standard deviation of the active cycle duration, a lifecycle is assigned to each node in the time-space awareness hybrid index. When the difference between the current time of a node and its corresponding timestamp exceeds the lifecycle, the node is determined to be an expired node and removed from the time-space awareness hybrid index. The central control node maintains a global metadata graph. The nodes in the global metadata graph are semantic labels of each edge device, and the edges are semantic associations between devices. The global metadata graph does not contain any original data collected by any device. The central control node receives the user's analysis request, transforms the analysis request into a structured semantic query graph containing target entities, time constraints, and relational constraints, and performs subgraph matching between the structured semantic query graph and the global metadata graph to determine the set of devices related to this analysis request. The structured semantic query graph is decomposed into several local sub-queries according to the data modalities that each device in the device set can provide, and each local sub-query is distributed to the corresponding edge device; Each edge device performs a search in the locally maintained time-space awareness hybrid index based on a local subquery to obtain local feature-level results, and then sends the local feature-level results back to the central control node. The returned content does not include the original collected data. The central control node performs weighted fusion of the local feature-level results returned by each edge device based on temporal proximity, semantic relevance, and feature similarity to obtain the joint analysis results of this analysis request.
2. The data analysis method for home smart devices based on Internet of Things hardware according to claim 1, characterized in that: The step of dividing the sensor data into windows according to the preset time window length includes: using the device startup time or the arrival time of the first data as a reference start time, calculating the difference between the timestamp of the data point and the reference start time, dividing the difference by the preset time window length and rounding down to obtain the time window number to which the data point belongs.
3. The data analysis method for home smart devices based on Internet of Things hardware according to claim 1, characterized in that: Assigning a lifecycle to each node in the time-space-aware hybrid index includes: obtaining the historical average active cycle duration and the historical standard deviation of the active cycle duration of the device to which it belongs; multiplying the historical average active cycle duration by a preset first weighting coefficient; multiplying the historical standard deviation by a preset second weighting coefficient; and adding the two values obtained after multiplication to obtain the lifecycle of the node.
4. The method for data analysis of home smart devices based on Internet of Things hardware according to claim 1, characterized in that, Also includes: When the edge device is idle, garbage collection is periodically triggered. Data pages with a failure rate exceeding the preset merging threshold are selected for merging. The still valid data is re-aggregated and written to new data pages. Wear leveling is performed based on the historical erase count of each physical block, prioritizing the reuse of physical blocks with lower erase counts.
5. The method for data analysis of home smart devices based on Internet of Things hardware according to claim 1, characterized in that, The retrieval includes: determining a set of candidate time windows that overlap with the query time range based on the query time range; and performing a retrieval only within the local graph structure corresponding to the candidate time window set, starting from the earliest node established in the insertion order within each candidate time window using a greedy graph search method to obtain the retrieval results.
6. The data analysis method for home smart devices based on Internet of Things hardware according to claim 1, characterized in that: In the weighted fusion, the sum of the weighting coefficients corresponding to temporal proximity, semantic relevance, and feature similarity is 1.
7. A data analysis system for home smart devices based on Internet of Things (IoT) hardware, characterized in that, Includes several edge devices and central control nodes; The edge device includes a data acquisition module, a semantic incremental compression module, a Flash log append storage module, and a local time-series-spatial awareness hybrid index module. The data acquisition module is used to acquire local sensor data. The semantic incremental compression module is used to establish a prediction model based on the periodic patterns of the device's historical behavior and determine whether to record incremental data based on the deviation between the actual acquired value and the predicted value. The Flash log append storage module is used to write the aggregated incremental data to the Flash storage medium in an append manner. The local time-series-spatial awareness hybrid index module is used to construct and maintain a time-series-spatial awareness hybrid index according to a preset time window length. The central control node includes a query parsing module, a global metadata graph module, a subquery distribution module, and a result fusion module. The global metadata graph module is used to maintain a global metadata graph that does not contain the original collected data. The query parsing module is used to convert the user's analysis request into a structured semantic query graph and perform subgraph matching with the global metadata graph. The subquery distribution module is used to decompose the structured semantic query graph into local subqueries and distribute them to the corresponding edge devices. The result fusion module is used to perform weighted fusion of the local feature-level results returned by each edge device to obtain a joint analysis result.
8. A data analysis system for home smart devices based on Internet of Things hardware according to claim 7, characterized in that: The local time-space sensing hybrid index module divides the sensing data into different time windows according to the timestamp, selects candidate nodes from existing nodes in the same time window and adjacent time windows to establish graph edge connections, and assigns lifecycles to each node according to the historical average active cycle duration of the device.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
