Summary of the invention
The purpose of the embodiment of the present invention is to propose Internet playing file transcoding method, be intended to solve in prior art the batch transcoding of the played file of magnanimity in terminal equipment and mobile Internet or/and in the process of playing, need a large amount of artificial problems that participate in, and how solve and by the played file that existed in existing the Internet, to be converted into through the process of automation that the terminal equipment that is applicable to development is play or the automation transcoding that is applicable to third party's program generates the problem of the played file of various transcoding parameters.
The embodiment of the present invention is achieved in that a kind of Internet playing file transcoding method, comprises the following steps:
Obtain transcoding sequence number, transcoding order, the network address of played file;
Search database and whether preserve the network address of described played file and the record of transcoding sequence number;
If do not find, or find record and transcoding state to be transcoding not, according to the transcoding Policy Table, played file is carried out to transcoding;
Described transcoding sequence number is according to played file, to be applicable to different transcoding parameters to distribute different transcoding sequence numbers, and each transcoding sequence number and corresponding transcoding parameter thereof form the transcoding Policy Table.
Another purpose of the embodiment of the present invention is to propose Internet playing file transcoding method in a kind of terminal equipment, said method comprising the steps of:
Obtain the network address of transcoding sequence number that terminal equipment sends, transcoding order, played file;
Send the corresponding physical address of described played file to terminal equipment;
Search database and whether preserve the record of the described played file network address and transcoding sequence number;
Judge whether to find record and transcoding state to be transcoding, if so, played file corresponding to terminal equipment broadcasting physical address;
If not, played file is carried out to transcoding;
Store and play the played file after transcoding;
Increase or modification concordance list record.
Another purpose of the embodiment of the present invention is to propose Internet playing file transcoding method in a kind of third party's program, said method comprising the steps of:
Obtain the network address of transcoding sequence number that third party's program sends, transcoding order, played file;
In concordance list, search the network address of described played file and the record of transcoding sequence number;
Judge whether to find record and transcoding state to be transcoding, if so, do not process;
If not, played file is carried out to transcoding
Played file after the storage transcoding;
Increase or modification concordance list record.
Another purpose of the embodiment of the present invention is to propose a kind of the Internet played file trans-coding system, and described system comprises:
Obtain the played file device, be connected with access server, be used to obtaining the Internet played file, and the transcoding sequence number of played file, transcoding order, the network address are sent to access server;
Access server, with obtain played file device, database and transcoder and be connected, for receiving transcoding sequence number, transcoding order, the network address of the played file of sending of obtaining the played file device, and send to database the concordance list request of obtaining, receive simultaneously the concordance list that database sends, judge in concordance list and whether exist corresponding to the network address of played file and the record of transcoding sequence number, if do not find, perhaps find record and transcoding state to be transcoding not, to transcoding order, transcoding sequence number, the network address of transcoder transmission played file;
Transcoder, with access server, file server and database, be connected, for storing the transcoding Policy Table, the transcoding order of the played file that the response access server sends, receive transcoding sequence number and the network address of played file, according to transcoding parameter corresponding in the transcoding Policy Table of transcoding sequence number place, played file is carried out to transcoding, and the played file after the storage transcoding sends and writes the concordance list instruction simultaneously to database to file server;
File server, be connected with transcoder, the played file completed be used to storing the transcoder transcoding;
Database, with transcoder, be connected with access server, be used to storing concordance list, the instruction that the response access server obtains concordance list, and send concordance list to access server, respond simultaneously increase, modification and storage that the instruction of writing concordance list of transcoder is recorded concordance list;
Described transcoding sequence number is according to played file, to be applicable to different transcoding parameters to distribute different transcoding sequence numbers, and each transcoding sequence number and corresponding transcoding parameter thereof form the transcoding Policy Table.
Beneficial effect of the present invention:
By obtaining the network address of played file, the transcoding sequence number, the transcoding order, judge in concordance list the record whether corresponding network address and transcoding sequence number are arranged, if do not find, perhaps find record and transcoding state to be transcoding not, according to transcoding sequence number corresponding transcoding parameter in the transcoding Policy Table, played file is carried out to transcoding, whole process is without artificial participation, save manpower, by transcoding Policy Table and concordance list, determine whether the process of transcoding and transcoding and storage, be applicable to obtain the network address of terminal equipment or third party's program transmission played file, the transcoding sequence number, the transcoding order, and transcoding generates the played file that is applicable to different transcoding parameters, along with scientific and technological development, can also increase the transcoding sequence number in the transcoding Policy Table, according to transcoding parameter corresponding to transcoding sequence number increased, played file is carried out to transcoding, compatibility is stronger.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated, for convenience of explanation, only show the part relevant to the embodiment of the present invention.Should be appreciated that the specific embodiment that this place is described, only be used to explaining the present invention, not in order to limit the present invention.
The present invention is by obtaining the network address of played file, the transcoding sequence number, the transcoding order, judge in concordance list the record whether corresponding network address and transcoding sequence number are arranged, if do not find, perhaps find record and transcoding state to be transcoding not, according to transcoding sequence number corresponding transcoding parameter in the transcoding Policy Table, played file is carried out to transcoding, whole process is without artificial participation, save manpower, by transcoding Policy Table and concordance list, determine whether the process of transcoding and transcoding and storage, be applicable to obtain the network address of terminal equipment or third party's program transmission played file, the transcoding sequence number, the transcoding order, and transcoding generates the played file that is applicable to different transcoding parameters, along with scientific and technological development, can also increase the transcoding sequence number in the transcoding Policy Table, according to transcoding parameter corresponding to transcoding sequence number increased, played file is carried out to transcoding, compatibility is stronger.
Embodiment mono-
Fig. 1 is a kind of Internet playing file transcoding method flow chart of the embodiment of the present invention.Said method comprising the steps of:
S101, the transcoding sequence number, transcoding order, the network address that obtain played file;
Described played file comprises audio frequency and/or video file;
The transcoding sequence number of described played file, transcoding order, the network address are to obtain by the playing request that receiving terminal apparatus or third party's program send;
Described third party's program refers to the software of the played file on the automatic capturing the Internet;
Described transcoding sequence number is according to played file, to be applicable to different transcoding parameters to distribute different transcoding sequence numbers, and each transcoding sequence number and corresponding transcoding parameter thereof form the transcoding Policy Table;
S102, search the network address of described played file and the record of transcoding sequence number in concordance list;
Described index table stores has the network address, filename, transcoding sequence number, transcoding state and the physical address of played file;
Described transcoding state is not transcoding or transcoding;
S103, if do not find, or find record and transcoding state to be transcoding not, according to the corresponding transcoding parameter of transcoding Policy Table transit code sequence number, played file carried out to transcoding;
S104, the played file after the storage transcoding;
S105, increase or modification concordance list record;
Wherein, while first played file being carried out to transcoding, no matter whether transcoding is successful, all will increase the record in concordance list, the corresponding network address of recording played file, filename, transcoding sequence number, transcoding state and physical address;
If after played file transcoding failure, the transcoding state in the record in the corresponding concordance list of played file is transcoding not, if transcoding successfully needs to revise the transcoding state and is transcoding again;
For ease of those skilled in the art, understand, illustrate concordance list, transcoding strategy tableau format, and the network address, transcoding sequence number, transcoding state, the represented content of physical address:
Table 1: index tableau format
Wherein physical address name is comprised of the filename of depositing after file place server after transcoding+transcoding sequence number+transcoding, and the physical address naming rule is consistent, before not carrying out transcoding, just can learn the corresponding physical address of played file,
Table 2: transcoding strategy tableau format
[--configuration 01--]
Wherein, [--configuration 01--] mean the transcoding sequence number, only illustrating the transcoding sequence number herein is the 01 o'clock parameter mainly comprised and parameter value thereof in corresponding transcoding Policy Table, other transcoding sequence numbers are similar, repeat no more; Transcoder is searched the corresponding transcoding parameter of transcoding Policy Table transit code sequence number according to the transcoding sequence number of obtaining played file is carried out to transcoding.
In the embodiment of the present invention by the network address, transcoding sequence number, the transcoding order of obtaining played file, judge in concordance list the record whether corresponding network address and transcoding sequence number are arranged, if do not find, perhaps find record and transcoding state to be transcoding not, according to transcoding sequence number corresponding transcoding parameter in the transcoding Policy Table, played file is carried out to transcoding, whole process is without artificial participation, save manpower, by transcoding Policy Table and concordance list, determine whether the process of transcoding and transcoding and storage.
Embodiment bis-
Fig. 2 is Internet playing file transcoding method flow chart in a kind of terminal equipment of the embodiment of the present invention.Said method comprising the steps of:
S201, the network address that obtains transcoding sequence number that terminal equipment sends, transcoding order, played file;
Described transcoding sequence number is the transcoding sequence number different according to the applicable different transcoding parametric distribution of terminal equipment, and each transcoding sequence number and corresponding transcoding parameter thereof form the transcoding Policy Table;
Described played file comprises audio frequency and/or video file;
S202, send the corresponding physical address of described played file to terminal equipment;
Described physical address is that the played file after transcoding leaves the address on server in, the naming rule of physical address is consistent, by the filename of depositing after file place server after transcoding+transcoding sequence number+transcoding, formed, even described played file does not have can learn the physical address that will deposit after its transcoding before transcoding yet;
S203, search the described played file network address in concordance list and the record of transcoding sequence number;
Described index table stores has the network address, filename, transcoding sequence number, transcoding state and the physical address of played file;
Described transcoding state is not transcoding or transcoding;
S204, judge whether to find record and transcoding state to be transcoding, is to enter step S205, otherwise enters step S206;
S205, terminal equipment is play played file corresponding to physical address;
S206, carry out transcoding according to the corresponding transcoding parameter in the transcoding Policy Table of the transcoding sequence number in described played file to played file, enters step S207;
S207, store and play the played file after transcoding;
S208, increase or modification concordance list record;
Wherein, while first played file being carried out to transcoding, no matter whether transcoding is successful, all will increase the record in concordance list, the corresponding network address of recording played file, filename, transcoding sequence number, transcoding state and physical address;
If after played file transcoding failure, the transcoding state in the record in the corresponding concordance list of played file is transcoding not, if transcoding successfully needs to revise the transcoding state and is transcoding again;
Wherein concordance list, transcoding strategy tableau format, and the represented content in the network address, transcoding sequence number, transcoding state, physical address is identical with the content of embodiment mono-illustrated, repeats no more herein.
The application of Internet playing file transcoding method in the article terminal equipment in the embodiment of the present invention, by obtaining the network address of transcoding sequence number that terminal equipment sends, transcoding order, played file, determine whether to need transcoding, if do not need transcoding, terminal equipment directly reads the played file that physical address is corresponding and plays, if need transcoding, according to the transcoding parameter in the transcoding Policy Table, played file is carried out to transcoding storage, revise simultaneously concordance list.Physical address is to generate according to certain naming rule, before transcoding, namely know the address that the played file after transcoding will be deposited, so can send to terminal equipment to physical address before transcoding, when terminal equipment determines that played file that physical address is corresponding has data to deposit in and can play, play without waiting until that the whole transcodings of whole played file complete again.
Embodiment tri-
Fig. 3 is Internet playing file transcoding method flow chart in a kind of third party's program of the embodiment of the present invention.Said method comprising the steps of:
S301, the network address that obtains transcoding sequence number that third party's program sends, transcoding order, played file;
Described third party's program refers to the software of the played file on the automatic capturing the Internet;
Described transcoding sequence number is the transcoding sequence number different according to the applicable different transcoding parametric distribution of terminal equipment, and each transcoding sequence number and corresponding transcoding parameter thereof form the transcoding Policy Table;
Described played file comprises audio frequency and/or video file;
S302, search the network address of described played file and the record of transcoding sequence number in concordance list;
Described index table stores has the network address, filename, transcoding sequence number, transcoding state and the physical address of played file;
Described transcoding state is not transcoding or transcoding;
S303, judge whether to find record and transcoding state to be transcoding, is to enter step S304, otherwise enters step S305;
S304, do not process;
S305, carry out transcoding according to the corresponding transcoding parameter in the transcoding Policy Table of the transcoding sequence number in described played file to played file, enters step S306;
S306, the played file after the storage transcoding;
S307, increase or modification concordance list record;
Wherein, while first played file being carried out to transcoding, no matter whether transcoding is successful, all will increase the record in concordance list, the corresponding network address of recording played file, filename, transcoding sequence number, transcoding state and physical address;
If after played file transcoding failure, the transcoding state in the record in the corresponding concordance list of played file is transcoding not, if transcoding successfully needs to revise the transcoding state and is transcoding again;
Wherein concordance list, transcoding strategy tableau format, and the represented content in the network address, transcoding sequence number, transcoding state, physical address is identical with the content of embodiment mono-illustrated, repeats no more herein.
The application of Internet playing file transcoding method in article third party program in the embodiment of the present invention, by third party's program, capture transcoding sequence number, transcoding order, the network address of the Internet played file, and judge in concordance list whether record corresponding to transcoding sequence number and the network address is arranged, if have and the transcoding state is transcoding, at this moment be left intact, otherwise, according to the transcoding parameter in the transcoding Policy Table, played file is carried out to transcoding storage, revise simultaneously concordance list.Be applicable to the played file in the crawl the Internet of magnanimity and carry out transcoding, can avoid repetitive operation by concordance list.
Embodiment tetra-
Fig. 4 is a kind of the Internet of embodiment of the present invention played file trans-coding system structural representation.
Described system comprises: obtain played file device, access server, file server, database, transcoder;
Obtain the played file device, be connected with access server, be used to obtaining the Internet played file, and the transcoding sequence number of played file, transcoding order, the network address are sent to access server;
Described transcoding sequence number is that each transcoding sequence number and corresponding transcoding parameter thereof form the transcoding Policy Table according to obtaining the applicable different different transcoding sequence number of transcoding parametric distribution of played file device;
Access server, with obtain played file device, database and transcoder and be connected, for receiving transcoding sequence number, transcoding order, the network address of the played file of sending of obtaining the played file device, and send to database the concordance list request of obtaining, receive simultaneously the concordance list that database sends, judge in concordance list and whether exist corresponding to the network address of played file and the record of transcoding sequence number, if do not find, perhaps find record and transcoding state to be transcoding not, to transcoding order, transcoding sequence number, the network address of transcoder transmission played file;
Wherein concordance list, transcoding strategy tableau format, and the represented content in the network address, transcoding sequence number, transcoding state, physical address is identical with the content of embodiment mono-illustrated, repeats no more herein.
Transcoder, with access server, file server and database, be connected, for storing the transcoding Policy Table, the transcoding order of the played file that the response access server sends, receive transcoding sequence number and the network address of played file, according to transcoding parameter corresponding in the transcoding Policy Table of transcoding sequence number place, played file is carried out to transcoding, and the played file after the storage transcoding sends and writes the concordance list instruction simultaneously to database to file server;
File server, be connected with transcoder, the played file completed be used to storing the transcoder transcoding;
Database, with transcoder, be connected with access server, be used to storing concordance list, the instruction that the response access server obtains concordance list, and send concordance list to access server, respond simultaneously increase, modification and storage that the instruction of writing concordance list of transcoder is recorded concordance list;
When the increase of described record referred to first played file be carried out to transcoding, no matter whether transcoding was successful, all will increase the record in concordance list, the corresponding network address of recording played file, filename, transcoding sequence number, transcoding state and physical address;
After the modification of described record referred to played file transcoding failure, the transcoding state in the record in the corresponding concordance list of played file was transcoding not, if transcoding successfully needs to revise the transcoding state and is transcoding again;
In the embodiment of the present invention, to access server, send the transcoding sequence number of the Internet played file by obtaining the played file device, the transcoding order, the network address, access server judges in concordance list whether exist corresponding to the network address of played file and the record of transcoding sequence number according to the concordance list in database, if do not find, perhaps find record and transcoding state to be transcoding not, transcoder is carried out transcoding according to transcoding sequence number corresponding transcoding parameter in the transcoding Policy Table of played file to played file, played file after transcoding stores file server into, revise simultaneously concordance list, without artificial participation, can realize the transcoding process of the Internet played file of automation, the transcoding of applicable magnanimity the Internet played file.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.