CN106454473B - Clock adjustment, device, terminal and play system - Google Patents

Clock adjustment, device, terminal and play system Download PDF

Info

Publication number
CN106454473B
CN106454473B CN201610882775.5A CN201610882775A CN106454473B CN 106454473 B CN106454473 B CN 106454473B CN 201610882775 A CN201610882775 A CN 201610882775A CN 106454473 B CN106454473 B CN 106454473B
Authority
CN
China
Prior art keywords
time
clock
error
control device
broadcast control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610882775.5A
Other languages
Chinese (zh)
Other versions
CN106454473A (en
Inventor
谭春宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610882775.5A priority Critical patent/CN106454473B/en
Publication of CN106454473A publication Critical patent/CN106454473A/en
Application granted granted Critical
Publication of CN106454473B publication Critical patent/CN106454473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages
    • H04N21/8113Monomedia components thereof involving special audio data, e.g. different tracks for different languages comprising music, e.g. song in MP3 format

Abstract

The embodiment of the invention provides a kind of clock adjustment, device, terminal and play system, accumulated time error of this method using acquisition in preset duration;According to the preset duration and the accumulated time error calculation clock rate error;Clock rate is adjusted according to the clock rate error.After the program calculates the clock rate error of clock adjustment apparatus, the clock rate of the clock adjustment apparatus is adjusted, so that the system clock of the clock adjustment apparatus is synchronous with the holding of the system clock of reference time.When multiple clock adjustment apparatus plays identical audio data as playback equipment, it is ensured that multiple playback equipment is played simultaneously, and in terms of existing technologies, the synchronism of playing audio-fequency data between multiple playback equipments can be improved.

Description

Clock adjustment, device, terminal and play system
Technical field
The present invention relates to technical field of electronic equipment, and in particular to a kind of clock adjustment, device, terminal and plays system System.
Background technique
With the improvement of living standards, audio-visual devices play important role in people's lives.It currently, will be multiple Music player devices (for example, speaker, player, mobile phone etc.) and control equipment are interconnected by wired or wireless network, A play system is formed, identical music is played simultaneously, has been widely used.
In above-mentioned play system, each equipment has independent system clock.Each playback equipment according to its own System clock plays music.However, each playback equipment and the system clock for controlling equipment are not always synchronous.It is each There may be the subtle time differences each other for playback equipment and control equipment.When multiple playback equipments play identical music When, the above-mentioned subtle time difference causes the playback progress of each playback equipment inconsistent, thereby results between multiple playback equipments Synchronism is low.
Summary of the invention
The embodiment of the present invention provides a kind of clock adjustment, device, terminal and play system, and multiple broadcastings can be improved The synchronism of playing audio-fequency data between equipment.
The embodiment of the present invention provides a kind of clock adjustment, comprising:
Obtain the accumulated time error in preset duration;
According to the preset duration and the accumulated time error calculation clock rate error;
Clock rate is adjusted according to the clock rate error.
Correspondingly, the embodiment of the present invention also provides a kind of clock adjustment apparatus, comprising:
Module is obtained, for obtaining the accumulated time error in preset duration;
Computing module, for according to the preset duration and the accumulated time error calculation clock rate error;
Adjustment module, for clock rate to be adjusted according to the clock rate error.
The embodiment of the present invention also provides a kind of terminal, comprising:
Touch screen, for receiving the touch operation of user;
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes above-mentioned clock adjustment.
The embodiment of the present invention also provides a kind of play system, including broadcast control device and at least one playback equipment, should Playback equipment is connect by network with the broadcast control device, which includes:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes above-mentioned clock adjustment.
Accumulated time error of the embodiment of the present invention using acquisition in preset duration;According to the preset duration and the accumulation Time error calculates clock rate error;Clock rate is adjusted according to the clock rate error.When the program calculates After the clock rate error of clock regulating device, the clock rate of the clock adjustment apparatus is adjusted, so that the clock is adjusted The system clock of device is synchronous with the holding of the system clock of reference time.When there are multiple clock adjustment apparatus, when multiple The system clock of clock regulating device can the clock adjusting dress synchronous namely multiple with the holding of the system clock of the reference time It is synchronous that clock is able to maintain between setting.When multiple clock adjustment apparatus plays identical audio data as playback equipment, It can guarantee that multiple playback equipment is played simultaneously, in terms of existing technologies, can be improved and broadcast between multiple playback equipments Put the synchronism of audio data.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described.It should be evident that drawings in the following description are only some embodiments of the invention, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is the flow diagram for the clock adjustment that the embodiment of the present invention one provides.
Fig. 2 is the composition schematic diagram of the play system in the embodiment of the present invention two.
Fig. 3 is the flow diagram of clock adjustment provided by Embodiment 2 of the present invention.
Fig. 4 is the structural schematic diagram for the first clock adjustment apparatus that the embodiment of the present invention three provides.
Fig. 5 is the structural schematic diagram for second of clock adjustment apparatus that the embodiment of the present invention three provides.
Fig. 6 is the structural schematic diagram for the third clock adjustment apparatus that the embodiment of the present invention three provides.
Fig. 7 is the structural schematic diagram for the first terminal that the embodiment of the present invention four provides.
Fig. 8 is the structural schematic diagram for second of terminal that the embodiment of the present invention four provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description.Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Description and claims of this specification and term " first " in above-mentioned attached drawing, " second ", " third " etc. (if present) is to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be appreciated that this The object of sample description is interchangeable under appropriate circumstances.In addition, term " includes " and " having " and their any deformation, meaning Figure, which is to cover, non-exclusive includes.For example, containing the process, method of series of steps or containing a series of modules or list The device of member, terminal, system those of are not necessarily limited to be clearly listed step or module or unit, can also include unclear The step of ground is listed or module or unit also may include its intrinsic for these process, methods, device, terminal or system Its step or module or unit.
The embodiment of the present invention provides a kind of clock adjustment, device, terminal and play system, will carry out respectively below detailed It describes in detail bright.
Embodiment one
The present embodiment will be described from the angle of clock adjustment apparatus, which there is audio to play function Can, therefore the clock adjustment apparatus can be considered as playback equipment.The clock adjustment apparatus can be with audio playing function Autonomous device (for example, intelligent sound box, audio player etc.), the clock adjustment apparatus also can integrate in the terminal, the terminal It can be the equipment such as smart phone, tablet computer.
A kind of clock adjustment, for the playback equipment in play system, the playback equipment is by executing the clock tune Own system clock is adjusted in section method.The clock adjustment includes: that the accumulated time obtained in preset duration is missed Difference;According to the preset duration and the accumulated time error calculation clock rate error;According to the clock rate error clock synchronization clock rate Rate is adjusted.
As shown in Figure 1, the clock adjustment, detailed process may include:
S101 obtains the accumulated time error in preset duration.
In concrete application, clock adjustment apparatus obtains the accumulated time error in preset duration.The preset duration can be with It is a pre-set duration numerical value.For example, preset duration can be 1 hour.The clock adjustment apparatus is obtained at this 1 hour Interior accumulated time error.The accumulated time error is the time between the system clock of the clock adjustment apparatus and reference time Difference.The reference time can be considered as the standard time.For example, the reference time can be the system clock of exterior terminal when Between.
In some embodiments, obtain accumulated time error in preset duration can with specifically includes the following steps:
Obtain the first time error between the first moment and reference time;
The second time error between the second moment and the reference time after obtaining preset duration;
Accumulated time error is obtained according to the first time error and second time error.
In practical application, the first moment can be any time.The reference time can be considered as the standard time.When the reference Between can be broadcast control device in play system system clock time.The broadcast control device is for when controlling multiple Clock regulating device (playback equipment) playing audio-fequency data.The broadcast control device can be smart phone, tablet computer, personal meter The equipment such as calculation machine.
Specifically, of clock adjustment apparatus between the first moment and reference time can be obtained by the following method One time error: clock adjustment apparatus is using current time as the first moment, to broadcast control device sending time acquisition request; After broadcast control device receives the time acquisition request, itself present system time is sent to the clock adjustment apparatus;Clock The system time that the own system time sends with the broadcast control device received is compared by regulating device, obtains itself Difference between system time and the system time of the broadcast control device, as the first time error.
It is communicated between the clock adjustment apparatus and the broadcast control device by cable network or wireless network, therefore Information transmitting between the clock adjustment apparatus and the broadcast control device is with electric signal (voltage or electric current) or electromagnetic wave Form carries out.And the transmission speed of electric signal and electromagnetic wave is quickly, electric signal or electromagnetic wave are broadcast in the clock adjustment apparatus with this The passing time put between control device can be ignored.Meanwhile the electronic equipments such as clock adjustment apparatus, broadcast control device Data processing speed quickly, the clock adjustment apparatus and the broadcast control device processing data time can also ignore not Meter.It is therefore contemplated that at the time of the clock adjustment apparatus receives the system time of broadcast control device transmission for this One moment.
In one preferred embodiment, when which receives the system of broadcast control device transmission Between after, the system time of the clock adjustment apparatus itself is revised as to the system time of the broadcast control device.At this point, the clock The system clock of regulating device and the system clock of the broadcast control device are identical, i.e., the first time error is 0.
Obtain preset duration after the second moment and the reference time between the second time error can specifically include with Lower step:
After obtaining the first time error between the first moment and reference time, start timing;
When the timing reaches preset duration, the second time error between the reference time is obtained.
Specifically, after which gets first time error, start timing.In timing course, persistently sentence Whether the duration of the timing of breaking reaches preset duration.The preset duration is a pre-set duration numerical value.For example, this is default Shi Changwei 1 hour.When the duration of timing reaches the preset duration, when the clock adjustment apparatus is using current time as second It carves.At the second moment, the clock adjustment apparatus is again to the broadcast control device sending time acquisition request;Play control dress It sets after receiving the time acquisition request, sends itself present system time to the clock adjustment apparatus again;Clock adjusts dress It sets and is compared the current own system time with the system time of the broadcast control device received, acquisition currently itself is The difference united between time and the system time of the broadcast control device, as second time error.At this point it is possible to think this Clock adjustment apparatus is second moment at the time of receiving the system time of broadcast control device transmission.
Then, accumulated time error is obtained according to the first time error and second time error.The accumulated time is missed Difference is the accumulation of time error of the clock adjustment apparatus in the preset duration.
In some embodiments, obtaining accumulated time error according to the first time error and second time error can be with Specifically includes the following steps:
Calculate the difference between second time error and the first time error;
Using the difference as accumulated time error.
Specifically, the difference that can be calculated by the following formula between second time error and the first time error:
T=t2-t1
Wherein, T is the difference that need to be calculated, t2For second time error, t1For the first time error.Calculate difference T Afterwards, difference T is set by accumulated time error.As first time error t1When being 0, accumulated time error T=t2
When accumulated time error T is positive value, indicate the system clock of the clock adjustment apparatus than the broadcast control device System clock it is fast;When accumulated time error T is negative value, indicate that the system clock of the clock adjustment apparatus is controlled than the broadcasting The system clock of device is slow;When accumulated time error T is 0, system clock and the broadcasting control of the clock adjustment apparatus are indicated The system clock of device processed is identical.
S102, according to the preset duration and the accumulated time error calculation clock rate error.
It, can be with after getting accumulated time error of the clock adjustment apparatus in the preset duration in concrete application The clock rate error of the clock adjustment apparatus is calculated according to the following formula.The clock rate error is the clock adjustment apparatus The difference of the system-clock rate of system-clock rate and the broadcast control device.
Wherein, R is the clock rate error that need to be calculated, and T is accumulated time error, T0For the preset duration.For example, accumulation Time error T is 2 seconds, preset duration T0It is 1 hour, then can calculates clock rate error
S103 is adjusted clock rate according to the clock rate error.
In concrete application, after the clock rate error for calculating the clock adjustment apparatus, according to the clock rate error pair The clock rate of the clock adjustment apparatus is adjusted.Specifically, clock rate is adjusted according to the clock rate error It may comprise steps of:
Clock rate adjustment factor is calculated according to the clock rate error;
Clock rate is adjusted according to the clock rate adjustment factor.
Specifically, clock rate adjustment factor can be calculated according to the following formula:
P=1-R
Wherein, P is the clock rate adjustment factor that need to be calculated, and R is the clock rate error.For example, When, it can To calculate clock rate adjustment factor
Then, the clock rate of the clock adjustment apparatus is adjusted according to the clock rate adjustment factor.Specifically Regulative mode can be the original clock rate of the clock adjustment apparatus multiplied by clock rate adjustment factor P.Clock synchronization clock rate After rate is adjusted, the clock rate of the clock adjustment apparatus can be made identical as the clock rate of the broadcast control device.Cause This, will not generate new accumulated time error again, can make the clock between the clock adjustment apparatus and the broadcast control device The system clock of regulating device is synchronous with the holding of the system clock of the broadcast control device.
In one preferred embodiment, which sends out in the second reception to the broadcast control device After the system time sent, the system time of the clock adjustment apparatus itself is revised as to the system time of the broadcast control device. At this point, the system time of the clock adjustment apparatus is identical as the system time of the broadcast control device, and the clock adjusts dress The clock rate set is also identical as the clock rate of the broadcast control device.Therefore, the clock adjustment apparatus and the broadcasting control It will not generation time error again between device.
When it is implemented, the present invention is not limited by the execution sequence of described each step, conflict is not being generated In the case of, certain steps can also be carried out using other sequences or be carried out simultaneously.
From the foregoing, it will be observed that clock adjustment provided in an embodiment of the present invention, when using obtaining the accumulation in preset duration Between error;According to the preset duration and the accumulated time error calculation clock rate error;According to the clock rate error clock synchronization Clock rate rate is adjusted.After the program calculates the clock rate error of clock adjustment apparatus, to the clock adjustment apparatus when Clock rate rate is adjusted, so that the system clock of the clock adjustment apparatus is synchronous with the holding of the system clock of reference time.When depositing In multiple clock adjustment apparatus, the system clock of multiple clock adjustment apparatus can be with the system clock of the reference time It is synchronous that clock is able to maintain between holding synchronization namely multiple clock adjustment apparatus.When multiple clock adjustment apparatus conduct Playback equipment play identical audio data when, it is ensured that multiple playback equipment is played simultaneously, compared with the existing technology and Speech, can be improved the synchronism of playing audio-fequency data between multiple playback equipments.
Embodiment two
According to clock adjustment described in embodiment one, citing is described in further detail below.
In the present embodiment, it will be specifically integrated in smart phone with clock adjustment apparatus, with the clock in smart phone It is described in detail for adjusting method.
As shown in Fig. 2, for the composition schematic diagram of one of the present embodiment play system.Play system is by playing control dress Set 210 and the composition of multiple smart phones 211.Multiple smart phone 211 is used as playback equipment playing audio-fequency data.The broadcasting Control device 210 can be the equipment such as other smart phones, tablet computer, personal computer.The broadcast control device 210 with should Data communication is carried out by wireless network (such as WiFi) between multiple smart phones 211.
As shown in figure 3, the clock adjustment, detailed process can be such that
S201 obtains the first time error between the first moment and reference time.
Specifically, the first moment can be any time.The reference time can be considered as the standard time.The reference time can Be broadcast control device in play system system clock time.The broadcast control device is for controlling multiple intelligent hands Machine playing audio-fequency data.
Specifically, when can obtain first of smart phone between the first moment and reference time by the following method Between error: smart phone is using current time as the first moment, to broadcast control device sending time acquisition request;Play control After device receives the time acquisition request, itself present system time is sent to the smart phone;Itself is by smart phone The system time that the system time sends with the broadcast control device received is compared, and obtains itself system time and the broadcasting Difference between the system time of control device, as the first time error.It is broadcast it is considered that the smart phone receives this It is first moment at the time of putting the system time of control device transmission.
In one preferred embodiment, which receives the system time of broadcast control device transmission Afterwards, the system time of the smart phone itself is revised as to the system time of the broadcast control device.At this point, the smart phone System clock is identical as the system clock of the broadcast control device, i.e., the first time error is 0.
S202 starts timing.
Specifically, after which gets first time error, start timing.
S203 obtains the second time error between the reference time when the timing reaches preset duration.
Specifically, in timing course, persistently judge whether the duration of the timing reaches preset duration.The preset duration is pre- A duration numerical value being first arranged.For example, the preset duration is 1 hour.When the duration of timing reaches the preset duration, the intelligence Energy mobile phone is using current time as the second moment.At the second moment, which sends to the broadcast control device again Time acquisition request;After broadcast control device receives the time acquisition request, it is current that itself is sent to the smart phone again System time;The smart phone compares current own system time and the system time of the broadcast control device received Compared with, obtain the difference between current own system time and the system time of the broadcast control device, as second time miss Difference.At this point it is possible to think the smart phone receive the broadcast control device transmission system time at the time of for this second when It carves.
S204 calculates the difference between second time error and the first time error.
Specifically, the difference that can be calculated by the following formula between second time error and the first time error:
T=t2-t1
Wherein, T is the difference that need to be calculated, t2For second time error, t1For the first time error.When at the first time Error t1When being 0, accumulated time error T=t2
S205, using the difference as accumulated time error.
Specifically, after calculating the difference between the second time error and first time error, accumulated time error is set It is set to difference T.When accumulated time error T is positive value, indicate the system clock of the smart phone than the broadcast control device System clock it is fast;When accumulated time error T is negative value, indicate the system clock of the smart phone than the broadcast control device System clock it is slow;When accumulated time error T is 0, the system clock and the broadcast control device of the smart phone are indicated System clock is identical.
S206, according to the preset duration and the accumulated time error calculation clock rate error.
It specifically, can be according to following after getting accumulated time error of the smart phone in the preset duration Formula calculates the clock rate error of the smart phone.The clock rate error is the system-clock rate of the smart phone and is somebody's turn to do The difference of the system-clock rate of broadcast control device.
Wherein, R is the clock rate error that need to be calculated, and T is accumulated time error, T0For the preset duration.For example, accumulation Time error T is 2 seconds, preset duration T0It is 1 hour, then can calculates clock rate error
S207 calculates clock rate adjustment factor according to the clock rate error.
Specifically, clock rate adjustment factor can be calculated according to the following formula:
P=1-R
Wherein, P is the clock rate adjustment factor that need to be calculated, and R is the clock rate error.For example, When, it can To calculate clock rate adjustment factor
S208 is adjusted clock rate according to the clock rate adjustment factor.
Specifically, after calculating clock rate adjustment factor P, according to the clock rate adjustment factor P to the smart phone Clock rate be adjusted.Specific regulative mode can be the original clock rate of the smart phone multiplied by clock rate when this Rate adjustment factor P.After clock rate is adjusted, the clock rate of the smart phone and the broadcast control device can be made Clock rate is identical.Therefore, new accumulated time error will not be generated between the smart phone and the broadcast control device again, it can So that the system clock of the smart phone is synchronous with the holding of the system clock of the broadcast control device.
In one preferred embodiment, the smart phone is controlled in the second reception to the broadcasting in step S203 After the system time that device is sent, when the system time of the smart phone itself is revised as the system of the broadcast control device Between.At this point, the system time of the smart phone is identical as the system time of the broadcast control device, and the smart phone when Clock rate rate is also identical as the clock rate of the broadcast control device.Therefore, between the smart phone and the broadcast control device not Understand generation time error again.
When it is implemented, the present invention is not limited by the execution sequence of described each step, conflict is not being generated In the case of, certain steps can also be carried out using other sequences or be carried out simultaneously.
From the foregoing, it will be observed that clock adjustment provided in an embodiment of the present invention, using acquisition in the first moment and reference time Between first time error;Start timing;When the timing reaches preset duration, second between the reference time is obtained Time error;Calculate the difference between second time error and the first time error;It is missed using the difference as accumulated time Difference;According to the preset duration and the accumulated time error calculation clock rate error;Clock is calculated according to the clock rate error Rate adaptation coefficient;Clock rate is adjusted according to the clock rate adjustment factor.The program calculates smart phone After clock rate error, the clock rate of the smart phone is adjusted, so that the system clock of the smart phone and reference The system clock of time keeps synchronizing.When there are multiple smart phones, the system clock of multiple smart phone can be with It is synchronous that clock is able to maintain between the system clock holding synchronization of the reference time namely multiple smart phone.When multiple Smart phone play identical audio data when, it is ensured that multiple smart phone is played simultaneously, compared with the existing technology and Speech, can be improved the synchronism of playing audio-fequency data between multiple smart phones.
Embodiment three
In order to better implement above method, the embodiment of the present invention also provides a kind of clock adjustment apparatus, which can be with It integrates in the terminal, which can be the equipment such as smart phone, tablet computer.
As shown in figure 4, the clock adjustment apparatus 300 may include: to obtain module 301, computing module 302, adjustment module 303, it is described in detail below:
The acquisition module 301, for obtaining the accumulated time error in preset duration;
The computing module 302, for according to the preset duration and the accumulated time error calculation clock rate error;
The adjustment module 303, for clock rate to be adjusted according to the clock rate error.
Preferably, as shown in figure 5, the acquisition module 301 includes: the first acquisition submodule 3011, the second acquisition submodule 3012, specific as follows:
First acquisition submodule 3011, for obtaining the first time error between the first moment and reference time;
First acquisition submodule 3011, between the second moment and the reference time after being also used to obtain preset duration Second time error;
Second acquisition submodule 3012, when for obtaining accumulation according to the first time error and second time error Between error.
Preferably, which is specifically used for:
Obtain the first time error between the first moment and reference time;
Start timing;
When the timing reaches preset duration, the second time error between the reference time is obtained.
Preferably, which is specifically used for:
Calculate the difference between second time error and the first time error;
Using the difference as accumulated time error.
Preferably, as shown in fig. 6, the adjustment module 303 includes: computational submodule 3031, adjusts submodule 3032, specifically It is as follows:
The computational submodule 3031, for calculating clock rate adjustment factor according to the clock rate error;
The adjusting submodule 3032, for clock rate to be adjusted according to the clock rate adjustment factor.
When it is implemented, the above modules can be used as independent entity to realize, any combination can also be carried out, is made It is realized for same or several entities.The specific implementation of the above modules can be found in the embodiment of the method for front, herein not It repeats again.
From the foregoing, it will be observed that clock adjustment apparatus 300 provided in an embodiment of the present invention, is obtained by obtaining module 301 default Accumulated time error in duration;Computing module 302 is missed according to the preset duration and the accumulated time error calculation clock rate Difference;Adjustment module 303 is adjusted clock rate according to the clock rate error.The program calculates clock adjustment apparatus After clock rate error, the clock rate of the clock adjustment apparatus is adjusted, so that when the system of the clock adjustment apparatus Clock is synchronous with the holding of the system clock of reference time.When there are multiple clock adjustment apparatus, multiple clock adjustment apparatus System clock can be protected between the clock adjustment apparatus synchronous namely multiple with the holding of the system clock of the reference time It is synchronous to hold clock.When multiple clock adjustment apparatus plays identical audio data as playback equipment, it is ensured that this is more A playback equipment is played simultaneously, and in terms of existing technologies, playing audio-fequency data between multiple playback equipments can be improved Synchronism.
Example IV
The embodiment of the present invention also provides a kind of terminal, which can be the equipment such as smart phone, tablet computer.
As shown in fig. 7, terminal 400 may include: to obtain module 401, computing module 402, adjustment module 403, specifically retouch It states as follows:
The acquisition module 401, for obtaining the accumulated time error in preset duration;
The computing module 402, for according to the preset duration and the accumulated time error calculation clock rate error;
The adjustment module 403, for clock rate to be adjusted according to the clock rate error.
Preferably, which includes: the first acquisition submodule, the second acquisition submodule, specific as follows:
First acquisition submodule, for obtaining the first time error between the first moment and reference time;
First acquisition submodule, second between the second moment and the reference time after being also used to obtain preset duration Time error;
Second acquisition submodule is missed for obtaining accumulated time according to the first time error and second time error Difference.
Preferably, which is specifically used for:
Obtain the first time error between the first moment and reference time;
Start timing;
When the timing reaches preset duration, the second time error between the reference time is obtained.
Preferably, which is specifically used for:
Calculate the difference between second time error and the first time error;
Using the difference as accumulated time error.
Preferably, which includes: computational submodule, adjusts submodule, specific as follows:
The computational submodule, for calculating clock rate adjustment factor according to the clock rate error;
The adjusting submodule, for clock rate to be adjusted according to the clock rate adjustment factor.
Aforesaid operations are for details, reference can be made to the embodiment of the method for front, and details are not described herein.
The embodiment of the present invention also provides another terminal, as shown in figure 8, the terminal 500 may include radio frequency (RF, Radio Frequency) circuit 501, include one or more memory 502, the input unit of computer readable storage medium 503, display unit 504, sensor 505, voicefrequency circuit 506, Wireless Fidelity (WiFi, Wireless Fidelity) module 507, the components such as processor 508 and the power supply 509 of processing core are included one or more than one.Those skilled in the art Member it is appreciated that terminal structure not structure paired terminal shown in Fig. 8 restriction, may include more more or fewer than illustrating Component perhaps combines certain components or different component layouts.
Radio circuit 501 can be used for receiving and sending messages or communication process in signal send and receive, particularly, by base station Downlink information receive after, transfer to one or more than one processor 508 processing;In addition, the data for being related to uplink are sent To base station.In general, radio circuit 501 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillations Device, subscriber identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low noise amplification Device (LNA, Low Noise Amplifier), duplexer etc..In addition, radio circuit 501 can also by wireless communication with network It is communicated with other equipment.Any communication standard or agreement, including but not limited to global system for mobile telecommunications can be used in the wireless communication System (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 502 can be used for storing application program and data.It include that can hold in the application program that memory 502 stores Line program code.Application program can form various functional modules.Processor 508 is stored in answering for memory 502 by operation With program, thereby executing various function application and data processing.Memory 502 can mainly include storing program area and storage number According to area, wherein storing program area can application program needed for storage program area, at least one function (for example sound plays function Energy, image player function etc.) etc.;Storage data area can store according to terminal use created data (such as audio data, Phone directory etc.) etc..In addition, memory 502 may include high-speed random access memory, it can also include non-volatile memories Device, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 502 can also include Memory Controller, to provide the access of processor 508 and input unit 503 to memory 502.
Input unit 503 can be used for receiving number, character information or the user's characteristic information (such as fingerprint) of input, and Generate keyboard related with user setting and function control, mouse, operating stick, optics or trackball signal input.Specifically Ground, input unit 503 may include fingerprint recognition mould group.In some embodiments, input unit 503 can also include touch-sensitive table Face.Touch sensitive surface, also referred to as touch screen or Trackpad collect touch operation (such as the user of user on it or nearby Use the operation of any suitable object or attachment such as finger, stylus on touch sensitive surface or near touch sensitive surface), and according to Preset formula drives corresponding attachment device.Optionally, touch sensitive surface may include touch detecting apparatus and touch control Two parts of device.Wherein, the touch orientation of touch detecting apparatus detection user, and touch operation bring signal is detected, it will believe Number send touch controller to;Touch controller receives touch information from touch detecting apparatus, and is converted into contact seat Mark, then gives processor 508, and can receive order that processor 508 is sent and be executed.Furthermore, it is possible to using resistance-type, The multiple types such as condenser type, infrared ray and surface acoustic wave realize touch sensitive surface.In addition to touch sensitive surface, input unit 503 may be used also To include other input equipments.Specifically, other input equipments can include but is not limited to physical keyboard, function key (such as sound Measure control button, switch key etc.), trace ball, mouse, one of operating stick etc. or a variety of.
Display unit 504 can be used for showing information input by user or be supplied to user information and terminal it is various Graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.Display Unit 504 may include display panel.Optionally, can using liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further , touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, send processing to Device 508 is followed by subsequent processing device 508 and is provided on a display panel accordingly according to the type of touch event to determine the type of touch event Visual output.Although in fig. 8, touch sensitive surface and display panel are to realize input and input as two independent components Function, but in some embodiments it is possible to touch sensitive surface and display panel are integrated and realizes and outputs and inputs function.
Terminal may also include at least one sensor 505, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel, proximity sensor can close display panel and/or back when terminal is moved in one's ear Light.As a kind of motion sensor, gravity accelerometer can detect (generally three axis) acceleration in all directions Size can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 506 can provide the audio interface between user and terminal by loudspeaker, microphone.Voicefrequency circuit The audio data received can be converted into electric signal by 506, be transferred to loudspeaker, be converted to voice signal output by loudspeaker; On the other hand, the voice signal of collection is converted to electric signal by microphone, is converted to audio number after being received by voicefrequency circuit 506 According to then such as another terminal will be sent to through radio circuit 501 after audio data output processor 508 handles, or by sound Frequency is further processed according to output to memory 502.Voicefrequency circuit 506 is also possible that earphone jack, to provide peripheral hardware The communication of earphone and terminal.
Wireless Fidelity (WiFi) belongs to short range wireless transmission technology, and terminal can be helped by wireless fidelity module 507 User sends and receive e-mail, browses webpage and access streaming video etc., it provides wireless broadband internet access for user. Although Fig. 8 shows wireless fidelity module 507, but it is understood that, and it is not belonging to must be configured into for terminal, completely may be used To omit within the scope of not changing the essence of the invention as needed.
Processor 508 is the control centre of terminal, using the various pieces of various interfaces and the entire terminal of connection, is led to It crosses operation or executes the application program being stored in memory 502, and call the data being stored in memory 502, execute The various functions and processing data of terminal, to carry out integral monitoring to terminal.Optionally, processor 508 may include one or Multiple processing cores;Preferably, processor 508 can integrate application processor and modem processor, wherein application processor Main processing operation system, user interface and application program etc., modem processor mainly handles wireless communication.It is understood that , above-mentioned modem processor can not also be integrated into processor 508.
Terminal further includes the power supply 509 (such as battery) powered to all parts.Preferably, power supply can pass through power supply pipe Reason system and processor 508 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system Etc. functions.Power supply 509 can also include one or more direct current or AC power source, recharging system, power failure inspection The random components such as slowdown monitoring circuit, power adapter or inverter, power supply status indicator.
Although being not shown in Fig. 8, terminal can also include camera, bluetooth module etc., and details are not described herein.
Specifically in the present embodiment, the processor 508 in terminal can be according to following instruction, will be one or more The corresponding executable program code of the process of application program is loaded into memory 502, and is stored in by processor 508 to run Application program in memory 502, to realize various functions:
Obtain the accumulated time error in preset duration;According to the preset duration and the accumulated time error calculation clock Rate error;Clock rate is adjusted according to the clock rate error.
Preferably, processor 508, which has, obtains module, computing module, adjustment module, is described in detail below:
Processor 508 is used to obtain the accumulated time error in preset duration by obtaining module;
Processor 508 is used to be missed by computing module according to the preset duration and the accumulated time error calculation clock rate Difference;
Processor 508 is for being adjusted clock rate according to the clock rate error by adjustment module.
Aforesaid operations are for details, reference can be made to the embodiment of the method for front, and details are not described herein.
From the foregoing, it will be observed that being missed the embodiment of the invention provides a kind of terminal by the accumulated time obtained in preset duration Difference;According to the preset duration and the accumulated time error calculation clock rate error;According to the clock rate error clock synchronization clock rate Rate is adjusted.After the program calculates the clock rate error of terminal, the clock rate of the terminal is adjusted, so that should The system clock of terminal is synchronous with the holding of the system clock of reference time.When there are multiple terminals, the system of multiple terminal Clock can be able to maintain clock synchronization between the terminal synchronous namely multiple with the holding of the system clock of the reference time. When multiple terminal plays identical audio data as playback equipment, it is ensured that multiple playback equipment is played simultaneously, In terms of existing technologies, the synchronism of playing audio-fequency data between multiple playback equipments can be improved.
It should be noted that those of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or Part steps are relevant hardware can be instructed to complete by program, which can store in computer-readable storage medium In matter, storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
A kind of clock adjustment, device, terminal and play system is provided for the embodiments of the invention above to carry out It is discussed in detail, used herein a specific example illustrates the principle and implementation of the invention, above embodiments Illustrate to be merely used to help understand method and its core concept of the invention;Meanwhile for those skilled in the art, according to this The thought of invention, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is not answered It is interpreted as limitation of the present invention.

Claims (9)

1. a kind of clock adjustment characterized by comprising
Using current time as the first moment, to broadcast control device sending time acquisition request;
After the broadcast control device receives the time acquisition request, the own system time is compared with reference time Compared with specifically including: after broadcast control device receives the time acquisition request, sending itself current system to clock adjustment apparatus Time;The system time that the own system time sends with the broadcast control device received is compared by clock adjustment apparatus; Wherein, the reference time is the system time that the broadcast control device received is sent;
Obtain the first time error between the own system time and the reference time;
The second time error between the second moment and the reference time after obtaining preset duration, specifically includes: second When the moment, clock adjustment apparatus is again to broadcast control device sending time acquisition request;Broadcast control device receives the time After acquisition request, itself present system time is sent to clock adjustment apparatus again;Clock adjustment apparatus is by current own system Time is compared with the system time of the broadcast control device received, obtains the current own system time and plays control dress The difference between system time set, as the second time error;
Accumulated time error is obtained according to the first time error and second time error;
According to the preset duration and the accumulated time error calculation clock rate error;
Clock rate adjustment factor is calculated according to the clock rate error;
Clock rate is adjusted according to the product of the clock rate adjustment factor and original clock rate.
2. clock adjustment according to claim 1, which is characterized in that second moment obtained after preset duration The step of the second time error between the reference time, specifically includes:
After obtaining the first time error between the first moment and reference time, start timing;
When the timing reaches preset duration, the second time error between the reference time is obtained.
3. clock adjustment according to claim 1, which is characterized in that described according to the first time error and institute The step of the second time error obtains accumulated time error is stated to specifically include:
Calculate the difference between second time error and the first time error;
Using the difference as accumulated time error.
4. a kind of clock adjustment apparatus characterized by comprising
First acquisition submodule is used for using current time as the first moment, to broadcast control device sending time acquisition request;
After the broadcast control device receives the time acquisition request, the own system time is compared with reference time Compared with specifically including: after broadcast control device receives the time acquisition request, sending itself current system to clock adjustment apparatus Time;The system time that the own system time sends with the broadcast control device received is compared by clock adjustment apparatus; Wherein, the reference time is the system time that the broadcast control device received is sent;
Obtain the first time error between the own system time and the reference time;
The second time error between the second moment and the reference time after obtaining preset duration, specifically includes: second When the moment, clock adjustment apparatus is again to broadcast control device sending time acquisition request;Broadcast control device receives the time After acquisition request, itself present system time is sent to clock adjustment apparatus again;Clock adjustment apparatus is by current own system Time is compared with the system time of the broadcast control device received, obtains the current own system time and plays control dress The difference between system time set, as the second time error;
Second acquisition submodule is missed for obtaining accumulated time according to the first time error and second time error Difference;
Computing module, for according to the preset duration and the accumulated time error calculation clock rate error;
Computational submodule, for calculating clock rate adjustment factor according to the clock rate error;
Submodule is adjusted, for carrying out according to the product of the clock rate adjustment factor and original clock rate to clock rate It adjusts.
5. clock adjustment apparatus according to claim 4, which is characterized in that first acquisition submodule is specifically used for:
Obtain the first time error between the first moment and reference time;
Start timing;
When the timing reaches preset duration, the second time error between the reference time is obtained.
6. clock adjustment apparatus according to claim 4, which is characterized in that second acquisition submodule is specifically used for:
Calculate the difference between second time error and the first time error;
Using the difference as accumulated time error.
7. a kind of terminal characterized by comprising
Touch screen, for receiving the touch operation of user;
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes as appointed in claims 1 to 3 Clock adjustment described in one.
8. a kind of play system, which is characterized in that including broadcast control device and at least one playback equipment, the playback equipment It is connect by network with the broadcast control device, the playback equipment includes:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes as appointed in claims 1 to 3 Clock adjustment described in one.
9. a kind of storage medium, which is characterized in that computer program is stored in the storage medium, when the computer program When running on computers, so that the computer perform claim requires 1 to 3 described in any item clock adjustments.
CN201610882775.5A 2016-10-08 2016-10-08 Clock adjustment, device, terminal and play system Active CN106454473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610882775.5A CN106454473B (en) 2016-10-08 2016-10-08 Clock adjustment, device, terminal and play system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610882775.5A CN106454473B (en) 2016-10-08 2016-10-08 Clock adjustment, device, terminal and play system

Publications (2)

Publication Number Publication Date
CN106454473A CN106454473A (en) 2017-02-22
CN106454473B true CN106454473B (en) 2019-12-03

Family

ID=58172974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610882775.5A Active CN106454473B (en) 2016-10-08 2016-10-08 Clock adjustment, device, terminal and play system

Country Status (1)

Country Link
CN (1) CN106454473B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001004764A (en) * 1999-06-16 2001-01-12 Matsushita Electric Ind Co Ltd Clock device
CN101227246A (en) * 2008-01-28 2008-07-23 中兴通讯股份有限公司 Method and apparatus for master-salve clock synchronization
CN101252429A (en) * 2008-02-22 2008-08-27 浙江大学 Method for enhancing clock synchronization accuracy in distributed network system
CN101399653A (en) * 2007-09-25 2009-04-01 普然通讯技术(上海)有限公司 Time clock synchronization implementation method
CN101478358A (en) * 2008-01-02 2009-07-08 中兴通讯股份有限公司 Method and device for optimized time synchronization correction
CN101826955A (en) * 2010-01-28 2010-09-08 陈秋玲 Synchronization error correction method
CN102722099A (en) * 2012-06-13 2012-10-10 东莞市洲进钟表有限公司 Clock correction system with error computing function and correction method
CN105872380A (en) * 2016-04-26 2016-08-17 乐视控股(北京)有限公司 Video image acquiring method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001004764A (en) * 1999-06-16 2001-01-12 Matsushita Electric Ind Co Ltd Clock device
CN101399653A (en) * 2007-09-25 2009-04-01 普然通讯技术(上海)有限公司 Time clock synchronization implementation method
CN101478358A (en) * 2008-01-02 2009-07-08 中兴通讯股份有限公司 Method and device for optimized time synchronization correction
CN101227246A (en) * 2008-01-28 2008-07-23 中兴通讯股份有限公司 Method and apparatus for master-salve clock synchronization
CN101252429A (en) * 2008-02-22 2008-08-27 浙江大学 Method for enhancing clock synchronization accuracy in distributed network system
CN101826955A (en) * 2010-01-28 2010-09-08 陈秋玲 Synchronization error correction method
CN102722099A (en) * 2012-06-13 2012-10-10 东莞市洲进钟表有限公司 Clock correction system with error computing function and correction method
CN105872380A (en) * 2016-04-26 2016-08-17 乐视控股(北京)有限公司 Video image acquiring method and device

Also Published As

Publication number Publication date
CN106454473A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106411448B (en) Control method for playing back, device and terminal
CN104243671B (en) Volume adjusting method, device and electronic equipment
CN103559731B (en) Method and terminal for displaying lyrics under screen locking state
CN106453597B (en) The method of adjustment of data synchronizing cycles, apparatus and system
CN106452643B (en) Control method for playing back, device, terminal and play system
CN106448714B (en) A kind of synchronous broadcast method of playback equipment, apparatus and system
CN106487984B (en) A kind of method and apparatus adjusting volume
CN105185401B (en) The method and device of synchronized multimedia listed files
US20200212701A1 (en) Method for controlling multi-mode charging, mobile terminal, and storage medium
CN106791916B (en) Method, device and system for recommending audio data
CN106411447B (en) Control method for playing back, device and terminal
CN103458286A (en) Television channel switching method and device
CN106452644B (en) Control method for playing back, device and terminal
CN103533127A (en) Call control method of terminal and terminal
CN105786439B (en) The control method and device of sound in a kind of terminal
CN111443803A (en) Mode switching method, device, storage medium and mobile terminal
CN103647868A (en) Method and device for reducing ringtone interferences
CN103546632A (en) Method and device for alarm ringing of mobile terminal and mobile terminal
CN112286286B (en) Standby control method, wearable device and computer readable storage medium
CN111081283A (en) Music playing method and device, storage medium and terminal equipment
CN105159655B (en) Behavior event playing method and device
CN106454420B (en) A kind of clock synchronizing method and device
CN106454421B (en) A kind of clock adjustment, device, terminal and multimedia synchronous play system
CN106411449B (en) Control method for playing back, device and terminal
CN106210325B (en) Method, device and terminal for setting incoming call ringtone of social application

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant