Summary of the invention
The object of the present invention is to provide a kind of automatic control ONU start and stop method and system, make cutting between ONU operating mode
It changes more intelligently, conveniently, plays the role of energy-efficient.
Technical solution provided by the invention is as follows:
The present invention provides a kind of automatic control ONU start and stop method, comprising: opens the mould that works by day at the first time default
Formula, judges whether user is in;When judging that user is in, ONU is automatically turned on;Night operation mould is opened in default second time
Formula further judges whether the brightness in default room is lower than preset threshold when ONU is at default room, bright when default room
When degree is lower than preset threshold, ONU is automatically closed;When ONU is not at default room, further determine whether that there are traffic monitoring numbers
According to, when be not present traffic monitoring data when, ONU is automatically closed.
The present invention also provides another kinds to automatically control ONU start and stop method, comprising: works by day in default open at the first time
Mode, judges whether user is in;When judging that user is in, further judge whether ONU is open state;If it is not, automatic
Open ONU;Night operation mode is opened in default second time, when ONU is at default room, further room is preset in judgement
Whether brightness is lower than preset threshold, and when the brightness in default room is lower than preset threshold, ONU is automatically closed;When ONU is not default
When room, further determine whether, when traffic monitoring data are not present, ONU to be automatically closed there are traffic monitoring data.
The present invention also provides another kinds to automatically control ONU start and stop method, comprising: works by day in default open at the first time
Mode judges whether ONU is open state;If it is not, opening ONU;Traffic monitoring data are detected whether;If so, repeating to detect
Traffic monitoring data;Otherwise, further judge whether user is in;When judging that user is in, ONU is automatically turned on;Default
Whether the second time opened night operation mode, judge ONU in default room;When ONU is at default room, further judgement is pre-
If whether the brightness in room is lower than preset threshold, when the brightness in default room is lower than preset threshold, ONU is automatically closed;When
ONU is further determined whether there are traffic monitoring data, when traffic monitoring data are not present, automatically not at default room
Close ONU.
The present invention also provides another kinds to automatically control ONU start and stop method, comprising: works by day in default open at the first time
Mode, judges whether user is in;When judging that user is in, ONU is automatically turned on;Night operation is opened in default second time
Mode judges whether ONU is open state;If it is not, opening ONU;Judge ONU whether in default room;When ONU is in default room
When, further judge whether the brightness in default room is lower than preset threshold, when the brightness in default room is lower than preset threshold, from
It is dynamic to close ONU;When ONU is not at default room, further determine whether there are traffic monitoring data, when there is no flows to supervise
When controlling data, ONU is automatically closed.
It is further preferred that it is described when the brightness in default room is lower than preset threshold, ONU is automatically closed and specifically includes:
When the brightness for detecting default room is lower than preset threshold, ONU is closed after the default waiting time.
The present invention also provides another kinds to automatically control ONU start and stop method, comprising: works by day in default open at the first time
Mode, judges whether user is in;When judging that user is in, ONU is automatically turned on;Night operation is opened in default second time
Mode judges whether ONU is open state;If it is not, opening ONU;Judge ONU whether in default room;When ONU is in default room
When, further judge whether the brightness in default room is lower than preset threshold, when the brightness in default room is lower than preset threshold, from
It is dynamic to close ONU;When ONU is not at default room, judge whether user is in;If so, further determining whether that there are flow prisons
Control data;Otherwise, ONU is closed;It further determines whether there are traffic monitoring data, when traffic monitoring data are not present, from
It is dynamic to close ONU.
It is further preferred that the step judges whether there is traffic monitoring data further include: when flow is not present in detection
When monitoring data, ONU is closed after the default waiting time.
The present invention also provides a kind of automatic control ONU start stop systems, using the above method, comprising: mode conversion module,
Infrared detection module, presetting module, light sensor module, traffic monitoring module, logic processing module and automatic switching module;
The mode conversion module opens the mode that works by day default at the first time, opens night operation mould in default second time
Formula;In the mode of working by day, the infrared detection module judges whether user is in;The logic processing module receives described
Infrared detection module judges that the automatic switching module is controlled when user is in opens ONU;It is described pre- in night operation mode
If ONU is arranged whether in default room in module;The light sensor module is in presetting module setting ONU in default room
When, judge whether the brightness in default room is lower than preset threshold;The logic processing module receives the light sensor module
Judge that controlling the automatic switching module when brightness in default room is lower than preset threshold closes ONU;The traffic monitoring mould
Block not at default room, judges whether there is traffic monitoring data in presetting module setting ONU;The logical process mould
Block receives the traffic monitoring module judgement and closes there is no the automatic switching module is controlled when traffic monitoring data
ONU。
Compared with prior art, the present invention is realized by infrared detection module, light sensor module, traffic monitoring module
The various relevant parameters of comprehensive analysis and the on-off state that ONU is controlled according to result intelligent, make ONU switching on and shutting down different working modes
Between switching more automate, be intelligent, to reduce loss, energy saving, while the user's living environment also improved
Safety.
Specific embodiment
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, Detailed description of the invention will be compareed below
A specific embodiment of the invention.It should be evident that drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented
Its practical structures as product.In addition, there is identical structure or function in some figures so that simplified form is easy to understand
Component only symbolically depicts one of those, or has only marked one of those.Herein, "one" is not only indicated
" only this ", can also indicate the situation of " more than one ".
Fig. 1 is a kind of step schematic diagram for automatically controlling ONU start and stop method of the present invention, specific real as of the invention one
Example is applied, as shown in Figure 1, a kind of automatic control ONU start and stop method, comprising: S10 opens the mould that works by day default at the first time
Formula, judges whether user is in;When judging that user is in, ONU is automatically turned on;S20 opens night work in default second time
Operation mode;S30 is when ONU is at default room, and further whether the brightness in the default room of judgement is lower than preset threshold, when default room
Between brightness be lower than preset threshold when, ONU is automatically closed;S40 further determines whether exist when ONU is not at default room
ONU is automatically closed when traffic monitoring data are not present in traffic monitoring data.
The operating mode of ONU is divided into two kinds of operating modes of daytime and night by the present invention, and 6:00~20:00 is defined as daytime
Mode, 20:00~next day 6:00 are defined as Night.Daily 6:00 automatically turns on the mode that works by day, especially by closing
Light sensor module 40 simultaneously opens the realization of infrared detection module 20, and daily 20:00 automatically turns on night operation mode, especially by
It closes infrared detection module 20 and starts the realization of light sensor module 40, infrared detection module 20 and light sensor module 40 replace
Work, realizes day and night working mode change, avoids the risk of the adverse consequences as caused by human factor, thus
Keep switching between ONU working condition more intelligent, conveniently, plays the role of energy-efficient.Specific day and night operating mode
Period only this can be not especially limited by taking the specific period as an example in the present embodiment by user's self-defining.
Under the mode of working by day, first judge whether user is in by infrared detection module 20 and open ONU, when with
ONU is closed when family is away from home, opens ONU when the user goes home, is opened automatically in the case where staying out present invention effectively prevents user
The case where opening ONU has saved electric energy, while ensure that Electrical Safety.
Under night operation mode, ONU is divided into according to the difference of setting ONU riding position and is arranged in default room (this reality
Apply in example preset room be bedroom) and ONU be not disposed on default room and two schemes be provided.
One kind is ONU setting in default room, that is, bedroom, if ONU in bedroom, with traffic monitoring and infrared acquisition knot
Judgement is closed, the mobile phone of user is unlikely to be 0 flow in the case where connecting with ONU, so ONU cannot accurately and timely accomplish certainly
Dynamic shutdown.In view of the health of user, therefore the present invention is by the brightness in bedroom come start and stop ONU, especially by light sensor
Module judges the brightness in bedroom to judge whether user has turned off the light sleep, if the brightness in bedroom is lower than preset threshold, illustrates
User has turned off the light, then closes ONU.
Another kind is that ONU is arranged at other rooms, without considering that infrared acquisition influences the health of user, with flow and red
Whether external judgement is more suitable, i.e., need to close ONU according to traffic monitoring and infrared acquisition result comprehensive descision, that is, pass through flow
Monitoring judges whether the user user that whether is in and judges by infrared detection is surfing the Internet,
The present invention, which combines, works by day mode and night operation mode and whether ONU is in default room and carrys out start and stop
ONU so that ONU more can accurate judgement user demand, it is more green and healthy.
Above-described embodiment is improved, obtains another automatically controlling ONU start and stop method, comprising: S10 is default the
One time opened the mode that works by day, and judged whether user is in;When judging that user is in, further judge ONU whether be
Open state;If it is not, automatically turning on ONU;Whether S20 opens night operation mode in default second time, judge ONU default
Room;S30 is when ONU is at default room, and further whether the brightness in the default room of judgement is lower than preset threshold, when default room
Brightness be lower than preset threshold when, ONU is automatically closed;S40 further determines whether there is stream when ONU is not at default room
Monitoring data is measured, when traffic monitoring data are not present, ONU is automatically closed.
In the very universal modern life of network, frequency when user is in using network is very high, this implementation
By first judging whether user is in example, further judges whether ONU is off-mode, automatically turned on if shutdown
ONU is realized after night closes ONU, and user is in rest daytime, can be convenient at any time when needing commonly using network quick
Online.
Above-described embodiment is improved, obtains another automatically controlling ONU start and stop method, comprising: S10 is default the
One time opened the mode that works by day, and judged whether user is in;When judging that user stays out, ONU is closed;When judging user
When being in, further judge whether ONU is open state;If ONU is not open state, ONU is automatically turned on;If ONU is to open
Machine state has then further detected whether traffic monitoring data;If there is traffic monitoring data, repeatedly detection flows monitor number
According to;Otherwise, it repeats to judge whether user is in;S20 default second time open night operation mode, judge ONU whether
Default room;S30 is when ONU is at default room, and further whether the brightness in the default room of judgement is lower than preset threshold, when default
When the brightness in room is lower than preset threshold, ONU is automatically closed;S40 further determines whether to deposit when ONU is not at default room
ONU is automatically closed when traffic monitoring data are not present in traffic monitoring data.
Specifically, merely by traffic monitoring, user is shut off ONU after stopping online, is easy in the frequent discontinuity of user
Using network when the phenomenon that causing repeated switching, by adding infrared detection module 2020, realize festivals or holidays or other
User, which is in the case where rest, makes ONU keep open state, and user closes ONU, both improve safety, reach after going out
Energy-saving effect in turn avoids when using network of the frequent discontinuity of user, causes the bad phenomenon for frequently switching on machine, drops
Low equipment loss.
Above-described embodiment is improved, obtains another automatically controlling ONU start and stop method, comprising: S10 is default the
One time opened the mode that works by day, and judged whether user is in;When judging that user is in, ONU is automatically turned on;S20 is pre-
If the second time opened night operation mode, judge whether ONU is open state;If it is not, opening ONU;Judge ONU whether pre-
If room;S30 is when ONU is at default room, and further whether the brightness in the default room of judgement is lower than preset threshold, when default room
Between brightness be lower than preset threshold when, ONU is automatically closed;S40 further determines whether exist when ONU is not at default room
ONU is automatically closed when traffic monitoring data are not present in traffic monitoring data.
Specifically, the time that in most cases user goes home is fixed, but it also will appear user once in a while very late
The case where going home, ONU is unable to Auto Power On situation in the case which solves user's late home.
Preferably, described when the brightness in default room is lower than preset threshold, ONU is automatically closed and specifically includes: working as detection
When the brightness in default room is lower than preset threshold, ONU is closed after the default waiting time.Some users habit is lain in after turning off the light
On bed again on a little while net, in order to adapt to above situation, wait for a period of time just then resting and turn off ONU, this time can
To be a regular time, it is also possible to thus be able to satisfy after user turns off the light by the time set by user and continue to surf the Internet
A variety of demands.
Above-described embodiment is improved, obtains another automatically controlling ONU start and stop method, comprising: S10 is default the
One time opened the mode that works by day, and judged whether user is in;When judging that user is in, ONU is automatically turned on;S20 is pre-
If the second time opened night operation mode, judge whether ONU is open state;If it is not, opening ONU;Judge ONU whether pre-
If room;S30 is when ONU is at default room, and further whether the brightness in the default room of judgement is lower than preset threshold, when default room
Between brightness be lower than preset threshold when, ONU is automatically closed;S40 judges whether user is in when ONU is not at default room;If
It is to further determine whether that there are traffic monitoring data;Otherwise, ONU is closed;Further determine whether that there are traffic monitoring numbers
According to, when be not present traffic monitoring data when, ONU is automatically closed.
It is further preferred that the step judges whether there is traffic monitoring data further include: when flow is not present in detection
When monitoring data, ONU is closed after the default waiting time.
Specifically, user is it is possible that the case where intermittent online, in order to meet the requirement of user's intermittence online, etc.
Waiting time to be preset, this time can be a regular time, is also possible to by the time set by user, thus
It is able to satisfy the demand demand of a variety of intermittent online.
Fig. 2 is a kind of model process figure that works by day for automatically controlling ONU start and stop method of the present invention.In conjunction with Fig. 2 to this hair
The bright workflow under the mode of working by day is introduced.
ONU be in work by day mode when, concrete operation step:
200) it presets and opens the mode that works by day at the first time,
201) judge whether user is in, if so, executing step 202;Otherwise, it executes step 204 and closes ONU.
202) judge whether ONU is open state, if it is not, executing step 205 when then ONU is in off-mode and opening
ONU;Otherwise, step 203 is executed.
203) traffic monitoring data are judged whether there is;If so, repeating step 203, otherwise, step 201 is repeated.
204 close ONU.
205 open ONU.
User opens ONU after going home, and makes user to the more convenient to use quick of ONU, improves user and use network
Comfort level.The mode that works by day of ONU, realizes user and closes ONU after going out, ONU is opened after going home, while meeting user
Be in daytime rest when can easily and fast can not only under the premise of not influencing user's use using the demand of network
It is energy-saving and safer.
Fig. 3 is a kind of night operation model process figure for automatically controlling ONU start and stop method of the present invention.In conjunction with Fig. 3 to this hair
The bright workflow under night operation mode is introduced.
When ONU is in night operation mode, specific steps are as follows:
300) night operation mode is opened.
301) judge whether ONU is switched on, if ONU is in off-mode, executes step 310 and open ONU, otherwise execute
Step 302.
302) whether ONU is arranged in default room, otherwise when being placed in elsewhere, holds if so, executing step 303)
Row step 306).
303) judge whether the brightness in default room is lower than preset threshold, if it is not, then user does not turn off the light, continue to execute step
Rapid 303) otherwise, user, which turns off the light, to rest, and executes step 304).
304) the default waiting time is waited.
305) automatic shutdown operation is executed, ONU is closed.
306) judge whether user is in, if so, thening follow the steps 307), otherwise, user is in, and executes step 305).
307) flow is judged whether there is by traffic monitoring data, if so, user is surfing the Internet, continues to execute step
307), otherwise, user does not surf the Internet, and executes step 308).
308) the default waiting time is waited, step 309 is executed.
The mode of working at night of ONU realizes user's light-off rest or closes ONU after not using network, do not influencing
Under the premise of user's use, equally achievees the purpose that energy-saving and improved safety.
Fig. 4 is a kind of composite structural diagram for automatically controlling ONU start stop system of the present invention, specific as of the invention another
Embodiment, as shown in figure 4, a kind of automatic control ONU start stop system, using the above method, comprising: mode conversion module 10, red
It outer detecting module 20, presetting module 30, light sensor module 40, traffic monitoring module 50, logic processing module 60 and opens automatically
Shutdown module 70;The mode conversion module 10 opens the mode that works by day default at the first time, opens in default second time
Open night operation mode;In the mode of working by day, the infrared detection module 20 judges whether user is in;The logical process
Module 60 receives the infrared detection module 20 and judges that controlling the automatic switching module 70 when user is in opens ONU;
In night operation mode, whether the presetting module 30 judges ONU in default room;The light sensor module 40 is described pre-
If module 30 judges ONU at default room, judge whether the brightness in default room is lower than preset threshold;The logical process mould
Block 60 receives when the light sensor module 40 judges the brightness in default room lower than preset threshold and controls the automatic switch
Machine module 70 closes ONU;The traffic monitoring module 50 judges that ONU not at default room, judges in the presetting module 30
With the presence or absence of traffic monitoring data;The logic processing module 60 receives the judgement of traffic monitoring module 50, and there is no streams
The automatic switching module 70 is controlled when measuring monitoring data closes ONU.
Specifically, the operating mode of ONU is divided into two kinds of operating modes of daytime and night by working mode change module 10,6:
00~20:00 is defined as day mode, and 20:00~next day 6:00 is defined as Night, and daily 6:00 closes light sensor mould
Block 40 simultaneously opens infrared detection module 20, and daily 20:00 closes infrared detection module 20 and starts light sensor module 40, the mould
Block realizes infrared detection module 20, light sensor module 40 works alternatively, and avoids infrared detection module 20, light sensor mould
Block 40 continues working the problem of causing equipment loss for a long time, improves the safety of equipment, and extends the service life of equipment.
Presetting module 30, whether which is used for night operation mode, for judging ONU in default room (the present embodiment
In preset room be bedroom).When ONU is at bedroom, any operation is not executed, and ONU closes light sensor in other positions
Module 40, and turn-on flow rate monitoring module 50.When the module solves ONU and is not stored in bedroom, 40 nothing of light sensor module
Method correctly judges whether the problem of turning off the light, causing error cut-off machine.
Infrared detection module 20, when starting periodically to logic processing module 60 send whether the message of presence of people.
The message whether turned off the light periodically sent to logic processing module 60 when starting for light sensor module 40.
Traffic monitoring module 50 periodically sends the message for whether having flow when starting to logic processing module 60.
Logic processing module 60 controls infrared detection module 20, light sensor module 40, traffic monitoring module according to demand
50 unlatching, closed state receive the message that infrared detection module 20, light sensor module 40, traffic monitoring module 50 are sent,
And handled, switching on and shutting down control message is sent to automatic switching module 70 when switching on and shutting down condition meets.
Automatic switching module 70 receives switching on and shutting down control message and executes the operation of automatic switching ONU.
The present invention is mainly when ONU is carried out in use, learn people by infrared detection module 20 after network on daytime is stopped using
It whether there is, and be transmitted using people's presence or absence as parameter, logic processing module 60 receives information and according to the information content
Decide whether to send switching on and shutting down control information, night provides two schemes according to whether ONU is placed in bedroom, and ONU is at bedroom
Light sensor module 40 judges whether user has turned off the light sleep, sends shutdown after logic processing module 60 waits one section after turning off the light
Information is controlled, when ONU is placed in elsewhere, logic processing module 60 is according to traffic monitoring and infrared acquisition result comprehensive descision
When transmission shutdown controls information, and ONU automatic switching module 70 receives control information and simultaneously executes automatic switching operation.
It should be noted that above-described embodiment can be freely combined as needed.The above is only of the invention preferred
Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention
Under, several improvements and modifications can also be made, these modifications and embellishments should also be considered as the scope of protection of the present invention.