CN109996203B - Method and device for configuring sensor, electronic equipment and computer readable storage medium - Google Patents

Method and device for configuring sensor, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN109996203B
CN109996203B CN201810002816.6A CN201810002816A CN109996203B CN 109996203 B CN109996203 B CN 109996203B CN 201810002816 A CN201810002816 A CN 201810002816A CN 109996203 B CN109996203 B CN 109996203B
Authority
CN
China
Prior art keywords
sensor
time
data
state
target
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
CN201810002816.6A
Other languages
Chinese (zh)
Other versions
CN109996203A (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.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201810002816.6A priority Critical patent/CN109996203B/en
Publication of CN109996203A publication Critical patent/CN109996203A/en
Application granted granted Critical
Publication of CN109996203B publication Critical patent/CN109996203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information

Abstract

The invention discloses a method and a device for configuring a sensor, electronic equipment and a storage medium. The method comprises the following steps: recording data of at least one sensor capable of recognizing a moving object based on infrared light; receiving a configuration instruction, detecting a state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length; associating the sensor identification of the target sensor with the location identification of the area.

Description

Method and device for configuring sensor, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a method and an apparatus for configuring a sensor, an electronic device, and a computer-readable storage medium.
Background
Currently, the configuration method of the ID of the sensor mainly includes: means input, code scanning, near field communication, built-in and the like. The manual input is to manually input the ID of the sensor through an application APP on the mobile phone. The code scanning mode is to scan a bar code or a two-dimensional code through a mobile phone to obtain the ID of the sensor. The near field communication is to read the ID from the sensor by using a mobile phone or a dedicated device in a near field communication manner. The internal is fixed and built in a Read Only Memory (ROM) at the time of shipment.
The several modes have defects, such as manual input, complex user operation, a code scanning mode requiring that the sensor is printed with a bar code at an obvious position and cannot be damaged, a near field communication mode requiring that the sensor is designed with a special component for support, power consumption and cost are increased, and a built-in mode is very inconvenient for replacing the sensor.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable storage medium for configuring a sensor, which can automatically determine a sensor identifier of a sensor in an appointed environmental space, configure the appointed sensor, do not need to specially print a two-dimensional code or add a sensor component, and can conveniently replace the sensor.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a method for configuring a sensor, which comprises the following steps:
recording data of at least one sensor capable of identifying moving objects based on infrared light;
receiving a configuration instruction, detecting state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length;
Associating the sensor identification of the target sensor with the location identification of the area.
In the foregoing solution, the detecting a state change of the data of the at least one sensor within a statistical time period, and determining the target sensor according to the state change includes:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In the foregoing solution, the detecting a state change of the data of the at least one sensor within a statistical time period, and determining the target sensor according to the state change includes:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In the foregoing solution, the method further includes:
and acquiring the delay time of the target sensor, and taking the delay time as the set time threshold.
In the foregoing solution, the method further includes:
detecting the number of the target sensors;
and when the number is not matched with the set number range, performing configuration failure reminding.
The embodiment of the invention also provides a device for configuring the sensor, which comprises: the device comprises a recording unit, a detection unit and a correlation unit; wherein the content of the first and second substances,
the recording unit is used for recording data of at least one sensor, and the sensor can identify a moving object based on infrared rays;
the detection unit is used for receiving a configuration instruction, detecting the state change of the data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is positioned in the area indicated by the configuration instruction in the space environment and detects a detection object within the statistical time length;
the association unit is used for associating the sensor identifier of the target sensor with the position identifier of the area.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: a processor, a memory; the memory having stored thereon a computer program operable on the processor;
Wherein the processor is configured to, when running the computer program, perform:
recording data of at least one sensor capable of recognizing a moving object based on infrared light;
receiving a configuration instruction, detecting a state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length;
associating the sensor identification of the target sensor with the location identification of the area.
In the foregoing solution, when the processor is configured to run the computer program, the detecting a state change of the data of the at least one sensor within a statistical time duration, and determining the target sensor according to the state change includes:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In the foregoing solution, when the processor is configured to run the computer program, the detecting a state change of the data of the at least one sensor within a statistical time duration, and determining the target sensor according to the state change includes:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In the foregoing solution, when the processor is configured to run the computer program, the processor further executes:
and acquiring the delay time of the target sensor, and taking the delay time as the set time threshold.
In the foregoing solution, when the processor is configured to run the computer program, the processor further executes:
detecting the number of the target sensors;
and when the number is not matched with the set number range, performing configuration failure reminding.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any of the above methods.
According to the method, the device, the electronic equipment and the computer-readable storage medium for configuring the sensors, provided by the embodiment of the invention, the target sensors which are located in the area of the target space environment and detect the detection object are determined through analyzing the data of each sensor within the recorded statistical duration, and the sensor identifications of the target sensors are associated with the position identifications of the target space area, so that the position distribution configuration of the target sensors is realized; therefore, the sensor identification of the target sensor can be automatically identified through the analysis of the data of each sensor, a two-dimensional code does not need to be specially printed, or a sensor assembly does not need to be added, and the sensor can be conveniently replaced.
Drawings
In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. The drawings illustrate generally, by way of example, but not by way of limitation, various embodiments discussed herein.
FIG. 1 is a schematic flow chart of a method for configuring a sensor according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a networking architecture according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of information interaction of a configuration sensor according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a change in data state of various sensors according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the invention;
FIG. 6 is a first schematic structural diagram of a sensor-equipped apparatus according to an embodiment of the present invention;
fig. 7 is a second schematic structural diagram of a sensor-equipped device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
In an embodiment of the invention, data is recorded for at least one sensor capable of identifying moving objects based on infrared; receiving a configuration instruction, detecting state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length; associating the sensor identification of the target sensor with the location identification of the area.
According to the scheme of the embodiment of the invention, the target sensor which is positioned in the area of the target space environment and detects the detection object is determined through analyzing the data of each sensor within the recorded statistical duration, and the sensor identifier of the target sensor is associated with the position identifier of the target space area, so that the position distribution configuration of the target sensor is realized; therefore, the sensor identification of the target sensor can be automatically identified through the analysis of the data of each sensor, the special printing of a two-dimensional code or the addition of a sensor assembly is not needed, and the sensor can be conveniently replaced.
An embodiment of the present invention provides a method for configuring a sensor, as shown in fig. 1, the method includes:
step 101, recording data of at least one sensor;
the sensor can identify moving objects based on infrared, such as: pyroelectric Infrared (PIR) sensors. In the intelligent home network, one or more sensors are connected with a control platform through a sensor gateway, wherein the control platform can be a sensor platform or a control terminal, and the control platform can also comprise a platform and a control terminal. When the sensor gateway accesses multiple sensors, the multiple sensors may be distributed in different spatial regions.
When the sensor which is accessed to the sensor gateway, the state of the sensor is reported to the sensor gateway, and the data of each sensor is recorded based on the state reported by the sensor. When recording data of each sensor, data of different sensors are distinguished by sensor marks of each sensor. When a sensor detects a moving object based on infrared recognition, reporting the state of the sensor to the sensor gateway again, wherein the reported state is the state corresponding to the object which detects the movement.
102, receiving a configuration instruction, detecting the state change of the data of the at least one sensor within the statistical time length based on the configuration instruction, and determining a target sensor according to the state change;
the target sensor is located in the area indicated by the configuration instruction in the space environment and detects a detection object within the statistical time length.
Here, the area indicated by the configuration instruction in the spatial environment where the target sensor is located is referred to as a target spatial area, and when the sensor identifier of the target sensor located in the target spatial area needs to be known and the target sensor is configured, the control platform or the sensor gateway receives the configuration instruction based on the configuration operation of the user on the control platform or the sensor gateway, and detects data of each sensor recorded in the system time length based on the configuration instruction.
Upon receiving the configuration instruction, a location identification of the target spatial region may be received based on the configuration instruction. Specifically, a user may perform a sensor configuration operation by configuring a display interface of an application. And when receiving a configuration instruction generated based on the configuration operation, the control platform or the sensor gateway generates the configuration instruction based on the position identification of the target space region input or selected by the user. The step of receiving the location identification of the target spatial region may be performed during the sensor configuration operation, or may be performed before or after the sensor configuration operation.
The location identifier may be manually input based on the target spatial region, selected from a preset region distribution list, or determined according to currently located location information. Such as: when the target sensor is a sensor of a kitchen, the location identifier "kitchen" may be directly inputted, or may be selected from a location area distribution list including a kitchen, a living room, and a bedroom, and when the location identifier of the target sensor is selected through the location area distribution list, the location identifier may be "kitchen" or may be other identifiers corresponding to the kitchen, which are used for characterizing the kitchen. Such as: location identifier 00 represents a kitchen, location identifier 01 represents a living room, and location identifier 11 represents a bedroom, and when the user selects the location area of the target sensor as the kitchen, the current location identifier can be determined as: 00.
the states of the data of each sensor include a first state and a second state, the first state corresponds to a state when the sensor does not detect the detection object, and the second state corresponds to a state when the sensor detects the detection object, wherein the first state and the second state can be represented by different state identifiers, such as: the first state is represented as 0 and the second state is represented as 1. In the embodiment of the present invention, the first state and the second state are not limited in their expression modes.
The detection object may be an object having a temperature such as the user himself (operation user) who performs the sensor arrangement operation, a user other than the operation user, or the like, and the target sensor detects the detection object when the detection object moves within the effective distance of the target sensor. The detection object can be detected by the target sensor by approaching, departing, waving, or the like.
When the target sensor detects the detection object, the state of the target sensor is changed from the first state to the second state. When the target sensor detects the detection object at a first time, the target sensor data is converted from the first state to the second state at the first time.
The data of each sensor differs depending on whether or not a state change over time of the detection object is detected. The state of data of the sensor not detecting the detection object is maintained in the first state, and the state change is maintained, and the state change of data of the target sensor as the sensor detecting the detection object is: the target sensor is switched from the first state to the second state at the first time, and the target sensor is maintained in the second state for a certain time period, wherein the time period maintained in the second state can be the sum of the time period for triggering the target sensor by the detection object and the time delay time period of the sensor.
In some embodiments, detecting a change in state of the data of the at least one sensor over the statistical time period, and determining the target sensor based on the change in state specifically includes: detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In some embodiments, detecting a change in state of the data of the at least one sensor over the statistical time period, and determining the target sensor based on the change in state specifically includes: determining a second time to begin detecting data of the at least one sensor; when the first time is less than the second time, determining data which is in a second state at the second time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor; the target sensor detects the detection object at the first time.
In some embodiments, a state change rule may be set, and when data of a sensor meets the set state change rule, the data is determined to be data of the target sensor. The state change rule may be: and switching from the first state to the second state at the first time, wherein the duration of the second state is greater than the set time threshold, or the second state is at the second time, and the duration of the second state is greater than the set time threshold. The first time is the time when the target sensor detects the detection object, and the second time is the time when the detection data starts, namely the starting time of the statistical duration.
In some embodiments, when determining the statistical time duration, obtaining a time delay duration of the target sensor, and using the time delay duration as the set time duration threshold.
In some embodiments, the target is obtainedTime delay t of IPR sensordDetermining the statistical time t according to the delay timesWherein, ts>2td
And 103, associating the sensor identifier of the target sensor with the position identifier of the area.
After the target sensor is determined, determining a sensor identifier of the target sensor and a position identifier of an area, indicated by the configuration instruction, of the target sensor in the spatial environment, and associating the determined sensor identifier with the position identifier. The sensor identification may be a sensor ID or the like that identifies the sensor.
In some embodiments, after determining the target sensors, detecting a number of the target sensors; and when the number is not matched with the set number range, performing configuration failure reminding. The number range can be set according to the actual requirements of the user, such as: and if the number is more than 1 or less than 1, namely, if the number is more than 1 or less than 1, performing configuration failure reminding.
Here, when the set number range is greater than 1 or less than 1, and the target sensor determined according to the state change of the data includes a plurality of sensors, it is not possible to logically determine which sensor identifier the target sensor specifically belongs to, which indicates that the configuration is failed, and perform the configuration failure notification, where the configuration failure notification may include sending a configuration failure notification message, not responding, and the like, and the specific notification manner is not limited. And when the number is 1, determining that the configuration is successful, and determining the sensor identifier of the target sensor, wherein at the moment, reminding of successful configuration can be carried out.
It should be noted that, in the embodiment of the present invention, the method for configuring a sensor may be applied to a sensor gateway, may be applied to a control platform, and may also be applied to a system formed by the sensor gateway and the control platform.
When the method is applied to the sensor gateway, the data reported by each sensor can be recorded through the sensor gateway, the reported data is analyzed and detected when a configuration instruction is received, the sensor identification of the target sensor is determined, and the sensor identification of the target sensor and the position identification of the target space area are associated to realize the configuration of the sensor through the sensor gateway.
When the method is applied to the control platform, the sensor gateway transmits messages between the sensors and the control platform, and each sensor transmits data reported by each sensor to the control platform through the sensor gateway; and when the control platform receives the configuration instruction, analyzing the received data to determine the sensor identifier of the target sensor, and associating the sensor identifier of the target sensor with the position identifier of the target space region to realize the configuration of the sensor through the control platform.
When the method is applied to the sensor gateway and the control platform, the configuration of the sensor is realized through the cooperation of the controllable platform of the sensor gateway, such as: the sensor gateway records data reported by each sensor, when the control platform receives a configuration instruction, the configuration instruction is sent to the sensor gateway, the sensor gateway analyzes the recorded data when receiving the configuration instruction, the sensor identifier of the target sensor is determined, the determined sensor identifier is sent to the control platform, and the sensor identifier of the target sensor and the position identifier of the target space area are associated by the control platform.
According to the method for configuring the sensors, provided by the embodiment of the invention, the target sensors which are positioned in the area of the target space environment and detect the detection object are determined through analyzing the data of each sensor within the recorded statistical duration, and the sensor identifications of the target sensors are associated with the position identifications of the target space area, so that the position distribution configuration of the target sensors is realized; therefore, the sensor identification of the target sensor can be automatically identified through the analysis of the data of each sensor, a two-dimensional code does not need to be specially printed, or a sensor assembly does not need to be added, and the sensor can be conveniently replaced.
Meanwhile, when a data reporting instruction is sent to one sensor, whether the sensor is effective or not can be judged according to the received state change of the data of the sensor, and the judgment on the effectiveness of the sensor is realized.
The invention is described in more detail below with reference to an application example.
The system networking of this application embodiment is as shown in fig. 2, and three PIR sensors are distributed and installed in the indoor frequent activity area of family: kitchen, living room and bedroom, which are used for detecting the location area where the indoor user is located, and each PIR sensor reports its trigger information and its own ID to the sensor gateway through a low-power wireless communication network (such as zigbee). The sensor gateway comprehensively analyzes and processes data of each PIR sensor to obtain a result required by a service function, and can perform bidirectional communication (such as result reporting and instruction receiving) with the platform through a wide area network (such as optical fiber, network cable, WIFI and the like). The handset APP may communicate with the platform bi-directionally over a wide area network such as 4G, WIFI.
In the embodiment of the application, kitchen PIRs are configured through a terminal in a network structure of a mobile phone (control terminal), a platform, a sensor gateway and the PIR sensors, so that the kitchen corresponding position identifications are associated with PIR sensor identifications of PIR sensors distributed in a kitchen. This method of configuring a PIR sensor is shown in figure 3,
301, a sensor gateway records data of each PIR sensor;
and after each PIR is accessed to the sensor gateway, the sensor gateway records data of each PIR sensor. When a sensor does not detect a moving object, the state of the corresponding data is a first state, and when the sensor detects a moving object, the state of the corresponding data is converted into a second state,
step 302, the mobile phone sends a configuration instruction to the sensor gateway;
different position area configuration buttons are arranged on the APP interface of the mobile phone, when a user clicks the configuration button corresponding to the kitchen, a configuration instruction carrying a kitchen position identifier is generated, and the configuration instruction is sent to the sensor gateway.
And after receiving the configuration instruction, the sensor gateway enters a 'kitchen PIR sensor configuration' state, and starts to detect the state change of each PIR sensor in the following N seconds based on the configuration instruction.
Step 303, prompting a user to trigger a PIR sensor in a kitchen by the mobile phone;
specifically, the mobile phone prompts a user to trigger a PIR sensor located in a kitchen through a display interface, and the user triggers the PIR sensor in the kitchen according to prompt operation. At this time, each PIR sensor keeps reporting data to the sensor gateway normally.
And step 304, the sensor gateway analyzes the state change of the data of each PIR sensor within N seconds to determine the ID of the kitchen PIR sensor.
And after the sensor gateway receives the data reporting instruction for N seconds, namely after receiving the data of each PIR sensor for N seconds, analyzing the state changes of all the PIR sensors within the recorded N seconds to obtain the ID of the PIR sensor in the kitchen. The sensor gateway executes step 305 according to whether the ID of the kitchen PIR sensor is analyzed, the sensor gateway informs whether the mobile phone configuration is successful, and at the moment, the mobile phone APP interface prompts a user whether the setting is successful according to the received notice.
A specific scheme of analyzing the data state changes of all PIR sensors within N seconds in S304 is as follows, where 0 is the first state and 1 is the second state.
Fig. 4, a-F, are 6 possible cases of data for three PIR sensors.
The most ideal situation is that only one PIR sensor is triggered within N seconds, i.e. has a rising edge from 0 to 1. However, the actual situation is disturbed by a number of factors, such as: when a user clicks a setting button while walking, the PIR sensor is in a state of 1 before the user clicks the setting button; if the two adjacent areas are closer, and meanwhile, a certain delay exists when the PIR sensor is normally switched from 1 to 0, other non-target PIR sensors are in a state of 1 within N seconds.
As shown in fig. 4, fig. 4A shows the most ideal case, and the target PIR is triggered after the user clicks the button; FIG. 4B shows a situation where the target PIR has been triggered before the user clicks the button; FIG. 4C shows a situation where the non-target PIR remains in a state of 1 for a while after the user clicks the button due to the delay from 1 to 0 of the sensor; FIG. 4D illustrates a situation in which there is a non-target sensor with a one-time false trigger of interference; FIG. 4E shows a case where all PIRs are not triggered; figure 4F shows a situation where 2 or more PIRs are actively triggered. In the above case: fig. 4A, 4B, 4C, and 4D show the case where the kitchen PIR can be successfully configured, and fig. 4E and 4F show the case where the configuration fails.
It should be noted that, in this application example, the analysis time (statistical duration) of the sensor gateway, i.e. N seconds, should be longer than the delay time of 1 to 0 of the PIR sensor, and may be generally designed to be 2 times or more, and if the delay time is 5 seconds, N may be set to be 10 seconds; then, counting the states of all PIR sensors within N being 10 seconds, calculating the number of the PIR sensors with the total time length of the PIR sensors being 1 being more than 5 seconds in the time of 10 seconds, if the total time length is only one, identifying the PIR sensor as a target PIR sensor to be configured, and if the total time length is more than 1 or 0, failing to configure the flow.
It should be noted that, a platform is not shown in fig. 3, and the platform only provides a data forwarding service to establish a data interaction channel between the mobile phone APP and the sensor gateway.
In practical application, the sensor gateway is particularly responsible for calculating tasks to realize service functions such as indoor position identification and the like; the service functions can also be realized by the control platform, and at the moment, the sensor gateway only conducts data transmission. These two schemes differ only in the specific carrier of the computational task.
In the embodiment of the application, aiming at the characteristic that the PIR sensor can detect indoor human body activity, the user only needs to place the user in front of the PIR which needs to be triggered, click and configure a certain area PIR (for example, configure a kitchen PIR) on an operation terminal (for example, a mobile phone), then prompt the user to trigger the PIR (for example, leave or swing the hand), and the system automatically corresponds the ID of the PIR sensor to the area which is being configured through analyzing all PIR data.
Based on this, in order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides an electronic device, as shown in fig. 5, where the electronic device 50 includes: a processor 501, a memory 502 and a computer program stored on the memory and capable of running on the processor;
When the processor 501 is configured to run the computer program, it executes:
recording data of at least one sensor capable of identifying moving objects based on infrared light;
receiving a configuration instruction, detecting state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length;
associating a sensor identification of the target sensor with a location identification of the area.
In some embodiments, the processor 501 is configured to execute the detecting a state change of the data of the at least one sensor within a statistical time period when the computer program is executed, and the determining the target sensor according to the state change includes:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In some embodiments, the processor 501 is configured to execute the detecting a state change of the data of the at least one sensor within a statistical time period when the computer program is executed, and the determining the target sensor according to the state change includes:
determining a second time to begin detecting data of the at least one sensor;
when the first time is less than the second time, determining data which is in a second state at the second time and has a duration greater than a set duration threshold value in the second state as the data of the target sensor; the target sensor detects the detection object at the first time.
In some embodiments, the processor 501, when running the computer program, further performs:
and acquiring the delay time of the target sensor, and taking the delay time as the set time threshold.
In some embodiments, the processor 501, when running the computer program, further performs:
detecting the number of the target sensors;
and when the number is not matched with the set number range, performing configuration failure reminding.
It should be noted that the electronic device 50 may be a terminal or a sensor gateway.
When the electronic device 50 is a terminal, the electronic device further includes a communication interface and a processor, wherein the terminal establishes a connection with the sensor gateway through the communication interface, performs data interaction with the sensor gateway through the established connection, and processes received or to-be-transmitted data through the processor.
When the electronic device 50 is a sensor gateway, the electronic device further includes a communication interface and a processor, wherein the sensor gateway establishes a connection with the sensor through the communication interface, receives data sent by the sensor through the established connection, and processes the received data through the processor.
Of course, in actual practice, the various components in the electronic device 50 are coupled together by a bus system 503, as shown in FIG. 5. It is understood that the bus system 503 is used to enable connected communication between these components. The bus system 503 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 503 in fig. 5.
The number of the processors 501 may be at least one.
It will be appreciated that the memory 502 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 502 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 502 in embodiments of the present invention is used to store various types of data to support the operation of the electronic device 50.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in software form in the processor 501. The Processor 501 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. Processor 501 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 502, and the processor 501 reads the information in the memory 502 and performs the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the electronic Device 50 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the aforementioned methods.
In order to implement the method of the embodiment of the present invention, an embodiment of the present invention further provides an apparatus for configuring a sensor, as shown in fig. 6, including: a recording unit 601, a detection unit 602, and an association unit 603; wherein, the first and the second end of the pipe are connected with each other,
a recording unit 601 for recording data of at least one sensor capable of recognizing a moving object based on infrared rays;
a detecting unit 602, configured to receive a configuration instruction, detect a state change of data of the at least one sensor within a statistical duration based on the configuration instruction, and determine a target sensor according to the state change, where the target sensor is located in an area indicated by the configuration instruction in a spatial environment and detects a detection object within the statistical duration;
An associating unit 603 for associating a sensor identification of the target sensor with a location identification of the area.
In some embodiments, the detecting unit 602 detects a state change of the data of the at least one sensor within a statistical time period, and determining the target sensor according to the state change includes:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In some embodiments, the detecting unit 602 detects a state change of the data of the at least one sensor within a statistical time period, and determining the target sensor according to the state change includes:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In some embodiments, as shown in fig. 7, the apparatus further comprises: an obtaining unit 604, configured to obtain a delay time of the target sensor, where the delay time is used as the set time threshold.
In some embodiments, as shown in fig. 7, the apparatus further comprises: a matching unit 605 for detecting the number of the target sensors; and when the number is not matched with the set number range, performing configuration failure reminding.
It should be noted that: in the sensor configuration of the sensor configuration device provided in the above embodiment, only the division of the program modules is exemplified, and in practical applications, the above processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the above-described processing. In addition, the apparatus for configuring a sensor and the method for configuring a sensor provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments, and are not described herein again.
In an exemplary embodiment, the present invention further provides a computer readable storage medium, such as the memory 502 comprising a computer program, which is executable by the processor 501 of the electronic device 50 to perform the steps of the aforementioned method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
Specifically, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program performs:
recording data of at least one sensor capable of recognizing a moving object based on infrared light; receiving a configuration instruction, detecting a state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length; associating the sensor identification of the target sensor with the location identification of the area.
In some embodiments, the computer program, when executed by the processor, performs the detecting a change in state of the data of the at least one sensor over a statistical time period, the determining a target sensor from the change in state comprising:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In some embodiments, the computer program, when executed by the processor, performs the detecting a change in state of the data of the at least one sensor over a statistical period of time, the determining a target sensor from the change in state comprising:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
In some embodiments, the computer program, when executed by the processor, further performs:
and acquiring the delay time of the target sensor, and taking the delay time as the set time threshold.
In some embodiments, the computer program, when executed by the processor, further performs:
detecting the number of the target sensors;
and when the number is not matched with the set number range, performing configuration failure reminding.
It should be noted that: the technical schemes described in the embodiments of the present invention can be combined arbitrarily without conflict.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

1. A method of configuring a sensor, the method comprising:
recording data of at least one sensor capable of identifying moving objects based on infrared light;
receiving a configuration instruction, detecting a state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length;
associating sensor identifications of the target sensors with location identifications of the areas to configure location distribution of the target sensors;
wherein the detecting a state change of the data of the at least one sensor within a statistical time period and determining a target sensor according to the state change comprises:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has a duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the first time is the time when the target sensor detects the detection object.
2. The method of claim 1, wherein detecting a change in state of the data of the at least one sensor over a statistical time period, and determining a target sensor from the change in state comprises:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and acquiring the delay time of the target sensor, and taking the delay time as the set time threshold.
4. The method of claim 1, further comprising:
detecting the number of the target sensors;
and when the number is not matched with the set number range, performing configuration failure reminding.
5. An apparatus for configuring a sensor, the apparatus comprising: the device comprises a recording unit, a detection unit and an association unit; wherein, the first and the second end of the pipe are connected with each other,
the recording unit is used for recording data of at least one sensor, and the sensor can identify a moving object based on infrared rays;
The detection unit is used for receiving a configuration instruction, detecting the state change of the data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is positioned in the area indicated by the configuration instruction in the space environment and detects a detection object within the statistical time length;
the association unit is used for associating the sensor identifier of the target sensor with the position identifier of the area so as to configure the position distribution of the target sensor;
wherein, the detection unit is specifically configured to:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has a duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the first time is the time when the target sensor detects the detection object.
6. An electronic device, characterized in that the electronic device comprises: a processor, a memory, and a computer program stored on the memory and capable of running on the processor;
Wherein the processor is configured to, when running the computer program, perform:
recording data of at least one sensor capable of identifying moving objects based on infrared light;
receiving a configuration instruction, detecting a state change of data of the at least one sensor within a statistical time length based on the configuration instruction, and determining a target sensor according to the state change, wherein the target sensor is located in an area indicated by the configuration instruction in a space environment and detects a detection object within the statistical time length;
associating the sensor identification of the target sensor with the location identification of the area to configure the location distribution of the target sensor;
wherein the detecting a state change of the data of the at least one sensor within a statistical time period and determining a target sensor according to the state change comprises:
determining a second time to begin detecting data of the at least one sensor;
and when the first time is less than the second time, determining data which is in a second state at the second time and has a duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the first time is the time when the target sensor detects the detection object.
7. The electronic device of claim 6, wherein the processor, when executing the computer program, is configured to perform the detecting of the change in state of the data of the at least one sensor over a statistical time period, wherein determining the target sensor based on the change in state comprises:
detecting the state of the data of the at least one sensor at a first time, and determining the data which is converted from the first state to a second state at the first time and has the duration greater than a set duration threshold value at the second state as the data of the target sensor, wherein the target sensor detects the detection object at the first time.
8. The electronic device according to claim 6 or 7, wherein the processor, when executing the computer program, further performs:
and acquiring the delay time of the target sensor, and taking the delay time as the set time threshold.
9. The electronic device of claim 6, wherein the processor, when executing the computer program, further performs:
detecting the number of the target sensors;
and when the number is not matched with the set number range, performing configuration failure reminding.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN201810002816.6A 2018-01-02 2018-01-02 Method and device for configuring sensor, electronic equipment and computer readable storage medium Active CN109996203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810002816.6A CN109996203B (en) 2018-01-02 2018-01-02 Method and device for configuring sensor, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810002816.6A CN109996203B (en) 2018-01-02 2018-01-02 Method and device for configuring sensor, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109996203A CN109996203A (en) 2019-07-09
CN109996203B true CN109996203B (en) 2022-07-19

Family

ID=67128297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810002816.6A Active CN109996203B (en) 2018-01-02 2018-01-02 Method and device for configuring sensor, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109996203B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187508B (en) * 2020-08-21 2023-04-07 深圳奇迹智慧网络有限公司 Internet of things gateway equipment management method, device, equipment and readable storage medium
CN114590644B (en) * 2022-04-12 2024-04-05 浙江恒强科技股份有限公司 Method and device for setting marks of yarn winder length-fixing instrument and yarn winder

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046849A (en) * 2006-03-27 2007-10-03 日本电气株式会社 Information management system, method, program and recording medium
CN201393304Y (en) * 2009-04-10 2010-01-27 华南理工大学 Moving target tracking system based on wireless sensor network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110141013A1 (en) * 2009-12-14 2011-06-16 Alcatel-Lucent Usa, Incorporated User-interface apparatus and method for user control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046849A (en) * 2006-03-27 2007-10-03 日本电气株式会社 Information management system, method, program and recording medium
CN201393304Y (en) * 2009-04-10 2010-01-27 华南理工大学 Moving target tracking system based on wireless sensor network

Also Published As

Publication number Publication date
CN109996203A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
US20170330439A1 (en) Alarm method and device, control device and sensing device
US11019149B2 (en) Hub apparatus and method for providing service thereof
AU2019295856B2 (en) Object tracking using disparate monitoring systems
KR101454355B1 (en) Pet management system
US20150138353A1 (en) Smart doorbell with energy saving method
US11743578B2 (en) Systems and methods of power-management on smart devices
US9830795B2 (en) Sensor system
CN109996203B (en) Method and device for configuring sensor, electronic equipment and computer readable storage medium
CN112544122B (en) Device for providing an action upon detection of an object in space
KR20190044375A (en) System for controlling entrance based on beacon and Method thereof
US20230121623A1 (en) Method for notifying a message of a smart home based on a smart screen Apparatus and Smart screen
CN104616408B (en) Doorbell control method and device
EP4330931A1 (en) Systems and methods for on-device person recognition and provision of intelligent alerts
KR20120108626A (en) Method and system for node diagnosis based on sensor network
JP2005129046A (en) Method and system for modeling movement of user in environment
US20200053315A1 (en) Method and apparatus for assisting a tv user
CN114338585A (en) Message pushing method and device, storage medium and electronic device
CN105488965A (en) Alarm method and device
US9991975B2 (en) Method and device for triggering specified operation
US11170732B2 (en) Smart mirror, device and method for controlling screen state of electronic device, and storage medium
KR20180070091A (en) Electronic device and method for providng notification using the same
TW201824144A (en) Crowd control security system
CN113552938A (en) Action association method based on Internet of things, electronic equipment and storage medium
US10042331B2 (en) Sensor network and a method for detecting an event in a sensor network
US11832028B2 (en) Doorbell avoidance techniques

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