CN106487895A - Time control method and device - Google Patents

Time control method and device Download PDF

Info

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
timing
time
information
task
intelligent equipment
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
Application number
CN201610898835.2A
Other languages
Chinese (zh)
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.)
Shenzhen Ouruibo Electronic Co Ltd
Original Assignee
Shenzhen Ouruibo Electronic 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 Shenzhen Ouruibo Electronic Co Ltd filed Critical Shenzhen Ouruibo Electronic Co Ltd
Priority to CN201610898835.2A priority Critical patent/CN106487895A/en
Publication of CN106487895A publication Critical patent/CN106487895A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence 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)
  • Telephonic Communication Services (AREA)
  • Electric Clocks (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

Timing control method and device
Technical Field
The invention relates to the technical field of intelligent home furnishing, in particular to a timing control method and device.
Background
Along with the development of the intelligent home technology, more and more intelligent home devices are intelligent. At present, an intelligent home system mainly comprises a server, a client, an intelligent home gateway and an intelligent device, wherein a router is usually used as the intelligent home gateway, a control terminal such as a mobile phone, a tablet, a computer and the like is used as the client, and a controlled device such as the intelligent home device and the like is used as the intelligent device.
In the prior art, in order to implement timing control of an intelligent device, a mode of setting a timer on a single intelligent device is generally adopted, and although the scheme can implement timing control of the intelligent device, a server cannot monitor timing execution conditions of each intelligent device. Therefore, another timing control scheme is provided, that is, the server is used for realizing remote timing control of the intelligent devices, so that the server can monitor the timing execution condition of each intelligent device, and can realize timing control without installing a timer on the intelligent device, thereby being beneficial to reducing the cost of the whole system.
However, in the current solution of performing timing control through a server, the server can only support timing control in a specific time zone, cannot satisfy global timing scheduling, and cannot satisfy timing scheduling of different daylight savings times, in other words, timing control can only be implemented for intelligent devices in a specific area, which brings inconvenience to timing control of the intelligent devices and limits the application range.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a timing control method and a timing control device, aiming at realizing global timing scheduling and expanding the application range when intelligent equipment is subjected to timing control.
To achieve the above object, in one aspect, a timing control method is provided, which is applied to a server, and includes the following steps:
acquiring geographical position information of intelligent equipment, and acquiring time zone information of an area where the intelligent equipment is located according to the geographical position information;
acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by a client, and adding a timing task according to the timing information and the time zone information, wherein the timing task comprises standard timing time;
and when the standard timing time is reached, executing the timing task.
Optionally, the method further comprises:
judging whether summer time exists in the area where the intelligent equipment is located according to the geographical position information;
and when summer time exists, acquiring summer time information of the area where the intelligent equipment is located, and adding a timing task according to the timing information of the intelligent equipment, the time zone information and the summer time information.
Optionally, the timing information includes an original timing time and a timing type, the daylight saving time information includes a daylight saving time period, and when the timing type is single timing, adding a timing task according to the timing information of the smart device, the time zone information, and the daylight saving time information includes:
judging whether the original timing time is within the daylight saving time period or not;
when the time is not in the daylight saving time period, setting the standard timing time according to the original timing time and the time zone information;
when within the daylight savings time period, setting the standard timing time according to the original timing time, the time zone information, and the daylight savings time information.
Optionally, the timing information includes an original timing time and a timing type, the daylight saving time information includes a daylight saving time period, and when the timing type is a cycle timing, the adding a timing task according to the timing information of the smart device, the time zone information, and the daylight saving time information includes:
and setting the standard timing time for the summer time period according to the original timing time, the time zone information and the summer time information, and setting the standard timing time for the non-summer time period according to the original timing time and the time zone information.
Optionally, the acquiring the geographical location information of the smart device includes:
when a binding request for the intelligent device sent by the client is received, acquiring the geographical position information of the intelligent device from the client; or,
and when a timing task adding request aiming at the intelligent equipment and sent by the client is received, acquiring the geographical position information of the intelligent equipment from the client.
Optionally, the executing the timing task includes:
judging whether the intelligent equipment is on-line or not;
when the intelligent equipment is online, sending a control instruction to the intelligent equipment;
and when the intelligent equipment is not on line, sending prompt information to the client.
In another aspect, a timing control apparatus applied to a server is provided, including:
the information acquisition module is used for acquiring the geographical position information of the intelligent equipment and acquiring the time zone information of the area where the intelligent equipment is located according to the geographical position information;
the task adding module is used for acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by a client, and adding a timing task according to the timing information and the time zone information, wherein the timing task comprises standard timing time;
and the task execution module is used for executing the timing task when the standard timing time is reached.
Optionally, the information obtaining module is further configured to: judging whether summer time exists in the area where the intelligent equipment is located according to the geographical position information, and acquiring summer time information of the area where the intelligent equipment is located when summer time exists;
the task adding module is used for: and when the area where the intelligent equipment is located has the daylight saving time, adding a timing task according to the timing information, the time zone information and the daylight saving time information of the intelligent equipment.
Optionally, the timing information includes an original timing time and a timing type, the daylight saving time information includes a daylight saving time period, and when the timing type is single timing, the task adding module is configured to:
judging whether the original timing time is within the daylight saving time period or not; when the time is not in the daylight saving time period, setting the standard timing time according to the original timing time and the time zone information; when within the daylight savings time period, setting the standard timing time according to the original timing time, the time zone information, and the daylight savings time information.
Optionally, the timing information includes an original timing time and a timing type, the daylight saving time information includes a daylight saving time period, and when the timing type is a cycle timing, the task adding module is configured to:
and setting the standard timing time for the summer time period according to the original timing time, the time zone information and the summer time information, and setting the standard timing time for the non-summer time period according to the original timing time and the time zone information.
Optionally, the information obtaining module is configured to:
when a binding request for the intelligent device sent by the client is received, acquiring the geographical position information of the intelligent device from the client; or,
and when a timing task adding request aiming at the intelligent equipment and sent by the client is received, acquiring the geographical position information of the intelligent equipment from the client.
Optionally, the task execution module is configured to:
when the standard timing time is reached, judging whether the intelligent equipment is on line or not; when the intelligent equipment is online, sending a control instruction to the intelligent equipment; and when the intelligent equipment is not on line, sending prompt information to the client.
According to the timing control method provided by the embodiment of the invention, the geographical position information of the intelligent equipment is obtained, the time zone information of the area where the intelligent equipment is located is obtained according to the geographical position information, and then the timing task is added according to the timing information and the time zone information so as to perform timing control on the intelligent equipment, so that global timing scheduling is realized, the server can perform timing control on the intelligent equipment all over the world, the application range is greatly expanded, and the user experience is improved. Furthermore, by introducing daylight saving time information, the server can accurately perform timing control on intelligent equipment in the region where daylight saving time is carried out, and the application range is further expanded.
Drawings
Fig. 1 is a flowchart of a timing control method of a first embodiment of the present invention;
FIG. 2 is a flow chart of a timing control method not according to the second embodiment of the present invention;
FIG. 3 is a flow chart of a timing control method of a third embodiment of the present invention;
fig. 4 is a block diagram of a timing control apparatus according to a fourth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
Referring to fig. 1, a timing control method according to a first embodiment of the present invention is proposed, which is applied to a server and includes the steps of:
and S11, acquiring the geographical position information of the intelligent equipment, and acquiring the time zone information of the area where the intelligent equipment is located according to the geographical position information.
The intelligent device in the embodiment of the invention is a controlled device controlled by the server, and the controlled device is mainly an intelligent household device and can be other intelligent devices.
The client described in the embodiment of the present invention is a terminal device on the user side, and the terminal device mainly includes a mobile terminal such as a mobile phone and a tablet, and may also be a fixed terminal such as a personal computer.
Alternatively, the server may obtain the geographical location information of the smart device from the client upon receiving a binding request for the smart device sent by the client. For example, a mobile terminal (client) starts an application (such as a smart client 365 application), inputs an account number and a password, logs in a server, and sends a binding request aiming at a certain smart device to the server through the application; after receiving the binding request, the server requires the mobile terminal to report the geographical position information (such as longitude and latitude information) of the intelligent device, the mobile terminal automatically acquires the geographical position information of the mobile terminal or acquires the geographical position information manually input by a user and reports the geographical position information as the geographical position information of the intelligent device to the server, and the server stores the intelligent device and the geographical position information thereof to the database.
In some embodiments, after acquiring the geographical location information of the intelligent device, the server acquires the time zone information of the area where the intelligent device is located according to the geographical location information, and stores the geographical location information and the time zone information of the intelligent device, or only stores the time zone information of the intelligent device. And when a timing task adding request aiming at the intelligent equipment and sent by the client is subsequently received, directly extracting the time zone information of the intelligent equipment.
In other embodiments, the server obtains and stores the geographical location information of the intelligent device. And when a timing task adding request aiming at the intelligent equipment and sent by the client side is subsequently received, obtaining the time zone information according to the stored geographical position information. And the time zone information can be further saved, and the time zone information of the intelligent equipment can be directly extracted when a timing task adding request aiming at the intelligent equipment is subsequently received.
Optionally, the server may obtain the geographic location information of the intelligent device from the client only when receiving a timing task addition request for the intelligent device sent by the client, obtain time zone information according to the geographic location information, and store the geographic location information and/or the time zone information of the intelligent device. For example, a mobile terminal (client) starts an application (such as an intelligent device 365 application), inputs an account number and a password to log in a server, and sends a timed task adding request aiming at a certain intelligent device to the server through the application; the method comprises the steps that after a server receives a timing task adding request, a mobile terminal is required to report geographical position information (such as longitude and latitude information) of the intelligent equipment, the mobile terminal automatically obtains geographical position information of the mobile terminal or obtains geographical position information manually input by a user and reports the geographical position information as the geographical position information of the intelligent equipment to the server, the server obtains time zone information according to the geographical position information, and stores the geographical position information and/or the time zone information of the intelligent equipment to a database.
In the embodiment of the invention, the server can acquire the time zone of the area where the intelligent device is located according to the longitude and latitude information and the time zone division rule contained in the geographic position information, and can also acquire the time zone of the area where the intelligent device is located by inquiring the corresponding relation between the preset geographic position information and the time zone. The time zone information comprises an east N zone and a west M zone, wherein N is more than or equal to 1 and less than or equal to 12, and M is more than or equal to 1 and less than or equal to 12.
And S12, acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by the client, and adding a timing task according to the timing information and the time zone information. After the timed task is added, it is determined whether or not the standard timed time of the timed task has been reached, and when the standard timed time has been reached, the flow proceeds to step S13.
Specifically, the server firstly analyzes a timing task adding request aiming at the intelligent device sent by the client to obtain timing information, wherein the timing information comprises information such as original timing time, timing type, control mode and the like. The original timing time is the timing time of the time zone in which the intelligent device is located, the timing type is single timing, cycle timing and the like, and the control mode is starting, closing after starting preset time and the like.
Then, the server sets standard timing time according to the original timing time and the time zone information, and specifically comprises the following steps: the server obtains a Time zone offset according to the Time zone information, and obtains a timing Time under Coordinated Universal Time (UTC), namely a standard timing Time, by subtracting the Time zone offset from the original timing Time. For example, assuming that the time zone in which the smart device is located is an east 8 zone, the corresponding time zone offset is +8 hours, and the original timing time is 10:00, the standard timing time is set to 10:00-8 to 2: 00; assuming that the time zone in which the smart device is located is the west 6 zone, the corresponding time zone offset is-6 hours, and the original timing time is 8:00, the standard timing time is set to 8:00- (-6) to 14: 00.
And finally, adding a timing task by the server according to the information such as standard timing time, timing type, control mode and the like.
After the timing task is added, the server monitors the system time, and the system time is UTC time. When the system time reaches the standard timing time, the next step S13 is entered to execute the timing task.
And S13, executing the timing task.
Specifically, after the standard timing time is reached, the server judges whether the intelligent device is on-line, and when the intelligent device is on-line, the server sends a control instruction to the intelligent device to control the intelligent device to perform operations such as starting and closing. Further, after the timed task is executed, the server also feeds back information of successful execution of the timed task to the client.
Further, when the intelligent device is not on-line, the server sends prompt information to the client, and if the prompt information prompts that the intelligent device is abnormal, the timed task execution fails.
According to the timing control method, the geographical position information of the intelligent equipment is acquired, the time zone information of the region where the intelligent equipment is located is acquired according to the geographical position information, the timing task is added according to the timing information and the time zone information, and then the intelligent equipment is subjected to timing control, so that global timing scheduling is achieved, the server can perform timing control on the intelligent equipment all over the world, the application range is greatly expanded, and the user experience is improved.
Example two
Referring to fig. 2, a timing control method according to a second embodiment of the present invention is proposed, where the method includes:
and S21, acquiring the geographical position information of the intelligent device. Judging whether summer time exists in the area where the intelligent equipment is located; when there is no daylight saving, go to step S22; when there is daylight saving, the flow proceeds to step S24.
Alternatively, the server may obtain the geographical location information of the smart device from the client upon receiving a binding request for the smart device sent by the client.
In some embodiments, after the server obtains the geographical location information of the intelligent device, it is immediately determined whether summer time exists in the area where the intelligent device is located according to the geographical location information. When there is no daylight saving time, step S22 is entered to obtain time zone information; when there is daylight saving time, the flow proceeds to step S24 to acquire time zone information and daylight saving time information.
In other embodiments, the server obtains and stores the geographical location information of the intelligent device. And when a timing task adding request aiming at the intelligent equipment and sent by the client is subsequently received, judging whether summer time exists in the area where the intelligent equipment is located according to the geographical position information. When there is no daylight saving time, step S22 is entered to obtain time zone information; when there is daylight saving time, the flow proceeds to step S24 to acquire time zone information and daylight saving time information.
Optionally, the server may obtain the geographic position information of the intelligent device from the client only when receiving a timing task addition request for the intelligent device sent by the client, and determine whether daylight saving time exists in an area where the intelligent device is located according to the geographic position information. When there is no daylight saving time, step S22 is entered to obtain time zone information; when there is daylight saving time, the flow proceeds to step S24 to acquire time zone information and daylight saving time information.
And S22, acquiring time zone information of the area where the intelligent device is located according to the geographical position information.
In the embodiment of the invention, the server can acquire the time zone of the area where the intelligent device is located according to the longitude and latitude information and the time zone division rule contained in the geographic position information, and can also acquire the time zone of the area where the intelligent device is located by inquiring the corresponding relation between the preset geographic position information and the time zone. The time zone information comprises an east N zone and a west M zone, wherein N is more than or equal to 1 and less than or equal to 12, and M is more than or equal to 1 and less than or equal to 12.
And S23, acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by the client, and adding a timing task according to the timing information and the time zone information.
This step S23 is the same as step S12 in the first embodiment, and is not repeated here.
And S24, acquiring time zone information and daylight saving time information of the area where the intelligent device is located according to the geographical position information.
In the embodiment of the invention, the server can acquire the daylight saving time information of the area where the intelligent equipment is located by inquiring the corresponding relation between the preset geographic position information and the daylight saving time information, and can also acquire the daylight saving time information of the area where the intelligent equipment is located by a third-party time service provider. The daylight savings time information includes information such as a daylight savings time period, a daylight savings time offset, and the like, the daylight savings time period including a start time and an end time of the daylight savings time, the daylight savings time offset being an amount of time that increases over normal time (i.e., winter time).
Summer time can be divided into intra-year summer time and cross-year summer time according to different spans of the summer time periods. The time of summer within the year, namely the starting time and the ending time of the period of summer time are all within the same year; the cross-year daylight savings time, i.e. the beginning time and the ending time of the daylight savings time period, respectively, is within two years, in other words, the daylight savings time period spans from the previous year to the next year.
And S25, acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by the client, and adding the timing task according to the timing information, the time zone information and the daylight saving time information.
In step S25, the server first parses a timing task addition request for the smart device sent by the client, and obtains timing information, where the timing information includes information such as original timing time, timing type, and control mode. The original timing time is the timing time of the time zone in which the intelligent device is located, and the control mode is starting, closing after starting the preset time and the like.
In this embodiment, the timing types include single timing and cycle timing, where the single timing is timing control performed only once, and the cycle timing is timing control performed multiple times. The two timing types respectively correspond to two different timing task adding modes, wherein:
single timing:
the server determines whether the original timing time is within the daylight savings time period. When the time is not in the daylight saving time period, the server sets standard timing time according to the original timing time and the time zone information, namely: the server obtains the time zone offset according to the time zone information, and obtains the timing time under UTC, namely the standard timing time by subtracting the time zone offset from the original timing time. When in the daylight saving time period, the server sets standard timing time according to the original timing time, the time zone information and the daylight saving time information, namely: the server respectively acquires time zone offset and summer time offset according to the time zone information and the summer time information, and the time zone offset and the summer time offset are subtracted from the original time to acquire the time under UTC, namely standard time. And finally, adding a timing task by the server according to the information such as standard timing time, timing type, control mode and the like.
For example, if the original timing time is 14:00 at 5 month and 20 days, and the daylight saving time period is from 4 month and 1 day and 13:00 at the beginning to 9 month and 30 days and 15:00 at the end, the original timing time is within the daylight saving time period, and if the time zone in which the smart device is located is an east 8 zone, the corresponding time zone offset is +8 hours, and if the daylight saving time offset is +1 hour, the standard timing time is set to 14:00-8-1 to 5: 00.
And (3) cycle timing:
since one year includes daylight saving time periods and non-daylight saving time periods, the server needs to set standard timing times for the different time periods, respectively. Namely: setting standard timing time for the daylight saving time period according to the original timing time, the time zone information and the daylight saving time information, wherein the setting mode is the same as the situation that the original timing time is in the daylight saving time period during single timing; and setting standard timing time for the non-daylight saving time period according to the original timing time and the time zone information in the same way as the situation that the original timing time is not in the daylight saving time period during single timing. And finally, adding a timing task according to information such as standard timing time, timing type, control mode and the like.
In the annual daylight saving time, one year is divided into three time periods, namely one daylight saving time period and two non-daylight saving time periods respectively before and after the daylight saving time period, namely the head and the tail of one year are the non-daylight saving time periods, and the middle is the daylight saving time period, so that three standard timing times are required to be set according to the above mode, and each time period corresponds to one standard timing time. The cross-year daylight savings time also divides a year into three time periods, namely a non-daylight savings time period and two daylight savings time periods respectively before and after the non-daylight savings time period, that is, the beginning and the end of a year are daylight savings time periods, and the middle is a non-daylight savings time period, so that three standard timing times need to be respectively set according to the above manner, and each time period corresponds to one standard timing time.
And S26, judging whether the standard timing time of the timing task is reached. When the standard timer time is reached, the flow proceeds to step S27.
After the timing task is added, the server monitors the system time, and the system time is UTC time. When the system time reaches the standard timing time, the next step S27 is entered to execute the timing task.
And S27, executing the timing task.
Specifically, after the standard timing time is reached, the server judges whether the intelligent device is on-line, and when the intelligent device is on-line, the server sends a control instruction to the intelligent device to control the intelligent device to perform operations such as starting and closing. Further, after the timed task is executed, the server also feeds back information of successful execution of the timed task to the client.
Further, when the intelligent device is not on-line, the server sends prompt information to the client, and if the prompt information prompts that the intelligent device is abnormal, the timed task execution fails.
This embodiment is through introducing daylight saving time information, and the server that makes can also be to carrying out the accurate timing control that carries out of the intelligent equipment in the area of daylight saving time, has further enlarged the range of application.
EXAMPLE III
Referring to fig. 3, a timing control method according to a third embodiment of the present invention is proposed, which is applied to a server and includes the steps of:
and S31, receiving a binding request for the intelligent device sent by the client.
And S32, performing binding operation, and acquiring and storing the geographical location information of the intelligent device from the client.
And S33, receiving a timing task adding request for the intelligent device sent by the client. Judging whether summer time exists in the area where the intelligent equipment is located; when there is no daylight saving, go to step S34; when there is daylight saving, the flow proceeds to step S36.
And S34, acquiring time zone information of the area where the intelligent device is located according to the geographical position information.
And S35, acquiring timing information according to the timing task adding request, and adding the timing task according to the timing information and the time zone information.
And S36, acquiring time zone information and daylight saving time information of the area where the intelligent device is located according to the geographical position information.
And S37, acquiring timing information containing the original timing time and the timing type according to the timing task adding request. Judging whether the timing type is single timing or cycle timing; when the timing type is single timing, go to step S38; when the timing type is the loop timing, the flow proceeds to step S41.
And S38, judging whether the original timing time is in the daylight saving time period. When not within the daylight saving time period, the flow proceeds to step S39; when in the daylight saving time period, the flow proceeds to step S40.
And S39, setting standard timing time according to the original timing time and the time zone information, and adding a timing task.
And S40, setting standard timing time according to the original timing time, the time zone information and the daylight saving time information, and adding a timing task.
S41, setting standard timing time for the non-summer time period according to the original timing time and the time zone information, setting standard timing time for the summer time period according to the original timing time, the time zone information and the summer time information, and adding a timing task.
And S42, judging whether the standard timing time of the timing task is reached. When the standard timer time is reached, the flow proceeds to step S43.
And S43, executing the timing task.
Further, in the embodiment of the present invention, a timer may be further set in the intelligent device, the server or the client synchronizes the geographic location information to the intelligent device, the intelligent device periodically synchronizes UTC Time to an ntp (network Time protocol) server, and the intelligent device calibrates the local Time according to the Time zone offset and the daylight saving Time offset of the area where the intelligent device is located, so as to implement local timing control by the timer.
Example four
Referring to fig. 4, a timing control apparatus according to a fourth embodiment of the present invention is provided, where the apparatus is applied to a server, and includes an information obtaining module, a task adding module, and a task executing module, where:
an information acquisition module: the time zone information acquisition module is used for acquiring the geographical position information of the intelligent equipment and acquiring the time zone information of the area where the intelligent equipment is located according to the geographical position information.
Optionally, the information obtaining module may obtain the geographical location information of the smart device from the client upon receiving a binding request for the smart device sent by the client.
In some embodiments, after acquiring the geographical location information of the intelligent device, the information acquisition module immediately acquires time zone information of a region where the intelligent device is located according to the geographical location information, and stores the geographical location information and the time zone information of the intelligent device, or only stores the time zone information of the intelligent device. And when a timing task adding request aiming at the intelligent equipment and sent by the client is subsequently received, directly extracting the time zone information of the intelligent equipment.
In other embodiments, the information obtaining module obtains and stores the geographical location information of the intelligent device. And when a timing task adding request aiming at the intelligent equipment and sent by the client side is subsequently received, obtaining the time zone information according to the stored geographical position information. And the time zone information can be further saved, and the time zone information of the intelligent equipment can be directly extracted when a timing task adding request aiming at the intelligent equipment is subsequently received.
Optionally, the information obtaining module may obtain the geographic location information of the intelligent device from the client only when receiving a timing task addition request for the intelligent device sent by the client, obtain the time zone information according to the geographic location information, and store the geographic location information and/or the time zone information of the intelligent device.
In the embodiment of the present invention, the information obtaining module may obtain the time zone of the area where the intelligent device is located according to the longitude and latitude information and the time zone division rule included in the geographic location information, and may also obtain the time zone of the area where the intelligent device is located by querying a preset corresponding relationship between the geographic location information and the time zone. The time zone information comprises an east N zone and a west M zone, wherein N is more than or equal to 1 and less than or equal to 12, and M is more than or equal to 1 and less than or equal to 12.
A task adding module: the intelligent device is used for acquiring timing information according to a timing task adding request which is sent by a client and aims at the intelligent device, and adding a timing task according to the timing information and time zone information.
Specifically, after receiving a timing task adding request for the intelligent device sent by the client, the task adding module first analyzes the timing task adding request to obtain timing information, where the timing information includes information such as original timing time, timing type, and control mode. The original timing time is the timing time of the time zone in which the intelligent device is located, the timing type is single timing, cycle timing and the like, and the control mode is starting, closing after starting preset time and the like.
Then, the task adding module sets standard timing time according to the original timing time and the time zone information, and specifically comprises the following steps: and the task adding module acquires time zone offset according to the time zone information, and obtains the timing time under UTC (universal time coordinated) by subtracting the time zone offset from the original timing time, namely the standard timing time. For example, assuming that the time zone in which the smart device is located is an east 8 zone, the corresponding time zone offset is +8 hours, and the original timing time is 10:00, the standard timing time is set to 10:00-8 to 2: 00; assuming that the time zone in which the smart device is located is the west 6 zone, the corresponding time zone offset is-6 hours, and the original timing time is 8:00, the standard timing time is set to 8:00- (-6) to 14: 00.
And finally, adding the timing task by the task adding module according to the information such as standard timing time, timing type, control mode and the like.
A task execution module: for executing the timing task when the standard timing time of the timing task is reached.
In the embodiment of the invention, after the timing task is added, the task execution module monitors the system time, and the system time is UTC time. And when the system time reaches the standard timing time, executing the timing task.
Specifically, after the standard timing time is reached, the task execution module judges whether the intelligent device is online, and when the intelligent device is online, the task execution module sends a control instruction to the intelligent device to control the intelligent device to perform operations such as starting and closing. Further, after the timed task is executed, the task execution module feeds back information of successful execution of the timed task to the client.
Further, when the intelligent device is not on-line, the server sends prompt information to the client, and if the prompt information prompts that the intelligent device is abnormal, the timed task execution fails.
Further, in a preferred embodiment, the information obtaining module is further configured to: judging whether summer time exists in the area where the intelligent equipment is located according to the geographical position information, and acquiring summer time information of the area where the intelligent equipment is located when the summer time exists; the task adding module is used for: and when summer time exists in the area where the intelligent equipment is located, adding a timing task according to the timing information, the time zone information and the summer time information of the intelligent equipment.
Specifically, the information acquisition module may acquire the daylight saving time information of the area where the intelligent device is located by querying a corresponding relationship between the preset geographical location information and the daylight saving time information, or may acquire the daylight saving time information of the area where the intelligent device is located by a third-party time service provider. The daylight savings time information includes information such as a daylight savings time period, a daylight savings time offset, and the like, the daylight savings time period including a start time and an end time of the daylight savings time, the daylight savings time offset being an amount of time that increases over normal time (i.e., winter time).
Summer time can be divided into intra-year summer time and cross-year summer time according to different spans of the summer time periods. The time of summer within the year, namely the starting time and the ending time of the period of summer time are all within the same year; the cross-year daylight savings time, i.e. the beginning time and the ending time of the daylight savings time period, respectively, is within two years, in other words, the daylight savings time period spans from the previous year to the next year.
The task adding module adds the timing task according to a timing type, wherein the timing type comprises a single timing and a cycle timing, and the task adding module comprises:
single timing:
when the timing type is single timing, the task adding module judges whether the original timing time is within the daylight saving time period. When the time is not in the daylight saving time period, the task adding module sets standard timing time according to the original timing time and the time zone information, namely: and the task adding module acquires time zone offset according to the time zone information, and obtains the timing time under UTC (universal time coordinated) by subtracting the time zone offset from the original timing time, namely the standard timing time. When in the daylight saving time period, the task adding module sets standard timing time according to the original timing time, the time zone information and the daylight saving time information, namely: the task adding module respectively obtains a time zone offset and a daylight saving time offset according to the time zone information and the daylight saving time information, and obtains the timing time under UTC, namely the standard timing time by subtracting the time zone offset and the daylight saving time offset from the original timing time. And finally, adding the timing task by the task adding module according to the information such as standard timing time, timing type, control mode and the like.
For example, if the original timing time is 14:00 at 5 month and 20 days, and the daylight saving time period is from 4 month and 1 day and 13:00 at the beginning to 9 month and 30 days and 15:00 at the end, the original timing time is within the daylight saving time period, and if the time zone in which the smart device is located is an east 8 zone, the corresponding time zone offset is +8 hours, and if the daylight saving time offset is +1 hour, the standard timing time is set to 14:00-8-1 to 5: 00.
And (3) cycle timing:
when the timing type is the cycle timing, since one year includes the daylight saving time period and the non-daylight saving time period, the task addition module needs to set the standard timing time for different time periods, respectively. Namely: setting standard timing time for the daylight saving time period according to the original timing time, the time zone information and the daylight saving time information, wherein the setting mode is the same as the situation that the original timing time is in the daylight saving time period during single timing; and setting standard timing time for the non-daylight saving time period according to the original timing time and the time zone information in the same way as the situation that the original timing time is not in the daylight saving time period during single timing. And finally, adding a timing task according to information such as standard timing time, timing type, control mode and the like.
In the annual daylight saving time, one year is divided into three time periods, namely one daylight saving time period and two non-daylight saving time periods respectively before and after the daylight saving time period, namely the head and the tail of one year are the non-daylight saving time periods, and the middle is the daylight saving time period, so that three standard timing times are required to be set according to the above mode, and each time period corresponds to one standard timing time. The cross-year daylight savings time also divides a year into three time periods, namely a non-daylight savings time period and two daylight savings time periods respectively before and after the non-daylight savings time period, that is, the beginning and the end of a year are daylight savings time periods, and the middle is a non-daylight savings time period, so that three standard timing times need to be respectively set according to the above manner, and each time period corresponds to one standard timing time.
According to the timing control device, the geographical position information of the intelligent equipment is acquired, the time zone information of the area where the intelligent equipment is located is acquired according to the geographical position information, the timing task is added according to the timing information and the time zone information, and then the intelligent equipment is subjected to timing control, so that global timing scheduling is achieved, the server can perform timing control on the intelligent equipment all over the world, the application range is greatly expanded, and the user experience is improved. Furthermore, by introducing daylight saving time information, the server can accurately perform timing control on intelligent equipment in the region where daylight saving time is implemented, and the application range is further expanded.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not to be construed as limiting the scope of the invention. Those skilled in the art can implement the invention in various modifications, such as features from one embodiment can be used in another embodiment to yield yet a further embodiment, without departing from the scope and spirit of the invention. Any modification, equivalent replacement and improvement made within the technical idea of using the present invention should be within the scope of the right of the present invention.

Claims (10)

1. A timing control method is applied to a server and is characterized by comprising the following steps:
acquiring geographical position information of intelligent equipment, and acquiring time zone information of an area where the intelligent equipment is located according to the geographical position information;
acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by a client, and adding a timing task according to the timing information and the time zone information, wherein the timing task comprises standard timing time;
and when the standard timing time is reached, executing the timing task.
2. The timing control method of claim 1, further comprising:
judging whether summer time exists in the area where the intelligent equipment is located according to the geographical position information;
and when summer time exists, acquiring summer time information of the area where the intelligent equipment is located, and adding a timing task according to the timing information of the intelligent equipment, the time zone information and the summer time information.
3. The timing control method of claim 2, wherein the timing information comprises an original timing time and a timing type, the daylight saving time information comprises a daylight saving time period, and when the timing type is single timing, the adding a timing task according to the timing information of the smart device, the time zone information, and the daylight saving time information comprises:
judging whether the original timing time is within the daylight saving time period or not;
when the time is not in the daylight saving time period, setting the standard timing time according to the original timing time and the time zone information;
when within the daylight savings time period, setting the standard timing time according to the original timing time, the time zone information, and the daylight savings time information.
4. The timing control method of claim 2, wherein the timing information comprises an original timing time and a timing type, the daylight saving time information comprises a daylight saving time period, and when the timing type is a cycle timing, the adding a timing task according to the timing information of the smart device, the time zone information, and the daylight saving time information comprises:
and setting the standard timing time for the summer time period according to the original timing time, the time zone information and the summer time information, and setting the standard timing time for the non-summer time period according to the original timing time and the time zone information.
5. The timing control method according to any one of claims 1 to 4, wherein the acquiring the geographical location information of the smart device comprises:
when a binding request for the intelligent device sent by the client is received, acquiring the geographical position information of the intelligent device from the client; or,
and when a timing task adding request aiming at the intelligent equipment and sent by the client is received, acquiring the geographical position information of the intelligent equipment from the client.
6. A timing control device applied to a server is characterized by comprising:
the information acquisition module is used for acquiring the geographical position information of the intelligent equipment and acquiring the time zone information of the area where the intelligent equipment is located according to the geographical position information;
the task adding module is used for acquiring timing information according to a timing task adding request aiming at the intelligent equipment sent by a client, and adding a timing task according to the timing information and the time zone information, wherein the timing task comprises standard timing time;
and the task execution module is used for executing the timing task when the standard timing time is reached.
7. The timing control device of claim 6, wherein the information obtaining module is further configured to: judging whether summer time exists in the area where the intelligent equipment is located according to the geographical position information, and acquiring summer time information of the area where the intelligent equipment is located when summer time exists;
the task adding module is used for: and when the area where the intelligent equipment is located has the daylight saving time, adding a timing task according to the timing information, the time zone information and the daylight saving time information of the intelligent equipment.
8. The timing control device of claim 7, wherein the timing information comprises an original timing time and a timing type, the daylight savings time information comprising a daylight savings time period, and wherein the task addition module is configured to, when the timing type is single timing:
judging whether the original timing time is within the daylight saving time period or not; when the time is not in the daylight saving time period, setting the standard timing time according to the original timing time and the time zone information; when within the daylight savings time period, setting the standard timing time according to the original timing time, the time zone information, and the daylight savings time information.
9. The timing control device of claim 7, wherein the timing information comprises an original timing time and a timing type, the daylight savings time information comprises a daylight savings time period, and when the timing type is a cycle timing, the task addition module is to:
and setting the standard timing time for the summer time period according to the original timing time, the time zone information and the summer time information, and setting the standard timing time for the non-summer time period according to the original timing time and the time zone information.
10. The timing control device according to any one of claims 6 to 9, wherein the information acquisition module is configured to:
when a binding request for the intelligent device sent by the client is received, acquiring the geographical position information of the intelligent device from the client; or,
and when a timing task adding request aiming at the intelligent equipment and sent by the client is received, acquiring the geographical position information of the intelligent equipment from the client.
CN201610898835.2A 2016-10-14 2016-10-14 Time control method and device Pending CN106487895A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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
CN110659121B (en) Task data acquisition method and device, task configuration method and device and server
CN102711141B (en) Mobile network service quality distributed type collection method based on mobile terminal
CN110061797A (en) Method for synchronizing time, device, storage medium and computer equipment
CN104159281A (en) A method and a device for saving electricity of a mobile terminal
CA2680797A1 (en) Systems and methods for portable personalized radio
CN110620629A (en) Clock synchronization method, equipment and computer storage medium
CN103313208A (en) Method and system for mobile phone alarm clock reminding based on networked workday state updating
CN102036276A (en) Method and system for synchronously using terminal supporting different frequency ranges under same cell
CN104967881A (en) Television channel searching method and system
CN112417255B (en) Online state receiving method and device, storage medium and electronic device
CN103517405A (en) Network positioning method and system, mobile terminal and network-side apparatus
CN110392311B (en) Connecting wheat display method, storage medium, connecting wheat server, client and system
CN112003976B (en) Hard-coding and hard-decoding test method and device
CN106793000A (en) The update method of system message, the acquisition methods of system message and device
CN104301916B (en) Test optimization method, apparatus and system based on mobile intelligent terminal universal card
CN101958901B (en) Long term evolution-based multimedia on demand method, system and mobile terminal
CN102958044A (en) Dynamic wake-up method based on 3G (third generation) network communication terminals
CN113485952A (en) Data batch transmission method and device
CN104581744A (en) Method and device for achieving network planning
CN112671572A (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN105357661B (en) SIM card number switching method and apparatus
CN103945237A (en) Clock synchronization method and system, digital television equipment and EPG server
CN102378058B (en) Method for updating search result of IPTV terminal and IPTV server
CN105656650A (en) Timing tracking method and element management system (EMS)

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