Indoor activity type identification method and apparatus, terminal, and storage medium
By generating a semantic rule set using the LZ78 algorithm, the problem of low accuracy in identifying indoor activity types of the elderly by traditional machine learning algorithms is solved, improving the accuracy and computational efficiency, and achieving efficient identification of activity categories of the elderly.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DUXIAOMAN TECH (BEIJING) CO LTD
- Filing Date
- 2022-09-28
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional machine learning algorithms rely on domain expertise when identifying the types of indoor activities of the elderly. The selection of too many features leads to high computational costs and reduces the predictive power of the classification model, resulting in low recognition accuracy.
The LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set to identify indoor activity types. The LZ78 data compression algorithm is combined to solve the construction of Markov Logic Network (MLN) structure and improve computational efficiency.
It improves the accuracy and computational efficiency of identifying activity categories for the elderly, and combines the advantages of data learning and knowledge learning to achieve more efficient activity type identification.
Smart Images

Figure CN115563488B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic identification technology, and more specifically, to a method, device, terminal, and storage medium for identifying indoor activity types. Background Technology
[0002] Population aging is one of the most significant social issues today. The seventh national census showed that my country's population aged 60 and above has reached 264 million, with approximately 90% of them living at home. To create a better home-based environment for the elderly, smart home-based health and elderly care solutions have been proposed. With the development of emerging technologies such as big data, the Internet of Things, and artificial intelligence, smart home-based health and elderly care systems are becoming increasingly sophisticated, providing safe and healthy living guarantees for the elderly. The construction of such systems requires acquiring and identifying the activity information of the elderly to provide accurate and timely assistance services. Therefore, identifying the activity types of the elderly has become a hot research topic.
[0003] Currently, some researchers are applying many traditional machine learning algorithms to activity recognition, such as SVM, KNN, and random forest. These algorithms learn from activity data of older adults to establish a mapping from data to a target attribute (category label) and minimize its loss function. This mapping essentially classifies the activity data of older adults and assigns a label to each category. The classification criteria largely depend on the features of the input data, typically using manually selected statistical features. For example, if an individual's occupation is chef or they enjoy cooking, their activity classification might provide useful information for cooking-related activities. Therefore, adding features to the data in traditional machine learning algorithms can improve the accuracy of activity classification.
[0004] However, most of the effective features extracted using traditional machine learning algorithms rely on domain expertise. Selecting too many features will waste computational costs and reduce the predictive power of the classification model, thereby reducing the accuracy of activity type identification. Summary of the Invention
[0005] The main objective of this application is to provide a method, device, terminal, and storage medium for identifying indoor activity types, in order to solve the problem of low accuracy in activity type identification in related technologies.
[0006] To achieve the above objectives, firstly, this application provides a method for identifying indoor activity types, including:
[0007] Acquire all sensor data corresponding to all sensors installed indoors;
[0008] Process all sensor data to determine the sensor semantic set corresponding to all sensor data;
[0009] The LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, which is then used to identify indoor activity types.
[0010] In one possible implementation, all sensor data is processed to determine the sensor semantic set corresponding to all sensor data, including:
[0011] All sensor data are segmented based on functional regions to determine an initial set of sensor sequences. The functional regions are used to characterize indoor areas with different functions.
[0012] Redundant data in the initial sensor sequence set is removed using the least squares method to obtain the target sensor sequence set;
[0013] Semantizing the sensor data in the target sensor sequence set yields a sensor semantic set.
[0014] In one possible implementation, the functional area includes multiple target functional areas;
[0015] All sensor data are segmented based on functional regions to determine the initial sensor sequence set, including:
[0016] Select sensor data belonging to each target functional area from all sensor data to form a sensor sequence corresponding to each target functional area;
[0017] The sensor sequences corresponding to each target functional area are summarized to obtain an initial sensor sequence set.
[0018] In one possible implementation, redundant data in the initial sensor sequence set is removed using the least squares method to obtain the target sensor sequence set, which includes:
[0019] Obtain the number of data points corresponding to the longest sensor sequence in the initial sensor sequence set;
[0020] The initial sensor sequence set is padded with data based on the number of data points, except for the longest sensor sequence. The least squares method is then used to calculate the values of all padded sensor sequences and the longest sensor sequence to obtain the target sensor sequence set.
[0021] In one possible implementation, the sensor data in the target sensor sequence set is semantically represented to obtain a sensor semantic set, including:
[0022] Semantic transformation is performed on the target sensor sequences in the target sensor sequence set to obtain the sensor semantic sequences corresponding to the target sensor sequences.
[0023] The sensor semantic sequences corresponding to the target sensor sequence are summarized to obtain the sensor semantic set.
[0024] In one possible implementation, the LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, including:
[0025] The LZ78 algorithm is used to modify, segment, and transform the sensor semantic sequences in the sensor semantic set to generate a semantic rule set.
[0026] In one possible implementation, the LZ78 algorithm is used to modify, segment, and transform the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, including:
[0027] The LZ78 algorithm is used to correct and segment the sensor semantic sequences in the sensor semantic set, and the segmented sensor semantic sequences are transformed into a tree-shaped knowledge structure.
[0028] Semantic rule sets are generated based on tree-shaped knowledge structures.
[0029] Secondly, embodiments of the present invention provide an indoor activity type identification device, comprising:
[0030] The data acquisition module is used to acquire all sensor data corresponding to all sensors installed indoors;
[0031] The semantic set determination module is used to process all sensor data and determine the sensor semantic set corresponding to all sensor data.
[0032] The activity type identification module is used to process the sensor semantic sequences in the sensor semantic set using the LZ78 algorithm to generate a semantic rule set, and then identify the indoor activity type based on the semantic rule set.
[0033] Thirdly, embodiments of the present invention provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-mentioned indoor activity type identification methods.
[0034] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for identifying indoor activity types.
[0035] This invention provides a method, device, terminal, and storage medium for identifying indoor activity types. The method includes: first, acquiring all sensor data corresponding to all sensors installed indoors; then, processing all sensor data to determine the sensor semantic set corresponding to all sensor data; and finally, using the LZ78 algorithm to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, thereby identifying indoor activity types based on the semantic rule set. In the above process of identifying indoor activity types, this invention combines the LZ78 data compression algorithm to solve the problem of building the MLN structure, improving the computational efficiency of MLN learning, and accurately identifying the activity categories of the elderly. Attached Figure Description
[0036] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application. In the drawings:
[0037] Figure 1 This is a flowchart illustrating the implementation of an indoor activity type identification method provided in an embodiment of the present invention.
[0038] Figure 2 This is a schematic diagram of the indoor area structure provided in an embodiment of the present invention;
[0039] Figure 3 This is a schematic diagram of the sensor setup in an indoor area structure provided in an embodiment of the present invention;
[0040] Figure 4 This is a schematic diagram of LZ78 semantic segmentation and knowledge construction rules provided in an embodiment of the present invention;
[0041] Figure 5 This is a schematic diagram of the tree-shaped knowledge structure of semantic sequences provided in an embodiment of the present invention;
[0042] Figure 6 This is a schematic diagram of the structure of an indoor activity type identification device provided in an embodiment of the present invention;
[0043] Figure 7 This is a schematic diagram of the terminal provided in an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0046] It should be understood that in the various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0047] It should be understood that in this invention, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0048] It should be understood that in this invention, "multiple" refers to two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, "and / or B" can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "Contains A, B, and C", "Contains A, B, and C" means that all three A, B, and C are contained; "Contains A, B, or C" means that one of A, B, and C is contained; "Contains A, B, and / or C" means that any one, two, or three of A, B, and C are contained.
[0049] It should be understood that in this invention, "B corresponding to A", "B corresponding to A", "A and B correspond", or "B and A correspond" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information. Matching A and B is defined as a similarity between A and B that is greater than or equal to a preset threshold.
[0050] Depending on the context, "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection."
[0051] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0052] For activity type identification methods, the effective features extracted by traditional machine learning algorithms mostly rely on domain expertise. Selecting too many features will waste computational costs and reduce the predictive ability of the classification model, thereby reducing the accuracy of activity type identification.
[0053] To address this issue, researchers have applied deep learning algorithms, such as CNNs, LSTMs, and Deep-ConvLSTMs, to activity recognition, enabling them to automatically learn rich features. These algorithms acquire features from vast amounts of data, and their grammatical rules are largely based on domain expert knowledge. Compared to traditional machine learning algorithms, deep learning algorithms can acquire richer semantics and build more complex activity models. However, they require large amounts of data and are highly dependent on specific data sets. For example, if an individual habitually cooks with natural gas, and a cooking model is built based on that data, but then the individual adds an oven and needs to bake food, the natural gas cooking model will not be suitable for baking, and the activity recognition accuracy will decrease.
[0054] However, traditional machine learning and deep learning algorithms extract activity recognition models from raw data, resulting in weak knowledge representation capabilities. In contrast, knowledge-driven methods based on knowledge graphs and natural language processing (also known as semantic methods) for indoor activity recognition possess strong knowledge representation capabilities. These algorithms use formal languages to model the ontology between activities and between activities and their context, and then use knowledge models and prior knowledge to infer activities. However, these algorithms rely excessively on expert knowledge and lack autonomy and flexibility in their learning.
[0055] To combine the advantages of data learning and knowledge learning, scholars have proposed a combined probability and knowledge algorithm—Markov Logic Networks (MLNs). These algorithms can handle uncertain information and have strong expressive power. However, they have a deep theoretical foundation, complex computational processes, and consume significant amounts of memory and computational resources.
[0056] Therefore, this invention combines the LZ78 data compression algorithm to solve the construction of MLN structure, improves the computational efficiency of MLN learning, and can effectively identify the activity categories of the elderly.
[0057] Furthermore, to make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0058] In one embodiment, such as Figure 1 As shown, a method for identifying indoor activity types is provided, including the following steps:
[0059] Step S101: Obtain all sensor data corresponding to all sensors installed indoors.
[0060] This application aims to facilitate the collection of data on the elderly, and requires the following: Figure 2 Sensors and Wi-Fi are deployed in the living indoor space shown, and the state after deployment is as follows. Figure 3 As shown, at least one sensor is installed in each area of the room to collect sensor data, thereby effectively studying and identifying activity types.
[0061] Sensors deployed indoors can include environmental sensors and wearable sensors. If wearable sensors cause inconvenience to the elderly's activities, only environmental sensors and Wi-Fi can be deployed.
[0062] Because elderly people have limited activity ranges and mostly concentrate in one activity area rather than spreading across multiple areas, the placement of indoor sensors needs to consider their activity areas. This ensures better capture of their activity information while also facilitating data segmentation. For example, the activity of cooking involves passing through locations including a tap, a console, a cabinet, and a gasstoveg. Sensors s1, s2, s3, and s4 are respectively installed at these locations. The sensor data collected during the cooking activity can be represented as follows:
[0063] Rule(Cooking)={s1, s2, s3, s4}.
[0064] Step S102: Process all sensor data to determine the sensor semantic set corresponding to all sensor data.
[0065] To process all sensor data and determine the sensor semantic set corresponding to all sensor data, the first step is to segment all sensor data based on functional regions to determine the initial sensor sequence set. Here, functional regions are used to characterize indoor areas with different functions, such as the kitchen as a cooking area and the bedroom as a resting area.
[0066] Since an indoor space comprises multiple spaces, and each space can be represented as at least one functional area, there are multiple target functional areas. Therefore, it is necessary to first select the sensor data belonging to each target functional area from all sensor data to form the sensor sequence corresponding to each target functional area.
[0067] For example, suppose the room includes two areas: a kitchen (cooking area) equipped with sensors s1, s2, s3, and s4, and a living room (dining area) equipped with sensors s5, s6, and s7. Then, all sensor data for the room should include the data collected by all sensors, i.e., {s1, s2, s3, s4, s5, s1, s6, s7, s2, s3, s4, s6, s7}. Then, from all the sensor data, select the sensor sequence {s1, s2, s3, s4, s1, s2, s3, s4} corresponding to the sensors in the cooking area, and the sensor sequence {s5, s6, s7, s6, s7} corresponding to the sensors in the dining area.
[0068] After obtaining the sensor sequence corresponding to each functional area, it is necessary to summarize the sensor sequences corresponding to each target functional area to obtain an initial sensor sequence set.
[0069] Based on the above embodiments, the initial sensor sequence set is the combined set {s1, s2, s3, s4} of the sensor sequence corresponding to the sensor set in the cooking area and {s5, s6, s7} of the sensor set in the eating area, which is {s1, s2, s3, s4, s1, s2, s3, s4, s5, s6, s7, s6, s7}.
[0070] When acquiring data, individuals receive data simply by touching a sensor or entering the range of certain sensors, resulting in a large amount of redundant data. To remove this redundant data, we only retain information from the first appearance of a sensor. This involves using the least squares method to remove redundant data from the initial sensor sequence set, obtaining the target sensor sequence set. Specifically, we first obtain the number of data points corresponding to the longest sensor sequence in the initial sensor sequence set. Then, we pad all sensor sequences in the initial sensor sequence set (excluding the longest one) with the correct data points, and finally use the least squares method to calculate the target sensor sequence set by combining all the padded sensor sequences with the longest sensor sequence.
[0071] For example, the number of variables (i.e., the number of data points) C of the longest sensor sequence in the initial sensor dataset is taken as the number of bits in the sensor. If the number of variables in other sensor sequences is less than C, it needs to be padded with 0s. In this way, the initial sensor dataset consists of multiple vectors with a number of variables of C.
[0072] Then, the sensor sequence is calculated using the following least squares formula:
[0073] min∑||x i -x j || 2 =0
[0074] Where, x i Let x represent the i-th variable in the sensor sequence. j This represents the j-th variable in the sensor sequence.
[0075] After removing sequences with a minimum value of 0 using the aforementioned least squares method, mutually independent sensor sequences are generated, and the target sensor sequence set is composed of multiple mutually independent sensor sequences.
[0076] For example, the initial sensor sequence set {s1, s2, s3, s4, s1, s2, s3, s4, s5, s6, s7, s6, s7} obtained in the above embodiments is deredundant using the least squares method to obtain the target sensor sequence set {s1, s2, s3, s4, s5, s6, s7}.
[0077] To facilitate activity type identification, after obtaining the target sensor sequence set, the sensor data in the target sensor sequence set needs to be semantically transformed to obtain a sensor semantic set. Specifically, the target sensor sequences in the target sensor sequence set are first semantically transformed to obtain the corresponding sensor semantic sequences. Then, the corresponding sensor semantic sequences are summarized to obtain the sensor semantic set.
[0078] For example, the semantic transformation of the sensors in the cooking area of the target sensor sequence set {s1, s2, s3, s4, s5, s6, s7} can be represented as Rule(Cooking) = {s1, s2, s3, s4} → Rule(Cooking) = {tap, console, cabinet, gasstoveg}; the semantic transformation of the sensors in the eating area can be represented as Rule(Eating) = {s5, s6, s7} → Rule(Eating) = {diningroom, table, chair}. After the above semantic transformation, the sensor semantic set can be represented as {tap, console, cabinet, gasstoveg, dining room, table, chair}.
[0079] Step S103: Use the LZ78 algorithm to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, and identify indoor activity types based on the semantic rule set.
[0080] The LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set. The main processing methods are correction, segmentation and transformation. That is, the LZ78 algorithm is used to correct, segment and transform the sensor semantic sequences in the sensor semantic set to generate a semantic rule set.
[0081] Location-based segmentation can only segment single-region activities and cannot segment complex or overlapping activity data. Therefore, some sensor sequences may represent one activity, two adjacent sequences may represent one activity, or three activities. Thus, it is necessary to correct and segment the semantic sequences in the sensor semantic set. Specifically, the LZ78 algorithm is used to correct and segment the sensor semantic sequences in the sensor semantic set, and the segmented sensor semantic sequences are then transformed into a tree-like knowledge structure.
[0082] For example, suppose there are six sensor semantic sequences {w1, w2, w3, w4}, {w5, w6, w7}, {w1, w2, w3, w4, w5, w6, w7}, {w8, w9, w 10 w 11},{w 12 w 13 w 14 w 15 w 16},{w 11 w 12 w 13}
[0083] According to the LZ78 algorithm, the following is obtained: Figure 4 The rules shown state that if a character or sequence appears more than twice, it is necessary to check if there are duplicate rules in the tree and make appropriate adjustments based on the duplicate rules. If the last three characters in the first column are the same as those in the second column, then the rules in the second column are retained. If some characters in the third and fourth columns appear twice, and the characters in the fifth column appear in the third and fourth columns, then the rules in the fifth column are retained.
[0084] After the above corrections, the semantic sequence can be further segmented according to the activity type. The segmented semantic sequence is as follows:
[0085] Rule(Cooking)={tap, console, cabinet, gasstoveg};
[0086] Rule(Washdishes)={tap, cabinet, tableware};
[0087] Rule(Washing)={tap, soap, towel}.
[0088] After the above corrections and segmentation, the segmented semantic sequence is then transformed into, for example, Figure 5 The tree-like knowledge structure shown is used to generate a set of semantic rules, which in turn are used to identify activity types.
[0089] This invention provides a method, device, terminal, and storage medium for identifying indoor activity types. The method includes: first, acquiring all sensor data corresponding to all sensors installed indoors; then, processing all sensor data to determine the sensor semantic set corresponding to all sensor data; and finally, using the LZ78 algorithm to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, thereby identifying indoor activity types based on the semantic rule set. In the above process of identifying indoor activity types, this invention combines the LZ78 data compression algorithm to solve the problem of building the MLN structure, improving the computational efficiency of MLN learning, and accurately identifying the activity categories of the elderly.
[0090] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0091] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0092] Figure 6 The diagram shows a schematic representation of an indoor activity type identification device according to an embodiment of the present invention. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown. The indoor activity type identification device includes a data acquisition module 61, a semantic set determination module 62, and an activity type identification module 63, as detailed below:
[0093] Data acquisition module 61 is used to acquire all sensor data corresponding to all sensors installed indoors;
[0094] The semantic set determination module 62 is used to process all sensor data and determine the sensor semantic set corresponding to all sensor data.
[0095] The activity type identification module 63 is used to process the sensor semantic sequence in the sensor semantic set using the LZ78 algorithm to generate a semantic rule set, so as to identify the indoor activity type based on the semantic rule set.
[0096] In one possible implementation, the semantic set determination module 62 is further configured to segment all sensor data based on functional regions to determine an initial sensor sequence set, wherein the functional regions are used to characterize indoor areas with different functions; to remove redundant data in the initial sensor sequence set using the least squares method to obtain a target sensor sequence set; and to semanticize the sensor data in the target sensor sequence set to obtain a sensor semantic set.
[0097] In one possible implementation, the functional area includes multiple target functional areas;
[0098] The semantic set determination module 62 is also used to select sensor data belonging to each target functional area from all sensor data to form a sensor sequence corresponding to each target functional area; and to summarize the sensor sequences corresponding to each target functional area to obtain an initial sensor sequence set.
[0099] In one possible implementation, the semantic set determination module 62 is further used to obtain the number of data corresponding to the longest sensor sequence in the initial sensor sequence set; to pad all sensor sequences in the initial sensor sequence set except for the longest sensor sequence according to the number of data, and to use the least squares method to calculate the target sensor sequence set by calculating all the padded sensor sequences and the longest sensor sequence.
[0100] In one possible implementation, the semantic set determination module 62 is further configured to perform semantic transformation on the target sensor sequences in the target sensor sequence set to obtain the sensor semantic sequences corresponding to the target sensor sequences; and to summarize the sensor semantic sequences corresponding to the target sensor sequences to obtain the sensor semantic set.
[0101] In one possible implementation, the activity type identification module 63 is also used to modify, cut and transform the sensor semantic sequence in the sensor semantic set using the LZ78 algorithm to generate a semantic rule set.
[0102] In one possible implementation, the activity type identification module 63 is also used to modify and cut the sensor semantic sequence in the sensor semantic set using the LZ78 algorithm, and transform the cut sensor semantic sequence into a tree-shaped knowledge structure; and generate a semantic rule set based on the tree-shaped knowledge structure.
[0103] Figure 7 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 7As shown, the terminal 7 in this embodiment includes a processor 71, a memory 72, and a computer program 73 stored in the memory 72 and executable on the processor 71. When the processor 71 executes the computer program 73, it implements the steps in the above-described embodiments of the indoor activity type identification methods, for example... Figure 1 Steps 101 to 103 are shown. Alternatively, when processor 71 executes computer program 73, it implements the functions of each module / unit in the above-described embodiments of the indoor activity type identification device, for example... Figure 6 The functions of modules / units 61 to 63 shown.
[0104] The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, is used to implement the indoor activity type identification method provided in the various embodiments described above.
[0105] The readable storage medium can be a computer storage medium or a communication medium. A communication medium includes any medium that facilitates the transfer of computer programs from one location to another. A computer storage medium can be any available medium accessible to a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application-Specific Integrated Circuit (ASIC). Alternatively, the ASIC can be located in a user equipment. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0106] The present invention also provides a program product including execution instructions stored in a readable storage medium. At least one processor of the device can read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor causes the device to implement the indoor activity type identification method provided in the various embodiments described above.
[0107] In the embodiments of the above-described device, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0108] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for identifying indoor activity types, characterized in that, include: Acquire all sensor data corresponding to all sensors installed indoors; Process all the sensor data to determine the sensor semantic set corresponding to all the sensor data; The LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, which is then used to identify indoor activity types. The process of processing all the sensor data to determine the sensor semantic set corresponding to all the sensor data includes: The data from all sensors are segmented based on functional regions to determine an initial set of sensor sequences, wherein the functional regions are used to characterize indoor areas with different functions. After obtaining the sensor sequence corresponding to each functional area, it is necessary to summarize the sensor sequences corresponding to each target functional area to obtain an initial sensor sequence set. Redundant data in the initial sensor sequence set is removed using the least squares method to obtain the target sensor sequence set; The target sensor sequences in the target sensor sequence set are semantically transformed to obtain the sensor semantic sequences corresponding to the target sensor sequences. The sensor semantic sequences corresponding to the target sensor sequence are summarized to obtain the sensor semantic set; The LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, including: The LZ78 algorithm is used to correct and segment the sensor semantic sequences in the sensor semantic set, and the segmented sensor semantic sequences are transformed into a tree-shaped knowledge structure; the semantic rule set is generated based on the tree-shaped knowledge structure.
2. The method for identifying indoor activity types as described in claim 1, characterized in that, The functional area includes multiple target functional areas; The step of segmenting all sensor data based on functional regions to determine the initial sensor sequence set includes: Select sensor data belonging to each target functional area from all the sensor data to form a sensor sequence corresponding to each target functional area; The sensor sequences corresponding to each target functional area are summarized to obtain the initial sensor sequence set.
3. The method for identifying indoor activity types as described in claim 1, characterized in that, The step of removing redundant data from the initial sensor sequence set using the least squares method to obtain the target sensor sequence set includes: Obtain the number of data points corresponding to the longest sensor sequence in the initial sensor sequence set; All sensor sequences in the initial sensor sequence set, except for the longest sensor sequence, are padded with data based on the number of data. The least squares method is then used to calculate the values of all padded sensor sequences and the longest sensor sequence to obtain the target sensor sequence set.
4. A device for identifying indoor activity types, characterized in that, include: The data acquisition module is used to acquire all sensor data corresponding to all sensors installed indoors; The semantic set determination module is used to process all the sensor data and determine the sensor semantic set corresponding to all the sensor data. The process of processing all the sensor data to determine the sensor semantic set corresponding to all the sensor data includes: The data from all sensors are segmented based on functional regions to determine an initial set of sensor sequences, wherein the functional regions are used to characterize indoor areas with different functions. After obtaining the sensor sequence corresponding to each functional area, it is necessary to summarize the sensor sequences corresponding to each target functional area to obtain an initial sensor sequence set. Redundant data in the initial sensor sequence set is removed using the least squares method to obtain the target sensor sequence set; The target sensor sequences in the target sensor sequence set are semantically transformed to obtain the sensor semantic sequences corresponding to the target sensor sequences. The sensor semantic sequences corresponding to the target sensor sequence are summarized to obtain the sensor semantic set; The activity type identification module is used to process the sensor semantic sequences in the sensor semantic set using the LZ78 algorithm to generate a semantic rule set, so as to identify the indoor activity type based on the semantic rule set; The LZ78 algorithm is used to process the sensor semantic sequences in the sensor semantic set to generate a semantic rule set, including: The LZ78 algorithm is used to correct and segment the sensor semantic sequences in the sensor semantic set, and the segmented sensor semantic sequences are transformed into a tree-shaped knowledge structure; the semantic rule set is generated based on the tree-shaped knowledge structure.
5. A terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for identifying indoor activity types as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the indoor activity type identification method as described in any one of claims 1 to 3.