Summary of the invention
The embodiment of the present invention provides a kind of equity of star structure to control player method, in order to solve the aforementioned problems in the prior, guarantees carrying out smoothly of playing process.
The embodiment of the present invention provides a kind of equity of star structure to control player method, and the method comprises:
After communication connection between each playback equipment has been set up, between playback equipment, carry out sharing of playing resource information, and carry out each other the detection of operating state in real time, in all playback equipments, one of them is the master control playback equipment that plays master control function, and other are from control playback equipment;
Described master control playback equipment, after obtaining the playing resource information of all other playback equipments, is set up the playback relationship between each playback equipment and corresponding playing resource and each playback equipment according to broadcasting demand;
Described master control playback equipment, after receiving play instruction, converts described playback relationship to be used to indicate the play command that each playback equipment is play corresponding playing resource to according to play instruction;
Described master control playback equipment sends to corresponding each from control playback equipment by being used to indicate each play command from control playback equipment, and all playback equipments are controlled and play according to the playing resource of play command and self storage;
When the operating state that described master control playback equipment detected is abnormal, according to preset rules, from other, from control playback equipment, select new master control playback equipment.
In technique scheme of the present invention, by the major state of playback equipment being set and from control state, make playback equipment not only there is the function of broadcasting, can also at playback equipment, have the function of control during in major state, play the effect of traditional controller.
Preferably, the communication connection procedure of above-mentioned each playback equipment comprises:
When starting, passes through by each playback equipment Web broadcast initiation message, each playback equipment having started receives after this initiation message, the network of self is connected to parameter feedback to the new playback equipment starting, and connect the new playback equipment starting according to the network connection parameter comprising in initiation message;
The new equipment starting connects parameter according to the network of described feedback and connects corresponding playback equipment.
In technique scheme of the present invention, each playback equipment is connected parameter to complete the connection procedure of network by the playback equipment Internet with having started after startup.
Usually, each playback equipment is equipped with unique identification, described network connects parameter and comprises for characterizing the unique identification of the playback equipment of transmission information, arbitrary playback equipment is receiving initiation message or is starting after feedback message, according to described sign, set up the device data structure that represents corresponding playback equipment, and this device data structure is added in facility information list, arbitrary playback equipment adds the device data structure that represents self in facility information list to after startup, after all playback equipments all start, each playback equipment has obtained the facility information list that represents all playback equipments.
In the above-mentioned technical solutions of this embodiment, facility information list is all preserved in each playback equipment inside, and this table for example, for recording some specifying informations of each equipment of network, playing resource information, identification informations etc., are convenient to the specifying information that each playback equipment is grasped each equipment in network.The process that in the present embodiment, each playback equipment connects by network has obtained the unique identification of other equipment, and has set up device data structure and be kept in facility information list.
Preferably, between playback equipment, carry out the information sharing of playing resource, specifically comprise:
After each playback equipment starts, according to presetting filter condition, collect the information of playing resource in the machine, and described playing resource information is added in the device data structure that represents this player;
At arbitrary other playback equipments, connect after this playback equipment, the information of all described playing resource of collecting is sent to this other playback equipment of connection in the mode of the Resources list;
Described other playback equipments are received after the Resources list, search device data structure corresponding in facility information list, and the playing resource information in described the Resources list is stored in the device data structure finding according to the sign comprising in described the Resources list.
In technique scheme of the present invention, the process of a resource-sharing has been proposed, each playback equipment sends to other playback equipment in network in the mode of the Resources list the playing resource information of self, each playback equipment has received the Resources list of other playback equipments like this, and is stored in corresponding device data structure.
Preferably, when the playing resource in arbitrary described playback equipment changes, this playback equipment upgrades the Resources list of oneself, then sends to other playback equipments that are attached thereto;
After other playback equipments reception the Resources lists, upgrade the device data structure of corresponding playback equipment in facility information list separately.
In above-mentioned technique scheme, after the playing resource in each playback equipment is upgraded, the Resources list also can correspondingly upgrade, and sends to other playback equipments to go to upgrade corresponding device data structure.
Preferably, according to described broadcasting demand, set up the playback relationship of respectively controlling between playback equipment and corresponding playing resource and each playback equipment, specifically comprise:
Master control playback equipment is determined the playing resource that needs broadcasting from all playing resource according to broadcasting demand;
According to described device data structure, set up the uniquely identified corresponding relation of each playing resource that need to play and corresponding playback equipment;
Reproduction time relation between the playing resource of playing according to definite needs is set up the broadcasting conspiracy relation between each corresponding playback equipment;
According to all described corresponding relations and described broadcasting conspiracy relation, form described playback relationship.
The embodiment that the above-mentioned technique scheme of the present invention provides a kind of playback relationship to form in detail, in the present embodiment, first according to broadcasting demand, from all playing resource, determine the playing resource that need to play, then these playing resource and playback equipment (being unique identification) are mapped, finally, according to unique sign of the time relationship between playing resource and playback equipment, set up the broadcasting conspiracy relation between playback equipment again, finally according to corresponding relation and broadcasting conspiracy relation, formed whole playback relationship.
Preferably, described broadcasting demand comprises one or more set of following parameter:
The initial play position of playing resource, broadcasting end position, number of repetition;
The playing sequence of the playing resource that the needs that each playback equipment is corresponding are play;
Processing mode when each playing resource broadcasting finishes, such as: after broadcasting finishes, be parked in last frame or continue to play the next one etc.
Above-mentioned broadcasting demand is playing resource to be carried out to the requirement that arranges of parameters.
Preferably, master control playback equipment is forming the method and is also comprising the synchronizing process of described playback relationship:
Master control playback equipment is after described playback relationship has been set up, by described playback relationship, in the mode of playlist, the network by interconnection sends to that other are all from control playback equipment, other upgrade the playlist of self from control playback equipment according to the playlist receiving, to reach the object of Complete Synchronization between each playback equipment;
Usually, at former master control playback equipment, remove after fault, preferably as resuming work from control playback equipment.
Preferably, described preset rules comprises:
Each knows the identification number of the master control playback equipment that current generation is abnormal from control playback equipment according to described facility information list;
In order identification number be latter one of current master control playback equipment from control playback equipment, become new master control playback equipment.
In technique scheme of the present invention, taked the principle of sequentially replacing, namely, when current master control playback equipment is abnormal, according to identification number order, the master control playback equipment that the playback equipment that next bit identification number is corresponding is taken over fault becomes new master control playback equipment.
The embodiment of the present invention, provide a kind of equity of star structure to control player method, by the major state of playback equipment being set and from control state, make each playback equipment not only only there is the function of broadcasting, can also bear the standby function of control equipment, thereby when playing, due to the status equity between each playback equipment, when the playback equipment in major state breaks down, can be by the switching of state, by other playback equipment, born in time the function of master control playback equipment, make playing flow can continue normally to carry out, whole flow process can not depart from management and control.
Embodiment
In prior art, when using many machine processing playing resource to be presented at large-screen, if controller is abnormal, the exectorial player state that can all paralyse, cannot work.
In view of the situation, the embodiment of the present invention provides a kind of equity of star structure to control player method, in order to address the above problem, provides a kind of method of playing and controlling function that integrates, and guarantees carrying out smoothly of playing process.
First the embodiment of the present invention provides a kind of equity of star structure to control player method, and as shown in Figure 1, the method comprises:
S101, after communication connection between each playback equipment has been set up, between playback equipment, carry out sharing of playing resource information, and carry out each other in real time the detection of operating state, in all playback equipments, one of them is the master control playback equipment that plays master control function, and other are from control playback equipment;
S102, described master control playback equipment, after obtaining the playing resource information of all other playback equipments, is set up the playback relationship between each playback equipment and corresponding playing resource and each playback equipment according to broadcasting demand;
S103, described master control playback equipment, after receiving play instruction, converts described playback relationship to be used to indicate the play command that each playback equipment is play corresponding playing resource to according to play instruction;
S104, described master control playback equipment sends to corresponding each from control playback equipment by being used to indicate each play command from control playback equipment, and all playback equipments are controlled and are play according to the playing resource of play command and self storage;
S105 when the operating state that described master control playback equipment detected is abnormal, selects new master control playback equipment from other according to preset rules from control playback equipment.
In embodiments of the present invention, by the major state of playback equipment being set and from control state, make playback equipment not only there is the function of broadcasting, can also at playback equipment, have the function of control during in major state, play the effect of traditional controller.
In simple terms, in the present invention, there is not independent controller, just there is not the concept of the superior and the subordinate between controller and player yet, it between playback equipment and playback equipment, is a kind of status of equity, be all the function that player has broadcasting, when just the playback equipment in state of a control has playing function, also there is control function.Can carry out as required state switching, each playback equipment all can be realized the function of controller so, and while avoiding separately controller being set, what can cause makes the paralysis of whole work because of abnormal conditions.
After between each playback equipment, connection setup and resource-sharing complete, master control playback equipment can be understood the playing resource in each playback equipment, according to broadcasting demand, set up playback relationship, playback relationship is playing resource and the playback equipment that playback equipment is set up according to broadcasting demand, the set of the broadcasting conspiracy relation between playback equipment, can be converted into many play command according to play instruction, after conversion, master control playback equipment is distributed to corresponding each by indication from control equipment from the order of control equipment, the play command that retains indication self, all playback equipments carry out corresponding broadcasting according to play command.
For the ease of understanding, above-mentioned broadcasting demand, the relation of playback relationship and play instruction, provides a simple real-time scene below:
Broadcasting demand is the broadcast request to each playback equipment, for example, requires playback equipment A, B, C to play respectively playing resource a, b, c at synchronization, a broadcasting demand that Here it is.
Master control playback equipment can be set up corresponding actual play relation according to broadcasting demand, namely " demand " is converted into the exercisable order of actual equipment.
Because playback relationship can be many set of playing demand, be equivalent to a playlist, play instruction is the triggering command of described playlist so.For example on playlist, there are 10 programs, play instruction can specify any program to play, in triggering, just this program need to be converted into afterwards to actual and playback equipment play instruction one to one so, be issued in corresponding playback equipment to realize the broadcasting of playing resource, certainly the in the situation that of needs, play instruction also can be converted into all programs play instruction and send to corresponding playback equipment to broadcast in order.
Be understandable that, in daily work, playback equipment is inevitably because some reasons there will be abnormal situation at work, if so abnormal playback equipment is just in time the playback equipment as master control, so for the continuation of working is normally carried out, controlling function must be born by other playback equipments, so the present embodiment provides a kind of reuse adoption process, when other playback equipments find that the playback equipment of current master control is abnormal, can automatically according to the good rule of preset in advance or algorithm, determine that the playback equipment making new advances is by switching to from control state the transmission that major state is born control command, proceeding of assurance business.This preset rules can for example can be formulated as Cahn-Ingold-Prelog sequence rule etc. by manually adopting the rule under prior art to formulate arbitrarily in advance, and the present invention does not limit this.
As a kind of a kind of embodiment of said method of the present invention, can take the alternative principle of order, i.e. previous device fails, the principle of being taken over by the latter.Be understandable that, can also take other substitution principles to realize the selection of new main control device, such as random selection, weighting selection etc.
On the basis of above-described embodiment, the communication connection procedure of each playback equipment comprises:
When starting, passes through by each playback equipment Web broadcast initiation message, each playback equipment having started receives after this initiation message, the network of self is connected to parameter feedback to the new playback equipment starting, and connect the new playback equipment starting according to the network connection parameter comprising in initiation message;
The new equipment starting connects parameter according to the network of described feedback and connects corresponding playback equipment.
In the above embodiment of the present invention, each playback equipment is connected parameter to complete the connection procedure of network by the playback equipment Internet with having started after startup.
For mutual differentiation, be understandable that, each playback equipment is equipped with unique identification, described network connects parameter and comprises for characterizing the unique identification of the playback equipment of transmission information, arbitrary playback equipment is receiving initiation message or is starting after feedback message, according to described sign, set up the device data structure that represents corresponding playback equipment, and this device data structure is added in facility information list, arbitrary playback equipment adds the device data structure that represents self in facility information list to after startup, after all playback equipments all start, each playback equipment has obtained the facility information list that represents all playback equipments.
In the present embodiment, facility information list is all preserved in each playback equipment inside, and this table for example, for recording some specifying informations of each equipment of network, playing resource information, identification informations etc., are convenient to the specifying information that each playback equipment is grasped each equipment in network.The process that in the present embodiment, each playback equipment connects by network has obtained the unique identification of other equipment, and has set up device data structure and be kept in facility information list.
Above-mentioned unique identification is device id, and it is the general designation of the information such as device id, name, IP and port that network connects parameter.
By the description of above-mentioned several embodiment, be understandable that, each playback equipment in this method all can be born the function of traditional main control computer in the case of necessary, in order to guarantee that each equipment all can control other all playback equipment, so all communication connections each other of any two playback equipments in all playback equipments.
Be understandable that, described in each, play command all should include described unique identification, and the correspondence that the described playback equipment in major state carries out play command according to described unique identification sends.
Between playback equipment, carry out the information sharing of playing resource, specifically comprise:
After each playback equipment starts, according to presetting filter condition, collect the information of playing resource in the machine, and described playing resource information is added in the device data structure that represents this player;
At arbitrary other playback equipments, connect after this playback equipment, the information of all described playing resource of collecting is sent to this other playback equipment of connection in the mode of the Resources list;
Described other playback equipments are received after the Resources list, search device data structure corresponding in facility information list, and the playing resource information in described the Resources list is stored in the device data structure finding according to the sign comprising in described the Resources list.
In embodiments of the present invention, the process of a resource-sharing has been proposed, each playback equipment sends to other playback equipment in network in the mode of the Resources list the playing resource information of self, each playback equipment has received the Resources list of other playback equipments like this, and is stored in corresponding device data structure.
So far, per unit facility information list records unique identification and the playing resource information of other playback equipments.
Be understandable that, when the playing resource in arbitrary described playback equipment changes, this playback equipment upgrades the Resources list of oneself, then sends to other playback equipments that are attached thereto;
After other playback equipments reception the Resources lists, upgrade the device data structure of corresponding playback equipment in facility information list separately.
In the above-described embodiments, after the playing resource in each playback equipment is upgraded, the Resources list also can correspondingly upgrade, and sends to other playback equipments to go to upgrade corresponding device data structure.
On the basis of above-described embodiment, according to described broadcasting demand, set up the playback relationship of respectively controlling between playback equipment and corresponding playing resource and each playback equipment, specifically comprise:
Master control playback equipment is determined the playing resource that needs broadcasting from all playing resource according to broadcasting demand;
According to described device data structure, set up the uniquely identified corresponding relation of each playing resource that need to play and corresponding playback equipment;
Reproduction time relation between the playing resource of playing according to definite needs is set up the broadcasting conspiracy relation between each corresponding playback equipment;
According to all described corresponding relations and described broadcasting conspiracy relation, form described playback relationship.
The embodiment that provides in detail a kind of playback relationship to form in the above embodiment of the present invention, in the present embodiment, first according to broadcasting demand, from all playing resource, determine the playing resource that need to play, then these playing resource and playback equipment (being unique identification) are mapped, finally, according to unique sign of the time relationship between playing resource and playback equipment, set up the broadcasting conspiracy relation between playback equipment again, finally according to corresponding relation and broadcasting conspiracy relation, formed whole playback relationship.
Above-mentioned playback relationship can exist with the form of playlist, and master control playback equipment becomes playlist by broadcasting demand combinations, then by network, sends to other playback equipment.Particularly, master control playback equipment can transfer to all from control playback equipment by TCP/IP mode with XML form or binary format.
Described broadcasting demand comprises one or more set of following parameter:
The initial play position of playing resource, broadcasting end position, number of repetition;
The playing sequence of the playing resource that the needs that each playback equipment is corresponding are play;
Processing mode when each playing resource broadcasting finishes, such as: after broadcasting finishes, be parked in last frame or continue to play the next one etc.
Above-mentioned broadcasting demand is playing resource to be carried out to the requirement that arranges of parameters.
Be understandable that, master control playback equipment is forming the method and is also comprising the synchronizing process of described playback relationship:
Master control playback equipment is after described playback relationship has been set up, by described playback relationship, in the mode of playlist, the network by interconnection sends to that other are all from control playback equipment, other upgrade the playlist of self from control playback equipment according to the playlist receiving, reached the object of Complete Synchronization between each playback equipment;
In order to guarantee the communication connection between playback equipment, between any two playback equipments, all should keep communication connection, Fig. 2 is the embodiment of Y-connection between a kind of playback equipment, each playback equipment in figure has all been set up communication connection with other playback equipment.Each playback equipment is sent to other all playback equipments by self current broadcast state, and other playback equipments upgrade the state of self playlist according to the described broadcast state receiving.Each playback equipment can be grasped the broadcast state of other playback equipments in real time like this.
Be understandable that, at former master control playback equipment, remove after fault, preferably as resuming work from control playback equipment.Certainly, the in the situation that of needs, former master control playback equipment, after removing fault, also can " be brought back " master control function from new master control playback equipment, as master control playback equipment, resumes work.
In the above embodiment of the present invention, described preset rules comprises:
Each knows the identification number of the master control playback equipment that current generation is abnormal from control playback equipment according to described facility information list;
In order identification number be latter one of current master control playback equipment from control playback equipment, become new master control playback equipment.
In embodiments of the present invention, taked the principle of sequentially replacing, namely, when current master control playback equipment is abnormal, according to identification number order, the master control playback equipment that the playback equipment that next bit identification number is corresponding is taken over fault becomes new master control playback equipment.
On the basis of the above embodiment of the present invention, described new master control playback equipment sends master control to normal other of operating state from control equipment and upgrades instruction;
Described other upgrade according to master control the facility information list that instruction is upgraded self from control equipment, receive the control command of new master control playback equipment.
When selecting new playback equipment according to preset rules, as new main control device, meeting sends master control renewal instruction to other from control equipment, to allow each from the list of control renewal of the equipment facility information, the object of new master control playback equipment is upgraded in realization.
Be understandable that, because the present invention is the process of taking a plurality of same playback equipment collaborative works, each playback equipment can be realized parallel processing so, and the process of collaborative work is concrete:
When playing a group of planes and need to complete a job consuming time, by main control computer, corresponding player will be sent to after Task-decomposing, after each player reception task, task is separately carried out to parallel processing, thereby give full play to the disposal ability of each player, further reduce and finish the work the required time, each player sends to the result of processing the player that needs feedback, after other player reception & disposal results, changes task status or further processes other work.
Corresponding with method, the above-mentioned a plurality of playback equipments of the embodiment of the present invention are combined the control Play System that work has formed a playing resource, wherein, playback equipment is provided with to major state and from control state, specifying a playback equipment is main control device, make playback equipment not only there is the function of broadcasting, can also have at playback equipment control function during in major state, play the effect of traditional controller, other playback equipment is from control equipment, accepts main control device commander and carries out actual broadcasting.
Due to each playback equipment can carry out as required major state and from control state switching, at current main control device, occur so abnormal, in the time of can not completing main control task, other can switch to timely major state and continued main control task from arbitrary of control equipment, can not make whole system cause systemic breakdown owing to lacking main control device.
Be understandable that, the playing resource that a plurality of playback equipments store separately in the common process of using is distinguished certainly to some extent, so when specifying Play Control order, need to know playing resource available on each playback equipment, could be for this playback equipment editor play command, yet, playback equipment can not all extract the information of all playing resource of its storage again, because need like that a large amount of time, but also there is the problems such as the large and information clutter of the data volume of transmission.So need to the initial access path that playback equipment is corresponding be set for each, after playback equipment starts, (this information generally comprises: comspec according to the access path of configuration, to extract playing resource information, size, preview graph, time span, whether be file etc.), then the network by interconnection sends to other playback equipments, so just be equivalent to each playback equipment and understood spendable playing resource in other playback equipments, so just can be for different playback equipment editing programs, and by the playback equipment transmitting order to lower levels in major state broadcasting, consider the resource information that sometimes needs to access in player, so can suitably add, return to higher level's catalogue, enter the operations such as sub-folder.
In addition, in most cases, the file that also has similar document, compressed package and so on being stored together with playing resource, for fear of the alternative document except playing resource, editing program is caused to interference, need to set filter condition to playback equipment, playback equipment is only selected qualified file when enumerating playing resource information, thereby has avoided the interference of alternative document, also can not cause damage to alternative document.After above-mentioned sharing mode, playing resource information only realizes and sharing between playing device group, and other machines can not be accessed, thereby has improved the fail safe of shared resource.
Usually, playback equipment not only can receive play instruction, can also receive and send order, can receive the transmission order of other playback equipments and on this playback equipment, enter under the file of appointment and extract playing resource information, then the network by interconnection sends to the playback equipment of order appointment, thereby has added the flexibility of access.
To be understandable that, in order guaranteeing to use a plurality of playback equipments jointly to carry out work, can to connect normally each playback equipment simultaneously, provide a new playback equipment A who starts to add the flow process of system below:
Take in system has existed N(to be more than or equal to 1) system of individual playback equipment is example, the process connecting as shown in Figure 3:
S201, A is to all playback equipment broadcast initiation message in system, and the network that described initiation message comprises self connects parameter;
S202, the playback equipment having started, after receiving described initiation message, connects parameter according to the network of A and sets up corresponding device data structure, and this device data structure is added in facility information list;
S203, the network that the playback equipment having started returns separately to A connects parameter;
S204, the network of the playback equipment feedback that A has started according to each connects parameter and sets up corresponding device data structure, and adds in facility information list.
So far, A and each playback equipment in system all set up communicate by letter complete, all between playback equipment, setting up after above-mentioned connection, between any one playback equipment in playback equipment group and remaining all equipment, all set up two-way communication mechanism, thereby can use wherein any one equipment to control all playback equipment editing programs, broadcasting etc.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect completely.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) of computer usable program code one or more.
The present invention is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present invention, equipment (system) and computer program.Should understand can be in computer program instructions realization flow figure and/or block diagram each flow process and/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction of carrying out by the processor of computer or other programmable data processing device is produced for realizing the device in the function of flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame on computer or other programmable devices.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.