CN110349373B - Behavior recognition method and device based on binary sensor and storage medium - Google Patents

Behavior recognition method and device based on binary sensor and storage medium Download PDF

Info

Publication number
CN110349373B
CN110349373B CN201910635047.8A CN201910635047A CN110349373B CN 110349373 B CN110349373 B CN 110349373B CN 201910635047 A CN201910635047 A CN 201910635047A CN 110349373 B CN110349373 B CN 110349373B
Authority
CN
China
Prior art keywords
equal
data
binary sensor
space
behavior pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910635047.8A
Other languages
Chinese (zh)
Other versions
CN110349373A (en
Inventor
陈海宝
赵生慧
陈桂林
赵玉艳
刘进军
赵亮
张志勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chuzhou University
Original Assignee
Chuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chuzhou University filed Critical Chuzhou University
Priority to CN201910635047.8A priority Critical patent/CN110349373B/en
Publication of CN110349373A publication Critical patent/CN110349373A/en
Application granted granted Critical
Publication of CN110349373B publication Critical patent/CN110349373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • G08B21/04Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons
    • G08B21/0407Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons based on behaviour analysis
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • G08B21/04Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons
    • G08B21/0438Sensor means for detecting

Abstract

The invention discloses a behavior identification method based on a binary sensor, which comprises the following steps: s1: preprocessing data acquired by a binary sensor to obtain preprocessed binary sensor data; s2: performing segmentation processing on the preprocessed binary sensor data obtained in the step S1 based on space constraint and time constraint to obtain segmented binary sensor data; s3: mapping and converting the segmented binary sensor data obtained in the step S2 into a one-dimensional character string, and processing the one-dimensional character string to obtain a behavior pattern candidate set; s4: specific behavior patterns are identified from the behavior pattern candidate set obtained in step S3. The invention also discloses a behavior recognition device based on the binary sensor and a computer storage medium. The method is convenient to use, cannot invade privacy, and is high in accuracy, low in calculation complexity and low in cost.

Description

Behavior recognition method and device based on binary sensor and storage medium
Technical Field
The invention relates to behavior recognition, in particular to behavior recognition of old people living in a nursing home or alone.
Background
The prior art discloses an invention patent application with application number 201310489096.8 entitled "a monitoring method for dangerous behaviors of old people in nursing home", wherein a scheme for monitoring the activity state of the old people in the nursing home in daily life and alarming the dangerous and abnormal behaviors of the old people based on a method combining target tracking and behavior recognition is provided. However, according to the scheme, a large number of cameras need to be arranged in a home environment, all-dimensional and multi-angle monitoring is carried out, and the privacy of the old people is easily invaded.
The prior art also discloses a monitoring method based on a wearable sensor, but the monitoring method needs to be worn every day, and is inconvenient to use.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a behavior recognition method, a behavior recognition device and a storage medium based on a binary sensor, which can solve the technical problems of easy privacy violation and inconvenient use in the prior art.
The technical scheme is as follows: the behavior identification method based on the binary sensor comprises the following steps:
s1: preprocessing data acquired by a binary sensor to obtain preprocessed binary sensor data;
s2: performing segmentation processing on the preprocessed binary sensor data obtained in the step S1 based on space constraint and time constraint to obtain segmented binary sensor data;
s3: mapping and converting the segmented binary sensor data obtained in the step S2 into a one-dimensional character string, and processing the one-dimensional character string to obtain a behavior pattern candidate set;
s4: specific behavior patterns are identified from the behavior pattern candidate set obtained in step S3.
Further, in step S1, the preprocessing process includes: filtering invalid data in the data collected by the binary sensor; the invalid data satisfies at least one of the following three conditions:
condition 1: the data is null;
condition 2: the data generation time is greater than the upper limit or less than the lower limit;
condition 3: the binary sensor ID in the data is incorrect.
Further, the step S2 specifically includes the following steps:
s21: let i equal to 1;
s22; preprocessing the day i binary sensor data DiDividing according to space: di={Di,1,…,Di ,a}; wherein D isi,jRepresents the preprocessed binary sensor data in the jth space on the ith day, j is more than or equal to 1 and less than or equal to a, and a represents the preprocessed binary sensor data D on the ith dayiThe total number of the divided spaces is,
Figure BDA0002130032430000021
represents the kth data in the preprocessed binary sensor data in the jth space on the ith day, wherein k is more than or equal to 1 and less than or equal to betai,j,βi,jRepresents the total amount of preprocessed binary sensor data, β, in the jth space on day ii,j≥1;
S23: let j equal 1;
s24: will be provided with
Figure BDA0002130032430000022
1 st data subset D divided into ith space on dayi,j,1In and (2) mixing
Figure BDA0002130032430000023
Is marked as
Figure BDA0002130032430000024
Represents Di,j,11 st element in (1);
s25: if beta isi,jIf 1, go to step S29; if beta isi,jIf > 1, go to step S26;
s26: let k1=1;
S27: judgment of
Figure BDA0002130032430000025
Whether or not this condition is true is determined,
Figure BDA0002130032430000026
representing the kth in preprocessed binary sensor data in the jth space on day i1The number of the +1 pieces of data,
Figure BDA0002130032430000027
time tableDisplay device
Figure BDA0002130032430000028
The moment of this data acquisition is carried out,
Figure BDA0002130032430000029
representing the kth in preprocessed binary sensor data in the jth space on day i1The number of the data is one,
Figure BDA00021300324300000210
time representation
Figure BDA00021300324300000211
The instant of this data acquisition, λ represents the time threshold: if the condition is true, then
Figure BDA00021300324300000212
Is divided into
Figure BDA00021300324300000213
In the same data subset, then judge k1Whether +1 is equal to β or noti,jIf equal, go to step S29, otherwise go to step S28; if the condition is not satisfied, the method will
Figure BDA00021300324300000214
Characterised by the ratio of the serial numbers
Figure BDA00021300324300000215
In the data subset with the sequence number more than 1, k is judged1Whether +1 is equal to β or noti,jIf equal, go to step S29, otherwise go to step S28;
s28: let k1=k1+1 and then returning to step S27;
s29: judging whether j is equal to a: if so, go to step 210; otherwise, let j equal to j +1, and then return to step S24;
s210: determine if i equals maximum number of days: if yes, ending; otherwise, let i equal to i +1, and then return to step S22.
Further, the step S3 specifically includes the following steps:
s31: let j equal 1;
s32: let i equal to 1;
s33: let r be 1;
s34: the r-th data subset D in the j-th space on the ith day obtained in the step S2i,j,rConverting into the r character string S in the j space on the ith dayi,j,r
Figure BDA0002130032430000031
Di,j,rEach element in (1) is converted into Si ,j,rWherein, wherein
Figure BDA0002130032430000032
Denotes Si,j,rW character of (1), i.e.
Figure BDA0002130032430000033
From Di,j,rW-th element of (A) is converted to (B)i,j,rDenotes Si,j,rThe total number of middle characters;
s35: let m equal to 1;
s36: obtaining the r character string S in the j space of the ith dayi,j,rSet of all m-length substrings in the text
Figure BDA0002130032430000034
S37: judging whether m is greater than or equal to tau, wherein tau is a length threshold value: if so, will
Figure BDA0002130032430000035
Recording as an effective substring set, wherein all substrings in the effective substring set are effective substrings, and then performing step S38; otherwise, it will
Figure BDA0002130032430000036
Discarding, and then proceeding to step S39;
s38: will be provided with
Figure BDA0002130032430000037
All valid substrings in (1) are converted into corresponding hash values;
s39: judging whether m is equal to betai,j,r: if yes, go to step S310; otherwise, let m be m +1, and then return to step S36;
s310: judging whether r is equal to the total number of data subsets in the jth space at the ith day: if so, go to step S311; otherwise, let r be r +1, then return to step S34;
s311: determine if i equals maximum number of days: if so, go to step S312; otherwise, let i equal to i +1, and then return to step S34;
s312: counting the occurrence frequency of each effective substring according to hash values converted from all effective substrings in the jth space in x consecutive days, and storing the effective substrings with the occurrence frequency not less than a frequency threshold value into a potential behavior mode set of the jth space; x is more than or equal to 2;
s313: if the potential behavior pattern set of the jth space contains a complete character string, all effective sub-character strings of the character string are removed, and thus a behavior pattern candidate set of the jth space is formed;
s314: judging whether j is equal to a: if yes, ending; otherwise, let j equal to j +1, and then return to step S34.
Further, the step S4 specifically includes the following steps:
s41: let j equal 1;
s42: comparing each element in the behavior pattern candidate set of the jth space with each element in the predefined behavior pattern set of the jth space respectively: if the similarity between one element in the behavior pattern candidate set of the jth space and one element in the predefined behavior pattern set of the jth space is 1, determining that the element in the behavior pattern candidate set of the jth space is a behavior pattern; if the similarity between all elements in the behavior pattern candidate set of the jth space and all elements in the predefined behavior pattern set of the jth space is not 1, judging whether the maximum similarity between all elements in the behavior pattern candidate set of the jth space and all elements in the predefined behavior pattern set of the jth space exceeds a similarity threshold, if so, determining the elements in the behavior pattern candidate set of the jth space corresponding to the maximum similarity as a behavior pattern, and if not, storing the elements in the behavior pattern candidate set of the jth space corresponding to the maximum similarity in an artificial detection set;
s43: judging whether each element in the manual detection set is a behavior mode or not in a manual detection mode: if yes, adding the corresponding element into the predefined behavior pattern set; otherwise, discarding;
s44: judging whether j is equal to a: if yes, ending; otherwise, let j equal to j +1, and then return to step S42.
The behavior recognition device based on the binary sensor comprises:
a data preprocessing module: the system comprises a binary sensor, a data acquisition unit, a data processing unit and a data processing unit, wherein the binary sensor is used for acquiring data of the binary sensor;
a data segmentation module: the binary sensor data preprocessing module is used for carrying out segmentation processing on the preprocessed binary sensor data obtained by the data preprocessing module based on space constraint and time constraint to obtain segmented binary sensor data;
a behavior pattern candidate set generation module: the device comprises a data segmentation module, a behavior mode candidate set and a data storage module, wherein the data segmentation module is used for mapping segmented binary sensor data obtained by the data segmentation module and converting the segmented binary sensor data into a one-dimensional character string, and processing the one-dimensional character string to obtain the behavior mode candidate set;
a behavior pattern recognition module: the behavior pattern recognition module is used for recognizing a specific behavior pattern from the behavior pattern candidate set obtained by the behavior pattern candidate set generation module.
The computer storage medium of the present invention stores thereon a computer program, which, when executed by a processor, implements the steps of the binary sensor-based behavior recognition method.
Has the advantages that: compared with the prior art, the invention has the following beneficial effects:
1) the behavior recognition is carried out based on the binary sensor, the wearing is not needed, the use is convenient, a large number of cameras are not needed, and the privacy of a user is not violated;
2) the invention comprehensively considers space constraint and time constraint, thus improving the accuracy of behavior recognition;
3) the binary sensor data are mapped and converted into the one-dimensional character string instead of the multi-dimensional character string, so that the calculation complexity can be reduced;
4) the intelligent home furnishing system is based on the ubiquitous binary sensors in the intelligent home furnishing, and a large number of binary sensors are not required to be added, so that the cost can be reduced.
Drawings
FIG. 1 is a flow chart of a method in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of data segmentation based on spatial constraints according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of data segmentation based on temporal and spatial constraints in an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The specific embodiment discloses a behavior identification method based on a binary sensor, as shown in fig. 1, comprising the following steps:
s1: preprocessing data acquired by a binary sensor to obtain preprocessed binary sensor data;
s2: performing segmentation processing on the preprocessed binary sensor data obtained in the step S1 based on space constraint and time constraint to obtain segmented binary sensor data;
s3: mapping and converting the segmented binary sensor data obtained in the step S2 into a one-dimensional character string, and processing the one-dimensional character string to obtain a behavior pattern candidate set;
s4: specific behavior patterns are identified from the behavior pattern candidate set obtained in step S3.
In step S1, the preprocessing process includes: filtering invalid data in the data collected by the binary sensor; the invalid data satisfies at least one of the following three conditions:
condition 1: the data is null;
condition 2: the data generation time is greater than the upper limit or less than the lower limit;
condition 3: the binary sensor ID in the data is incorrect.
Step S2 specifically includes the following steps:
s21: let i equal to 1;
s22; preprocessing the day i binary sensor data DiThe division is performed according to space, as shown in fig. 2: di={Di,1,…,Di,a}; wherein D isi,jRepresents the preprocessed binary sensor data in the jth space on the ith day, j is more than or equal to 1 and less than or equal to a, and a represents the preprocessed binary sensor data D on the ith dayiThe total number of the divided spaces is,
Figure BDA0002130032430000061
represents the kth data in the preprocessed binary sensor data in the jth space on the ith day, wherein k is more than or equal to 1 and less than or equal to betai,j,βi,jRepresents the total amount of preprocessed binary sensor data, β, in the jth space on day ii,j≥1;
S23: let j equal 1;
s24: will be provided with
Figure BDA0002130032430000062
1 st data subset D divided into ith space on dayi,j,1In and (2) mixing
Figure BDA0002130032430000063
Is marked as
Figure BDA0002130032430000064
Represents Di,j,11 st element in (1);
s25: if beta isi,jIf 1, go to step S29; if beta isi,jIf > 1, go to step S26;
s26: let k1=1;
S27: judgment of
Figure BDA0002130032430000065
Whether or not this condition is true is determined,
Figure BDA0002130032430000066
representing the kth in preprocessed binary sensor data in the jth space on day i1The number of the +1 pieces of data,
Figure BDA0002130032430000067
time representation
Figure BDA0002130032430000068
The moment of this data acquisition is carried out,
Figure BDA0002130032430000069
representing the kth in preprocessed binary sensor data in the jth space on day i1The number of the data is one,
Figure BDA00021300324300000610
time representation
Figure BDA00021300324300000611
The instant of this data acquisition, λ represents the time threshold: if the condition is true, then
Figure BDA00021300324300000612
Is divided into
Figure BDA00021300324300000613
In the same data subset, and then judgingk1Whether +1 is equal to β or noti,jIf equal, go to step S29, otherwise go to step S28; if the condition is not satisfied, the method will
Figure BDA00021300324300000614
Characterised by the ratio of the serial numbers
Figure BDA00021300324300000615
In the data subset with the sequence number more than 1, k is judged1Whether +1 is equal to β or noti,jIf equal, go to step S29, otherwise go to step S28;
s28: let k1=k1+1 and then returning to step S27;
s29: judging whether j is equal to a: if so, go to step 210; otherwise, let j equal to j +1, and then return to step S24;
s210: determine if i equals maximum number of days: if yes, ending; otherwise, let i equal to i +1, and then return to step S22.
FIG. 2 is a schematic illustration of data segmentation based on spatial constraints, and it can be seen that FIG. 2 is a graph of day i pre-processed binary sensor data DiThe data of 3 spaces including a kitchen, a bedroom and a bathroom are divided, the ball filled with diagonal lines represents the data of the kitchen, the ball filled with grid lines represents the data of the bedroom, and the ball filled without diagonal lines represents the data of the bathroom.
Figure BDA0002130032430000071
Wherein data of kitchen
Figure BDA0002130032430000072
Data of bedroom
Figure BDA0002130032430000073
Data of toilet
Figure BDA0002130032430000074
FIG. 3 is a block diagram based on temporal and spatial constraintsSchematic drawing of data segmentation is performed, diagonal filled balls represent kitchen data, check filled balls represent bedroom data, and unfilled balls represent bathroom data. It can be seen that fig. 3 divides the data in 3 spaces into a plurality of data subsets, for example, the data of a kitchen into Di,1,1And Di,1,2The two data subsets divide the data of the bedroom into Di,2,1And Di,2,2The two data subsets divide the data of the toilet into Di,3,1This one subset of data. Wherein the content of the first and second substances,
Figure BDA0002130032430000075
all of the subsets of data obtained in step S2 collectively constitute segmented binary sensor data.
Step S3 specifically includes the following steps:
s31: let j equal 1;
s32: let i equal to 1;
s33: let r be 1;
s34: the r-th data subset D in the j-th space on the ith day obtained in the step S2i,j,rConverting into the r character string S in the j space on the ith dayi,j,r
Figure BDA0002130032430000076
Di,j,rEach element in (1) is converted into Si ,j,rWherein, wherein
Figure BDA0002130032430000077
Denotes Si,j,rW character of (1), i.e.
Figure BDA0002130032430000078
From Di,j,rW-th element of (A) is converted to (B)i,j,rDenotes Si,j,rThe total number of middle characters;
s35: let m equal to 1;
s36: obtaining the r character string S in the j space of the ith dayi,j,rSet of all m-length substrings in the text
Figure BDA0002130032430000081
S37: judging whether m is greater than or equal to tau, wherein tau is a length threshold value: if so, will
Figure BDA0002130032430000082
Recording as an effective substring set, wherein all substrings in the effective substring set are effective substrings, and then performing step S38; otherwise, it will
Figure BDA0002130032430000083
Discarding, and then proceeding to step S39;
s38: will be provided with
Figure BDA0002130032430000084
All valid substrings in (1) are converted into corresponding hash values;
s39: judging whether m is equal to betai,j,r: if yes, go to step S310; otherwise, let m be m +1, and then return to step S36;
s310: judging whether r is equal to the total number of data subsets in the jth space at the ith day: if so, go to step S311; otherwise, let r be r +1, then return to step S34;
s311: determine if i equals maximum number of days: if so, go to step S312; otherwise, let i equal to i +1, and then return to step S34;
s312: counting the occurrence frequency of each effective substring according to hash values converted from all effective substrings in the jth space in x consecutive days, and storing the effective substrings with the occurrence frequency not less than a frequency threshold value into a potential behavior mode set of the jth space; x is more than or equal to 2;
s313: if the potential behavior pattern set of the jth space contains a complete character string, all effective sub-character strings of the character string are removed, and thus a behavior pattern candidate set of the jth space is formed;
s314: judging whether j is equal to a: if yes, ending; otherwise, let j equal to j +1, and then return to step S34.
Regarding step S34, an embodiment is presented herein: the data of the binary sensor may be converted into characters based on the ID of the binary sensor, as shown in table 1.
TABLE 1 mapping table
Figure BDA0002130032430000085
Figure BDA0002130032430000091
If in FIG. 3
Figure BDA0002130032430000092
The data corresponds to a binary sensor with an ID of 1,
Figure BDA0002130032430000093
if the ID of the binary sensor corresponding to the data is 4, the data will be
Figure BDA0002130032430000094
Is mapped as c1Will be
Figure BDA0002130032430000095
Is mapped as c4
Steps S36-S37 can extract all valid substrings by using a sliding window method in the prior art, and an embodiment is given here: suppose Si,j,kIf the length threshold τ is 2, the window threshold in the sliding window method is set to 2, that is, three different window sizes, i.e., 2, 3, and 4. When the window size is 2, the valid substring is
Figure BDA0002130032430000096
When the window size is 3, the valid substring is
Figure BDA0002130032430000097
When the window size is 4, the valid substring is
Figure BDA0002130032430000098
Visible, the character string Si,j,kAll valid substrings of { a, e, d, f } are:
Figure BDA0002130032430000099
Figure BDA00021300324300000910
in step S313, if the set of potential behavior patterns in the jth space includes a complete string, all valid substrings of the string can be eliminated, because if a complete string appears in the set of potential behavior patterns, all valid substrings of the string also exist in the set of potential behavior patterns. For example: a behavior "shower" may be represented as a string "abcd", where a stands for "light on", b stands for "perceived by infrared sensor", c stands for "perceived by pressure sensor", and d stands for "light off". If "showering" occurs more than 300 times per year, its substring a, b, c, d will also occur more than 300 times. Therefore, to further reduce computational complexity, the present embodiment culls all valid substrings from the complete string already contained in the set of potential behavior patterns.
Step S4 specifically includes the following steps:
s41: let j equal 1;
s42: comparing each element in the behavior pattern candidate set of the jth space with each element in the predefined behavior pattern set of the jth space respectively: if the similarity between one element in the behavior pattern candidate set of the jth space and one element in the predefined behavior pattern set of the jth space is 1, determining that the element in the behavior pattern candidate set of the jth space is a behavior pattern; if the similarity between all elements in the behavior pattern candidate set of the jth space and all elements in the predefined behavior pattern set of the jth space is not 1, judging whether the maximum similarity between all elements in the behavior pattern candidate set of the jth space and all elements in the predefined behavior pattern set of the jth space exceeds a similarity threshold, if so, determining the elements in the behavior pattern candidate set of the jth space corresponding to the maximum similarity as a behavior pattern, and if not, storing the elements in the behavior pattern candidate set of the jth space corresponding to the maximum similarity in an artificial detection set;
s43: judging whether each element in the manual detection set is a behavior mode or not in a manual detection mode: if yes, adding the corresponding element into the predefined behavior pattern set; otherwise, discarding;
s44: judging whether j is equal to a: if yes, ending; otherwise, let j equal to j +1, and then return to step S42.
The similarity in step S42 is calculated by a similarity function in the prior art.
The present embodiment also discloses a behavior recognition device based on a binary sensor, as shown in fig. 4, including:
a data preprocessing module: the system comprises a binary sensor, a data acquisition unit, a data processing unit and a data processing unit, wherein the binary sensor is used for acquiring data of the binary sensor;
a data segmentation module: the binary sensor data preprocessing module is used for carrying out segmentation processing on the preprocessed binary sensor data obtained by the data preprocessing module based on space constraint and time constraint to obtain segmented binary sensor data;
a behavior pattern candidate set generation module: the device comprises a data segmentation module, a behavior mode candidate set and a data storage module, wherein the data segmentation module is used for mapping segmented binary sensor data obtained by the data segmentation module and converting the segmented binary sensor data into a one-dimensional character string, and processing the one-dimensional character string to obtain the behavior mode candidate set;
a behavior pattern recognition module: the behavior pattern recognition module is used for recognizing a specific behavior pattern from the behavior pattern candidate set obtained by the behavior pattern candidate set generation module.
The specific embodiment also discloses a computer storage medium, wherein a computer program is stored on the computer storage medium, and when the computer program is executed by a processor, the steps of the behavior identification method based on the binary sensor are realized.

Claims (5)

1. The behavior identification method based on the binary sensor is characterized by comprising the following steps: the method comprises the following steps:
s1: preprocessing data acquired by a binary sensor to obtain preprocessed binary sensor data;
s2: performing segmentation processing on the preprocessed binary sensor data obtained in the step S1 based on space constraint and time constraint to obtain segmented binary sensor data;
s3: mapping and converting the segmented binary sensor data obtained in the step S2 into a one-dimensional character string, and processing the one-dimensional character string to obtain a behavior pattern candidate set;
s4: identifying a specific behavior pattern from the behavior pattern candidate set obtained in step S3;
the step S2 specifically includes the following steps:
s21: let i equal to 1;
s22; preprocessing the day i binary sensor data DiDividing according to space: di={Di,1,…,Di,a}; wherein D isi,jRepresents the preprocessed binary sensor data in the jth space on the ith day, j is more than or equal to 1 and less than or equal to a, and a represents the preprocessed binary sensor data D on the ith dayiThe total number of the divided spaces is,
Figure FDA0002909089520000011
Figure FDA0002909089520000012
indicates the ith day and jth nullKth in preprocessed binary sensor data within cells1Data, 1. ltoreq. k1≤βi,j,βi,jRepresents the total amount of preprocessed binary sensor data, β, in the jth space on day ii,j≥1;
S23: let j equal 1;
s24: will be provided with
Figure FDA0002909089520000013
1 st data subset D divided into ith space on dayi,j,1In and (2) mixing
Figure FDA0002909089520000014
Is marked as
Figure FDA0002909089520000015
Figure FDA0002909089520000016
Represents Di,j,11 st element in (1);
s25: if beta isi,jIf 1, go to step S29; if beta isi,jIf > 1, go to step S26;
s26: let k1=1;
S27: judgment of
Figure FDA0002909089520000017
Whether or not this condition is true is determined,
Figure FDA0002909089520000018
representing the kth in preprocessed binary sensor data in the jth space on day i1The number of the +1 pieces of data,
Figure FDA0002909089520000019
to represent
Figure FDA00029090895200000110
The moment of this data acquisition is carried out,
Figure FDA00029090895200000111
representing the kth in preprocessed binary sensor data in the jth space on day i1The number of the data is one,
Figure FDA00029090895200000112
to represent
Figure FDA00029090895200000113
The instant of this data acquisition, λ represents the time threshold: if the condition is true, then
Figure FDA00029090895200000114
Is divided into
Figure FDA00029090895200000115
In the same data subset, then judge k1Whether +1 is equal to β or noti,jIf equal, go to step S29, otherwise go to step S28; if the condition is not satisfied, the method will
Figure FDA00029090895200000116
Characterised by the ratio of the serial numbers
Figure FDA00029090895200000117
In the data subset with the sequence number more than 1, k is judged1Whether +1 is equal to β or noti,jIf equal, go to step S29, otherwise go to step S28;
s28: let k1=k1+1 and then returning to step S27;
s29: judging whether j is equal to a: if yes, go to step S210; otherwise, let j equal to j +1, and then return to step S24;
s210: determine if i equals maximum number of days: if yes, ending; otherwise, let i equal to i +1, and then return to step S22.
2. The binary sensor based behavior recognition method according to claim 1, wherein: in step S1, the preprocessing process includes: filtering invalid data in the data collected by the binary sensor; the invalid data satisfies at least one of the following three conditions:
condition 1: the data is null;
condition 2: the data generation time is greater than the upper limit or less than the lower limit;
condition 3: the binary sensor ID in the data is incorrect.
3. The binary sensor based behavior recognition method according to claim 1, wherein: the step S3 specifically includes the following steps:
s31: let j equal 1;
s32: let i equal to 1;
s33: let r be 1;
s34: the r-th data subset D in the j-th space on the ith day obtained in the step S2i,j,rConverting into the r character string S in the j space on the ith dayi,j,r
Figure FDA0002909089520000021
Di,j,rEach element in (1) is converted into Si,j,rWherein, wherein
Figure FDA0002909089520000022
Denotes Si,j,rW character of (1), i.e.
Figure FDA0002909089520000023
From Di,j,rW-th element of (A) is converted to (B)i,j,rDenotes Si,j,rThe total number of middle characters;
s35: let m equal to 1;
s36: get the ith jth blankInter-nth character string Si,j,rSet of all m-length substrings in the text
Figure FDA0002909089520000024
S37: judging whether m is greater than or equal to tau, wherein tau is a length threshold value: if so, will
Figure FDA0002909089520000031
Recording as an effective substring set, wherein all substrings in the effective substring set are effective substrings, and then performing step S38; otherwise, it will
Figure FDA0002909089520000032
Discarding, and then proceeding to step S39;
s38: will be provided with
Figure FDA0002909089520000033
All valid substrings in (1) are converted into corresponding hash values;
s39: judging whether m is equal to betai,j,r: if yes, go to step S310; otherwise, let m be m +1, and then return to step S36;
s310: judging whether r is equal to the total number of data subsets in the jth space at the ith day: if so, go to step S311; otherwise, let r be r +1, then return to step S34;
s311: determine if i equals maximum number of days: if so, go to step S312; otherwise, let i equal to i +1, and then return to step S34;
s312: counting the occurrence frequency of each effective substring according to hash values converted from all effective substrings in the jth space in x consecutive days, and storing the effective substrings with the occurrence frequency not less than a frequency threshold value into a potential behavior mode set of the jth space; x is more than or equal to 2;
s313: if the potential behavior pattern set of the jth space contains a complete character string, all effective sub-character strings of the character string are removed, and thus a behavior pattern candidate set of the jth space is formed;
s314: judging whether j is equal to a: if yes, ending; otherwise, let j equal to j +1, and then return to step S34.
4. The binary sensor based behavior recognition method according to claim 3, wherein: the step S4 specifically includes the following steps:
s41: let j equal 1;
s42: comparing each element in the behavior pattern candidate set of the jth space with each element in the predefined behavior pattern set of the jth space respectively: if the similarity between one element in the behavior pattern candidate set of the jth space and one element in the predefined behavior pattern set of the jth space is 1, determining that the element in the behavior pattern candidate set of the jth space is a behavior pattern; if the similarity between all elements in the behavior pattern candidate set of the jth space and all elements in the predefined behavior pattern set of the jth space is not 1, judging whether the maximum similarity between all elements in the behavior pattern candidate set of the jth space and all elements in the predefined behavior pattern set of the jth space exceeds a similarity threshold, if so, determining the elements in the behavior pattern candidate set of the jth space corresponding to the maximum similarity as a behavior pattern, and if not, storing the elements in the behavior pattern candidate set of the jth space corresponding to the maximum similarity in an artificial detection set;
s43: judging whether each element in the manual detection set is a behavior mode or not in a manual detection mode: if yes, adding the corresponding element into the predefined behavior pattern set; otherwise, discarding;
s44: judging whether j is equal to a: if yes, ending; otherwise, let j equal to j +1, and then return to step S42.
5. A computer storage medium having a computer program stored thereon, characterized in that: the computer program, when being executed by a processor, carries out the steps of the binary sensor based behavior recognition method as claimed in any one of claims 1 to 4.
CN201910635047.8A 2019-07-15 2019-07-15 Behavior recognition method and device based on binary sensor and storage medium Active CN110349373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910635047.8A CN110349373B (en) 2019-07-15 2019-07-15 Behavior recognition method and device based on binary sensor and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910635047.8A CN110349373B (en) 2019-07-15 2019-07-15 Behavior recognition method and device based on binary sensor and storage medium

Publications (2)

Publication Number Publication Date
CN110349373A CN110349373A (en) 2019-10-18
CN110349373B true CN110349373B (en) 2021-04-09

Family

ID=68176324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910635047.8A Active CN110349373B (en) 2019-07-15 2019-07-15 Behavior recognition method and device based on binary sensor and storage medium

Country Status (1)

Country Link
CN (1) CN110349373B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111766793A (en) * 2020-06-29 2020-10-13 滁州学院 Modeling method, device, equipment and storage medium based on seat use habit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334845A (en) * 2007-06-27 2008-12-31 中国科学院自动化研究所 Video frequency behaviors recognition method based on track sequence analysis and rule induction
CN101739568A (en) * 2009-11-04 2010-06-16 北京交通大学 Layered observation vector decomposed hidden Markov model-based method for identifying behaviors
KR20150128006A (en) * 2014-05-08 2015-11-18 한양대학교 산학협력단 Apparatus and method for activity recognition by using layered hidden markov model
CN107402921A (en) * 2016-05-18 2017-11-28 阿里巴巴集团控股有限公司 Identify event-order serie data processing method, the apparatus and system of user behavior

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2528016A1 (en) * 2011-05-26 2012-11-28 Fujitsu Limited A method for analysing sensor data
US10575760B2 (en) * 2014-03-26 2020-03-03 GestureLogic Inc. Systems, methods and devices for activity recognition
CN104035396B (en) * 2014-04-18 2016-08-17 重庆大学 Distributed Activity recognition method based on wireless sensor network
CN107886103B (en) * 2016-09-29 2023-12-08 日本电气株式会社 Method, device and system for identifying behavior patterns
CN109697434B (en) * 2019-01-07 2021-01-08 腾讯科技(深圳)有限公司 Behavior recognition method and device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334845A (en) * 2007-06-27 2008-12-31 中国科学院自动化研究所 Video frequency behaviors recognition method based on track sequence analysis and rule induction
CN101739568A (en) * 2009-11-04 2010-06-16 北京交通大学 Layered observation vector decomposed hidden Markov model-based method for identifying behaviors
KR20150128006A (en) * 2014-05-08 2015-11-18 한양대학교 산학협력단 Apparatus and method for activity recognition by using layered hidden markov model
CN107402921A (en) * 2016-05-18 2017-11-28 阿里巴巴集团控股有限公司 Identify event-order serie data processing method, the apparatus and system of user behavior

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于层次隐马尔科夫的行为识别研究;梁璐;《中国优秀硕士学位论文全文数据库 信息科技辑》;20121215(第12期);全文 *
时间序列的行为匹配与评估技术研究;李鸿利;《中国优秀硕士学位论文全文数据库 基础科学辑》;20160715(第7期);全文 *

Also Published As

Publication number Publication date
CN110349373A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN108348160B (en) Monitoring a person's activities of daily living
Lamb et al. Indices for monitoring biodiversity change: Are some more effective than others?
CN107194184B (en) Method and system for detecting abnormality of people in hospital based on time sequence similarity analysis
CN102427765B (en) Sensing device for detecting a wearing position
CN111027069B (en) Malicious software family detection method, storage medium and computing device
CN111000553B (en) Intelligent classification method for electrocardiogram data based on voting ensemble learning
Gu et al. Mining emerging patterns for recognizing activities of multiple users in pervasive computing
CN108628973B (en) Agricultural data sharing system based on block chain
CN106974361A (en) A kind of wearable Intelligent insole with health diagnosis function
Kleynhans et al. Land cover change detection using autocorrelation analysis on MODIS time-series data: Detection of new human settlements in the Gauteng province of South Africa
CN104269025B (en) Wearable single node feature and the position choosing method of monitoring is fallen down towards open air
Xu et al. Analysis of financial time series using multiscale entropy based on skewness and kurtosis
CN110349373B (en) Behavior recognition method and device based on binary sensor and storage medium
Ashourloo et al. A novel automatic method for alfalfa mapping using time series of Landsat-8 OLI data
CN114732361A (en) Sleep stage prediction method and device based on physiological signals and storage medium
Toda et al. Machine learning-based fall detection system for the elderly using passive RFID sensor tags
CN113377845B (en) Intelligent old-age care data processing method and system based on big data
Karayaneva et al. Unsupervised Doppler radar based activity recognition for e-healthcare
CN111317458A (en) Blood pressure detection system based on deep learning
CN109480852A (en) Sign monitoring method, system, wearable signal collecting device
Sim et al. Activity recognition using correlated pattern mining for people with dementia
CN111816311A (en) State identification method, system and device
CN116842330A (en) Health care information processing method and device capable of comparing histories
CN113208573B (en) Support wearable equipment of PPG + ECG function
Niazmardi et al. Multiple kernel representation and classification of multivariate satellite-image time-series for crop mapping

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant