CN106487895A - Time control method and device - Google Patents
Time control method and device Download PDFInfo
- Publication number
- CN106487895A CN106487895A CN201610898835.2A CN201610898835A CN106487895A CN 106487895 A CN106487895 A CN 106487895A CN 201610898835 A CN201610898835 A CN 201610898835A CN 106487895 A CN106487895 A CN 106487895A
- Authority
- CN
- China
- Prior art keywords
- time
- timing
- information
- daylight
- smart machine
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/52—Network services specially adapted for the location of the user terminal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Electric Clocks (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a kind of time control method and device, the method comprising the steps of:The geographical location information of smart machine is obtained, and the time-zone information of the smart machine location is obtained according to the geographical location information;Acquisition request timing information is added according to the timed task for the smart machine that client sends, timed task is added according to the timing information and the time-zone information, the timed task includes the standard timing time;When the standard timing time is reached, the timed task is executed.It is achieved thereby that global timer-triggered scheduler, the server for enabling all is timed control to smart machine all over the world, greatly expands range of application, improves Consumer's Experience.Further, by introducing daylight saving time information, the server for making can also accurately be timed control to the smart machine for carrying out the area of daylight-saving time, expand range of application further.
Description
Technical field
The present invention relates to Smart Home technical field, especially relates to a kind of time control method and device.
Background technology
With the development of smart home technology, increasing intelligent home device achieves intellectuality.At present, intelligent family
Occupy system to be mainly made up of server, client, intelligent domestic gateway and smart machine, wherein, generally using router as intelligence
Can home gateway, using control terminals such as mobile phone, flat board, computers as client, using the controlled plants such as intelligent home device as
Smart machine.
In prior art, in order to the timing controlled of smart machine is realized, it is typically employed in arrange on single smart machine and determines
When device mode, though the program can realize the timing controlled to smart machine, server cannot monitor each smart machine
Timing implementation status.For this purpose, there is another kind of timing control scheme, i.e., the remote timing of smart machine is realized by server
Control so that server can monitor the timing implementation status of each smart machine, and fixed without the need for installing on smart machine
When device can also realize timing controlled, advantageously reduce the cost of whole system.
But, be timed in the solution of control by server at present, server can only support one specific when
The timing controlled in area, it is impossible to meet global timer-triggered scheduler, while cannot also meet the timer-triggered scheduler of different daylight-saving times, in other words
Say, timing controlled can only be realized to the smart machine of given area, make troubles to the timing controlled of smart machine, limiting should
Use scope.
Content of the invention
The main purpose of the embodiment of the present invention is to provide a kind of time control method and device, it is intended to which smart machine is entered
Global timer-triggered scheduler is realized during row timing controlled, expands range of application.
To achieve these objectives, on the one hand a kind of time control method is proposed, methods described is applied to server, including following
Step:
The geographical location information of smart machine is obtained, the smart machine location is obtained according to the geographical location information
The time-zone information in area;
Acquisition request timing information is added according to the timed task for the smart machine that client sends, according to institute
State timing information and the time-zone information adds timed task, the timed task includes the standard timing time;
When the standard timing time is reached, the timed task is executed.
Alternatively, methods described also includes:
Judge the smart machine location with the presence or absence of the daylight-saving time according to the geographical location information;
The daylight saving time information of the smart machine location when there is the daylight-saving time, is obtained, and is set according to the intelligence
Standby timing information, the time-zone information and the daylight saving time information add timed task.
Alternatively, the timing information includes original timing and timing-type, and the daylight saving time information includes the summertime
When the period, when the timing-type is single timing, the timing information according to the smart machine, the time-zone information
And the daylight saving time information adds timed task and includes:
Judge the original timing whether within period daylight-saving time;
When not within period daylight-saving time, the mark is arranged according to the original timing and the time-zone information
Quasi- timing;
When within period daylight-saving time, according to the original timing, the time-zone information and the daylight-saving time
Information arranges the standard timing time.
Alternatively, the timing information includes original timing and timing-type, and the daylight saving time information includes the summertime
When the period, when the timing-type is circulation timing, the timing information according to the smart machine, the time-zone information
And the daylight saving time information adds timed task and includes:
Arranged for period daylight-saving time according to the original timing, the time-zone information and the daylight saving time information
The standard timing time, the standard is arranged for non-period daylight-saving time according to the original timing and the time-zone information
Timing.
Alternatively, the geographical location information for obtaining smart machine includes:
When receive the client transmission for the smart machine bind request when, from the client obtain
The geographical location information of the smart machine;Or,
When the timed task for the smart machine for receiving client transmission adds request, from the visitor
Family end obtains the geographical location information of the smart machine.
Alternatively, the execution timed task includes:
Judge whether the smart machine is online;
When the smart machine is online, control instruction is sent to the smart machine;
When the smart machine is not online, information is sent to the client.
On the other hand, a kind of timing control apparatus are proposed, and described device is applied to server, including:
Data obtaining module, for obtaining the geographical location information of smart machine, obtains according to the geographical location information
The time-zone information of the smart machine location;
Task add module, the timed task for the smart machine for being sent according to client are added request and are obtained
Timing information is taken, timed task is added according to the timing information and the time-zone information, the timed task includes that standard is fixed
When the time;
Task execution module, for when the standard timing time is reached, executing the timed task.
Alternatively, described information acquisition module is additionally operable to:The smart machine institute is judged according to the geographical location information
Whether there is the daylight-saving time in area, when there is the daylight-saving time, obtaining the daylight saving time information of the smart machine location;
The task add module is used for:When the smart machine location has the daylight-saving time, set according to the intelligence
Standby timing information, time-zone information and daylight saving time information add timed task.
Alternatively, the timing information includes original timing and timing-type, and the daylight saving time information includes the summertime
When the period, when the timing-type be single timing when, the task add module is used for:
Judge the original timing whether within period daylight-saving time;When not within period daylight-saving time,
The standard timing time is arranged according to the original timing and the time-zone information;When within period daylight-saving time
When, the standard timing time is arranged according to the original timing, the time-zone information and the daylight saving time information.
Alternatively, the timing information includes original timing and timing-type, and the daylight saving time information includes the summertime
When the period, when the timing-type be circulation timing when, the task add module is used for:
Arranged for period daylight-saving time according to the original timing, the time-zone information and the daylight saving time information
The standard timing time, the standard is arranged for non-period daylight-saving time according to the original timing and the time-zone information
Timing.
Alternatively, described information acquisition module is used for:
When receive the client transmission for the smart machine bind request when, from the client obtain
The geographical location information of the smart machine;Or,
When the timed task for the smart machine for receiving client transmission adds request, from the visitor
Family end obtains the geographical location information of the smart machine.
Alternatively, the task execution module is used for:
When the standard timing time is reached, judge whether the smart machine is online;When the smart machine is online
When, control instruction is sent to the smart machine;When the smart machine is not online, prompting letter is sent to the client
Breath.
A kind of time control method that the embodiment of the present invention is provided, by obtaining the geographical location information of smart machine,
And obtain the time-zone information of smart machine location according to geographical location information, then according to timing information and time-zone information come
Add timed task and then control is timed to smart machine, it is achieved thereby that global timer-triggered scheduler, the server for enabling
Control is all timed to smart machine all over the world, greatly range of application is expanded, improve Consumer's Experience.Further
Ground, by introducing daylight saving time information, the server for making can also accurately be carried out determining to the smart machine for carrying out the area of daylight-saving time
When control, expand range of application further.
Description of the drawings
Fig. 1 is the flow chart of the time control method of first embodiment of the invention;
Fig. 2 is the flow chart of the time control method of not invention second embodiment;
Fig. 3 is the flow chart of the time control method of third embodiment of the invention;
Fig. 4 is the module diagram of the timing control apparatus of fourth embodiment of the invention.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
It should be appreciated that specific embodiment described herein is not intended to limit the present invention only in order to explain the present invention.
Embodiment one
Referring to Fig. 1, the time control method of first embodiment of the invention is proposed, methods described is applied to server, including
Following steps:
S11, the geographical location information of acquisition smart machine, obtain smart machine location according to geographical location information
Time-zone information.
The controlled plant of the smart machine described in the embodiment of the present invention, i.e. server controls, the controlled plant are mainly
Intelligent home device, naturally it is also possible to be other smart machines.
The terminal device of the client described in the embodiment of the present invention, i.e. user side, the terminal device mainly include mobile phone,
The mobile terminals such as flat board, naturally it is also possible to be the fixed terminals such as PC.
Alternatively, server can receive client transmission for smart machine bind request when, just from visitor
Family end obtains the geographical location information of the smart machine.For example, mobile terminal (client) starts application (as intelligence man 365 should
With), account and password login server is input into, please for the binding of a certain smart machine to server transmission by the application
Ask;After server receives bind request, it is desirable to which the geographical location information of mobile terminal reporting smart machine is (as longitude and latitude is believed
Breath), mobile terminal obtains automatically the geographical location information of the machine or obtains user and is manually entered geographical location information as intelligence
The geographical location information of equipment reports server, and server preserves smart machine and its geographical location information to database.
In certain embodiments, after server obtains the geographical location information of smart machine, immediately according to the geographical position
The time-zone information of the acquisition of information smart machine location, and preserve geographical location information and the time zone letter of the smart machine
Breath, or the time-zone information for only preserving the smart machine.The timing for the smart machine that subsequently received client sends
When task adds request, the time-zone information of the extracting directly smart machine.
In further embodiments, preserved after the geographical location information of server acquisition smart machine.When after continued access
Receive client transmission for the smart machine timed task add request when, further according to preserve geographical location information come
Obtain time-zone information.And the time-zone information can be preserved further, subsequently receive the timed task for the smart machine again
When adding request, the time-zone information of the extracting directly smart machine.
Alternatively, server can add request in the timed task for smart machine for receiving client transmission
When, the geographical location information of smart machine is just obtained from client, and time-zone information is obtained according to the geographical location information, preserve
The geographical location information of the smart machine and/or time-zone information.For example, mobile terminal (client) starts application (as intelligence man 365
Application), account and password login server is input into, the timing by the application to server transmission for a certain smart machine is appointed
Request is added in business;After server receives timed task interpolation request, it is desirable to the geographical position of mobile terminal reporting smart machine
Information (as latitude and longitude information), mobile terminal obtain automatically the geographical location information of the machine or obtain user and is manually entered geographical position
Confidence breath reports server as the geographical location information of smart machine, and server obtains time zone according to the geographical location information
Information, and the geographical location information of the smart machine and/or time-zone information is preserved to database.
In the embodiment of the present invention, latitude and longitude information that server can include according to geographical location information and when Division rule
The time zone of smart machine location is then obtained, it is also possible to inquire about the corresponding relation in default geographical location information and time zone to obtain
Take the time zone of smart machine location.The time-zone information such as DongNQu, XiMQu, wherein, 1≤N≤12,1≤M≤12.
S12, the timed task interpolation acquisition request timing information for smart machine sent according to client, according to fixed
When information and time-zone information add timed task.After adding timed task, when judging whether the standard timing for reaching timed task
Between, when the standard timing time is reached, enter step S13.
Specifically, server parses the timed task interpolation request for smart machine of client transmission first, obtains
Timing information, the timing information include the information such as original timing, timing-type, control mode.During the original timing
Between timing i.e. under the time zone of smart machine place, the timing-type such as single timing, circulation timing etc., the controlling party
Formula such as starts, closes, start Preset Time after close etc..
Then, server arranges the standard timing time according to original timing and time-zone information, specially:Server root
Privacy cm time zone offset privacy CM is obtained according to time-zone information, privacy cm time zone offset privacy CM is deducted using original timing and obtain the Coordinated Universal Time(UTC)
Timing, i.e. the standard timing time under (Coordinated Universal Time, UTC).For example, it is assumed that smart machine
The time zone at place is Dong8Qu, then corresponding privacy cm time zone offset privacy CM is+8 hours, and original timing is 10:00, then standard is set
Timing=10:00-8=2:00;Assume that the time zone that smart machine is located is Xi6Qu, then corresponding privacy cm time zone offset privacy CM is -6
Hour, and original timing is 8:00, then standard timing time=8 are set:00- (- 6)=14:00.
Finally, server adds timed task according to information such as standard timing time, timing-type, control modes.
After adding timed task, monitoring server system time, the system time are UTC time.When system time is reached
During the standard timing time, then next step S13 is entered, execute timed task.
S13, execution timed task.
Specifically, after the standard timing time is reached, server judges whether smart machine is online, when smart machine is online
When, server then sends control instruction to smart machine, the operation such as starts, closes to control smart machine to carry out.Further,
After timed task is executed, the information that server is also run succeeded to client feedback timed task.
Further, when smart machine is not online, server then sends information, such as prompting user's intelligence to client
Energy unit exception, timed task execute failure.
The time control method of the embodiment of the present invention, by obtaining the geographical location information of smart machine, and according to geography
Positional information obtains the time-zone information of smart machine location, then adds timing according to timing information and time-zone information and appoints
Business is further timed control to smart machine, it is achieved thereby that global timer-triggered scheduler, the server for enabling is to all over the world
Smart machine be all timed control, greatly expand range of application, improve Consumer's Experience.
Embodiment two
With reference to Fig. 2, propose the time control method of second embodiment of the invention, methods described application server, including with
Lower step:
S21, the geographical location information of acquisition smart machine.Judge smart machine location with the presence or absence of the daylight-saving time;When
When there is no the daylight-saving time, step S22 is entered;When there is the daylight-saving time, step S24 is entered.
Alternatively, server can receive client transmission for smart machine bind request when, just from visitor
Family end obtains the geographical location information of the smart machine.
In certain embodiments, after server obtains the geographical location information of smart machine, believed according to geographical position immediately
Breath judges smart machine location with the presence or absence of the daylight-saving time.When there is no the daylight-saving time, entering step S22 and obtaining time zone letter
Breath;When there is the daylight-saving time, entering step S24 and obtaining time-zone information and daylight saving time information.
In further embodiments, preserved after the geographical location information of server acquisition smart machine.When after continued access
Receive client transmission for the smart machine timed task add request when, further according to geographical location information judge intelligence
Equipment location whether there is the daylight-saving time.When there is no the daylight-saving time, entering step S22 and obtaining time-zone information;When there is the summer
Order constantly, enters step S24 and obtains time-zone information and daylight saving time information.
Alternatively, server can add request in the timed task for smart machine for receiving client transmission
When, the geographical location information of smart machine is just obtained from client, and smart machine location is judged according to geographical location information
With the presence or absence of the daylight-saving time.When there is no the daylight-saving time, entering step S22 and obtaining time-zone information;When there is the daylight-saving time, step is entered
Rapid S24 obtains time-zone information and daylight saving time information.
S22, the time-zone information according to geographical location information acquisition smart machine location.
In the embodiment of the present invention, latitude and longitude information that server can include according to geographical location information and when Division rule
The time zone of smart machine location is then obtained, it is also possible to inquire about the corresponding relation in default geographical location information and time zone to obtain
Take the time zone of smart machine location.The time-zone information such as DongNQu, XiMQu, wherein, 1≤N≤12,1≤M≤12.
S23, the timed task interpolation acquisition request timing information for smart machine sent according to client, according to fixed
When information and time-zone information add timed task.
This step S23 is identical with step S12 in first embodiment, will not be described here.
S24, the time-zone information according to geographical location information acquisition smart machine location and daylight saving time information.
In the embodiment of the present invention, server can be corresponding with daylight saving time information by inquiring about default geographical location information
Relation is obtaining the daylight saving time information of smart machine location, it is also possible to obtain smart machine by third party's Time Service business
The daylight saving time information of location.The daylight saving time information includes the information such as period daylight-saving time, daylight-saving time side-play amount, the summertime
When the period comprising time started of daylight-saving time and end time, the daylight-saving time side-play amount is i.e. in normal time (i.e. during the winter) base
The time quantum increased on plinth.
Span according to period daylight-saving time is different, and the daylight-saving time can be divided into daylight-saving time and across year daylight-saving time in year.Summer in year
When making, i.e. the time started of period daylight-saving time and the end time is all in same year;The opening of across year daylight-saving time, i.e. period daylight-saving time
Time beginning and end time, in other words, period daylight-saving time from the previous year crossed latter 1 year respectively within two years.
S25, the timed task interpolation acquisition request timing information for smart machine sent according to client, according to fixed
When information, time-zone information and daylight saving time information add timed task.
In this step S25, server parses the timed task for smart machine of client transmission first and adds request,
Timing information is obtained, the timing information includes the information such as original timing, timing-type, control mode.Described original fixed
When the time be timing under the time zone of smart machine place, the control mode is closed as started, closing, start after Preset Time
Close.
In the present embodiment, timing-type includes single timing and two kinds of circulation timing, and it is fixed that single timing is only carried out once
When control, circulation timing carries out multiple timing control.Two kinds of timing-type correspond to two kinds of different timed tasks respectively to be added
Mode, wherein:
Single timing:
Whether server judges original timing within period daylight-saving time.When not within period daylight-saving time, server
Then the standard timing time is arranged according to original timing and time-zone information, i.e.,:It is inclined that server obtains time zone according to time-zone information
Shifting amount, deducts privacy cm time zone offset privacy CM using original timing and obtains timing, i.e. standard timing time under UTC.When in the summer
When making in the period, server then arranges the standard timing time according to original timing, time-zone information and daylight saving time information,
I.e.:Server obtains privacy cm time zone offset privacy CM and daylight-saving time side-play amount respectively according to time-zone information and daylight saving time information, using original fixed
When the time deduct privacy cm time zone offset privacy CM and daylight-saving time side-play amount and obtain timing, i.e. standard timing time under UTC.Finally, take
Business device adds timed task according to information such as standard timing time, timing-type, control modes.
For example, it is assumed that original timing is on May 20 14:00, period daylight-saving time is on April 1 13:00 starts to September
30 days 15:00 terminates, then original timing within period daylight-saving time, while assume that the time zone that smart machine is located is Dong8Qu,
Then corresponding privacy cm time zone offset privacy CM is+8 hours, and assumes daylight-saving time side-play amount for+1 hour, then arrange the standard timing time=
14:00-8-1=5:00.
Circulation timing:
Due to including period daylight-saving time and non-period daylight-saving time a year, when therefore server needs respectively different
Section arranges the standard timing time.I.e.:Mark is arranged for period daylight-saving time according to original timing, time-zone information and daylight saving time information
Quasi- timing, set-up mode are identical with situation of the original timing within period daylight-saving time during aforementioned single timing;According to
Original timing and time-zone information arrange the standard timing time for non-period daylight-saving time, set-up mode with during aforementioned single timing
Situation of the original timing not within period daylight-saving time is identical.Finally, according to standard timing time, timing-type, controlling party
The information such as formula add timed task.
Wherein, it is divided into three periods in year in one year of daylight-saving time, respectively one period daylight-saving time and respectively at this
Two non-periods daylight-saving time before and after period daylight-saving time, that is to say, that annual head and the tail are non-periods daylight-saving time, and centre is
Period daylight-saving time, it is therefore desirable to be respectively provided with three standard timing times in the manner previously described, each period correspond to a mark
Quasi- timing.Across the year daylight-saving time is equally divided into three periods, respectively one non-period daylight-saving time and difference a year
Two periods daylight-saving time before and after non-period daylight-saving time, that is to say, that annual head and the tail are periods daylight-saving time, middle
It it is non-period daylight-saving time, it is therefore desirable to be respectively provided with three standard timing times in the manner previously described, each period corresponds to one
The individual standard timing time.
S26, judge whether reach timed task the standard timing time.When the standard timing time is reached, step is entered
S27.
After adding timed task, monitoring server system time, the system time are UTC time.When system time is reached
During the standard timing time, then next step S27 is entered, execute timed task.
S27, execution timed task.
Specifically, after the standard timing time is reached, server judges whether smart machine is online, when smart machine is online
When, server then sends control instruction to smart machine, the operation such as starts, closes to control smart machine to carry out.Further,
After timed task is executed, the information that server is also run succeeded to client feedback timed task.
Further, when smart machine is not online, server then sends information, such as prompting user's intelligence to client
Energy unit exception, timed task execute failure.
, by introducing daylight saving time information, the server for making can also be to the smart machine in the area of implementation daylight-saving time for the present embodiment
Control is accurately timed, expands range of application further.
Embodiment three
With reference to Fig. 3, the time control method of third embodiment of the invention is proposed, methods described is applied to server, including
Following steps:
The bind request for smart machine that S31, reception client send.
S32, bindings are carried out, and the geographical location information of the smart machine is obtained from client and preserve.
The timed task for smart machine that S33, reception client send adds request.Judge smart machine location
Area whether there is the daylight-saving time;When there is no the daylight-saving time, step S34 is entered;When there is the daylight-saving time, step S36 is entered.
S34, the time-zone information according to geographical location information acquisition smart machine location.
S35, acquisition request timing information is added according to timed task, timing is added according to timing information and time-zone information and is appointed
Business.
S36, the time-zone information according to geographical location information acquisition smart machine location and daylight saving time information.
S37, add timing information of the acquisition request comprising original timing and timing-type according to timed task.Judge
Timing-type is single timing or circulation timing;When timing-type is for single timing, step S38 is entered;Work as timing-type
During for circulation timing, step S41 is entered.
S38, judge original timing whether within period daylight-saving time.When not within period daylight-saving time, step is entered
S39;When within period daylight-saving time, step S40 is entered.
S39, the standard timing time is arranged according to original timing and time-zone information, add timed task.
S40, according to original timing, time-zone information and daylight saving time information arrange the standard timing time, add timing appoint
Business.
S41, the standard timing time is arranged for non-period daylight-saving time according to original timing and time-zone information, according to original
Timing, time-zone information and daylight saving time information arrange the standard timing time for period daylight-saving time, add timed task.
S42, judge whether reach timed task the standard timing time.When the standard timing time is reached, step is entered
S43.
S43, execution timed task.
Further, in the embodiment of the present invention, timer can also be set in smart machine, server or client will
Geographical location information is synchronized to smart machine, and smart machine is periodically to NTP (Network Time Protocol) server sync
UTC time, privacy cm time zone offset privacy CM and daylight-saving time offset calibration local zone time of the smart machine by location, so as to by fixed
When device realize local timing controlled.
Example IV
Referring to Fig. 4, the timing control apparatus of fourth embodiment of the invention are proposed, described device is applied to server, including
Data obtaining module, task add module and task execution module, wherein:
Data obtaining module:For the geographical location information of smart machine is obtained, intelligence is obtained according to geographical location information
The time-zone information of equipment location.
Alternatively, data obtaining module can receive client transmission for smart machine bind request when,
The geographical location information of the smart machine is just obtained from client.
In certain embodiments, after data obtaining module obtains the geographical location information of smart machine, immediately according to the ground
Reason positional information obtains the time-zone information of the smart machine location, and preserve the smart machine geographical location information and when
Area's information, or only preserve the time-zone information of the smart machine.Subsequently received client send for the smart machine
When timed task adds request, the time-zone information of the extracting directly smart machine.
In further embodiments, preserved after the geographical location information of data obtaining module acquisition smart machine.When
When the timed task for the smart machine that subsequently received client sends adds request, further according to the geographical position for preserving
Information is obtaining time-zone information.And the time-zone information can be preserved further, subsequently receive determining for the smart machine again
When task add request when, the time-zone information of the extracting directly smart machine.
Alternatively, data obtaining module can add in the timed task for smart machine for receiving client transmission
The geographical location information of smart machine during request, is just obtained from client, and time-zone information is obtained according to the geographical location information,
Preserve geographical location information and/or the time-zone information of the smart machine.
In the embodiment of the present invention, latitude and longitude information and time zone that data obtaining module can include according to geographical location information
Division rule obtains the time zone of smart machine location, it is also possible to inquire about default geographical location information pass corresponding with time zone
Be obtaining the time zone of smart machine location.The time-zone information such as DongNQu, XiMQu, wherein, 1≤N≤12,1≤M≤
12.
Task add module:It is fixed that the timed task for smart machine for being sent according to client adds acquisition request
When information, timed task is added according to timing information and time-zone information.
Specifically, after the timed task for smart machine for receiving client transmission adds request, task is added
Module parses timed task first and adds request, obtains timing information, and the timing information includes original timing, timing class
The information such as type, control mode.The original timing is the timing under the time zone of smart machine place, the timing-type
Such as single timing, circulation timing etc., the control mode such as starts, closes, start Preset Time after close etc..
Then, task add module arranges the standard timing time according to original timing and time-zone information, specially:Appoint
Business add module obtains privacy cm time zone offset privacy CM according to time-zone information, deducts privacy cm time zone offset privacy CM using original timing and obtains under UTC
Timing, i.e. standard timing time.For example, it is assumed that the time zone that smart machine is located is Dong8Qu, then corresponding time zone offset
Measure as+8 hours, and original timing is 10:00, then standard timing time=10 are set:00-8=2:00;Assume that intelligence sets
The standby time zone being located is Xi6Qu, then corresponding privacy cm time zone offset privacy CM is -6 hours, and original timing is 8:00, then mark is set
Quasi- timing=8:00- (- 6)=14:00.
Finally, task add module is added timing according to information such as standard timing time, timing-type, control modes and is appointed
Business.
Task execution module:For when the standard timing time of timed task is reached, executing timed task.
In the embodiment of the present invention, after timed task is added, task execution module then monitoring system time, the system time
For UTC time.When system time reaches the standard timing time, then execute timed task.
Specifically, after the standard timing time is reached, task execution module judges whether smart machine is online, when intelligence sets
When standby online, then control instruction is sent to smart machine, the operation such as start, close to control smart machine to carry out.Further,
After timed task is executed, the information that task execution module is also run succeeded to client feedback timed task.
Further, when smart machine is not online, server then sends information, such as prompting user's intelligence to client
Energy unit exception, timed task execute failure.
Further, in a preferred embodiment, data obtaining module is additionally operable to:Intelligence is judged according to geographical location information
Energy equipment location whether there is the daylight-saving time, when there is the daylight-saving time, obtain the daylight saving time information of smart machine location;
Task add module is used for:When smart machine location has the daylight-saving time, the timing information according to smart machine, time-zone information
And the daylight saving time information adds timed task.
Specifically, data obtaining module can default geographical location information is corresponding with daylight saving time information to close by inquiring about
Be obtaining the daylight saving time information of smart machine location, it is also possible to smart machine institute is obtained by third party's Time Service business
Daylight saving time information in area.The daylight saving time information includes the information such as period daylight-saving time, daylight-saving time side-play amount, the daylight-saving time
Time started of the period comprising the daylight-saving time and end time, the daylight-saving time side-play amount is i.e. on normal time (i.e. during winter) basis
The time quantum of upper increase.
Span according to period daylight-saving time is different, and the daylight-saving time can be divided into daylight-saving time and across year daylight-saving time in year.Summer in year
When making, i.e. the time started of period daylight-saving time and the end time is all in same year;The opening of across year daylight-saving time, i.e. period daylight-saving time
Time beginning and end time, in other words, period daylight-saving time from the previous year crossed latter 1 year respectively within two years.
Task add module adds timed task according to timing-type, and the timing-type includes single timing and circulation
Regularly two kinds, wherein:
Single timing:
When timing-type is for single timing, whether task add module judges original timing in period daylight-saving time
Interior.When not within period daylight-saving time, task add module then arranges standard timing according to original timing and time-zone information
Time, i.e.,:Task add module obtains privacy cm time zone offset privacy CM according to time-zone information, deducts privacy cm time zone offset privacy CM using original timing
Obtain timing, i.e. the standard timing time under UTC.When within period daylight-saving time, task add module is then according to original
Timing, time-zone information and daylight saving time information arrange the standard timing time, i.e.,:Task add module is according to time-zone information and summer
When making, information obtains privacy cm time zone offset privacy CM and daylight-saving time side-play amount respectively, deducts privacy cm time zone offset privacy CM and summertime using original timing
Hour offset amount obtains timing, i.e. the standard timing time under UTC.Finally, task add module according to the standard timing time,
The information such as timing-type, control mode add timed task.
For example, it is assumed that original timing is on May 20 14:00, period daylight-saving time is on April 1 13:00 starts to September
30 days 15:00 terminates, then original timing within period daylight-saving time, while assume that the time zone that smart machine is located is Dong8Qu,
Then corresponding privacy cm time zone offset privacy CM is+8 hours, and assumes daylight-saving time side-play amount for+1 hour, then arrange the standard timing time=
14:00-8-1=5:00.
Circulation timing:
When timing-type is for circulation timing, due to including period daylight-saving time and non-period daylight-saving time a year, therefore
Task add module needs the respectively different periods to arrange the standard timing time.I.e.:According to original timing, time-zone information
Standard timing time, set-up mode and original timing during aforementioned single timing are set for period daylight-saving time with daylight saving time information
Situation within period daylight-saving time is identical;Standard timing is arranged for non-period daylight-saving time according to original timing and time-zone information
Time, the situation of set-up mode and original timing during aforementioned single timing not within period daylight-saving time are identical.Finally, according to
The information such as standard timing time, timing-type, control mode add timed task.
Wherein, it is divided into three periods in year in one year of daylight-saving time, respectively one period daylight-saving time and respectively at this
Two non-periods daylight-saving time before and after period daylight-saving time, that is to say, that annual head and the tail are non-periods daylight-saving time, and centre is
Period daylight-saving time, it is therefore desirable to be respectively provided with three standard timing times in the manner previously described, each period correspond to a mark
Quasi- timing.Across the year daylight-saving time is equally divided into three periods, respectively one non-period daylight-saving time and difference a year
Two periods daylight-saving time before and after non-period daylight-saving time, that is to say, that annual head and the tail are periods daylight-saving time, middle
It it is non-period daylight-saving time, it is therefore desirable to be respectively provided with three standard timing times in the manner previously described, each period corresponds to one
The individual standard timing time.
The timing control apparatus of the embodiment of the present invention, by obtaining the geographical location information of smart machine, and according to geography
Positional information obtains the time-zone information of smart machine location, then adds timing according to timing information and time-zone information and appoints
Business is further timed control to smart machine, it is achieved thereby that global timer-triggered scheduler, the server for enabling is to all over the world
Smart machine be all timed control, greatly expand range of application, improve Consumer's Experience.Further by introducing the summer
Information when making, the server for making can also accurately be timed control to the smart machine for carrying out the area of daylight-saving time, further
Expand range of application.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform by software to realize, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words
The part for going out contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium
In (as ROM/RAM, magnetic disc, CD), use so that a station terminal equipment including some instructions (can be mobile phone, computer, clothes
Business device, or the network equipment etc.) execute method described in each embodiment of the present invention.
Above by reference to the preferred embodiments of the present invention have been illustrated, not thereby limit to the interest field of the present invention.This
Skilled person can have multiple flexible programs to realize the present invention, for example as one without departing from the scope of the present invention and essence
The feature of individual embodiment can be used for another embodiment and obtain another embodiment.Institute within all technology designs with the present invention
Any modification, equivalent and the improvement that makees, all should be within the interest field of the present invention.
Claims (10)
1. a kind of time control method, is applied to server, it is characterised in that comprise the following steps:
The geographical location information of smart machine is obtained, the smart machine location is obtained according to the geographical location information
Time-zone information;
Acquisition request timing information is added according to the timed task for the smart machine that client sends, according to described fixed
When information and the time-zone information add timed task, the timed task includes the standard timing time;
When the standard timing time is reached, the timed task is executed.
2. time control method according to claim 1, it is characterised in that methods described also includes:
Judge the smart machine location with the presence or absence of the daylight-saving time according to the geographical location information;
When there is the daylight-saving time, the daylight saving time information of the smart machine location is obtained, and according to the smart machine
Timing information, the time-zone information and the daylight saving time information add timed task.
3. time control method according to claim 2, it is characterised in that the timing information includes original timing
And timing-type, the daylight saving time information includes period daylight-saving time, when the timing-type is single timing, described according to institute
Timing information, the time-zone information and the daylight saving time information interpolation timed task for stating smart machine includes:
Judge the original timing whether within period daylight-saving time;
When not within period daylight-saving time, the standard is arranged according to the original timing and the time-zone information fixed
When the time;
When within period daylight-saving time, according to the original timing, the time-zone information and the daylight saving time information
The standard timing time is set.
4. time control method according to claim 2, it is characterised in that the timing information includes original timing
And timing-type, the daylight saving time information includes period daylight-saving time, when the timing-type is circulation timing, described according to institute
Timing information, the time-zone information and the daylight saving time information interpolation timed task for stating smart machine includes:
According to the original timing, the time-zone information and the daylight saving time information were arranged for period daylight-saving time
The standard timing time, the standard timing is arranged for non-period daylight-saving time according to the original timing and the time-zone information
Time.
5. the time control method according to any one of claim 1-4, it is characterised in that the ground of the acquisition smart machine
Reason positional information includes:
When receive client transmission for the smart machine bind request when, obtain from the client described
The geographical location information of smart machine;Or,
When the timed task for the smart machine for receiving client transmission adds request, from the client
Obtain the geographical location information of the smart machine.
6. a kind of timing control apparatus, are applied to server, it is characterised in that include:
Data obtaining module, for obtaining the geographical location information of smart machine, according to the geographical location information is obtained
The time-zone information of smart machine location;
Task add module, it is fixed that the timed task for the smart machine for being sent according to client adds acquisition request
When information, timed task is added according to the timing information and the time-zone information, when the timed task includes standard timing
Between;
Task execution module, for when the standard timing time is reached, executing the timed task.
7. timing control apparatus according to claim 6, it is characterised in that described information acquisition module is additionally operable to:According to
The geographical location information judges the smart machine location with the presence or absence of the daylight-saving time, when there is the daylight-saving time, obtains institute
State the daylight saving time information of smart machine location;
The task add module is used for:When the smart machine location has the daylight-saving time, according to the smart machine
Timing information, time-zone information and daylight saving time information add timed task.
8. timing control apparatus according to claim 7, it is characterised in that the timing information includes original timing
And timing-type, the daylight saving time information includes period daylight-saving time, and when the timing-type is single timing, the task adds
Plus module is used for:
Judge the original timing whether within period daylight-saving time;When not within period daylight-saving time, according to
The original timing and the time-zone information arrange the standard timing time;When within period daylight-saving time, root
According to the original timing, the time-zone information and the daylight saving time information, the standard timing time is set.
9. timing control apparatus according to claim 7, it is characterised in that the timing information includes original timing
And timing-type, the daylight saving time information includes period daylight-saving time, and when the timing-type is circulation timing, the task adds
Plus module is used for:
According to the original timing, the time-zone information and the daylight saving time information were arranged for period daylight-saving time
The standard timing time, the standard timing is arranged for non-period daylight-saving time according to the original timing and the time-zone information
Time.
10. timing control apparatus according to any one of claim 6-9, it is characterised in that described information acquisition module is used
In:
When receive client transmission for the smart machine bind request when, obtain from the client described
The geographical location information of smart machine;Or,
When the timed task for the smart machine for receiving client transmission adds request, from the client
Obtain the geographical location information of the smart machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610898835.2A CN106487895A (en) | 2016-10-14 | 2016-10-14 | Time control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610898835.2A CN106487895A (en) | 2016-10-14 | 2016-10-14 | Time control method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106487895A true CN106487895A (en) | 2017-03-08 |
Family
ID=58269630
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610898835.2A Pending CN106487895A (en) | 2016-10-14 | 2016-10-14 | Time control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106487895A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108957073A (en) * | 2018-06-29 | 2018-12-07 | 宁波三星智能电气有限公司 | A kind of intelligent electric meter settlement method |
CN109951559A (en) * | 2019-03-27 | 2019-06-28 | 京东方光科技有限公司 | Timed task configuration method, server, system and computer readable storage medium |
CN110099236A (en) * | 2018-01-30 | 2019-08-06 | 杭州海康威视系统技术有限公司 | Video data storage method, requesting method and storage device, request unit |
CN110837228A (en) * | 2018-08-17 | 2020-02-25 | 珠海格力电器股份有限公司 | Intelligent household appliance single and circulating cloud timing control system and control method thereof |
CN111125436A (en) * | 2018-10-31 | 2020-05-08 | 杭州海康威视系统技术有限公司 | Data management method, device and system |
CN111339128A (en) * | 2018-12-18 | 2020-06-26 | 北京嘀嘀无限科技发展有限公司 | Data acquisition method and device, electronic equipment and storage medium |
CN111565326A (en) * | 2019-12-03 | 2020-08-21 | 海信视像科技股份有限公司 | Updating method of reserved recording time and display equipment |
CN111679898A (en) * | 2020-06-08 | 2020-09-18 | 中国银行股份有限公司 | Scheduling method and device of timing task, computer equipment and readable storage medium |
CN112486529A (en) * | 2020-11-19 | 2021-03-12 | 深圳拓邦股份有限公司 | Global equipment timing upgrading method, system, server and storage medium |
CN114356024A (en) * | 2021-12-08 | 2022-04-15 | 杭州华橙软件技术有限公司 | Method for automatically setting daylight saving time in intelligent equipment, cloud platform and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102088437A (en) * | 2009-12-02 | 2011-06-08 | 华为技术有限公司 | Method and system for setting timing play device |
CN103092959A (en) * | 2013-01-18 | 2013-05-08 | 中兴通讯股份有限公司 | Processing method and device for task time zone |
CN104426644A (en) * | 2013-08-21 | 2015-03-18 | 华为技术有限公司 | Equipment time synchronization method and device |
WO2016050065A1 (en) * | 2014-09-30 | 2016-04-07 | 中兴通讯股份有限公司 | Method, apparatus and system for setting timed event of terminal |
-
2016
- 2016-10-14 CN CN201610898835.2A patent/CN106487895A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102088437A (en) * | 2009-12-02 | 2011-06-08 | 华为技术有限公司 | Method and system for setting timing play device |
CN103092959A (en) * | 2013-01-18 | 2013-05-08 | 中兴通讯股份有限公司 | Processing method and device for task time zone |
CN104426644A (en) * | 2013-08-21 | 2015-03-18 | 华为技术有限公司 | Equipment time synchronization method and device |
WO2016050065A1 (en) * | 2014-09-30 | 2016-04-07 | 中兴通讯股份有限公司 | Method, apparatus and system for setting timed event of terminal |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110099236A (en) * | 2018-01-30 | 2019-08-06 | 杭州海康威视系统技术有限公司 | Video data storage method, requesting method and storage device, request unit |
WO2019149045A1 (en) * | 2018-01-30 | 2019-08-08 | 杭州海康威视系统技术有限公司 | Video data storage method, request method, storage apparatus and request apparatus |
CN110099236B (en) * | 2018-01-30 | 2021-03-02 | 杭州海康威视系统技术有限公司 | Video data storage method, video data request method, video data storage device and video data request device |
CN108957073A (en) * | 2018-06-29 | 2018-12-07 | 宁波三星智能电气有限公司 | A kind of intelligent electric meter settlement method |
CN110837228A (en) * | 2018-08-17 | 2020-02-25 | 珠海格力电器股份有限公司 | Intelligent household appliance single and circulating cloud timing control system and control method thereof |
CN111125436B (en) * | 2018-10-31 | 2023-08-08 | 杭州海康威视系统技术有限公司 | Data management method, device and system |
CN111125436A (en) * | 2018-10-31 | 2020-05-08 | 杭州海康威视系统技术有限公司 | Data management method, device and system |
CN111339128A (en) * | 2018-12-18 | 2020-06-26 | 北京嘀嘀无限科技发展有限公司 | Data acquisition method and device, electronic equipment and storage medium |
CN111339128B (en) * | 2018-12-18 | 2023-09-26 | 北京嘀嘀无限科技发展有限公司 | Data acquisition method and device, electronic equipment and storage medium |
CN109951559A (en) * | 2019-03-27 | 2019-06-28 | 京东方光科技有限公司 | Timed task configuration method, server, system and computer readable storage medium |
WO2020192733A1 (en) * | 2019-03-27 | 2020-10-01 | 京东方科技集团股份有限公司 | Timed task configuration method, server, system and computer-readable storage medium |
CN111565326A (en) * | 2019-12-03 | 2020-08-21 | 海信视像科技股份有限公司 | Updating method of reserved recording time and display equipment |
CN111679898A (en) * | 2020-06-08 | 2020-09-18 | 中国银行股份有限公司 | Scheduling method and device of timing task, computer equipment and readable storage medium |
CN112486529A (en) * | 2020-11-19 | 2021-03-12 | 深圳拓邦股份有限公司 | Global equipment timing upgrading method, system, server and storage medium |
CN114356024A (en) * | 2021-12-08 | 2022-04-15 | 杭州华橙软件技术有限公司 | Method for automatically setting daylight saving time in intelligent equipment, cloud platform and storage medium |
CN114356024B (en) * | 2021-12-08 | 2023-11-21 | 杭州华橙软件技术有限公司 | Method for automatically setting summer time in intelligent equipment, cloud platform and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106487895A (en) | Time control method and device | |
US9246757B2 (en) | Commissioning devices for automation systems | |
CN105871671B (en) | Method and device for controlling and acquiring uploading data of intelligent household equipment | |
CN106440203A (en) | Method for pre-appointing starting of intelligent air conditioner | |
CN107517136A (en) | The implementation method of heartbeat keep-alive, apparatus and system | |
CN107370645A (en) | Intelligent bracelet, air-conditioning, Intelligent bracelet and air-conditioning binding method and system | |
CN104618441A (en) | Control method and device of controlled device, server, and control terminal of internet of things | |
CN106211052A (en) | Intelligent home furnishing control method, Apparatus and system | |
CN103825898A (en) | Method for controlling online time of mobile terminal | |
CN109981360B (en) | Internet of things equipment site opening method, device and system and storage medium | |
CN108781473A (en) | A kind of method and apparatus of the shared file between different terminals | |
CN104281106A (en) | Remote control method and system for air conditioner | |
CN104759100A (en) | Prediction method and device of game life cycle and game operator server | |
CN106850390B (en) | A kind of information sharing method, server and terminal device | |
CN106033191A (en) | Household electrical appliance control method and device | |
CN104618443A (en) | Control method and device of controlled device, server, and control terminal of internet of things | |
CN107749799A (en) | Distribution method, apparatus, system and the computer-readable recording medium of home appliance | |
CN107870571A (en) | Control the method, apparatus and smart machine of smart machine | |
CN111107164B (en) | Water supply method and device for intelligent water meter, intelligent water meter and storage medium | |
CN103096181B (en) | A kind of provide the method for interactive application business, equipment | |
CN109861854A (en) | A kind of intelligent device management method, apparatus and system | |
CN105577511B (en) | User account update notifying method and device | |
CN103458000B (en) | Terminal data synchro system and method | |
CN105354699A (en) | Schedule setting method and apparatus and schedule management system | |
CN104284230A (en) | Play control system and method for television |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170308 |
|
RJ01 | Rejection of invention patent application after publication |