Summary of the invention
The equity embodiments providing a kind of star structure controls player method, in order to solve existing skill
The problems referred to above in art, it is ensured that being smoothed out of playing process.
The equity embodiments providing a kind of star structure controls player method, and the method includes:
After communication connection foundation completes between each playback equipment, between playback equipment, play out resource information
Share, and be operated in real time the detection of state each other, in all playback equipments, one of them is
Playing the master control playback equipment of master control function, other are from control playback equipment;
Described master control playback equipment is after the playing resource information obtaining other playback equipments all, according to broadcasting
Demand sets up the playback relationship between each playback equipment with corresponding playing resource and each playback equipment;
Described playback relationship, after receiving play instruction, is turned by described master control playback equipment according to play instruction
Change into for indicating each playback equipment to play the play command of corresponding playing resource;
Described master control playback equipment is respectively sent to correspondence from the play command controlling playback equipment by being used for indicating
Respectively from control playback equipment, all of playback equipment controls to broadcast according to the playing resource of play command and self storage
Put;
When the duty exception of described master control playback equipment being detected, according to preset rules from other from control
Playback equipment is selected new master control playback equipment.
In technique scheme of the present invention, by arranging the major state of playback equipment and from control state, make
Playback equipment not only has the function of broadcasting, additionally it is possible to have control when playback equipment is in major state
Function, plays the effect of Traditional control machine.
It is preferred that the communication connection procedure of above-mentioned each playback equipment includes:
When each playback equipment starts by Web broadcast initiation message, each playback equipment having been turned on receives
After this initiation message, the network connection parameter of self is fed back to the playback equipment of new startup, and according to opening
The network connection parameter comprised in dynamic message connects the new playback equipment started;
The new equipment started connects corresponding playback equipment according to the network connection parameter of described feedback.
In technique scheme of the present invention, each playback equipment upon actuation by with the playback equipment having been turned on
Internet Connecting quantity is to complete the connection procedure of network.
Usually, each playback equipment is equipped with unique mark, and described network connection parameter comprises for characterizing
Unique mark of the playback equipment of transmission information, arbitrary playback equipment is receiving initiation message or is starting feedback
After message, set up the device data structure representing corresponding playback equipment according to described mark, and by this number of devices
Adding in facility information list according to structure, arbitrary playback equipment will represent the device data of self upon actuation
Structure is added in facility information list, after all of playback equipment all starts, and each playback equipment
Obtain the facility information list representing all playback equipments.
In the above-mentioned technical solutions of this embodiment, inside each playback equipment, all preserve facility information list,
This table for recording some specifying informations of each equipment, such as playing resource information in network, identification information etc.,
It is easy to each playback equipment and grasps the specifying information of each equipment in network.In the present embodiment, each playback equipment leads to
Cross the process that network connects and obtain unique mark of other equipment, and establish device data structure and be saved in
In facility information list.
Preferably, play out the information sharing of resource between playback equipment, specifically include:
After the startup of each playback equipment, basis presets filtercondition and collects the information of playing resource in the machine,
And described playing resource information is added in the device data structure representing this player;
On other playback equipments arbitrary connect after this playback equipment, by all described playing resource of collection
Information is sent to this other playback equipment connected in the way of the Resources list;
After other playback equipments described receive the Resources list, according to the identifier lookup comprised in described the Resources list
Device data structure corresponding in facility information list, and the playing resource information in described the Resources list is deposited
Storage is in the device data structure found.
In technique scheme of the present invention, it is proposed that the process of a resource-sharing, each playback equipment with
Other playback equipment that the mode of the Resources list is sent to the playing resource information of self in network, the most every
Individual playback equipment have received the Resources list of other playback equipments, and is stored into the device data knot of correspondence
In structure.
Preferably, when the playing resource in arbitrary described playback equipment changes, this playback equipment updates
The Resources list of oneself, is subsequently sent to other playback equipments being attached thereto;
Other playback equipments update corresponding playback equipment in respective facility information list after receiving the Resources list
Device data structure.
In above-mentioned technique scheme, after the playing resource in each playback equipment updates, the Resources list is also
Can update accordingly, and be sent to other playback equipments and go to update corresponding device data structure.
Preferably, set up each control playback equipment and corresponding playing resource according to described broadcasting demand and respectively play
Playback relationship between equipment, specifically includes:
Master control playback equipment determines the broadcasting money needing to play from all of playing resource according to broadcasting demand
Source;
Each playing resource needing to play and corresponding playback equipment is set up according to described device data structure
Uniquely identified corresponding relation;
Set up each corresponding broadcasting according to the reproduction time relation between the playing resource needing to play determined to set
Broadcasting conspiracy relation between Bei;
Described playback relationship is formed according to all of described corresponding relation and described broadcasting conspiracy relation.
The above-mentioned technique scheme of the present invention provides the embodiment that a kind of playback relationship is formed in detail, in this reality
Execute in example, from all of playing resource, first determine the broadcasting money needing to play out according to broadcasting demand
Then these playing resource are mapped by source with playback equipment (the most uniquely mark), finally, further according to
Time relationship and the unique of playback equipment between playing resource indicate the broadcasting association setting up between playback equipment
Same relation, defines the playback relationship of entirety finally according to corresponding relation and broadcasting conspiracy relation.
Preferably, described broadcasting demand includes the set of one or more of following parameter:
The initial play position of playing resource, broadcasting end position, number of repetition;
The playing sequence of the playing resource needing to play that each playback equipment is corresponding;
Processing mode at the end of the broadcasting of each playing resource, such as: playing after terminating is to be parked in last frame
Also it is to continue with playing the next one etc..
Above-mentioned broadcasting demand is playing resource to be carried out parameters arrange requirement.
It is preferred that master control playback equipment is defining the method and is also including the synchronizing process of described playback relationship:
Master control playback equipment is after described playback relationship has been set up, by described playback relationship with playlist
Mode by interconnection network be sent to other all from control playback equipment, other from control playback equipment according to
The playlist received updates the playlist of self, to reach the mesh of Complete Synchronization between each playback equipment
's;
Usually, after former master control playback equipment releases fault, resume work preferably as from control playback equipment.
Preferably, described preset rules includes:
Each master control broadcasting knowing current generation exception from control playback equipment according to described facility information list
The identification number of equipment;
In order identification number be latter one of current master control playback equipment become new from control playback equipment
Master control playback equipment.
In technique scheme of the present invention, take the principle that order is replaced, namely broadcast in current master control
When putting unit exception, according to identification number order, the master of fault taken over by the playback equipment that next bit identification number is corresponding
Control playback equipment becomes new master control playback equipment.
The embodiment of the present invention, it is provided that the equity of a kind of star structure controls player method, by arranging broadcasting
The major state of equipment and from control state, makes each playback equipment the most only have the function of broadcasting, also may be used
The function that facility are standby is controlled to undertake, thus when playing, due to the status equity between each playback equipment,
When the playback equipment being in major state breaks down, it is possible to by the switching of state, broadcast by other in time
The equipment of putting bears the function of master control playback equipment, makes playing flow can continue to be normally carried out, whole flow process
Without departing from management and control.
Detailed description of the invention
Due in prior art, when using multiple stage machine processing playing resource to show at giant-screen, if control
Machine processed is abnormal, and the most exectorial player then can all paralyse state, it is impossible to normally works.
In view of the situation, the equity embodiments providing a kind of star structure controls player method,
In order to solve the problems referred to above, it is provided that a kind of collection plays and the method for control function, it is ensured that playing process
Be smoothed out.
The embodiment of the present invention provide firstly the equity of a kind of star structure and controls player method, as it is shown in figure 1,
The method includes:
S101, after communication connection foundation completes between each playback equipment, plays out money between playback equipment
Sharing of source information, and it is operated the detection of state in real time each other, in all playback equipments, wherein
One master control playback equipment being to play master control function, other are from control playback equipment;
S102, described master control playback equipment obtain other playback equipments all playing resource information after, root
The playback relationship between each playback equipment with corresponding playing resource and each playback equipment is set up according to broadcasting demand;
S103, described master control playback equipment is after receiving play instruction, according to play instruction by described broadcasting
Relation is converted into for indicating each playback equipment to play the play command of corresponding playing resource;
S104, described master control playback equipment is right by being used for indicating respectively play command from control playback equipment to be sent to
That answers is each from control playback equipment, and all of playback equipment is according to play command and the playing resource control of self storage
Record and broadcast is put;
S105, when the duty exception of described master control playback equipment being detected, according to preset rules from it
He selects new master control playback equipment from control playback equipment.
In embodiments of the present invention, by arranging the major state of playback equipment and from control state, broadcasting is made to set
The standby function not only with broadcasting, additionally it is possible to have the function of control when playback equipment is in major state,
Play the effect of Traditional control machine.
In simple terms, the present invention does not exist single control machine, the most do not exist control machine and player it
Between the concept of the superior and the subordinate, be the status of a kind of equity between playback equipment and playback equipment, be all player
Having the function of broadcasting, the playback equipment being only at controlled state also has while having playing function
Control function.State switching can be carried out as required, then each playback equipment is all capable of control machine
Function, it is to avoid when being separately provided control machine, the paralysis making whole work because of abnormal conditions that can cause.
After between each playback equipment, connection setup and resource-sharing complete, master control playback equipment it will be seen that often
Playing resource in individual playback equipment, establishes playback relationship according to broadcasting demand, and playback relationship is to play to set
For the broadcasting conspiracy relation between playing resource and playback equipment, the playback equipment set up according to the demand of broadcasting
Set, can be converted into a plurality of play command according to play instruction, and after conversion, master control playback equipment will
Indicate the order from control equipment to be distributed to each from control equipment of correspondence, retain the play command of instruction self,
All of playback equipment carries out the broadcasting of correspondence according to play command.
In order to make it easy to understand, above-mentioned broadcasting demand, playback relationship and the relation of play instruction, provide below one
Individual simple real-time scene:
Broadcasting demand is the broadcast request to each playback equipment, such as, it is desirable to playback equipment A, B, C
Playing resource a, b, c is play respectively, here it is one is play demand at synchronization.
Master control playback equipment can set up corresponding actual play relation according to the demand of broadcasting, namely will " need
Ask " it is converted into the actual exercisable order of equipment.
Owing to playback relationship can be the set of a plurality of broadcasting demand, be equivalent to a playlist, then broadcast
Put the triggering command that instruction is described playlist.Such as there are 10 programs, play instruction on playlist
Any one program can be specified to play out, then be accomplished by triggering this program is converted into reality
With playback equipment play instruction one to one, be issued to correspondence playback equipment in realize playing resource
Broadcasting, the most in case of need, all of program can also be converted into play instruction by play instruction
The playback equipment being sent to correspondence broadcasts in order.
It is understood that in daily work, playback equipment is inevitably owing to some reasons are in work
Work there will be abnormal situation, then if the playback equipment of exception is exactly the broadcasting as master control and sets
Standby, then in order to continuing of working is normally carried out, controlling function must be undertaken by other playback equipments, so
Present embodiments provide a kind of reuse adoption process, find that at other playback equipments the playback equipment of current master control is abnormal
Time, the automatic rule good according to preset in advance of meeting or algorithm determine that the playback equipment made new advances is cut by from control state
It is changed to major state and bears the transmission of control command, it is ensured that proceeding of business.This preset rules is permissible
The most arbitrarily formulated by the rule manually used under prior art, such as, can be established as Cahn-Ingold-Prelog sequence rule etc.,
This is not limited by the present invention.
As a kind of embodiment of a kind of said method of the present invention, the principle that order substitutes can be taked, i.e. before
One device fails, the latter the principle taken over.Substitute it is understood that may also take on other
Principle realizes the selection of new main control device, such as, randomly choose, weight selection etc..
On the basis of above-described embodiment, the communication connection procedure of each playback equipment includes:
When each playback equipment starts by Web broadcast initiation message, each playback equipment having been turned on receives
After this initiation message, the network connection parameter of self is fed back to the playback equipment of new startup, and according to opening
The network connection parameter comprised in dynamic message connects the new playback equipment started;
The new equipment started connects corresponding playback equipment according to the network connection parameter of described feedback.
In the above embodiment of the present invention, each playback equipment is upon actuation by handing over the playback equipment having been turned on
Network connection parameter is to complete the connection procedure of network mutually.
For mutual differentiation, it is to be understood that each playback equipment is equipped with unique mark, described
Network connection parameter comprises unique mark of the playback equipment for characterizing transmission information, and arbitrary playback equipment exists
After receiving initiation message or starting feedback message, set up according to described mark and represent setting of corresponding playback equipment
Standby data structure, and this device data structure is added in facility information list, arbitrary playback equipment is opening
After Dong, the device data structure representing self is added in facility information list, when all of playback equipment all
After startup, each playback equipment obtains the facility information list representing all playback equipments.
In the present embodiment, all preserving facility information list inside each playback equipment, this table is used for recording
Some specifying informations of each equipment, such as playing resource information, identification information etc. in network, it is simple to Mei Gebo
Equipment of putting grasps the specifying information of each equipment in network.In the present embodiment, each playback equipment is connected by network
Process obtain unique mark of other equipment, and establish device data structure and be saved in facility information row
In table.
Above-mentioned unique mark is device id, and network connection parameter is device id, name, IP and port etc.
The general designation of information.
Description by above-mentioned several embodiments, it is to be understood that each playback equipment in this method
All can bear the function of tradition main control computer in the case of necessary, in order to ensure that each equipment all can be controlled
Make other all of playback equipment, so any two playback equipment in all playback equipments is the most logical
Letter connects.
It is understood that each described play command all should include described unique mark, described in be in master
The playback equipment of control state plays out the corresponding transmission of order according to described unique mark.
Play out the information sharing of resource between playback equipment, specifically include:
After the startup of each playback equipment, basis presets filtercondition and collects the information of playing resource in the machine,
And described playing resource information is added in the device data structure representing this player;
On other playback equipments arbitrary connect after this playback equipment, by all described playing resource of collection
Information is sent to this other playback equipment connected in the way of the Resources list;
After other playback equipments described receive the Resources list, according to the identifier lookup comprised in described the Resources list
Device data structure corresponding in facility information list, and the playing resource information in described the Resources list is deposited
Storage is in the device data structure found.
In embodiments of the present invention, it is proposed that the process of a resource-sharing, each playback equipment arranges with resource
Other playback equipment that the mode of table is sent to the playing resource information of self in network, the most each broadcasting
Equipment have received the Resources list of other playback equipments, and is stored in the device data structure of correspondence.
So far, unique mark of other playback equipments of per unit facility information list records and play money
Source information.
It is understood that when the playing resource in arbitrary described playback equipment changes, this broadcasting sets
Standby the Resources list updating oneself, is subsequently sent to other playback equipments being attached thereto;
Other playback equipments update corresponding playback equipment in respective facility information list after receiving the Resources list
Device data structure.
In the above-described embodiments, after the playing resource in each playback equipment updates, the Resources list also can be corresponding
Update, and be sent to other playback equipments and go to update corresponding device data structure.
On the basis of above-described embodiment, set up each control playback equipment according to described broadcasting demand and play with corresponding
Playback relationship between resource and each playback equipment, specifically includes:
Master control playback equipment determines the broadcasting money needing to play from all of playing resource according to broadcasting demand
Source;
Each playing resource needing to play and corresponding playback equipment is set up according to described device data structure
Uniquely identified corresponding relation;
Set up each corresponding broadcasting according to the reproduction time relation between the playing resource needing to play determined to set
Broadcasting conspiracy relation between Bei;
Described playback relationship is formed according to all of described corresponding relation and described broadcasting conspiracy relation.
The above embodiment of the present invention provides embodiment that a kind of playback relationship is formed in detail, at the present embodiment
In, from all of playing resource, first determine the playing resource needing to play out according to broadcasting demand, so
After these playing resource and playback equipment (the most uniquely mark) are mapped, finally, further according to playing money
Time relationship and unique sign of playback equipment between source set up the broadcasting conspiracy relation between playback equipment,
The playback relationship of entirety is defined finally according to corresponding relation and broadcasting conspiracy relation.
Above-mentioned playback relationship can be presented in playlist, i.e. master control playback equipment will play requirement groups
Synthesize playlist, be then sent to other playback equipment by network.Specifically, master control playback equipment
Can by TCP/IP mode in xml format or binary format transmission to the most all from control playback equipment.
Described broadcasting demand includes the set of one or more of following parameter:
The initial play position of playing resource, broadcasting end position, number of repetition;
The playing sequence of the playing resource needing to play that each playback equipment is corresponding;
Processing mode at the end of the broadcasting of each playing resource, such as: playing after terminating is to be parked in last frame
Also it is to continue with playing the next one etc..
Above-mentioned broadcasting demand is playing resource to be carried out parameters arrange requirement.
It is understood that master control playback equipment is defining the method and is also including the synchronization of described playback relationship
Process:
Master control playback equipment is after described playback relationship has been set up, by described playback relationship with playlist
Mode by interconnection network be sent to other all from control playback equipment, other from control playback equipment according to
The playlist received updates the playlist of self, has reached the mesh of Complete Synchronization between each playback equipment
's;
In order to ensure the communication connection between playback equipment, communication between any two playback equipment, all should be kept
Connecting, Fig. 2 is the embodiment of Y-connection between a kind of playback equipment, and each playback equipment in figure is equal
Communication connection is established with other playback equipment.Self current broadcast state is sent to it by each playback equipment
His all playback equipments, other playback equipments update self playlist according to the described broadcast state received
State.So each playback equipment can grasp the broadcast state of other playback equipments in real time.
It is understood that after former master control playback equipment releases fault, preferably as extensive from control playback equipment
Return to work work.Certainly, in case of need, former master control playback equipment is after releasing fault, it is possible to from new main
Master control function " brought back " by control playback equipment, resumes work as master control playback equipment.
In the above embodiment of the present invention, described preset rules includes:
Each master control broadcasting knowing current generation exception from control playback equipment according to described facility information list
The identification number of equipment;
In order identification number be latter one of current master control playback equipment become new from control playback equipment
Master control playback equipment.
In embodiments of the present invention, the principle that order is replaced is taken, namely at current master control playback equipment
Time abnormal, according to identification number order, the playback equipment that next bit identification number is corresponding is taken over the master control of fault and is play
Equipment becomes new master control playback equipment.
On the basis of the above embodiment of the present invention, described new master control playback equipment is normal to duty
Other send master control from control equipment and update instruction;
Described other update instruction from control equipment according to master control and update the facility information list of self, receive new
The control command of master control playback equipment.
When selecting new playback equipment according to preset rules, as new main control device, can to other from
Control equipment sends master control and updates instruction, in order to allow respectively from control renewal of the equipment facility information list, it is achieved update new
The purpose of master control playback equipment.
It is understood that owing to the present invention is to take the process of multiple same playback equipment collaborative work,
The most each playback equipment can realize parallel processing, the process of collaborative work, concrete:
When playing a group of planes and having needed a time-consuming job, right by being sent to after Task-decomposing by main control computer
The player answered, carries out parallel processing to respective task after each player reception task, thus gives full play to
The disposal ability of each player, has reduced the time of required by task further, the knot that each player will process
Fruit is sent to need the player of feedback, other players to change task status or enter one after receiving result
Step processes other work.
Corresponding with method, the above-mentioned multiple playback equipments of the embodiment of the present invention are combined work and are defined
The control Play System of one playing resource, wherein, is provided with major state and from control state to playback equipment,
Specifying a playback equipment is main control device, makes playback equipment not only have the function of broadcasting, additionally it is possible to broadcasting
The equipment of putting has control function when being in major state, play the effect of Traditional control machine, and other broadcasting sets
Standby is from control equipment, accepts main control device commander and carries out the broadcasting of reality.
Owing to each playback equipment can carry out major state and the switching from control state as required, then
Occurring abnormal at current main control device, it is impossible to when completing main control task, other is from arbitrary one of control equipment
Major state can be switched to timely to have continued main control task, whole system will not be made owing to lacking master
Control equipment and cause systemic breakdown.
It is understood that the playing resource that multiple playback equipments each store during being used in conjunction with is agree
Surely it is otherwise varied, then specifying broadcasting control command when, it is to be appreciated that on each playback equipment
Available playing resource, could for this playback equipment editor's play command, but, playback equipment again can not
The information of all playing resource that can be stored all extracts, because needing the substantial amounts of time like that,
But also the data volume that there is transmission is big and the problem such as information clutter.So needing to arrange broadcasting for each
The initial access path that equipment is corresponding, after playback equipment starts, extracts according to the access path of configuration and plays
(whether this information generally comprises resource information: comspec, size, preview graph, time span, be literary composition
Part folder etc.), then it is sent to other playback equipments by the network of interconnection, is thus equivalent to each broadcasting
Equipment has known about spendable playing resource in other playback equipments, thus can be for different broadcastings
Equipment editing program, and by being in the playback equipment transmitting order to lower levels of major state and playing, it is contemplated that sometimes
Need to access the resource information in player, it is possible to be properly added return higher level's catalogue, enter subfile
The operations such as folder.
It addition, in most cases, be stored together with playing resource also has similar document, compressed package etc
File, in order to avoid editing program is interfered by the alternative document in addition to playing resource, need give play
Equipment sets filtercondition, and playback equipment only selects qualified file when enumerating playing resource information,
Thus avoid the interference of alternative document, also alternative document will not be caused damage.By above-mentioned shared side
After formula, playing resource information only realizes sharing between playing device group, and other machines can not access,
Thus improve the safety of shared resource.
Usually, playback equipment is possible not only to receive play instruction, it is also possible to receives and sends order, Ke Yijie
Receive sending order and enter on this playback equipment under the file specified and extract and broadcasting of other playback equipments
Put resource information, be then sent to, by the network of interconnection, the playback equipment that order is specified, thus with the addition of visit
The motility asked.
It is understood that during in order to ensure to use multiple playback equipment to be jointly operated simultaneously, it is possible to just
Each playback equipment of normal connection, provide below a new startup playback equipment A add system flow process:
N(has been there is more than or equal to 1 in system) as a example by the system of individual playback equipment, set up and connect
Process is as shown in Figure 3:
S201, A be all of playback equipment broadcast initiation message in system, and described initiation message comprises self
Network connection parameter;
S202, the playback equipment having been turned on, after receiving described initiation message, connects ginseng according to the network of A
Number sets up corresponding device data structure, and this device data structure is added in facility information list;
S203, the playback equipment having been turned on returns respective network connection parameter to A;
The network connection parameter that S204, A feed back according to each playback equipment having been turned on sets up corresponding equipment
Data structure, and add in facility information list.
So far, A all sets up with each playback equipment in system and communicates complete, builds between whole playback equipments
After vertical above-mentioned connection, all build between any one playback equipment and all of equipment of remainder in playback equipment group
Found two-way communication mechanism, such that it is able to use wherein any one equipment to control all playback equipment editors
Program, broadcasting etc..
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or knot
The form of the embodiment in terms of conjunction software and hardware.And, the present invention can use and wherein wrap one or more
Computer-usable storage medium containing computer usable program code (include but not limited to disk memory and
Optical memory etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention
The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and
/ or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding
The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating
The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one
The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set
In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory
Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart
The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes
Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices
Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one
The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the present invention
Bright spirit and scope.So, if the present invention these amendment and modification belong to the claims in the present invention and
Within the scope of its equivalent technologies, then the present invention is also intended to comprise these change and modification.