CN106326010B - A kind of control plays the method and intelligent sound box of synchronization - Google Patents
A kind of control plays the method and intelligent sound box of synchronization Download PDFInfo
- Publication number
- CN106326010B CN106326010B CN201610724547.5A CN201610724547A CN106326010B CN 106326010 B CN106326010 B CN 106326010B CN 201610724547 A CN201610724547 A CN 201610724547A CN 106326010 B CN106326010 B CN 106326010B
- Authority
- CN
- China
- Prior art keywords
- playback progress
- sound box
- intelligent sound
- buffer area
- mobile terminal
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5044—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/503—Resource availability
Abstract
The invention belongs to fields of communication technology, provide a kind of method and intelligent sound box that control broadcasting is synchronous, which comprises obtain the first playback progress of the currently played song of intelligent sound box;Playback progress in first buffer area of the intelligent sound box is updated to first playback progress, first buffer area is preset for storing the storage region of the playback progress;If detecting, the main thread of the intelligent sound box is in idle condition, it then controls the main thread and extracts first playback progress from first buffer area, and first playback progress is sent to mobile terminal, so that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.The occupancy to intelligent sound box resource can be reduced when sending playback progress to mobile terminal through the invention, so that intelligent sound box be effectively prevent the problems such as playing Caton, can not connecting with mobile terminal occur.
Description
Technical field
The invention belongs to fields of communication technology more particularly to a kind of control to play synchronous method and intelligent sound box.
Background technique
Intelligent sound box is a kind of novel intelligent appliance equipment, can check and control intelligent sound box by terminal device and broadcast
It sings song.Since intelligent sound box does not show equipment, the playback progress of the played song of intelligent sound box is usually sent to terminal
Equipment is shown.However, may result in intelligent sound box due to network state is poor etc. while sending a large amount of play
Progress can thus occupy a large amount of intelligent sound box resource, so as to cause intelligent sound box occur playing Caton, can not with it is mobile eventually
The problems such as end connection.
Therefore, it is necessary to propose a kind of new technical solution, to solve the above technical problems.
Summary of the invention
In consideration of it, the embodiment of the present invention provides a kind of method and intelligent sound box that control broadcasting is synchronous, whole to movement
When end sends playback progress, the occupancy to intelligent sound box resource is reduced, so that intelligent sound box be effectively prevent to occur playing Caton, nothing
The problems such as method is connect with mobile terminal.
The embodiment of the present invention in a first aspect, providing a kind of control plays synchronous method, which comprises
Obtain the first playback progress of the currently played song of intelligent sound box;
Playback progress in first buffer area of the intelligent sound box is updated to first playback progress, described first
Buffer area is preset for storing the storage region of the playback progress;
If detecting, the main thread of the intelligent sound box is in idle condition, and it is slow from described first to control the main thread
It deposits and extracts first playback progress in area, and first playback progress is sent to mobile terminal, so that the movement
The playback progress of terminal is synchronous with the playback progress of the intelligent sound box.
The second aspect of the embodiment of the present invention, provides a kind of intelligent sound box, and the intelligent sound box includes:
Acquiring unit, for obtaining the first playback progress of the currently played song of the intelligent sound box;
Updating unit is updated to described first for the playback progress in the first buffer area by the intelligent sound box and plays
Progress, first buffer area are preset for storing the storage region of the playback progress;
First control unit, if for detecting that the main thread of the intelligent sound box is in idle condition, described in control
Main thread extracts first playback progress from first buffer area, and first playback progress is sent to movement eventually
End, so that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention is by obtaining intelligent sound
First playback progress of the currently played song of case, and the playback progress in the first buffer area of intelligent sound box is updated to first
Playback progress, when the main thread for detecting intelligent sound box is in idle condition, main control line journey is extracted from the first buffer area
First playback progress, and the first playback progress is sent to mobile terminal, so that the playback progress and intelligence of mobile terminal
The playback progress of speaker is synchronous.The embodiment of the present invention is when the main thread of intelligent sound box is in idle condition, just from the first caching
Playback progress is extracted in area, be can avoid the problem of intelligent sound box occurs while sending a large amount of playback progresss, is reduced to intelligent sound
The occupancy of case resource, so as to effectively prevent intelligent sound box the problems such as playing Caton, can not connecting with mobile terminal occur.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the schematic flow diagram that the control that the embodiment of the present invention one provides plays synchronous method;
Fig. 2 is the schematic flow diagram that control provided by Embodiment 2 of the present invention plays synchronous method;
Fig. 3 is the schematic block diagram for the intelligent sound box that the embodiment of the present invention three provides;
Fig. 4 is the schematic block diagram for the intelligent sound box that the embodiment of the present invention four provides;
Fig. 5 is the schematic block diagram for the intelligent sound box that the embodiment of the present invention five 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, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step,
Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, mobile terminal described in the embodiment of the present invention is including but not limited to such as with the sensitive table of touch
Mobile phone, laptop computer or the tablet computer in face (for example, touch-screen display and/or touch tablet) etc it is other
Portable device.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but is had
The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch tablet).
In following discussion, the mobile terminal including display and touch sensitive surface is described.However, should manage
Solution, mobile terminal may include that one or more of the other physical User of such as physical keyboard, mouse and/or control-rod connects
Jaws equipment.
Mobile terminal supports various application programs, such as one of the following or multiple: drawing application program, demonstration application
Program, word-processing application, website creation application program, disk imprinting application program, spreadsheet applications, game are answered
With program, telephony application, videoconference application, email application, instant messaging applications, forging
Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing to answer
With program, digital music player application and/or video frequency player application program.
At least one of such as touch sensitive surface can be used in the various application programs that can be executed on mobile terminals
Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick
Feel the corresponding information shown in the one or more functions and terminal on surface.In this way, terminal public physical structure (for example,
Touch sensitive surface) it can support the various application programs with user interface intuitive and transparent for a user.
Referring to Fig. 1, it is that a kind of control that the embodiment of the present invention one provides plays the schematic flow diagram of synchronous method, such as schemes
Shown this method may comprise steps of:
In step s101, the first playback progress of the currently played song of intelligent sound box is obtained.
In embodiments of the present invention, intelligent sound box timing or can obtain in real time the currently played song of the intelligent sound box
Playback progress (i.e. the first playback progress).For example, can be currently played in the acquisition intelligent sound box for receiving user's transmission
The instruction of first playback progress of song, or it is currently played according to the acquisition intelligent sound box that preset time interval triggers
After the information of first playback progress of song, start the first playback progress for obtaining the currently played song of intelligent sound box.
Specifically, can be by receiving the currently played song that playback engine is fed back to the intelligent sound box in intelligent sound box
The first bent playback progress obtains first playback progress.
In step s 102, the playback progress in the first buffer area of the intelligent sound box described first is updated to play
Progress, first buffer area are preset for storing the storage region of the playback progress.
In embodiments of the present invention, one piece of storage region conduct can be divided from the buffer area of the intelligent sound box in advance
Store the region (i.e. the first buffer area) of the playback progress of the intelligent sound box.The intelligent sound box is obtaining currently played song
After the first bent playback progress, the playback progress in the first buffer area of the intelligent sound box is updated to described first and is played
Progress.By the way that first playback progress is updated to the first buffer area, it can avoid intelligent sound box and occur while sending largely to broadcast
The problem of degree of putting into, and since the speed of service of caching is than very fast, uses the first playback progress described in the first buffer memory can be with
Improve the operation of hardware in the intelligent sound box.
In step s 103, if detecting, the main thread of the intelligent sound box is in idle condition, and controls the main line
Journey extracts first playback progress from first buffer area, and first playback progress is sent to mobile terminal,
So that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.
In embodiments of the present invention, described first can be sent to mobile terminal using the main thread of the intelligent sound box to broadcast
Degree of putting into controls the main thread from described first if detecting that the main thread of the intelligent sound box is in idle condition
First playback progress is extracted in buffer area, and first playback progress is sent to mobile terminal, can avoid intelligent sound
The problem of case occurs while sending a large amount of playback progresss, reduces the occupancy to intelligent sound box resource, so as to effectively prevent intelligence
There is the problems such as playing Caton, can not connecting with mobile terminal in energy speaker.
Further, after first playback progress is sent to mobile terminal, further includes:
Detect the playback progress in first buffer area;
If the playback progress in first buffer area is identical as first playback progress, first caching is emptied
Area;
If the playback progress and first playback progress in first buffer area be not identical, from first caching
The playback progress is extracted in area, and the playback progress is sent to the mobile terminal.
In embodiments of the present invention, first playback progress is sent in the main thread of the intelligent sound box mobile whole
After end, the playback progress in first buffer area is detected.If playback progress in first buffer area and described the
One playback progress is identical, since first playback progress has been issued to the mobile terminal, in order to further reduce to institute
The occupancy of intelligent sound box resource is stated, first buffer area can be emptied, while described first can be detected at regular intervals
Whether new playback progress is had in buffer area, and when having new playback progress in first buffer area, the main thread is from institute
It states and extracts the new playback progress in the first buffer area and be sent to mobile terminal.If broadcasting in first buffer area into
Degree is not identical as first playback progress, then illustrates that the playback progress in first buffer area is new playback progress, be
The playback progress of the holding mobile terminal is synchronous with the playback progress of the intelligent sound box, can control the main thread from
The playback progress in first buffer area is extracted in first buffer area, and the playback progress is sent to the movement eventually
End.
It should be noted that the first playback progress in the embodiment of the present invention refers to a certain playback progress, " first " herein
The convenience only stated and referred to, is not meant to that corresponding first is centainly had in specific implementation of the invention broadcasts
Degree of putting into.Similarly, " first " in the first buffer area is not meant to also just for the sake of statement and the convenience referred at this
Centainly there is corresponding first buffer area in the specific implementation of invention.
The embodiment of the present invention is by obtaining the first playback progress of the currently played song of intelligent sound box, and by intelligent sound box
The first buffer area in playback progress be updated to the first playback progress, be in idle shape in the main thread for detecting intelligent sound box
When state, main control line journey extracts the first playback progress from the first buffer area, and the first playback progress is sent to mobile terminal,
So that the playback progress of mobile terminal is synchronous with the playback progress of intelligent sound box.Master of the embodiment of the present invention in intelligent sound box
When thread is in idle condition, playback progress just is extracted from the first buffer area, intelligent sound box is can avoid and occurs while sending big
The problem of measuring playback progress, reduces the occupancy to intelligent sound box resource, so as to effectively prevent intelligent sound box to occur playing card
The problems such as pausing, can not being connect with mobile terminal.
Referring to fig. 2, it is the schematic flow diagram for the method that a kind of control provided by Embodiment 2 of the present invention plays synchronization, such as schemes
Shown this method may comprise steps of:
In step s 201, the first playback progress of the currently played song of intelligent sound box is obtained.
In embodiments of the present invention, intelligent sound box timing or can obtain in real time the currently played song of the intelligent sound box
Playback progress (i.e. the first playback progress).For example, can be currently played in the acquisition intelligent sound box for receiving user's transmission
The instruction of first playback progress of song, or it is currently played according to the acquisition intelligent sound box that preset time interval triggers
After the information of first playback progress of song, start the first playback progress for obtaining the currently played song of intelligent sound box.
Specifically, can be by receiving the currently played song that playback engine is fed back to the intelligent sound box in intelligent sound box
The first bent playback progress obtains first playback progress.
In step S202, the playback progress in the first buffer area of the intelligent sound box is updated to described first and is played
Progress, first buffer area are preset for storing the storage region of the playback progress.
In embodiments of the present invention, one piece of storage region conduct can be divided from the buffer area of the intelligent sound box in advance
Store the region (i.e. the first buffer area) of the playback progress of the intelligent sound box.The intelligent sound box is obtaining currently played song
After the first bent playback progress, the playback progress in the first buffer area of the intelligent sound box is updated to described first and is played
Progress.By the way that first playback progress is updated to the first buffer area, it can avoid intelligent sound box and occur while sending largely to broadcast
The problem of degree of putting into, and since the speed of service of caching is than very fast, uses the first playback progress described in the first buffer memory can be with
Improve the operation of hardware in the intelligent sound box.
In step S203, if detecting, the main thread of the intelligent sound box is in busy state, controls the intelligence
The worker thread of energy speaker extracts first playback progress from first buffer area, and first playback progress is sent out
Mobile terminal is given, so that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.
It in embodiments of the present invention, can be using the main thread and/or multiple worker threads of the intelligent sound box to described
Mobile terminal sends first playback progress, presets the quantity of the worker thread.If detecting the intelligent sound
The main thread of case is in busy state, then the worker thread for controlling the intelligent sound box extracts institute from first buffer area
The first playback progress is stated, and first playback progress is sent to mobile terminal, intelligent sound box is can avoid and occurs while sending
The problem of a large amount of playback progresss, reduces the occupancy to intelligent sound box resource, so as to effectively prevent intelligent sound box to play
Caton, the problems such as can not being connect with mobile terminal.
Further, if the main thread for detecting the intelligent sound box is in busy state, the intelligence is controlled
The worker thread of energy speaker extracts first playback progress from first buffer area and includes:
If detecting, the main thread of the intelligent sound box is in busy state, obtains in the intelligent sound box in non-
The quantity of the worker thread of idle state;
If the quantity is less than preset threshold, the first worker thread is created, and control first worker thread from institute
It states and extracts first playback progress in the first buffer area.
In embodiments of the present invention, it if detecting that the main thread of the intelligent sound box is in busy state, first examines
Whether the quantity for surveying the worker thread in the intelligent sound box in busy state is less than preset threshold.If the intelligent sound
The quantity of worker thread in case in busy state is less than preset threshold, then creates new worker thread (the i.e. first auxiliary
Thread), and control the new worker thread and extract first playback progress from first buffer area, and by described first
Playback progress is sent to the mobile terminal.If the quantity of the worker thread in the intelligent sound box in busy state is big
In or equal to preset threshold, then after waiting the main thread of the intelligent sound box to send the playback progress sent, control
The main thread extracts first playback progress from first buffer area, and first playback progress is sent to institute
State mobile terminal.Wherein, preset threshold is that can at most be in busy state in the preset intelligent sound box simultaneously
The quantity of worker thread, is not limited thereto.
Further, after first playback progress is sent to the mobile terminal, further includes:
Detect the playback progress in first buffer area;
If the playback progress in first buffer area is identical as first playback progress, first caching is emptied
Area, and destroy the worker thread;
If the playback progress and first playback progress in first buffer area be not identical, the auxiliary line is destroyed
Journey.
In embodiments of the present invention, first playback progress is sent in the worker thread of the intelligent sound box described
After mobile terminal, the playback progress in first buffer area is detected.If playback progress in first buffer area with
First playback progress is identical, since first playback progress has been issued to the mobile terminal, in order to further subtract
Few occupancy to the intelligent sound box resource, can empty first buffer area, and destroy the worker thread.If described
Playback progress and first playback progress in first buffer area be not identical, then illustrate broadcasting in first buffer area into
Degree is new playback progress, in order to keep the playback progress of the mobile terminal synchronous with the playback progress of the intelligent sound box,
The main thread of the intelligent sound box be can control from the playback progress extracted in first buffer area in first buffer area,
And the playback progress is sent to the mobile terminal, and in order to further reduce the occupancy to the intelligent sound box resource, pin
Ruin the worker thread.
It should be noted that the first playback progress in the embodiment of the present invention refers to a certain playback progress, " first " herein
The convenience only stated and referred to, is not meant to that corresponding first is centainly had in specific implementation of the invention broadcasts
Degree of putting into.Similarly, " first " in the first buffer area is not meant to also just for the sake of statement and the convenience referred at this
Centainly there is corresponding first buffer area in the specific implementation of invention.Similarly, " first " in the first worker thread
Also it just for the sake of statement and the convenience referred to, is not meant to centainly to be corresponding to it in specific implementation of the invention
The first worker thread.
The embodiment of the present invention is by obtaining the first playback progress of the currently played song of intelligent sound box, and by intelligent sound box
The first buffer area in playback progress be updated to the first playback progress, the main thread for detecting intelligent sound box be in it is busy
When state, the worker thread for controlling intelligent sound box extracts the first playback progress from the first buffer area, and by the first playback progress
It is sent to mobile terminal, so that the playback progress of mobile terminal is synchronous with the playback progress of intelligent sound box.The present invention is implemented
When the main thread of intelligent sound box is in busy state, the worker thread for controlling intelligent sound box extracts example from the first buffer area
Playback progress can avoid the problem of intelligent sound box occurs while sending a large amount of playback progresss, reduce to intelligent sound box resource
It occupies, so as to effectively prevent intelligent sound box the problems such as playing Caton, can not connecting with mobile terminal occur.
It is a kind of schematic block diagram for intelligent sound box that the embodiment of the present invention three provides referring to Fig. 3, the intelligent sound as shown in the figure
Case may include: acquiring unit 31, updating unit 32, first control unit 33.
The acquiring unit 31, for obtaining the first playback progress of the currently played song of the intelligent sound box;
The updating unit 32 is updated to described for the playback progress in the first buffer area by the intelligent sound box
One playback progress, first buffer area are preset for storing the storage region of the playback progress;
The first control unit 33, if being controlled for detecting that the main thread of the intelligent sound box is in idle condition
It makes the main thread and extracts first playback progress from first buffer area, and first playback progress is sent to
Mobile terminal, so that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.
Further, the intelligent sound box further include:
First detection unit, for detecting the playback progress in first buffer area;
First empties unit, if the playback progress in first buffer area is identical as first playback progress,
Then empty first buffer area;
Extraction unit, if in first buffer area playback progress and first playback progress it is not identical,
The playback progress is extracted from first buffer area, and the playback progress is sent to the mobile terminal.
Intelligent sound box provided in an embodiment of the present invention can be used in aforementioned corresponding embodiment of the method one, details referring to
The description of above-described embodiment one, is not repeated herein.
It referring to fig. 4, is a kind of schematic block diagram for intelligent sound box that the embodiment of the present invention four provides, the intelligent sound as shown in the figure
Case may include: acquiring unit 41, updating unit 42, the second control unit 43.
The acquiring unit 41, for obtaining the first playback progress of the currently played song of the intelligent sound box;
The updating unit 42 is updated to described for the playback progress in the first buffer area by the intelligent sound box
One playback progress, first buffer area are preset for storing the storage region of the playback progress;
Second control unit 43, if for detecting that the main thread of the intelligent sound box is in busy state,
The worker thread for controlling the intelligent sound box extracts first playback progress from first buffer area, and by described first
Playback progress is sent to mobile terminal, so that the playback progress of the mobile terminal and the playback progress of the intelligent sound box are same
Step.
Further, second control unit 43 includes:
Subelement is obtained, if for detecting that the main thread of the intelligent sound box be in busy state, described in acquisition
The quantity of worker thread in intelligent sound box in busy state;
Subelement is created, if being less than preset threshold for the quantity, creates the first worker thread, and controls described the
One worker thread extracts first playback progress from first buffer area.
Further, the intelligent sound box further include:
Second detection unit, for detecting the playback progress in first buffer area;
Second empties unit, if the playback progress in first buffer area is identical as first playback progress,
First buffer area is then emptied, and destroys the worker thread;
Destroy unit, if in first buffer area playback progress and first playback progress it is not identical,
Destroy the worker thread.
Intelligent sound box provided in an embodiment of the present invention can be used in aforementioned corresponding embodiment of the method two, details referring to
The description of above-described embodiment two, is not repeated herein.
It is a kind of schematic block diagram for intelligent sound box that the embodiment of the present invention five provides referring to Fig. 5.The intelligence as shown in the figure
Speaker may include: one or more processors 501 (one is only shown in figure);One or more input equipments 502 are (in figure only
Show one), one or more output equipments 503 (one is only shown in figure) and memory 504.Above-mentioned processor 501, input
Equipment 502, output equipment 503 and memory 504 are connected by bus 505.Memory 502 for storing instruction, processor 501
For executing the instruction of the storage of memory 502.Wherein:
The processor 501, for obtaining the first playback progress of the currently played song of the intelligent sound box, and by institute
It states the playback progress in the first buffer area of intelligent sound box and is updated to first playback progress, first buffer area is described
It is preset for storing the storage region of the playback progress in memory 504, if detecting the master of the intelligent sound box
Thread is in idle condition, then controls the main thread and extract first playback progress from first buffer area, and lead to
Cross the output equipment 503 and first playback progress be sent to mobile terminal so that the broadcasting of the mobile terminal into
It spends synchronous with the playback progress of the intelligent sound box.
The processor 501 is also used to detect the playback progress in first buffer area, if in first buffer area
Playback progress it is identical as first playback progress, then first buffer area is emptied, if broadcasting in first buffer area
Degree of putting into and first playback progress be not identical, then extracts the playback progress from first buffer area, and pass through institute
It states output equipment 503 and the playback progress is sent to the mobile terminal.
The processor 501, if being also used to detect, the main thread of the intelligent sound box is in busy state, controls
The worker thread of the intelligent sound box extracts first playback progress from first buffer area, and is set by the output
First playback progress is sent to the mobile terminal by standby 503 so that the playback progress of the mobile terminal with it is described
The playback progress of intelligent sound box is synchronous.
The processor 501, if being also used to detect, the main thread of the intelligent sound box is in busy state, obtains
The quantity of worker thread in the intelligent sound box in busy state is created if being less than preset threshold for the quantity
The first worker thread is built, and controls first worker thread and extracts first playback progress from first buffer area.
The processor 501 is also used to detect the playback progress in first buffer area, if in first buffer area
Playback progress it is identical as first playback progress, then first buffer area is emptied, and destroy the worker thread, if institute
It states playback progress in the first buffer area and first playback progress is not identical, then destroy the worker thread.
The output equipment 503 is used for mobile terminal execution result back information.
The memory 504, for storing software program and unit, the processor 501 is stored in institute by operation
The software program and unit of memory 504 are stated, thereby executing various function application and data processing, i.e. realization mobile terminal
Playback progress it is synchronous with the playback progress of intelligent sound box.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
Reason device is also possible to any conventional processor etc..
Input equipment 502 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user
Directional information), microphone etc., output equipment 803 may include display (LCD etc.), loudspeaker etc..
The memory 504 may include read-only memory and random access memory, and to processor 801 provide instruction and
Data.The a part of of memory 504 can also include nonvolatile RAM.For example, memory 504 can also be deposited
Store up the information of device type.
In the specific implementation, processor 501 described in the embodiment of the present invention, input equipment 502, output equipment 503 can
It executes control provided in an embodiment of the present invention and plays reality described in the first embodiment and second embodiment of synchronous method
Existing mode, also can be performed the implementation of intelligent sound box described in the embodiment of the present invention, details are not described herein.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the intelligence of foregoing description
The specific work process of energy speaker and unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed intelligent sound box and method, Ke Yitong
Other modes are crossed to realize.For example, the apparatus embodiments described above are merely exemplary, for example, the unit is drawn
Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can
To combine or be desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed
Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or
Communication connection is also possible to electricity, mechanical or other form connections.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, is also possible to two or more units and is integrated in one unit.It is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection scope subject to.
Claims (8)
1. a kind of control plays synchronous method, it is applied to intelligent sound box, which is characterized in that the described method includes:
Obtain the first playback progress of the currently played song of intelligent sound box;
Playback progress in first buffer area of the intelligent sound box is updated to first playback progress, first caching
Area is to be divided from the buffer area of the intelligent sound box in advance for storing the storage region of the playback progress;
If detecting, the main thread of the intelligent sound box is in idle condition, and controls the main thread from first buffer area
It is middle to extract first playback progress, and first playback progress is sent to mobile terminal, so that the mobile terminal
Playback progress it is synchronous with the playback progress of the intelligent sound box;
Detect the playback progress in first buffer area;
If the playback progress in first buffer area is identical as first playback progress, first buffer area is emptied,
Detect in first buffer area whether have new playback progress at regular intervals simultaneously;
If the playback progress and first playback progress in first buffer area be not identical, it is determined that first buffer area
In playback progress be new playback progress, extract the playback progress from first buffer area, and by it is described play into
Degree is sent to the mobile terminal.
2. the method according to claim 1, wherein the method also includes:
If detecting, the main thread of the intelligent sound box is in busy state, control the worker thread of the intelligent sound box from
First playback progress is extracted in first buffer area, and first playback progress is sent to the mobile terminal,
So that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.
3. according to the method described in claim 2, it is characterized in that, if the main thread for detecting the intelligent sound box is in
Busy state, the then worker thread for controlling the intelligent sound box extract first playback progress from first buffer area
Include:
If detecting, the main thread of the intelligent sound box is in busy state, obtains in the intelligent sound box in busy
The quantity of the worker thread of state;
If the quantity is less than preset threshold, the first worker thread is created, and controls first worker thread from described the
First playback progress is extracted in one buffer area.
4. according to the method in claim 2 or 3, which is characterized in that first playback progress is being sent to the shifting
After dynamic terminal, further includes:
Detect the playback progress in first buffer area;
If the playback progress in first buffer area is identical as first playback progress, first buffer area is emptied,
And destroy the worker thread;
If the playback progress and first playback progress in first buffer area be not identical, the worker thread is destroyed.
5. a kind of intelligent sound box, which is characterized in that the intelligent sound box includes:
Acquiring unit, for obtaining the first playback progress of the currently played song of the intelligent sound box;
Updating unit, for the playback progress in the first buffer area by the intelligent sound box be updated to described first play into
Degree, first buffer area are to be divided from the buffer area of the intelligent sound box in advance for storing depositing for the playback progress
Storage area domain;
First control unit, if controlling the main line for detecting that the main thread of the intelligent sound box is in idle condition
Journey extracts first playback progress from first buffer area, and first playback progress is sent to mobile terminal,
So that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box;
First detection unit, for detecting the playback progress in first buffer area;
First empties unit, if the playback progress in first buffer area is identical as first playback progress, clearly
Empty first buffer area, while detecting in first buffer area whether have new playback progress at regular intervals;
Extraction unit, if in first buffer area playback progress and first playback progress it is not identical, it is determined that
Playback progress in first buffer area is new playback progress, extracts the playback progress from first buffer area,
And the playback progress is sent to the mobile terminal.
6. intelligent sound box according to claim 5, which is characterized in that the intelligent sound box further include:
Second control unit, if controlling the intelligence for detecting that the main thread of the intelligent sound box is in busy state
The worker thread of energy speaker extracts first playback progress from first buffer area, and first playback progress is sent out
The mobile terminal is given, so that the playback progress of the mobile terminal is synchronous with the playback progress of the intelligent sound box.
7. intelligent sound box according to claim 6, which is characterized in that second control unit includes:
Subelement is obtained, if obtaining the intelligence for detecting that the main thread of the intelligent sound box is in busy state
The quantity of worker thread in speaker in busy state;
Subelement is created, if being less than preset threshold for the quantity, creates the first worker thread, and it is auxiliary to control described first
Index contour journey extracts first playback progress from first buffer area.
8. intelligent sound box according to claim 6 or 7, which is characterized in that the intelligent sound box further include:
Second detection unit, for detecting the playback progress in first buffer area;
Second empties unit, if the playback progress in first buffer area is identical as first playback progress, clearly
Empty first buffer area, and destroy the worker thread;
Destroy unit, if in first buffer area playback progress and first playback progress it is not identical, destroy
The worker thread.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610724547.5A CN106326010B (en) | 2016-08-25 | 2016-08-25 | A kind of control plays the method and intelligent sound box of synchronization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610724547.5A CN106326010B (en) | 2016-08-25 | 2016-08-25 | A kind of control plays the method and intelligent sound box of synchronization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106326010A CN106326010A (en) | 2017-01-11 |
CN106326010B true CN106326010B (en) | 2019-07-26 |
Family
ID=57791626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610724547.5A Active CN106326010B (en) | 2016-08-25 | 2016-08-25 | A kind of control plays the method and intelligent sound box of synchronization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106326010B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109118597A (en) * | 2018-08-29 | 2019-01-01 | 上海哔哩哔哩科技有限公司 | Intelligent terminal, ticketing service verifying system, method and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101414915A (en) * | 2007-10-19 | 2009-04-22 | 英业达股份有限公司 | System and method for processing remote copied send request |
CN104732989A (en) * | 2015-01-26 | 2015-06-24 | 湖南天冠电子信息技术有限公司 | Intelligent music playing control system and method |
CN104902316A (en) * | 2015-05-14 | 2015-09-09 | 广东欧珀移动通信有限公司 | Method and device for synchronous playing of time, intelligent sound box, and mobile terminal |
-
2016
- 2016-08-25 CN CN201610724547.5A patent/CN106326010B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101414915A (en) * | 2007-10-19 | 2009-04-22 | 英业达股份有限公司 | System and method for processing remote copied send request |
CN104732989A (en) * | 2015-01-26 | 2015-06-24 | 湖南天冠电子信息技术有限公司 | Intelligent music playing control system and method |
CN104902316A (en) * | 2015-05-14 | 2015-09-09 | 广东欧珀移动通信有限公司 | Method and device for synchronous playing of time, intelligent sound box, and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN106326010A (en) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108512695B (en) | Method and device for monitoring application blockage | |
US9542949B2 (en) | Satisfying specified intent(s) based on multimodal request(s) | |
CN104808983B (en) | A kind of method for pushing and server of application program | |
CN113037929B (en) | Information relay output method and device, electronic equipment and storage medium | |
CN106453904A (en) | Information reminding method and terminal | |
CN111124668A (en) | Memory release method and device, storage medium and terminal | |
CN107506494B (en) | Document handling method, mobile terminal and computer readable storage medium | |
CN106407370A (en) | Song word display method and mobile terminal | |
CN107257313A (en) | A kind of message synchronization method and terminal | |
CN107277581B (en) | A kind of video broadcasting method and its device, mobile terminal | |
CN106406494A (en) | Method for scheduling processor and terminal | |
CN106326010B (en) | A kind of control plays the method and intelligent sound box of synchronization | |
CN108920704A (en) | File access pattern method, file restoring device and mobile terminal | |
CN108366298A (en) | Video broadcasting method, mobile terminal and computer readable storage medium | |
CN106407792B (en) | Control the method and speaker of mobile terminal | |
CN106775445B (en) | Data migration method and device | |
CN105551500B (en) | A kind of acoustic signal processing method and device | |
CN112966201B (en) | Object processing method, device, electronic equipment and storage medium | |
CN112799754B (en) | Information processing method, information processing device, storage medium and computer equipment | |
CN106028221B (en) | A kind of method and intelligent sound box controlling time synchronization | |
CN108369692A (en) | The abundant preview of communication is provided in communicating summary | |
CN112783860B (en) | Method, device, storage medium and computer equipment for constructing mirror image database | |
CN112764564A (en) | Touch information processing method and device, storage medium and electronic equipment | |
CN106685807A (en) | Display information method and server | |
CN106406805B (en) | A kind of method and mobile terminal of speaker grouping |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: 523841 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before: Guangdong OPPO Mobile Communications Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |