File upload method, user terminal, network disk server, device and medium
By matching filenames and subtitles in the cloud storage system, the system can identify the video file to be uploaded and the video file already stored on the server, thus solving the problem of repeatedly uploading video files with different resolutions but the same content, and saving storage resources.
Patent Information
- Application Number
- CN202211000833.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Existing cloud storage systems cannot recognize video files with the same content but different resolutions, resulting in duplicate uploads of video files with the same content, which wastes storage resources.
By matching filenames and subtitles between the user's terminal and the cloud storage server, the system identifies the file to be uploaded against video files already stored on the server, and provides the identification results to the user to decide whether to upload.
It accurately identifies video files with identical content, avoiding duplicate uploads and saving server-side storage resources.
Smart Images

Figure CN115361377B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a file uploading method, a user terminal, a network disk server, a computer device and a computer-readable storage medium. Background Art
[0002] Netdisk, also known as network hard disk, is an online storage service launched by some Internet companies. Netdisk servers allocate a certain amount of disk space for users, and provide users with file storage, access, backup, sharing and other file management functions for free or for a fee, and have advanced disaster recovery backups around the world. Users can regard the netdisk as a hard disk or USB flash drive placed on the network. Whether at home, at work or anywhere else, as long as they are connected to the Internet, they can manage and edit the files in the netdisk without having to carry them with them, and they are not afraid of losing them.
[0003] In order to increase the speed of file uploads and reduce disk usage, current network disks often use a method of first verifying the uploaded file to see whether the server has already stored the file. If the server has already stored the file, there is no need to upload it again. For example, the network disk server generates verification codes for the large files stored therein one by one, such as using algorithms such as MD5 (Message-Digest Algorithm) or SHA (Secure Hash Algorithm), thereby forming a verification code library. For example, if user A is about to upload a large file, the network disk server will first calculate the verification code of the file, and then check whether the verification code already exists in its own verification code library. If so, it means that the file has already been stored in the network disk server and does not need to be uploaded.
[0004] However, the existing solution can only identify whether the network disk server stores video files with the same content and the same clarity as the video file to be uploaded. It cannot identify video files with the same video content but different clarity (the two have different verification codes). Many users do not have high requirements for the clarity of video files. For these users, the use of the existing solution will lead to repeated uploading of video files with the same content, resulting in a waste of storage resources. Summary of the invention
[0005] The present invention is completed in order to at least partially solve the technical problem in the prior art that when a user uploads a video file to a network disk server, video files with the same content but different resolutions cannot be identified, resulting in repeated uploading of video files with the same content.
[0006] According to one aspect of the present invention, there is provided a file uploading method, which is applied to a user terminal, and the method comprises:
[0007] Get the file to be uploaded;
[0008] Determine whether the file to be uploaded is a video file. If so, extract its file name and subtitles;
[0009] Send the file name and subtitles of the file to be uploaded to the network disk server, so that the network disk server searches for video files that match the file name and subtitles of the file to be uploaded to obtain a search result, and sends the search result to the user terminal;
[0010] Receive the search results sent by the network disk server and push them to the user; and,
[0011] Determine whether to upload the file to be uploaded to the network disk server based on the user's instruction.
[0012] Optionally, sending the file name and subtitles of the file to be uploaded to the network disk server includes:
[0013] Sending the file name of the file to be uploaded to the network disk server, so that the network disk server pre-processes the file name of the file to be uploaded to obtain key information of the file name, and retrieves the key information of the file name in a pre-stored video file information table, and in response to retrieving at least one video file information matching the key information of the file name, returns a message of successful file name matching to the user terminal; and
[0014] In response to receiving a file name matching success message sent by the network disk server, the subtitles of the file to be uploaded are sent to the network disk server, so that the network disk server uses the video file subtitles corresponding to each piece of video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain the search results, and sends the search results to the user terminal.
[0015] Optionally, after obtaining the file to be uploaded, the following steps are further included:
[0016] Determine whether the size of the file to be uploaded is lower than a preset threshold;
[0017] If not, the step of determining whether the file to be uploaded is a video file is executed.
[0018] Optionally, after determining that the size of the file to be uploaded is not less than a preset threshold, the method further includes:
[0019] Obtaining a verification code for the file to be uploaded; and,
[0020] Sending the verification code of the file to be uploaded to the network disk server, so that the network disk server retrieves the verification code of the file to be uploaded from the verification code library therein, and in response to not retrieving the verification code of the file to be uploaded, returns information that there is no identical verification code to the user terminal;
[0021] The determination of whether the file to be uploaded is a video file is specifically as follows:
[0022] In response to receiving the non-identical verification code information sent by the network disk server, a step of determining whether the file to be uploaded is a video file is executed.
[0023] According to another aspect of the present invention, a file uploading method is provided, which is applied to a network disk server, and the method comprises:
[0024] Receiving the file name and subtitles of the file to be uploaded sent by the user terminal, wherein after obtaining the file to be uploaded, the user terminal extracts the file name and subtitles when determining that the file to be uploaded is a video file and sends them to the network disk server;
[0025] Searching the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain search results; and,
[0026] The search results are sent to the user terminal so that the user terminal pushes the search results to the user and determines whether to upload the file to be uploaded to the network disk server based on the user's instruction.
[0027] Optionally, after receiving the file name of the file to be uploaded sent by the user terminal, the method further includes:
[0028] Preprocess the file name of the uploaded file to obtain key information of the file name;
[0029] The step of searching the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain a search result includes:
[0030] Retrieving the file name key information in a pre-stored video file information table, and in response to retrieving at least one video file information matching the file name key information, returning a file name matching success message to the user terminal, so that the user terminal sends the subtitles of the file to be uploaded to the network disk server based on the file name matching success message; and
[0031] The video file subtitles corresponding to the video file information matching the file name key information are used to search in the subtitles of the file to be uploaded to obtain the search results.
[0032] Optionally, the using of the video file subtitles corresponding to the video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain the search results includes:
[0033] For each video file subtitle corresponding to the video file information matching the key information of the file name, randomly extract a first subtitle segment of a preset length, and use the first subtitle segment to search in the subtitles of the file to be uploaded;
[0034] In response to retrieving a first subtitle segment in the subtitles of the file to be uploaded, a second subtitle segment of a preset length is randomly extracted, and the second subtitle segment is used to search in the subtitles of the file to be uploaded, and the aforementioned subtitle segment extraction and retrieval steps are repeated until the Nth subtitle segment is retrieved in the subtitles of the file to be uploaded, N≥2, and the preset basic information of the video file is added to the same file set and a retrieval result is generated.
[0035] Optionally, it also includes:
[0036] In response to not finding the i-th subtitle segment extracted from the subtitles of the video file in the subtitles of the file to be uploaded, 1≤i≤N, the step of continuing to extract and search the next subtitle segment from the subtitles of the video file is skipped, and the video file subtitles corresponding to the next video file information are continued to be searched in the subtitles of the file to be uploaded until all the video file subtitles corresponding to the video file information matching the file name key information are retrieved.
[0037] According to another aspect of the present invention, there is provided a user terminal, comprising:
[0038] An acquisition module is configured to acquire files to be uploaded;
[0039] A judgment module, which is configured to judge whether the file to be uploaded is a video file;
[0040] An extraction module, configured to extract the file name and subtitles of the file to be uploaded when the judgment result of the judgment module is yes;
[0041] A first sending module, which is configured to send the file name and subtitles of the file to be uploaded to the network disk server, so that the network disk server searches for video files that match the file name and subtitles of the file to be uploaded to obtain a search result, and sends the search result to the user terminal;
[0042] A first receiving module, which is configured to receive the search result sent by the network disk server;
[0043] The first sending module is further configured to push the search results to the user; and
[0044] The upload module is configured to determine whether to upload the file to be uploaded to the network disk server based on the user's instructions.
[0045] According to another aspect of the present invention, there is provided a network disk server, comprising:
[0046] A second receiving module is configured to receive the file name and subtitles of the file to be uploaded sent by the user terminal, wherein after obtaining the file to be uploaded, the user terminal extracts the file name and subtitles when determining that the file to be uploaded is a video file and sends them to the network disk server;
[0047] A search module configured to search the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain search results; and
[0048] The second sending module is configured to send the search results to the user terminal so that the user terminal pushes the search results to the user and determines whether to upload the file to be uploaded to the network disk server based on the user's instruction.
[0049] According to yet another aspect of the present invention, there is provided a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the aforementioned file uploading method.
[0050] According to another aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the processor executes the aforementioned file uploading method.
[0051] The technical solution provided by the present invention may include the following beneficial effects:
[0052] The file uploading method provided by the present invention can accurately identify the video file with the same content as the file to be uploaded by matching the file name and subtitles of the file to be uploaded by the user with the video file stored on the server, and push the identification result to the user so that the user can make an instruction on whether to upload the file to be uploaded to the server according to the identification result, which can effectively avoid repeated uploading of video files with the same content and save storage resources on the server.
[0053] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0055] Figure 1 A flowchart of a file uploading method provided by an embodiment of the present invention;
[0056] Figure 2 A flowchart of another file uploading method provided by an embodiment of the present invention;
[0057] Figure 3A schematic diagram of the structure of a user terminal provided by an embodiment of the present invention;
[0058] Figure 4 A schematic diagram of the structure of a network disk server provided in an embodiment of the present invention;
[0059] Figure 5 A schematic diagram of the structure of a file upload system provided by an embodiment of the present invention;
[0060] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] To make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence; and, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be arbitrarily combined with each other.
[0063] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0064] Figure 1 The present invention provides a flowchart of a method for uploading files. The method is applied to a user terminal, in which a network disk client is installed, and is used to establish communication with a network disk server. Figure 1 As shown, the method includes the following steps S101 to S106.
[0065] S101. Obtain the file to be uploaded.
[0066] In this step, the user terminal can obtain the file to be uploaded in a variety of ways, for example, downloading files through various channels, receiving files sent by other terminals, or the terminal user making files himself.
[0067] S102. Determine whether the file to be uploaded is a video file. If so, execute step S103; if not, end the current process.
[0068] In this step, the file suffix (also called file extension) can be used to determine whether the file to be uploaded is a video file. For example, common video file suffixes include: ".mkv", ".avi", ".wmv", ".mpg", ".mpeg", ".mov", ".rmvb", ".rm", ".ram", ".flv", ".mp4", etc. If the file to be uploaded is a video file, the following steps are executed, otherwise the technical solution of the present invention is jumped out, and the user can decide whether to upload the file to be uploaded to the network disk server.
[0069] S103. Extract the file name and subtitles of the file to be uploaded.
[0070] In this step, for video files where the video and subtitles are stored separately, such as video files with the suffix ".mkv", their subtitles can be directly read. For video files where the video and subtitles are not stored separately, it is necessary to use existing video subtitle automatic extraction tools to extract subtitles. Of course, if the file name and subtitles of the file to be uploaded fail to be extracted, the current process ends and the subsequent steps are not performed.
[0071] S104. Send the file name and subtitles of the file to be uploaded to the network disk server, so that the network disk server searches for video files that match the file name and subtitles of the file to be uploaded to obtain search results, and sends the search results to the user terminal.
[0072] In this step, the retrieval results are divided into two situations. The first situation is that at least one video file that matches the file name and subtitles of the file to be uploaded is retrieved in the network disk server, indicating that the server side stores at least one video file with the same content as the file to be uploaded. These video files have the same content as the file to be uploaded, and the clarity may be the same or different. At this time, the retrieval results may include information such as the name, version and file size of these matching video files, among which the file size determines the video clarity; the second situation is that no video file that matches the file name and subtitles of the file to be uploaded is retrieved in the network disk server. If at least one of the file name and subtitles fails to match, it means that the server side does not store a video file with the same content as the file to be uploaded. At this time, the retrieval results may include a prompt message that there is no matching file.
[0073] S105. Receive the search results sent by the network disk server and push them to the user.
[0074] In this step, after receiving the search results sent by the network disk server, the user terminal directly pushes them to the user, that is, interacts with the user to prompt the user whether the server has stored files with the same content.
[0075] S106. Determine whether to upload the file to be uploaded to the network disk server based on the user instruction.
[0076] In this step, after the user receives the search results pushed by the user terminal, for the first case, in order to save storage resources, the existing files on the server side can be used without uploading the files to be uploaded to the network disk server. At this time, the user generally indicates "do not upload", and the user terminal will no longer upload the files to be uploaded to the network disk server based on the user's instructions. Of course, the user can also indicate to upload according to the situation, and the user terminal will directly upload the files to be uploaded to the network disk server based on the user's instructions; for the second case, since the server side does not store a video file that matches the file name and subtitles of the file to be uploaded, the user indicates "upload" at this time, and the user terminal will directly upload the files to be uploaded to the network disk server based on the user's instructions.
[0077] In a specific implementation, step S104 specifically includes the following steps S104a and S104b.
[0078] S104a sends the file name to be uploaded to the network disk server, so that the network disk server pre-processes the file name of the uploaded file to obtain the key information of the file name, and retrieves the key information of the file name in the pre-stored video file information table, and in response to retrieving at least one video file information matching the key information of the file name, returns a message of successful file name matching to the user terminal;
[0079] S104b. In response to receiving the file name matching success message sent by the network disk server, the subtitles of the file to be uploaded are sent to the network disk server, so that the network disk server uses the video file subtitles corresponding to each piece of video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain the search results, and sends the search results to the user terminal.
[0080] In this embodiment, a video file information table is pre-stored in the network disk server, and the video file information table stores basic information of some or all video files in the network disk server, such as video ID, video name, subtitles, etc. The video file information table records multiple video file information, each video file information occupies a row in the table, corresponding to a video file stored on the server side, and the video file information includes fields such as the video ID, video name, and subtitles of the video file.
[0081] The "Video ID" field records the unique identifier of the video file on the server side.
[0082] The "Video Name" field can record the official name of the corresponding video file instead of the file name. For example, the file name of a video file is "96. Harry Potter and the Chamber of Secrets (Extended Edition) Harry Potter and the Chamber of Secrets (2002)", and its official Chinese name is "Harry Potter and the Chamber of Secrets", and its official English name is "Harry Potter and the Chamber of Secrets"; the official name can be in any language, such as Chinese, English, Japanese, French, etc., and can be either a monolingual name or a bilingual name. The function of this field is to perform fuzzy matching with the file name of the file to be uploaded by the user, so it does not need to be very accurate, so it can also be an excerpt of the official name. For example, in the previous example, the English name can also be simplified to "Harry Potter", but more video files may be matched accordingly, increasing the workload of subsequent subtitle matching. This field does not contain episode information (such as "episode", "season", etc.). Taking the American TV series "Friends" as an example, it contains many seasons and many episodes, so no matter which episode, the English name is "Friends". As for the Chinese name, the rules are similar to the aforementioned English name, and will not be repeated here.
[0083] It should be noted that the specific language of the "Video Name" field is set according to the usage habits of the target user group and can be adjusted dynamically. For example, in China, this field can be "Chinese Name" and "English Name", and in France, this field may need to be modified to "French Name" and "English Name". The "Video Name" field can contain two subfields (i.e., bilingual name: Chinese name and foreign name), or only one subfield (i.e., monolingual name: name in any language), but it cannot be empty. Of course, the video file information table pre-stored in the network disk server needs to be updated at regular intervals based on the existing video file status on the server side.
[0084] The "subtitle" field may record part or all of the subtitle content of the video file, or may record the subtitle storage address of the video file. The subtitles of the corresponding video file may be obtained by accessing the subtitle storage address.
[0085] The following is an explanation using Table 1 as an example.
[0086] Table 1
[0087]
[0088] As shown in Table 1, the video ID of one of the video file information records is 011, the video name includes the English name "Harry Potter and the Chamber of Secrets", and the subtitles record all subtitle contents of the video file.
[0089] After receiving the file name of the file to be uploaded sent by the user terminal, the network disk server first performs preprocessing, for example, removing the digital information in the file name, including the number, year, number of episodes, number of seasons, etc., removing the version information in the file name, such as the extended version, high-definition version, etc., and separating the names of different languages when the file name contains multi-language names, thereby obtaining the key information of the file name. Then, the key information of the file name is retrieved in the pre-stored video file information table to retrieve whether the key information of the file name of the file to be uploaded exists in the video file information table (i.e., fuzzy matching of the video name). The retrieval method is line-by-line retrieval, that is, checking line by line whether the key information of the file name of the file to be uploaded is included in the "video name" field of one or more video file information in the video file information table. If one or more matching video file information is retrieved, the video ID of the corresponding video file information is recorded, and a file name matching success message is returned to the user terminal. It should be noted that if the server stores two video files with the same video name, for example, one is a 720P version and the other is a 1020P version, then two video file information will be retrieved; if no matching video file information is retrieved, a file name matching failure message is returned to the user terminal. After the user terminal receives the file name matching success message sent by the network disk server, it sends the subtitles of the file to be uploaded to the network disk server. The network disk server then uses the video file subtitles corresponding to the previously recorded video ID to search in the subtitles of the file to be uploaded, and returns the corresponding search results to the user terminal; after the user terminal receives the file name matching failure message, it no longer executes the subsequent subtitle matching steps, but directly obtains the search result of no matching file.
[0090] Taking the above Table 1 as an example, the file name of the file to be uploaded is "96. Harry Potter and the Chamber of Secrets (Extended Edition) Harry Potter and the Chamber of Secrets (2002)", first remove the digital information and version information in the file name to obtain "Harry Potter and the Chamber of Secrets", then separate the names in different languages in the file name to obtain the file name key information "Harry Potter and the Chamber of Secrets" and "Harry Potter and the Chamber of Secrets", then search "Harry Potter and the Chamber of Secrets" and "Harry Potter and the Chamber of Secrets" line by line in the pre-stored video file information table, and successfully retrieve a video file information with a video ID of "011" and a video name field containing "Harry Potter and the Chamber of Secrets", finally use the video file subtitles recorded in the subtitle field in the video file information corresponding to the video ID "011" to search in the subtitles of the file to be uploaded, and obtain the corresponding search result.
[0091] In a specific implementation, after step S101, the following step S107 is also included.
[0092] S107. Determine whether the size of the file to be uploaded is lower than a preset threshold. If so, end the current process. If not, execute step S102 to determine whether the file to be uploaded is a video file.
[0093] In this embodiment, the size of the file to be uploaded can be determined first. Small and micro files below the preset threshold can be directly uploaded to the network disk server without executing subsequent steps because they occupy less space. Larger files greater than or equal to the preset threshold need to execute subsequent steps to determine whether to upload them to the network disk server. As for the specific value of the preset threshold, it can be set and adjusted by those skilled in the art according to actual needs.
[0094] In a specific implementation, after it is determined in step S107 that the size of the file to be uploaded is not less than a preset threshold, the following steps S108 to S109 are also included.
[0095] S108. Get the verification code of the file to be uploaded;
[0096] S109. Send the verification code of the file to be uploaded to the network disk server, so that the network disk server retrieves the verification code of the file to be uploaded from its verification code library, and returns no identical verification code information to the user terminal in response to failure to retrieve the verification code of the file to be uploaded.
[0097] Accordingly, step S102 is specifically as follows:
[0098] In response to receiving the non-identical verification code information sent by the network disk server, a step of determining whether the file to be uploaded is a video file is executed.
[0099] In this embodiment, for files to be uploaded that are greater than or equal to a preset threshold, it can be determined first whether the verification code of the file to be uploaded is in the verification code library pre-stored in the network disk server. If not, it means that the network disk server does not store any file with the same content as the file to be uploaded, and returns the information of no identical verification code to the user terminal. After receiving the information of no identical verification code, the user terminal executes subsequent steps to determine whether to upload it to the network disk server; if it is, it means that the network disk server has stored a file with the same content as the file to be uploaded, and returns the same verification code information to the user terminal. After receiving the same verification code information, the user terminal can directly determine not to upload the file to be uploaded to the network disk server to avoid repeated uploading of exactly the same files.
[0100] Of course, the verification code library pre-stored in the network disk server needs to be updated at regular intervals based on the existing file status on the server side.
[0101] It should be noted that the order of the above steps is only a specific example provided to illustrate the embodiment of the present invention. The present invention does not limit the order of the above steps, and those skilled in the art may adjust them as needed in practical applications; and the size of the sequence numbers of the above steps does not limit their execution order.
[0102] Figure 2 The present invention provides another method for uploading files in accordance with an embodiment of the present invention. The method is applied to a network disk server, which can establish communication with a network disk client installed in a user terminal. Figure 2 As shown, the method includes the following steps S201 to S203.
[0103] S201. Receive the file name and subtitles of the file to be uploaded sent by the user terminal, wherein after obtaining the file to be uploaded, the user terminal extracts the file name and subtitles when determining that the file to be uploaded is a video file and sends them to the network disk server.
[0104] In this step, the user terminal can determine whether the file to be uploaded is a video file by the file suffix (also called file extension), and can directly read the subtitles of video files in which the video and subtitles are stored separately, and extract the subtitles of video files in which the video and subtitles are not stored separately by using existing video subtitle automatic extraction tools.
[0105] S202. Search the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain a search result.
[0106] In this step, the search results are divided into two situations. The first situation is that at least one video file that matches the file name and subtitles of the file to be uploaded is retrieved in the network disk server. At this time, the search results may include information such as the name, version and file size of these matching video files; the second situation is that no video file that matches the file name and subtitles of the file to be uploaded is retrieved in the network disk server. For example, at least one of the file name and subtitles fails to match. At this time, the search results may include a prompt message that there is no matching file.
[0107] S203. Send the search result to the user terminal, so that the user terminal pushes the search result to the user, and determines whether to upload the file to be uploaded to the network disk server based on the user instruction.
[0108] In this step, after receiving the search results sent by the network disk server, the user terminal directly pushes them to the user. After the user receives the search results pushed by the user terminal, for the first case, in order to save storage resources, the existing files on the server side can be used without uploading the files to be uploaded to the network disk server. At this time, the user indicates "do not upload", and the user terminal no longer uploads the files to be uploaded to the network disk server based on the user's instructions; for the second case, since the server side does not store a video file that matches the file name and subtitles of the file to be uploaded, the user indicates "upload" at this time, and the user terminal directly uploads the files to be uploaded to the network disk server based on the user's instructions.
[0109] In a specific implementation manner, after the file name of the file to be uploaded sent by the user terminal is received in step S201, the following step S204 is also included.
[0110] S204. Preprocess the file name of the file to be uploaded to obtain key information of the file name.
[0111] Accordingly, step S202 specifically includes the following steps S202a and S202b.
[0112] S202a retrieves the file name key information in the pre-stored video file information table, and in response to retrieving at least one video file information that matches the file name key information, returns a file name match success message to the user terminal, so that the user terminal sends the subtitles of the file to be uploaded to the network disk server based on the file name match success message;
[0113] S202b. Use the video file subtitles corresponding to the video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain search results.
[0114] In this embodiment, a video file information table is pre-stored in the network disk server, and the video file information table stores basic information of some or all video files in the network disk server, such as video ID, video name, subtitles, etc. The video file information table records multiple video file information, each video file information occupies a row in the table, corresponding to a video file stored on the server side, and the video file information includes fields such as the video ID, video name, and subtitles of the video file.
[0115] The network disk server first preprocesses the file name of the file to be uploaded, for example, removes the digital information in the file name, including the number, year, number of episodes, number of seasons, etc., removes the version information in the file name, such as the extended version, high-definition version, etc., and separates the names of different languages when the file name contains multiple languages, so as to obtain the key information of the file name. Then, the key information of the file name is retrieved in the pre-stored video file information table to retrieve whether the key information of the file name of the file to be uploaded exists in the video file information table (i.e., fuzzy matching of the video name). The retrieval method is line-by-line retrieval, that is, line-by-line checking whether the key information of the file name of the file to be uploaded is contained in the "video name" field of one or more video file information in the video file information table. If one or more matching video file information is retrieved, the video ID of the corresponding video file information is recorded, and a file name matching success message is returned to the user terminal; if no matching video file information is retrieved, a file name matching failure message is returned to the user terminal. After the user terminal receives the file name matching success message sent by the network disk server, it sends the subtitles of the file to be uploaded to the network disk server. The network disk server then uses the video file subtitles corresponding to the previously recorded video ID to search in the subtitles of the file to be uploaded, and returns the corresponding search results to the user terminal; after the user terminal receives the file name matching failure message, it no longer executes the subsequent subtitle matching steps, but directly obtains the search result of no matching file.
[0116] In a specific implementation, step S202b specifically includes the following steps B1 to B3.
[0117] B1. For each video file subtitle corresponding to the video file information matching the key information of the file name, randomly extract the first subtitle segment of a preset length, and use the first subtitle segment to search in the subtitles of the file to be uploaded;
[0118] B2. In response to retrieving the first subtitle segment in the subtitles of the file to be uploaded, randomly extracting a second subtitle segment of a preset length, and using the second subtitle segment to search in the subtitles of the file to be uploaded, and repeatedly performing the aforementioned subtitle segment extraction and retrieval steps until the Nth subtitle segment is retrieved in the subtitles of the file to be uploaded, where N≥2;
[0119] B3. In response to the execution result of step B2 being that the Nth subtitle segment is retrieved in the subtitles of the file to be uploaded, the preset basic information of the video file is added to the same file set and a retrieval result is generated.
[0120] In this embodiment, for each video file stored on the server side that matches the file name of the file to be uploaded, first select the subtitle of the video file that matches the first file name, randomly extract a subtitle of L bytes from it, and search it in the subtitle of the file to be uploaded. If the exact same subtitle can be retrieved, proceed to the next step, randomly extract a subtitle of L bytes, and search it in the subtitle of the file to be uploaded. Repeat the above subtitle segment extraction and retrieval steps until the subtitles of N consecutive times of L bytes extracted from the subtitle of the video file that matches the first file name can be retrieved in the subtitle of the file to be uploaded, which means that the video file that matches the first file name is the same file as the file to be uploaded, and add its preset basic information to the same file set. As for the specific value of L, it can be set and adjusted by those skilled in the art according to actual needs. Then select the subtitle of the video file that matches the second file name, and repeat the steps of extracting N consecutive times of L bytes from the subtitle of the video file that matches the second file name and searching in the subtitle of the file to be uploaded respectively, until the subtitles of all video files that match the file name are retrieved. Then generate the retrieval result according to the final same file set and send it to the user terminal. It can be seen that the preset basic information of all video files that match the file name and subtitles of the file to be uploaded is recorded in the same file collection, such as name, version, size and other information. Generally, the larger the video file, the higher the clarity. The user can compare the file to be uploaded with the video file with the same content already stored on the server to know which one has higher clarity, which one occupies less space, and which one best meets the user's needs in terms of clarity and occupied space, thereby facilitating the user to make instructions to "upload" or "not upload" the file to be uploaded.
[0121] In a specific implementation, during the execution of step B2, the following is further included:
[0122] In response to not finding the i-th subtitle segment extracted from the subtitles of the video file in the subtitles of the file to be uploaded, 1≤i≤N, the step of continuing to extract and search the next subtitle segment from the subtitles of the video file is skipped, and the video file subtitles corresponding to the next video file information are continued to be searched in the subtitles of the file to be uploaded until all the video file subtitles corresponding to the video file information matching the file name key information are retrieved.
[0123] In this embodiment, for the subtitles of any video file matching the file name, in the process of continuously extracting L-byte subtitles N times, the next subtitle extraction is performed only when the L-byte subtitles extracted last time can be retrieved in the subtitles of the file to be uploaded. Once the L-byte subtitles extracted at a certain time cannot be retrieved in the subtitles of the file to be uploaded, it means that the video file matching the file name and the file to be uploaded are files with different contents. The subsequent subtitle segment extraction and retrieval steps are no longer performed on the subtitles of the video file matching the file name, but the subtitles of the next video file matching the file name are directly retrieved in the subtitles of the file to be uploaded until the subtitles of all video files matching the file names are retrieved.
[0124] It should be noted that the order of the above steps is only a specific example provided to illustrate the embodiment of the present invention. The present invention does not limit the order of the above steps, and those skilled in the art may adjust them as needed in practical applications; and the size of the sequence numbers of the above steps does not limit their execution order.
[0125] The file uploading method provided by the embodiment of the present invention can accurately identify the video file with the same content as the file to be uploaded by matching the file name and subtitles of the file to be uploaded by the user with the video file stored on the server, and push the identification result to the user so that the user can make an instruction on whether to upload the file to be uploaded to the server based on the identification result, which can effectively avoid repeated uploading of video files with the same content and save storage resources on the server.
[0126] Figure 3 A schematic diagram of the structure of a user terminal provided in an embodiment of the present invention. Figure 3 As shown, the user terminal includes: an acquisition module 301 , a judgment module 302 , an extraction module 303 , a first sending module 304 , a first receiving module 305 and an upload module 306 .
[0127] Among them, the acquisition module 301 is configured to acquire the file to be uploaded; the judgment module 302 is configured to judge whether the file to be uploaded is a video file; the extraction module 303 is configured to extract the file name and subtitles of the file to be uploaded when the judgment result of the judgment module 302 is yes; the first sending module 304 is configured to send the file name and subtitles of the file to be uploaded to the network disk server, so that the network disk server searches for video files that match the file name and subtitles of the file to be uploaded to obtain the search results, and sends the search results to the user terminal; the first receiving module 305 is configured to receive the search results sent by the network disk server; the first sending module 304 is also configured to push the search results to the user; the upload module 306 is configured to determine whether to upload the file to be uploaded to the network disk server based on user instructions.
[0128] In a specific embodiment, the first sending module 304 is configured to send the file name of the file to be uploaded to the network disk server, so that the network disk server pre-processes the file name of the file to be uploaded to obtain the key information of the file name, and retrieves the key information of the file name in the pre-stored video file information table, and in response to retrieving at least one video file information matching the key information of the file name, returns a file name matching success message to the user terminal. The first receiving module 305 is also configured to receive the file name matching success message sent by the network disk server. The first sending module 304 is also configured to send the subtitles of the file to be uploaded to the network disk server after the first receiving module 305 receives the file name matching success message sent by the network disk server, so that the network disk server uses the video file subtitles corresponding to each video file information matching the key information of the file name to search in the subtitles of the file to be uploaded to obtain the search results, and sends the search results to the user terminal.
[0129] In a specific implementation, the judgment module 302 is further configured to, after the acquisition module 301 acquires the file to be uploaded, first determine whether the size of the file to be uploaded is lower than a preset threshold, and if not, then determine whether the file to be uploaded is a video file.
[0130] In a specific implementation, the acquisition module 301 is further configured to acquire the verification code of the file to be uploaded after the judgment module 302 determines that the size of the file to be uploaded is not less than a preset threshold. The first sending module 304 is further configured to send the verification code of the file to be uploaded to the network disk server, so that the network disk server retrieves the verification code of the file to be uploaded from the verification code library therein, and returns no identical verification code information to the user terminal in response to the failure to retrieve the verification code of the file to be uploaded. The judgment module 302 is specifically configured to determine whether the file to be uploaded is a video file after the first receiving module 305 receives the no identical verification code information sent by the network disk server.
[0131] The user terminal provided by the embodiment of the present invention sends the file name and subtitles of the file to be uploaded to the network disk server, and the network disk server matches the file name and subtitles of the user's file to be uploaded with the video file stored on the server side, and can accurately identify the video file with the same content as the file to be uploaded, and return the identification result to the user terminal, and the user terminal pushes the identification result to the user, so that the user can make an instruction on whether to upload the file to be uploaded to the server side according to the identification result, which can effectively avoid repeated uploading of video files with the same content and save storage resources on the server side.
[0132] Figure 4 This is a schematic diagram of the structure of the network disk server provided by an embodiment of the present invention. Figure 4As shown, the network disk server includes: a second receiving module 401, a retrieval module 402 and a second sending module 403.
[0133] Among them, the second receiving module 401 is configured to receive the file name and subtitles of the file to be uploaded sent by the user terminal, wherein after obtaining the file to be uploaded, the user terminal extracts its file name and subtitles when it determines that the file to be uploaded is a video file and sends them to the network disk server; the retrieval module 402 is configured to search the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain the retrieval results; the second sending module 403 is configured to send the retrieval results to the user terminal, so that the user terminal pushes the retrieval results to the user, and determines whether to upload the file to be uploaded to the network disk server based on the user's instructions.
[0134] In a specific implementation, the network disk server further includes: a pre-processing module.
[0135] The preprocessing module is configured to preprocess the file name of the file to be uploaded to obtain key information of the file name after the second receiving module 401 receives the file name of the file to be uploaded sent by the user terminal.
[0136] Accordingly, the retrieval module 402 includes a first retrieval unit and a second retrieval unit.
[0137] The first retrieval unit is configured to retrieve the file name key information in a pre-stored video file information table. The second sending module 403 is also configured to return a file name matching success message to the user terminal when the first retrieval unit retrieves at least one video file information matching the file name key information, so that the user terminal sends the subtitles of the file to be uploaded to the network disk server based on the file name matching success message. The second retrieval unit is configured to use the video file subtitles corresponding to each video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain the retrieval result.
[0138] In a specific implementation, the second retrieval unit is specifically configured as:
[0139] For each video file subtitle corresponding to the video file information matching the key information of the file name, randomly extract a first subtitle segment of a preset length, and use the first subtitle segment to search in the subtitles of the file to be uploaded;
[0140] In response to retrieving a first subtitle segment in the subtitles of the file to be uploaded, a second subtitle segment of a preset length is randomly extracted, and the second subtitle segment is used to search in the subtitles of the file to be uploaded, and the aforementioned subtitle segment extraction and retrieval steps are repeated until the Nth subtitle segment is retrieved in the subtitles of the file to be uploaded, N≥2, and the preset basic information of the video file is added to the same file set and a retrieval result is generated.
[0141] In a specific implementation, the second retrieval unit is further configured to:
[0142] In response to not finding the i-th subtitle segment extracted from the subtitles of the video file in the subtitles of the file to be uploaded, 1≤i≤N, the step of continuing to extract and search the next subtitle segment from the subtitles of the video file is skipped, and the video file subtitles corresponding to the next video file information are continued to be searched in the subtitles of the file to be uploaded until all the video file subtitles corresponding to the video file information matching the file name key information are retrieved.
[0143] The network disk server provided by the embodiment of the present invention, after receiving the file name and subtitles of the file to be uploaded sent by the user terminal, matches the file name and subtitles of the user's file to be uploaded with the video file stored on the server side, and can accurately identify the video file with the same content as the file to be uploaded, and push the recognition result to the user through the user terminal, so that the user can make an instruction on whether to upload the file to be uploaded to the server side according to the recognition result, which can effectively avoid repeated uploading of video files with the same content and save storage resources on the server side.
[0144] Figure 5 The structure diagram of the file upload system provided by the embodiment of the present invention is as follows. Figure 5 As shown, the system includes: a user terminal 51 and a network disk server 52.
[0145] The user terminal 51 has a network disk client installed therein, and establishes communication with the network disk server 52 through the network disk client. The user terminal 51 and the network disk server 52 may adopt the structure of the aforementioned embodiment, which will not be described in detail here.
[0146] Based on the same technical concept, the embodiment of the present invention also provides a computer device, such as Figure 6 As shown, the computer device includes a memory 61 and a processor 62. The memory 61 stores a computer program. When the processor 62 runs the computer program stored in the memory 61, the processor 62 executes the aforementioned file uploading method.
[0147] Based on the same technical concept, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes the aforementioned file uploading method.
[0148] In summary, the file uploading method, system, user terminal, network disk server, computer device and storage medium provided by the embodiments of the present invention can accurately identify video files with the same content as the file to be uploaded by searching the network disk server for video files that match both the file name and subtitles of the file to be uploaded, and push the recognition result to the user so that the user can make an instruction on whether to upload the file to be uploaded to the server side according to the recognition result, which can effectively avoid repeated uploading of video files with the same content and save storage resources on the server side.
[0149] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A file uploading method, characterized in that: Applied to a user terminal, the method includes: Get the file to be uploaded; Determine whether the file to be uploaded is a video file. If so, extract its file name and subtitles. Sending the file name and subtitles of the file to be uploaded to the network disk server, so that the network disk server searches for video files that match the file name and subtitles of the file to be uploaded to obtain a search result, and sends the search result to the user terminal; Receive search results from the network disk server and push them to the user; and, Determine whether to upload the file to be uploaded to the network disk server based on the user's instruction; The method of sending the file name and subtitles of the file to be uploaded to the network disk server includes: Sending the file name of the file to be uploaded to the network disk server, so that the network disk server pre-processes the file name of the file to be uploaded to obtain key information of the file name, and retrieves the key information of the file name from a pre-stored video file information table. In response to retrieving at least one video file information that matches the key information of the file name, the network disk server returns a message of successful file name matching to the user terminal; and In response to receiving the file name matching success message sent by the network disk server, the subtitles of the file to be uploaded are sent to the network disk server, so that the network disk server uses the video file subtitles corresponding to each video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain the search results, and sends the search results to the user terminal.
2. The method according to claim 1, characterized in that After obtaining the file to be uploaded, it also includes: Determine whether the size of the file to be uploaded is lower than a preset threshold; If not, the step of determining whether the file to be uploaded is a video file is executed.
3. The method according to claim 2, characterized in that After determining that the size of the file to be uploaded is not less than a preset threshold, the following steps are also included: Obtaining the verification code of the file to be uploaded; and, Sending the verification code of the file to be uploaded to the network disk server, so that the network disk server searches for the verification code of the file to be uploaded in the verification code library therein, and in response to not retrieving the verification code of the file to be uploaded, returning a message that there is no identical verification code to the user terminal; The determination of whether the file to be uploaded is a video file is specifically as follows: In response to receiving the non-identical verification code information sent by the network disk server, a step of determining whether the file to be uploaded is a video file is executed.
4. A file uploading method, characterized in that: Applied to a network disk server, the method includes: Receiving the file name and subtitles of the file to be uploaded sent by the user terminal, wherein after obtaining the file to be uploaded, the user terminal extracts the file name and subtitles when determining that the file to be uploaded is a video file and sends them to the network disk server; Searching the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain search results; and Sending the search results to the user terminal so that the user terminal pushes the search results to the user and determines whether to upload the file to be uploaded to the network disk server based on the user's instructions; After receiving the file name of the file to be uploaded sent by the user terminal, the following steps are also included: Preprocess the file name of the uploaded file to obtain the key information of the file name; The step of searching the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain search results includes: Retrieving the file name key information from a pre-stored video file information table, and in response to retrieving at least one video file information matching the file name key information, returning a file name matching success message to the user terminal, so that the user terminal sends the subtitles of the file to be uploaded to the network disk server based on the file name matching success message; and The video file subtitles corresponding to the video file information that matches the file name key information are used to search the subtitles of the file to be uploaded to obtain search results.
5. The method according to claim 4, characterized in that The video file subtitles corresponding to the video file information matching the file name key information are respectively searched in the subtitles of the file to be uploaded to obtain the search results, including: For each video file subtitle corresponding to the video file information matching the file name key information, randomly extract a first subtitle segment of a preset length, and use the first subtitle segment to search among the subtitles of the file to be uploaded; In response to retrieving a first subtitle segment in the subtitles of the file to be uploaded, a second subtitle segment of a preset length is randomly extracted, and the second subtitle segment is used to search in the subtitles of the file to be uploaded. The aforementioned subtitle segment extraction and retrieval steps are repeated until the Nth subtitle segment is retrieved in the subtitles of the file to be uploaded, N≥2, and the preset basic information of the video file is added to the same file set and a retrieval result is generated.
6. The method according to claim 5, characterized in that Also includes: In response to not finding the i-th subtitle segment extracted from the subtitles of the video file in the subtitles of the file to be uploaded, 1≤i≤N, the step of continuing to extract and search the next subtitle segment from the subtitles of the video file is skipped, and the subtitles of the video file corresponding to the next video file information are continued to be searched in the subtitles of the file to be uploaded until all the video file subtitles corresponding to the video file information matching the file name key information are retrieved.
7. A user terminal, characterized in that: include: The acquisition module is configured to acquire files to be uploaded; A judgment module configured to judge whether the file to be uploaded is a video file; an extraction module configured to extract the file name and subtitles of the file to be uploaded when the judgment result of the judgment module is yes; A first sending module is configured to send the file name and subtitles of the file to be uploaded to the network disk server, so that the network disk server searches for video files that match the file name and subtitles of the file to be uploaded to obtain a search result, and sends the search result to the user terminal; A first receiving module, configured to receive search results sent by the network disk server; The first sending module is further configured to push the search results to the user; and An upload module configured to determine whether to upload a file to be uploaded to a network disk server based on a user instruction; The first sending module is specifically configured to send the file name of the file to be uploaded to the network disk server, so that the network disk server pre-processes the file name of the file to be uploaded to obtain key information of the file name, retrieves the key information of the file name from a pre-stored video file information table, and returns a file name matching success message to the user terminal in response to retrieving at least one video file information that matches the key information of the file name; The first receiving module is further configured to receive a file name matching success message sent by the network disk server; The first sending module is further configured to send the subtitles of the file to be uploaded to the network disk server after the first receiving module receives the file name matching success message sent by the network disk server, so that the network disk server uses the video file subtitles corresponding to each piece of video file information matching the file name key information to search in the subtitles of the file to be uploaded to obtain the search results, and send the search results to the user terminal.
8. A network disk server, characterized in that: include: A second receiving module is configured to receive the file name and subtitles of the file to be uploaded sent by the user terminal, wherein after obtaining the file to be uploaded, the user terminal extracts the file name and subtitles when determining that the file to be uploaded is a video file and sends them to the network disk server; A search module configured to search the network disk server for video files that match the file name and subtitles of the file to be uploaded to obtain search results; A second sending module is configured to send the search results to the user terminal so that the user terminal pushes the search results to the user and determines whether to upload the file to be uploaded to the network disk server based on the user's instruction; as well as, A preprocessing module configured to preprocess the file name of the file to be uploaded to obtain key information of the file name after the second receiving module receives the file name of the file to be uploaded sent by the user terminal; The retrieval module includes a first retrieval unit and a second retrieval unit; The first retrieval unit is configured to retrieve the file name key information from a pre-stored video file information table; The second sending module is further configured to return a file name matching success message to the user terminal when the first retrieval unit retrieves at least one video file information matching the file name key information, so that the user terminal sends the subtitles of the file to be uploaded to the network disk server based on the file name matching success message; The second retrieval unit is configured to use the video file subtitles corresponding to the video file information matching the file name key information to search the subtitles of the file to be uploaded to obtain retrieval results.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor runs the computer program stored in the memory, the processor executes the file upload method according to any one of claims 1 to 3, or the file upload method according to any one of claims 4 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the processor executes the file upload method according to any one of claims 1 to 3, or the file upload method according to any one of claims 4 to 6.
