CN109788536B - Sensor control method, sensor control device, sensor, and storage medium - Google Patents

Sensor control method, sensor control device, sensor, and storage medium Download PDF

Info

Publication number
CN109788536B
CN109788536B CN201910068694.5A CN201910068694A CN109788536B CN 109788536 B CN109788536 B CN 109788536B CN 201910068694 A CN201910068694 A CN 201910068694A CN 109788536 B CN109788536 B CN 109788536B
Authority
CN
China
Prior art keywords
mode
wireless sensor
current
network
state
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
CN201910068694.5A
Other languages
Chinese (zh)
Other versions
CN109788536A (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.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology Co Ltd
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 Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN201910068694.5A priority Critical patent/CN109788536B/en
Publication of CN109788536A publication Critical patent/CN109788536A/en
Application granted granted Critical
Publication of CN109788536B publication Critical patent/CN109788536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a sensor control method, a sensor control device, a sensor and a storage medium, and relates to the technical field of communication. The method comprises the following steps: acquiring the current network connection state of the wireless sensor, wherein the current network connection state is an off-network state or a networking state; setting a current working mode of the wireless sensor according to the current network connection state; and setting the current operation mode of the micro control unit according to the current operation mode, wherein different current operation modes have different power consumption. The invention sets the working modes of the hardware and the software of the wireless sensor by detecting the network state of the wireless sensor, thereby reducing the power consumption.

Description

Sensor control method, sensor control device, sensor, and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a sensor control method, a sensor control apparatus, a sensor, and a storage medium.
Background
With the development of the internet of things system, the number and the intelligence degree of the sensing layers in the internet of things are more and more valued. The wireless sensor network has the advantages of small size, low power consumption, convenience in deployment and the like, and is widely applied to the industry of the Internet of things. However, wireless sensor networks also face some challenges, such as maintenance of wireless sensors. Therefore, how to prolong the service life of the wireless sensor battery without affecting the user experience is a continuously pursued goal in the industry.
Disclosure of Invention
In view of the above problems, the present invention provides a sensor control method, a sensor control device, a sensor, and a storage medium to reduce power consumption of a wireless sensor and to extend a service life of the wireless sensor.
In a first aspect, an embodiment of the present invention provides a sensor control method, which is applied to a wireless sensor, where the wireless sensor includes a micro control unit, and the method includes: acquiring the current network connection state of the wireless sensor, wherein the current network connection state is an off-network state or a networking state; setting a current working mode of the wireless sensor according to the current network connection state; and setting the current operation mode of the micro control unit according to the current operation mode, wherein different current operation modes have different power consumption.
In a second aspect, an embodiment of the present invention provides a sensor control apparatus, including: the state module is used for acquiring the current network connection state of the wireless sensor, wherein the current network connection state is an off-network state or a networking state; the working module is used for setting the current working mode of the wireless sensor according to the current network connection state; and the control module is used for setting the current operation mode of the micro control unit according to the current operation mode, and different current operation modes have different power consumptions.
In a third aspect, an embodiment of the present invention provides a sensor, including: one or more processors, memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed on the one or more processors, the one or more applications configured to perform the method of the first aspect as described above.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the method according to the first aspect.
According to the sensor control method, the sensor control device, the sensor and the storage medium provided by the embodiment of the invention, the current network connection state of the wireless sensor is obtained and is an off-network state or a networking state, then the current working mode of the wireless sensor is set according to the current network connection state, and finally the current running mode of the micro control unit is set according to the current working mode, wherein different current running modes have different power consumptions. Therefore, the working modes of hardware and software of the wireless sensor are set by detecting the network state of the wireless sensor, so that the wireless sensor can realize optimal power consumption under the condition of not influencing the reliability and the function.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for controlling a sensor according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a sensor control method according to another embodiment of the invention;
FIG. 3 is a schematic flow chart of steps S310 to S320 in another embodiment of the present invention;
FIG. 4 illustrates a block diagram of a sensor control apparatus provided in accordance with an embodiment of the present invention;
FIG. 5 shows a block diagram of a sensor for performing a sensor control method according to an embodiment of the invention;
fig. 6 illustrates a memory unit for storing or carrying program codes for implementing a sensor control method according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention.
Existing wireless sensors typically need to join an established wireless network through some wireless communication protocol, such as ZigBee, BLE-mesh, WiFi, and NB-IoT. Once the wireless sensor is added into the wireless network, handshake communication is performed between the wireless sensor and the network center device at an irregular time, so that data exchange between the network center device and the wireless sensor is facilitated, and meanwhile, the network center device can detect whether the working state of the wireless sensor is normal or not, and under the condition, the wireless sensor needs to be in an activation state at an irregular time, so that relatively large power consumption is caused.
At present, when a wireless sensor is in a factory testing stage, a transportation process or a storage stage, in order to reduce unnecessary power consumption in the three stages, the prior art mainly has two solutions: firstly, taking down a battery, and then installing the battery to enable the wireless sensor to work after a user takes the wireless sensor; scheme II: the battery blocking piece is additionally arranged at the battery power supply position, so that the battery cannot supply power, and after a user takes the wireless sensor, the battery blocking piece is taken down to enable the battery to start to supply power and enable the wireless sensor to work. The power consumption problem of the wireless sensor is solved through the two schemes, the operation processes of production, manufacturing and use of a user are increased, the user experience is influenced, meanwhile, a plurality of limits on the appearance of the product are increased, for example, the wireless sensor is required to be used in occasions with high dustproof and waterproof requirements, and the reliability of equipment is reduced.
In view of the above problems, the inventors have found and proposed a sensor control method, a sensor control device, a sensor and a storage medium according to embodiments of the present invention through long-term research, and set a hardware and software operating mode of a wireless sensor by detecting a network state where the wireless sensor itself is located, so that the wireless sensor can achieve optimal power consumption without affecting reliability and functions.
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a sensor control method according to an embodiment of the invention. As will be explained in detail below with respect to the embodiment shown in fig. 1, the method may specifically include the following steps:
step S110: and acquiring the current network connection state of the wireless sensor.
In this embodiment, the current network connection state is an off-network state or a networking state, wherein when the wireless sensor is in the off-network state, the wireless sensor cannot communicate with other devices; when the wireless sensor is in a networking state, the wireless sensor can normally communicate with other equipment to realize data interaction. In one embodiment, when the wireless sensor is in an off-network state, network connection information is not stored in the wireless sensor, and communication connection with other equipment cannot be established for communication; when the wireless sensor is in a networking state, network connection information is stored in the wireless sensor, and communication connection is established with other equipment so as to normally communicate with the other equipment, and data interaction is realized.
In this embodiment, the wireless sensor may be added to an established wireless network through a wireless communication protocol, specifically, the wireless communication protocol may be a wireless communication protocol such as ZigBee, low-power bluetooth network (BLE-mesh), WiFi, narrowband internet of things (NB-IoT), and it can be understood that the wireless sensor establishes a connection with the wireless network according to the wireless communication protocol, and the wireless communication protocols adopted for different wireless networks are different, and are not limited herein.
Step S120: and setting the current working mode of the wireless sensor according to the current network connection state.
In this embodiment, a corresponding relationship exists between the current network connection state of the wireless sensor and the current working mode, and specifically, the current working mode corresponding to the current network connection state being the off-network state is different from the current working mode corresponding to the current network connection state being the networking state. For example, the current network connection state of the wireless sensor is a networking state, the current operation mode a1 is set, and the current operation mode a2 is set when the current network connection state is switched from the networking state to the off-network state. It should be noted that different current operating modes may correspond to different current network connection states, and may also correspond to the same current network connection state, and it may be understood that a preset mapping relationship exists between the current network connection state of the wireless sensor and the current operating mode, and the preset mapping relationship may be built in a program, or may be set by a user through self-definition, and is not limited herein.
Step S130: and setting the current operation mode of the micro control unit according to the current operation mode, wherein different current operation modes have different power consumption.
In this embodiment, the micro control unit includes a central processing unit module, a RAM module, an RTC timer module, and an I/O port. In some embodiments, the micro-control unit further comprises a ROM module, which can only read information and cannot write information. Wherein the I/O ports may be used to communicate with peripheral devices as well as expansion resources.
In this embodiment, there is a corresponding relationship between the current operating mode of the wireless sensor and the current operating mode of the micro control unit, for example, when the wireless sensor is in the current operating mode a1, the micro control unit is set to be in the current operating mode B1, and when the wireless sensor is in the current operating mode a2, the micro control unit is set to be in the current operating mode B2, at this time, if the current network connection state of the wireless sensor is switched from the off-network state to the on-network state, and when the current operating mode a1 of the wireless sensor is switched to the current operating mode a2, the micro control unit is switched from the current operating mode B1 to the current operating mode B2. It should be noted that different current operating modes may correspond to different current operating modes of the micro control unit, and may also correspond to the same current operating mode of the micro control unit, and it may be understood that there is a preset corresponding relationship between the current operating mode of the wireless sensor and the current operating mode of the micro control unit, and the preset corresponding relationship may be a program built-in, or may be set by a user through a user-defined manner, and is not limited herein.
In this embodiment, different current operating modes of the micro control unit correspond to different power consumptions, and it can be understood that the current operating mode of the micro control unit can be switched by switching the current operating mode of the wireless sensor, so that the power consumption of the wireless sensor is changed, and the automatic adjustment of the power consumption of the wireless sensor is realized by automatically adjusting the current operating mode of the micro control unit. As an implementation manner, the lowest power consumption required by the current operation mode corresponding to different current operation modes may be set, so that the optimal power consumption may be realized by setting the current operation mode of the micro control unit.
Further, the current operation mode of the micro control unit includes a deep sleep mode, a sleep mode, and a normal operation mode. Wherein:
when the micro control unit is in the deep sleep mode, the central processor module is in the sleep state, and the central processor module can be awakened only through the I/O port, namely the micro control unit can be awakened only through the I/O port, at the moment, the power consumption corresponding to the micro control unit is the lowest, but the time required from the awakening to the normal operation mode is longer. In some embodiments, the startup mode of waking up from the deep sleep mode may also be referred to as "cold start".
When the micro control unit is in the sleep mode, the central processor module is in the sleep state, the central processor module can be awakened through the I/O port or the RTC timer module, and the RAM module is in the holding state. That is, when the micro control unit is in the sleep mode, the micro control unit can be waken up through the I/O port or the RTC timer module, and the RAM module is in the hold state, that is, the RAM module is not powered down, at this time, the power consumption corresponding to the micro control unit is higher than that in the deep sleep mode, but because the RAM module is not powered down, the time required for the micro control unit to wake up from the sleep mode to the normal operation mode is shorter. In some embodiments, the startup mode of waking up from sleep mode may also be referred to as "warm startup".
The RAM module is in a holding state, namely the RAM module is not powered down, power can be continuously received, and the information stored in the RAM module can be stably held. When the micro control unit is in the sleep mode, the information stored in the RAM module can still be reserved, so that the wireless sensor can reserve the information stored in the RAM module, such as: the data and the like written into the RAM module by periodic sampling can not only enable the sleep mode awakening starting mode of the microcontroller unit to be warm starting, but also enable the time required for awakening the microcontroller unit from the sleep mode to a normal operation mode to be short, and also enable the data sampled in the off-network state to be sent to wireless network central equipment, such as a gateway, when the wireless sensor is switched from the off-network state to the networking state, so that the wireless network central equipment can acquire the data sampled in the off-network state by the wireless sensor, the continuity and integrity of the data are ensured, and the management of the wireless sensor is facilitated.
When the micro control unit is in a normal operation mode, the central processor module is in a normal working state, the micro control unit can perform data interaction with the outside, and the power consumption corresponding to the micro control unit is highest at the moment.
Specifically, for example, the current operating mode a1 corresponds to a deep sleep mode, the deep sleep mode has a power consumption C1, the current operating mode a2 corresponds to a sleep mode, and the sleep mode has a power consumption C2, where the power consumption C1< C2, when the current network connection state of the wireless sensor is switched from the off-network state to the on-network state, and the wireless sensor is switched from the current operating mode a1 to the current operating mode a2, the micro control unit is switched from the deep sleep mode to the sleep mode, and the power consumption of the wireless sensor is switched from the power consumption C1 to the power consumption C2, so that the power consumption of the wireless sensor is automatically adjusted by automatically adjusting the current operating mode of the micro control unit, and the power consumption of the wireless sensor is changed. Make the producer needn't solve wireless sensor's consumption problem through the battery that takes off wireless sensor or increase battery separation blade in stages such as manufacturing, packing, storage and transportation, and also needn't cause restriction such as dustproof, waterproof demand to wireless sensor's appearance, thereby can reduce producer and user's unnecessary operation through the automatic mode of operation that sets up little the control unit, when reducing the consumption, the production has been simplified, the use procedure, make wireless sensor can be under the condition that does not influence reliability and function, realize optimum consumption, the life-span of wireless sensor has been prolonged.
According to the sensor control method provided by one embodiment of the invention, the current network connection state of the wireless sensor is acquired and is an off-network state or a networking state, then the current working mode of the wireless sensor is set according to the current network connection state, and finally the current running mode of the micro control unit is set according to the current working mode, wherein different current running modes have different power consumptions. Therefore, the running mode of the micro control unit is automatically set by detecting the network state of the wireless sensor, a producer does not need to isolate a battery from the battery power supply of the wireless sensor, the power consumption is reduced, the processes of production, test, use and the like are simplified, the wireless sensor can realize optimal power consumption under the condition of not influencing the reliability and functions, the service life of the wireless sensor is prolonged, and the efficiency of production, test, transportation and storage is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a sensor control method according to another embodiment of the invention. As will be explained in detail with respect to the flow shown in fig. 2, the method may specifically include the following steps:
Step S201: and acquiring the current network connection state of the wireless sensor.
The detailed description of step S201 is please refer to step S110, which is not described herein again.
Step S202: and when the current network connection state is the off-network state, detecting a network access instruction.
In this embodiment, the network access instruction may be triggered manually or automatically by a program, which is not limited herein. Specifically, for example, as one mode, when the current network connection state of the wireless sensor is the off-network state, the wireless sensor may be reset manually, so that the wireless sensor enters the network entry process, that is, the network entry instruction may be obtained by detecting the reset operation on the wireless sensor, so that the wireless sensor enters the network entry process.
Step S203: and establishing network connection according to the network access instruction, and switching the current network connection state from the off-network state to the networking state.
In this embodiment, after the wireless sensor detects the network access instruction, network connection is established according to the network access instruction, so that the wireless sensor joins the preset network, and at this time, the current network connection state of the wireless sensor is switched from the off-network state to the networking state, so that the wireless sensor can communicate with the network center device in the preset network, and data interaction is realized. The preset network can be a network at the current position of the wireless sensor, and network connection is established with the preset network according to the network access instruction, so that the wireless sensor can communicate with network center equipment in the preset network.
Step S204: and when the current network connection state is switched from the off-network state to the networking state, switching the current working mode of the wireless sensor from the non-network-access mode to a factory test mode.
In this embodiment, the current working mode of the wireless sensor at least includes a non-network access mode and a factory test mode, where the wireless sensor erases a Flash memory (Flash) of a product microcontroller in a factory and the current working mode where the corresponding program is burned is the non-network access mode, it should be noted that the wireless sensor does not work when in the non-network access mode, and power consumption required by the wireless sensor is the lowest at this time. After the wireless sensor is added into the network, the current working mode for carrying out the factory function test is a factory test mode.
In this embodiment, when the wireless sensor is connected to the network, that is, when the current network connection state is switched from the off-network state to the on-network state, the wireless sensor enters the factory test mode from the non-access-network mode. The wireless sensor can be automatically switched to the current working mode according to the current network connection state, the wireless sensor is set to be the working mode capable of executing corresponding functions, for example, the wireless sensor is switched to a factory test mode, a factory can test the wireless sensor, the requirement of a producer is met, and meanwhile, the use flow is simplified. And when the factory test is not needed, the wireless sensor can not be networked, so that the wireless sensor is maintained in a non-network-access mode, the lowest power consumption is kept, the power consumption of the wireless sensor is reduced, and the service life of the wireless sensor is prolonged.
As an implementation manner, there are a plurality of wireless sensors establishing network connection, that is, a plurality of wireless sensors can communicate with a network center device in a preset network, after each wireless sensor detects a network access command, each wireless sensor can switch its own current network connection state to a networking state according to the detected network access command, and switch its current operation mode to a factory test mode, so that the network center device can simultaneously communicate with a plurality of wireless sensors, and simultaneously perform factory test on a plurality of wireless sensors, thereby improving test efficiency, and by switching the current network connection state to the networking state, automatically switch the current operation mode of the wireless sensor, so that the wireless sensor can automatically enter the factory test mode to receive the factory test, compared with the prior art, in order to prolong the battery service life of the wireless sensor, the battery is kept apart with wireless sensor's battery powered department in process of production, for example increases the battery separation blade in wireless sensor's battery powered department for the battery can't be to wireless sensor power supply, need take off the battery separation blade and just can let wireless sensor work, and at the test stage of mill, the personnel of mill still need take off the battery separation blade just can test, greatly increased the work load of mill's test. And as in the prior art, the battery of the wireless sensor is taken out, so that the factory personnel need to install the battery before testing, the testing process is complicated, and the workload is increased.
This embodiment can be through the current network connection state of switching wireless sensor, automatic switch wireless sensor's current mode for wireless sensor keeps minimum consumption when not needing the during operation, when needs mill's test, need not to do other operations to battery powered department simultaneously, can test, has simplified the test flow, has improved efficiency of software testing, has also prolonged wireless sensor's battery life simultaneously.
Step S205: and when the wireless sensor is in a factory test mode, switching the current operation mode of the micro control unit from a deep sleep mode to a sleep mode.
For a detailed description of the micro control unit, see step S130, which is not described herein again.
It should be noted that the time required for the micro control unit to wake up from the sleep mode to the normal operation mode is shorter than the time required for the micro control unit to wake up from the deep sleep mode to the normal operation mode, and it can be understood that the start mode for waking up from the deep sleep mode to the normal operation mode is a cold start, the start mode for waking up from the sleep mode to the normal operation mode is a warm start, and the time required for the cold start is longer than the time required for the warm start.
In this embodiment, when the wireless sensor is in the factory test mode, the current operation mode of the micro control unit is switched from the deep sleep mode to the sleep mode, so that the wireless sensor can receive the verification of the functions of each module of the wireless sensor in the factory test mode, and when the wireless sensor needs to be awakened in the test process, the micro control unit of the wireless sensor only needs to be awakened from the sleep mode to the normal operation mode, the time required for awakening is short, and the test efficiency is improved.
In the embodiment, according to the switching of the network connection state, the current working mode of the wireless sensor is automatically switched, and then the current operating mode of the micro control unit is automatically switched according to the current working mode of the wireless sensor, so that the power consumption of the wireless sensor is in an off-network state when the wireless sensor does not need to work, the lowest power consumption is kept, meanwhile, when a factory test is needed, the wireless sensor enters a networking state, the current working mode is switched to a factory test mode, the current operating mode of the micro control unit is switched to a sleep mode, other operations on a battery power supply position are not needed, the test can be carried out, the test flow is simplified, the test efficiency is improved, and meanwhile, the service life of a battery of the wireless sensor is prolonged.
Step S206: and receiving a factory test instruction, and detecting whether the wireless sensor meets a preset trigger condition.
In this embodiment, the current operating mode of the wireless sensor is a factory test mode, the current operating mode of the micro control unit is a sleep mode, and a factory test instruction is received at this time, and the factory test instruction may be manually triggered by a tester or sent by a network center device, and is used to detect whether the functions of the modules of the wireless sensor can operate normally, so as to ensure that the production hardware process of the wireless sensor is error-free.
It should be noted that, when the wireless sensor receives a factory test instruction to perform a test, according to a module function to be verified, the micro control unit needs to wake up from the sleep mode to the normal operation mode, for example, when the temperature sensor needs a test cycle sampling function, the micro control unit needs to collect temperature every 5 seconds, at this time, when the temperature needs to be collected, the micro control unit wakes up from the sleep mode to the normal operation mode to perform temperature collection, after the collection is completed, the micro control unit returns to the sleep mode to wait for the next time to be awakened at a fixed time, and performs the next collection.
In this embodiment, the preset trigger condition includes at least one of the following conditions: the factory test passes, or no operation is performed for more than a preset period of time. The preset time period may be built-in program, or may be self-defined by related personnel including testers, and the like, which is not limited herein and may be specifically determined according to an application scenario of the wireless sensor. It should be noted that when the function verification of each module of the wireless sensor passes, the factory test of the wireless sensor passes.
Specifically, when a module function of the wireless sensor is verified, the wireless sensor may make a positive feedback to prompt the user that the current module function passes the test, or may not make any feedback when the module function passes the verification.
As a mode, when a module function of the wireless sensor is verified, when the module function is verified to be passed, the wireless sensor can perform positive feedback through the LED lamp, for example, the LED light green lamp is set to indicate that the module passes the test, a tester can know that the current module function passes the test through the LED light green lamp, and the lighted LED lamp is turned off when the next module function test is carried out. If the LED green lamp is turned on when each module function is verified, the function of each module is considered to pass the verification, the wireless sensor is detected to meet the preset triggering condition, and otherwise, the preset triggering condition is not met.
As another mode, when a module function of the wireless sensor is verified, when the module function is verified, the wireless sensor may not make any feedback, and only does negative feedback when the module function is not verified, that is, a tester may know that a current module function test passes through by not receiving the negative feedback within a preset time, so that the test power consumption of the wireless sensor is reduced, and the test efficiency is improved. At this time, if no operation is performed within a preset time period from the start of the first module function verification until the end of the verification of each module function, that is, if no negative feedback is received within the preset time period, it is detected that the wireless sensor meets the preset trigger condition, otherwise, the wireless sensor does not meet the preset trigger condition, and it can be understood that if at least one negative feedback is received within the preset time period, the wireless sensor does not meet the preset trigger condition.
It should be noted that, when a module function of the wireless sensor is verified, and when the verification fails, the wireless sensor may perform negative feedback to prompt that the current module function fails to pass the test, specifically, the wireless sensor may perform negative feedback through the LED lamp, for example, setting the red LED lamp to light to indicate that the test fails, then when the red LED lamp is lit, the tester may learn that the current module function fails the test, and then if the LED lamp flashes to indicate that the test fails, the tester may learn that the current module function test fails through the flashing of the LED lamp, at this time, the wireless sensor may perform negative feedback in a manner of a buzzer alarm, and the feedback principles are substantially similar, which is not described herein again.
In a specific application scenario, for example, in a factory test stage, when verification is set to pass, no feedback exists, when verification fails, a red LED lamp is turned on, and when whether the temperature sensor can normally sample periodically is verified, a preset timing time is set to be 5 seconds, so that the temperature sensor collects the temperature once every 5 seconds. At this time, when the temperature collected by the temperature sensor is collected every 5 seconds, it can be considered that the wake-up function of the RTC timer module of the temperature sensor passes the test. And when the temperature collected by the temperature sensor is detected not to be collected once according to 5 seconds, for example, the temperature interval time collected by the temperature sensor is different, the wake-up function test of the RTC timer module of the temperature sensor can be considered not to pass at the moment, and the temperature sensor does not meet the preset trigger condition. And if the red LED lamp is not lighted within a preset time period after all functional tests of the temperature sensor are finished, the temperature sensor is considered to meet the preset triggering condition at the moment.
Step S207: and when the wireless sensor meets the preset triggering condition, switching the current working mode of the wireless sensor from a factory test mode to a transportation and storage mode.
In this embodiment, when the wireless sensor meets the preset trigger condition, that is, functions of each module of the wireless sensor are verified to be passed, at this time, the wireless sensor automatically adds a mark to an internal flash memory or an EEPROM (electrically erasable and programmable read only memory) to represent that the wireless sensor passes a factory test, and at this time, the current working mode of the wireless sensor is switched from a factory test mode to a transportation and storage mode according to the mark. After the wireless sensor passes through factory testing, the current working mode is automatically switched, the use requirements of the wireless sensor in the transportation and storage process are met, manual switching is not needed, and the use flow is simplified.
As an implementation manner, after detecting that the wireless sensor meets the preset trigger condition, the micro control unit of the wireless sensor enters a sleep mode to wait for next wake-up, so that the power consumption of the wireless sensor can be reduced.
Step S208: and turning off the timing wake-up function of the micro control unit.
In this embodiment, when the current working mode of the wireless sensor is switched from the factory test mode to the transportation and storage mode, the micro control unit is still in the sleep mode, and the timing wake-up function of the micro control unit is turned off at this time, so that the micro control unit can only wake up from the I/O port and cannot wake up through the RTC timer module. Therefore, when the timing awakening is not needed, the corresponding RTC timer module is closed, and unnecessary power consumption is reduced. It can be understood that when the wireless sensor is in the transportation and storage process, the wireless sensor does not need to work, so that the RTC timer module does not need to be started, thereby reducing the power consumption of the wireless sensor and prolonging the service life of the battery of the wireless sensor.
Furthermore, when the current working mode of the wireless sensor is a transportation and storage mode, the micro control unit is in a sleep mode, so that the wireless sensor keeps low power consumption, and meanwhile, after transportation and storage, a user can awaken the micro control unit of the wireless sensor to a normal operation mode from the sleep mode, so that the wireless sensor is awakened quickly for the user to use, the user operation and waiting time are reduced, and the user experience is improved while the low power consumption is kept.
In a specific application scenario, for example, after a batch of wireless sensors are tested in a factory, the current working mode of the wireless sensors passing the test is switched to a transportation storage mode, the wake-up function of the RTC timer module is turned off, and the wireless sensors passing the test are stored in a warehouse or enter a transportation process after being packaged, so that the wireless sensors keep low power consumption in the storage and transportation processes, and the service life of the batteries of the wireless sensors is prolonged.
Step S209: and detecting whether the wireless sensor meets a preset activation condition.
In this embodiment, when the wireless sensor is in the transportation and storage mode, whether the wireless sensor meets the preset activation condition is detected. Specifically, when the wireless sensor successfully samples, it is considered that the preset activation condition is satisfied, for example, when the door and window sensor detects that the door and window is opened or closed, if the human body sensor detects a person, when the temperature sensor detects a temperature, and the like, successfully samples or the network test key is pressed, and the like, it can be considered that the preset activation condition is satisfied, that is, it is detected that the wireless sensor satisfies the preset activation condition.
In a specific application scenario, a user unpacks the package to take out the door and window sensor, installs the door and window sensor to the door, and when the user opened the door, the door and window sensor detected that the door was opened, and this time, the door and window sensor satisfied preset activation conditions.
Step S210: when the wireless sensor meets the preset activation condition, the wireless sensor tries to connect the wireless center network equipment, and when the connection is successful, the timing awakening function of the micro control unit is started.
In this embodiment, when the wireless sensor meets the preset activation condition, the wireless center network device is tried to be connected, where the wireless center network device may be connected to a wireless sensor network including at least one wireless sensor through one communication protocol, or may be connected to an external network through the same or different communication protocol in a wired or wireless manner, that is, the wireless center network device is connected to the wireless sensor network and the external network, so as to implement conversion between the two communication protocols, issue a monitoring task to the wireless sensor, and forward data collected by the wireless sensor to the external network, thereby implementing data interaction between the wireless sensor network and the external network. It is to be understood that the wireless center network device may be a gateway, and may also be a coordinator or other devices that can perform data interaction with the wireless sensor network and with an external network, which is not limited herein.
Furthermore, one wireless center network device can communicate with a plurality of wireless sensors to realize data interaction. Specifically, the wireless sensor may send a test packet to the wireless central network device, and upon a response from the wireless central network device to the test packet, the connection is successful,
as one mode, if the wireless central network device does not respond after time out, the test data packet may be retransmitted to try connection again, and when the number of connection attempts exceeds a preset number, the connection is unsuccessful, the wireless central network device cannot be connected, the connection is stopped, and the wireless sensor continues to be kept in the current operating mode, that is, in the transportation and storage mode. Through setting the preset times, the wireless sensor can control the consumption of the battery energy of the wireless sensor when the wireless sensor can not be connected with the wireless center network equipment, and the larger power consumption caused by the continuous trial connection of the wireless sensor is avoided, so that the service life of the battery of the wireless sensor is prolonged.
Alternatively, if the wireless central network device does not respond to the timeout, the connection is unsuccessful, no reconnection attempt is made, and the wireless sensor remains in the current operating mode, i.e., the transportation warehousing mode. Therefore, the wireless sensor stops trying to connect when the wireless center network equipment cannot be connected, the increase of power consumption of the wireless sensor caused by abnormal work of the wireless center network equipment is avoided, the consumption of battery energy of the wireless sensor is reduced, and the service life of the battery of the wireless sensor is prolonged.
Further, when the wireless sensor is successfully connected with the wireless central network equipment, the timing wake-up function of the micro control unit is started, so that the wireless sensor can realize periodic sampling and can keep a sleep mode at the time without detection. Specifically, the wireless sensor is set to sample every 5 seconds, the wireless sensor is awakened by the RTC timer module every 5 seconds to sample, the wireless sensor enters a sleep mode after the sampling is finished, lower power consumption is kept, the next awakening is waited to sample, so that the wireless sensor is kept in the sleep mode within most of time without working, the wireless sensor can be awakened rapidly while the lower power consumption is maintained, and the wireless sensor is enabled to realize the optimal power consumption and is convenient for rapidly responding to the user's demand.
In a concrete application scenario, the user installs temperature sensor in the room, after being connected with the gateway successfully, start the timing awakening function of little the control unit among the temperature sensor, and set up and predetermine the timing time and be 5 seconds, temperature sensor is awaken the temperature in the room of gathering once every 5 seconds this moment by RTC timer module, get into sleep mode after this collection is accomplished, wait that the timing time is awakened next time, just be waited for next hour to be awakened the temperature in gathering the room, thereby make temperature sensor can carry out realization cycle sampling function in by user's use.
Further, referring to fig. 3, the sensor control method provided in this embodiment may further include steps 310 to S320, and as will be described in detail with respect to the flow shown in fig. 3, the method may specifically include the following steps:
step S310: and when the current network connection state is switched from the networking state to the off-network state, switching the current working mode to the non-networking mode.
In this embodiment, the current working mode can be switched to the non-network-access mode by switching the current network connection state and disconnecting the wireless sensor from the wireless central network device. Specifically, the connection between the wireless sensor and the wireless central network device can be manually disconnected by pressing a corresponding key on the wireless sensor, so that the current network connection state is switched from the networking state to the off-network state.
It should be noted that, when the wireless center network device fails to operate normally and the connection between the wireless sensor and the wireless center network device is disconnected, so that data interaction cannot be performed, the current operating mode is not switched to the non-network-access mode, which can prevent the wireless sensor from entering the non-network-access mode frequently due to unstable network connection, thereby reducing the time for the wireless sensor to re-operate when the wireless sensor is connected to the wireless center network device again, so that sampling can still be continued when the wireless sensor cannot be connected to the wireless center network device, so that when the network connection is successful, the sampled data can be reported, so that the user can obtain complete data, meet the user demand of the user, and improve the user experience.
As one way, when the wireless sensor is in the factory test mode, the current operating mode of the wireless sensor is switched from the factory test mode to the non-network-entry mode by switching the current network connection state from the network-connected state to the network-disconnected state. By switching the networking state of the wireless sensor to the off-network state, the current working mode of the wireless sensor is switched to the off-network mode, and the power consumption of the wireless sensor is reduced.
As another mode, when the wireless sensor is in the transportation and storage mode, the current network connection state is switched from the networking state to the off-network state, so that the current working mode of the wireless sensor is switched from the transportation and storage mode to the non-networking mode. By switching the networking state of the wireless sensor to be the off-network state, the wireless sensor enters the non-network-access mode, and the power consumption of the wireless sensor is reduced.
Step S320: and switching the current operation mode of the micro-control unit from the sleep mode to the deep sleep mode.
In this embodiment, when the current operating mode of the wireless sensor is switched to the non-network access mode, the current operating mode of the micro control unit is switched to the deep sleep mode, so that the micro control unit can only be woken up from the I/O port. Through switching the current network connection state to off-network state for wireless sensor gets into the mode of not going into the net, and little the control unit gets into the degree of depth sleep mode, makes wireless sensor's whole consumption fall to minimumly, thereby can make wireless sensor keep minimum consumption when temporarily need not using wireless sensor, extension wireless sensor's battery life.
In the sensor control method according to another embodiment of the present invention, the current operating mode of the wireless sensor is switched by switching the current network connection state of the wireless sensor, so as to switch the current operating mode of the micro control unit. Therefore, under the condition that a battery separation blade is not needed to be added and other operations are not needed to be carried out on the battery power supply position of the wireless sensor, the automatic adjustment of the running mode of the micro control unit of the wireless sensor is realized only through the network connection state where the wireless sensor is located, and further the automatic adjustment of the power consumption of the wireless sensor is realized.
Referring to fig. 4, fig. 4 is a block diagram illustrating a sensor control device according to an embodiment of the present invention. As will be explained below with respect to the block diagram of fig. 4, the sensor control device 400 includes: a status module 410, an operation module 420, and a control module 430, wherein:
The status module 410 is configured to acquire a current network connection status of the wireless sensor, where the current network connection status is an off-network status or an on-network status.
The working module 420 is configured to set a current working mode of the wireless sensor according to the current network connection state.
Further, the working module 420 comprises a network entry unit, wherein:
and the network access unit is used for switching the current working mode of the wireless sensor from a non-network access mode to a factory test mode when the current network connection state is switched from an off-network state to a networking state.
And the control module 430 is configured to set a current operation mode of the micro control unit according to the current operation mode, where different current operation modes have different power consumptions.
Further, the control module 430 includes a factory control unit, wherein:
and the factory control unit is used for switching the current operation mode of the micro control unit from the deep sleep mode to the sleep mode when the wireless sensor is in the factory test mode.
Further, the sensor control device 400 further includes: network access detection module, network access switching module, test receiving module, test execution module, awaken up and close module, condition detection module, awaken up and open module, off-network switching module and sleep control module, wherein:
And the network access detection module is used for detecting the network access instruction when the current network connection state is the off-network state.
And the network access switching module is used for establishing network connection according to the network access instruction and switching the current network connection state from the off-network state to the networking state.
And the test receiving module is used for receiving a factory test instruction and detecting whether the wireless sensor meets a preset trigger condition.
The test execution module is used for switching the current working mode of the wireless sensor from a factory test mode to a transportation and storage mode when the wireless sensor meets a preset trigger condition, and the preset trigger condition comprises at least one of the following conditions: the factory test passes, or no operation is performed for more than a preset period of time.
And the wake-up closing module is used for closing the timing wake-up function of the micro control unit.
And the condition detection module is used for detecting whether the wireless sensor meets the preset activation condition.
And the awakening starting module is used for trying to connect the wireless central network equipment when the wireless sensor meets the preset activation condition and starting the timing awakening function of the micro control unit when the connection is successful.
And the off-network switching module is used for switching the current working mode into the non-network-entry mode when the current network connection state is switched from the networking state to the off-network state.
And the sleep control module is used for switching the current operation mode of the micro control unit from the sleep mode to the deep sleep mode.
The embodiment of the invention provides a sensor control device, which switches the current working mode of a wireless sensor by switching the current network connection state of the wireless sensor so as to switch the current running mode of a micro-control unit. Therefore, under the condition that a battery separation blade is not needed to be added and other operations are not needed to be carried out on the battery power supply position of the wireless sensor, the automatic adjustment of the running mode of the micro control unit of the wireless sensor is realized only through the network connection state where the wireless sensor is located, and further the automatic adjustment of the power consumption of the wireless sensor is realized.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments of the present invention, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
A sensor provided by the present invention will be described with reference to fig. 5.
Referring to fig. 5, based on the sensor control method and apparatus, an embodiment of the invention further provides a sensor 500 capable of executing the sensor control method.
The sensor 500 of the present invention may include one or more of the following components: a processor 510, a memory 520, and one or more applications, wherein the one or more applications may be stored in the memory 520 and configured to be executed by the one or more processors 510, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 510 may include one or more processing cores, among other things. The processor 510 interfaces with various components throughout the sensor 500 using various interfaces and wires to perform various functions of the sensor 500 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 520 and invoking data stored in the memory 520. Alternatively, the processor 510 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 510 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 510, but may be implemented by a communication chip.
The Memory 520 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 520 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 520 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a key function, an LED indication function, a sensor signal acquisition function, etc.), instructions for implementing various method embodiments described below, and the like. The stored data area may also store data created during use by the sensor 500 (e.g., sensor calibration parameters, system operating parameter data, sensor sampling data), and the like.
Referring to fig. 6, a block diagram of a computer-readable storage medium according to an embodiment of the present invention is shown. The computer-readable storage medium 600 has stored therein program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 600 includes a non-volatile computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.
In summary, according to the sensor control method, the sensor control apparatus, the sensor and the storage medium provided in the embodiments of the present invention, the current network connection state of the wireless sensor is the off-network state or the on-network state, then the current operating mode of the wireless sensor is set according to the current network connection state, and finally the current operating mode of the micro control unit is set according to the current operating mode, where different current operating modes have different power consumptions. Therefore, the working modes of hardware and software of the wireless sensor are set by detecting the network state of the wireless sensor, so that the wireless sensor can realize optimal power consumption under the condition of not influencing the reliability and the function.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow diagrams or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present invention includes additional implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
The logic and/or steps represented in the flowchart or otherwise described herein, e.g., as a sequential list of executable instructions that may be thought of as being useful to implement logical functions, may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (mobile terminal) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
One of ordinary skill in the art will appreciate that all or part of the steps carried out in the method of implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer-readable storage medium, and the program, when executed, includes one or a combination of the steps of the method embodiments. In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present invention, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions.

Claims (12)

1. A sensor control method adapted for a wireless sensor including a micro control unit, the method comprising:
acquiring the current network connection state of the wireless sensor, wherein the current network connection state is an off-network state or a networking state;
Setting a current working mode of the wireless sensor according to the current network connection state; setting the current operation mode of the micro control unit according to the current operation mode, wherein different current operation modes have different power consumptions; if the current network connection state is an off-network state, determining that the current working mode is an unaccessed mode, and not working by the wireless sensor in the unaccessed mode;
if the current network connection state is switched from an off-network state to a networking state and the wireless sensor is added into a preset network, switching the current working mode from a non-network-access mode to a factory test mode to verify the function of the wireless sensor;
if the current working mode is switched from the factory test mode to the transportation and storage mode, determining that the current operating mode is a sleep mode, and closing a timing awakening function of the micro control unit;
and if the micro control unit of the wireless sensor is awakened, awakening the current operation mode from a sleep mode to a normal operation mode.
2. The method of claim 1, wherein said setting a current operating mode of said micro-control unit based on said current operating mode comprises:
When the wireless sensor is in the factory test mode, the current operation mode of the micro control unit is switched from a deep sleep mode to a sleep mode, and the time required for the micro control unit to wake up from the sleep mode to a normal operation mode is shorter than the time required for the micro control unit to wake up from the deep sleep mode to the normal operation mode.
3. The method of claim 2, wherein the micro control unit comprises a central processor module, a RAM module, an RTC timer module, and an I/O port;
in the deep sleep mode, the central processor module is in a sleep state and is awakened only through the I/O port;
in the sleep mode, the central processor module is in a sleep state, the central processor module is awakened through the I/O port or the RTC timer module, and the RAM module is in a holding state;
in the normal operation mode, the central processor module is in a normal working state.
4. The method of any one of claims 1-3, wherein after said obtaining the current network connection status of the wireless sensor, the method further comprises:
when the current network connection state is an off-network state, detecting a network access instruction;
And establishing network connection according to the network access instruction, and switching the current network connection state from an off-network state to a networking state.
5. The method of any one of claims 2-3, wherein after said switching the current mode of operation of the micro control unit from a deep sleep mode to a sleep mode, the method further comprises:
receiving a factory test instruction, and detecting whether the wireless sensor meets a preset trigger condition;
and when the wireless sensor meets a preset trigger condition, switching the current working mode of the wireless sensor from a factory test mode to a transportation and storage mode.
6. The method of claim 5, wherein the preset trigger condition comprises at least one of: the factory test passes, or no operation is performed for more than a preset period of time.
7. The method of claim 5, wherein after said switching the current operating mode of the wireless sensor from the factory test mode to the transportation storage mode, the method further comprises:
and turning off the awakening function of the RTC timer module of the micro control unit.
8. The method of claim 7, wherein the method further comprises:
Detecting whether the wireless sensor meets a preset activation condition;
when the wireless sensor meets the preset activation condition, the wireless sensor tries to connect with the wireless center network equipment, and when the connection is successful, a wake-up function of an RTC timer module of the micro control unit is started.
9. A method as claimed in claim 2 or 3, wherein said setting of a current operating mode of said micro control unit is based on said current operating mode, the method further comprising:
when the current network connection state is switched from a networking state to an off-network state, switching the current working mode to an off-network mode;
and switching the current operation mode of the micro control unit from the sleep mode to the deep sleep mode.
10. A sensor control device, characterized by comprising:
the state module is used for acquiring the current network connection state of the wireless sensor, wherein the current network connection state is an off-network state or a networking state;
the working module is used for setting the current working mode of the wireless sensor according to the current network connection state, and comprises:
if the current network connection state is an off-network state, determining that the current working mode is an unconnected mode, and the wireless sensor in the unconnected mode does not work;
The wireless sensor network testing system is used for switching the current working mode from a non-network-accessing mode to a factory testing mode to verify the function of the wireless sensor if the current network connection state is switched from an off-network state to a network connection state and the wireless sensor is added into a preset network;
the control module is used for setting the current operation mode of the micro control unit according to the current operation mode, different current operation modes have different power consumptions, and the control module comprises: the timing awakening function is used for determining that the current operation mode is a sleep mode and closing the micro control unit if the current operation mode is switched from the factory test mode to the transportation storage mode;
and if the micro control unit of the wireless sensor is awakened, the current operation mode is awakened from a sleep mode to a normal operation mode.
11. A sensor, comprising:
a memory;
one or more processors coupled with the memory;
one or more programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-9.
12. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 9.
CN201910068694.5A 2019-01-24 2019-01-24 Sensor control method, sensor control device, sensor, and storage medium Active CN109788536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910068694.5A CN109788536B (en) 2019-01-24 2019-01-24 Sensor control method, sensor control device, sensor, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910068694.5A CN109788536B (en) 2019-01-24 2019-01-24 Sensor control method, sensor control device, sensor, and storage medium

Publications (2)

Publication Number Publication Date
CN109788536A CN109788536A (en) 2019-05-21
CN109788536B true CN109788536B (en) 2022-07-12

Family

ID=66501308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910068694.5A Active CN109788536B (en) 2019-01-24 2019-01-24 Sensor control method, sensor control device, sensor, and storage medium

Country Status (1)

Country Link
CN (1) CN109788536B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110579291A (en) * 2019-09-11 2019-12-17 武汉里得电力科技股份有限公司 Temperature measurement intelligence ring
CN110823447B (en) * 2019-11-15 2021-10-15 武汉杰开科技有限公司 Storage method of air pressure detection device and related device and system
CN114067464A (en) * 2021-11-09 2022-02-18 深圳Tcl新技术有限公司 Intelligent door lock and awakening method thereof, network equipment and electronic equipment
CN117201525A (en) * 2022-05-31 2023-12-08 华为技术有限公司 Data processing method, device, equipment, storage medium and system

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4714025B2 (en) * 2006-01-06 2011-06-29 株式会社日立製作所 Sensor node, base station, sensor network, and sensing data transmission method
KR100881273B1 (en) * 2006-12-08 2009-02-05 한국전자통신연구원 Sensor node and its operating method
CN101572936B (en) * 2009-01-09 2011-06-22 吴鑫 Node energy consumption management method for wireless sensor network
CN102781080B (en) * 2012-07-05 2015-05-06 上海大学 Power self-adaptive method of network access and operation of nodes of wireless sensor network
CN103024881A (en) * 2012-11-30 2013-04-03 中国舰船研究设计中心 Node for wireless sensor network
CN103906207B (en) * 2014-03-03 2017-07-18 东南大学 Wireless sensor network data transmission method based on self adaptation awakening technology on demand
CN104703206B (en) * 2015-02-15 2018-05-18 中国科学院上海微系统与信息技术研究所 Towards the Network Protocol Performance Testing bed system and test method of wireless sense network
CN106900000B (en) * 2015-12-18 2020-01-31 上海无线通信研究中心 Hybrid monitoring sleep method of wireless sensor and wireless sensor
CN106648021B (en) * 2016-02-06 2019-11-19 上海鸿研物流技术有限公司 The data broadcasting method and low consumption circuit of low consumption circuit
EP3432120B1 (en) * 2016-03-15 2022-08-10 Shenzhen Mindray Bio-Medical Electronics Co., Ltd Operating mode switching method, wireless sensor and system
CN206095189U (en) * 2016-10-23 2017-04-12 刘兴超 Train pneumatic braking machine effect wireless monitoring system based on MEMS
CN106572183A (en) * 2016-11-10 2017-04-19 王亚慧 Intelligent wireless network sensor system possessing power supply management
CN108999623A (en) * 2018-08-17 2018-12-14 中煤科工集团重庆研究院有限公司 Super low-power consumption hydraulic prop wireless pressure sensor and its super low-power consumption implementation method

Also Published As

Publication number Publication date
CN109788536A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109788536B (en) Sensor control method, sensor control device, sensor, and storage medium
CN109982417B (en) Sensor control method, sensor control device, sensor, and storage medium
CN103402027B (en) Mobile terminal and method for putting same into sleeping state
US8065545B2 (en) Interrupt/wake-up of an electronic device in a low power sleep mode when detecting a sensor or frequency source activated frequency change
US20160037566A1 (en) Method and system for optimized bluetooth low energy communications
KR20060066709A (en) System and method for wake on wireless lan
CN109816830B (en) Unlocking method and device
CN104184907B (en) The detection method and terminal of the wake-up data of terminal application software in the standby state
KR102251628B1 (en) Ultra low power wireless sensor network for being selectively connected to various sensors
CN109067416A (en) A kind of method and Intelligent hardware for realizing SIM card hot plug and starting
CN110223496A (en) Sensor-based method for realizing low power consumption, device, terminal, medium and system
CN112616178A (en) Energy consumption management method and device, electronic equipment and storage medium
CN106247527B (en) The method and device of night control is carried out to air-conditioning using night control model
US10912022B2 (en) WLAN station capable of optimizing power saving operation
CN111044912B (en) Dormancy monitoring system and method
CN105070022A (en) Meter end device and wireless meter reading system and method
CN110320840A (en) A kind of method and system reducing internet of things product battery power consumption
KR102251629B1 (en) Ultra low power wireless sensor module for being selectively connected to various sensors
CN113380015A (en) Wireless passive sensor and working method of wireless passive controller thereof
CN106101406B (en) Shutdown alarm triggering processing method based on mobile terminal and mobile terminal
CN115019494B (en) Wireless switch, processing method and control system of wireless switch
CN108762468B (en) Low-power consumption control method and device
CN106332243A (en) Power consumption saving method and system and mobile terminal
TW201322685A (en) System and method for restoring network configuration parameters
CN102761652A (en) Mobile phone and control method for indicator lamp of mobile phone

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