Summary of the invention
In order to overcome the above-mentioned defective of prior art; The invention provides a kind of mediaphone program row and sow support method and system; Can realize the management of file service efficiently of advertisement pushing and edition upgrading in the mediaphone system, effectively satisfy the promptness that real-time that multimedia programming pushes and terminal versions are upgraded.
Main technical schemes of the present invention has:
A kind of mediaphone program row sows support method; Design based on the UDP host-host protocol; Adopt two kinds of file push Initiated Mechanism and terminal that the downloading mode of file download service preferentially is provided simultaneously; Said two kinds of file push Initiated Mechanism are: (1) multimedia telephone terminal is initiatively to the new file of issuing of file server inquiry regularly; (2) file server learns that the notice multimedia telephone terminal is downloaded corresponding document to upgrade to its request when remaining file publishing; Said terminal preferentially provides the downloading mode of file download service to be: preferentially select other online multimedia telephone terminals of having accomplished renewal that file download service is provided, when not having other multimedia telephone terminals of file download service can be provided, again from the file server file in download.
The file push agreement comprises the steps: that the transmission terminal heartbeat of (1) current terminal is to file server; (2) after file server was received the heartbeat at current terminal, the time series fileinfo that will be referred to current terminal sent to current terminal; (3) the time series file ID download time sequential file that returns according to file server of current terminal; (4) current terminal compares original time series file and new time series file, and extraction needs the ID of downloaded files; (5) current terminal as required the ID of downloaded files download corresponding file, accomplish the renewal of file; (6) current terminal is sent to file server and is downloaded the result; (7) file server will be downloaded the result and write database, be successfully if download the result, and file server is recorded in the information of corresponding terminal in the terminal list of accomplishing renewal.
Between said step (1), (2), file server also carries out online number of terminals inspection and terminal versions upgrading inspection, and whether said online number of terminals inspection reaches peak value for the quantity at all online terminals of inspection; If then return denial of service and give current terminal, if not; Then continue subsequent step; Said terminal versions upgrading inspection can be supplied with the version file that the new issue of software release upgrade is carried out at current terminal for whether inspection has, if having, then feeds back the information of corresponding version file and gives current terminal; Current terminal is according to the corresponding version file of the download of information of said version file; And return the download result to file server, if do not have, then continue subsequent step.
Push away file under the mode of preferred employing PNP in the said step (5).
A kind of mediaphone program row who realizes preceding method sows loading system; Comprise multimedia telephone terminal and file server; Said multimedia telephone terminal is initiatively to the new file of issuing of said file server inquiry regularly; And, learn when said file server and to notify when remaining file publishing said multimedia telephone terminal to download corresponding document to upgrade that said multimedia telephone terminal is preferentially downloaded the file of new issue from other online multimedia telephone terminals of having accomplished renewal to its request; If when not having other multimedia telephone terminals of file download service can be provided, download corresponding document to said file server requests again.
Preferably be provided with playing module, data analysis module, transmission data module in the said multimedia telephone terminal, receive data module and PNP file service module; Preferably be provided with database management module in the said file server, send data module, receive data module and PNP file service module, the transmission data module of said multimedia telephone terminal is sent file push request and result to the reception data module of said file server; The reception data module of said multimedia telephone terminal receives the necessary information from the required relevant this document of the download Miscellaneous Documents of the transmission data module of said file server, and can be the information list of online multimedia telephone terminal that said multimedia telephone terminal provides the file download service of the file that pushes; The data analysis module compare of analysis of said multimedia telephone terminal contains sequential file between new, old times of the ID that pushes file to some extent, need to confirm the ID of downloaded files; Said PNP file read module matches with said PNP file service module, preferential other multimedia telephone terminals of confirming to provide file download service; The transmission data module of said file server, reception data module and PNP file service module are equipped with the communication interface with said database management module, and the PNP file service module of said multimedia telephone terminal is provided with the interface of communicating by letter with playing module.
Also be provided with database in the said file server, can record the information of file push process and result, Miscellaneous Documents and the information of each multimedia telephone terminal in the said database; Said file server receives the file push request of said multimedia telephone terminal; The information that from said database, reads the Miscellaneous Documents that relates in the propelling movement process returns to said multimedia telephone terminal, for said multimedia telephone terminal provides the file push service; The file push result who receives said multimedia telephone terminal upgrades into said database; When said file server is received the download request of the file that pushes; Return other tabulations of having accomplished the multimedia telephone terminal of renewal that file download service can be provided to said multimedia telephone terminal earlier and supply its selection; When not having other multimedia telephone terminals of file download service can be provided, said file server provides file download service to said multimedia telephone terminal; Said database is provided with the interface that supplies said database management module visit.
The invention has the beneficial effects as follows:
1,, the real-time that multimedia programming pushes and the promptness of terminal software edition upgrading have been guaranteed effectively owing to adopt (1) multimedia telephone terminal initiatively to learn that to the file of the file server new issue of inquiry regularly and (2) file server the notice multimedia telephone terminal is downloaded corresponding document to carry out master, the passive two kinds of file push Initiated Mechanism that file upgrades to its request when remaining file publishing simultaneously;
2, owing to download the download and the compare of analysis of advanced line time sequential file before institute's file that pushes, promptly whole file push agreement is a core with the time series table, has realized regularly program request and the timing propelling movement of arranging the multimedia programming of broadcasting;
3, the file download service priority facility order of " other have been accomplished, and the multimedia telephone terminal of renewal is preferential, file server takes second place " owing to adopt; Make the terminal that file download service can be provided be preferably current terminal file download service is provided, alleviated the resource load of file server effectively;
4, because after file server receives the terminal heartbeat; Carry out terminal versions upgrading inspection before the release tasks state at inspection terminal earlier; If new version file is arranged; Then turn to new version file to download flow process, guaranteed that terminal total energy when downloading new multimedia programming file keeps up-to-date terminal software version, avoid software release upgrade untimely receiving and the play multimedia program file causes negative effect such as does not support;
5, because whole file push agreement based on the design of UDP host-host protocol, has improved file transfer speed effectively;
6, method and system of the present invention has improved multimedia programming value-added service and management work efficiency, has alleviated staff's office, labour intensity, can satisfy the file management, service management and the terminal management demand that grow with each passing day.
Embodiment
The invention provides a kind of mediaphone program row and sow support method; Design based on the UDP host-host protocol; The file that is mainly used in the mediaphone system regularly pushes and the terminal software edition upgrading; Its core body is present: adopt two kinds of file push Initiated Mechanism and terminal that the downloading mode of file download service preferentially is provided simultaneously; Said two kinds of file push Initiated Mechanism are: initiatively to the file of the file server new issue of inquiry regularly, (2) file server learns that the notice multimedia telephone terminal is downloaded corresponding document to upgrade to its request when remaining file publishing to (1) multimedia telephone terminal.Said terminal preferentially provides the downloading mode of file download service to be: preferentially select other online multimedia telephone terminals of having accomplished renewal that file download service is provided; When not having other multimedia telephone terminals of file download service can be provided, again from the file server file in download.
The file push Initiated Mechanism that is adopted has guaranteed the real-time that multimedia programming pushes and the promptness of terminal software edition upgrading effectively, and the file downloading mode that is adopted can alleviate the resource load of file server effectively.
The core that said mediaphone program row sows support method is the file push agreement, preferably adopts following key step:
(1) the terminal heartbeat is sent to file server in current terminal;
(2) after file server is received the heartbeat at current terminal; The time series file ID that will be referred to place, the particularly current terminal of the time series fileinfo group at current terminal sends to current terminal; Specifically can for: whether file server is to be released according to the fuselage code at current terminal from the release tasks state that database obtains current terminal; If; Then in database, find the time series file ID of place, current terminal group to write the heartbeat acknowledgement frame and return to current terminal, if not, then directly return corresponding heartbeat acknowledgement frame;
(3) the time series file ID download time sequential file that returns according to file server of current terminal;
(4) preceding terminal compares original time series file and new time series file, and extraction needs the ID of downloaded files;
(5) current terminal as required the ID of downloaded files download corresponding file, accomplish the renewal of file;
(6) current terminal is sent to file server and is downloaded the result, and plays or carry out institute's downloaded files;
(7) file server will be downloaded the result and write database, be successfully if download the result, and file server is recorded in the information of corresponding terminal in the terminal list of accomplishing renewal.
In the said step (5) downloaded files be file server the file that will push; Each download before the file that will push; The download of all advanced line time sequential file and analysis, the new file that finding current terminal to think needs is downloaded again, and having embodied with the time series table is the file push of core; Guaranteed the timing requirement that multimedia programming transmits and plays, also embodied the distinctiveness demand of different terminals user multimedia programming and its reproduction time.The download of said time series file and analysis be corresponding said step (3) and (4) respectively.Said time series file is the file that is used to write down each multimedia programming row preface sowing time and terminal software version issue sequential, wherein contains the ID and the issuing time of multimedia programming file and version file.
According to said step (6) and (7); The terminal is always downloaded the result with file and is sent to file server; And it is write database by file server; Particularly write down the terminal of having downloaded success (promptly think and accomplished renewal), as the optional equipment that file download service is provided for the terminal of accomplishing renewal as yet.
Terminal heartbeat described in the step (1) not only can be initiatively terminal heartbeat but also can be the heartbeat of passive terminal; Said active terminal heartbeat is the terminal heartbeat that current terminal periodic property ground sends to file server; Whether have the inquiry of update notification, be preferably per 30 minutes once if can be used for the demand file server; Said passive terminal heartbeat is the file that professional foreground computer circular document server has new issue; File server is notified swap server then; Swap server triggers all terminals of current online again to the terminal heartbeat that file server sent, the new release tasks of notice terminal downloads.Said active terminal heartbeat and the heartbeat of passive terminal respectively corresponding (1), (2) two kinds of file push Initiated Mechanism, its file push protocol communication process respectively like Fig. 1, shown in 2.
For the heartbeat of active terminal, whether the file server inspection has update notification, specifically can check updating mark, if update notification is arranged, then that corresponding document is related time series fileinfo feeds back to the terminal.For the heartbeat of passive terminal, file server checks whether the release tasks state at current terminal is to be released, if, then return the time series file ID of place, terminal group and give the terminal, if not, then can return 0 and give the terminal, statement does not have task to be released.
Between said step (1), (2); File server can also carry out online number of terminals inspection and terminal versions upgrading inspection, and whether said online number of terminals inspection reaches peak value for the quantity at all online terminals of inspection, if; Then return denial of service and give current terminal; If not, then continue subsequent step, said online number of terminals inspection can be avoided the file server overload effectively.
Said terminal versions upgrading inspection can be supplied with the version file that the new issue of software release upgrade is carried out at current terminal for whether inspection has; As shown in Figure 3; Whether the terminal has through heartbeat inquiry file server can be supplied with current terminal and carry out software release upgrade information, if having, file server feeds back the information of corresponding version file and gives current terminal; Current terminal is according to the corresponding version file of the download of information of said version file; And return the download result to file server, if do not have, then continue subsequent step.This inspection has guaranteed that terminal total energy when downloading new multimedia programming file keeps up-to-date terminal software version, avoids software release upgrade untimely to receiving and the play multimedia program file causes negative effect such as does not support.
Cooperate the each other row that accomplished above-mentioned multimedia programming file of terminal and file server sows the process of carrying, and wherein, the performed separately motion flow of terminal and file server can be respectively referring to Fig. 6 and 7.
Because the file that will push mainly is the multimedia programming file, is mostly video, audio class formatted file, downloading this class file, to take resource more; Load is heavier; Therefore push away this class file under the mode of preferred employing PNP in the said step (5), as shown in Figure 4, its detailed process is:
(a) shared information request is sent to file server in current terminal, and file server takes out corresponding service available shared terminal according to current terminal information in the said terminal list of having accomplished renewal information is formed the shared resource tabulation and returned to current terminal;
(b) information that whether contains service available shared terminal in the said shared resource tabulation is checked at current terminal; Have then according to the definite service terminal of shared resource tabulation; The terminal of service can be provided to current terminal; And, then do not turn to the file server requests file push to service terminal transmission sharing request;
(c) for the situation that service terminal is arranged; Service terminal sends the share service status frames to file server; Telling the file server service terminal to get into provides PNP file download service state; At the same time, current terminal is sent to file server and is received the file status frame, tells the current terminal of file server to get into reception PNP file status;
(d) file is transferred to current terminal by service terminal;
(e) after the file transfer success; Current terminal is sent to share to service terminal and is stopped frame, tells the service terminal file to download and accomplishes, meanwhile; Service terminal sends to share to file server and stops frame, tells the file server service terminal to revert to service state can be provided;
(f) current terminal is downloaded completion message with file and is sent to file server.
After the file transfer success, current terminal is sent program updating to file server and is accomplished message, tells server update successful.
To sum up, can find out the download that relates to three kinds of files in the whole file push process: the version file that possibly relate in file that is pushed in the time series file in the step (3), the step (5) and the terminal versions upgrading inspection, no matter which class file is when downloading; As shown in Figure 5, current terminal all wants to obtain the information of wanting file in download to file server requests earlier, comprises the size and the filename of file; Set the skew of file again, be that basic parameter transmits control to file with the skew of file and the length of file, and then obtain the content of file; During this time; The preferred employing met wrong retransmission mechanism, and to improve reliability of data transmission, its mechanism is as shown in Figure 8; When the skew that runs into file was wrong, the skew when mistake is taken place asked to download this document once more as the new skew of file.
The Hash location algorithm based on modulo operation is preferably adopted in the heartbeat of said terminal; Specifically be to carry out modulo operation to back 8 hexadecimal numbers and the COMM_TERMINAL_POS_NUM of the fuselage code at terminal; COMM_TERMINAL_POS_NUM is the modulus that modulo operation is used; It is a prime number; To set according to memory size and experience in the application, the nInitPos as a result of computing is as corresponding Hash table entry address, this terminal, finds out operable position in the maximum magnitude of the position sought that the terminal begins in said entry address; Make finally to reach excellent even mapping performance that wherein can to seek the maximum magnitude sum of position be the total length of Hash table COMM_TERMINAL_POS_NUM and terminal.
File push agreement of the present invention is based on UDP host-host protocol design, when the requesting party is overtime when not receiving response frame, and requesting party's re-send request may frame or Frame, the repeating transmission time is dynamically confirmed according to network speed.
For the confidentiality of data, in the transmission course of network preferably to data encrypt, deciphering and data check.Encrypting, decipher these two work mainly is when preparing network packet and untiing network packet, to accomplish, and transmit leg carries out encryption to packet, and the recipient deciphers reduction to packet and handles.Data check is when preparing network packet, produces a check value according to data, when receiving network packet, check value is verified, to guarantee the accuracy of data.
The present invention also provides a kind of mediaphone program row to sow loading system; Be used to realize that the described various mediaphone program rows of preamble sow support method; Comprise multimedia telephone terminal and file server; Preferably also comprise professional foreground computer and swap server, a kind of topological structure of whole system can be referring to Fig. 9.The course of work of this system is: said multimedia telephone terminal is initiatively to the new file of issuing of said file server inquiry regularly; And; When the file of new issue, said professional foreground computer is notified said file server, when said file server is learnt the file of new issue; Reinform swap server, notify said multimedia telephone terminal to download corresponding document to upgrade to said file server requests by swap server.During said multimedia telephone terminal file in download; Preferentially download the file of new issue from other online multimedia telephone terminals of having accomplished renewal; If when not having other multimedia telephone terminals of file download service can be provided, download corresponding document to said file server requests again.
Said mediaphone program row sows loading system (also can be called the file service system); The file service management of advertisement pushing, edition upgrading two aspects is provided; Software section in the system can be divided into the file in download CLIENT PROGRAM and the backstage file server program of multimedia telephone terminal according to the user; The relation of the two is shown in figure 10, and wherein, server partly is its core.
Shown in figure 11, be provided with playing module, data analysis module, transmission data module in the said multimedia telephone terminal, receive data module and PNP file service module, belong to the terminal program part.Shown in figure 12, be provided with database management module in the said file server, send data module, receive data module and PNP file service module, belong to the server part.The transmission data module of said multimedia telephone terminal is sent file push request and result to the reception data module of said file server; The reception data module of said multimedia telephone terminal receives the necessary information from the required relevant this document of the download Miscellaneous Documents of the transmission data module of said file server, and can be the information list of online multimedia telephone terminal that said multimedia telephone terminal provides the file download service of the file that pushes; The data analysis module compare of analysis of said multimedia telephone terminal contains sequential file between new, old times of the ID that pushes file to some extent, need to confirm the ID of downloaded files; Said PNP file read module matches with said PNP file service module, preferential other multimedia telephone terminals of confirming to provide file download service; The transmission data module of said file server, reception data module and PNP file service module are equipped with the communication interface with said database management module, and the PNP file service module of said multimedia telephone terminal is provided with the interface of communicating by letter with playing module.
Also be provided with database in the said file server; Record the information of file push process and result, Miscellaneous Documents and the information of each multimedia telephone terminal in the said database; Main through the maintenance realization to grouping information table, terminal list and file information table, Figure 13-15 is depicted as a kind of concrete structure in these three kinds of forms; Said file server receives the file push request of said multimedia telephone terminal; The information that from said database, reads the Miscellaneous Documents that relates in the propelling movement process returns to said multimedia telephone terminal, for said multimedia telephone terminal provides the file push service; The file push result who receives said multimedia telephone terminal upgrades into said database; When said file server is received the download request of the file that pushes; Return other tabulations of having accomplished the multimedia telephone terminal of renewal that file download service can be provided to said multimedia telephone terminal earlier and supply its selection; When not having other multimedia telephone terminals of file download service can be provided, said file server provides file download service to said multimedia telephone terminal; Said database is provided with the interface that supplies said database management module visit.
Said mediaphone program row sows in the loading system and communicates based on the UDP host-host protocol between both sides' hardware device of intercommunication mutually, to adapt to the download of multimedia file more.
Construction to server end is the important bridge of classified information and edition upgrading; Carry out and strengthen the construction of file server; Realize networking management, the informationization at terminal; Be to improve the centralized management level at terminal and the inevitable requirement of vocational work efficient, can realize the real time propelling movement of advertisement, the upgrading of terminal versions on the one hand; The success or not of second aspect backspace file propelling movement in time, raising business and management work efficiency; The third aspect can alleviate administrative staff's office, labour intensity, thereby whole advertisement pushing and edition upgrading are well managed, and the network management of realizing the execution content on the multimedia terminal.
The main business that file server is realized comprises under the classified information file (being the file that is pushed) and pushes away, pushes away under the version file, pushes away under the file of PNP mode, pushes away under the breakpoint transmission, log record, terminal the monitoring to the terminal of document result feedback and file server.
Push away under the said classified information file and be meant that file server is through consulting with the terminal, if any the classified information file of new issue, then shifting the terminal onto under the classified information file that is necessary to download (comprising files such as video, audio frequency, plate).Push away under the said version file and be meant that file server is through consulting with the terminal, if any the version file (comprising boot.bin and other system file) of new issue, then shifting the terminal onto under the version file that is necessary to download.Push away the mode that is meant through PNP under the file of said PNP mode to pushing away under the classified information file, thereby alleviate the resource load of file server.Said log record is meant and carries out record to the error log of whole system and illegal packet, can note if there is lawless people that system is carried out illegal operation, and security of system and maintainability are improved greatly.Push away the document result feedback under the said terminal and be meant that the success or not to the terminal downloads file all can record lane database, let professional foreground computer can recognize the situation of terminal downloads file.Said monitoring to the terminal is meant the monitoring to all online terminals of file server; Think to praise and admire under the file of PNP mode and be engaged in providing the optional equipment tabulation; Make file server become visible, a tangible system, improved the manageability of file server greatly.
File server is preferably under linux system and operation under the environment of Oracle client software is housed.
The file that is pushed comprises multimedia form file and program executable file.
The preferred ORACLE database of the said database of preamble.