CN112243139B - Program distribution synchronization method and system of multimedia terminal - Google Patents
Program distribution synchronization method and system of multimedia terminal Download PDFInfo
- Publication number
- CN112243139B CN112243139B CN201910648394.4A CN201910648394A CN112243139B CN 112243139 B CN112243139 B CN 112243139B CN 201910648394 A CN201910648394 A CN 201910648394A CN 112243139 B CN112243139 B CN 112243139B
- Authority
- CN
- China
- Prior art keywords
- terminal
- server
- program data
- regional
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/242—Synchronization processes, e.g. processing of PCR [Program Clock References]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1069—Session establishment or de-establishment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/61—Network physical structure; Signal processing
- H04N21/6106—Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
- H04N21/6125—Network physical structure; Signal processing specially adapted to the downstream path of the transmission network involving transmission via Internet
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/64322—IP
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a program distribution synchronization method and a system of a multimedia terminal, wherein the method comprises the following steps: the regional server issues a message for notifying that the terminal program data packet is prepared to the local area network based on the ipv6 address; determining that the terminal needs to establish a connection relation with the area server with the ID number of n based on the ID number of the area server and the ID number of the terminal; the method comprises the steps that a socket connection is established between a terminal and an ipv6 address of a regional server with the ID number n; downloading a program data packet on the area server with the ID number n to the terminal based on socket connection; after the terminal finishes downloading the program data packet, the area server with the ID number n stores the ID number of the terminal, the ipv6 address and the program distribution state in the local database. In the embodiment of the invention, the distribution synchronization of the interface data packets can be completed at high speed, and the error probability in the distribution passing process is reduced.
Description
Technical Field
The invention relates to the technical field of multimedia program pushing, in particular to a program distribution synchronization method and a program distribution synchronization system of a multimedia terminal.
Background
In a traditional network-based multimedia information publishing system, a plurality of intelligent terminals in the same area need to uniformly issue multimedia program content data packets by depending on a single centralized control server or a plurality of centralized control servers, and when the state of a certain area network is not good or the service bandwidth and the performance are limited, the multimedia program updating of all terminals in the area needs to be completed very slowly, and the problem of server performance bottleneck exists.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a program distribution synchronization method and a program distribution synchronization system of a multimedia terminal, which can accelerate the completion of interface data packet distribution synchronization and reduce the error probability in the distribution passing process.
In order to solve the above technical problem, an embodiment of the present invention provides a program distribution synchronization method for a multimedia terminal, where the method includes:
the regional server issues a message for notifying that the terminal program data package is prepared based on the ipv6 address to the local network, wherein the message for notifying that the terminal program data package is prepared comprises a message ID3 and a current time date;
determining that the terminal needs to establish a connection relation with the area server with the ID number of n based on the ID number of the area server and the ID number of the terminal;
after determining that the terminal needs to establish a connection relation with the area server with the ID number of n, establishing socket connection between the terminal and the ipv6 address of the area server with the ID number of n;
downloading the program data packet on the area server with the ID number n to the terminal based on the socket connection; and the number of the first and second groups,
after the terminal finishes downloading the program data packet, the area server with the ID number n stores the ID number of the terminal, the ipv6 address and the program distribution state in a local database.
Optionally, before the area server issues a message for notifying that the terminal program data package is ready to the local area network based on the ipv6 address, the method further includes:
the terminal elects a plurality of regional servers based on the centralized control server;
the regional servers and the centralized control server establish and maintain HTTP long connection, and report registration messages of the regional servers to the centralized control server based on HTTP protocol messages;
after the centralized control server receives the registration information of the plurality of regional servers, acquiring a program data packet required to be issued by the region by inquiring a local database of the centralized control server;
and the centralized control server sends the program data packets to be issued to the plurality of regional servers.
Optionally, the terminal elects a plurality of regional servers based on the centralized control server, including:
the terminal obtains communication delay through a domain name of a ping centralized control server and sends a region server election message to a local area network through an ipv6 address, wherein the region server election message comprises a message ID1, communication delay, a storage residual space, a local machine MAC address and a local machine ipv6 address;
each terminal of the local area network records the regional server election message, and the first plurality of terminals with the minimum communication delay are used in each terminal preferentially, then the first plurality of terminals with the maximum storage residual space are used, then the first plurality of terminals with the minimum MAC address value are used as the plurality of regional servers, and the ID numbers of the plurality of regional servers are respectively 1 to a.
Optionally, the several area server registration messages include message ID2, area ID, terminal ID, and number of terminals in the area.
Optionally, the sending, by the centralized control server, the program data packet to be delivered to the plurality of regional servers includes:
the centralized control server divides the program data packets to be issued into a plurality of parts based on a zip compression algorithm and numbers the parts according to the number from 1 to a;
the centralized control server actively sends the numbered partial volume program data packets to a plurality of regional servers with corresponding numbers according to the numbers;
after receiving the split-volume program data packets with the corresponding numbers, the regional server verifies whether the split-volume program data packets with the corresponding numbers are the same as the split-volume program data packets sent by the centralized control server side based on an md5 verification algorithm; if not, the regional server requests the centralized control server to retransmit the split-volume program data packet through an HTTP (hyper text transport protocol) message until the receiving is correct;
if the data packets are the same, the regional server establishes socket connection with ipv6 of other regional servers, and sends the received packet data packets to other regional servers;
when the regional servers receive the partial volume program data packets completely, verifying whether the partial volume program data packets are correct based on the md5 verification algorithm, and if the partial volume program data packets are incorrect, requesting to retransmit the incorrect partial volume program data packets until the partial volume program data packets are correct;
and if the program data packet is correct, the plurality of the split-volume program data packets are combined and decomposed into the original complete program data packet based on a zip decompression algorithm.
Optionally, the determining, based on the ID number of the area server and the ID number of the terminal, that the terminal needs to establish a connection relationship with the area server with the ID number n includes:
the ID number of the acquisition area server and the ID number of the terminal are obtained;
and sequentially dividing the ID number of the terminal by the ID numbers of the regional servers from the maximum value to the minimum value, if the ID numbers are divided evenly, terminating the division calculation, and determining that the ID number of the terminal needs to establish a connection relation with the regional server with the evenly divided ID number of n.
Optionally, the method further includes:
when detecting that a new terminal requests to download a program data packet to the socket connection of the area server with the ID number of n, the area server with the ID number of n returns the ipv6 address of the last terminal which finishes downloading the program data packet to the new terminal through the socket connection;
the new terminal establishes socket connection based on the received ipv6 address and downloads a program data packet; and the number of the first and second groups,
after downloading the program data packet, the new terminal completes reporting the local terminal ID, ipv6 address and program distribution status to the local database of the area server with ID number n through connecting with the area server socket with ID number n, and inserts and saves the local database.
Optionally, when the local database finishes inserting and storing the new terminal program distribution state, the regional server with the ID number n reports the terminal program distribution state information through the long HTTP connection with the centralized control server.
Optionally, the terminal program distribution status information includes a message ID4, a terminal ID, an ipv6 address, and a completion status.
In addition, an embodiment of the present invention further provides a system for synchronizing program distribution of a multimedia terminal, where the system includes:
a notification module: the regional server issues a message for notifying that the terminal program data packet is prepared to the local network based on the ipv6 address, wherein the message for notifying that the terminal program data packet is prepared comprises a message ID3 and a current time and date;
determining a connection establishing module: the terminal is used for determining that the terminal needs to establish a connection relation with the area server with the ID number n based on the ID number of the area server and the ID number of the terminal;
a connection establishment module: after determining that the terminal needs to establish a connection relationship with the area server with the ID number of n, the terminal establishes socket connection with the ipv6 address of the area server with the ID number of n;
a downloading module: the terminal is used for downloading the program data packet on the area server with the ID number n to the terminal based on the socket connection; and the number of the first and second groups,
a storage module: and after the terminal finishes downloading the program data packet, the area server with the ID number of n stores the ID number of the terminal, the ipv6 address and the program release state in a local database.
In the embodiment of the invention, the distribution synchronization of the interface data packets can be completed at high speed, and the error probability in the distribution passing process is reduced.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a program distribution synchronization method of a multimedia terminal according to an embodiment of the present invention;
fig. 2 is a schematic diagram showing the structural components of the program distribution synchronization system of the multimedia terminal according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
Referring to fig. 1, fig. 1 is a flowchart illustrating a program distribution synchronization method of a multimedia terminal according to an embodiment of the present invention.
As shown in fig. 1, a program distribution synchronization method of a multimedia terminal, the method includes:
s11: the regional server issues a message for notifying that the terminal program data package is prepared based on the ipv6 address to the local network, wherein the message for notifying that the terminal program data package is prepared comprises a message ID3 and a current time date;
in the embodiment of the invention, the regional server issues a message for notifying that all terminal program data packets on the local area network are prepared to the local area network through the ipv6 address, wherein the message for notifying that the terminal program data packets are prepared comprises a message ID3 and a current time and date; through the message, all terminals on the unified local area network can be rapidly and seamlessly notified.
Further, before the region server issues a message for notifying that the terminal program data package is ready to the local area network based on the ipv6 address, the method further includes: the terminal elects a plurality of regional servers based on the centralized control server; the regional servers and the centralized control server establish and maintain HTTP long connection, and report registration messages of the regional servers to the centralized control server based on HTTP protocol messages; after the centralized control server receives the registration information of the plurality of regional servers, acquiring a program data packet required to be issued by the region by inquiring a local database of the centralized control server; and the centralized control server sends the program data packets to be issued to the plurality of regional servers.
Further, the terminal elects a plurality of regional servers based on the centralized control server, and the method comprises the following steps: the terminal obtains communication delay through a domain name of a ping centralized control server and sends a region server election message to a local area network through an ipv6 address, wherein the region server election message comprises a message ID1, communication delay, a storage residual space, a local machine MAC address and a local machine ipv6 address; each terminal of the local area network records the regional server election message, and the first plurality of terminals with the minimum communication delay are used in each terminal preferentially, then the first plurality of terminals with the maximum storage residual space are used, then the first plurality of terminals with the minimum MAC address value are used as the plurality of regional servers, and the ID numbers of the plurality of regional servers are respectively 1 to a.
Further, the several area server registration messages include the message ID2, the area ID, the terminal ID, and the number of terminals within the area.
Further, the step of sending the program data packets to be sent to the plurality of regional servers by the centralized control server includes: the centralized control server divides the program data packets to be issued into a plurality of parts based on a zip compression algorithm and numbers the parts according to the number from 1 to a; the centralized control server actively sends the numbered partial volume program data packets to a plurality of regional servers with corresponding numbers according to the numbers; after receiving the split-volume program data packets with the corresponding numbers, the regional server verifies whether the split-volume program data packets with the corresponding numbers are the same as the split-volume program data packets sent by the centralized control server side based on an md5 verification algorithm; if not, the regional server requests the centralized control server to retransmit the split-volume program data packet through an HTTP (hyper text transport protocol) message until the receiving is correct; if the data packets are the same, the regional server establishes socket connection with ipv6 of other regional servers, and sends the received packet data packets to other regional servers; when the regional servers receive the partial volume program data packets completely, verifying whether the partial volume program data packets are correct based on the md5 verification algorithm, and if the partial volume program data packets are incorrect, requesting to retransmit the incorrect partial volume program data packets until the partial volume program data packets are correct; and if the program data packet is correct, the plurality of the split-volume program data packets are combined and decomposed into the original complete program data packet based on a zip decompression algorithm.
Specifically, all terminals in a local area network obtain communication delay through the domain name of a ping centralized control server, and send area server election messages in the local area network through ipv6 address multicast messages, wherein the area server election messages comprise a message ID1, communication delay, storage remaining space, a local MAC address and a local ipv6 address.
Each terminal in the local area network records the election message of the area server and preferentially uses the first plurality of terminals with the minimum communication delay in each terminal, then uses the first plurality of terminals with the maximum storage residual space and then uses the first plurality of terminals with the minimum MAC address value to form a plurality of area servers, wherein, the selection is preferentially carried out by using the minimum communication delay; in the embodiment of the invention, 10 terminals are selected as the area servers, and the ID numbers of the 10 area servers are respectively 1 to 10; specifically, the user may select the number of the area servers according to an actual situation, that is, a is a positive integer greater than or equal to 1.
After a plurality of regional servers are selected, HTTP long connection is established and maintained between the regional servers and a centralized control server, and then the regional servers report registration messages of the regional servers to the centralized control server through HTTP protocol messages; wherein the several zone server registration messages include message ID2, zone ID, terminal ID, and number of terminals within the zone.
After the centralized control server receives the registration message of the dry regional server, the centralized control server obtains the program data packet required to be issued by the region by inquiring the local database of the centralized control server.
After the centralized control server obtains the program data packets to be issued in the area, the program data packets to be issued are split into a plurality of parts through a zip compression algorithm and are numbered according to the number from 1 to a; then the centralized control server actively sends the numbered partial volume program data packets to a plurality of regional servers with corresponding numbers according to the numbers; after receiving the split-volume program data packets with the corresponding numbers, the regional server verifies whether the split-volume program data packets with the corresponding numbers are the same as the split-volume program data packets sent by the centralized control server side based on the md5 verification algorithm; if not, the regional server requests the centralized control server to retransmit the split-volume program data packet through an HTTP (hyper text transport protocol) message until the receiving is correct; if the data packets are the same, the regional server establishes socket connection with ipv6 of other regional servers, and sends the received packet data packets to other regional servers; when the regional servers receive the partial volume program data packets completely, verifying whether the partial volume program data packets are correct based on the md5 verification algorithm, and if the partial volume program data packets are incorrect, requesting to retransmit the incorrect partial volume program data packets until the partial volume program data packets are correct; if the program data packet is correct, the plurality of the partial volume program data packets are wrapped and unwrapped to form an original complete program data packet based on a zip decompression algorithm; the number of the program data packet volumes is the same as that of the regional servers.
S12: determining that the terminal needs to establish a connection relation with the area server with the ID number of n based on the ID number of the area server and the ID number of the terminal;
in a specific implementation process of the present invention, the determining, based on the ID number of the area server and the ID number of the terminal, that the terminal needs to establish a connection relationship with the area server with the ID number n includes: the ID number of the acquisition area server and the ID number of the terminal are obtained; and sequentially dividing the ID number of the terminal by the ID numbers of the regional servers from the maximum value to the minimum value, if the ID numbers are divided evenly, terminating the division calculation, and determining that the ID number of the terminal needs to establish a connection relation with the regional server with the evenly divided ID number of n.
Specifically, assuming that the number of the area servers is 10, that is, a is 10, the ID numbers of the area servers are a [ 1-10 ], and then the ID numbers of all terminals in the local area network area are obtained; dividing the ID number of the terminal by the ID numbers of the regional servers from 10 to 1 in sequence, if the ID number can be divided, terminating the calculation, and confirming that the ID number of the terminal needs to establish a connection relation with the regional server with the divided ID number being n; wherein n is a positive integer of 1 or more and a or less.
S13: after determining that the terminal needs to establish a connection relation with the area server with the ID number of n, establishing socket connection between the terminal and the ipv6 address of the area server with the ID number of n;
in the specific implementation process of the invention, after determining that the terminal needs to establish a connection relationship with the area server with the ID number n, the terminal establishes a socket connection with the ipv6 address of the area server with the ID number n.
S14: downloading the program data packet on the area server with the ID number n to the terminal based on the socket connection;
in the specific implementation process of the invention, the terminal downloads the program data packet on the regional server with the ID number n to the terminal through socket connection.
S15: after the terminal finishes downloading the program data packet, the area server with the ID number n stores the ID number of the terminal, the ipv6 address and the program distribution state in a local database.
In the specific implementation process of the invention, after the terminal finishes downloading the corresponding program data packet, the area server with the ID number of n stores the ID number, the ipv6 address and the program release state of the terminal in the local database, wherein the ID number, the ipv6 address and the program release state of the terminal are completely transmitted to the area server with the ID number of n through socket connection.
Further, the method further comprises: when detecting that a new terminal requests to download a program data packet to the socket connection of the area server with the ID number of n, the area server with the ID number of n returns the ipv6 address of the last terminal which finishes downloading the program data packet to the new terminal through the socket connection; the new terminal establishes socket connection based on the received ipv6 address and downloads a program data packet; and after downloading the program data packet, the new terminal completes reporting the local terminal ID, the ipv6 address and the program release state to the local database of the area server with the ID number n through connecting with the area server socket with the ID number n, and then inserts and stores the local database.
Further, when the local database is inserted and stored with a new terminal program distribution state, the regional server with the ID number of n reports the terminal program distribution state information through the long HTTP connection with the centralized control server.
Further, the terminal program distribution state information includes a message ID4, a terminal ID, an ipv6 address, and a completion state.
Specifically, when the local database of the area server with the ID number n marks that the program release state of the latest terminal is the completion state, if there is another new terminal requesting to download a program data packet to the socket connection of the area server with the ID number n, the area server with the ID number n will return the ipv6 address of the last terminal downloading the program data packet to the new terminal through the socket connection; the new terminal establishes socket connection based on the received ipv6 address and downloads a program data packet; and after downloading the program data packet, the new terminal completes reporting the local terminal ID, the ipv6 address and the program release state to the local database of the area server with the ID number n through connecting with the area server socket with the ID number n, and then inserts and stores the local database.
When the local database finishes inserting and storing the new terminal program release state, the area server with the ID number of n reports the terminal program distribution state information through the long HTTP connection with the centralized control server; the terminal program distribution status information includes a message ID4, a terminal ID, an ipv6 address, and a completion status.
In the embodiment of the invention, the distribution synchronization of the interface data packets can be completed at high speed, and the error probability in the distribution passing process is reduced.
Examples
Referring to fig. 2, fig. 2 is a schematic structural component diagram of a program distribution synchronization system of a multimedia terminal according to the present invention.
As shown in fig. 2, a program distribution synchronization system of a multimedia terminal, the system comprising:
the notification module 21: the regional server issues a message for notifying that the terminal program data packet is prepared to the local network based on the ipv6 address, wherein the message for notifying that the terminal program data packet is prepared comprises a message ID3 and a current time and date;
in the embodiment of the invention, the regional server issues a message for notifying that all terminal program data packets on the local area network are prepared to the local area network through the ipv6 address, wherein the message for notifying that the terminal program data packets are prepared comprises a message ID3 and a current time and date; through the message, all terminals on the unified local area network can be rapidly and seamlessly notified.
Further, before the region server issues a message for notifying that the terminal program data package is ready to the local area network based on the ipv6 address, the method further includes: the terminal elects a plurality of regional servers based on the centralized control server; the regional servers and the centralized control server establish and maintain HTTP long connection, and report registration messages of the regional servers to the centralized control server based on HTTP protocol messages; after the centralized control server receives the registration information of the plurality of regional servers, acquiring a program data packet required to be issued by the region by inquiring a local database of the centralized control server; and the centralized control server sends the program data packets to be issued to the plurality of regional servers.
Further, the terminal elects a plurality of regional servers based on the centralized control server, and the method comprises the following steps: the terminal obtains communication delay through a domain name of a ping centralized control server and sends a region server election message to a local area network through an ipv6 address, wherein the region server election message comprises a message ID1, communication delay, a storage residual space, a local machine MAC address and a local machine ipv6 address; each terminal of the local area network records the regional server election message, and the first plurality of terminals with the minimum communication delay are used in each terminal preferentially, then the first plurality of terminals with the maximum storage residual space are used, then the first plurality of terminals with the minimum MAC address value are used as the plurality of regional servers, and the ID numbers of the plurality of regional servers are respectively 1 to a.
Further, the several area server registration messages include the message ID2, the area ID, the terminal ID, and the number of terminals within the area.
Further, the step of sending the program data packets to be sent to the plurality of regional servers by the centralized control server includes: the centralized control server divides the program data packets to be issued into a plurality of parts based on a zip compression algorithm and numbers the parts according to the number from 1 to a; the centralized control server actively sends the numbered partial volume program data packets to a plurality of regional servers with corresponding numbers according to the numbers; after receiving the split-volume program data packets with the corresponding numbers, the regional server verifies whether the split-volume program data packets with the corresponding numbers are the same as the split-volume program data packets sent by the centralized control server side based on an md5 verification algorithm; if not, the regional server requests the centralized control server to retransmit the split-volume program data packet through an HTTP (hyper text transport protocol) message until the receiving is correct; if the data packets are the same, the regional server establishes socket connection with ipv6 of other regional servers, and sends the received packet data packets to other regional servers; when the regional servers receive the partial volume program data packets completely, verifying whether the partial volume program data packets are correct based on the md5 verification algorithm, and if the partial volume program data packets are incorrect, requesting to retransmit the incorrect partial volume program data packets until the partial volume program data packets are correct; and if the program data packet is correct, the plurality of the split-volume program data packets are combined and decomposed into the original complete program data packet based on a zip decompression algorithm.
Specifically, all terminals in a local area network obtain communication delay through the domain name of a ping centralized control server, and send area server election messages in the local area network through ipv6 address multicast messages, wherein the area server election messages comprise a message ID1, communication delay, storage remaining space, a local MAC address and a local ipv6 address.
Each terminal in the local area network records the election message of the area server and preferentially uses the first plurality of terminals with the minimum communication delay in each terminal, then uses the first plurality of terminals with the maximum storage residual space and then uses the first plurality of terminals with the minimum MAC address value to form a plurality of area servers, wherein, the selection is preferentially carried out by using the minimum communication delay; in the embodiment of the invention, 10 terminals are selected as the area servers, and the ID numbers of the 10 area servers are respectively 1 to 10; specifically, the user may select the number of the area servers according to an actual situation, that is, a is a positive integer greater than or equal to 1.
After a plurality of regional servers are selected, HTTP long connection is established and maintained between the regional servers and a centralized control server, and then the regional servers report registration messages of the regional servers to the centralized control server through HTTP protocol messages; wherein the several zone server registration messages include message ID2, zone ID, terminal ID, and number of terminals within the zone.
After the centralized control server receives the registration message of the dry regional server, the centralized control server obtains the program data packet required to be issued by the region by inquiring the local database of the centralized control server.
After the centralized control server obtains the program data packets to be issued in the area, the program data packets to be issued are split into a plurality of parts through a zip compression algorithm and are numbered according to the number from 1 to a; then the centralized control server actively sends the numbered partial volume program data packets to a plurality of regional servers with corresponding numbers according to the numbers; after receiving the split-volume program data packets with the corresponding numbers, the regional server verifies whether the split-volume program data packets with the corresponding numbers are the same as the split-volume program data packets sent by the centralized control server side based on the md5 verification algorithm; if not, the regional server requests the centralized control server to retransmit the split-volume program data packet through an HTTP (hyper text transport protocol) message until the receiving is correct; if the data packets are the same, the regional server establishes socket connection with ipv6 of other regional servers, and sends the received packet data packets to other regional servers; when the regional servers receive the partial volume program data packets completely, verifying whether the partial volume program data packets are correct based on the md5 verification algorithm, and if the partial volume program data packets are incorrect, requesting to retransmit the incorrect partial volume program data packets until the partial volume program data packets are correct; if the program data packet is correct, the plurality of the partial volume program data packets are wrapped and unwrapped to form an original complete program data packet based on a zip decompression algorithm; the number of the program data packet volumes is the same as that of the regional servers.
Determining to establish the connection module 22: the terminal is used for determining that the terminal needs to establish a connection relation with the area server with the ID number n based on the ID number of the area server and the ID number of the terminal;
in a specific implementation process of the present invention, the determining, based on the ID number of the area server and the ID number of the terminal, that the terminal needs to establish a connection relationship with the area server with the ID number n includes: the ID number of the acquisition area server and the ID number of the terminal are obtained; and sequentially dividing the ID number of the terminal by the ID numbers of the regional servers from the maximum value to the minimum value, if the ID numbers are divided evenly, terminating the division calculation, and determining that the ID number of the terminal needs to establish a connection relation with the regional server with the evenly divided ID number of n.
Specifically, assuming that the number of the area servers is 10, that is, a is 10, the ID numbers of the area servers are a [ 1-10 ], and then the ID numbers of all terminals in the local area network area are obtained; dividing the ID number of the terminal by the ID numbers of the regional servers from 10 to 1 in sequence, if the ID number can be divided, terminating the calculation, and confirming that the ID number of the terminal needs to establish a connection relation with the regional server with the divided ID number being n; wherein n is a positive integer of 1 or more and a or less.
Connection establishment module 23: after determining that the terminal needs to establish a connection relationship with the area server with the ID number of n, the terminal establishes socket connection with the ipv6 address of the area server with the ID number of n;
in the specific implementation process of the invention, after determining that the terminal needs to establish a connection relationship with the area server with the ID number n, the terminal establishes a socket connection with the ipv6 address of the area server with the ID number n.
The download module 24: the terminal is used for downloading the program data packet on the area server with the ID number n to the terminal based on the socket connection;
in the specific implementation process of the invention, the terminal downloads the program data packet on the regional server with the ID number n to the terminal through socket connection.
The saving module 25: and after the terminal finishes downloading the program data packet, the area server with the ID number of n stores the ID number of the terminal, the ipv6 address and the program release state in a local database.
In the specific implementation process of the invention, after the terminal finishes downloading the corresponding program data packet, the area server with the ID number of n stores the ID number, the ipv6 address and the program release state of the terminal in the local database, wherein the ID number, the ipv6 address and the program release state of the terminal are completely transmitted to the area server with the ID number of n through socket connection.
Further, the method further comprises: when detecting that a new terminal requests to download a program data packet to the socket connection of the area server with the ID number of n, the area server with the ID number of n returns the ipv6 address of the last terminal which finishes downloading the program data packet to the new terminal through the socket connection; the new terminal establishes socket connection based on the received ipv6 address and downloads a program data packet; and after downloading the program data packet, the new terminal completes reporting the local terminal ID, the ipv6 address and the program release state to the local database of the area server with the ID number n through connecting with the area server socket with the ID number n, and then inserts and stores the local database.
Further, when the local database is inserted and stored with a new terminal program distribution state, the regional server with the ID number of n reports the terminal program distribution state information through the long HTTP connection with the centralized control server.
Further, the terminal program distribution state information includes a message ID4, a terminal ID, an ipv6 address, and a completion state.
Specifically, when the local database of the area server with the ID number n marks that the program release state of the latest terminal is the completion state, if there is another new terminal requesting to download a program data packet to the socket connection of the area server with the ID number n, the area server with the ID number n will return the ipv6 address of the last terminal downloading the program data packet to the new terminal through the socket connection; the new terminal establishes socket connection based on the received ipv6 address and downloads a program data packet; and after downloading the program data packet, the new terminal completes reporting the local terminal ID, the ipv6 address and the program release state to the local database of the area server with the ID number n through connecting with the area server socket with the ID number n, and then inserts and stores the local database.
When the local database finishes inserting and storing the new terminal program release state, the area server with the ID number of n reports the terminal program distribution state information through the long HTTP connection with the centralized control server; the terminal program distribution status information includes a message ID4, a terminal ID, an ipv6 address, and a completion status.
In the embodiment of the invention, the distribution synchronization of the interface data packets can be completed at high speed, and the error probability in the distribution passing process is reduced.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
In addition, the above detailed description is given to the program distribution synchronization method and system of the multimedia terminal provided in the embodiment of the present invention, and a specific example should be adopted herein to explain the principle and implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (9)
1. A method for synchronizing distribution of programs of a multimedia terminal, the method comprising:
the regional server issues a message for notifying that the terminal program data package is prepared based on the ipv6 address to the local network, wherein the message for notifying that the terminal program data package is prepared comprises a message ID3 and a current time date;
determining that the terminal needs to establish a connection relation with the area server with the ID number of n based on the ID number of the area server and the ID number of the terminal;
after determining that the terminal needs to establish a connection relation with the area server with the ID number of n, establishing socket connection between the terminal and the ipv6 address of the area server with the ID number of n;
downloading the program data packet on the area server with the ID number n to the terminal based on the socket connection; and the number of the first and second groups,
after the terminal finishes downloading the program data packet, the area server with the ID number of n stores the ID number, the ipv6 address and the program release state of the terminal in a local database;
the determining that the terminal needs to establish a connection relationship with the area server with the ID number of n based on the ID number of the area server and the ID number of the terminal includes:
acquiring the ID number of the area server and the ID number of the terminal;
and sequentially dividing the ID number of the terminal by the ID numbers of the regional servers from the maximum value to the minimum value, if the ID numbers are divided evenly, terminating the division calculation, and determining that the ID number of the terminal needs to establish a connection relation with the regional server with the evenly divided ID number of n.
2. The program distribution synchronization method according to claim 1, wherein before the area server issues a message notifying that the terminal program package is ready to the local area network based on the ipv6 address, the method further comprises:
the terminal elects a plurality of regional servers based on the centralized control server;
the regional servers and the centralized control server establish and maintain HTTP long connection, and report registration messages of the regional servers to the centralized control server based on HTTP protocol messages;
after the centralized control server receives the registration information of the plurality of regional servers, acquiring a program data packet required to be issued by the region by inquiring a local database of the centralized control server;
and the centralized control server sends the program data packets to be issued to the plurality of regional servers.
3. The method for synchronizing distribution of programs according to claim 2, wherein said terminal elects a plurality of regional servers based on a centralized control server, comprising:
the terminal obtains communication delay through a domain name of a ping centralized control server and sends a region server election message to a local area network through an ipv6 address, wherein the region server election message comprises a message ID1, communication delay, a storage residual space, a local machine MAC address and a local machine ipv6 address;
each terminal of the local area network records the regional server election message, and the first plurality of terminals with the minimum communication delay are used in each terminal preferentially, then the first plurality of terminals with the maximum storage residual space are used, then the first plurality of terminals with the minimum MAC address value are used as the plurality of regional servers, and the ID numbers of the plurality of regional servers are respectively 1 to a.
4. The program distribution synchronization method according to claim 2, wherein said plurality of area server registration messages include a message ID2, an area ID, a terminal ID, and the number of terminals in an area.
5. The method for synchronizing distribution of programs according to claim 2, wherein the step of sending the program data packets to be distributed to the plurality of local servers by the centralized control server comprises:
the centralized control server divides the program data packets to be issued into a plurality of parts based on a zip compression algorithm and numbers the parts according to the number from 1 to a;
the centralized control server actively sends the numbered partial volume program data packets to a plurality of regional servers with corresponding numbers according to the numbers;
after receiving the split-volume program data packets with the corresponding numbers, the regional server verifies whether the split-volume program data packets with the corresponding numbers are the same as the split-volume program data packets sent by the centralized control server side based on an md5 verification algorithm; if not, the regional server requests the centralized control server to retransmit the split-volume program data packet through an HTTP (hyper text transport protocol) message until the receiving is correct;
if the data packets are the same, the regional server establishes socket connection with ipv6 of other regional servers, and sends the received packet data packets to other regional servers;
when the regional servers receive the partial volume program data packets completely, verifying whether the partial volume program data packets are correct based on the md5 verification algorithm, and if the partial volume program data packets are incorrect, requesting to retransmit the incorrect partial volume program data packets until the partial volume program data packets are correct;
and if the program data packet is correct, the plurality of the split-volume program data packets are combined and decomposed into the original complete program data packet based on a zip decompression algorithm.
6. The program distribution synchronization method of claim 1, wherein the method further comprises:
when detecting that a new terminal requests to download a program data packet to the socket connection of the area server with the ID number of n, the area server with the ID number of n returns the ipv6 address of the last terminal which finishes downloading the program data packet to the new terminal through the socket connection;
the new terminal establishes socket connection based on the received ipv6 address and downloads a program data packet; and the number of the first and second groups,
after downloading the program data packet, the new terminal inserts and saves the own terminal ID, ipv6 address and program distribution state into the local database of the area server with ID number n by connecting with the area server socket with ID number n.
7. The program distribution synchronization method of claim 6, wherein the local server with ID number n reports the terminal program distribution status information through an HTTP long connection with the centralized control server when a new terminal program distribution status is inserted and stored in the local database.
8. The program distribution synchronization method of claim 7, wherein the terminal program distribution status information includes a message ID4, a terminal ID, an ipv6 address, and a completion status.
9. A program distribution synchronization system for a multimedia terminal, the system comprising:
a notification module: the regional server issues a message for notifying that the terminal program data packet is prepared to the local network based on the ipv6 address, wherein the message for notifying that the terminal program data packet is prepared comprises a message ID3 and a current time and date;
determining a connection establishing module: the terminal is used for determining that the terminal needs to establish a connection relation with the area server with the ID number n based on the ID number of the area server and the ID number of the terminal;
a connection establishment module: after determining that the terminal needs to establish a connection relationship with the area server with the ID number of n, the terminal establishes socket connection with the ipv6 address of the area server with the ID number of n;
a downloading module: the terminal is used for downloading the program data packet on the area server with the ID number n to the terminal based on the socket connection; and the number of the first and second groups,
a storage module: after the terminal finishes downloading the program data packet, the area server with the ID number n stores the ID number, the ipv6 address and the program release state of the terminal in a local database;
determining a connection establishing module: the terminal is also used for acquiring the ID number of the area server and the ID number of the terminal; and sequentially dividing the ID number of the terminal by the ID numbers of the regional servers from the maximum value to the minimum value, if the ID numbers are divided evenly, terminating the division calculation, and determining that the ID number of the terminal needs to establish a connection relation with the regional server with the evenly divided ID number of n.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910648394.4A CN112243139B (en) | 2019-07-17 | 2019-07-17 | Program distribution synchronization method and system of multimedia terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910648394.4A CN112243139B (en) | 2019-07-17 | 2019-07-17 | Program distribution synchronization method and system of multimedia terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112243139A CN112243139A (en) | 2021-01-19 |
CN112243139B true CN112243139B (en) | 2021-08-10 |
Family
ID=74167861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910648394.4A Active CN112243139B (en) | 2019-07-17 | 2019-07-17 | Program distribution synchronization method and system of multimedia terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112243139B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113507446B (en) * | 2021-06-16 | 2023-08-01 | 广州朗国电子科技股份有限公司 | Method, system, multimedia terminal and storage device for rapidly distributing multimedia program |
CN113259726A (en) * | 2021-06-18 | 2021-08-13 | 广州朗国电子科技有限公司 | Multimedia program distribution method, system, multimedia terminal and storage device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101068155A (en) * | 2006-09-20 | 2007-11-07 | 腾讯科技(深圳)有限公司 | Coordinate connection stream media direct broadcasting system and collection server thereof |
CN101155295A (en) * | 2006-09-28 | 2008-04-02 | 李典 | Network flow media data distribution method based on area data buffer |
CN101198034A (en) * | 2007-12-29 | 2008-06-11 | 北京航空航天大学 | Network video monitoring system and its data exchanging method |
CN101877712A (en) * | 2009-04-29 | 2010-11-03 | 美商定谊科技公司 | Data transmission-controlling method, server and terminal equipment |
CN102882790A (en) * | 2012-10-12 | 2013-01-16 | 北京锐安科技有限公司 | IPv6 (Internet Protocol version 6) real-time dataflow processing method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4861491B2 (en) * | 2010-03-17 | 2012-01-25 | 株式会社東芝 | Telephone system, telephone exchange apparatus, and connection control method used in telephone exchange apparatus |
JP2016015714A (en) * | 2014-06-10 | 2016-01-28 | パナソニックIpマネジメント株式会社 | Information supply system and information supply method |
-
2019
- 2019-07-17 CN CN201910648394.4A patent/CN112243139B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101068155A (en) * | 2006-09-20 | 2007-11-07 | 腾讯科技(深圳)有限公司 | Coordinate connection stream media direct broadcasting system and collection server thereof |
CN101155295A (en) * | 2006-09-28 | 2008-04-02 | 李典 | Network flow media data distribution method based on area data buffer |
CN101198034A (en) * | 2007-12-29 | 2008-06-11 | 北京航空航天大学 | Network video monitoring system and its data exchanging method |
CN101877712A (en) * | 2009-04-29 | 2010-11-03 | 美商定谊科技公司 | Data transmission-controlling method, server and terminal equipment |
CN102882790A (en) * | 2012-10-12 | 2013-01-16 | 北京锐安科技有限公司 | IPv6 (Internet Protocol version 6) real-time dataflow processing method |
Also Published As
Publication number | Publication date |
---|---|
CN112243139A (en) | 2021-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108965484B (en) | Internet of things data transmission method, system and terminal | |
EP2279584B1 (en) | System and method for distributing a map of content available at multiple receivers | |
EP1944944A1 (en) | System and method for combining pull and push modes | |
EP2523422A1 (en) | Issuing method and system for configuration information | |
CN108881354B (en) | Push information storage method and device, server and computer storage medium | |
CN101848188A (en) | Method and device for updating data block checking information | |
JP2019506696A (en) | Resource acquisition method and related apparatus | |
CN109462640B (en) | Metadata synchronization method, data terminal, interaction system and medium | |
CN112243139B (en) | Program distribution synchronization method and system of multimedia terminal | |
CN105450682B (en) | Method, device and system for synchronously storing data and synchronizing data to client | |
CN106611001A (en) | Method, device and system for checking consistency of data in database tables in virtual machines | |
CN110958150B (en) | Management method and device for dynamic service configuration | |
CN111638891B (en) | Equipment upgrading method and device, terminal equipment and storage medium | |
CN117714532A (en) | Data information pushing method based on Timeline model, gateway and related equipment | |
CN109257448B (en) | Session information synchronization method and device, electronic equipment and storage medium | |
CN117097744B (en) | Information synchronization method, controlled device, control device and electronic device | |
CN106612295B (en) | Application downloading method, application pushing method, application downloading device, application pushing device and application downloading system | |
CN114465697B (en) | Reliable communication method, device and equipment based on Ethernet | |
CN113691599A (en) | Method and device for data synchronization between service instances | |
CN107563942B (en) | Logistics data batch processing method, logistics processing system and processing device | |
CN112394951B (en) | Application deployment method and server cluster | |
WO2014177058A1 (en) | Transmission method and device for file data | |
CN114338653A (en) | File breakpoint resuming method and device | |
CN110781034B (en) | Distributed supervision method and system | |
CN114666217B (en) | One-key upgrading method and system based on easy mesh |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Room 238, room 406, No.1, Yichuang street, Huangpu District, Guangzhou, Guangdong 510000 Patentee after: Guangzhou langguo Electronic Technology Co.,Ltd. Address before: 510000 unit a and B, zone 02, 4th floor, No. 136, Gaopu Road, high tech Development Zone, Tianhe District, Guangzhou City, Guangdong Province Patentee before: GUANGZHOU LANGO ELECTRONIC SCIENCE & TECHNOLOGY Co.,Ltd. |