WO2011012021A1 - 一种上传和下载字幕文件的方法、系统和设备 - Google Patents

一种上传和下载字幕文件的方法、系统和设备 Download PDF

Info

Publication number
WO2011012021A1
WO2011012021A1 PCT/CN2010/073510 CN2010073510W WO2011012021A1 WO 2011012021 A1 WO2011012021 A1 WO 2011012021A1 CN 2010073510 W CN2010073510 W CN 2010073510W WO 2011012021 A1 WO2011012021 A1 WO 2011012021A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
subtitle
information
multimedia
server
Prior art date
Application number
PCT/CN2010/073510
Other languages
English (en)
French (fr)
Inventor
马化腾
戴永裕
盛馥钟
司天歌
梅书慧
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to SG2011091840A priority Critical patent/SG177249A1/en
Publication of WO2011012021A1 publication Critical patent/WO2011012021A1/zh
Priority to US13/340,993 priority patent/US8595330B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/401Support for services or applications wherein the services involve a main real-time session and one or more additional parallel real-time or time sensitive sessions, e.g. white board sharing or spawning of a subconference
    • H04L65/4015Support for services or applications wherein the services involve a main real-time session and one or more additional parallel real-time or time sensitive sessions, e.g. white board sharing or spawning of a subconference where at least one of the additional parallel sessions is real time or time sensitive, e.g. white board sharing, collaboration or spawning of a subconference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, system, and device for uploading and downloading a subtitle file.
  • BACKGROUND OF THE INVENTION With the development of communication technologies, multimedia files have been favored by users because of their advantages of convenient transmission and storage and high fidelity, and have been widely used in users' work, study and life.
  • multimedia files There are many types of multimedia files, which are generally divided into sound, image and video. Since the production and playback principles of different types of multimedia files are different, it is necessary to install the corresponding player client on the client, such as a computer or a mobile phone. When the player client plays the multimedia file, in addition to playing the content of the multimedia file, it is generally required to play the subtitle file corresponding to the multimedia file.
  • the mainstream player client provides the function of automatically loading subtitles.
  • the subtitle file stored locally or in the specified path is automatically loaded. If the multimedia file played by the user does not have a subtitle file locally, the subtitle file needs to be downloaded. .
  • the way to download subtitle files is that the user manually downloads the subtitle file from the network or from other clients. If the user wants to upload the local subtitle file to the server when playing the multimedia file, the user also needs to manually subtitle the local subtitle file. The file is sent to the server for use by other users.
  • the existing manual download mode of the user is complicated, and the instant loading of the user subtitle file cannot be realized immediately, thereby reducing the user experience; when the user uploads the subtitle file attached to the multimedia file to the server, the subtitle file of the same multimedia file is often Similarly, if multiple users upload subtitle files, there will be repeated uploads of the same subtitle file, which takes up a lot of Memory space, wasting server resources.
  • the present invention provides a method, system, and device for uploading and downloading a subtitle file, in order to enable a user to upload and download a corresponding subtitle file when playing a multimedia file, thereby improving the user experience.
  • the technical solution is as follows:
  • the embodiment of the invention provides a method for uploading a subtitle file, the method comprising: the player client transmitting the file information of the multimedia file and the file information of the subtitle file corresponding to the multimedia file to the subtitle server;
  • the subtitle file is uploaded.
  • An embodiment of the present invention provides a method for downloading a subtitle file, where the method includes: the player client sends the file information of the multimedia file to the subtitle server; the subtitle server searches according to the received file information of the multimedia file. a file information of the subtitle file associated with the multimedia file, and sending the file information of the found subtitle file and the degree of association with the file information of the multimedia file to the player client;
  • the player client downloads the content of the subtitle file from the subtitle server according to the received file information of the subtitle file and its relevance to the file information of the multimedia file.
  • An embodiment of the present invention provides a system for uploading a subtitle file, where the system includes: a broadcaster client and a subtitle server.
  • the player client is configured to send file information of the multimedia file and file information of the subtitle file corresponding to the multimedia file to the subtitle server; and determining, according to the status message sent by the subtitle server, that the subtitle server does not exist When subtitle files are uploaded, Subtitle file
  • the caption server is configured to determine, according to file information of the subtitle file and file information of the multimedia file, an association relationship and a degree of association between file information of the multimedia file and file information of the subtitle file; Whether the subtitle file exists in the subtitle server, and a status message indicating whether the subtitle file exists is sent to the player client.
  • An embodiment of the present invention provides a system for downloading a subtitle file, where the system includes: a broadcaster client and a subtitle server.
  • the player client is configured to send file information of the multimedia file to the subtitle server; according to the file information of the subtitle file sent by the subtitle server and the degree of association with the file information of the multimedia file, from the subtitle Downloading, by the server, the content of the subtitle file; the subtitle server, configured to search, according to the received file information of the multimedia file, file information of the subtitle file associated with the multimedia file, and file information of the subtitle file found And the degree of association with the file information of the multimedia file is sent to the player client.
  • the embodiment of the present invention provides a player client device, where the player client device includes:
  • a first sending module configured to send file information of the multimedia file and file information of the subtitle file corresponding to the multimedia file to the subtitle server;
  • an uploading module configured to upload the subtitle file when the subtitle file does not exist in the subtitle server according to the status message of the subtitle file sent by the subtitle server.
  • An embodiment of the present invention provides a subtitle server device, including:
  • a determining module configured to determine, according to file information of the subtitle file sent by the player client and file information of the multimedia file, an association relationship and a correlation degree between the file information of the multimedia file and the file information of the subtitle file, and determining Whether the subtitle file exists in the subtitle server;
  • a second sending module configured to send a status message of whether the subtitle file exists to the player client.
  • the embodiment of the present invention provides a player client device, where the player client device includes: a third sending module, configured to send file information of the multimedia file to the subtitle server, and a downloading module, configured to: according to the file information of the subtitle file sent by the subtitle server and the degree of association with the file information of the multimedia file, Downloading the content of the subtitle file from the subtitle server.
  • a third sending module configured to send file information of the multimedia file to the subtitle server
  • a downloading module configured to: according to the file information of the subtitle file sent by the subtitle server and the degree of association with the file information of the multimedia file, Downloading the content of the subtitle file from the subtitle server.
  • An embodiment of the present invention provides a subtitle server device, including:
  • a first searching module configured to search, according to file information of the multimedia file sent by the player client, file information of the subtitle file associated with the multimedia file;
  • a fourth sending module configured to send the file information of the found subtitle file and the degree of association with the file information of the multimedia file to the player client.
  • the user when uploading the subtitle file, the user sends the multimedia file information and the subtitle file information to the subtitle server through the player client, and compares with the corresponding file information on the subtitle server to determine whether the subtitle is present.
  • File uploading the subtitle file when the subtitle file does not exist, ensuring that the subtitle file uploaded by the user is not repeated, saving server resources; when downloading the subtitle file, the user sends the file information of the multimedia file through the player client
  • the subtitle server searches for the associated subtitle file on the subtitle server, and selects the subtitle file according to the degree of association between the found subtitle file information and the multimedia file, so that the user can download the required subtitle file in time and accurately, without the user searching for the downloaded subtitle Files that improve the user experience.
  • FIG. 1 is a schematic flowchart of an uploading method provided by Embodiment 1 of the present invention
  • 2 is a schematic flowchart of a downloading method according to Embodiment 2 of the present invention
  • FIG. 3-1 is a schematic flowchart of an uploading method provided by Embodiment 3 of the present invention
  • FIG. 4 is a schematic flowchart of an uploading and downloading method according to Embodiment 4 of the present invention
  • FIG. 5 is a schematic structural diagram of an uploading system according to Embodiment 5 of the present invention
  • FIG. 6 is a schematic structural diagram of a download system according to Embodiment 6 of the present invention.
  • FIG. 7 is a schematic structural diagram of a player client according to Embodiment 7 of the present invention
  • FIG. 8 is a schematic structural diagram of a caption server according to Embodiment 8 of the present invention
  • FIG. 9 is a schematic structural diagram of a player client according to Embodiment 9 of the present invention
  • FIG. 10 is a schematic structural diagram of a caption server according to Embodiment 10 of the present invention.
  • the embodiment of the present invention provides a method for uploading a subtitle file, and the subtitle file is a subtitle file of the multimedia file, as shown in FIG. 1 , the method content is as follows:
  • Step 101 The player client sends the file information of the multimedia file and the file information of the subtitle file corresponding to the multimedia file to the subtitle server.
  • Step 102 The subtitle server determines, according to the file information of the subtitle file and the file information of the multimedia file, the association relationship between the file information of the multimedia file and the file information of the subtitle file, and the association degree between the file information of the multimedia file and the file information of the subtitle file; Whether the subtitle file exists in the subtitle server, and whether a status message of the subtitle file exists is sent to the player client.
  • Step 103 The player client uploads the subtitle file according to the status message of the received subtitle file.
  • the subtitle server queries whether the content of the subtitle file exists in the subtitle server and whether the multimedia medium exists according to the file information of the subtitle file and the file information of the multimedia file. File information for the file.
  • the file information of the subtitle file is added, the association relationship between the file information of the multimedia file and the file information of the subtitle file is established, and the subtitle is sent to the player client.
  • a status message that the file does not exist.
  • the file information of the subtitle file and the file information of the multimedia file are added, and the association relationship between the file information of the multimedia file and the file information of the subtitle file is established, and A status message that the subtitle file does not exist is sent to the player client.
  • the degree of association between the file information of the multimedia file and the file information of the subtitle file is accumulated, and the status message of the existence of the subtitle file is sent to the player client, and the status information is Includes information on whether a subtitle file exists.
  • the initial association degree may be set to 1.
  • the association degree of the multimedia file is accumulated, and the range of the association degree may be based on actual conditions.
  • Flexible settings for example, can be set from 1 to 20. That is, when the initial relationship is established, the initial association degree is set to 1, and each time the content of the subtitle file is found and the file information of the multimedia file exists, the association degree is accumulated once, and when it is added to 20, even if the subtitle file exists, The content and the file information of the multimedia file no longer increase the degree of association.
  • the file information of the multimedia file is added, and the association relationship between the file information of the multimedia file and the file information of the subtitle file is established, and is sent to the player client. Status message for the existence of the subtitle file.
  • the subtitle file is not uploaded; if the status message that the subtitle file does not exist is received, the subtitle file is uploaded.
  • the file information of the multimedia file includes a hash value of the multimedia file; the file information of the subtitle file includes a hash value of the subtitle file, and the file information of the multimedia file and the file information of the subtitle file may further include other information, which is in the embodiment of the present invention. This is not a limitation. Further, the file information of the multimedia file further includes feature information of the multimedia file; and the file information of the subtitle file further includes feature information of the subtitle file.
  • the user when uploading a subtitle file, the user sends the file information of the multimedia file and the file information of the subtitle file to the subtitle server through the player client, and compares with the corresponding file information on the subtitle server to determine Whether the content of the subtitle file exists, uploading the subtitle file according to the judgment result, and determining the association between the file information of the multimedia file and the file information of the subtitle file in the subtitle server, ensuring that the subtitle file uploaded by the user is not repeated, thereby saving server resources.
  • An embodiment of the present invention provides a method for downloading a subtitle file. Referring to FIG. 2, the method includes:
  • Step 201 The player client sends the file information of the multimedia file to the caption server.
  • Step 202 The subtitle server searches for file information of the subtitle file associated with the multimedia file according to the file information of the received multimedia file, and searches the file information of the subtitle file and the file information of the subtitle file and the multimedia file of the found subtitle file. The relevance of the file information is sent to the player client.
  • Step 203 The player client downloads the content of the subtitle file from the subtitle server according to the file information of the received subtitle file and the degree of association with the file information of the multimedia file.
  • the player client receives the file information of the subtitle file and the relevance of the file information of the subtitle file and the file information of the multimedia file, selects a subtitle file according to the association degree, and downloads the content of the selected subtitle file from the subtitle server. .
  • the subtitle server searches for the file information of the subtitle file associated with the multimedia file according to the file information of the received multimedia file, and selects the subtitle file according to the file information of the found subtitle file and the degree of association with the file information of the multimedia file. And sending the file information of the selected subtitle file to the player client, so that after the player client receives the file information, the content of the selected subtitle file is directly downloaded from the subtitle server.
  • the file information of the multimedia file includes a hash value of the multimedia file; the file information of the subtitle file includes a hash value of the subtitle file, file information of the multimedia file, and a subtitle file.
  • the file information may also include other information, which is not limited by the embodiment of the present invention.
  • the file information of the multimedia file further includes feature information of the multimedia file; and the file information of the subtitle file further includes feature information of the subtitle file.
  • the method further includes:
  • the subtitle server searches for the file information of the subtitle file associated with the multimedia file according to the hash value of the multimedia file. If the subtitle file does not exist, the subtitle server searches for the feature information of the multimedia file in the subtitle server according to the feature information of the multimedia file. The subtitle file, and send the file information of the matching subtitle file to the player client.
  • the player client selects a subtitle file based on the file information of the received subtitle file, and downloads the content of the selected subtitle file from the subtitle server.
  • the user when downloading the subtitle file, the user sends the file information of the multimedia file to the subtitle server through the player client, searches for the associated subtitle file on the subtitle server, and according to the found subtitle file information and The degree of association of the multimedia file information selects the subtitle file, so that the user can download the required subtitle file in time and accurately, without the user searching for the downloaded subtitle file, thereby improving the user experience.
  • the subtitle file 1 saved by the local client is uploaded to the server; when the user B is in the player client, When the video file 1 is played, the subtitle file 1 is automatically obtained from the server as an example, and the method provided by the embodiment of the present invention is described. Referring to FIG. 3-1, the specific process is as follows:
  • Step 301 User A plays the video file with the subtitle file 1 in the player client. 1
  • the subtitle file 1 is automatically loaded into the player client and displayed synchronously with the video file 1.
  • the video file 1 played by the user A in the player client may be a video file of various forms such as a movie, a TV series, a FLASH, an MTV, and the like, which is not limited by the embodiment of the present invention.
  • the file format of the video file 1 it can be any format of MOV, RMVB, MID, MP4, RAM, RA, MPG, VCD, DAT, SVCD, CVD, DVD, etc., which is not limited in this embodiment of the present invention.
  • the subtitle file 1 attached to the video file 1 played by user A can be stored in user A.
  • the local client can also be stored in a specified path, such as a location in a webmail.
  • the player client automatically loads the subtitle file 1 stored in the local or specified path, so that the subtitle file 1 and the video file 1 are played synchronously.
  • the video file 1 and the subtitle file 1 have established an association relationship before playing, so that when the user A plays the video file 1, the player client finds the corresponding subtitle file 1 according to the association relationship of the video file 1, and automatically load.
  • the player client must support the format of the video file 1.
  • the player client can be any video playback device such as a PC or a mobile phone, which is not limited in this embodiment of the present invention.
  • Step 302 When the user A plays the video file 1 with the subtitle file 1 in the player client, if the user A agrees to share the subtitle file 1, the player client calculates the hash value of the video file 1 and the subtitle file 1 respectively.
  • the hash value is used, and the feature information of the video file 1 and the feature information of the subtitle file 1 are separately acquired.
  • the player client will calculate the hash value of the video file 1 and the hash of the subtitle file 1 according to a certain calculation rule, such as a segmentation calculation method or an overall calculation method.
  • a certain calculation rule such as a segmentation calculation method or an overall calculation method.
  • the value of the calculation rule used by the player client can be flexibly selected according to the actual situation, which is not limited by the embodiment of the present invention.
  • the hash value of the file is a value obtained by logical operation according to the data of the content of the file, and the hash values obtained by different files (even if they have the same file name) are different, so the hash value is each file.
  • Identity Files with different hash values are considered to be different files, and the contents of files with the same hash value are definitely the same (even if the file names are different), so the hash value has the function of file verification, which is equivalent to the verification of the file.
  • the code for example, can be used to check if the file download is correct.
  • a segmentation hash algorithm may be used when calculating a hash value for the video file 1, for example, calculating a starting 512 bytes, ending 512 bytes, and 512 bytes of the intermediate byte of the video file 1 respectively.
  • the hash value is then combined with the calculated three hash values to obtain a hash value of the video file 1.
  • the hash value can be calculated for the entire video file 1 by using the overall calculation method, which is not limited by the embodiment of the present invention.
  • the subtitle file 1 may adopt a method of directly calculating a hash value, and may also use a segmentation hash algorithm to calculate a hash value of the subtitle file, which is not limited in the embodiment of the present invention.
  • the hash value calculated by the segmentation calculation method and the overall calculation method for the same file is different.
  • the only premise of the hash value of each file is that the server side and the client calculate the hash value by using the same calculation method for the file.
  • the segmentation calculation method is generally used to calculate the hash value of the video file; and for the subtitle file with a small file size, the overall calculation is generally adopted. law.
  • the hash value of the multimedia file and the hash value of the subtitle file are calculated to realize unique identification of the multimedia file content and the subtitle file information, and other computing methods may be used to implement the multimedia file content and the subtitle file thereof.
  • the unique identifier of the information is not limited in this embodiment of the present invention.
  • the feature information of the video file 1 collected by the player client may include: one or more of a file name, a size, a play duration, and a format of the video file 1, for example, a video file collected by the player client.
  • the feature information of 1 includes: the file name of the video file 1 is "Kung Fu Panda", the size of the video file 1 is 4615612764 bytes, the playback time of the video file 1 is 3060 seconds, and the format of the video file 1 is the DVD format;
  • the feature information of the video file 1 can be adjusted according to the actual application.
  • the feature information of the subtitle file 1 may include one or more of information such as a file name, an extension, and a format of the subtitle file 1, for example: the feature information of the captured subtitle file 1 includes: a file name of the subtitle file 1 Kung Fu Panda. chs.srt", subtitle extension ".srt", subtitle file 1 format is TXT. It should be noted that the feature information of the subtitle file 1 can be adjusted according to the actual application.
  • the player client can also calculate only the hash value of the video file 1 and the hash value of the subtitle file 1, without collecting the feature information of the video file 1 and the feature information of the subtitle file 1.
  • Step 303 The player client of the user ⁇ uses the hash value of the video file 1 and the feature information of the video file 1 as the file information of the video file 1, the hash value of the subtitle file 1, and the feature information of the subtitle file 1 as the subtitle file.
  • the file information of 1 is uploaded to the server.
  • the uploading timing can be adjusted. For example, after the user loads a subtitle file, the user can watch the subtitle file for a short period of time, and the subtitle file needs to be modified.
  • Reporting timing Set set the lag for a while before uploading to the server, for example, can be set in the video file
  • the script file 1 After X minutes of play, or if the video file 1 plays a certain ratio such as ⁇ %, then the script file 1 is considered correct, and the subtitle file 1 is uploaded to the server. Among them, the value of X or Y can be adjusted according to the actual calculation and actual operation.
  • the player client may encrypt the hash value of the uploaded video file 1 and the hash value of the subtitle file 1 and the feature information of the video file 1 and the feature information of the subtitle file 1.
  • the player client can compress the uploaded information and send it to the server.
  • the compression method can be flexibly selected, for example, compression software is used for compression;
  • the player client can separately encrypt and compress the uploaded information and then send the information to the server, and the encryption algorithm can flexibly select, for example, DES, RSA, etc., in the embodiment of the present invention. There is no limit to the comparison.
  • the player client may also upload the hash value of the subtitle file 1 and the feature information of the subtitle file 1 as the file information of the subtitle file 1 to the server, and after performing step 304, the hash value of the video file 1 And the feature information of the video file 1 is uploaded to the server as the file information of the video file 1.
  • the server in the embodiment of the present invention may be a dedicated subtitle server, or may be any other server, which is not limited in the embodiment of the present invention.
  • the hash value of the video file 1 is used as the video file 1 at this time.
  • the file information and the hash value of the subtitle file 1 are uploaded to the server as the file information of the subtitle file 1, without uploading the feature information of the video file 1 and the feature information of the subtitle file 1.
  • Step 304 After receiving the file information of the video file 1 and the file information of the subtitle file 1, the server checks whether the content of the subtitle file 1 already exists in the server according to the hash value of the subtitle file 1, and if yes, step 305 is performed; Otherwise, the file information of the subtitle file 1 is added, and step 306 is performed.
  • the server After the server receives the file information of the video file 1 and the file information of the subtitle file 1, the server first searches for the subtitle in the server according to the hash value of the subtitle file 1.
  • the content of the file 1 because the corresponding hash value of the subtitle file of the same content is unique, it is possible to accurately find out whether the content of the subtitle file 1 already exists in the server according to the hash value of the subtitle file 1, and if so, If the content of the subtitle file 1 is present, step 305 is performed; otherwise, the content of the subtitle file 1 is not found, the file information of the subtitle file 1 is added, and step 306 is performed; wherein the file information of the subtitle file 1 includes: the subtitle file 1 The hash value and the feature information of the subtitle file 1.
  • Step 305 The server checks whether the file information of the video file 1 exists in the server according to the hash value of the video file 1. If yes, the degree of association between the file information of the video file 1 and the file information of the subtitle file 1 is accumulated, and step 307 is performed; otherwise, The file information of the video file 1 is added, and the association relationship between the file information of the video file 1 and the file information of the subtitle file 1 is established, and step 307 is performed.
  • the server searches for the file information of the video file 1 in the server according to the hash value of the received video file 1.
  • the file information of the video file 1 includes the video file 1. Hash value and feature information.
  • the file information of the video file 1 may be found in the server according to the hash value of the video file 1, and if so, the server finds the video file 1
  • the file information indicates that the file information of the video file 1 has been added to the server. Since the server has determined that the subtitle file 1 exists, the association between the file information of the video file 1 and the file information of the subtitle file 1 has been established in the server.
  • the degree of association between the file information of the video file 1 and the file information of the subtitle file 1 is directly accumulated, for example, the degree of association between the file information of the video file 1 and the file information of the subtitle file 1 is 4, and the degree of association may be increased at this time. 5, of course, can be any number greater than 4.
  • the association information between the file information of the video file 1 and the file information of the subtitle file 1 includes a degree of association and an association relationship, and the association relationship indicates that there is an association between the two, and the degree of association indicates the degree of association between the video file and the subtitle file, and the degree of association is higher.
  • the degree of association between the file information of the video file 1 and the file information of the subtitle file 1 is 7, and the degree of association between the file information of the video file 1 and the file information of the subtitle file 2 is 4, and the file information of the general video file 1 is
  • the subtitle file 1 should be downloaded and uploaded more frequently and with higher quality than the subtitle file 2. If the server does not find the file information of the video file 1, add the file information of the video file 1, and establish the association relationship between the file information of the video file 1 and the file information of the subtitle file 1, and set the initial value of the association degree, generally 1.
  • Step 306 The server checks whether the file information of the video file 1 exists in the server according to the hash value of the video file 1, and if so, establishes the association relationship between the file information of the video file 1 and the file information of the subtitle file 1, and performs step 308; Otherwise, the file information of the video file 1 is added, and the association relationship between the file information of the video file 1 and the file information of the subtitle file 1 is established, and step 308 is performed.
  • the server searches for the file information of the video file 1 in the server according to the hash value of the received video file 1, wherein the file information of the video file 1 includes the video file 1 Hash value and feature information.
  • the file information of the video file 1 already exists in the server but the subtitle file 1 does not exist, it indicates that the other user has added the file information of the video file 1 to the server, but the subtitle file 1 is newly added, so the video file 1 is created.
  • the relationship between the file information and the file information of the subtitle file 1 is set, and an initial value is set for the degree of association, which is generally 1.
  • Step 307 The server returns a response to the player client, and notifies the player client that the content of the subtitle file 1 already exists in the server. After receiving the response, the player client knows that the content of the subtitle file 1 already exists in the server, and the subtitle file is not uploaded. 1.
  • Step 308 The server returns a response to the player client, notifying the player client that the content of the subtitle file 1 does not exist in the server, and after receiving the response, the player client uploads the subtitle file 1.
  • step 304 after receiving the file information of the video file 1 and the file information of the subtitle file 1, the server first checks whether the content of the subtitle file 1 already exists in the server according to the hash value of the subtitle file 1, and if so, After step 307 is performed, the player client is notified that the subtitle file 1 already exists in the server, and then step 305 is performed; otherwise, the subtitle is added. After the file information of the file 1, the step 308 is executed to notify the player client that the subtitle file 1 does not exist in the server, and the player client uploads the subtitle file 1 , and then step 306 is performed.
  • the above steps 301 to 308 are a process in which the user A uploads the subtitle file 1 attached to the video file 1 played by the local player client to the server; after the user A uploads the video file 1, the user B is in the local player client.
  • the player client of user B will download the subtitle file corresponding to the video file 1 from the server, as shown in Figure 3-2.
  • the specific implementation process is as follows:
  • Step 309 The player client of the user B locally calculates the hash value of the video file 1 and collects the feature information of the video file 1, and uses the hash value of the video file 1 and the feature information of the video file 1 as the video file 1.
  • the file information is sent to the server.
  • the player client of the user B can also calculate only the hash value of the video file 1 and send it to the server without collecting the feature information of the video file 1.
  • Step 310 After receiving the file information of the video file 1, the server performs an accurate query according to the hash value of the video file 1 to find whether there is a subtitle file associated with the video file 1. If yes, the subtitle file to be found is found. The file information is returned to the player client of user B, and step 311 is performed; otherwise, step 312 is performed.
  • the server After receiving the file information of the video file 1, the server performs an accurate query according to the hash value of the video file 1 to find whether there is a subtitle file associated with the video file 1. If yes, the found file is associated with the video file 1. All the subtitle files are returned to the player client of the user B; or, in all the subtitle files found, the file information of the N subtitle files with the greater degree of association is selected and sent to the player client of the user B, for example, selecting all The file information of the top five subtitle files in the subtitle file is returned to the player client of the user B.
  • the server may also select the file information of one of the subtitle files to be returned to the player client of user B according to the preset selection rule in all the subtitle files found to be associated with the video file 1.
  • the preset selection rule may be that the player client of the user B is sent according to the size of the attention degree, and the subtitle file with a large degree of attention is selected, and the subtitle file may be selected and returned to the user B according to other parameters such as a language version. Player client.
  • Step 311 User B's player client receives the subtitle associated with video file 1. After the file information of the file, the subtitle file is automatically selected according to the degree of association, and the content of the selected subtitle file is downloaded from the server.
  • the player client of the user B can also present the file information of the subtitle file associated with the video file 1 to the user B, and the user B manually selects the subtitle file, and downloads the subtitle file content selected by the user B from the server.
  • Step 312 The server performs a fuzzy query in the server according to the feature information of the video file 1, searches for the matching subtitle file, and returns the found file information of the matched subtitle file to the player client of the user B, and performs the steps. 313.
  • the server When the server performs an accurate query according to the hash value of the video file 1 and does not find the subtitle file associated with the video file 1, the fuzzy query is performed in the database of the server according to the feature information of the video file 1, and the matched subtitle file is searched. And returning the file information of the matched subtitle file to the player client; when the server is fuzzy, the server can match according to the file name, or the file size matches, or the file format matches, or the file name, file size, and The file format is matched at the same time.
  • the difference between the fuzzy query in this step and the precise query in step 310 is that the exact query is based on the hash value of the video file 1. Since the hash value of the video file 1 is unique, the search is necessarily The subtitle file of the video file 1, for example: According to the hash value of the video file 1, the subtitle file 1 and the subtitle file 2 are found. The possible versions may differ between the subtitle file 1 and the subtitle file 2, but the video file may be different.
  • the search result is not necessarily the subtitle file of video file 1, for example: according to the file name, file format and The file size finds the subtitle file 3 and the subtitle file 4, but it is possible that the subtitle file 3 and the subtitle file 4 are not necessarily the subtitle files of the video file 1, except that the feature information is satisfied.
  • Step 313 The player client of the user B receives the file information of the subtitle file matching the video file 1, selects the subtitle file, and downloads the selected subtitle file inner valley from the server.
  • the player client of the user B can also present the file information of the subtitle file matched with the video file 1 to the user B, and the user B manually selects the subtitle. File, and download the content of the subtitle file selected by User B from the server.
  • the subtitle server in addition to collecting user-uploaded video file information and corresponding subtitle files, the subtitle server has a large number of sources of subtitle libraries, including manual collation and training of subtitle libraries, media information libraries and relevance, etc.
  • the subtitle server is maintained. As the subtitle server is continuously updated, the subtitle file with a shorter time can be preferentially selected or when the subtitle file is updated, the subtitle file with the same content can be replaced with the subtitle file with the later update.
  • the user when uploading a subtitle file, the user sends the file information of the multimedia file and the file information of the subtitle file to the subtitle server through the player client, and compares with the corresponding file information on the subtitle server to determine whether The content of the subtitle file exists, and the subtitle file is uploaded according to the judgment result, and the subtitle server determines the association between the file information of the multimedia file and the file information of the subtitle file, thereby ensuring that the subtitle file uploaded by the user is not repeated, thereby saving server resources;
  • the subtitle file is used, the file information of the multimedia file is sent to the subtitle server through the player client, the associated subtitle file is searched on the subtitle server, and the subtitle file is selected according to the degree of association between the found subtitle file information and the multimedia file, so that the user It can download the required subtitle files in time and accurately, without requiring users to search and download subtitle files, which improves the user experience.
  • the method for automatically receiving the subtitle file 1 from the server is used as an example to describe the method provided by the embodiment of the present invention. Referring to FIG. 4, the specific process is as follows:
  • Step 401 User A plays the video file with the subtitle file 1 in the player client. 1
  • the subtitle file 1 is automatically loaded into the player client and displayed synchronously with the video file 1.
  • step 301 in Embodiment 2 For the specific implementation process, refer to step 301 in Embodiment 2.
  • Step 402 When the user A plays the video file 1 with the subtitle file 1 in the player client, if the user A agrees to share the subtitle file 1, the player client calculates the hash value of the video file 1 and the subtitle file 1 respectively. Hash value, and separately capture the video file 1 Characteristic information of the information and subtitle file 1.
  • Step 403 The player client of the user A uses the hash value of the subtitle file 1 and the feature information of the subtitle file 1 as the file information of the subtitle file 1, the hash value of the video file 1, and the feature information of the video file 1 as the video file.
  • the file information of 1 is uploaded to the server.
  • the uploading time can be adjusted. For details, refer to step 303.
  • the player client may encrypt the uploaded information and then send the information to the server, for example, an encryption algorithm such as DES or RSA may be used, which is not limited in the embodiment of the present invention; Transmission, improve transmission efficiency, the player client can compress the uploaded information and send it to the server.
  • the compression software can be used to compress the information and then send it to the server; of course, in order to enhance the security of the user information and improve the transmission. Efficiency, the player client can encrypt and compress the uploaded information and then send it to the server.
  • Step 404 The server checks whether the file information of the video file 1 exists in the server according to the hash value of the video file 1. If yes, step 405 is performed; otherwise, the file information of the video file 1 is added, and step 406 is performed.
  • Step 405 The server checks whether the content of the subtitle file 1 already exists in the server according to the hash value of the subtitle file 1. If yes, the degree of association between the file information of the video file 1 and the file information of the subtitle file 1 is accumulated, and step 407 is performed. Otherwise, the file information of the subtitle file 1 is added, and the association relationship between the file information of the video file 1 and the file information of the subtitle file 1 is established, and step 408 is performed.
  • Step 406 The server checks whether the content of the subtitle file 1 already exists in the server according to the hash value of the subtitle file 1. If yes, establish the degree of association between the file information of the video file 1 and the file information of the subtitle file 1, and step 407 is performed. Otherwise, the file information of the subtitle file 1 is added, and the association relationship between the file information of the video file 1 and the file information of the subtitle file 1 is established, and step 408 is performed.
  • Step 407 The server returns a response to the player client, such as sending a notification message.
  • the instruction is not limited to the specific notification mode, and the player client is notified that the content of the subtitle file 1 already exists in the server. After receiving the response, the player client knows that the content of the subtitle file 1 already exists in the server.
  • Step 408 The server returns a response to the player client, notifying the player client that the content of the subtitle file 1 does not exist in the server, and after receiving the response, the player client uploads the subtitle file 1.
  • the above steps 401-408 are a process in which the user A uploads the subtitle file 1 attached to the video file 1 played by the local player client to the server.
  • the difference from the second embodiment is that the server first determines whether the file information of the video file 1 exists. , and then judge whether the content of the subtitle file 1 exists.
  • steps 309-313 of Embodiment 2 refer to steps 309-313 of Embodiment 2. The process is the same and will not be described again.
  • An embodiment of the present invention provides a system for uploading a subtitle file.
  • the system includes: a player client 501 and a subtitle server 502.
  • the player client 501 is configured to send the file information of the multimedia file and the file information of the subtitle file corresponding to the multimedia file to the subtitle server 502; and determine, according to the status message sent by the subtitle server 502, that the subtitle file does not exist in the subtitle server , upload subtitle files;
  • a subtitle server 502 configured to determine, according to the file information of the subtitle file and the file information of the multimedia file, the association relationship and the degree of association between the file information of the multimedia file and the file information of the subtitle file; determining whether the subtitle server has the a subtitle file, and a status message indicating whether the subtitle file exists is sent to the player client 501.
  • the subtitle server 502 is specifically configured to check whether the content of the subtitle file exists in the subtitle server 502 and whether the file information of the multimedia file exists in the subtitle server 502 according to the file information of the subtitle file and the file information of the multimedia file.
  • the subtitle server 502 adds the file information of the subtitle file to create a multimedia file.
  • the file information is associated with the file information of the subtitle file, and a status message that the subtitle file does not exist is sent to the player client 501.
  • the subtitle server 502 adds the file information of the subtitle file and the file information of the multimedia file, and establishes the file information of the multimedia file and the file information of the subtitle file. The relationship is associated, and a status message that the subtitle file does not exist is sent to the player client 501.
  • the degree of association of the file information of the multimedia file and the file information of the subtitle file is accumulated, and a status message of the existence of the subtitle file is transmitted to the player client 501.
  • the file information of the multimedia file is added, and the association relationship between the file information of the multimedia file and the file information of the subtitle file is established, and the player client is connected to the player client.
  • 501 sends a status message that the subtitle file exists.
  • the player client 501 is specifically configured to receive a status message of the subtitle file sent by the subtitle server 502. If the status message of the subtitle file is received, the subtitle file is not uploaded; if the status message that the subtitle file does not exist is received, Upload a subtitle file.
  • the file information of the multimedia file includes a hash value of the multimedia file; and the file information of the subtitle file includes a hash value of the subtitle file.
  • the file information of the multimedia file further includes feature information of the multimedia file; and the file information of the subtitle file further includes feature information of the subtitle file.
  • the user when uploading a subtitle file, the user sends the file information of the multimedia file and the file information of the subtitle file to the subtitle server through the player client, and compares with the corresponding file information on the subtitle server to determine Whether the content of the subtitle file exists, uploading the subtitle file according to the judgment result, and determining the association between the file information of the multimedia file and the file information of the subtitle file in the subtitle server, ensuring that the subtitle file uploaded by the user is not repeated, thereby saving server resources.
  • An embodiment of the present invention provides a system for downloading a subtitle file.
  • the system includes: a player client 601 and a subtitle server 602.
  • the player client 601 is configured to send the file information of the multimedia file to the subtitle server 602; and download the subtitle from the subtitle server 602 according to the file information of the subtitle file sent by the subtitle server 602 and the degree of association with the file information of the multimedia file.
  • the content of the file; the subtitle server 602, configured to search for file information of the subtitle file associated with the multimedia file according to the file information of the received multimedia file, and find the file information of the subtitle file and the file information of the subtitle file and the file information of the multimedia file.
  • the degree of association is sent to the player client 601.
  • the player client 601 is specifically configured to receive the file information of the subtitle file sent by the subtitle server 602 and the degree of association with the file information of the multimedia file, select a subtitle file according to the degree of association, and download the selected subtitle from the subtitle server 602. The content of the file.
  • the subtitle server 602 is specifically configured to: according to the file information of the received multimedia file, search for file information of the subtitle file associated with the multimedia file, and select subtitle according to the file information of the subtitle file found and the degree of association with the file information of the multimedia file.
  • the file, and the file information of the selected subtitle file is sent to the player client 601, so that after the player client 601 receives the file information of the selected subtitle file, the content of the selected subtitle file is directly downloaded from the subtitle server 602.
  • the file information of the multimedia file includes a hash value of the multimedia file, and may further include feature information of the multimedia file;
  • the file information of the subtitle file includes a hash value of the subtitle file, and may further include feature information of the subtitle file.
  • the caption server 602 is further configured to: if the file information of the caption file associated with the multimedia file is not found according to the hash value of the multimedia file, the caption server 602 searches for the matching in the caption server 602 according to the feature information of the multimedia file.
  • the subtitle file, and the file information of the matched subtitle file is sent to the player client 601.
  • the user when downloading the subtitle file, the user sends the file information of the multimedia file to the subtitle server through the player client, searches for the associated subtitle file on the subtitle server, and according to the found subtitle file information and The degree of association of the multimedia file information selects the subtitle file, so that the user can download the required subtitle file in time and accurately, without the user searching for the downloaded subtitle file, thereby improving the user experience.
  • An embodiment of the present invention provides a player client device, as shown in FIG. 7, the player Client devices include:
  • the first sending module 701 is configured to separately send the file information of the multimedia file and the file information of the subtitle file corresponding to the multimedia file to the subtitle server.
  • the uploading module 702 is configured to upload a subtitle file according to the status message of the subtitle file sent by the subtitle server.
  • the uploading module 702 includes:
  • a first receiving unit configured to receive a status message of the subtitle file sent by the subtitle server; and an uploading unit, configured to not upload the subtitle file when the first receiving unit receives the status message of the subtitle file, and receive the subtitle file at the first receiving unit When the subtitle file does not exist in the status message, the subtitle file is uploaded.
  • the user when uploading the subtitle file, the user sends the file information of the multimedia file and the file information of the subtitle file to the subtitle server through the player client, and the corresponding file information on the subtitle server.
  • the subtitle file is uploaded according to the judgment result of the subtitle server, which ensures that the subtitle file uploaded by the user is not repeated, thereby saving server resources.
  • an embodiment of the present invention provides a caption server device.
  • the caption server device includes:
  • the determining module 801 is configured to determine, according to the file information of the subtitle file sent by the player client and the file information of the multimedia file, the association relationship and the degree of association between the file information of the multimedia file and the file information of the subtitle file, and determine the subtitle server Whether the subtitle file exists.
  • the second sending module 802 is configured to send a status message of whether the subtitle file exists to the player client.
  • the determining module 801 specifically includes:
  • the query unit is configured to query, according to the file information of the subtitle file and the file information of the multimedia file, whether the content of the subtitle file exists in the subtitle server and whether the file information of the multimedia file exists.
  • a first processing unit configured to: when the content of the subtitle file does not exist in the subtitle server, but exists When the file information of the multimedia file is added, the file information of the subtitle file is added, and the association relationship between the file information of the multimedia file and the file information of the subtitle file is established.
  • a second processing unit configured to: when the content of the subtitle file does not exist in the subtitle server and the file information of the multimedia file does not exist, add the file information of the subtitle file and the file information of the multimedia file, and establish the file information and the subtitle file of the multimedia file. The association of file information.
  • a third processing unit configured to accumulate the degree of association between the file information of the multimedia file and the file information of the subtitle file when the content of the subtitle file exists in the subtitle server and the file information of the multimedia file exists.
  • a fourth processing unit configured to add file information of the multimedia file when the content of the subtitle file exists in the subtitle server but does not exist, and establish an association relationship between the file information of the multimedia file and the file information of the subtitle file.
  • the subtitle server device when the user uploads the subtitle file, receives the file information of the multimedia file and the file information of the subtitle file sent by the player client, determines whether the content of the subtitle file exists, and plays the content according to the judgment result.
  • the client sends a response message, so that the player client can upload the subtitle file when the subtitle file does not exist in the subtitle server device, and the subtitle file is not uploaded when the subtitle file exists in the subtitle server device, thereby ensuring the user.
  • Uploaded subtitle files are not duplicated, saving server resources.
  • the embodiment of the present invention provides a player client device.
  • the player client device includes:
  • the third sending module 901 is configured to send the file information of the multimedia file to the caption server.
  • the downloading module 902 is configured to download the content of the subtitle file from the subtitle server according to the file information of the subtitle file of the received subtitle server and the degree of association with the file information of the multimedia file.
  • the downloading module 902 includes:
  • a second receiving unit configured to receive file information of a subtitle file sent by the subtitle server and The degree of association between the file information of the subtitle file and the file information of the multimedia file.
  • the first selecting unit is configured to select a subtitle file according to the degree of association between the file information of the subtitle file and the file information of the multimedia file, and download the content of the selected subtitle file from the subtitle server.
  • the user when downloading the subtitle file, the user sends the file information of the multimedia file to the subtitle server through the player client, searches for the associated subtitle file on the subtitle server, and according to the found The degree of association between the subtitle file information and the multimedia file information selects the subtitle file, so that the user can download the required subtitle file in time and accurately, without the user searching for the downloaded subtitle file, thereby improving the user experience.
  • the caption server device includes:
  • the first searching module 1001 is configured to search for file information of the subtitle file associated with the multimedia file according to the file information of the multimedia file sent by the player client.
  • the fourth sending module 1002 is configured to send the file information of the found subtitle file and the degree of association with the file information of the multimedia file to the player client.
  • the first search module 1001 specifically includes:
  • the searching unit is configured to search for file information of the subtitle file associated with the multimedia file according to the file information of the multimedia file sent by the received player client.
  • a second selecting unit configured to select a subtitle file according to the file information of the found subtitle file and the degree of association with the file information of the multimedia file, and send the file information of the selected subtitle file to the player client, so that the player After receiving the file information of the selected subtitle file, the client directly downloads the content of the selected subtitle file from the subtitle server.
  • the device also includes:
  • a second searching module configured to: when searching for file information of the subtitle file associated with the multimedia file according to the hash value of the multimedia file, if there is no subtitle file, searching for the media file in the subtitle server according to the feature information of the multimedia file The subtitle file whose feature information matches, and sends the file information of the subtitle file to be sent to the player client, so that the player client selects the subtitle file according to the file information of the received subtitle file, and selects the subtitle file from the subtitle file.
  • the content of the selected subtitle file is downloaded in the server.
  • the subtitle server device when downloading the subtitle file, the user receives the file information of the multimedia file, searches for the subtitle file associated with the multimedia file, and associates the associated subtitle file information with the multimedia file information, and sends the information to the player.
  • the client allows users to download the required subtitle files in a timely and accurate manner, without requiring users to search and download subtitle files, which improves the user experience.
  • receiving in the embodiment of the present invention may be understood as actively acquiring information from other modules or receiving information transmitted by other modules.
  • modules in the apparatus in the embodiments may be distributed in the apparatus of the embodiment according to the embodiment, or may be correspondingly changed in one or more apparatuses different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
  • serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
  • Some of the steps in the embodiment of the present invention may be implemented by using software, and the corresponding software program may be stored in a readable storage medium, such as an optical disk or a hard disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种上传和下载字幕文件的方法、系统和设备,属于通信领域。方法包括:上传多媒体文件时,播放器客户端将多媒体文件的文件信息及其字幕文件的文件信息发送给字幕服务器;字幕服务器根据字幕文件的文件信息,检查是否存在字幕文件的内容,如果不存在,通知播放器客户端上传字幕文件;下载多媒体文件时,字幕服务器根据播放器客户端发送的多媒体文件的哈希值精确查找关联的字幕文件,如果没有,则根据多媒体文件的特征信息粗略查找字幕文件。本发明实施例提供的方案,用户在播放器客户端中实现自动上传和下载字幕文件,无需用户搜索下载字幕文件,提高了用户的使用体验,节省了服务器资源。

Description

一种上传和下载字幕文件的方法、 系统和设备
技术领域 本发明涉及通信领域, 特别涉及一种上传和下载字幕文件的方法、 系统和设备。 发明背景 随着通信技术的发展, 多媒体文件由于具有传输储存方便、 保真度 高等优点而受到用户的喜爱, 已经在用户的工作、 学习和生活中得到广 泛应用。
多媒体文件类型众多, 一般分声音、 图像及视频等几大类。 由于不 同类型的多媒体文件的制作、播放原理不相同, 因此需要在客户端,如电 脑、 手机中安装相应的播放器客户端。 其中, 播放器客户端播放多媒体 文件时, 除了播放多媒体文件的内容外, 一般还需要播放多媒体文件对 应的字幕文件。
主流的播放器客户端提供了自动加载字幕功能, 当用户播放多媒体 文件时, 自动加载本地存储的或在指定路径的字幕文件, 如果用户所播 放的多媒体文件本地没有字幕文件, 则需要下载字幕文件。
目前, 下载字幕文件的方式是, 用户手动地从网络中或从其他客户 端下载获取字幕文件; 如果用户播放多媒体文件时, 想把本地的字幕文 件上传给服务器, 也需要用户手动将本地的字幕文件发送给服务器供其 他用户使用。
发明人在实现本发明时经过分析和研究后, 发现现有技术至少存在 以下的缺点和不足:
现有的用户手动下载方式操作复杂, 且无法立刻实现用户字幕文件 的即时加载, 降低用户的使用体验; 用户将多媒体文件附带的字幕文件 上传给 务器时, 由于同一个多媒体文件的字幕文件往往相同, 如果多 个用户上传字幕文件, 会出现重复上传相同字幕文件的情况, 占用很大 的内存空间, 浪费服务器资源。 发明内容 为了实现用户播放多媒体文件时能够上传和下载相应的字幕文件, 提高用户的使用体验, 本发明实施例提供了一种上传和下载字幕文件的 方法、 系统和设备。 所述技术方案如下:
本发明实施例提供了一种上传字幕文件的方法, 所述方法包括: 播放器客户端将多媒体文件的文件信息和所述多媒体文件对应的 字幕文件的文件信息发送给字幕服务器;
所述字幕服务器根据所述字幕文件的文件信息和所述多媒体文件 的文件信息, 确定所述多媒体文件的文件信息和所述字幕文件的文件信 息的关联关系和关联度; 确定所述字幕服务器中是否存在所述字幕文 件, 并将是否存在所述字幕文件的状态消息发给所述播放器客户端; 所述播放器客户端根据收到的所述状态消息确定出所述字幕服务 器中不存在所述字幕文件时, 上传所述字幕文件。
本发明实施例提供了一种下载字幕文件的方法, 所述方法包括: 播放器客户端将多媒体文件的文件信息发送给字幕服务器; 所述字幕服务器根据接收的所述多媒体文件的文件信息, 查找与所 述多媒体文件关联的字幕文件的文件信息, 并将查找到的字幕文件的文 件信息及其与所述多媒体文件的文件信息的关联度发送给所述播放器 客户端;
所述播放器客户端根据接收的所述字幕文件的文件信息及其与所 述多媒体文件的文件信息的关联度, 从所述字幕服务器中下载所述字幕 文件的内容。
本发明实施例提供了一种上传字幕文件的系统, 所述系统包括: 播 放器客户端和字幕服务器,
所述播放器客户端, 用于将多媒体文件的文件信息和所述多媒体文 件对应的字幕文件的文件信息发送给字幕服务器; 根据所述字幕服务器 发送的状态消息确定出字幕服务器中不存在所述字幕文件时, 上传所述 字幕文件;
所述字幕服务器, 用于根据所述字幕文件的文件信息和所述多媒体 文件的文件信息, 确定所述多媒体文件的文件信息和所述字幕文件的文 件信息的关联关系和关联度; 确定所述字幕服务器中是否存在所述字幕 文件, 并将是否存在所述字幕文件的状态消息发给所述播放器客户端。
本发明实施例提供了一种下载字幕文件的系统, 所述系统包括: 播 放器客户端和字幕服务器,
所述播放器客户端, 用于将多媒体文件的文件信息发送给字幕服务 器; 根据所述字幕服务器发送的字幕文件的文件信息及其与所述多媒体 文件的文件信息的关联度, 从所述字幕服务器中下载字幕文件的内容; 所述字幕服务器, 用于根据接收的所述多媒体文件的文件信息, 查 找与所述多媒体文件关联的字幕文件的文件信息, 并将查找到的字幕文 件的文件信息及其与所述多媒体文件的文件信息的关联度发送给所述 播放器客户端。
本发明实施例提供了一种播放器客户端设备, 所述播放器客户端设 备包括:
第一发送模块, 用于将多媒体文件的文件信息和所述多媒体文件对 应的字幕文件的文件信息发送给字幕服务器;
上传模块, 用于根据所述字幕服务器发来的字幕文件的状态消息确 定出该字幕服务器中不存在所述字幕文件时, 上传所述字幕文件。
本发明实施例提供了一种字幕服务器设备, 包括:
确定模块, 用于根据播放器客户端发送的字幕文件的文件信息和所 述多媒体文件的文件信息, 确定所述多媒体文件的文件信息和所述字幕 文件的文件信息的关联关系和关联度, 确定所述字幕服务器中是否存在 所述字幕文件;
第二发送模块, 用于将是否存在所述字幕文件的状态消息发送给所 述播放器客户端。
本发明实施例提供了一种播放器客户端设备, 所述播放器客户端设 备包括: 第三发送模块, 用于将多媒体文件的文件信息发送给字幕服务器; 下载模块, 用于根据所述字幕服务器发来的字幕文件的文件信息及 其与所述多媒体文件的文件信息的关联度, 从所述字幕服务器中下载所 述字幕文件的内容。
本发明实施例提供了一种字幕服务器设备, 包括:
第一查找模块, 用于根据播放器客户端发送的多媒体文件的文件信 息, 查找与所述多媒体文件关联的字幕文件的文件信息;
第四发送模块 , 用于将查找到的字幕文件的文件信息及其与所述多 媒体文件的文件信息的关联度发送给所述播放器客户端。
本发明实施例提供的技术方案的有益效果是:
本发明实施例提供的方案, 用户在上传字幕文件时, 通过播放器客 户端将多媒体文件信息和字幕文件信息发送给字幕服务器, 与字幕服务 器上对应的文件信息进行比较, 判断是否存在所述字幕文件, 在不存在 所述字幕文件时上传所述字幕文件, 保证了用户上传的字幕文件不重 复, 节省了服务器资源; 用户在下载字幕文件时, 通过播放器客户端将 多媒体文件的文件信息发送给字幕服务器, 在字幕服务器上查找关联的 字幕文件, 并根据查找到的字幕文件信息与多媒体文件的关联度选择字 幕文件, 使得用户能及时准确的下载所需的字幕文件, 无需用户搜索下 载字幕文件, 提高了用户的使用体验。 附图简要说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见 地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技 术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获 得其他的附图。
图 1是本发明实施例 1提供的上传方法流程示意图; 图 2是本发明实施例 2提供的下载方法流程示意图; 图 3-1是本发明实施例 3提供的上传方法流程示意图;
图 3-2是本发明实施例 3提供的下载方法流程示意图;
图 4是本发明实施例 4提供的上传和下载方法流程示意图; 图 5是本发明实施例 5提供的上传系统结构示意图;
图 6是本发明实施例 6提供的下载系统结构示意图;
图 7是本发明实施例 7提供的播放器客户端结构示意图; 图 8是本发明实施例 8提供的字幕服务器结构示意图;
图 9是本发明实施例 9提供的播放器客户端结构示意图; 图 10是本发明实施例 10提供的字幕服务器结构示意图。 实施本发明的方式 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对 本发明实施方式作进一步地详细描述。
实施例 1
为了实现用户在播放多媒体文件时能够自动上传相应的字幕文件, 本发明实施例提供了一种上传字幕文件的方法, 字幕文件为多媒体文件 的字幕文件, 参见图 1 , 该方法内容如下:
步骤 101 : 播放器客户端将多媒体文件的文件信息和多媒体文件对 应的字幕文件的文件信息发送给字幕服务器。
步骤 102: 字幕服务器根据字幕文件的文件信息和多媒体文件的文 件信息, 确定多媒体文件的文件信息和字幕文件的文件信息的关联关系 以及多媒体文件的文件信息和字幕文件的文件信息的关联度; 确定所述 字幕服务器中是否存在所述字幕文件, 并将是否存在所述字幕文件的状 态消息发给所述播放器客户端。
步骤 103: 播放器客户端根据收到的字幕文件的状态消息, 上传字 幕文件。
其中, 字幕服务器分别根据字幕文件的文件信息和多媒体文件的文 件信息, 查询字幕服务器中是否存在字幕文件的内容及其是否存在多媒 体文件的文件信息。
当字幕服务器中不存在字幕文件的内容但存在多媒体文件的文件 信息时, 添加字幕文件的文件信息, 建立多媒体文件的文件信息和字幕 文件的文件信息的关联关系, 并向播放器客户端发送字幕文件不存在的 状态消息。
当字幕服务器中不存在字幕文件的内容且不存在多媒体文件的文 件信息时, 添加字幕文件的文件信息和多媒体文件的文件信息, 建立多 媒体文件的文件信息和字幕文件的文件信息的关联关系, 并向播放器客 户端发送字幕文件不存在的状态消息。
当字幕服务器中存在字幕文件的内容且存在多媒体文件的文件信 息时, 累加多媒体文件的文件信息和字幕文件的文件信息的关联度, 并 向播放器客户端发送字幕文件存在的状态消息, 状态信息包括字幕文件 是否存在的信息。
一般在初始建立关联关系时, 可以设置初始关联度为 1 , 当查找到 字幕服务器中存在字幕文件的内容且存在多媒体文件的文件信息, 累加 它们的关联度, 对于关联度的范围可以根据实际情况灵活设置, 例如可 以设置为 1至 20。 即当初始建立关联关系时, 设置初始关联度为 1 , 每 次查找到存在字幕文件的内容且存在多媒体文件的文件信息, 累加一次 关联度, 当累加到 20 时即使再查找到存在字幕文件的内容且存在多媒 体文件的文件信息也不再增加关联度。
当字幕服务器中存在字幕文件的内容但不存在多媒体文件的文件 信息时, 添加多媒体文件的文件信息, 并建立多媒体文件的文件信息和 字幕文件的文件信息的关联关系, 并向播放器客户端发送字幕文件存在 的状态消息。
其中, 如果播放器客户端接收到字幕文件存在的状态消息, 则不上 传字幕文件;如果接收到字幕文件不存在的状态消息,则上传字幕文件。
其中, 多媒体文件的文件信息包括多媒体文件的哈希值; 字幕文件 的文件信息包括字幕文件的哈希值, 多媒体文件的文件信息和字幕文件 的文件信息还可能包括其他信息, 本发明实施例对此不作限制。 进一步地, 多媒体文件的文件信息还包括多媒体文件的特征信息; 字幕文件的文件信息还包括字幕文件的特征信息。
本发明实施例提供的方法, 用户在上传字幕文件时, 通过播放器客 户端将多媒体文件的文件信息和字幕文件的文件信息发送给字幕服务 器, 与字幕服务器上的对应的文件信息进行比较, 判断是否存在字幕文 件的内容, 根据判断结果上传字幕文件, 并在字幕服务器确定多媒体文 件的文件信息与字幕文件的文件信息的关联, 保证了用户上传的字幕文 件不重复, 节省了服务器资源。
实施例 2
本发明实施例提供了一种下载字幕文件的方法, 参见图 2, 该方法 包括:
步骤 201 : 播放器客户端将多媒体文件的文件信息发送给字幕服务 器。
步骤 202: 字幕服务器根据接收的多媒体文件的文件信息, 查找与 多媒体文件关联的字幕文件的文件信息, 并将查找到的字幕文件的文件 信息及其查找到的字幕文件的文件信息与多媒体文件的文件信息的关 联度发送给播放器客户端。
步骤 203: 播放器客户端根据接收的字幕文件的文件信息及其与多 媒体文件的文件信息的关联度, 从字幕服务器中下载字幕文件的内容。
其中, 播放器客户端接收字幕文件的文件信息及所述字幕文件的文 件信息与多媒体文件的文件信息的关联度, 根据该关联度选择字幕文 件, 并从字幕服务器中下载选择的字幕文件的内容。
其中, 字幕服务器根据接收的多媒体文件的文件信息, 查找与所述 多媒体文件关联的字幕文件的文件信息, 根据查找到的字幕文件的文件 信息及其与多媒体文件的文件信息的关联度选择字幕文件, 并将选择的 字幕文件的文件信息发送给播放器客户端, 以便播放器客户端接收到所 述文件信息后, 直接从字幕服务器中下载选择的字幕文件的内容。
其中, 多媒体文件的文件信息包括多媒体文件的哈希值; 字幕文件 的文件信息包括字幕文件的哈希值, 多媒体文件的文件信息和字幕文件 的文件信息还可能包括其他信息, 本发明实施例对此不作限制。
其中, 多媒体文件的文件信息还包括多媒体文件的特征信息; 字幕 文件的文件信息还包括字幕文件的特征信息。
其中, 该方法还包括:
字幕服务器根据多媒体文件的哈希值查找与多媒体文件关联的字 幕文件的文件信息, 如果不存在字幕文件, 字幕服务器根据多媒体文件 的特征信息在字幕服务器中查找与所述多媒体文件的特征信息相匹配 的字幕文件, 并将相匹配的字幕文件的文件信息发送给播放器客户端。
播放器客户端根据接收的字幕文件的文件信息选择字幕文件, 并从 字幕服务器中下载选择的字幕文件的内容。
本发明实施例提供的方法, 用户在下载字幕文件时, 通过播放器客 户端将多媒体文件的文件信息发送给字幕服务器, 在字幕服务器上查找 关联的字幕文件, 并根据查找到的字幕文件信息与多媒体文件信息的关 联度选择字幕文件, 使得用户能及时准确的下载所需的字幕文件, 无需 用户搜索下载字幕文件, 提高了用户的使用体验。
实施例 3
为了便于说明,本实施例中以用户 A在播放器客户端中播放附带字 幕文件 1的视频文件 1时, 将本地客户端保存的字幕文件 1上传给服务 器; 当用户 B在播放器客户端中播放视频文件 1时, 自动从服务器上获 取字幕文件 1为例, 对本发明实施例提供的方法进行说明, 参见图 3-1 , 具体过程如下:
步骤 301: 用户 A在播放器客户端中播放附带字幕文件 1的视频文 件 1 , 字幕文件 1 自动加载到播放器客户端中与视频文件 1同步显示。
其中, 用户 A在播放器客户端中所播放的视频文件 1可以是电影、 电视剧、 FLASH、 MTV等各种形式的视频文件, 本发明实施例对此不 作限制。 对于视频文件 1 的文件格式, 可以为 MOV、 RMVB、 MID, MP4, RAM, RA、 MPG、 VCD, DAT, SVCD、 CVD、 DVD等任一格 式, 本发明实施例对此也不作限制。
用户 A所播放的视频文件 1附带的字幕文件 1 , 可以存放在用户 A 本地的客户端, 也可以存放在指定路径, 例如网络电子邮箱中的某个位 置。 当用户播放视频文件 1时, 播放器客户端自动加载存放在本地或者 指定路径的字幕文件 1 , 使字幕文件 1和视频文件 1同步播放。 其中, 视频文件 1和字幕文件 1在播放前已经建立了关联关系, 以便于用户 A 在播放视频文件 1时, 播放器客户端根据视频文件 1的关联关系查找到 对应的字幕文件 1 , 并自动加载。
播放器客户端必须支持视频文件 1的格式, 该播放器客户端可以为 PC、 手机等任何视频播放设备, 本发明实施例对此不作限制。
步骤 302: 用户 A在播放器客户端中播放附带字幕文件 1的视频文 件 1时, 如果用户 A同意共享字幕文件 1 , 则播放器客户端分别计算视 频文件 1的哈希值和字幕文件 1的哈希值, 并分别采集视频文件 1的特 征信息和字幕文件 1的特征信息。
其中, 如果用户 A设定共享字幕文件 1 , 则播放器客户端将根据一 定的计算规则, 如分段计算法或者整体计算法, 分别计算视频文件 1的 哈希值和字幕文件 1的哈希值, 其中, 播放器客户端所采用的计算规则 可以根据实际情况灵活选取, 本发明实施例对此不作限制。
其中, 文件的哈希值为根据文件的内容的数据通过逻辑运算得到的 数值, 不同的文件(即使具有相同的文件名)得到的哈希值是不同的, 所 以哈希值是每个文件的身份标识。 不同哈希值的文件被认为是不同的文 件, 相同的哈希值的文件的内容肯定是完全相同(即使文件名不同), 因 此哈希值具有文件校验的功能, 相当于文件的校验码, 例如可以用来检 查文件下载是否正确。
具体地, 在对视频文件 1计算哈希值时可以采用分段哈希的算法, 例如,对视频文件 1的起始 512字节、结束 512字节及其中间字节取 512 字节分别计算哈希值, 然后将计算的三个哈希值进行合并后, 得到视频 文件 1的哈希值,也可以采用整体计算法对整个视频文件 1计算哈希值, 本发明实施例对此不作限制; 相应地, 字幕文件 1可以采用直接计算哈 希值的方法, 也可以采用分段哈希算法来计算字幕文件的哈希值, 本发 明实施例对此也不作限制。 通过分段计算法和整体计算法对同一文件计算出来的哈希值是不 同的, 每个文件哈希值唯一的前提是, 服务器侧和客户端对该文件采用 相同计算方法计算哈希值。进一步地,对于文件大小比较大的视频文件, 由于文件较大, 计算时间较长, 一般采用分段计算法计算视频文件的哈 希值; 而对于文件大小较小的字幕文件, 一般采用整体计算法。
本发明实施例中计算多媒体文件的哈希值和字幕文件的哈希值实 现对多媒体文件内容及其字幕文件信息的唯一标识, 另外还可以采用其 他的计算方法实现对多媒体文件内容及其字幕文件信息的唯一标识, 本 发明实施例对此不作限制。
其中, 播放器客户端采集的视频文件 1的特征信息可以包括: 视频 文件 1的文件名、 大小、播放时长和格式等信息中的一种或多种, 例如: 播放器客户端采集的视频文件 1的特征信息包括: 视频文件 1的文件名 为"功夫熊猫",视频文件 1大小为 4615612764字节,视频文件 1的播放 时长为 3060秒, 视频文件 1的格式为 DVD格式; 需要说明的是, 视频 文件 1的特征信息可以根据实际应用进行调整。
字幕文件 1的特征信息可以包括: 字幕文件 1的文件名、 扩展名和 的格式等信息中的一种或多种, 例如: 采集的字幕文件 1的特征信息包 括: 字幕文件 1的文件名为"功夫熊猫. chs.srt", 字幕扩展名为 ".srt", 字 幕文件 1的格式为 TXT。 需要说明的是, 字幕文件 1的特征信息可以根 据实际应用进行调整。
本步骤中, 播放器客户端也可以只计算视频文件 1的哈希值和字幕 文件 1的哈希值, 无需采集视频文件 1的特征信息和字幕文件 1的特征 信息。
步骤 303: 用户 Α的播放器客户端将视频文件 1的哈希值和视频文 件 1的特征信息作为视频文件 1的文件信息、 字幕文件 1的哈希值和字 幕文件 1的特征信息作为字幕文件 1的文件信息上传到服务器中。
其中, 为了减少无用信息的上传, 提高上传效率, 可以对上传的时 机进行调整, 比如用户加载了一个字幕文件后, 观看一小段时间, 发现 字幕文件错误需要对字幕文件进行修改, 此时可以对上报时机进行配 置, 设置滞后一段时间后再上传到服务器中, 如, 可以设置在视频文件
1播放 X分钟后, 或者视频文件 1播放了一定比例如丫%后, 则认为字 幕文件 1是正确的, 此时再将字幕文件 1上传给服务器。 其中, X或 Y 的值可以根据实际的计算和实际运营的情况来调整。
另外, 为了增强用户信息的安全性, 播放器客户端可以对上传的视 频文件 1的哈希值和字幕文件 1的哈希值及其视频文件 1的特征信息和 字幕文件 1的特征信息进行加密后再发送给服务器; 为了减少数据量的 传输, 提高传输效率, 播放器客户端可以对上传的信息进行压缩后发送 给服务器, 对于压缩的方式可以灵活选取, 如采用压缩软件进行压缩; 当然, 为了同时增强用户信息的安全性和提高传输效率, 播放器客户端 可以对上传的信息分别进行加密和压缩处理后再发送给服务器, 对于加 密算法可以灵活选取如 DES、 RSA等, 本发明实施例对比不作限制。
其中, 播放器客户端也可以将字幕文件 1的哈希值和字幕文件 1的 特征信息作为字幕文件 1的文件信息先上传给服务器, 执行完步骤 304 后, 再将视频文件 1的哈希值和视频文件 1的特征信息作为视频文件 1 的文件信息上传给 务器。
其中, 本发明实施例中的服务器可以是专门的字幕服务器, 也可以 是任一其他服务器, 本发明实施例对此不作限制。
本发明实施例中如果用户 A的播放器客户端步骤 302中只计算视频 文件 1的哈希值和幕文件 1的哈希值, 则此时将视频文件 1的哈希值作 为视频文件 1的文件信息、 字幕文件 1的哈希值作为字幕文件 1的文件 信息上传到服务器中, 而无需上传视频文件 1的特征信息和字幕文件 1 的特征信息。
步骤 304: 服务器接收到视频文件 1的文件信息及其字幕文件 1的 文件信息后, 根据字幕文件 1的哈希值检查服务器中是否已经存在字幕 文件 1的内容, 如果是, 则执行步骤 305; 否则, 添加字幕文件 1的文 件信息, 并执行步骤 306。
其中, 服务器接收到视频文件 1的文件信息及其字幕文件 1的文件 信息后, 首先根据字幕文件 1的哈希值查找服务器中是否已经存在字幕 文件 1的内容, 由于相同内容的字幕文件其对应的哈希值是唯一的, 所 以可以根据字幕文件 1的哈希值可以精确查找到服务器中是否已经存在 字幕文件 1的内容,如果是,即存在字幕文件 1的内容,则执行步骤 305; 否则, 即没有查找到字幕文件 1的内容, 添加字幕文件 1的文件信息, 并执行步骤 306; 其中, 字幕文件 1的文件信息包括: 字幕文件 1的哈 希值和字幕文件 1的特征信息。
步骤 305: 服务器根据视频文件 1的哈希值检查服务器中是否存在 视频文件 1的文件信息, 如果是, 累加视频文件 1的文件信息和字幕文 件 1的文件信息的关联度, 执行步骤 307; 否则, 添加视频文件 1的文 件信息, 并建立视频文件 1的文件信息和字幕文件 1的文件信息的关联 关系, 执行步骤 307。
其中, 服务器在判断存在字幕文件 1内容的情况下, 根据接收到的 视频文件 1的哈希值查找服务器中是否存在视频文件 1的文件信息, 其 中, 视频文件 1的文件信息包括视频文件 1的哈希值和特征信息。
由于相同内容的视频文件其对应的哈希值是唯一的, 所以可以根据 视频文件 1 的哈希值查找服务器中是否已经存在视频文件 1 的文件信 息, 如果是, 即服务器查找到视频文件 1的文件信息, 说明服务器中已 经添加了视频文件 1的文件信息, 由于服务器已经判断存在字幕文件 1 , 所以在服务器中已经建立了视频文件 1的文件信息和字幕文件 1的文件 信息的关联度, 此时直接累加视频文件 1的文件信息和字幕文件 1的文 件信息的关联度, 例如: 视频文件 1的文件信息和字幕文件 1的文件信 息的关联度原来为 4, 则此时可以增加其关联度为 5, 当然也可以是任 一大于 4的数字。
其中, 视频文件 1的文件信息和字幕文件 1的文件信息的关联信息 包括关联度和关联关系, 关联关系表示二者之间存在关联, 关联度表示 视频文件和字幕文件的关联程度, 关联度越高, 视频文件对应的字幕文 件的下载和上传的频率越高, 质量也会较高。 例如: 视频文件 1的文件 信息与字幕文件 1的文件信息的关联度为 7, 而视频文件 1的文件信息 与字幕文件 2的文件信息的关联度为 4, 一般视频文件 1的文件信息对 应的字幕文件 1比字幕文件 2的下载和上传的频率更高、 质量也更高。 如果服务器没有查找到视频文件 1的文件信息, 则添加视频文件 1 的文件信息, 并建立视频文件 1的文件信息和字幕文件 1的文件信息的 关联关系, 并设定关联度初值, 一般为 1。
步骤 306: 服务器根据视频文件 1的哈希值检查服务器中是否存在 视频文件 1的文件信息, 如果是, 则建立视频文件 1的文件信息和字幕 文件 1的文件信息的关联关系, 执行步骤 308; 否则, 添加视频文件 1 的文件信息, 并建立视频文件 1的文件信息和字幕文件 1的文件信息的 关联关系, 执行步骤 308。
其中, 服务器在添加字幕文件 1的文件信息的情况下, 根据接收到 的视频文件 1的哈希值查找服务器中是否存在视频文件 1的文件信息, 其中视频文件 1的文件信息包括视频文件 1的哈希值和特征信息。
由于查找出服务器中已经存在视频文件 1的文件信息但是不存在字 幕文件 1 ,说明其他用户已经在服务器中添加了视频文件 1的文件信息, 但是字幕文件 1是新添加的, 所以建立视频文件 1的文件信息和字幕文 件 1的文件信息的关联关系, 并给该关联度设定初值, 一般为 1。
如果服务器没有查找到视频文件 1的文件信息, 则添加视频文件 1 的文件信息, 并建立视频文件 1的文件信息和字幕文件 1的文件信息的 关联度, 并设定关联度初值, 一般为 1。
步骤 307: 服务器向播放器客户端返回响应, 通知播放器客户端在 服务器中已经存在字幕文件 1内容, 播放器客户端收到响应后, 获知服 务器中已存在字幕文件 1内容, 不上传字幕文件 1。
步骤 308: 服务器向播放器客户端返回响应, 通知播放器客户端在 服务器中不存在字幕文件 1内容, 播放器客户端接收到响应后, 上传字 幕文件 1。
另外, 在步骤 304中, 服务器接收到视频文件 1的文件信息和字幕 文件 1的文件信息后, 首先根据字幕文件 1的哈希值检查服务器中是否 已经存在字幕文件 1的内容, 如果是, 则先执行步骤 307向播放器客户 端通知服务器已存在字幕文件 1后, 再执行步骤 305; 否则, 添加字幕 文件 1的文件信息后, 先执行步骤 308向播放器客户端通知服务器中不 存在字幕文件 1 , 播放器客户端上传字幕文件 1 , 再执行步骤 306。
上述步骤 301至步骤 308为用户 A将本地播放器客户端所播放的视 频文件 1附带的字幕文件 1上传到服务器的过程;在用户 A上传视频文 件 1完毕后, 当用户 B在本地播放器客户端播放视频文件 1时, 如果本 地没有关联字幕文件, 则用户 B的播放器客户端将从服务器上下载视频 文件 1对应的字幕文件, 参见图 3-2, 具体实现过程如下:
步骤 309: 用户 B的播放器客户端在本地计算视频文件 1的哈希值 和采集视频文件 1的特征信息, 并将视频文件 1的哈希值和视频文件 1 的特征信息作为视频文件 1的文件信息发送给服务器。
其中,用户 B的播放器客户端也可以只计算视频文件 1的哈希值并 发送给服务器, 无需采集视频文件 1的特征信息。
步骤 310: 服务器接收到用视频文件 1的文件信息后, 根据视频文 件 1的哈希值进行精确查询, 查找是否存在与视频文件 1关联的字幕文 件, 如果是, 则将查找到的字幕文件的文件信息返回给用户 B的播放器 客户端, 执行步骤 311; 否则, 执行步骤 312。
其中, 服务器接收到视频文件 1的文件信息后, 根据视频文件 1的 哈希值进行精确查询, 查找是否存在与视频文件 1关联的字幕文件, 如 果是, 则将查找到的与视频文件 1关联的所有字幕文件返回给用户 B的 播放器客户端; 或者, 在查找到的所有字幕文件中选择关联度较大的 N 个字幕文件的文件信息发送给用户 B的播放器客户端, 比如选择所有字 幕文件中关联度排名前五位的字幕文件的文件信息返回给用户 B的播放 器客户端。
服务器还可以在查找到的与视频文件 1关联的所有字幕文件中按照 预设的选择规则,选择其中一个字幕文件的文件信息返回给用户 B的播 放器客户端。 其中预设的选择规则, 可以是按照关注度的大小, 选择关 注度较大的字幕文件发送用户 B的播放器客户端, 当然也可以根据其他 参数如语言版本等选择字幕文件返回给用户 B的播放器客户端。
步骤 311: 用户 B的播放器客户端接收到与视频文件 1关联的字幕 文件的文件信息后, 根据关联度自动选择字幕文件, 并从服务器上下载 选择的字幕文件内容。
其中,用户 B的播放器客户端也可将与视频文件 1关联的字幕文件 的文件信息呈现给用户 B, 由用户 B手动操作选择字幕文件, 并从服务 器上下载用户 B选择的字幕文件内容。
步骤 312: 服务器根据视频文件 1的特征信息在服务器中进行模糊 查询, 查找相匹配的字幕文件, 并将查找到的相匹配的字幕文件的文件 信息返回给用户 B的播放器客户端, 执行步骤 313。
其中, 服务器根据视频文件 1的哈希值进行精确查询没有查找到与 视频文件 1关联的字幕文件时, 则根据视频文件 1的特征信息在服务器 的数据库中进行模糊查询, 查找相匹配的字幕文件, 并将查找到的相匹 配的字幕文件的文件信息返回给播放器客户端; 服务器在模糊查询时, 可以根据文件名匹配, 或者文件大小匹配, 或者文件格式匹配, 或者文 件名、 文件大小和文件格式同时匹配的原则进行查询。
其中, 本步骤中的模糊查询与步骤 310的精确查询的不同在于, 精 确查询是根据视频文件 1的哈希值进行查询, 由于视频文件 1的哈希值 是唯一的, 所以查找到的必然是视频文件 1的字幕文件, 例如: 根据视 频文件 1的哈希值查找到字幕文件 1和字幕文件 2, 字幕文件 1和字幕 文件 2之间可能版本不同也可能质量有差别, 但是必然是视频文件 1的 字幕文件; 而本步骤中的模糊查询, 是通过文件名、 文件格式、 文件大 小等特征查找的, 查找出的结果未必是视频文件 1的字幕文件, 例如: 根据文件名、 文件格式和文件大小查找出字幕文件 3和字幕文件 4, 但 是有可能字幕文件 3和字幕文件 4未必是视频文件 1的字幕文件, 只是 特征信息满足而已。
步骤 313: 用户 B的播放器客户端接收与视频文件 1相匹配的字幕 文件的文件信息, 选择字幕文件, 并从服务器上下载选择的字幕文件内 谷。
其中,用户 B的播放器客户端也可将模糊查找到的与视频文件 1相 匹配的字幕文件的文件信息呈现给用户 B, 由用户 B手动操作选择字幕 文件, 并从服务器上下载用户 B选择的字幕文件内容。
另外, 字幕服务器除了收集用户上传的视频文件信息和对应的字幕 文件外, 庞大的字幕库的来源是多方面的, 包括人工整理和训练的字幕 库, 媒体信息库和关联度等, 需要不断地维护字幕服务器, 随着不断地 对字幕服务器更新, 可以优先选择时间较近的字幕文件或者在更新字幕 文件时, 对于内容相同的字幕文件可以用后来更新的字幕文件替换原来 的字幕文件。
本发明实施例提供的方法, 用户在上传字幕文件时, 通过播放器客 户端将多媒体文件的文件信息和字幕文件的文件信息发送给字幕服务 器, 与字幕服务器上对应的文件信息进行比较, 判断是否存在字幕文件 的内容, 根据判断结果上传字幕文件, 并在字幕服务器确定多媒体文件 的文件信息与字幕文件的文件信息的关联, 保证了用户上传的字幕文件 不重复, 节省了服务器资源; 用户在下载字幕文件时, 通过播放器客户 端将多媒体文件的文件信息发送给字幕服务器, 在字幕服务器上查找关 联的字幕文件, 并根据查找到的字幕文件信息与多媒体文件的关联度选 择字幕文件, 使得用户能及时准确的下载所需的字幕文件, 无需用户搜 索下载字幕文件, 提高了用户的使用体验。
实施例 4
为了便于说明,本发明实施例中仍以用户 A在播放器客户端中播放 附带字幕文件 1的视频文件 1时, 将本地客户端保存的字幕文件 1上传 给服务器; 当用户 B在播放器客户端中播放视频文件 1时, 自动从服务 器上获取字幕文件 1为例对本发明实施例提供的方法进行说明, 参见图 4, 具体过程如下:
步骤 401: 用户 A在播放器客户端中播放附带字幕文件 1的视频文 件 1 , 字幕文件 1 自动加载到播放器客户端中与视频文件 1同步显示。
具体实现过程参见实施例 2中的步骤 301。
步骤 402: 用户 A在播放器客户端中播放附带字幕文件 1的视频文 件 1时, 如果用户 A同意共享字幕文件 1 , 则播放器客户端分别计算视 频文件 1的哈希值和字幕文件 1的哈希值, 并分别采集视频文件 1的特 征信息和字幕文件 1的特征信息。
如果用户不同意共享字幕文件 1 , 则直接结束流程。
具体实现过程参见实施例 2中的步骤 302。
步骤 403: 用户 A的播放器客户端将字幕文件 1的哈希值和字幕文 件 1的特征信息作为字幕文件 1的文件信息、 视频文件 1的哈希值和视 频文件 1的特征信息作为视频文件 1的文件信息上传到服务器中。
其中, 为了减少无用信息的上传, 提高上传效率, 可以对上传的时 机进行调整, 具体请参见步骤 303相关叙述。
另外, 为了增强用户信息的安全性, 播放器客户端可以对上传的信 息进行加密后再发送给服务器, 如可以采用 DES、 RSA等加密算法, 本 发明实施例对比不作限制; 为了减少数据量的传输, 提高传输效率, 播 放器客户端可以对上传的信息进行压缩后发送给服务器, 如可以采用压 缩软件对信息进行压缩后再发送给服务器; 当然, 为了同时增强用户信 息的安全性和提高传输效率, 播放器客户端可以对上传的信息分别进行 加密和压缩处理后再发送给服务器。
步骤 404: 服务器根据视频文件 1的哈希值检查服务器中是否存在 视频文件 1的文件信息, 如果是, 则执行步骤 405; 否则, 添加视频文 件 1的文件信息, 并执行步骤 406。
步骤 405: 服务器根据字幕文件 1的哈希值检查服务器中是否已经 存在字幕文件 1的内容, 如果是, 则累加视频文件 1的文件信息和字幕 文件 1的文件信息的关联度, 并执行步骤 407; 否则, 添加字幕文件 1 的文件信息, 并建立视频文件 1的文件信息和字幕文件 1的文件信息的 关联关系, 并执行步骤 408。
步骤 406: 服务器根据字幕文件 1的哈希值检查服务器中是否已经 存在字幕文件 1的内容, 如果是, 则建立视频文件 1的文件信息和字幕 文件 1的文件信息的关联度, 并执行步骤 407; 否则, 添加字幕文件 1 的文件信息, 并建立视频文件 1的文件信息和字幕文件 1的文件信息的 关联关系, 并执行步骤 408。
步骤 407: 服务器向播放器客户端返回响应, 如发送一个通知消息 或指令对于具体通知方式, 本发明实施例对此不作限制, 通知播放器客 户端在服务器中已经存在字幕文件 1内容, 播放器客户端收到响应后, 获知服务器中已存在字幕文件 1内容。
步骤 408: 服务器向播放器客户端返回响应, 通知播放器客户端在 服务器中不存在字幕文件 1内容, 播放器客户端接收到响应后, 上传字 幕文件 1。
上述步骤 401-408为用户 A将本地播放器客户端所播放的视频文件 1附带的字幕文件 1上传到服务器的过程; 与实施例 2不同的是, 服务 器首先判断是否存在视频文件 1的文件信息, 再判断是否存在字幕文件 1的内容。 在用户 A上传视频文件 1完毕后, 当用户 B在本地播放器客 户端播放视频文件 1时, 如果本地没有关联字幕文件, 则用户 B的播放 器客户端将从服务器上下载视频文件 1对应的字幕文件, 具体实现过程 参见实施例 2的步骤 309-313 , 过程相同, 不再赘述。
实施例 5
本发明实施例提供了一种上传字幕文件的系统, 参见图 5 , 该系统 包括: 播放器客户端 501和字幕服务器 502,
播放器客户端 501 , 用于将多媒体文件的文件信息和多媒体文件对 应的字幕文件的文件信息发送给字幕服务器 502; 根据字幕服务器 502 发送的状态消息确定出字幕服务器中不存在所述字幕文件时, 上传字幕 文件;
字幕服务器 502, 用于根据字幕文件的文件信息和多媒体文件的文 件信息, 确定所述多媒体文件的文件信息和字幕文件的文件信息的关联 关系和关联度; 确定所述字幕服务器中是否存在所述字幕文件, 并将是 否存在所述字幕文件的状态消息发送给播放器客户端 501。
其中, 字幕服务器 502具体用于分别根据字幕文件的文件信息和多 媒体文件的文件信息, 检查字幕服务器 502中是否存在字幕文件的内容 及其是否存在多媒体文件的文件信息;
当字幕服务器 502中不存在字幕文件的内容但存在多媒体文件的文 件信息时, 字幕服务器 502添加字幕文件的文件信息, 建立多媒体文件 的文件信息和字幕文件的文件信息的关联关系, 并向播放器客户端 501 发送字幕文件不存在的状态消息。
当字幕服务器 502中不存在字幕文件的内容且不存在多媒体文件的 文件信息时, 字幕服务器 502添加字幕文件的文件信息和多媒体文件的 文件信息, 建立多媒体文件的文件信息和字幕文件的文件信息的关联关 系, 并向播放器客户端 501发送字幕文件不存在的状态消息。
当字幕服务器 502中存在字幕文件的内容且存在多媒体文件的文件 信息时, 累加多媒体文件的文件信息和字幕文件的文件信息的关联度, 并向播放器客户端 501发送字幕文件存在的状态消息。
当字幕服务器 502中存在字幕文件的内容但不存在多媒体文件的文 件信息时, 添加多媒体文件的文件信息, 并建立多媒体文件的文件信息 和字幕文件的文件信息的关联关系, 并向播放器客户端 501发送字幕文 件存在的状态消息。
其中, 播放器客户端 501具体用于接收字幕服务器 502发送的字幕 文件的状态消息; 如果接收到字幕文件存在的状态消息, 则不上传字幕 文件; 如果接收到字幕文件不存在的状态消息, 则上传字幕文件。
其中, 多媒体文件的文件信息包括多媒体文件的哈希值; 字幕文件 的文件信息包括字幕文件的哈希值。
其中, 多媒体文件的文件信息还包括多媒体文件的特征信息; 字幕 文件的文件信息还包括字幕文件的特征信息。
本发明实施例提供的系统, 用户在上传字幕文件时, 通过播放器客 户端将多媒体文件的文件信息和字幕文件的文件信息发送给字幕服务 器, 与字幕服务器上的对应的文件信息进行比较, 判断是否存在字幕文 件的内容, 根据判断结果上传字幕文件, 并在字幕服务器确定多媒体文 件的文件信息与字幕文件的文件信息的关联, 保证了用户上传的字幕文 件不重复, 节省了服务器资源。
实施例 6
本发明实施例提供了一种下载字幕文件的系统, 参见图 6, 系统包 括: 播放器客户端 601和字幕服务器 602, 播放器客户端 601 , 用于将多媒体文件的文件信息发送给字幕服务 器 602; 根据字幕服务器 602发送的字幕文件的文件信息及其与多媒体 文件的文件信息的关联度, 从字幕服务器 602中下载字幕文件的内容; 字幕服务器 602, 用于根据接收的多媒体文件的文件信息, 查找与 多媒体文件关联的字幕文件的文件信息, 并将查找到的字幕文件的文件 信息及其与多媒体文件的文件信息的关联度发送给播放器客户端 601。
其中, 播放器客户端 601具体用于接收字幕服务器 602发送的字幕 文件的文件信息及其与多媒体文件的文件信息的关联度, 根据关联度选 择字幕文件, 并从字幕服务器 602中下载选择的字幕文件的内容。
其中,字幕服务器 602具体用于根据接收的多媒体文件的文件信息, 查找与多媒体文件关联的字幕文件的文件信息, 根据查找到的字幕文件 的文件信息以及与多媒体文件的文件信息的关联度选择字幕文件, 并将 选择的字幕文件的文件信息发送给播放器客户端 601 , 以便播放器客户 端 601接收到选择的字幕文件的文件信息后, 直接从字幕服务器 602中 下载选择的字幕文件的内容。
其中, 多媒体文件的文件信息包括多媒体文件的哈希值, 还可以包 括多媒体文件的特征信息; 字幕文件的文件信息包括字幕文件的哈希 值, 还可以包括字幕文件的特征信息。
其中, 字幕服务器 602还用于, 如果根据多媒体文件的哈希值没有 查找到与多媒体文件关联的字幕文件的文件信息, 则字幕服务器 602根 据多媒体文件的特征信息在字幕服务器 602中查找相匹配的字幕文件, 并将相匹配的字幕文件的文件信息发送给播放器客户端 601。
本发明实施例提供的系统, 用户在下载字幕文件时, 通过播放器客 户端将多媒体文件的文件信息发送给字幕服务器, 在字幕服务器上查找 关联的字幕文件, 并根据查找到的字幕文件信息与多媒体文件信息的关 联度选择字幕文件, 使得用户能及时准确的下载所需的字幕文件, 无需 用户搜索下载字幕文件, 提高了用户的使用体验。
实施例 7
本发明实施例提供了一种播放器客户端设备, 参见图 7, 该播放器 客户端设备包括:
第一发送模块 701 , 用于分别将多媒体文件的文件信息和多媒体文 件对应的字幕文件的文件信息发送给字幕服务器。
上传模块 702, 用于根据收到的字幕服务器发送的字幕文件的状态 消息, 上传字幕文件。
其中, 上传模块 702包括:
第一接收单元, 用于接收字幕服务器发送的字幕文件的状态消息; 上传单元, 用于在第一接收单元接收到字幕文件存在的状态消息 时, 不上传字幕文件; 在第一接收单元接收到字幕文件不存在的状态消 息时, 上传字幕文件。
本发明实施例提供的播放器客户端设备, 用户在上传字幕文件时, 通过播放器客户端将多媒体文件的文件信息和字幕文件的文件信息发 送给字幕服务器, 与字幕服务器上的对应的文件信息进行比较, 根据字 幕服务器判断结果上传字幕文件, 保证了用户上传的字幕文件不重复, 节省了服务器资源。
实施例 8
本发明实施例提供了一种字幕服务器设备, 参见图 8, 该字幕服务 器设备包括:
确定模块 801 , 用于根据播放器客户端发送的字幕文件的文件信息 和多媒体文件的文件信息, 确定多媒体文件的文件信息和字幕文件的文 件信息的关联关系和关联度, 确定所述字幕服务器中是否存在所述字幕 文件。
第二发送模块 802, 用于将是否存在所述字幕文件的状态消息发送 给播放器客户端。
其中, 确定模块 801具体包括:
查询单元, 用于分别根据字幕文件的文件信息和多媒体文件的文件 信息, 查询字幕服务器中是否存在字幕文件的内容及其是否存在多媒体 文件的文件信息。
第一处理单元, 用于当字幕服务器中不存在字幕文件的内容但存在 多媒体文件的文件信息时, 添加字幕文件的文件信息, 建立多媒体文件 的文件信息和字幕文件的文件信息的关联关系。
第二处理单元, 用于当字幕服务器中不存在字幕文件的内容且不存 在多媒体文件的文件信息时, 添加字幕文件的文件信息和多媒体文件的 文件信息, 建立多媒体文件的文件信息和字幕文件的文件信息的关联关 系。
第三处理单元, 用于当字幕服务器中存在字幕文件的内容且存在多 媒体文件的文件信息时, 累加多媒体文件的文件信息和字幕文件的文件 信息的关联度。
第四处理单元, 用于当字幕服务器中存在字幕文件的内容但不存在 多媒体文件的文件信息时, 添加多媒体文件的文件信息, 并建立多媒体 文件的文件信息和字幕文件的文件信息的关联关系。
本发明实施例提供的字幕服务器设备, 用户在上传字幕文件时, 通 过接收播放器客户端发送的多媒体文件的文件信息和字幕文件的文件 信息, 判断是否存在字幕文件的内容, 根据判断结果向播放器客户端发 送响应消息, 以便播放器客户端能够在字幕服务器设备中不存在所述字 幕文件时上传字幕文件, 在字幕服务器设备中存在所述字幕文件时不上 传所述字幕文件, 保证了用户上传的字幕文件不重复, 节省了服务器资 源。
实施例 9
本发明实施例提供了一种播放器客户端设备, 参见图 9, 该播放器 客户端设备包括:
第三发送模块 901 , 用于将多媒体文件的文件信息发送给字幕服务 器。
下载模块 902, 用于根据接收的字幕服务器的字幕文件的文件信息 及其与多媒体文件的文件信息的关联度, 从字幕服务器中下载字幕文件 的内容。
其中, 下载模块 902, 包括:
第二接收单元, 用于接收字幕服务器发送的字幕文件的文件信息及 该字幕文件的文件信息与多媒体文件的文件信息的关联度。
第一选择单元, 用于根据字幕文件的文件信息与多媒体文件的文件 信息的关联度, 选择字幕文件, 并从字幕服务器中下载选择的字幕文件 的内容。
本发明实施例提供的播放器客户端设备, 用户在下载字幕文件时, 通过播放器客户端将多媒体文件的文件信息发送给字幕服务器, 在字幕 服务器上查找关联的字幕文件, 并根据查找到的字幕文件信息与多媒体 文件信息的关联度选择字幕文件, 使得用户能及时准确的下载所需的字 幕文件, 无需用户搜索下载字幕文件, 提高了用户的使用体验。
实施例 10
本发明实施例提供了一种字幕服务器设备, 参见图 10, 该字幕服务 器设备包括:
第一查找模块 1001 ,用于根据播放器客户端发送的多媒体文件的文 件信息, 查找与多媒体文件关联的字幕文件的文件信息。
第四发送模块 1002,用于将查找到的字幕文件的文件信息及其与多 媒体文件的文件信息的关联度发送给播放器客户端。
其中, 第一查找模块 1001 , 具体包括:
查找单元, 用于根据接收的播放器客户端发送的多媒体文件的文件 信息, 查找与多媒体文件关联的字幕文件的文件信息。
第二选择单元, 用于根据查找到的字幕文件的文件信息及其与多媒 体文件的文件信息的关联度选择字幕文件, 并将选择的字幕文件的文件 信息发送给播放器客户端, 以便播放器客户端接收到选择的字幕文件的 文件信息后, 直接从字幕服务器中下载选择的字幕文件的内容。
其中, 该设备还包括:
第二查找模块, 用于根据多媒体文件的哈希值查找与多媒体文件关 联的字幕文件的文件信息时, 如果不存在字幕文件, 则根据多媒体文件 的特征信息在字幕服务器中查找与所媒体文件的特征信息相匹配的字 幕文件, 并将所查找的字幕文件的文件信息发送给播放器客户端, 以便 播放器客户端根据接收的字幕文件的文件信息选择字幕文件, 并从字幕 服务器中下载选择的字幕文件的内容。
本发明实施例提供的字幕服务器设备, 用户在下载字幕文件时, 接 收多媒体文件的文件信息, 查找与多媒体文件关联的字幕文件以及关联 的字幕文件信息与多媒体文件信息的关联度, 并发送给播放器客户端, 使得用户能及时准确的下载所需的字幕文件, 无需用户搜索下载字幕文 件, 提高了用户的使用体验。
本发明实施例中的"接收"一词可以理解为主动从其他模块获取也可 以是接收其他模块发送来的信息。
本领域技术人员可以理解附图只是一个优选实施例的示意图, 附图 中的模块或流程并不一定是实施本发明所必须的。
本领域技术人员可以理解实施例中的装置中的模块可以按照实施 例描述分布于实施例的装置中, 也可以进行相应变化位于不同于本实施 例的一个或多个装置中。 上述实施例的模块可以合并为一个模块, 也可 以进一步拆分成多个子模块。
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 本发明实施例中的部分步骤, 可以利用软件实现, 相应的软件程序 可以存储在可读取的存储介质中, 如光盘或硬盘等。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包 含在本发明的保护范围之内。

Claims

权利要求书
1、 一种上传字幕文件的方法, 其特征在于, 所述方法包括: 播放器客户端将多媒体文件的文件信息和所述多媒体文件对应的 字幕文件的文件信息发送给字幕服务器;
所述字幕服务器根据所述字幕文件的文件信息和所述多媒体文件 的文件信息, 确定所述多媒体文件的文件信息和所述字幕文件的文件信 息的关联关系和关联度; 确定所述字幕服务器中是否存在所述字幕文 件, 并将是否存在所述字幕文件的状态消息发给所述播放器客户端; 所述播放器客户端根据收到的所述状态消息确定出所述字幕服务 器中不存在所述字幕文件时, 上传所述字幕文件。
2、 如权利要求 1所述的方法, 其特征在于,
所述字幕服务器根据所述字幕文件的文件信息和所述多媒体文件 的文件信息, 查询所述字幕服务器中是否存在所述字幕文件的内容及是 否存在所述多媒体文件的文件信息;
当所述字幕服务器中不存在所述字幕文件的内容但存在所述多媒 体文件的文件信息时, 添加所述字幕文件的文件信息, 建立所述多媒体 文件的文件信息和所述字幕文件的文件信息的关联关系, 并向所述播放 器客户端发送字幕文件不存在的状态消息;
当所述字幕服务器中不存在所述字幕文件的内容且不存在所述多 媒体文件的文件信息时, 添加所述字幕文件的文件信息和所述多媒体文 件的文件信息, 建立所述多媒体文件的文件信息和所述字幕文件的文件 信息的关联关系, 并向所述播放器客户端发送字幕文件不存在的状态消 息;
当所述字幕服务器中存在所述字幕文件的内容且存在所述多媒体 文件的文件信息时, 累加所述多媒体文件的文件信息和所述字幕文件的 文件信息的关联度, 并向所述播放器客户端发送字幕文件存在的状态消 息;
当所述字幕服务器中存在所述字幕文件的内容但不存在所述多媒 体文件的文件信息时, 添加所述多媒体文件的文件信息, 建立所述多媒 体文件的文件信息和所述字幕文件的文件信息的关联关系, 并向所述播 放器客户端发送字幕文件存在的状态消息;
播放器客户端在接收到字幕文件存在的状态消息时, 不上传所述字 幕文件, 在接收到字幕文件不存在的状态消息时, 上传所述字幕文件。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述多媒体文件 的文件信息包括所述多媒体文件的哈希值; 所述字幕文件的文件信息包 括所述字幕文件的哈希值。
4、 如权利要求 3 所述的方法, 其特征在于, 所述多媒体文件的文 件信息还包括多媒体文件的特征信息; 所述字幕文件的文件信息还包括 字幕文件的特征信息。
5、 一种下载字幕文件的方法, 其特征在于, 所述方法包括: 播放器客户端将多媒体文件的文件信息发送给字幕服务器; 所述字幕服务器根据接收的所述多媒体文件的文件信息, 查找与所 述多媒体文件关联的字幕文件的文件信息, 并将查找到的字幕文件的文 件信息及其与所述多媒体文件的文件信息的关联度发送给所述播放器 客户端;
所述播放器客户端根据接收的所述字幕文件的文件信息及其与所 述多媒体文件的文件信息的关联度, 从所述字幕服务器中下载所述字幕 文件的内容。
6、 如权利要求 5所述的方法, 其特征在于,
所述播放器客户端接收所述字幕文件的文件信息及所述字幕文件 的文件信息与所述多媒体文件的文件信息的关联度, 根据所述关联度选 择字幕文件, 并从所述字幕服务器中下载所选择的字幕文件的内容。
7、 如权利要求 5所述的方法, 其特征在于,
所述字幕服务器根据接收的所述多媒体文件的文件信息, 查找与所 述多媒体文件关联的字幕文件的文件信息, 根据查找到的字幕文件的文 件信息与所述多媒体文件的文件信息的关联度选择字幕文件, 并将选择 的字幕文件的文件信息发送给所述播放器客户端, 以便所述播放器客户 端接收到所选择的字幕文件的文件信息后, 直接从所述字幕服务器中下 载所选择的字幕文件的内容。
8、 如权利要求 5至 7任一权利要求所述的方法, 其特征在于, 所 述多媒体文件的文件信息包括所述多媒体文件的哈希值; 所述字幕文件 的文件信息包括所述字幕文件的哈希值。
9、 如权利要求 8 所述的方法, 其特征在于, 所述多媒体文件的文 件信息还包括多媒体文件的特征信息; 所述字幕文件的文件信息还包括 字幕文件的特征信息。
10、 如权利要求 9所述的方法, 其特征在于, 所述方法还包括: 字幕服务器根据多媒体文件的哈希值查找与所述多媒体文件关联 的字幕文件的文件信息, 如果没有查找到所述字幕文件的文件信息, 所 述字幕服务器再根据所述多媒体文件的特征信息在所述字幕服务器中 查找与所述多媒体文件的特征信息相匹配的字幕文件, 并将相匹配的字 幕文件的文件信息发送给所述播放器客户端;
所述播放器客户端根据接收的字幕文件的文件信息选择字幕文件, 并从所述字幕服务器中下载选择的字幕文件的内容。
11、 一种上传字幕文件的系统, 其特征在于, 所述系统包括: 播放 器客户端和字幕服务器,
所述播放器客户端, 用于将多媒体文件的文件信息和所述多媒体文 件对应的字幕文件的文件信息发送给字幕服务器; 根据所述字幕服务器 发送的状态消息确定出字幕服务器中不存在所述字幕文件时, 上传所述 字幕文件;
所述字幕服务器, 用于根据所述字幕文件的文件信息和所述多媒体 文件的文件信息, 确定所述多媒体文件的文件信息和所述字幕文件的文 件信息的的关联关系和关联度; 确定所述字幕服务器中是否存在所述字 幕文件, 并将是否存在所述字幕文件的状态消息发给所述播放器客户 端。
12、 如权利要求 11 所述的系统, 其特征在于, 所述字幕服务器, 具体用于分别根据所述字幕文件的文件信息和所述多媒体文件的文件 信息, 查询所述字幕服务器中是否存在所述字幕文件的内容及是否存在 所述多媒体文件的文件信息;
当所述字幕服务器中不存在所述字幕文件的内容但存在所述多媒 体文件的文件信息时, 添加所述字幕文件的文件信息, 建立所述多媒体 文件的文件信息和所述字幕文件的文件信息的关联关系, 并向所述播放 器客户端发送字幕文件不存在的状态消息;
当所述字幕服务器中不存在所述字幕文件的内容且不存在所述多 媒体文件的文件信息时, 添加所述字幕文件的文件信息和所述多媒体文 件的文件信息, 建立所述多媒体文件的文件信息和所述字幕文件的文件 信息的关联关系, 并向所述播放器客户端发送字幕文件不存在的状态消 息;
当所述字幕服务器中存在所述字幕文件的内容且存在所述多媒体 文件的文件信息时, 累加所述多媒体文件的文件信息和所述字幕文件的 文件信息的关联度, 并向所述播放器客户端发送字幕文件存在的状态消 息;
当所述字幕服务器中存在所述字幕文件的内容但不存在所述多媒 体文件的文件信息时, 添加所述多媒体文件的文件信息, 并建立所述多 媒体文件的文件信息和所述字幕文件的文件信息的关联关系, 并向所述 播放器客户端发送字幕文件存在的状态消息;
所述播放器客户端, 在接收到字幕文件存在的状态消息时, 不上传 所述字幕文件, 在接收到字幕文件不存在的状态消息时, 上传所述字幕 文件。
13、 如权利要求 11或 12所述的系统, 其特征在于, 所述多媒体文 件的文件信息包括所述多媒体文件的哈希值; 所述字幕文件的文件信息 包括所述字幕文件的哈希值。
14、 如权利要求 13 所述的系统, 其特征在于, 所述多媒体文件的 文件信息还包括多媒体文件的特征信息; 所述字幕文件的文件信息还包 括字幕文件的特征信息。
15、 一种下载字幕文件的系统, 其特征在于, 所述系统包括: 播放 器客户端和字幕服务器, 所述播放器客户端, 用于将多媒体文件的文件信息发送给字幕服务 器; 根据所述字幕服务器发送的字幕文件的文件信息及其与所述多媒体 文件的文件信息的关联度, 从所述字幕服务器中下载字幕文件的内容; 所述字幕服务器, 用于根据接收的所述多媒体文件的文件信息, 查 找与所述多媒体文件关联的字幕文件的文件信息, 并将查找到的字幕文 件的文件信息及其与所述多媒体文件的文件信息的关联度发送给所述 播放器客户端。
16、 如权利要求 15 所述的系统, 其特征在于, 所述播放器客户端 具体用于接收所述字幕服务器发送的字幕文件的文件信息及其与所述 多媒体文件的文件信息的关联度, 根据所述关联度选择字幕文件, 并从 所述字幕服务器中下载所选择的字幕文件的内容。
17、 如权利要求 15 所述系统, 其特征在于, 所述字幕服务器具体 用于根据接收的所述多媒体文件的文件信息, 查找与所述多媒体文件关 联的字幕文件的文件信息, 根据查找到的字幕文件的文件信息及其与所 述多媒体文件的文件信息的关联度选择字幕文件, 并将选择的字幕文件 的文件信息发送给所述播放器客户端, 以便所述播放器客户端接收到所 述字幕文件的文件信息后, 直接从所述字幕服务器中下载所述字幕文件 的内容。
18、 如权利要求 15至 17任一权项所述的系统, 所述多媒体文件的 文件信息包括所述多媒体文件的哈希值和特征信息; 所述字幕文件的文 件信息包括所述字幕文件的哈希值和特征信息;
所述字幕服务器, 根据多媒体文件的哈希值查找与所述多媒体文件 关联的字幕文件的文件信息, 如果没有查找到所述字幕文件的文件信 息, 再根据所述多媒体文件的特征信息在所述字幕服务器中查找与所述 多媒体文件的特征信息相匹配的字幕文件, 并将所述相匹配的字幕文件 的文件信息发送给所述播放器客户端。
19、 一种播放器客户端设备, 其特征在于, 所述播放器客户端设备 包括:
第一发送模块, 用于将多媒体文件的文件信息和所述多媒体文件对 应的字幕文件的文件信息发送给字幕服务器;
上传模块, 用于根据所述字幕服务器发来的字幕文件的状态消息确 定出该字幕服务器中不存在所述字幕文件时, 上传所述字幕文件。
20、 如权利要求 19所述的设备, 其特征在于, 所述上传模块包括: 第一接收单元, 用于接收所述字幕服务器发送的字幕服务器中是否 存在所述字幕文件的状态消息;
上传单元, 用于在第一接收单元接收到字幕文件存在的状态消息 时, 不上传所述字幕文件; 在第一接收单元接收到字幕文件不存在的状 态消息时, 上传所述字幕文件。
21、一种字幕服务器设备, 其特征在于, 所述字幕服务器设备包括: 确定模块, 用于根据播放器客户端发送的字幕文件的文件信息和所 述多媒体文件的文件信息, 确定所述多媒体文件的文件信息和所述字幕 文件的文件信息的的关联关系和关联度, 确定所述字幕服务器中是否存 在所述字幕文件;
第二发送模块, 用于将是否存在所述字幕文件的状态消息发送给所 述播放器客户端。
22、 如权利要求 21所述的设备, 其特征在于, 所述确定模块包括: 查询单元, 用于根据所述字幕文件的文件信息和所述多媒体文件的 文件信息, 查询所述字幕服务器中是否存在所述字幕文件的内容及是否 存在所述多媒体文件的文件信息;
第一处理单元, 用于当所述字幕服务器中不存在所述字幕文件的内 容但存在所述多媒体文件的文件信息时, 添加所述字幕文件的文件信 息, 建立所述多媒体文件的文件信息和所述字幕文件的文件信息的关联 关系;
第二处理单元, 用于当所述字幕服务器中不存在所述字幕文件的内 容且不存在所述多媒体文件的文件信息时, 添加所述字幕文件的文件信 息和所述多媒体文件的文件信息, 建立所述多媒体文件的文件信息和所 述字幕文件的文件信息的关联关系;
第三处理单元, 用于当所述字幕服务器中存在所述字幕文件的内容 且存在所述多媒体文件的文件信息时, 累加所述多媒体文件的文件信息 和所述字幕文件的文件信息的关联度;
第四处理单元, 用于当所述字幕服务器中存在所述字幕文件的内容 但不存在所述多媒体文件的文件信息时, 添加所述多媒体文件的文件信 息, 并建立所述多媒体文件的文件信息和所述字幕文件的文件信息的关 联关系。
23、 一种播放器客户端设备, 其特征在于, 所述播放器客户端设备 包括:
第三发送模块, 用于将多媒体文件的文件信息发送给字幕服务器; 下载模块, 用于根据所述字幕服务器发来的字幕文件的文件信息及 其与所述多媒体文件的文件信息的关联度, 从所述字幕服务器中下载所 述字幕文件的内容。
24、 如权利要求 23所述的设备, 其特征在于, 所述下载模块包括: 第二接收单元, 用于接收所述字幕服务器发送的字幕文件的文件信 息及所述字幕文件的文件信息与所述多媒体文件的文件信息的关联度; 第一选择单元, 用于根据所述字幕文件的文件信息与所述多媒体文 件的文件信息的关联度, 选择字幕文件, 并从所述字幕服务器中下载所 选择的字幕文件的内容。
25、一种字幕服务器设备, 其特征在于, 所述字幕服务器设备包括: 第一查找模块, 用于根据播放器客户端发送的多媒体文件的文件信 息, 查找与所述多媒体文件关联的字幕文件的文件信息;
第四发送模块, 用于将查找到的字幕文件的文件信息及其与所述多 媒体文件的文件信息的关联度发送给所述播放器客户端。
26、 如权利要求 25所述的设备, 其特征在于, 所述第一查找模块, 具体包括:
查找单元, 用于根据所述播放器客户端发来的多媒体文件的文件信 息, 查找与所述多媒体文件关联的字幕文件的文件信息;
第二选择单元, 用于根据查找到的字幕文件的文件信息及其与所述 多媒体文件的文件信息的关联度选择字幕文件, 并将所选择的字幕文件 的文件信息发送给所述播放器客户端, 以便所述播放器客户端接收到所 述文件信息后, 直接从所述字幕服务器中下载选择的字幕文件的内容。
27、 如权利要求 26所述的设备, 其特征在于, 所述设备还包括: 第二查找模块, 用于根据多媒体文件的哈希值查找与所述多媒体文 件关联的字幕文件的文件信息, 如果不存在所述字幕文件, 再根据所述 多媒体文件的特征信息在所述字幕服务器中查找与所述多媒体文件的 特征信息相匹配的字幕文件, 并将相匹配的字幕文件的文件信息发送给 所述播放器客户端, 以便所述播放器客户端根据接收的字幕文件的文件 信息选择字幕文件, 从所述字幕服务器中下载选择的字幕文件的内容。
PCT/CN2010/073510 2009-07-27 2010-06-03 一种上传和下载字幕文件的方法、系统和设备 WO2011012021A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
SG2011091840A SG177249A1 (en) 2009-07-27 2010-06-03 Method, system and device for uploading and downloading a caption file
US13/340,993 US8595330B2 (en) 2009-07-27 2011-12-30 Method, system and apparatus for uploading and downloading a caption file

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910089875.2 2009-07-27
CN2009100898752A CN101616181B (zh) 2009-07-27 2009-07-27 一种上传和下载字幕文件的方法、系统和设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/340,993 Continuation US8595330B2 (en) 2009-07-27 2011-12-30 Method, system and apparatus for uploading and downloading a caption file

Publications (1)

Publication Number Publication Date
WO2011012021A1 true WO2011012021A1 (zh) 2011-02-03

Family

ID=41495581

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/073510 WO2011012021A1 (zh) 2009-07-27 2010-06-03 一种上传和下载字幕文件的方法、系统和设备

Country Status (5)

Country Link
US (1) US8595330B2 (zh)
CN (1) CN101616181B (zh)
MY (1) MY156810A (zh)
SG (1) SG177249A1 (zh)
WO (1) WO2011012021A1 (zh)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616181B (zh) 2009-07-27 2013-06-05 腾讯科技(深圳)有限公司 一种上传和下载字幕文件的方法、系统和设备
CN102164404B (zh) * 2010-02-20 2016-01-13 中兴通讯股份有限公司 个人网络系统及其业务实现方法
CN102170420A (zh) * 2010-02-26 2011-08-31 腾讯科技(深圳)有限公司 一种获取铃音的方法及铃音获取系统
CN102387310A (zh) * 2010-08-31 2012-03-21 腾讯科技(深圳)有限公司 定位视频片段的方法和装置
CN103179093B (zh) * 2011-12-22 2017-05-31 腾讯科技(深圳)有限公司 视频字幕的匹配系统和方法
CN102546783A (zh) * 2011-12-28 2012-07-04 深圳市新为软件有限公司 课程资源下载方法和课程资源客户端、服务器和系统
CN102802044A (zh) * 2012-06-29 2012-11-28 华为终端有限公司 视频处理方法、终端及字幕服务器
CN103678381A (zh) * 2012-09-17 2014-03-26 腾讯科技(深圳)有限公司 字幕处理方法、装置及系统
US8695048B1 (en) * 2012-10-15 2014-04-08 Wowza Media Systems, LLC Systems and methods of processing closed captioning for video on demand content
US8782722B1 (en) 2013-04-05 2014-07-15 Wowza Media Systems, LLC Decoding of closed captions at a media server
CN103686352A (zh) * 2013-11-15 2014-03-26 乐视致新电子科技(天津)有限公司 智能电视媒体播放器及其字幕处理方法、智能电视
CN103997661A (zh) * 2014-04-29 2014-08-20 四川长虹电器股份有限公司 视频与字幕文件智能适配下载系统及方法
CN104104986B (zh) * 2014-07-29 2017-08-22 小米科技有限责任公司 音频与字幕的同步方法和装置
CN105635146A (zh) * 2015-12-28 2016-06-01 美的集团股份有限公司 动态配置协议的方法和系统
CN107818535A (zh) * 2017-11-17 2018-03-20 湖南优图信息技术有限公司 一种地下管线数据管理方法、装置及系统
CN108377416A (zh) * 2018-02-27 2018-08-07 维沃移动通信有限公司 一种视频播放方法及移动终端
CN108632663B (zh) * 2018-06-19 2021-02-02 西安中科深度生态环境科技有限责任公司 数字化音视频和字幕的处理方法及系统
CN109919808B (zh) * 2019-03-18 2021-08-13 厦门叁玖叁科技有限公司 商标智能申报方法、介质、计算机设备及系统
CN112887806A (zh) * 2021-01-25 2021-06-01 当趣网络科技(杭州)有限公司 字幕处理方法、装置、电子设备及介质
CN113554529A (zh) * 2021-09-18 2021-10-26 中国电力科学研究院有限公司 反窃电取证关键数据处理方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777943A (zh) * 2003-08-05 2006-05-24 三星电子株式会社 存储下载文本对白字幕的信息的信息存储介质及再现对白字幕的方法和设备
KR20070059537A (ko) * 2005-12-07 2007-06-12 주식회사 대우일렉트로닉스 멀티미디어 자막 파일 재생 시스템
WO2007119893A1 (en) * 2006-04-18 2007-10-25 Inka Entworks, Inc. Method of providing caption information and system thereof
CN101452726A (zh) * 2008-11-15 2009-06-10 康佳集团股份有限公司 一种可下载和显示歌词的多媒体播放系统和方法
CN101616181A (zh) * 2009-07-27 2009-12-30 腾讯科技(深圳)有限公司 一种上传和下载字幕文件的方法、系统和设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7383229B2 (en) * 2003-03-12 2008-06-03 Yahoo! Inc. Access control and metering system for streaming media
TW200516398A (en) * 2003-11-11 2005-05-16 Benq Corp Method for on-line selection and playback of a multi-media file
CN101179347B (zh) * 2007-12-21 2010-11-24 深圳市迅雷网络技术有限公司 一种提供文本文件信息的方法、系统及服务端
CN101267330A (zh) * 2008-04-29 2008-09-17 深圳市迅雷网络技术有限公司 播放多媒体文件的方法及装置
US8370520B2 (en) * 2008-11-24 2013-02-05 Juniper Networks, Inc. Adaptive network content delivery system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1777943A (zh) * 2003-08-05 2006-05-24 三星电子株式会社 存储下载文本对白字幕的信息的信息存储介质及再现对白字幕的方法和设备
KR20070059537A (ko) * 2005-12-07 2007-06-12 주식회사 대우일렉트로닉스 멀티미디어 자막 파일 재생 시스템
WO2007119893A1 (en) * 2006-04-18 2007-10-25 Inka Entworks, Inc. Method of providing caption information and system thereof
CN101452726A (zh) * 2008-11-15 2009-06-10 康佳集团股份有限公司 一种可下载和显示歌词的多媒体播放系统和方法
CN101616181A (zh) * 2009-07-27 2009-12-30 腾讯科技(深圳)有限公司 一种上传和下载字幕文件的方法、系统和设备

Also Published As

Publication number Publication date
US8595330B2 (en) 2013-11-26
CN101616181A (zh) 2009-12-30
MY156810A (en) 2016-03-31
US20120102158A1 (en) 2012-04-26
SG177249A1 (en) 2012-02-28
CN101616181B (zh) 2013-06-05

Similar Documents

Publication Publication Date Title
WO2011012021A1 (zh) 一种上传和下载字幕文件的方法、系统和设备
US20200336769A1 (en) Video Live Broadcast Method and Apparatus
US7752202B2 (en) Information processing and, content distribution apparatus method, and program with conversion identification information
US8620699B2 (en) Heavy influencer media recommendations
CN103379362B (zh) 视频点播方法和系统
KR101056617B1 (ko) 정보 처리 장치, 및 콘텐츠 정보 처리 방법
CN107231581B (zh) 用于视频播放的方法、系统及流媒体播放控制服务器
WO2016029804A1 (zh) 一种视频播放方法、媒体设备、播放设备以及多媒体系统
US20120071996A1 (en) Embedded media recommendations
CN104503864A (zh) 一种基于局域网的文件备份方法和装置
EP3139573B1 (en) Media processing method and device
CN102170420A (zh) 一种获取铃音的方法及铃音获取系统
EP3754998B1 (en) Streaming media quality monitoring method and system
WO2014161310A1 (zh) 一种多媒体资源的播放方法及装置
WO2014043969A1 (zh) 一种信息传送的方法及装置
KR20060095555A (ko) 콘텐트 디렉토리 서비스를 갖는 시스템을 위한 변환 서비스
CN105872742A (zh) 网络视频下载方法和用户终端设备
CN112543361B (zh) 基于智能座舱的多设备播放方法、装置以及电子终端
CN113949739B (zh) 跨设备播放方法、装置、电子设备及存储介质
US20150288731A1 (en) Content switching method and apparatus
CN105138285A (zh) 拍摄数据的共享方法、装置及设备
CN105095321A (zh) 一种电子书签的实现方法、装置及电子设备
US8824854B2 (en) Method and arrangement for transferring multimedia data
CN116366893A (zh) 一种视频播放方法、装置、系统、电子设备及存储介质
JP6009501B2 (ja) データセグメントのオプションのブロードキャスト配信によるストリーミング

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10803854

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM1205A DATED 05/06/2012)

122 Ep: pct application non-entry in european phase

Ref document number: 10803854

Country of ref document: EP

Kind code of ref document: A1