Summary of the invention
In view of this, the object of the present invention is to provide the method for multicasting of data in a kind of unilateral network, method of reseptance, multicast apparatus, receiving system and system, all Terminal Equipment Identifiers are not needed down to allow each terminal equipment know grouping belonging to oneself as grouping information broadcast, greatly reduce data traffic volume, save bandwidth, shorten carousel cycle.
For achieving the above object, technical scheme of the present invention is specifically achieved in that
The invention provides the method for multicasting of data in a kind of unilateral network, comprising:
Grouping bit string corresponding to each group character is generated according to the Terminal Equipment Identifier that each group character comprises;
The mapping relations of each group character and grouping bit string corresponding to each group character are generated grouping information;
Service metadata, the business description information corresponding with described service metadata, described grouping information are broadcast to terminal equipment, and described business description packets of information needs each group character of broadcast containing described service metadata.
The present invention also provides the method for reseptance of data in a kind of unilateral network, comprising:
From broadcast data stream, obtain grouping information, parse the grouping bit string that each group character that grouping information comprises is corresponding with each group character;
Terminal Equipment Identifier is mated with each grouping bit string, if the match is successful, then the group character that the preservation grouping bit string that the match is successful is corresponding;
Detect in business description information and whether comprise described group character, if comprise, then obtain the service metadata that described business description information is corresponding.
The present invention also provides the device of data multicast in a kind of unilateral network, comprising:
Grouping bit string generation module, the Terminal Equipment Identifier for comprising according to each group character generates grouping bit string corresponding to each group character;
Grouping information generation module, for generating grouping information by the mapping relations of each group character and grouping bit string corresponding to each group character;
Broadcast module, for service metadata, the business description information corresponding with described service metadata, described grouping information are broadcast to terminal equipment, described business description packets of information needs each group character of broadcast containing described service metadata.
The present invention also provides the device of data receiver in a kind of unilateral network, comprising:
Grouping information parsing module, for obtaining grouping information from broadcast data stream, parses the grouping bit string that each group character that grouping information comprises is corresponding with each group character;
Group match module, for Terminal Equipment Identifier is mated with each grouping bit string, if the match is successful, then the group character that the preservation grouping bit string that the match is successful is corresponding;
Data reception module, for detecting in business description information whether comprise described group character, if comprise, then obtains the service metadata that described business description information is corresponding.
The present invention also provides the system of data multicast in a kind of unilateral network, comprising:
Database, for the identification information of storage terminal equipment;
Grouping Control Server, identification information for reading terminal equipment from described database creates grouping, for each grouping allocation packets mark, grouping bit string corresponding to each group character is generated according to the Terminal Equipment Identifier that each group character comprises, the mapping relations of each group character and grouping bit string corresponding to each group character are generated grouping information, each group character is sent to service server, grouping information is sent to and broadcasts server;
Service server, business description information is generated according to service metadata and group character, described business description packets of information needs each group character of broadcast containing described service metadata, service metadata and business description information corresponding to described service metadata is sent to and broadcasts server;
Broadcast server, for service metadata, the business description information corresponding with described service metadata, described grouping information are broadcast to terminal equipment;
Terminal equipment, for inquiring the group character belonging to it in described grouping information according to Terminal Equipment Identifier, detects in business description information whether comprise described group character, if comprise, then obtains the service metadata that described business description information is corresponding.
As seen from the above technical solutions, be mapped to a units group by each Terminal Equipment Identifier adopting multiple hash function group character to be comprised and generate grouping bit string, then grouping bit string and the mapping relations of group character are generated grouping information be broadcast to terminal.Terminal equipment adopts same hash function to calculate the sequence of hash values of Terminal Equipment Identifier, is carried out mating the group character obtained belonging to this terminal equipment by sequence of hash values with each grouping bit string.Terminal equipment receives the business datum belonging to this grouping according to group character.This programme does not need down to allow each terminal equipment know as grouping information broadcast all Terminal Equipment Identifiers and grouping belonging to oneself greatly reduces data traffic volume, save bandwidth, shorten carousel cycle.
Embodiment
For making object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment referring to accompanying drawing, the present invention is described in more detail.
As the method flow diagram of data multicast in a kind of unilateral network that Fig. 1 provides for the embodiment of the present invention, comprising:
Step S101, generates grouping bit string corresponding to each group character according to the Terminal Equipment Identifier that each group character comprises.
Digital television front-end system comprises multiple operation system, for terminal equipment provides miscellaneous service, such as, and ad system, video on-demand system, weather forecast system.Each operation system has different groupings to user, and different groupings receives different business datums.Divide into groups namely to divide into groups to Terminal Equipment Identifier to user, Terminal Equipment Identifier described here can be the user name of terminal, IP address, CA card number, MAC Address, and equipment Serial Number etc. can the information of unique identification terminal equipment.System is when creating grouping, and be each grouping distribution group character, operation system provides different business according to this group character to different groupings.
The grouping bit string that the Terminal Equipment Identifier comprised according to group character generates group character corresponding comprises:
A pre-defined units group and at least one hash function;
Obtain the Terminal Equipment Identifier that group character comprises;
Terminal Equipment Identifier group character comprised by hash function is mapped to described bit array and generates grouping bit string.
Be illustrated in figure 2 the generation method flow diagram of the grouping bit string that the embodiment of the present invention provides, Figure 3 shows that the mapping method schematic diagram of the Hash sequential value that the embodiment of the present invention provides and bit array, specifically describe as follows:
The bit array of a pre-defined m position and the individual different hash function of K, wherein, the codomain that all positions of bit array are initialized as 0, K hash function is [0, m-1];
Read a Terminal Equipment Identifier in this grouping, use K hash function to carry out Hash calculation to Terminal Equipment Identifier, produce sequence of hash values [H1, a H2 ... Hk];
By the H1 in bit array, H2 ... the position that Hk is corresponding is set to 1;
Continue to read next Terminal Equipment Identifier and carry out same process, until all Terminal Equipment Identifiers are all disposed in this grouping, the final bit array i.e. grouping bit string of this grouping correspondence produced.
The mapping relations of each group character and grouping bit string corresponding to each group character are generated grouping information by step S102.
Group character is the unique identifier number of certain grouping, and grouping bit string is the terminal equipment collection that certain divides into groups to comprise.As previously mentioned, operation system according to group character for different grouping provides different business.In unilateral network, terminal equipment is not by knowing affiliated group character alternately with front end system, therefore, grouping information and business information are broadcast to each terminal equipment by front end system, the Terminal Equipment Identifier of self and grouping information are carried out matching inquiry and go out affiliated group character by terminal equipment, thus receive business corresponding to this group character.Group character and the mapping relations of grouping bit string are generated grouping information, and terminal equipment could find affiliated group character according to this grouping information.
Step S103, by business description information broadcasting corresponding to grouping information and service metadata, service metadata to terminal equipment, wherein, business description packets of information needs each group character of broadcast containing service metadata.
Service metadata, the business description information corresponding with service metadata, grouping information can be broadcast to terminal equipment together, also separately can be broadcast to terminal equipment.Same business can broadcast multiple different grouping, and therefore, the group character comprised in business description information can have multiple.Generally, during one-way data carousel, what cycle of broadcasting of business datum was less than grouping information broadcasts the cycle.
Preferably, version information corresponding for grouping information can also be broadcast to terminal equipment, so that according to version information, terminal equipment judges whether grouping information changes, if do not changed, can not resolve the grouping information in broadcast data stream, the group character directly stored according to the last time obtains business datum.
Implement above-described embodiment, be mapped to a units group by each Terminal Equipment Identifier adopting multiple hash function group character to be comprised and generate grouping bit string, again the mapping relations generation grouping information of grouping bit string and group character is broadcast to terminal, makes terminal match affiliated grouping by Terminal Equipment Identifier and grouping bit string.This programme does not need down to allow each terminal equipment know as grouping information broadcast all Terminal Equipment Identifiers and grouping belonging to oneself greatly reduces data traffic volume, save bandwidth, shorten carousel cycle.
Be illustrated in figure 4 the method flow diagram of data receiver in a kind of unilateral network that the embodiment of the present invention provides, method step comprises:
Step S201, obtains grouping information from broadcast data stream, parses the grouping bit string that each group character that grouping information comprises is corresponding with each group character.
Terminal equipment obtains the grouping information in broadcast data stream, parses the grouping bit string that each group character of comprising in grouping information is corresponding with each group character.
Preferably, when also comprising version information corresponding to grouping information in broadcast data stream, also comprised before step S201: from broadcast data stream, obtain the version information that grouping information is corresponding, the version information that described version information and terminal equipment are preserved is compared; If identical, then jump to step S203;
Otherwise, the version information in memory is updated to the described version information obtained from broadcast data stream.
Step S202, mates Terminal Equipment Identifier with each grouping bit string, if the match is successful, then and the group character that the preservation grouping bit string that the match is successful is corresponding.
Concrete, sequence of hash values corresponding for Terminal Equipment Identifier is mated with each grouping bit string, if the match is successful, then the group character that the preservation grouping bit string that the match is successful is corresponding.
Be illustrated in figure 5 the Hash sequential value of the terminal equipment that the embodiment of the present invention provides and the matching process schematic diagram of grouping bit string, concrete coupling flow process is as follows:
First, from the memory of terminal equipment, Terminal Equipment Identifier is obtained; Secondly, to adopt and front end generates the identical hash function of bit string of dividing into groups and carries out Hash calculation to terminal equipment and obtain Hash sequential value [H1, H2 ... Hk]; Again, read a grouping bit string, compare H1 corresponding in this grouping bit string, H2 ... whether Hk position is 1, if be all 1, then the match is successful, and this terminal equipment belongs to this grouping, is saved in memory by this group character; Otherwise this terminal equipment does not belong to this grouping, continue to mate with other bit strings of dividing into groups.
It should be noted that, the sequence of hash values step of computing terminal equipment also can be carried out before getting grouping information, the sequence of hash values calculated can also be stored, and avoided follow-uply carrying out double counting when repeatedly mating.
In actual use, hash function has certain collision probability, the sequence of hash values that may just have two Terminal Equipment Identifiers to generate is identical, and this situation is called wrong report, and the terminal equipment namely not belonging to this grouping is also judged oneself to belong to this grouping.By using multiple hash function, lengthening the length of bit array, rate of false alarm can be reduced.When 16 times that the length of bit array is terminal equipment quantity in grouping, when hash function is about 8, rate of false alarm can drop to less than 0.0001, the basic requirement meeting the overwhelming majority.
Preferably, consider that the carousel cycle of grouping information is longer than the carousel cycle of business datum, the real-time received to provide business datum, the group character that the match is successful is saved in memory by terminal equipment, when grouping information does not change, from memory, directly read group character receive business datum.Simultaneously, terminal equipment needs the version change monitoring grouping information on backstage in real time, when version information changes, needs the sequence of hash values of terminal equipment to re-start with the grouping bit string of new grouping information to mate, obtain the group character after upgrading, be saved in memory.
Step S203, detects in business description information whether comprise this group character, if comprise, then obtains service metadata corresponding to business description information.
Terminal equipment, according to group character, detects in business description information whether comprise this group character, if comprise, then by the corresponding service metadata of business description acquisition of information.
Implement above-described embodiment, by the sequence of hash values of Terminal Equipment Identifier is mated with the grouping bit string in the grouping information in broadcast data stream, obtain the group character belonging to terminal equipment, then receive the business datum of this grouping according to group character.In addition, by increasing version information in broadcast data stream, making terminal equipment not need repeated matching, only having and just going coupling when grouping information changes time, making terminal equipment can receive business datum more in real time.This programme does not need down to allow each terminal equipment know as grouping information broadcast all Terminal Equipment Identifiers and grouping belonging to oneself greatly reduces data traffic volume, save bandwidth, shorten carousel cycle.
Be illustrated in figure 6 the structure drawing of device of data multicast in a kind of unilateral network that the embodiment of the present invention provides, comprise:
Grouping bit string generation module 31, the Terminal Equipment Identifier for comprising according to each group character generates grouping bit string corresponding to each group character;
Grouping information generation module 32, for generating grouping information by the mapping relations of each group character and grouping bit string corresponding to each group character;
Broadcast module 33, for service metadata, the business description information corresponding with described service metadata, described grouping information are broadcast to terminal equipment, described business description packets of information needs each group character of broadcast containing described service metadata.
Wherein, grouping bit string generation module 31 comprises:
Predefine module 311, for a pre-defined units group and at least one hash function;
Terminal iidentification acquisition module 312, for obtaining the Terminal Equipment Identifier that group character comprises;
Grouping bit string generates submodule 313, generates grouping bit string for the Terminal Equipment Identifier that described group character comprises being mapped to described bit array by described hash function.
Broadcast module 33 also for version information corresponding for described grouping information is broadcast to terminal equipment.
Implement above-described embodiment, be mapped to a units group by each Terminal Equipment Identifier adopting multiple hash function group character to be comprised and generate grouping bit string, again the mapping relations generation grouping information of grouping bit string and group character is broadcast to terminal, makes terminal match affiliated grouping by Terminal Equipment Identifier and grouping bit string.This programme does not need down to allow each terminal equipment know as grouping information broadcast all Terminal Equipment Identifiers and grouping belonging to oneself greatly reduces data traffic volume, save bandwidth, shorten carousel cycle.
Be illustrated in figure 7 the structure drawing of device of data receiver in a kind of unilateral network that the embodiment of the present invention provides, comprise:
Grouping information parsing module 41, for obtaining grouping information from broadcast data stream, parses the grouping bit string that each group character is corresponding with each group character;
Group match module 42, for Terminal Equipment Identifier is mated with each grouping bit string, if the match is successful, then the group character that the preservation grouping bit string that the match is successful is corresponding;
Data reception module 43, for detecting in business description information whether comprise described group character, if comprise, then obtains the service metadata that described business description information is corresponding.
Wherein, group match module 42 comprises:
Computing module 421, for the sequence of hash values of computing terminal device identification;
Matched sub-block 422, for described sequence of hash values is mated with each grouping bit string, if the match is successful, then the group character that the preservation grouping bit string that the match is successful is corresponding.
Preferably, described device also comprises edition comparison module (not illustrating in the drawings), for obtaining version information corresponding to grouping information from broadcast data stream, the version information that described version information and terminal equipment are preserved is compared, if different, then the version information in memory is updated to the described version information obtained from broadcast data stream, and trigger grouping information parsing module 41 and group match module 42 and again obtain from broadcast data stream and obtain corresponding service metadata by data reception module 43 according to the described group character again obtained again with after the group character that described terminal equipment mates,
Otherwise trigger data receiver module 43 obtains corresponding service metadata according to the group character stored.
Implement above-described embodiment, by the sequence of hash values of Terminal Equipment Identifier is mated with the grouping bit string in the grouping information in broadcast data stream, obtain the group character belonging to terminal equipment, then receive the business datum of this grouping according to group character.In addition, by increasing version information in broadcast data stream, making terminal equipment not need repeated matching, only having and just going coupling when grouping information changes time, making terminal equipment can receive business datum more in real time.This programme does not need down to allow each terminal equipment know as grouping information broadcast all Terminal Equipment Identifiers and grouping belonging to oneself greatly reduces data traffic volume, save bandwidth, shorten carousel cycle.
Be illustrated in figure 8 the system construction drawing of data multicast in a kind of unilateral network that the embodiment of the present invention provides, comprise:
Database 51, for the identification information of storage terminal equipment;
Grouping Control Server 52, identification information for reading terminal equipment from described database creates grouping, for each grouping allocation packets mark, grouping bit string corresponding to each group character is generated according to the Terminal Equipment Identifier that each group character comprises, the mapping relations of each group character and grouping bit string corresponding to each group character are generated grouping information, each group character is sent to service server, grouping information is sent to and broadcasts server;
Service server 54, business description information is generated according to service metadata and group character, described business description packets of information needs each group character of broadcast containing described service metadata, service metadata and business description information corresponding to described service metadata is sent to and broadcasts server;
Broadcast server 53, for service metadata, the business description information corresponding with described service metadata, described grouping information are broadcast to terminal equipment;
Terminal equipment 55, for inquiring the group character belonging to it in described grouping information according to Terminal Equipment Identifier, detects in business description information whether comprise described group character, if comprise, then obtains the service metadata that described business description information is corresponding.
Implement above-described embodiment, be mapped to a units group by each Terminal Equipment Identifier adopting multiple hash function group character to be comprised and generate grouping bit string, then grouping bit string and the mapping relations of group character are generated grouping information be broadcast to terminal.Terminal equipment adopts same hash function to calculate the sequence of hash values of Terminal Equipment Identifier, is carried out mating the group character obtained belonging to this terminal equipment by sequence of hash values with each grouping bit string.Terminal equipment receives the business datum belonging to this grouping according to group character.This programme does not need down to allow each terminal equipment know as grouping information broadcast all Terminal Equipment Identifiers and grouping belonging to oneself greatly reduces data traffic volume, save bandwidth, shorten carousel cycle.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.