CN110620629A - Clock synchronization method, equipment and computer storage medium - Google Patents

Clock synchronization method, equipment and computer storage medium Download PDF

Info

Publication number
CN110620629A
CN110620629A CN201810631559.2A CN201810631559A CN110620629A CN 110620629 A CN110620629 A CN 110620629A CN 201810631559 A CN201810631559 A CN 201810631559A CN 110620629 A CN110620629 A CN 110620629A
Authority
CN
China
Prior art keywords
time
household appliance
server
timestamp
time zone
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
CN201810631559.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.)
Foshan Shunde Midea Electrical Heating Appliances Manufacturing Co Ltd
Original Assignee
Foshan Shunde Midea Electrical Heating Appliances Manufacturing 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 Foshan Shunde Midea Electrical Heating Appliances Manufacturing Co Ltd filed Critical Foshan Shunde Midea Electrical Heating Appliances Manufacturing Co Ltd
Priority to CN201810631559.2A priority Critical patent/CN110620629A/en
Priority to PCT/CN2018/106324 priority patent/WO2019242131A1/en
Publication of CN110620629A publication Critical patent/CN110620629A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)
  • Telephonic Communication Services (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The embodiment of the invention discloses a method and equipment for clock synchronization and a computer storage medium. The method comprises the steps of receiving a time zone ID of the position of the household appliance and a first timestamp of the household appliance, wherein the time zone ID is sent by the household appliance; updating a time synchronization period according to a preset time interval and a time zone ID of the position of the household appliance and a first timestamp of the household appliance; and sending the second time stamp of the server according to the updated time synchronization period. According to the embodiment of the invention, the time synchronization period can be dynamically adjusted, so that the frequency of the time for synchronizing the household appliances is in the middle optimal frequency, and the resources occupying the household appliances are not increased on the basis of ensuring the time accuracy of the household appliances.

Description

Clock synchronization method, equipment and computer storage medium
Technical Field
The embodiment of the invention relates to the field of household appliances, in particular to a clock synchronization method, equipment and a computer storage medium.
Background
With the improvement of the modern quality of life, home appliances that can realize various functions have appeared. When a certain function of the home appliance is time-related, the home appliance is provided with a clock device. The accuracy of the clock device can directly affect the functions of the household appliance. In order to ensure the accuracy of the clock, the synchronization time is required. The existing synchronization time method is that a terminal device sends time synchronization to a home appliance at regular time or the home appliance acquires time synchronization from a server at regular time, and although the schemes can achieve the synchronization effect, two problems exist:
1. when the period of acquiring or sending the time synchronization is too low, although the problem of ensuring the time accuracy of the household appliance is solved, the household appliance occupies too many resources, and the resources for distributing the functions of the household appliance are relatively reduced;
2. when the period for acquiring or sending the time synchronization is too high, the problem of time accuracy of the household appliance cannot be guaranteed, and the time of the household appliance which can regularly appear for a period of time is inaccurate, so that the accuracy of time-related functions in the household appliance is influenced, a user is led to consider that the household appliance has a fault, and the user experience is influenced.
Disclosure of Invention
To solve the foregoing technical problems, embodiments of the present invention are directed to a method, an apparatus, and a computer storage medium for clock synchronization.
The technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for clock synchronization, which is applied to a server, and the method includes:
receiving a time zone ID of the position of the household appliance and a first timestamp of the household appliance, which are sent by the household appliance;
updating a time synchronization period according to a preset time interval and a time zone ID of the position of the household appliance and a first timestamp of the household appliance;
and sending the second time stamp of the server according to the updated time synchronization period.
In the foregoing solution, the updating the time synchronization cycle according to the time zone ID of the location of the home appliance and the first timestamp of the home appliance at a preset time interval includes:
determining a third timestamp of the server according to the time zone ID of the position of the household appliance;
determining a time difference value according to the third timestamp of the server and the first timestamp of the household appliance;
and updating the time synchronization period according to the time difference.
In the above aspect, the method further includes:
and when the first timestamp of the household appliance is not equal to the third timestamp of the server, sending the third timestamp of the server.
In the above aspect, the method further includes:
adding the time difference value to a time difference value recording table corresponding to the time difference value being smaller than a preset deviation threshold value;
and determining that the position of the household appliance is obviously changed corresponding to the time difference value being larger than a preset deviation threshold value.
In the foregoing solution, the updating the time synchronization period according to the time difference includes:
determining a minimum time difference value in a preset time interval in the time difference value recording table;
and updating the time synchronization period according to the minimum time difference value.
In a second aspect, an embodiment of the present invention provides a clock synchronization method, which is applied to a home appliance, and the method includes:
sending a time zone ID of the position of the household appliance and a first timestamp of the household appliance according to a preset first time period;
receiving a second timestamp of the server;
and updating the clock time of the household appliance from the first time stamp of the household appliance to the second time stamp of the server.
In the foregoing solution, before the sending the time zone ID of the location of the home appliance and the first timestamp of the home appliance according to the preset first time period, the method further includes:
and receiving the time zone ID of the position of the household appliance sent by the control terminal equipment.
In the above aspect, the method further includes:
receiving a third timestamp of the server;
and updating the clock time of the household appliance from the first time stamp of the household appliance to the third time stamp of the server.
In a third aspect, an embodiment of the present invention provides a method for clock synchronization, which is applied to control terminal equipment, and the method includes:
determining the time zone ID of the position of the household appliance according to a preset mapping table of the time zone name and the time zone ID;
and sending the time zone ID of the position of the household appliance to the household appliance.
In a fourth aspect, an embodiment of the present invention provides a server, including: a first network interface, a first memory, and a first processor;
the first network interface is configured to receive and transmit signals in the process of receiving and transmitting information with other external network elements;
the first memory configured to store a computer program operable on the processor;
the first processor is configured to, when running the computer program, perform the steps of the method of any of the first aspects.
In a fifth aspect, an embodiment of the present invention provides a home appliance, including: a second network interface, a second memory, and a second processor;
the second network interface is configured to receive and transmit signals in the process of receiving and transmitting information with other external network elements;
the second memory configured to store a computer program operable on the processor;
the second processor, when executing the computer program, is configured to perform the steps of the method of any of the second aspects.
In a sixth aspect, an embodiment of the present invention provides a control terminal device, including: a third network interface, a third memory, and a third processor;
the third network interface is configured to receive and transmit signals in the process of receiving and transmitting information with other external network elements;
the third memory configured to store a computer program operable on the processor;
the third processor, when executing the computer program, is configured to perform the steps of the method of the third aspect.
In a seventh aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores a clock synchronization program, and the clock synchronization program, when executed by at least one processor, implements the steps of the method in any one of the first aspect, or any one of the second aspect, or the third aspect.
The embodiment of the invention provides a clock synchronization method, equipment and a computer storage medium; receiving a time zone ID of the position of the household appliance and a first timestamp of the household appliance, which are sent by the household appliance; updating a time synchronization period according to a preset time interval and a time zone ID of the position of the household appliance and a first timestamp of the household appliance; and sending the second timestamp of the server according to the updated time synchronization period, so that the time synchronization period can be dynamically adjusted, the frequency of the time of the synchronous household appliance is in a middle better frequency, and the resources occupying the household appliance are not increased on the basis of ensuring the time accuracy of the household appliance.
Drawings
Fig. 1 is a schematic flowchart of a clock synchronization method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another clock synchronization method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a clock synchronization method according to another embodiment of the present invention;
fig. 4 is a schematic flowchart of a clock synchronization method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another server device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another server device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another server device according to an embodiment of the present invention;
fig. 9 is a schematic hardware structure diagram of a server device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a home appliance according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another household electrical appliance according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of another household electrical appliance according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of another household electrical appliance according to an embodiment of the present invention;
fig. 14 is a schematic diagram of a hardware structure of a home appliance according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram of a control terminal device according to an embodiment of the present invention;
fig. 16 is a schematic diagram of a hardware structure of a control terminal device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Example one
Referring to fig. 1, it shows a method for clock synchronization provided by an embodiment of the present invention, where the method is applied to a server, and the method includes:
step 101: receiving a time zone ID of the position of the household appliance and a first timestamp of the household appliance, which are sent by the household appliance;
step 102: updating a time synchronization period according to a preset time interval and a time zone ID of the position of the household appliance and a first timestamp of the household appliance;
step 103: and sending the second time stamp of the server according to the updated time synchronization period.
In the embodiment of the invention, the server updates the time synchronization period according to the time zone ID of the position of the household appliance sent by the household appliance and the first timestamp of the household appliance and sends the second timestamp of the server according to the updated time synchronization period, so that the time synchronization period of the server and the household appliance is dynamically adjusted, the phenomenon that the household appliance occupies too much resources due to too low time synchronization period setting is avoided, and the problem that the time accuracy of the household appliance cannot be ensured due to too high time synchronization period setting is avoided.
Specifically, updating the time synchronization cycle according to the time zone ID of the location of the home appliance and the first timestamp of the home appliance at a preset time interval includes:
determining a third timestamp of the server according to the time zone ID of the position of the household appliance;
determining a time difference value according to the third timestamp of the server and the first timestamp of the household appliance;
and updating the time synchronization period according to the time difference.
It should be noted that the time zone ID of the location of the home device is used to identify the time zone name of the location of the home device. The time zone ID and time zone name are one-to-one. For example: the home device is in california, and 911 may be used as the california identification, and 911 is the time zone ID of the california, where the home device is located.
The first timestamp of the home device is a time displayed by a clock of the home device, and the time may be inaccurate due to hardware of the home device, software of the home device, or movement of the home device. The time synchronization period is used for enabling the clock display time of the household appliance to be consistent with the time of the position of the household appliance determined by the server. During specific implementation, the server sends the second timestamp of the server to the household appliance according to the time synchronization period, and the household appliance updates the clock time according to the second timestamp of the server.
In specific implementation, the server needs to pre-store a mapping table of time zone ID and time zone name. Based on the mapping table of the time zone ID and the time zone name, when the household appliance reports the time zone ID of the position of the household appliance to the server, the server determines the time zone name of the position of the household appliance according to the time zone ID of the position of the household appliance, and further determines the accurate time of the position of the household appliance, namely the third timestamp of the server, according to the time zone name of the position of the household appliance. It should be noted that the determining of the third timestamp of the server is triggered based on the time zone ID of the location where the home appliance is reported by the home appliance and the first timestamp of the home appliance.
According to the embodiment of the invention, the time difference value is determined according to the first time stamp of the household appliance and the third time stamp of the server. For example: the first timestamp of the home device is 12: 00, the third timestamp of the server is 12:03, so that the inaccuracy of the clock time of the household appliance can be judged, and the time difference value is further calculated to be 00: 03. Since the time deviation of the home device may be different at different time periods, which may cause a time difference between the first time stamp of the home device and the third time stamp of the server to be different, the time synchronization period needs to be updated according to the determined time difference. For example, the following steps are carried out: in month 1, the time deviation of the household appliance is 1 hour, so that the time difference value between the first time stamp of the household appliance and the third time stamp of the server is 1 hour, and the time synchronization period is 1 hour; and in month 7, the time deviation of the home device is 30 minutes, so that the time difference between the first time stamp of the home device and the third time stamp of the server is 30 minutes, and the update time synchronization period is 30 minutes.
When the first timestamp of the home appliance is not equal to the third timestamp of the server, it indicates that the clock time of the home appliance is not accurate, and therefore the home appliance and the server need to be time-synchronized, based on which, the technical scheme shown in fig. 1 further includes: and when the first timestamp of the household appliance is not equal to the third timestamp of the server, sending the third timestamp of the server.
It can be understood that the third timestamp of the server is the time zone time of the location of the home appliance determined by the server according to the time zone ID of the location of the home appliance, so when it is determined that the clock of the home appliance has a deviation, the third timestamp of the server needs to be immediately sent in order to improve the time accuracy of the home appliance. It should be noted that the third timestamp of the sending server is event-triggered and is not limited by the time synchronization period.
Corresponding to the case that the first timestamp of the home device is not equal to the third timestamp of the server, the technical solution shown in fig. 1 further includes:
adding the time difference value to a time difference value recording table corresponding to the time difference value being smaller than a preset deviation threshold value;
and determining that the position of the household appliance is obviously changed corresponding to the time difference value being larger than a preset deviation threshold value.
It should be noted that the preset deviation threshold is determined by the server according to the specific device parameters of the home device. The preset deviation threshold is an upper limit value of time deviation caused by software or hardware of the household appliance. Different home appliances may have different time deviation ranges due to hardware or software, so different deviation thresholds need to be set.
It can be understood that when the time difference between the first time stamp of the home appliance and the third time stamp of the server is greater than the preset deviation threshold, it indicates that the time deviation of the home appliance exceeds the upper limit value of the time deviation caused by software or hardware of the home appliance, and thus it can be determined that the time deviation of the home appliance is not caused by software or hardware of the home appliance, and it is further determined that the location of the home appliance is changed greatly.
When the time difference between the first time stamp of the home appliance and the third time stamp of the server is smaller than the preset deviation threshold, it is indicated that the time deviation of the home appliance does not exceed the time deviation upper limit value caused by software or hardware of the home appliance, so that it can be determined that the time deviation of the home appliance is caused by the software or hardware of the home appliance, and at this time, the time deviation needs to be recorded into the time difference recording table. The time difference recording table records a plurality of time differences generated by the household appliance.
The time difference record table is used to determine a time synchronization period between the server and the home appliance, and based on this, in the technical solution shown in fig. 1, updating the time synchronization period according to the time difference includes:
determining a minimum time difference value in a preset time interval in the time difference value recording table;
and updating the time synchronization period according to the minimum time difference value.
The server sends the second timestamp of the server to the home device according to the time synchronization cycle. The second timestamp of the server is the time of the home device location determined by the server. Therefore, the second timestamp of the server is sent periodically.
It can be understood that, since the minimum time difference represents the minimum time deviation of the home appliance, in order to timely time synchronize the home appliance, the home appliance and the server may be time synchronized according to the minimum time deviation. In the embodiment of the invention, the minimum time difference value is determined from the time difference value recording table, and the time synchronization of the server and the household appliance is carried out according to the minimum time difference value. Since the minimum time difference values in different time periods may be different, a time interval is preset to improve the time accuracy of the home appliance. And determining a minimum time difference value in a preset time interval, and updating the time synchronization period according to the minimum time difference value. And the server sends the second timestamp of the server to the household appliance according to the updated time synchronization period. Preferably, the predetermined time interval is three months. For example, the following steps are carried out: from month 1 to month 3, the following time difference values are recorded in the time difference value recording table: 01:00, 00:30, 00: 25; from month 4 to month 6, there are the following time difference values in the time difference value recording table: 00:40, 01:03, 00:15. This can result in: the minimum time difference value from 1 month to 3 months is 00:25, the minimum time difference value from 4 months to 6 months is 00:15, further, 3 months to 6 months are determined, the time synchronization period of the household appliance and the server is 25 minutes, and after 6 months, the time synchronization period of updating the household appliance and the server is 15 minutes.
According to the embodiment of the invention, the server updates the time synchronization period according to the time deviation of the household appliance, and the time synchronization periods of the server and the household appliance are adjustable, so that the problem that the accuracy of the clock of the household appliance cannot be ensured due to overhigh time synchronization period setting can be avoided, and the problem that the household appliance occupies too much resources due to overlow time synchronization period setting can be avoided.
Example two
Based on the same inventive concept of the foregoing embodiment, referring to fig. 2, a method for clock synchronization provided in an embodiment of the present invention is shown, and the method can be applied to a home appliance, and the method includes the following steps:
step 201: sending a time zone ID of the position of the household appliance and a first timestamp of the household appliance according to a preset first time period;
step 202: receiving a second timestamp of the server;
step 203: and updating the clock time of the household appliance from the first time stamp of the household appliance to the second time stamp of the server.
According to the embodiment of the invention, the household appliance sends the time zone ID of the position of the household appliance and the first timestamp of the household appliance to the server according to the preset first time period, and the household appliance receives the second timestamp of the server and updates the clock time of the household appliance to be the second timestamp of the server. Therefore, the effect of improving the clock accuracy of the household appliance can be achieved.
It should be noted that the home appliance described in the embodiment of the present invention has a real-time clock, and can normally operate depending on a battery when the power is off, and can remotely communicate with a server to perform mutual communication.
The first timestamp of the household appliance is the time displayed by a clock of the household appliance, and the time zone ID of the position of the household appliance is sent by the control terminal device, so that the method further comprises the following steps before sending the time zone ID of the position of the household appliance and the first timestamp of the household appliance according to the preset first time period:
and receiving the time zone ID of the position of the household appliance sent by the control terminal equipment.
In a specific implementation, the home device needs to store the time zone ID of the location of the home device, so as to send the time zone ID of the location of the home device according to the first time period.
Based on the third timestamp of the server sent by the server, the technical solution shown in fig. 2 further includes:
receiving a third timestamp of the server;
and updating the clock time of the household appliance from the first time stamp of the household appliance to the third time stamp of the server.
It can be understood that, in the first embodiment of the present invention, it has been described that the server sends the third timestamp of the server based on that the first timestamp of the home device is not equal to the third timestamp of the server, and based on that, the home device receives the third timestamp of the server. The server sends the third timestamp of the server to indicate that the clock time of the home appliance is inaccurate, so that after the home appliance receives the third timestamp of the server, the clock time of the home appliance needs to be updated from the first timestamp of the home appliance to the third timestamp of the server.
In the embodiment of the invention, the household appliance updates the clock time according to the second timestamp of the server. Therefore, the effect of improving the clock accuracy of the household appliance can be achieved.
EXAMPLE III
Based on the same inventive concept of the foregoing embodiment, referring to fig. 3, a method for clock synchronization provided in an embodiment of the present invention is shown, and the method can be applied to control a terminal device, and the method includes the following steps:
step 301: determining the time zone ID of the position of the household appliance according to a preset mapping table of the time zone name and the time zone ID;
step 302: and sending the time zone ID of the position of the household appliance to the household appliance.
It should be noted that, in the embodiment of the present invention, the control terminal device may communicate with the server, may remotely control the home appliance device, and may transmit the instruction to the home appliance device in real time.
When the embodiment of the invention is specifically realized, the control terminal device prestores the mapping table of the time zone name and the time zone ID. The user can select a time zone ID which is preset to the household appliance from a mapping table of the time zone name and the time zone ID through the control terminal device, the control terminal device remotely sends the time zone ID of the household appliance to the household appliance, or the control terminal device automatically acquires the time zone ID preset to the household appliance and remotely sends the time zone ID to the household appliance.
The embodiment of the invention can realize the effect of setting the time zone ID of the household appliance through the control terminal equipment.
Example four
Based on the same inventive concept of the foregoing embodiment, referring to fig. 4, a specific flow of a method for clock synchronization according to an embodiment of the present invention is shown, where the method may be applied to control a terminal device, a home appliance device, and a server, and the specific flow includes the following steps:
step 401: and the control terminal equipment determines the time zone ID of the position of the household appliance according to a preset mapping table of the time zone name and the time zone ID.
Step 402: and the control terminal equipment sends the time zone ID of the position of the household appliance to the household appliance.
Step 403: the household appliance sends the time zone ID of the position of the household appliance and the first timestamp of the household appliance to the server according to a preset first time period.
In specific implementation, the time of the clock of the home appliance is the first timestamp of the home appliance.
Step 404: and the server receives the time zone ID of the position of the household appliance and the first timestamp of the household appliance, which are sent by the household appliance.
Step 405: and the server determines the time zone name of the position of the household appliance according to a preset time zone name and a mapping table of the time zone ID based on the time zone ID of the position of the household appliance.
It will be appreciated that the server needs to pre-store a mapping table of time zone names to time zone IDs. The mapping table includes all time zone names around the world and the corresponding time zone IDs.
Step 406: and the server determines the precise time of the position of the household appliance according to the name of the time zone in which the household appliance is positioned, namely the third timestamp of the server.
Step 407: the server compares the third timestamp of the server with the first timestamp of the home appliance device, if the third timestamp of the server is not equal to the first timestamp of the home appliance device, the third timestamp of the server is sent to the home appliance device, and the step 408 is skipped; if equal, the process ends.
Step 408: and the server calculates the time difference value of the third time stamp of the server and the first time stamp of the household appliance. When the time difference is larger than a preset deviation threshold value, determining that the position of the household appliance is changed greatly; and when the time difference is smaller than a preset deviation threshold value, recording the time difference to a time difference recording table.
Step 409: and the server determines the minimum time difference value in the time difference value record table according to the preset time interval, and updates the time synchronization period to be the minimum time difference value.
Step 410: and the server sends the second timestamp of the server to the household appliance according to the updated time synchronization period.
It is understood that the time synchronization between the server and the home device is performed by transmitting the second timestamp of the server to the home device according to the time synchronization period. The second timestamp of the server is the exact time of the home device as determined by the server based on the location of the home device.
The time zone ID of the household appliance is determined through the control terminal, and the household appliance sends the time zone ID of the position where the household appliance is located and the first timestamp of the household appliance to the server according to the preset period. And the server determines an updated time synchronization period according to the time zone ID of the position of the household appliance and the first time of the household appliance, and sends a second timestamp of the server according to the updated time synchronization period. Based on the above, the embodiment of the invention realizes the effect of dynamically adjusting the time synchronization period, can avoid the problem that the accuracy of the clock of the household appliance cannot be ensured due to overhigh time synchronization period setting, and can avoid the problem that the household appliance occupies too much resources due to overlow time synchronization period setting.
EXAMPLE five
Based on the same inventive concept of the foregoing embodiment, referring to fig. 5, a schematic structural diagram of a server 50 provided in an embodiment of the present invention is shown, as shown in fig. 5, where the server 50 includes: a receiving section 501, a first updating section 502, a first transmitting section 503; wherein,
the reception section 501: the method comprises the steps that a time zone ID of the position of the household appliance and a first timestamp of the household appliance are received, wherein the time zone ID is sent by the household appliance;
first update portion 502: updating a time synchronization cycle according to a time zone ID of the position of the household appliance and a first timestamp of the household appliance at a preset time interval;
first transmitting section 503: and the second time stamp of the server is sent according to the updated time synchronization period.
In the above technical solution, the first updating portion 502 is specifically configured to:
determining a third timestamp of the server according to the time zone ID of the position of the household appliance;
determining a time difference value according to the third timestamp of the server and the first timestamp of the household appliance;
and updating the time synchronization period according to the time difference.
In the above technical solution, as shown in fig. 6, the server 50 further includes a second sending part 504, and the second sending part 504 is configured to send the third timestamp of the server when the first timestamp of the home device is not equal to the third timestamp of the server.
In the above technical solution, as shown in fig. 7, the server 50 further includes a second updating portion 505, and the second updating portion 505 is configured to update the time difference record table according to the time difference corresponding to the time difference being smaller than a preset deviation threshold.
In the above technical solution, as shown in fig. 8, the server 50 further includes a determining part 506, and the determining part 506 is configured to determine that the location of the home appliance is significantly changed when the time difference is greater than a preset deviation threshold.
In the above technical solution, the second updating portion 505 is specifically configured to:
determining a minimum time difference value from the time difference value recording table according to a preset time interval;
and updating the time synchronization period according to the minimum time difference value.
It is understood that in this embodiment, "part" may be part of a circuit, part of a processor, part of a program or software, etc., and may also be a unit, and may also be a module or a non-modular.
In addition, each component in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module. Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Accordingly, the present embodiment provides a computer storage medium storing a synchronization method, which when executed by at least one processor implements the steps of the method of the first embodiment.
Based on the server device 50 and the computer storage medium, referring to fig. 9, a specific hardware structure of the server device 50 provided by the embodiment of the present invention is shown, and may include: a first network interface 901, a first memory 902 and a first processor 903; the various components are coupled together by a bus system 904. It is understood that the bus system 904 is used to enable communications among the components. The bus system 904 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various buses are labeled as bus system 904 in figure 9. The first network interface 801 is used for receiving and sending signals in the process of receiving and sending information with other external network elements;
a first memory 902 for storing a computer program capable of running on the first processor 903;
a first processor 903 for performing, when running the computer program, the following:
receiving a time zone ID of the position of the household appliance and a first timestamp of the household appliance, which are sent by the household appliance;
updating a time synchronization period according to a preset time interval and a time zone ID of the position of the household appliance and a first timestamp of the household appliance;
and sending the second time stamp of the server according to the updated time synchronization period.
It is to be appreciated that the first memory 902 in embodiments of the invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double data rate Synchronous Dynamic random access memory (ddr DRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 902 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The first processor 903 may be an integrated circuit chip having signal processing capability. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the first processor 903. The first processor 903 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the first memory 902, and the first processor 903 reads information in the first memory 902, and completes the steps of the method in combination with hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Specifically, when the first processor 903 in the server device 50 is further configured to run the computer program, the method steps described in the first embodiment are executed, which is not described herein again.
EXAMPLE six
Based on the same inventive concept of the foregoing embodiment, referring to fig. 10, a schematic structural diagram of a home appliance 100 according to an embodiment of the present invention is shown, and as shown in fig. 10, the home appliance 100 includes: a transmission section 1001, a first reception section 1002, a first update section 1003; wherein,
transmission section 1001: sending a time zone ID of the position of the household appliance and a first timestamp of the household appliance according to a preset first time period;
first receiving portion 1002: configured to receive a second timestamp for the server;
first update section 1003: the method includes updating a clock time of the home device from a first timestamp of the home device to a second timestamp of the server.
In the above technical solution, as shown in fig. 11, the home device 50 further includes a second receiving part 1004, and the second receiving part 1004 is configured to receive a time zone ID of a location of the home device, which is sent by the control terminal device.
In the above technical solution, as shown in fig. 12, the home device 50 further includes a third receiving portion 1005, and the third receiving portion 1005 is configured to receive a third timestamp of the server.
In the foregoing technical solution, as shown in fig. 13, the home device 50 further includes a second updating portion 1006, where the second updating portion 1006 is configured to update the clock time of the home device from the first timestamp of the home device to the third timestamp of the server.
In addition, the present embodiment provides a computer storage medium storing a synchronized program, which when executed by at least one processor implements the steps of the method of the second embodiment. For specific description of the computer storage medium, refer to the description in the fifth embodiment, and are not described herein again.
Based on the home appliance 100 and the computer storage medium, referring to fig. 14, a specific hardware structure of the home appliance 100 according to an embodiment of the present invention is shown, and may include: a second network interface 1401, a second memory 1402, and a second processor 1403; the various components are coupled together by a bus system 1404. It is understood that bus system 1404 is used to enable connective communication between these components. The bus system 1404 includes a power bus, a control bus, and a status signal bus in addition to a data bus. The various buses are labeled as bus system 1404 in fig. 14 for the sake of clarity of illustration. The second network interface 1401 is configured to receive and transmit signals in a process of receiving and transmitting information with other external network elements;
a second memory 1402 for storing a computer program capable of running on the second processor 1403;
a second processor 1403, configured to, when running the computer program, perform:
sending a time zone ID of the position of the household appliance and a first timestamp of the household appliance according to a preset first time period;
receiving a second timestamp of the server;
and updating the clock time of the household appliance from the first time stamp of the household appliance to the second time stamp of the server.
It can be understood that, in this embodiment, components in the specific hardware structure of the home appliance device 100 are similar to corresponding components in the fifth embodiment, and are not described herein again.
Specifically, the second processor 1403 in the electronic appliance device 100 is further configured to execute the method steps described in the second embodiment when running the computer program, which is not described herein again.
EXAMPLE seven
Based on the same inventive concept of the foregoing embodiment, referring to fig. 15, a schematic structural diagram of a control terminal device 150 according to an embodiment of the present invention is shown, as shown in fig. 15, where the home device 150 includes: a determination section 1501, a transmission section 1502, wherein,
determination section 1501: determining the time zone ID of the position of the household appliance according to a preset mapping table of the time zone name and the time zone ID;
the transmission section 1502: and sending the time zone ID of the position of the household appliance to the household appliance.
In addition, the present embodiment provides a computer storage medium storing a synchronized program, which when executed by at least one processor implements the steps of the method of the third embodiment. For specific description of the computer storage medium, refer to the description in the fifth embodiment, and are not described herein again.
Based on the control terminal device 150 and the computer storage medium, referring to fig. 16, a specific hardware structure of the control terminal device 150 according to an embodiment of the present invention is shown, and may include: a third network interface 1601, a third memory 1602, and a third processor 1603; the various components are coupled together by a bus system 1604. It is understood that the bus system 1604 is used to enable connective communication between these components. The bus system 1604 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as the bus system 1604 in fig. 16. Wherein,
the third network interface 1601 is configured to receive and transmit a signal in a process of receiving and transmitting information with other external network elements;
a third memory 1602 for storing computer programs capable of running on the third processor 1603;
a third processor 1603 for, when running the computer program, performing:
determining the time zone ID of the position of the household appliance according to a preset mapping table of the time zone name and the time zone ID;
and sending the time zone ID of the position of the household appliance to the household appliance.
It can be understood that, in this embodiment, components in the specific hardware structure of the control terminal device 150 are similar to corresponding components in the fifth embodiment, and are not described herein again.
Specifically, the third processor 1603 in the control terminal device 150 is further configured to execute the method steps described in the third embodiment when running the computer program, which is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (13)

1. A method for clock synchronization, applied to a server, is characterized in that the method comprises:
receiving a time zone ID of the position of the household appliance and a first timestamp of the household appliance, which are sent by the household appliance;
updating a time synchronization period according to a preset time interval and a time zone ID of the position of the household appliance and a first timestamp of the household appliance;
and sending the second time stamp of the server according to the updated time synchronization period.
2. The method of claim 1, wherein updating the time synchronization period based on the time zone ID of the location of the home device and the first timestamp of the home device at the predetermined time interval comprises:
determining a third timestamp of the server according to the time zone ID of the position of the household appliance;
determining a time difference value according to the third timestamp of the server and the first timestamp of the household appliance;
and updating the time synchronization period according to the time difference.
3. The method of claim 2, further comprising:
and when the first timestamp of the household appliance is not equal to the third timestamp of the server, sending the third timestamp of the server.
4. The method of claim 2, further comprising:
adding the time difference value to a time difference value recording table corresponding to the time difference value being smaller than a preset deviation threshold value;
and determining that the position of the household appliance is obviously changed corresponding to the time difference value being larger than a preset deviation threshold value.
5. The method of claim 4, wherein updating the time synchronization period based on the time difference value comprises:
determining a minimum time difference value in a preset time interval in the time difference value recording table;
and updating the time synchronization period according to the minimum time difference value.
6. A clock synchronization method is applied to household appliances, and is characterized by comprising the following steps:
sending a time zone ID of the position of the household appliance and a first timestamp of the household appliance according to a preset first time period;
receiving a second timestamp of the server;
and updating the clock time of the household appliance from the first time stamp of the household appliance to the second time stamp of the server.
7. The method of claim 6, wherein before the sending the time zone ID of the location of the home device and the first timestamp of the home device according to the preset first time period, the method further comprises:
and receiving the time zone ID of the position of the household appliance sent by the control terminal equipment.
8. The method of claim 6, further comprising:
receiving a third timestamp of the server;
and updating the clock time of the household appliance from the first time stamp of the household appliance to the third time stamp of the server.
9. A clock synchronization method is applied to control terminal equipment, and is characterized by comprising the following steps:
determining the time zone ID of the position of the household appliance according to a preset mapping table of the time zone name and the time zone ID;
and sending the time zone ID of the position of the household appliance to the household appliance.
10. A server, comprising: a first network interface, a first memory, and a first processor;
the first network interface is configured to receive and transmit signals in the process of receiving and transmitting information with other external network elements;
the first memory configured to store a computer program operable on the processor;
the first processor, when executing the computer program, is configured to perform the steps of the method of any of claims 1 to 5.
11. An appliance device, comprising: a second network interface, a second memory, and a second processor;
the second network interface is configured to receive and transmit signals in the process of receiving and transmitting information with other external network elements;
the second memory configured to store a computer program operable on the processor;
the second processor, when executing the computer program, is configured to perform the steps of the method of any of claims 6 to 8.
12. A control terminal device comprising: a third network interface, a third memory, and a third processor;
the third network interface is configured to receive and transmit signals in the process of receiving and transmitting information with other external network elements;
the third memory configured to store a computer program operable on the processor;
the third processor, when executing the computer program, is configured to perform the steps of the method of claim 9.
13. A computer storage medium storing a clock synchronization program that when executed by at least one processor implements the steps of the method of any of claims 1 to 5, or any of claims 6 to 8, or claim 9.
CN201810631559.2A 2018-06-19 2018-06-19 Clock synchronization method, equipment and computer storage medium Pending CN110620629A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810631559.2A CN110620629A (en) 2018-06-19 2018-06-19 Clock synchronization method, equipment and computer storage medium
PCT/CN2018/106324 WO2019242131A1 (en) 2018-06-19 2018-09-18 Clock synchronization method and device, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810631559.2A CN110620629A (en) 2018-06-19 2018-06-19 Clock synchronization method, equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN110620629A true CN110620629A (en) 2019-12-27

Family

ID=68920272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810631559.2A Pending CN110620629A (en) 2018-06-19 2018-06-19 Clock synchronization method, equipment and computer storage medium

Country Status (2)

Country Link
CN (1) CN110620629A (en)
WO (1) WO2019242131A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546932A (en) * 2022-02-23 2022-05-27 地平线征程(杭州)人工智能科技有限公司 Multi-processing unit time synchronization method and device, storage medium and electronic equipment

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464772B (en) * 2020-05-22 2023-08-18 北京罗克维尔斯科技有限公司 Method and device for setting time stamp on recorded video and electronic equipment for vehicle
CN114422560B (en) * 2022-01-12 2023-06-16 珠海格力电器股份有限公司 Method for stopping operation of target equipment, module, electronic equipment and readable medium
CN114679481A (en) * 2022-02-23 2022-06-28 达闼机器人股份有限公司 Robot control method and device, storage medium and robot cluster
CN114584247A (en) * 2022-03-04 2022-06-03 北京小马睿行科技有限公司 Time synchronization method, detection device and system
CN115987449A (en) * 2022-09-16 2023-04-18 杭州和利时自动化有限公司 Real-time data transmission method, device and equipment and readable storage medium
CN117979412B (en) * 2024-03-29 2024-07-19 江铃汽车股份有限公司 Internal time synchronization method and system for vehicle-mounted communication remote terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100428691C (en) * 2005-12-22 2008-10-22 中山大学 Time synchronous device and synchronous method of digital household network
WO2011000041A1 (en) * 2009-06-30 2011-01-06 Avega Systems Pty Ltd Systems and methods for providing synchronization in a networked environment
JP6710918B2 (en) * 2015-09-02 2020-06-17 カシオ計算機株式会社 Analog display
CN106912100B (en) * 2017-03-14 2019-12-31 东北大学 Household appliance network time synchronization method based on TPSN and TSync
CN107749789B (en) * 2017-10-10 2019-05-17 广东乐心医疗电子股份有限公司 Time synchronization method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546932A (en) * 2022-02-23 2022-05-27 地平线征程(杭州)人工智能科技有限公司 Multi-processing unit time synchronization method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
WO2019242131A1 (en) 2019-12-26

Similar Documents

Publication Publication Date Title
CN110620629A (en) Clock synchronization method, equipment and computer storage medium
CN108293060B (en) Method and system for updating firmware of slave station, master station and slave station
CN104602037A (en) Method, device, terminal and system for controlling synchronous playing of multiple devices
CN110392311B (en) Connecting wheat display method, storage medium, connecting wheat server, client and system
CN109597687B (en) Resource allocation method and device for data synchronization, storage medium and electronic equipment
CN105278413A (en) Communication method for upper computer and CAN equipment of same type
CN110830823A (en) Play progress correction method and device, electronic equipment and readable storage medium
US10003617B2 (en) Terminal and application synchronization method thereof
CN115426515B (en) Method, device, system and storage medium for multi-device synchronous calibration
CN105095282A (en) Method, device and system for updating cache data
CN111158470B (en) Method, apparatus, computer device and storage medium for controlling output vibration signal
CN112787742A (en) Clock synchronization method and device, wireless earphone and readable storage medium
US20160212723A1 (en) Synchronization method and apparatus
CN111769895B (en) Multi-device timing method and system and device timing method and device
CN113452556A (en) Product skill configuration method and device, storage medium and electronic device
CN107966673B (en) Simple and effective clock management method for electric energy meter
CN115913437A (en) Time synchronization method, system, fault injection equipment and storage medium
EP3972160B1 (en) Time synchronization method, service board, and network device
CN114091170A (en) Simulation information simulation method, device, equipment and storage medium
US11128480B2 (en) Information distribution device, distribution target device, information distribution system, information distribution method, and non-transitory computer-readable medium
CN108737001A (en) A kind of data processing method and relevant device
CN104185169A (en) Stator synchronization method of air write card, device and system thereof
CN113179145A (en) Time synchronization method, device and system
CN107580247B (en) Vibration playing method and device and electronic equipment
CN111581558A (en) Method, device and equipment for determining page loading duration and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191227