Human activity detection method, device, readable storage medium and electronic device

By directly converting sensor signals into digital signals through software, the problem of high hardware cost of human body sensing equipment is solved and efficient human activity detection is achieved.

CN116266414BActive Publication Date: 2025-09-12SHENZHEN H&T CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111506146.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-09-12
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

The hardware cost of human body sensing devices in the prior art is relatively high, mainly because the process of converting analog signals into digital signals requires multi-stage operational amplifier circuits.

Method used

The sensing signal received by the sensor is directly converted into a digital signal through software, and the control chip is used to instantly determine whether there is human activity, omitting additional cosmetic filtering circuits and analog-to-digital conversion circuits.

Benefits of technology

The hardware cost is greatly reduced, the external circuit part of the MCU is optimized, and efficient human activity detection is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116266414B_ABST
    Figure CN116266414B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of human body sensing technology, and more specifically to a method, device, readable storage medium, and electronic device for detecting human activity. The method, device, and electronic device provided by the present invention convert sensing signals received by a sensor into digital signals through the software portion of a control chip, and instantly determine whether human activity is currently occurring. This optimizes the external circuitry of the control chip, eliminates the need for additional cosmetic filtering circuits and analog-to-digital conversion circuits, and significantly reduces hardware costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human body detection, and in particular to a method, device, readable storage medium and electronic equipment for detecting human activity. Background Art

[0002] Human body sensing technology is increasingly being used. Passive infrared sensors (PIR) are commonly used to detect moving infrared radiation sources within an area, thereby detecting human motion. When a typical PIR device detects movement, it outputs an analog signal of the person's infrared radiation. This analog signal needs to be converted to a digital signal and sent to a main control chip for subsequent processing. This conversion process is typically performed by circuits, requiring multiple op amps for signal amplification, shaping, and conversion, resulting in high hardware costs for the detection process. Summary of the Invention

[0003] The main technical problem solved by the embodiments of the present invention is to provide a method for detecting human activities, which can solve the problem of high hardware cost in the prior art.

[0004] To solve the above technical problems, a technical solution adopted in an embodiment of the present invention is to provide a method for detecting human activity, the method comprising:

[0005] Acquire a first input signal, and establish a first array based on the first input signal, wherein the first array includes a first preset number of first input signals;

[0006] Calculating an average value of a first preset number of first input signals in the first array to obtain a first average value;

[0007] establishing a second array based on the first average value, the second array including a second preset number of first average values;

[0008] determining whether the first average value in the second array is within a reference range, and establishing a third array according to the determination result;

[0009] Determine whether human activity exists based on the third array.

[0010] Optionally, the calculating an average value of a first preset number of first input signals in the first array, after obtaining the first average value, further includes:

[0011] The execution step obtains a first input signal, establishes a first array based on the first input signal, and calculates an average value of a first preset number of first input signals in the first array until a second preset number of first average values ​​is obtained.

[0012] Optionally, establishing a third array according to the judgment result includes:

[0013] If the first average value is within the reference benchmark range, determining that the state of the first average value is a stable state, and storing the first state value corresponding to the stable state in a third array;

[0014] If the first average value is not within the reference base range, the state of the first average value is determined to be a fluctuation state, and a second state value corresponding to the fluctuation state is stored in a third array.

[0015] Optionally, the method further comprises determining the reference benchmark range,

[0016] Determining the reference benchmark range includes:

[0017] Acquire a second input signal, and establish a cache array based on the second input signal, wherein the cache array includes a first preset number of second input signals;

[0018] Calculating an average value of a first preset number of second input signals in the cache array to obtain a second average value, performing the steps of obtaining a second input signal, establishing a cache array based on the second input signal, and calculating an average value of a first preset number of second input signals in the cache array until a second preset number of second average values ​​is obtained;

[0019] establishing an average array based on the second average value, the average array including the second preset number of second average values;

[0020] calculating an average of the second preset number of second average values ​​in the average array to obtain a third average value;

[0021] The reference datum range is determined based on the third average value.

[0022] Optionally, determining the reference benchmark range based on the third average value includes:

[0023] Determine the deviation value;

[0024] Calculating a sum of the third average value and the deviation value, and using the sum as a maximum value of the reference benchmark range;

[0025] A difference between the third average value and the deviation value is calculated, and the difference is used as the minimum value of the reference datum range.

[0026] Optionally, obtaining the first input signal includes:

[0027] Acquire a sensing signal through a sensor, store the sensing signal in an initial array, and acquire the first input signal based on the initial array;

[0028] Alternatively, a sensing signal is acquired through a sensor, the sensing signal is amplified, and the amplified sensing signal is stored in an initial array, and the first input signal is acquired based on the initial array; wherein the sensing signal is an analog signal.

[0029] In order to solve the above technical problems, another technical solution adopted in the embodiment of the present invention is to provide a human activity detection device, the device comprising:

[0030] a signal acquisition module, configured to acquire a first input signal and establish a first array based on the first input signal, wherein the first array includes a first preset number of first input signals;

[0031] a first calculation module, configured to calculate an average value of a first preset number of first input signals in the first array to obtain a first average value;

[0032] a first processing module, configured to establish a second array based on the first average value, wherein the second array includes a second preset number of first average values;

[0033] a second processing module, configured to determine whether the first average value in the second array is within a reference range, and to establish a third array according to the determination result;

[0034] The activity detection module is configured to determine whether there is human activity based on the third array.

[0035] Optionally, the second processing module includes:

[0036] a first storage unit, configured to determine, if the first average value is within the reference benchmark range, that the state corresponding to the first average value is a stable state, and store a first state value corresponding to the stable state in a third array;

[0037] The second storage unit is configured to determine that the state corresponding to the first average value is a fluctuation state if the first average value is not within the reference benchmark range, and store a second state value corresponding to the fluctuation state in a third array.

[0038] To solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: providing a readable storage medium, which stores a program or instruction, and when the program or instruction is executed by a processor, the above-mentioned human activity detection method is implemented.

[0039] To solve the above technical problems, another technical solution adopted in the embodiment of the present invention is to provide an electronic device, comprising:

[0040] at least one processor;

[0041] a memory communicatively coupled to the at least one processor;

[0042] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the human activity detection method described above.

[0043] Different from the related art, the present invention provides a method, device and electronic device for detecting human activity. The software part of the control chip converts the sensing signal received by the sensor into a digital signal, and instantly determines whether there is human activity at present. The external circuit part of the MCU is optimized, and no additional cosmetic filtering circuit and analog-to-digital conversion circuit are required, which greatly reduces the hardware cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] One or more embodiments are exemplarily illustrated by corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0045] Figure 1 1 is a flow chart of a method for detecting human activity provided by an embodiment of the present invention;

[0046] Figure 2 yes Figure 1 Schematic diagram of sub-processes of the human activity detection method shown;

[0047] Figure 3 is a flow chart of a human activity detection method provided by another embodiment of the present invention;

[0048] Figure 4 yes Figure 3 Schematic diagram of sub-processes of the human activity detection method shown;

[0049] Figure 5 is a flow chart of a human activity detection method provided by another embodiment of the present invention;

[0050] Figure 6 is a flow chart of a human activity detection method provided by another embodiment of the present invention;

[0051] Figure 7 1 is a schematic structural diagram of a human activity detection device provided by an embodiment of the present invention;

[0052] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different module division from the device schematic or in the order in the flow chart.

[0054] Unless otherwise defined, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification are intended solely for the purpose of describing specific embodiments and are not intended to limit the invention. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.

[0055] The embodiment of the present invention provides a method for detecting human activity, which can be used with a human body sensor or other equipment to detect whether there is human activity in the current scene. Figure 1 , the human activity detection method includes:

[0056] S11. Acquire a first input signal, and establish a first array based on the first input signal, where the first array includes a first preset number of first input signals.

[0057] The first input signal can be obtained based on a human body sensing detection device. For example, in a certain scenario, a PIR sensor can be used to collect sensing signals in real time. The acquired sensing signals are stored in an initial array. In an embodiment of the present invention, the initial array is represented by S[n]. The initial array S[n] stores sensing signals s1, s2, s3, ..., sn, whose number increases over time. In other embodiments, the sensing signals collected by the sensor may have low signal strength and need to be amplified by an amplifier circuit. The amplified sensing signals are then stored in the initial array S[n]. The sensing signals are analog signals. The sensing signal stored in the initial array S[n] is the first input signal. The first input signal is obtained from the initial array S[n], and a first array is established based on the obtained first input signal. Specifically, in the embodiment of the present invention, the first array is represented by A[n]. A first preset number n of continuous first input signals are obtained from the initial array, and the first input signals in the array S[n] are respectively assigned to the array A[n], for example, a1=s1, a2=s2, ..., an=sn, wherein the value of the first preset number n can be set by the user. For example, n is 10, and 10 continuous first input signals are taken from the initial array S[n] and stored in the first array A[n] respectively, and A[n] contains a1, a2...a10. Since the data in the array S[n] is updated in real time over time, that is, the number of first input signals stored in the array S[n] is continuously increasing, in the process of subsequent data processing, in order to avoid the subsequent calculation results being affected by the data in S[n] being rewritten, the embodiment of the present invention chooses to cache the first input signal used for calculation into the array A[n] to obtain the first input signal within the corresponding time period, and perform subsequent calculations based on the data in the array A[n]. It should be noted that in some other embodiments, the process of assigning values ​​from the initial array S[n] to the first array A[n] may not be continuous, but may be equal intervals, such as a1=s1, a2=s3, a3=s5...a10=s19, or other suitable value-taking methods, which are not limited here.

[0058] S12. Calculate an average value of a first preset number of first input signals in the first array to obtain a first average value.

[0059] The first input signals stored in the first array A[n] are averaged. For example, the first array A[n] contains 10 first input signals, and the average of these 10 first input signals is calculated as the first average value. Each first array A[n] may correspond to a first average value, which is recorded as the first average value b in the embodiment of the present invention.

[0060] S13. Establish a second array based on the first average value, wherein the second array includes a second preset number of first average values. In the embodiment of the present invention, the second array is recorded as array B[n]. The data in B[n] includes a second preset number m of first average values ​​b, that is, the data in a first array A[n] is averaged to be the first average value b. Assuming m is 5, five consecutive first arrays A1[n], A2[n], A3[n], A4[n] and A5[n] are obtained, and then the first average values ​​corresponding to each first array are calculated and stored in the second array B[n]. That is, the array B[n] contains b1, b2, b3, b4 and b5, b1 is the average value of (a1+a2+a3…+an) / n in A1[n], b2 is the average value of (a1+a2+a3…+an) / n in A2[n], and the same applies to b3, b4 and b5. Specifically, in one embodiment, after executing the above step S12, the first first array A1[n] is obtained, and the average value of the data in A1[n] is calculated as the first average value b1, and steps S11 and S12 are continued to be executed to obtain the second first array A2[n], and the first average value b2 corresponding to A2[n] is calculated, and steps S11 and S12 are repeated until the first average value bm corresponding to Am[n] is obtained, and the second array B[n] is established based on the first average values ​​b1, b2, ..., bm, and the second array B[n] contains m data, namely b1, b2, b3 ... bm.

[0061] S14, determine whether the first average value in the second array is within the reference range, and create a third array based on the determination result. Figure 2 , said establishing a third array according to the judgment result includes:

[0062] S141: Determine whether the first average value in the second array is within a reference range. If so, execute step S142; if not, execute step S143. Specifically:

[0063] S142: If the first average value is within the reference benchmark range, determine that the state corresponding to the first average value is a stable state, and store the first state value corresponding to the stable state in a third array.

[0064] S143: If the first average value is not within the reference benchmark range, determine that the state corresponding to the first average value is a fluctuation state, and store a second state value corresponding to the fluctuation state in a third array.

[0065] In this embodiment of the present invention, the third array is denoted as C[n]. The data stored in array C[n] are state values ​​corresponding to the states, including a first state value corresponding to the stable state and a second state value corresponding to the fluctuating state. The first state value can be denoted as FALSE, and the second state value can be denoted as TRUE. In other embodiments, the first state value and the second state value can be set by the user, for example, the first state value can be denoted as 1, the second state value can be denoted as 0, and so on.

[0066] See also Figure 3 In some embodiments, the human activity detection method further includes step S16, determining the reference reference range. Step S16 is performed before step S14. The reference reference range is used to help determine the state corresponding to the first average value. The state corresponding to the first average value includes a stable state and a fluctuating state. Specifically, determining the reference reference range includes:

[0067] S161. Obtain a second input signal and establish a cache array based on the second input signal, the cache array including a first preset number of second input signals. In this embodiment of the present invention, the cache array is denoted as A'[n], and A'[n] stores a first preset number n of second input signals a'. The second input signals a' may also be obtained based on the initial array S[n].

[0068] S162. Calculate the average value of the first preset number of second input signals in the cache array to obtain a second average value. Execute the steps to obtain the second input signal, establish a cache array based on the second input signal, and calculate the average value of the first preset number of second input signals in the cache array until a second preset number of second average values ​​is obtained. Calculate the average value based on the second input signals in the cache array A'[n]. For example, when n is 10, the cache array A'[n] contains 10 second input signals. The average value of these ten second input signals is calculated as the second average value. Each cache array A'[n] can correspond to a second average value, which is recorded as the second average value b' in the embodiment of the present invention. When executing the above steps, continuously obtain multiple cache arrays and calculate the second average values ​​corresponding to these cache arrays until a second average value b' of a second preset number m is obtained. Assuming m is 5, obtain five consecutive cache arrays A'1[n], A'2[n], A'3[n], A'4[n], and A'5[n], and then calculate the corresponding second average values ​​b'1, b'2, b'3, b'4, and b'5, respectively.

[0069] S163. Establish an average array based on the second average value, the average array including the second preset number of second average values. In this embodiment of the present invention, the average array is denoted as B'[n]. B'[n] includes a second preset number m of second average values. Assuming m is 5, the five second average values ​​are b'1, b'2, b'3, b'4, and b'5, respectively.

[0070] S164. Calculate the average of the second preset number of second average values ​​in the average array to obtain a third average value. A third average value obtained by averaging the second average values ​​in the average array B'[n] is recorded as limit. When the PIR sensor collects sensing signals in real time, the average array B'[n] for the corresponding time period can be obtained in real time based on the sensing signals. The third average value is calculated based on the average array B'[n]. The third average value limit is updated in real time based on a chronological order.

[0071] S165: Determine the reference range based on the third average value. Figure 4 The determining of the reference range based on the third average value specifically includes:

[0072] S1651. Determine a deviation value. In an embodiment of the present invention, the deviation value may be denoted as d. The deviation value d may be set arbitrarily. The magnitude of the deviation value d is related to the detection accuracy required in actual situations. In actual use, the deviation value d may be determined based on the use environment. If the actual detection environment requires a higher detection accuracy, a smaller deviation value may be set; if the actual detection environment requires a lower detection accuracy, a larger deviation value may be set.

[0073] S1652: Calculate the sum of the third average value and the deviation value, and use the sum as the maximum value of the reference reference range. In this embodiment of the present invention, the maximum value of the reference reference range can be recorded as limit+d.

[0074] S1653: Calculate the difference between the third average value and the deviation value, and use the difference as the minimum value of the reference datum range. In this embodiment of the present invention, the minimum value of the reference datum range can be recorded as limit-d.

[0075] In step S14, it is determined whether the first average value in the second array is within the reference range, and a third array is established based on the determination result. Taking the three first average values ​​b1, b2, and b3 as an example, specifically: assuming that the first average value b1 is greater than limit+d, the state corresponding to the first average value b1 is determined to be a fluctuating state, and the second state value TRUE corresponding to b1 is recorded in the third array C[n], recorded as c1=TRUE; assuming that the first average value b2 is less than limit+d and the first average value b2 is greater than limit-d, the state corresponding to the first average value b2 is determined to be a stable state, and the first state value FALSE corresponding to b2 is recorded in the third array C[n], recorded as c2=FALSE; assuming that the first average value b3 is less than limit-d, the state corresponding to the first average value b3 is determined to be a fluctuating state, and the second state value TRUE corresponding to b3 is recorded in the third array C[n], recorded as c3=TRUE. At this point, the third array C[n] includes three data, namely FALSE, TRUE, and FALSE. The third array C[n] continuously acquires status value data until a third preset number p of status value data is acquired. At this point, the third array is established, and the established third array includes the third preset number p of status value data.

[0076] S15. Determine whether human activity exists based on the third array. When the third array C[n] stores a third preset number p of state value data, determine whether human activity exists based on the number of FALSE and TRUE values ​​in the third array C[n]. Read the state value data in the third array C[n] sequentially to detect whether a second state value of TRUE exists, until a fourth preset number q of state value data is read. If any of these state value data contain the second state value of TRUE, human activity exists. If all of these state value data contain the first state value of FALSE, human activity does not exist.

[0077] See also Figure 5 and Figure 6An embodiment of the present invention provides a method for detecting human activity. First, a first input signal a is collected in real time starting from a selected moment, and the collected first input signal a is stored in a first array A[n] in the order of the collection time until the first array A[n] is full. When a first array is full, the first input signal a is continuously collected and stored in the next first array. Each first array A[n] contains n data. Then, a first average value b corresponding to the first array A[n] is calculated. Each first array A[n] has a corresponding first average value b. These calculated first average values ​​b are stored in a second array B[n] in the order of time. The second array B[n] contains m first average values ​​b. At this time, a third average value limit can be calculated based on the m first average values ​​b in the current B[n], and a reference reference range is determined in combination with a deviation value. The reference reference range is used to determine the state corresponding to the next first average value b, including a stable state and a fluctuating state. It should be noted that when determining the state corresponding to a particular first average value b, the reference range used is calculated based on the first average values ​​b preceding that first average value b. Therefore, when determining the state corresponding to the first average value b, different first average values ​​b may be compared with different reference ranges to determine the state corresponding to the first average value b. A third array C[n] is then established based on the state corresponding to the first average value b. The third array C[n] contains p pieces of state value data. The state value data are digital signals representing the state corresponding to the corresponding first average value b, including a first state value and a second state value.

[0078] Please combine Figure 6 , based on the state value data in the third array C[n], it is determined whether there is human activity. If the third array C[n] contains the second state value, it indicates that there is human activity at present; if the third array C[n] contains the first state value, it indicates that there is no human activity at present. It should be noted that the method includes a process of real-time data collection. The first array A[n], the second array B[n] and the third array C[n] all change in sequence over time. For example, if the third array C1[n] obtained in a first time period contains the first state value, it indicates that there is no human activity in the first time period; if the third array C2[n] obtained in a second time period after the first time period contains the second state value, it indicates that there is human activity in the second time period.

[0079] The human activity detection method provided by the embodiment of the present invention does not require a multi-stage operational amplifier circuit to process the sensing signal, and the detection result can be obtained directly through software recognition. Compared with the traditional method of processing the sensing signal through a filtering and shaping circuit, then converting the sensing signal into a digital signal through an analog-to-digital conversion circuit, and then analyzing the digital signal through the software part of the MCU to obtain the detection result, this solution can directly convert the sensing signal received by the sensor into a digital signal through the software part of the MCU, and instantly determine whether there is human activity at present, thereby optimizing the external circuit part of the MCU, eliminating the need for additional shaping filtering circuits and analog-to-digital conversion circuits, and reducing hardware costs.

[0080] The embodiment of the present invention provides a human activity detection device 300, please refer to Figure 7 , the human activity detection device 300 includes:

[0081] A signal acquisition module 31 is configured to acquire a first input signal and establish a first array based on the first input signal, the first array including a first preset number of first input signals. The first input signal can be acquired based on a human body sensing detection device, using a PIR sensor to collect sensing signals in real time. In some embodiments, the sensing signals collected by the sensor may have low signal strength, necessitating amplification processing by an amplifier circuit to obtain the first input signal based on the sensing signals.

[0082] The first calculation module 32 is configured to calculate an average value of a first predetermined number of first input signals in the first array to obtain a first average value. The average value is calculated for the first input signals stored in the first array. For example, if the first array contains 10 first input signals, the average value of these 10 first input signals is calculated as the first average value. Each first array corresponds to a first average value.

[0083] The first processing module 33 is configured to establish a second array based on the first average values, wherein the second array includes a second predetermined number of first average values. It should be noted that when establishing the second array based on the first average values, the first average values ​​are sequentially stored in the second array in chronological order.

[0084] The second processing module 34 is used to determine whether the first average value in the second array is within the reference benchmark range, and establish a third array based on the judgment result, wherein the second processing module 34 also includes a first storage unit 341 and a second storage unit 342. Specifically, if the first average value is within the reference benchmark range, the first storage unit 341 is used to determine that the state corresponding to the first average value is a stable state, and store the first state value corresponding to the stable state to the third array; if the first average value is not within the reference benchmark range, the second storage unit 342 is used to determine that the state corresponding to the first average value is a fluctuating state, and store the second state value corresponding to the fluctuating state to the third array.

[0085] Activity detection module 35 is configured to determine whether human activity exists based on the third array. When the third array is full, the module detects the state value data in the third array. This includes sequentially reading the state value data in the third array and detecting whether a second state value exists until a fourth predetermined number of state value data is read. If the second state value exists in the state value data, human activity exists; if all the state value data are the first state value, human activity does not exist.

[0086] It should be noted that the above-mentioned human activity detection device can implement the human activity detection method provided in the embodiments of the present invention and has the corresponding functional modules and beneficial effects of the method. For technical details not fully described in the embodiments of the human activity detection device, please refer to the human activity detection method provided in the embodiments of the present invention.

[0087] An embodiment of the present invention provides an electronic device, see Figure 8 The electronic device 500 includes one or more processors 51 and a memory 52. Figure 8 A processor 51 is taken as an example. The processor 51 and the memory 52 may be connected via a bus or other means. Figure 8 The bus connection is taken as an example.

[0088] The memory 52 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules corresponding to the human activity detection method in the embodiment of the present invention (for example, Figure 7 The processor 51 executes various functional applications and data processing of the electronic device 500 by running the non-volatile software program, non-volatile computer executable program and modules stored in the memory 52, that is, implements the human activity detection method in the above method embodiment.

[0089] The memory 52 may include a program storage area and a data storage area. The program storage area may store an operating system and applications required for at least one function; the data storage area may store data generated based on the use of the human activity detection device. Furthermore, the memory 52 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 52 may optionally include a memory remotely located relative to the processor 51. Such remotely located memory may be connected to the human activity detection device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0090] The one or more modules are stored in the memory 52 and, when executed by the one or more processors 51, perform the human activity detection method in the above method embodiment, for example, Figures 1 to 4 The method shown.

[0091] The above-mentioned product can execute the human activity detection method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the human activity detection method. For technical details not fully described in this embodiment, please refer to the human activity detection method provided by the embodiment of the present invention.

[0092] The electronic device 500 of the embodiment of the present invention may exist in various forms, including but not limited to servers, server clusters, cloud servers, and other electronic devices with data interaction functions.

[0093] The embodiment of the present invention further provides a readable storage medium, wherein the readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example Figure 8 A processor 51 in the embodiment may enable the one or more processors to execute the human activity detection method in any of the above method embodiments.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Under the idea of ​​the present invention, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above. For the sake of simplicity, they are not provided in detail. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for detecting human activity, characterized in that: The method comprises: Acquire a first input signal, and establish a first array based on the first input signal, wherein the first array includes a first preset number of first input signals; Calculating an average value of a first preset number of first input signals in the first array to obtain a first average value; establishing a second array based on the first average value, the second array including a second preset number of first average values; determining whether the first average value in the second array is within a reference range, and establishing a third array according to the determination result; Determining whether there is human activity based on the third array; The establishing of the third array according to the judgment result includes: If the first average value is within the reference benchmark range, determining that the state corresponding to the first average value is a stable state, and storing the first state value corresponding to the stable state in a third array; If the first average value is not within the reference benchmark range, determining that the state corresponding to the first average value is a fluctuation state, and storing a second state value corresponding to the fluctuation state in a third array; The method further includes determining the reference reference range, wherein determining the reference reference range includes: acquiring a second input signal and establishing a buffer array based on the second input signal, wherein the buffer array includes a first preset number of second input signals; Calculating an average value of a first preset number of second input signals in the cache array to obtain a second average value, performing the steps of obtaining a second input signal, establishing a cache array based on the second input signal, and calculating an average value of a first preset number of second input signals in the cache array until a second preset number of second average values ​​is obtained; establishing an average array based on the second average value, the average array including the second preset number of second average values; calculating an average of the second preset number of second average values ​​in the average array to obtain a third average value; The reference datum range is determined based on the third average value.

2. The method according to claim 1, characterized in that The method of calculating the average value of the first preset number of first input signals in the first array, after obtaining the first average value, further includes: The execution step obtains a first input signal, establishes a first array based on the first input signal, and calculates an average value of a first preset number of first input signals in the first array until a second preset number of first average values ​​is obtained.

3. The method according to claim 1, characterized in that Determining the reference range based on the third average value includes: Determine the deviation value; Calculating a sum of the third average value and the deviation value, and using the sum as a maximum value of the reference benchmark range; A difference between the third average value and the deviation value is calculated, and the difference is used as the minimum value of the reference datum range.

4. The method according to claim 1, wherein The acquiring of the first input signal comprises: Acquire a sensing signal through a sensor, store the sensing signal in an initial array, and acquire the first input signal based on the initial array; Alternatively, a sensing signal is acquired through a sensor, the sensing signal is amplified, and the amplified sensing signal is stored in an initial array, and the first input signal is acquired based on the initial array; wherein the sensing signal is an analog signal.

5. A human activity detection device, characterized in that: The device comprises: a signal acquisition module, configured to acquire a first input signal and establish a first array based on the first input signal, wherein the first array includes a first preset number of first input signals; a first calculation module, configured to calculate an average value of a first preset number of first input signals in the first array to obtain a first average value; a first processing module, configured to establish a second array based on the first average value, wherein the second array includes a second preset number of first average values; a second processing module, configured to determine whether the first average value in the second array is within a reference range, and to establish a third array according to the determination result; an activity detection module, configured to determine whether there is human activity based on the third array; The second processing module includes: a first storage unit, configured to determine that the state of the first average value is a stable state if the first average value is within the reference benchmark range, and store a first state value corresponding to the stable state in a third array; a second storage unit, configured to determine that the state of the first average value is a fluctuation state if the first average value is not within the reference benchmark range, and store a second state value corresponding to the fluctuation state in a third array; Determining the reference benchmark range includes: obtaining a second input signal and establishing a cache array based on the second input signal, the cache array including a first preset number of second input signals; calculating the average value of the first preset number of second input signals in the cache array to obtain a second average value, executing the steps of obtaining the second input signal and establishing a cache array based on the second input signal, calculating the average value of the first preset number of second input signals in the cache array until a second preset number of second average values ​​is obtained; establishing an average array based on the second average value, the average array including the second preset number of second average values; calculating the average value of the second preset number of second average values ​​in the average array to obtain a third average value; and determining the reference benchmark range based on the third average value.

6. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

7. An electronic device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Human body movement acquisition method, electronic device and computer readable storage medium

    CN108332361A

  • Human body health state detection method and device, equipment and storage medium

    CN113633271A