CN111526430A - File matching method and device and electronic equipment - Google Patents

File matching method and device and electronic equipment Download PDF

Info

Publication number
CN111526430A
CN111526430A CN202010226148.2A CN202010226148A CN111526430A CN 111526430 A CN111526430 A CN 111526430A CN 202010226148 A CN202010226148 A CN 202010226148A CN 111526430 A CN111526430 A CN 111526430A
Authority
CN
China
Prior art keywords
file
network address
data record
client
storing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010226148.2A
Other languages
Chinese (zh)
Inventor
王东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010226148.2A priority Critical patent/CN111526430A/en
Publication of CN111526430A publication Critical patent/CN111526430A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2351Processing of additional data, e.g. scrambling of additional data or processing content descriptors involving encryption of additional data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

The embodiment of the invention discloses a file matching method, a file matching device and electronic equipment, belongs to the technical field of Internet, and is used for solving the problem that a viewer or an editor is inconvenient to operate when video and subtitle files are edited and matched for playing in the prior art. The method provided by the invention comprises the following steps: acquiring a first network address and a second network address; storing the first network address and the second network address in a data record in an associated manner; the first network address is the network address of a first file, the second network address is the network address of a second file, and the first file and the second file have relevance. The invention enables different files to be uploaded and matched remotely, makes file editing and uploading and downloading operations easier, and is not only suitable for matching files related to video files, but also suitable for remote storage and later-stage matching of other related files.

Description

File matching method and device and electronic equipment
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a file matching method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The development of the internet brings great convenience to people's life, scientific research and teaching. Information sharing is the most important link of the internet. The traditional internet information sharing method is one-to-one, and particularly in the multi-association file sharing process, inconvenience exists. For example, for two files, namely a video file of a movie and a subtitle file corresponding to the video file, there are two conventional ways to associate the two files: firstly, a video file and a subtitle file are respectively downloaded to a computer, and a player plays the two files simultaneously in the playing process to realize matching of the two files; the other method is that an editor directly packs the subtitle file and the video file into a unified file and uploads the unified file, and a downloading user only needs to download the same packed file and simultaneously can match and display the video file and the subtitle file during playing.
In addition, with the progress of video and equipment interaction technology, in the teaching field, sometimes the playing of a teaching film and the motion of a teaching robot need to be performed synchronously, so that the association relationship between the teaching video and a teaching robot control file needs to be established, and the teaching video and the teaching robot control file need to be continuously edited and updated according to the teaching effect, so that the matching problem same as that of the movie and the subtitle file can be generated.
Disclosure of Invention
In view of this, embodiments of the present invention provide a file matching method, an apparatus, and an electronic device, which can solve the problems existing in the prior art when editing and matching playing video and subtitle files, and the present invention enables different files to be uploaded and matched remotely, so that the file editing and uploading party and the downloading party are easier to operate.
In a first aspect, an embodiment of the present invention provides a file matching method, which is used for a server, and the method includes:
storing the first network address and the second network address in a data record in an associated manner; the first network address is the network address of a first file, the second network address is the network address of a second file, and the first file and the second file are remote information and have relevance.
With reference to the first aspect, in a first implementation manner of the first aspect, before storing the first network address and the second network address in association as one data record, the method further includes:
and receiving a first network address and a second network address uploaded by a first client.
With reference to the first aspect, in a second implementation manner of the first aspect, before storing the first network address and the second network address in association as one data record, the method further includes:
receiving a second file and a first network address uploaded by a first client;
and allocating a second network address to the second file and storing the second file.
With reference to the first aspect, in a third implementation manner of the first aspect, before storing the first network address and the second network address in association as one data record, the method further includes:
receiving a first file and a second file uploaded by a first client;
and allocating a first network address for the first file and storing the first file, and allocating a second network address for the second file and storing the second file.
With reference to the first aspect, in a fourth implementation manner of the first aspect, after the storing the first network address and the second network address in association as one data record, the method further includes:
encrypting the identification code of the data record through a preset encryption algorithm to obtain an encryption code for identifying the data record;
and correspondingly storing the encryption codes and the data records.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, after storing the encryption code in correspondence with the data record, the method further includes:
receiving a resource acquisition request uploaded by a second client; the resource acquisition request comprises an encryption code corresponding to a target resource of the request; the second client is the same as or different from the first client;
decrypting the encrypted code corresponding to the target resource into the identification code of the data record corresponding to the target resource through a preset decryption algorithm;
acquiring a first network address and a second network address stored in corresponding data records according to the identification code of the data record corresponding to the target resource;
and sending the acquired first network address and the acquired second network address to the second client, so that the second client acquires a first file in the first network address and a second file matched with the first file in the second network address.
With reference to the first aspect, in a sixth implementation manner of the first aspect, the storing the first network address and the second network address in association as one data record includes:
inquiring whether a local database stores a data record about the first network address;
if the local database stores the data record related to the first network address, updating the inquired data record, and storing the second network address into the data record in a correlation manner;
and if the local database does not store the data record related to the first network address, the first network address and the second network address are stored as a new data record in an associated manner.
With reference to the second implementation manner of the first aspect, in a seventh implementation manner of the first aspect, after storing the first network address and the second network address in association as one data record, the method further includes:
receiving a third file and a second network address uploaded by a third client; the third file is an update file of the second file; the third client is the same as or different from the first client;
replacing the second file stored in the second network address with the third file;
alternatively, the first and second electrodes may be,
receiving a third file uploaded by a third client and an identification code of a data record corresponding to the second file;
acquiring a second network address stored in the corresponding data record according to the identification code of the currently received data record;
and replacing the second file stored in the second network address with the third file.
With reference to the fourth implementation manner of the first aspect, in an eighth implementation manner of the first aspect, the predetermined encryption algorithm is one of ASCII, MD5, SHA, and HMAC.
With reference to any one implementation manner of the first aspect to the eighth implementation manner of the first aspect, in a ninth implementation manner of the first aspect, the first file is a video file, and the second file is a subtitle file or a machine control program file.
In a second aspect, an embodiment of the present invention provides a file matching apparatus, where the apparatus is used for a server, and the apparatus includes:
the record generation module is used for storing the first network address and the second network address into a data record in an associated manner; the first network address is the network address of a first file, the second network address is the network address of a second file, and the first file and the second file are remote information and have relevance.
With reference to the second aspect, in a first implementation manner of the second aspect, the apparatus further includes:
the first receiving submodule is used for receiving a first network address and a second network address uploaded by a first client.
With reference to the second aspect, in a second implementation manner of the second aspect, the apparatus further includes:
the second receiving submodule is used for receiving a second file and a first network address uploaded by the first client;
the first storage submodule is used for distributing a second network address for the second file and storing the second file;
with reference to the second aspect, in a third embodiment of the second aspect, the apparatus further comprises:
the third receiving submodule is used for receiving the first file and the second file uploaded by the first client;
and the second storage submodule is used for allocating a first network address for the first file and storing the first file, and allocating a second network address for the second file and storing the second file. .
With reference to the second aspect, in a fourth embodiment of the second aspect, the apparatus further comprises:
the encryption module is used for encrypting the identification code of the data record through a preset encryption algorithm to obtain an encryption code for identifying the data record;
the record generating module is further configured to store the encryption code and the data record correspondingly.
With reference to the fourth embodiment of the second aspect, in a fifth embodiment of the second aspect, the apparatus further comprises:
the request receiving module is used for receiving a resource obtaining request uploaded by the second client; the resource obtaining request comprises an encryption code corresponding to a target resource of the request; the second client is the same as or different from the first client;
the decryption module is used for decrypting the encrypted code corresponding to the target resource in the resource acquisition request received by the request receiving module into the identification code of the data record corresponding to the target resource through a preset decryption algorithm;
the matching module is used for acquiring a first network address and a second network address stored in corresponding data records according to the identification code of the data record corresponding to the target resource, which is obtained by the decryption module;
and the sending module is used for sending the first network address and the second network address acquired by the matching module to the second client so as to enable the second client to acquire a first file in the first network address and a second file matched with the first file in the second network address.
With reference to the second aspect, in a sixth implementation manner of the second aspect, the record generating module includes:
the query unit is used for querying whether a local database stores data records about the first network address;
the updating unit is used for updating the inquired data record and storing the second network address into the data record in an associated manner when the data record related to the first network address is inquired in the local database by the inquiring unit;
and the generating unit is used for storing the first network address and the second network address in a correlation manner as a new data record when the data record related to the first network address cannot be inquired in the local database by the inquiring unit.
With reference to the second implementation manner of the second aspect, in a seventh implementation manner of the second aspect, the second receiving sub-module is further configured to receive a third file and a second network address uploaded by a third client, or is further configured to receive an identification code of a data record corresponding to the second file uploaded by the third client; the third file is an update file of the second file; the third client is the same as or different from the first client;
the first storage sub-module is further configured to replace the second file stored in the second network address with the third file, or is further configured to first acquire the second network address stored in the corresponding data record according to the identification code of the currently received data record, and then replace the second file stored in the second network address with the third file.
With reference to the fourth implementation manner of the second aspect, in an eighth implementation manner of the second aspect, the encryption module is specifically configured to encrypt the identification code of the data record by using an algorithm selected from ASCII, MD5, SHA, and HMAC, so as to obtain an encryption code for identifying the data record.
With reference to any one of the eighth implementation manners of the second aspect to the fourth aspect, in a ninth implementation manner of the second aspect, the first file is a video file, and the second file is a subtitle file or a machine control program file.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the method described in any of the method embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor or implements the method steps of any of the foregoing method embodiments.
According to the file matching method provided by the embodiment of the invention, the editing of the second file corresponding to the first file can be simply and quickly finished under the condition that the first file stored on the Internet is not downloaded, and the server realizes the matching between the first file and the second file which are stored independently through establishing the associated storage record between the first network address and the second network address, so that the problems of inconvenience in user end association when the video file and the subtitle file are respectively stored, low uploading speed when the video file and the subtitle file are packed and uploaded and inconvenience in later editing in the prior art are solved. The invention not only can realize the matching correlation between the remote information stored in different network addresses, but also can ensure that the later editing of each file is mutually independent, and the operation is convenient.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a file matching method according to the present invention;
FIG. 2 is a flow chart of another file matching method provided by the present invention;
FIG. 3 is a schematic structural diagram of a first embodiment of a file matching apparatus according to the present invention;
FIG. 4 is a schematic structural diagram of a second embodiment of a file matching apparatus according to the present invention;
FIG. 5 is a schematic structural diagram of a third embodiment of a file matching apparatus according to the present invention;
FIG. 6 is a schematic structural diagram of a fourth embodiment of a file matching apparatus according to the present invention;
FIG. 7 is a schematic structural diagram of a fifth embodiment of a file matching apparatus according to the present invention;
fig. 8 is a schematic structural diagram of a sixth embodiment of a file matching apparatus according to the present invention;
FIG. 9 is a schematic structural diagram of a seventh embodiment of a file matching apparatus according to the present invention;
fig. 10 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
A file matching method, a file matching device, an electronic device, and a computer-readable storage medium according to embodiments of the present invention are described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems in the prior art, embodiments of the present invention provide a file matching method, where the method is used at a server, and the method establishes a correspondence between network addresses of a first file and a second file, where the first file and the second file have content relevance but are independent of each other, and stores the correspondence as a data record.
Fig. 1 is a flowchart of a file matching method provided by the present invention, and as shown in fig. 1, the method includes:
step 101, acquiring a first network address and a second network address;
the first network address is a network address of a first file, the second network address is a network address of a second file, and the first file and the second file have relevance. The association between the first file and the second file may include synchronous operation, superposition, or interaction, and the like, for example, the video file and the subtitle file time of the video have an association on a time axis, the two may be superposed to realize synchronous playing, or for a spot advertisement file edited by a certain video file, and the like, also have a time association with the video file. In addition, with the progress of video and equipment interaction technology, for example, in the teaching field, the playing of a teaching piece and the motion of a teaching robot are synchronously performed, the association of the interaction relationship formed by the action of the teaching robot and the content in the teaching video can be realized by reading the corresponding relationship file between the time information during the playing of the predefined video and the robot control command and continuously outputting the control command to the controlled robot, so that a good teaching effect is formed, and the teaching video is associated with the corresponding relationship file in the scene.
Step 102, storing the first network address and the second network address in a data record in an associated manner.
In the method provided by the invention, the first network address and the second network address which are stored by the server in a correlation manner can be provided by the client, and can also be obtained by the server distributing the network address for the file uploaded by the client. That is, before storing the first network address and the second network address in association as one data record, the server may directly receive the known first network address (storing the first file) and the second network address (storing the second file) uploaded by the first client; or when the first file and the corresponding first network address thereof are known, the server receives a second file and the first network address uploaded by the first client, and then allocates a second network address for the second file and stores the second file; or the server receives the first file and the second file uploaded by the first client, allocates a first network address for the first file and stores the first file, and allocates a second network address for the second file and stores the second file.
Preferably, the second file is formed by the first client user according to the first file and by matching and editing the first file at the first client, for example, the first file is a video file, and the second file is a subtitle file or a machine control program file edited according to the video file.
The file matching method provided by the invention can simply and quickly finish editing of the second file corresponding to the first file under the condition of not downloading the first file stored on the Internet, and the server realizes matching between the first file and the second file which are stored independently by establishing the associated storage record between the first network address and the second network address, thereby solving the problems of inconvenient association of a user end when the video file and the subtitle file are respectively stored and the problems of slow uploading speed and inconvenient later editing when the video file and the subtitle file are packed and uploaded in the prior art. The invention can not only realize the remote uploading of the files, but also realize the matching association among the files stored in different network addresses, and can ensure that the later editing of each file is mutually independent and the operation is convenient.
In an optional embodiment, after storing the first network address and the second network address as a data record, the method may further include: and encrypting the identification code of the data record through a preset encryption algorithm to obtain an encryption code for identifying the data record, and correspondingly storing the encryption code and the data record. Preferably, the predetermined encryption algorithm is an MD5 algorithm, for example, if the identification code of the data record is number 0001 of the record in the database, the MD5 algorithm is adopted to convert 0001 into MD5 code 25bbdcd06c32d477f7fa1c3e4a91b032, and the MD5 code is used to identify the data record with number 0001 stored in the database of the server.
In an optional embodiment, after the server acquires the first network address and the second network address each time, a new data record storage may be directly formed according to the method provided by the present invention, regardless of whether the data records of the first network address and the second network address have been stored in association before. Subsequently, when the identification code or the encryption code of the data record is spread through the internet, the corresponding resource content description information exists, that is, the identification code or the encryption code also carries the resource content description information in the internet sharing and spreading process. The user only needs to select the data record identification code or the encryption code which is needed by the user according to the resource content description, for example, the user obtains two encryption codes related to the movie video A and the Chinese subtitle file thereof, the resource content description information corresponding to the first encryption code prompts that the data record is the network address information related to the movie video A and the Chinese subtitle file thereof formed in 3.1.2019, and the resource content description information corresponding to the second encryption code prompts that the data record is the network address information related to the movie video A and the Chinese subtitle file thereof formed in 10.1.2019, so that the user can select which encryption code to use according to the user's needs, for example, the second encryption code with the latest storage date is selected to be used, and then the corresponding data record is obtained through the server. In this embodiment, it is considered that the amount of characters of the data record formed by using the method provided by the present invention is very limited, and the problem of data storage space waste may not be considered, so when the first file or the second file is updated, the old record does not need to be deleted or updated, and the new record is directly stored.
In an alternative embodiment, the storing the first network address and the second network address in association as one data record may include the following steps a 1-A3:
step A1: inquiring whether a local database stores data records about the first network address, if so, executing the step A2, otherwise, executing the step A3;
step A2: and updating the inquired data record, wherein the specific updating method comprises the following steps: storing the second network address association into the data record;
step A3: and storing the first network address and the second network address in a new data record in an associated mode.
In this embodiment, when the server stores the data records, the server may also store the correspondence between the network addresses of the other files corresponding to the same target file and the network address of the target file in the same data record, that is, the first network address of the first file may correspond to the network addresses of the other files matching the first file. For example, if the first file is a video file, different clients may respectively edit subtitle files in different languages corresponding to the video file, for example, the client a uploads a chinese subtitle file, the client B uploads an english subtitle file, the client C uploads a japanese subtitle file, and so on, the server may respectively store the chinese subtitle file in the second network address url2, store the english subtitle file in the third network address url3, and store the japanese subtitle file in the fourth network address url4, and the data records finally stored by the server may be as shown in table 1 below:
TABLE 1
Figure BDA0002426333950000101
In this embodiment, the network address of the first file and the network addresses of the plurality of files associated with the first file are stored in the same data record, which not only facilitates centralized management of the server, but also facilitates searching by the user through the same data record when needed in a later period. Obviously, in the same data record, the same type of files with different network addresses may exist at the same time. For example, in table 1, column 3 stores the network address of the chinese subtitle file edited by editor a, and if the server also receives the uploaded chinese subtitle file (or its network address) edited by other editor B, it may also store it in column 5 in table 1, for example, or if the editor a uploads the updated version of the chinese subtitle file later, the server may also store its network address in column 6 in table 1, for example. Obviously, the data records stored by the server may include attribute information of the file in addition to the network location of the file, and the attribute information includes but is not limited to: at least one of file editor information, file creation time, and file version.
Fig. 2 is a flowchart of another file matching method provided by the present invention, where the method is used in a server, and as shown in fig. 2, the method of this embodiment may include:
step 201, acquiring a first network address and a second network address;
in this embodiment, the specific implementation method of step 201 is similar to that of step 101, and is not described herein again.
Step 202, storing the first network address and the second network address in a data record in an associated manner;
in this embodiment, the specific implementation method of step 202 is similar to that of step 102, and is not described herein again.
Step 203, encrypting the identification code of the data record through a preset encryption algorithm to obtain an encryption code for identifying the data record;
preferably, the predetermined encryption algorithm is one of ASCII, MD5, SHA, HMAC. For example, the identification code of the data record is encrypted by the MD5 algorithm to obtain the MD5 code for identifying the data record.
Step 204, storing the encryption code and the data record correspondingly;
in this embodiment, for example, in the data record similar to table 1, a column may be added before the first column, where the added column is used to record the encryption code corresponding to the identification code of the data record, and after obtaining the encryption code from the server, the user may record the encryption code or further share the encryption code with other users, and then after accessing the server through any client, the other users may obtain the corresponding data record through the encryption code.
Step 205, receiving a resource acquisition request uploaded by a second client;
the resource obtaining request comprises an encryption code corresponding to a target resource of the request; the second client is the same as or different from the first client. In this embodiment, the user sends the encryption code to the server through the second client to apply for the target resource corresponding to the encryption code.
Step 206, decrypting the encrypted code corresponding to the target resource into the identification code of the data record corresponding to the target resource through a predetermined decryption algorithm;
wherein the decryption algorithm corresponds to the encryption algorithm in step 203.
Step 207, acquiring a first network address and a second network address stored in corresponding data records according to the identification code of the data record corresponding to the target resource;
step 208, sending the acquired first network address and second network address to the second client, so that the second client acquires a first file in the first network address and a second file matched with the first file in the second network address.
In this embodiment, after decrypting the encrypted code into the identification code of the data record corresponding to the target resource, the server first searches for the data record corresponding to the identification code in its database, and reads the content in the found data record: for example, url1, url2, url3 and url4 are read from table 1 for the network address of the original file and the network address of each remote file matched with the original file, and the read network addresses are sent to the second client, and the user of the second client finds the corresponding video file and the corresponding Chinese subtitle file according to url1 and url2 returned by the server if the user only needs the Chinese subtitle as required for the content shown in table 1, and then performs operations such as video and subtitle related playing locally.
Preferably, in the file matching method provided by the present invention, after the first network address and the second network address are stored in association as one data record, if the second file in the second network address needs to be updated, the method may further include the steps of: (1) receiving a third file and a second network address uploaded by a third client, and (2) replacing the second file stored in the second network address with the third file. Or, comprising the steps of: (1) receiving a third file uploaded by a third client and an identification code of a data record corresponding to the second file; (2) acquiring a second network address stored in the corresponding data record according to the identification code of the currently received data record; (3) and replacing the second file stored in the second network address with the third file. Wherein the third file is an update file of the second file; the third client is the same as or different from the first client. That is, the user can re-edit the second file through any client to obtain a third file and upload the third file to the server, the network address of the original second file is notified to the server or the identification code of the data record corresponding to the second network address where the second file is located is notified to the server while uploading, then the server directly replaces the second file with the third file according to the second network address, the data record which is stored before and records the corresponding relationship between the second network address and the first network address does not need to be modified in the updating process, and the updating process is very convenient. Currently, before updating the second file, the server associated with the second file needs to perform the steps of verifying the user right, and the like, which are not described herein again.
Obviously, after the client edits the third file, which is the update file of the second file that has been stored before, the third file can be actually uploaded to the server directly, and then the server allocates a third network address to the third file according to the method provided by the present invention and then directly generates a new data record; or the client directly provides the third network address of the third file to the server after storing the third file, and the server generates the first network address and the third network address as a new data record to be stored without overwriting the previous second file.
The following describes in detail the technical solution of the file matching method provided by the embodiment of the present invention with three specific embodiments.
Example one
With the development of the internet, the sharing of movies becomes more active, and movies in different countries need to be captioned for different languages for viewing by viewers. The method provided by the embodiment can simply and quickly finish the editing of the subtitles corresponding to the video file under the condition of not downloading the video aiming at the video stored on the internet server, and can ensure that the matching and the corresponding of the video and the video subtitles are realized by the user terminal through the simplest method, thereby improving the working convenience of a subtitle producer and the watching experience of a film viewer.
In this embodiment, when an editor needs to edit a corresponding subtitle file for an internet video file video1, the subtitle editor plays a video according to the video file video1 of the known network address url1, and at the same time, listens, writes, translates and edits the subtitle file sub1, and obviously, the video file and the subtitle file have a certain relevance, for example, the video file and the subtitle file of the video correspond to each other in time line. After the sub1 subtitle file is completed, matching the video file and the subtitle file is realized through the following steps B11-B17:
step B11: the client uploads url1 and sub1 to the server.
Step B12: after receiving the subtitle file sub1, the server allocates a second network address url2 to the subtitle file sub1 and stores the sub1 at url 2.
Step B13: the server associates and correspondingly stores the first network address url1 and the second network address url2 to form a data Record 1.
Step B14: the server encrypts the identification code of Record1 through a predetermined encryption algorithm to obtain an encryption code1 for identifying the data Record.
Step B15: after a user acquires the code1 and needs to watch the video1, the server receives the code1 sent by the request client by sending the code1 to the server through the request client.
Step B16: after decrypting the code1, the server queries the corresponding Record1 to obtain url1 and url2, and sends the url1 and the url2 to the requesting client.
Step B17: and the requesting client reads the video file video1 and the subtitle file sub1 in the two network addresses simultaneously according to the received url1 and url2 and plays the video file video1 and the subtitle file sub1 by using a player, so that the remote video file and the subtitle file are played in a matching manner.
In this embodiment, the subtitle file editor may upload the video without downloading, and may directly watch the video online, edit the subtitle file matched therewith, and upload the subtitle file. And the user can respectively download the video file and the subtitle file through the network address in the data record only by acquiring the data record, and then realize information matching locally. If a subtitle editing error is found or optimization is required, the traditional method also needs a complex step of uploading after the video file and the subtitle file are fused again. In the embodiment, only the subtitle file needs to be edited again and uploaded to the server, and the server replaces the subtitle file stored in the original network address, so that the size of the subtitle file is small and the uploading speed is high. Compared with the prior art, the method and the device have the advantages that the operation is simple for editors and users, and the file matching and updating are convenient.
Example two
The present embodiment provides another method for remote subtitle editing, and the method provided by the present embodiment is mainly different from the method provided by the first embodiment in that after the client finishes editing the subtitle file sub1 matched with the video file video1, the storage server for the subtitle file sub1 and the generation storage server for the data record are not the same, but the implementation of the method of the present invention is not affected. The file matching method provided by the embodiment may specifically include the following steps B21-B28:
step B21: the client uploads the subtitle sub1 to the first server;
step B22: the first server stores the subtitle file sub1, and feeds back the obtained network address url2 to the client.
Step B23: the client uploads the network address url1 of the video file and the network address url2 of the subtitle file stored at the first server to another second server.
Step B24: the second server stores the url1, url2 association as a data Record 1.
Step B25: the second server encrypts the identification code of Record1 through a predetermined encryption algorithm to obtain an encryption code1 for identifying the data Record.
Step B26: after obtaining the code1, when a user needs to watch the video1, the user sends the code1 to the second server through the client.
Step B27: after decrypting the codel, the second server queries the corresponding Record1, thereby obtaining url1 and url2, and sends them to the requesting client.
Step B28: the requesting client reads the video file video1 in the url1 and the subtitle file sub1 stored in the url2 of the first server side according to the received url1 and url2 and plays the video file video1 and the subtitle file sub1 by using a player, so that the matching playing of the remote video file and the subtitle file is realized.
In this embodiment, in view of the fact that the storage location of the subtitle file sometimes has a requirement, the subtitle file may not be stored in a server implementing the present invention, and with the method provided in this embodiment, the server only needs to match and store the first network address and the second network address uploaded by the client and generate the data record and the encryption code, so that the user can perform addressing and data matching on the remote information according to the data record through any client, and the problems in the prior art can also be solved.
EXAMPLE III
With the progress of robotics, robots are used in more and more fields such as industrial production, design, entertainment, teaching, and the like. In the teaching or entertainment process, if the mechanical arm can move synchronously with the video, a viewer can obtain more and better experiences while watching the video and interacting with the mechanical arm.
In this embodiment, the first file is a Video file Video1, where a man has finished a handshake with a person in the Video, and the editor needs to program the robot arm control to make the robot arm mimic the movements of the person in the Video file Video 1.
Firstly, the editor plays a first file in a first network address, and edits an Action1 control file of the device of the mechanical arm device according to a played demonstration Video file Video1, wherein control process information of the Action1 is shown in the following table 2:
TABLE 2
Figure BDA0002426333950000151
After the client edits the control file Action1 of the robotic arm, the method for matching the robotic arm Action with the demonstration video provided by the embodiment can be specifically realized through the following steps B31-B38:
step B31: the client uploads a Video file Video1 and a mechanical arm control file Action1 to the server;
step B32: the server respectively allocates network addresses url1 and url2 for the Video file Video1 and the control file Action1 file and then stores the files;
step B33: the server stores url1 and ur12 in a related manner to form Record 1;
step B34: the server encrypts the identification code of Record1 through a preset encryption algorithm to obtain an encryption code1 for identifying the data Record;
step B35: after a certain user acquires the code1, when the user needs to watch the video1, the user sends the code1 to the server through a request client;
step B36: after decrypting the received code1, the server queries the corresponding Record1 to obtain url1 and url2, and sends the url1 and the url2 to the requesting client;
step B37: the requesting client reads the Video file Video1 and the control file Action1 according to url1, url 2.
Step B38: when the client is requested to play the Video file Video1, according to the control information recorded in the control file Action1, as shown in table 2, corresponding control commands are sequentially sent to the local robot Device1 according to the time sequence of T1.. T7, so as to obtain the effect that the robot and the man who demonstrates in the Video do the same Action, for example: when a man stretches out a hand towards the screen in the video, the mechanical arm also stretches out the hand, the man in the video shakes hands towards the screen, and the mechanical arm and the video synchronously complete shaking hands and release actions.
The invention further provides a file matching device corresponding to the file matching method provided by the embodiment of the invention. Fig. 3 is a schematic structural diagram of a first embodiment of a file matching apparatus provided in the present invention, and as shown in fig. 3, the apparatus of the present embodiment may include:
an obtaining module 31, configured to obtain a first network address and a second network address; the first network address is the network address of a first file, the second network address is the network address of a second file, and the first file and the second file have relevance;
a record generating module 32, configured to store the first network address and the second network address in association as a data record; the first network address is the network address of a first file, the second network address is the network address of a second file, and the first file and the second file are remote information and have relevance.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of a second embodiment of a file matching apparatus provided by the present invention, as shown in fig. 4, the apparatus of this embodiment is based on the apparatus structure shown in fig. 3, and further, the obtaining module 31 may include: the first receiving submodule 311 is configured to receive a first network address and a second network address uploaded by a first client.
Fig. 5 is a schematic structural diagram of a third embodiment of a file matching device provided by the present invention, as shown in fig. 5, the device of this embodiment is based on the device structure shown in fig. 3, and further, the obtaining module 31 may include:
the second receiving submodule 312 is configured to receive a second file and a first network address uploaded by the first client;
the first storage submodule 313 is used for allocating a second network address to the second file and storing the second file;
fig. 6 is a schematic structural diagram of a fourth embodiment of a file matching apparatus provided by the present invention, as shown in fig. 6, the apparatus of this embodiment is based on the apparatus structure shown in fig. 3, and further, the obtaining module 31 may include:
the third receiving submodule 314 is configured to receive the first file and the second file uploaded by the first client;
the second storage submodule 315 is configured to allocate a first network address to the first file and store the first file, and allocate a second network address to the second file and store the second file.
Fig. 7 is a schematic structural diagram of a fifth embodiment of a file matching device provided by the present invention, and as shown in fig. 7, the device of the present embodiment is based on the device structure shown in fig. 3, and further includes: the encryption module 33 is configured to encrypt the identification code of the data record by using a predetermined encryption algorithm to obtain an encryption code for identifying the data record; the record generating module is further configured to store the encryption code and the data record correspondingly.
In an alternative embodiment, the encryption module 33 is specifically configured to encrypt the identification code of the data record by using an algorithm selected from ASCII, MD5, SHA, and HMAC, so as to obtain an encryption code for identifying the data record.
Fig. 8 is a schematic structural diagram of a sixth embodiment of a file matching device provided by the present invention, and as shown in fig. 8, the device of the present embodiment is based on the device structure shown in fig. 7, and further includes:
a request receiving module 34, configured to receive a resource obtaining request uploaded by a second client; the resource obtaining request comprises an encryption code corresponding to a target resource of the request; the second client is the same as or different from the first client;
the decryption module 35 is configured to decrypt, by using a predetermined decryption algorithm, the encrypted code corresponding to the target resource in the resource acquisition request received by the request receiving module 34 into the identification code of the data record corresponding to the target resource;
a matching module 36, configured to obtain, according to the identification code of the data record corresponding to the target resource obtained by the decryption module 35, a first network address and a second network address in the corresponding data record stored by the record generation module 32;
a sending module 37, configured to send the first network address and the second network address obtained by the matching module 36 to the second client, so that the second client obtains a first file in the first network address and a second file in the second network address that matches the first file.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of a seventh embodiment of a file matching device provided by the present invention, and as shown in fig. 9, the device of the present embodiment further includes, on the basis of the device structure shown in fig. 3, a record generating module 32, which includes:
a querying unit 321, configured to query whether a local database stores a data record about the first network address;
an updating unit 322, configured to, when the querying unit 321 queries the local database for a data record related to the first network address, update the queried data record, and store the second network address in the data record in an associated manner;
a generating unit 323, configured to store the first network address and the second network address in association as a new data record when the querying unit 321 does not query the local database for the data record related to the first network address.
In an optional embodiment, in the apparatus shown in fig. 5, the second receiving sub-module 312 is further configured to receive a third file and a second network address uploaded by a third client, or is further configured to receive an identification code of a data record corresponding to the third file and the second file uploaded by the third client; the third file is an update file of the second file; the third client is the same as or different from the first client; the first storage sub-module 313 is further configured to replace the second file stored in the second network address with the third file, or is further configured to first acquire the second network address stored in the corresponding data record according to the identification code of the currently received data record, and then replace the second file stored in the second network address with the third file.
In an optional embodiment, the first file operated in the apparatus is a video file, and the second file is a subtitle file or a machine control program file.
Fig. 10 is a schematic structural diagram of an embodiment of an electronic device of the present invention, and as shown in fig. 10, the electronic device may include: the device comprises a shell 41, a processor 42, a memory 43, a circuit board 44 and a power circuit 45, wherein the circuit board 44 is arranged inside a space enclosed by the shell 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; a power supply circuit 45 for supplying power to each circuit or device of the electronic apparatus; the memory 43 is used for storing executable program code; the processor 42 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 43, for executing the file matching method of any of the foregoing embodiments.
The electronic device exists in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, or the steps of the file matching method described in any of the foregoing embodiments are implemented.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A file matching method, for a server, the method comprising:
acquiring a first network address and a second network address; the first network address is the network address of a first file, the second network address is the network address of a second file, and the first file and the second file have relevance;
the first network address and the second network address are stored in association as a data record.
2. The file matching method according to claim 1, wherein the obtaining the first network address and the second network address comprises:
and receiving a first network address and a second network address uploaded by a first client.
3. The file matching method according to claim 1, wherein the obtaining the first network address and the second network address comprises:
receiving a second file and a first network address uploaded by a first client;
and allocating a second network address to the second file and storing the second file.
4. The file matching method according to claim 1, wherein the obtaining the first network address and the second network address comprises:
receiving a first file and a second file uploaded by a first client;
and allocating a first network address for the first file and storing the first file, and allocating a second network address for the second file and storing the second file.
5. The file matching method according to claim 1, further comprising, after storing the first network address and the second network address in association as a data record:
encrypting the identification code of the data record through a preset encryption algorithm to obtain an encryption code for identifying the data record;
and correspondingly storing the encryption codes and the data records.
6. The file matching method according to claim 5, further comprising, after storing the encryption code in correspondence with the data record:
receiving a resource acquisition request uploaded by a second client; the resource acquisition request comprises an encryption code corresponding to a target resource of the request; the second client is the same as or different from the first client;
decrypting the encrypted code corresponding to the target resource into the identification code of the data record corresponding to the target resource through a preset decryption algorithm;
acquiring a first network address and a second network address stored in corresponding data records according to the identification code of the data record corresponding to the target resource;
and sending the acquired first network address and the acquired second network address to the second client, so that the second client acquires a first file in the first network address and a second file matched with the first file in the second network address.
7. The file matching method according to claim 1, wherein the storing the first network address and the second network address in association as one data record comprises:
inquiring whether a local database stores a data record about the first network address;
if the local database stores the data record related to the first network address, updating the inquired data record, and storing the second network address into the data record in a correlation manner;
and if the local database does not store the data record related to the first network address, the first network address and the second network address are stored as a new data record in an associated manner.
8. The file matching method according to claim 3, further comprising, after storing the first network address and the second network address in association as one data record:
receiving a third file and a second network address uploaded by a third client; the third file is an update file of the second file; the third client is the same as or different from the first client;
replacing the second file stored in the second network address with the third file;
alternatively, the first and second electrodes may be,
receiving a third file uploaded by a third client and an identification code of a data record corresponding to the second file;
acquiring a second network address stored in the corresponding data record according to the identification code of the currently received data record:
and replacing the second file stored in the second network address with the third file.
9. The file matching method according to claim 5, wherein the predetermined encryption algorithm is one of ASCII, MD5, SHA, HMAC.
10. The file matching method according to any one of claims 1 to 9, wherein the first file is a video file, and the second file is a subtitle file or a machine control program file.
CN202010226148.2A 2020-03-26 2020-03-26 File matching method and device and electronic equipment Pending CN111526430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010226148.2A CN111526430A (en) 2020-03-26 2020-03-26 File matching method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010226148.2A CN111526430A (en) 2020-03-26 2020-03-26 File matching method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111526430A true CN111526430A (en) 2020-08-11

Family

ID=71901944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010226148.2A Pending CN111526430A (en) 2020-03-26 2020-03-26 File matching method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111526430A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842790A (en) * 2003-06-04 2006-10-04 松下电器产业株式会社 Information presentation system, management device, and terminal device
CN101197944A (en) * 2006-12-06 2008-06-11 中兴通讯股份有限公司 Method for implementing video and words synchronization by medium service apparatus
CN102163210A (en) * 2010-02-12 2011-08-24 微软公司 Rapid update of index metadata
CN103139603A (en) * 2011-11-24 2013-06-05 法国洛基威斯 Transmission method for push type video on demand programs and associated decoder
CN104484427A (en) * 2014-12-19 2015-04-01 武汉长江通信智联技术有限公司 Video file storage device and video file storage method
CN104660623A (en) * 2013-11-18 2015-05-27 北大方正集团有限公司 Method and system for network file offline editing
JP2016059028A (en) * 2015-03-31 2016-04-21 株式会社電通 Television program related content provision method
CN105791971A (en) * 2014-12-26 2016-07-20 深圳Tcl数字技术有限公司 Method and device for switching stream media audios
CN106791986A (en) * 2017-01-10 2017-05-31 环球智达科技(北京)有限公司 A kind of live index list encrypted antitheft catenary systems of HLS and method
CN106791494A (en) * 2016-12-19 2017-05-31 腾讯科技(深圳)有限公司 The generation method and device of video caption
CN108156480A (en) * 2017-12-27 2018-06-12 腾讯科技(深圳)有限公司 A kind of method, relevant apparatus and the system of video caption generation
CN108391179A (en) * 2018-04-26 2018-08-10 腾讯科技(深圳)有限公司 live data processing method, device, server, terminal and storage medium
CN109284625A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of Data Access Security method and device based on block chain

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842790A (en) * 2003-06-04 2006-10-04 松下电器产业株式会社 Information presentation system, management device, and terminal device
CN101197944A (en) * 2006-12-06 2008-06-11 中兴通讯股份有限公司 Method for implementing video and words synchronization by medium service apparatus
CN102163210A (en) * 2010-02-12 2011-08-24 微软公司 Rapid update of index metadata
CN103139603A (en) * 2011-11-24 2013-06-05 法国洛基威斯 Transmission method for push type video on demand programs and associated decoder
CN104660623A (en) * 2013-11-18 2015-05-27 北大方正集团有限公司 Method and system for network file offline editing
CN104484427A (en) * 2014-12-19 2015-04-01 武汉长江通信智联技术有限公司 Video file storage device and video file storage method
CN105791971A (en) * 2014-12-26 2016-07-20 深圳Tcl数字技术有限公司 Method and device for switching stream media audios
JP2016059028A (en) * 2015-03-31 2016-04-21 株式会社電通 Television program related content provision method
CN106791494A (en) * 2016-12-19 2017-05-31 腾讯科技(深圳)有限公司 The generation method and device of video caption
CN106791986A (en) * 2017-01-10 2017-05-31 环球智达科技(北京)有限公司 A kind of live index list encrypted antitheft catenary systems of HLS and method
CN108156480A (en) * 2017-12-27 2018-06-12 腾讯科技(深圳)有限公司 A kind of method, relevant apparatus and the system of video caption generation
CN108391179A (en) * 2018-04-26 2018-08-10 腾讯科技(深圳)有限公司 live data processing method, device, server, terminal and storage medium
CN109284625A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of Data Access Security method and device based on block chain

Similar Documents

Publication Publication Date Title
US10387626B2 (en) Rights and capability-inclusive content selection and delivery
US10282524B1 (en) Content selection and delivery for random devices
US8886710B2 (en) Resuming content across devices and formats
JP5185821B2 (en) System and method for caching data
KR100918113B1 (en) Apparatus and method for providing contents sharing service on network
JP6257707B2 (en) Content selection and distribution of rights and functions
US20180104587A1 (en) Video game platform based on state data
CN104185039A (en) Method and device for audio and video synchronous playing
CN103649951A (en) A microprocessor based system for providing a media player with access to remotely-stored digital media content
WO2011102508A1 (en) Content playback device
JP2012134969A (en) Cloud computing based video service and playing method
CN105847874A (en) Live broadcasting device and live broadcasting terminal
KR20170054754A (en) Method and System for Providing Virtual Reality Service based on 360 Degree Image
CN111917891A (en) Method and system for realizing data sharing between mobile phone and cloud mobile phone
WO2022116679A1 (en) Virtual scene playback method and apparatus, electronic device, and storage medium
EP3048796A1 (en) Information system, information delivery method and iptv system based on multi-screen interaction
EP3160101B1 (en) Multi-media resource management method, cloud server and electronic device
KR20200091188A (en) Electronic device and method for providing content thereof
US11040278B2 (en) Server device distributing video data and replay data and storage medium used in same
CN111526430A (en) File matching method and device and electronic equipment
JP7217181B2 (en) WEARABLE DEVICE, INFORMATION PROCESSING METHOD, APPARATUS AND SYSTEM
CN111258959A (en) Data acquisition method, data providing method and device
KR101633676B1 (en) Method and system for providing client's terminal with haptic effect based on video contents played back via on-line network
US20170134781A1 (en) Method and apparatus for realizing custom menu, client and server
CN108614656B (en) Information processing method, medium, device and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200811