CN111343268B - Method and device for downloading multimedia resources, server and electronic equipment - Google Patents

Method and device for downloading multimedia resources, server and electronic equipment Download PDF

Info

Publication number
CN111343268B
CN111343268B CN202010113660.6A CN202010113660A CN111343268B CN 111343268 B CN111343268 B CN 111343268B CN 202010113660 A CN202010113660 A CN 202010113660A CN 111343268 B CN111343268 B CN 111343268B
Authority
CN
China
Prior art keywords
homologous
resource
downloading
server
multimedia
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.)
Active
Application number
CN202010113660.6A
Other languages
Chinese (zh)
Other versions
CN111343268A (en
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.)
Hangzhou Tangzhi Cosmic Technology Co.,Ltd.
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010113660.6A priority Critical patent/CN111343268B/en
Publication of CN111343268A publication Critical patent/CN111343268A/en
Application granted granted Critical
Publication of CN111343268B publication Critical patent/CN111343268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The disclosure relates to a multimedia resource downloading method, a multimedia resource downloading device, a server and electronic equipment. Wherein, the method comprises the following steps: responding to a resource downloading request sent by a client, and sending a non-homologous resource acquisition request to a non-homologous server, wherein the resource downloading request is a downloading request for the non-homologous resource when a downloading label is triggered, and the non-homologous resource acquisition request is used for acquiring multimedia resources stored in the non-homologous server; receiving a multimedia resource returned by a non-homologous server in response to a non-homologous resource acquisition request, and generating a homologous link for the multimedia resource according to a preset link generation mode; and sending the homologous link to the client so that the client replaces the hyperlink href in the download label with the homologous link to download the multimedia resource. It can be understood that the method does not need to pack non-homologous resources into a format which can not be opened by a client, such as a compression packet, and the like, and saves the complex operations that a user needs to decompress the compression packet and the like when obtaining the resources.

Description

Method and device for downloading multimedia resources, server and electronic equipment
Technical Field
The present disclosure relates to the field of data processing of multimedia resources, and in particular, to a method, an apparatus, a server, and an electronic device for downloading multimedia resources.
Background
With the development of multimedia technology, a technology for downloading multimedia resources based on tags, such as a-tags, has emerged. Wherein the tags may define hyperlinks for linking from one page to another. When the label is used for realizing the downloading of the multimedia resource, if the resource positioning identifier of the multimedia resource points to the homologous resource (the resource conforming to the homologous strategy), the multimedia resource can be normally downloaded; if the resource location identification of the multimedia resource points to a non-homologous resource (a resource that does not comply with the homologous policy), the download will fail.
In the related art, currently, for a downloading method of non-homologous multimedia resources, generally, a to-be-downloaded non-homologous multimedia resource is first packaged into a compressed package, such as a file that cannot be opened by a client, such as zip/. rar, and then downloaded.
However, the current downloading method for non-homologous multimedia resources is cumbersome in obtaining the downloaded multimedia resources.
Disclosure of Invention
The disclosure provides a multimedia resource downloading method, a multimedia resource downloading device, a server and electronic equipment, and aims to at least solve the problem of complicated acquisition mode in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for downloading a multimedia resource, where the method is applied to a same source server, and includes:
responding to a resource downloading request sent by a client, and sending a non-homologous resource acquisition request to a non-homologous server, wherein the resource downloading request is a downloading request for a non-homologous resource when a downloading label is triggered, and the non-homologous resource acquisition request is used for acquiring a multimedia resource stored in the non-homologous server;
receiving the multimedia resource returned by the non-homologous server in response to the non-homologous resource acquisition request, and generating a homologous link for the multimedia resource according to a preset link generation mode;
and sending the homologous link to the client so that the client replaces the hyperlink href in the download label with the homologous link to download the multimedia resource.
In one embodiment, the step of generating the homologous link from the multimedia resource according to a preset link generation manner includes:
acquiring a domain name of the homologous server, a directory of the multimedia resource in the homologous server and a file name of a file in which the multimedia resource is located in the homologous server;
and generating the homologous link according to the domain name, the directory and the file name and a preset link generation mode.
In one embodiment, after the step of sending the homologous link to the client, the method further includes:
receiving a download completion notification message sent by the client after the multimedia resource is downloaded;
and adding a mark to the downloaded multimedia resource according to the download completion notification message to obtain the multimedia resource with the mark, wherein the mark is used for indicating that the multimedia resource is the downloaded multimedia resource.
In one embodiment, after the step of adding a mark to the downloaded multimedia resource according to the download completion notification message to obtain a marked resource, the method further includes:
deleting the tagged multimedia asset cached by the homologous server.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for downloading a multimedia resource, where the method is applied to a client and includes:
responding to a resource downloading operation, and generating a resource downloading request, wherein the resource downloading operation is a downloading operation of a non-homologous resource when a user triggers a downloading label;
sending the resource downloading request to a homologous server, and receiving a homologous link returned by the homologous server in response to the resource downloading request, wherein the homologous link is generated by the homologous server according to a multimedia resource sent by a non-homologous server and a preset link generation mode;
and replacing the hyperlink href in the downloading label with the homologous link so as to trigger the downloading of the multimedia resource corresponding to the homologous link.
In one embodiment, after the step of replacing the hyperlink href in the download tag with the homologous link to trigger downloading of the multimedia resource corresponding to the homologous link, the method further includes:
after the multimedia resource is downloaded, generating a download completion notification message;
and sending the download completion notification message to the homologous server so that the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message to obtain the marked multimedia resource.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for downloading a multimedia resource, the apparatus being applied to a same source server, including:
the resource request unit is configured to execute a resource downloading request sent by a response client and send a non-homologous resource acquisition request to a non-homologous server, wherein the resource downloading request is a downloading request for a non-homologous resource when a downloading label is triggered, and the non-homologous resource acquisition request is used for acquiring multimedia resources stored in the non-homologous server;
the link generation unit is configured to receive the multimedia resource returned by the non-homologous server in response to the non-homologous resource acquisition request, and generate a homologous link for the multimedia resource according to a preset link generation mode;
a link sending unit configured to execute sending the homologous link to the client, so that the client replaces the hyperlink href in the download tag with the homologous link to download the multimedia resource.
In one embodiment, the link generating unit is specifically configured to perform obtaining a domain name of the origin server, a directory of the multimedia resource in the origin server, and a file name of a file in which the multimedia resource is located in the origin server; and generating the homologous link according to the domain name, the directory and the file name and a preset link generation mode.
In one embodiment, the method further comprises the following steps:
a message receiving unit configured to execute receiving a download completion notification message sent by the client after the download of the multimedia resource is completed;
and the resource marking unit is configured to add a mark to the downloaded multimedia resource according to the download completion notification message to obtain the multimedia resource with the mark, and the mark is used for indicating that the multimedia resource is the downloaded multimedia resource.
In one embodiment, the method further comprises the following steps:
a resource deletion unit configured to perform deletion of the tagged multimedia resource cached by the origin server.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for downloading a multimedia resource, the apparatus being applied to a client, and the apparatus including:
the request generating unit is configured to execute a resource downloading request generated in response to a resource downloading operation, wherein the resource downloading operation is a downloading operation for a non-homologous resource when a user triggers a downloading label;
the request sending unit is configured to send the resource downloading request to a homologous server and receive a homologous link returned by the homologous server in response to the resource downloading request, wherein the homologous link is generated by the homologous server according to a multimedia resource sent by a non-homologous server and a preset link generation mode;
and the link replacing unit is configured to replace the hyperlink href in the downloading label with the homologous link so as to trigger the downloading of the multimedia resource corresponding to the homologous link.
In one embodiment, the method further comprises the following steps:
the message generating unit is configured to generate a download completion notification message after the multimedia resource is downloaded;
and the message sending unit is configured to send the download completion notification message to the homologous server, so that the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message to obtain the marked multimedia resource.
According to a fifth aspect of embodiments of the present disclosure, there is provided a server including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method for downloading a multimedia resource as described in any embodiment of the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method for downloading a multimedia resource described in any embodiment of the second aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions, when executed by a processor of a server, enable the server to perform the method for downloading a multimedia resource described in any one of the embodiments of the first aspect.
According to an eighth aspect of the embodiments of the present disclosure, there is provided a storage medium, wherein instructions when executed by a processor of an electronic device enable the electronic device to execute the method for downloading a multimedia resource described in any one of the embodiments of the second aspect.
According to a ninth aspect of embodiments of the present disclosure, there is provided a computer program product, the program product comprising a computer program, the computer program being stored in a readable storage medium, from which the computer program is read and executed by at least one processor of a device, such that the device performs the method of downloading a multimedia resource as described in any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the non-homologous resources are cached in the homologous server, and the corresponding homologous link is generated, so that the client can modify the download label according to the homologous link, and the client can normally download the non-homologous resources from the homologous server. It can be understood that the non-homologous resources are not required to be packaged into a format which can not be opened by the client side, such as a compression packet, in the method, tedious operations that the user needs to decompress the compression packet and the like when obtaining the resources are saved, the data volume caused by the compression process can be reduced, and the occupied space of the data is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is an application environment diagram illustrating a method for downloading a multimedia asset according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method of downloading a multimedia asset according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a supplementary scheme for generating a homologous link from a multimedia resource according to a preset link generation manner according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a method of downloading a multimedia asset according to another exemplary embodiment.
Fig. 5 is a block diagram illustrating a method of downloading a multimedia asset according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a method of downloading a multimedia asset according to an exemplary embodiment.
Fig. 7 is an internal block diagram of an electronic device shown in accordance with an example embodiment.
Fig. 8 is an internal block diagram of a server according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The method for downloading the multimedia resource provided by the present disclosure can be applied to the application environment shown in fig. 1. Wherein the homologous server 104 interacts with the terminal 102 and the non-homologous server 106, respectively, via the network. Wherein the homologous server 104 is used for providing homologous resource services. A homogeneous resource refers to a resource that conforms to a homogeneous policy, the resource comprising a multimedia resource. A homologous policy may limit the way documents or scripts loaded from the same source interact with resources from another source. The non-homologous server 106 is configured to provide resources that do not comply with the homologous policy, i.e., non-homologous resources, which may also be referred to as third party resources, which also include multimedia resources.
Specifically, when a user performs a resource downloading operation, such as a click operation, in the terminal 102 based on the download tag, the terminal 102 first determines whether the resource is a non-homologous resource in response to the resource downloading operation triggered by the user, and if so, generates a corresponding resource downloading request and sends the resource downloading request to the homologous server 104. Next, the homologous server 104 parses the resource download request and sends a non-homologous resource acquisition request to the non-homologous server 106. Next, the non-homologous server 106 returns its stored multimedia resource to the homologous server 104 in response to the non-homologous resource acquisition request. Next, the homologous server 104 generates a corresponding homologous link from the multimedia resource according to a preset link generation manner, and sends the homologous link to the terminal 102. Next, the terminal 102 replaces the hyperlink href part in the download tag with the homologous link, thereby triggering the download of the multimedia resource corresponding to the homologous link.
The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the homologous server 104 and the non-homologous server 106 may be implemented by independent servers or a server cluster composed of a plurality of servers.
Fig. 2 is a flowchart illustrating a method for downloading a multimedia resource, according to an exemplary embodiment, where the method for downloading a multimedia resource is used in a same source server as shown in fig. 2, and includes the following steps:
in step S202, a non-homologous resource acquisition request is sent to a non-homologous server in response to a resource download request sent by a client.
The resource downloading request is a downloading request for the non-homologous resource when the downloading label is triggered, and the non-homologous resource obtaining request is used for obtaining the multimedia resource stored in the non-homologous server.
Wherein, when the download tag sets download, it will trigger the download function of the client, such as the web page. Optionally, the download tag comprises a hyperlink tag. The hyperlink labels define hyperlinks for linking from one page to another. Alternatively, the hyperlink label may be an a label, which refers to an html (a) label. The client may be an application embedded in the terminal.
Specifically, before step S202, the client sends a resource download request for a non-homologous resource triggered based on the download tag to the homologous server. Then, the homologous server receives the resource downloading request, generates a non-homologous resource acquisition request of the requested non-homologous resource by analyzing the resource downloading request, and sends the non-homologous resource acquisition request to the corresponding non-homologous server.
In step S204, a multimedia resource returned by the non-homologous server in response to the non-homologous resource acquisition request is received, and a homologous link is generated from the multimedia resource according to a preset link generation manner.
Specifically, before step S204, the non-homologous server receives the non-homologous resource obtaining request, and returns the corresponding multimedia resource to the homologous server by analyzing the non-homologous resource obtaining request. And then, after receiving the multimedia resource, the homologous server generates a corresponding homologous link for the multimedia resource according to a preset link generation mode.
In step S206, the homologous link is sent to the client, so that the client replaces the hyperlink href in the download tag with the homologous link to download the multimedia resource.
The href attribute of the download tag is used to specify the URL (uniform resource locator) of the target of the hyperlink. The value of the href attribute may be the relative or absolute URL of any valid document, including the fragment identifier and JavaScript code fragment. If the user chooses to download the content in the tab, the browser will attempt to retrieve and display the document represented by the URL specified by the href attribute, or execute a list of JavaScript expressions, methods, and functions.
Specifically, the homologous server sends the homologous link to the client after obtaining the homologous link. Next, the client replaces the hyperlink href part in the download label with the homologous link, thereby triggering the download of the multimedia resource corresponding to the homologous link.
According to the method for downloading the multimedia resources, the non-homologous resources are cached in the homologous server, and the corresponding homologous link is generated, so that the client can modify the downloading label according to the homologous link, and the client can normally download the non-homologous resources from the homologous server. It can be understood that the method does not need to pack non-homologous resources into a format which can not be opened by a client, such as a compression packet, and the like, thereby saving the tedious operations that a user needs to decompress the compression packet and the like when obtaining the resources, reducing the data volume brought by the compression process, and saving the occupied space of data.
In an exemplary embodiment, as shown in fig. 3, in step S204, generating a homologous link from a multimedia resource according to a preset link generation manner may specifically be implemented by the following steps:
in step S2042, a domain name of the homologous server, a directory of the multimedia resource in the homologous server, and a file name of a file in which the multimedia resource is located in the homologous server are obtained.
In step S2044, a homologous link is generated according to the domain name, directory, and file name and according to a preset link generation manner.
The domain name is the name of a certain computer or a group of computers on the internet, which is composed of a string of names separated by points, and is used for positioning and identifying the computer during data transmission. The directory, i.e. the path, is used for finding the storage location of the multimedia resource. Alternatively, the directory in the homologous server is a directory of storage resources previously generated in the homologous server.
Specifically, after obtaining the multimedia resource, the homogeneous server first obtains a domain name of the homogeneous server, a directory of the multimedia resource corresponding to the homogeneous server, and a file name of a file of the multimedia resource in the homogeneous server, in order to quickly read the multimedia resource. And then, the homologous server generates a corresponding homologous link according to the information and a preset link generation mode. Optionally, the homologous server generates the homologous link in a "domain name/directory/file name" arrangement. Of course, the homologous link may also be generated in an arrangement manner of "directory/file name/domain name", which is not limited in this embodiment, as long as the homologous server can find the storage location of the multimedia resource.
In this embodiment, the homologous link is generated according to the domain name, the directory and the file name, so that the homologous server can quickly and accurately find the storage position of the resource, and the downloading progress can be accelerated.
In an exemplary embodiment, after step S206, the method further comprises the steps of:
in step S207, a download completion notification message sent by the client after the completion of the downloading of the multimedia resource is received.
In step S208, according to the download complete notification message, a mark is added to the downloaded multimedia resource, so as to obtain the multimedia resource with the mark.
The mark is used for indicating that the multimedia resource is the multimedia resource which is downloaded.
Specifically, before step S207, after the multimedia resource is downloaded, the client generates a download completion notification message, and sends the download completion notification message to the homologous server. And then, after receiving the download completion notification message, the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message to obtain the multimedia resource with the mark, so that the homologous server can identify and distinguish the downloaded multimedia resource from the multimedia resource which is not downloaded.
In the embodiment, by marking the downloaded multimedia resources, the downloaded multimedia resources can be subjected to subsequent processing in time, and resource waste caused by resource idling is avoided.
In an exemplary embodiment, after step S208, the method further comprises the steps of:
in step S209, the marked multimedia resource cached by the homologous server is deleted.
Specifically, after the recording of the same source server is completed, the downloaded multimedia resource cached or stored by the same source server is deleted. Alternatively, the downloaded multimedia asset can be deleted immediately after the homologous server records. Or after the recording of the homologous server is completed, a timer is generated, and the downloaded multimedia resource is pulled and deleted after a preset time interval.
In this embodiment, by deleting the downloaded multimedia resource, the cache space of the homologous server can be saved.
Optionally, in the method for downloading a multimedia resource according to the foregoing embodiment, the execution main body may be a node.js layer in the same source server, where node.js is JavaScript running on the server. Js is a platform built based on Chrome JavaScript runtime. Js is an event-driven I/O server JavaScript environment.
Fig. 4 is a flowchart illustrating a method for downloading a multimedia resource, which is used in a client, according to an exemplary embodiment, and includes the following steps:
in step S302, a resource download request is generated in response to the resource download operation.
The resource downloading operation is the downloading operation of the non-homologous resource when the user triggers the downloading label.
Specifically, when a user performs a resource downloading operation, such as a click operation, in a client based on a downloading tag, the client detects the resource downloading operation, first determines whether the resource is a non-homologous resource, and if so, generates a resource downloading request.
In step S304, the resource download request is sent to the isogeny server, and the isogeny link returned by the isogeny server in response to the resource download request is received.
The homologous link is generated through the homologous server according to the multimedia resource sent by the non-homologous server and a preset link generation mode.
Specifically, after generating a resource downloading request, the client sends the resource downloading request to the same source server. And then, the homologous server analyzes the resource downloading request and sends a non-homologous resource acquisition request to the non-homologous server. Next, the non-homologous server returns the multimedia resource to the homologous server in response to the non-homologous resource acquisition request. And then, the homologous server generates corresponding homologous links for the non-homologous resources according to a preset link generation mode, and sends the homologous links to the client.
In step S306, the hyperlink href in the download tag is replaced with the homologous link to trigger downloading of the multimedia resource corresponding to the homologous link.
Specifically, after obtaining the homologous link, the client replaces the hyperlink href in the download tag with the homologous link, thereby triggering the download of the multimedia resource corresponding to the homologous link.
According to the method for downloading the multimedia resources, the non-homologous resources are cached in the homologous server, and the corresponding homologous link is generated, so that the client can modify the downloading label according to the homologous link, and the client can normally download the non-homologous resources from the homologous server. It can be understood that the method does not need to pack non-homologous resources into a format which can not be opened by a client, such as a compression packet, and the like, thereby saving the tedious operations that a user needs to decompress the compression packet and the like when obtaining the resources, reducing the data volume brought by the compression process, and saving the occupied space of data.
In an exemplary embodiment, after step S306, the method further comprises the steps of:
in step S307, after the multimedia resource is downloaded, a download completion notification message is generated;
in step S308, the download completion notification message is sent to the homologous server, so that the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message, thereby obtaining the multimedia resource with the mark.
Specifically, after the multimedia resource is downloaded, the client generates a download completion notification message and sends the download completion notification message to the homologous server. And then, after receiving the download completion notification message, the homologous server adds a mark to the downloaded multimedia resource to obtain the multimedia resource with the mark.
In this embodiment, after the multimedia resource is downloaded, the homologous server is notified of the downloading status in time, so that the homologous server can perform subsequent processing on the downloaded resource in time, thereby avoiding resource waste caused by resource idleness.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
Fig. 5 is a block diagram illustrating a downloading apparatus of a multimedia asset according to an exemplary embodiment. Referring to fig. 5, the apparatus includes a resource requesting unit 402, a link generating unit 404, and a link transmitting unit 406.
The resource requesting unit 402 is configured to execute a resource downloading request sent by a client, and send a non-homologous resource obtaining request to a non-homologous server, where the resource downloading request is a downloading request for a non-homologous resource when a downloading tag is triggered, and the non-homologous resource obtaining request is used for obtaining a multimedia resource stored in the non-homologous server.
The link generating unit 404 is configured to receive a multimedia resource returned by a non-homologous server in response to a non-homologous resource obtaining request, and generate a homologous link from the multimedia resource according to a preset link generating manner.
The link sending unit 406 is configured to execute sending the homologous link to the client, so that the client replaces the hyperlink href in the download tag with the homologous link to download the multimedia resource.
And generating the homologous link according to the domain name, the directory and the file name and a preset link generation mode.
In the device for downloading the multimedia resource, the client can modify the download label according to the homologous link by caching the non-homologous resource in the homologous server and generating the corresponding homologous link, so that the client can normally download the non-homologous resource from the homologous server. It can be understood that the method does not need to pack non-homologous resources into a format which can not be opened by a client, such as a compression packet, and the like, thereby saving the tedious operations that a user needs to decompress the compression packet and the like when obtaining the resources, reducing the data volume brought by the compression process, and saving the occupied space of data.
In an exemplary embodiment, the link generating unit 404 is specifically configured to perform obtaining a domain name of the homologous server, a directory of the multimedia resource in the homologous server, and a file name of a file in which the multimedia resource is located in the homologous server;
in an exemplary embodiment, the apparatus further comprises:
a message receiving unit (not shown) configured to execute receiving of a download completion notification message sent by the client after the download of the multimedia resource is completed;
and a resource marking unit (not shown) configured to add a mark to the downloaded multimedia resource according to the download completion notification message, so as to obtain a marked multimedia resource, where the mark is used to indicate that the multimedia resource is a downloaded multimedia resource.
In an exemplary embodiment, the apparatus further comprises:
a resource deletion unit (not shown) configured to perform deletion of the multimedia resource cached by the same origin server with the tag.
Fig. 6 is a block diagram illustrating a downloading apparatus of a multimedia asset according to an exemplary embodiment. Referring to fig. 6, the apparatus includes a request generation unit 502, a request transmission unit 504, and a link replacement unit 506.
The request generating unit 502 is configured to execute a resource downloading request generated in response to a resource downloading operation, wherein the resource downloading operation is a downloading operation for a non-homologous resource when a user triggers a downloading tag;
the request sending unit 504 is configured to send a resource downloading request to a homologous server, and receive a homologous link returned by the homologous server in response to the resource downloading request, where the homologous link is generated by the homologous server according to a multimedia resource sent by a non-homologous server and according to a preset link generation manner;
the link replacing unit 506 is configured to perform replacement of the hyperlink href in the download tag with the homologous link to trigger downloading of the multimedia resource corresponding to the homologous link.
In the device for downloading the multimedia resource, the client can modify the download label according to the homologous link by caching the non-homologous resource in the homologous server and generating the corresponding homologous link, so that the client can normally download the non-homologous resource from the homologous server. It can be understood that the method does not need to pack non-homologous resources into a format which can not be opened by a client, such as a compression packet, and the like, thereby saving the tedious operations that a user needs to decompress the compression packet and the like when obtaining the resources, reducing the data volume brought by the compression process, and saving the occupied space of data.
In an exemplary embodiment, the apparatus further comprises:
a message generating unit (not shown) configured to generate a download completion notification message after the completion of the downloading of the multimedia resource;
and a message sending unit (not shown) configured to send the download completion notification message to the homologous server, so that the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message, thereby obtaining the marked multimedia resource.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an apparatus 700 for performing a video playback method according to an example embodiment. For example, device 700 may be a mobile phone, computer, digital broadcast client, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, and so forth.
Referring to fig. 7, device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operation at the device 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile storage devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the device 700. For example, the sensor assembly 714 may detect an open/closed state of the device 700, the relative positioning of components, such as a display and keypad of the device 700, the sensor assembly 714 may also detect a change in the position of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, orientation or acceleration/deceleration of the device 700, and a change in the temperature of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
FIG. 8 is a block diagram illustrating an apparatus S00 for … …, according to an example embodiment. For example, the device S00 may be a server. Referring to fig. 8, device 800 includes a processing component 820 that further includes one or more processors and memory resources, represented by memory 822, for storing instructions, such as applications, that are executable by processing component 820. The application programs stored in memory 822 may include one or more modules that each correspond to a set of instructions. Further, the processing component 820 is configured to execute instructions to perform the multimedia asset download method described above.
The device 800 may also include a power component 824 configured to perform power management for the device 800, a wired or wireless network interface 826 configured to connect the device 800 to a network, and an input/output (I/O) interface 828. The device 800 may operate based on an operating system stored in memory 822, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 822 comprising instructions, executable by the processor of the device 800 to perform the method described above is also provided. The storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A method for downloading multimedia resources, the method being applied to a same source server and comprising:
responding to a resource downloading request sent by a client, and sending a non-homologous resource acquisition request to a non-homologous server, wherein the resource downloading request is a downloading request for a non-homologous resource when a downloading label is triggered, and the non-homologous resource acquisition request is used for acquiring a multimedia resource stored in the non-homologous server;
receiving the multimedia resource returned by the non-homologous server in response to the non-homologous resource acquisition request, and generating a homologous link for the multimedia resource according to a preset link generation mode;
and sending the homologous link to the client so that the client replaces the hyperlink href in the download label with the homologous link to download the multimedia resource.
2. The method for downloading the multimedia resource according to claim 1, wherein the step of generating the homologous link for the multimedia resource according to a preset link generation manner comprises:
acquiring a domain name of the homologous server, a directory of the multimedia resource in the homologous server and a file name of a file in which the multimedia resource is located in the homologous server;
and generating the homologous link according to the domain name, the directory and the file name and a preset link generation mode.
3. The method for downloading a multimedia resource according to claim 1, wherein after the step of sending the homologous link to the client, the method further comprises:
receiving a download completion notification message sent by the client after the multimedia resource is downloaded;
and adding a mark to the downloaded multimedia resource according to the download completion notification message to obtain the multimedia resource with the mark, wherein the mark is used for indicating that the multimedia resource is the downloaded multimedia resource.
4. The method for downloading a multimedia resource according to claim 3, wherein after the step of tagging the downloaded multimedia resource according to the download completion notification message to obtain a tagged resource, the method further comprises:
deleting the tagged multimedia asset cached by the homologous server.
5. A method for downloading multimedia resources, which is applied to a client and comprises the following steps:
responding to a resource downloading operation, and generating a resource downloading request, wherein the resource downloading operation is a downloading operation of a non-homologous resource when a user triggers a downloading label;
sending the resource downloading request to a homologous server, and receiving a homologous link returned by the homologous server in response to the resource downloading request, wherein the homologous link is generated by the homologous server according to a multimedia resource sent by a non-homologous server and a preset link generation mode;
and replacing the hyperlink href in the downloading label with the homologous link so as to trigger the downloading of the multimedia resource corresponding to the homologous link.
6. The method for downloading a multimedia resource according to claim 5, wherein after the step of replacing the hyperlink href in the download tag with the homologous link to trigger downloading the multimedia resource corresponding to the homologous link, the method further comprises:
after the multimedia resource is downloaded, generating a download completion notification message;
and sending the download completion notification message to the homologous server so that the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message to obtain the marked multimedia resource.
7. An apparatus for downloading multimedia resources, the apparatus being applied to a same source server, comprising:
the resource request unit is configured to execute a resource downloading request sent by a response client and send a non-homologous resource acquisition request to a non-homologous server, wherein the resource downloading request is a downloading request for a non-homologous resource when a downloading label is triggered, and the non-homologous resource acquisition request is used for acquiring multimedia resources stored in the non-homologous server;
the link generation unit is configured to receive the multimedia resource returned by the non-homologous server in response to the non-homologous resource acquisition request, and generate a homologous link for the multimedia resource according to a preset link generation mode;
a link sending unit configured to execute sending the homologous link to the client, so that the client replaces the hyperlink href in the download tag with the homologous link to download the multimedia resource.
8. The apparatus according to claim 7, wherein the link generating unit is specifically configured to perform obtaining a domain name of the origin server, a directory of the multimedia resource in the origin server, and a file name of a file in which the multimedia resource is located in the origin server; and generating the homologous link according to the domain name, the directory and the file name and a preset link generation mode.
9. The apparatus for downloading a multimedia resource according to claim 7, further comprising:
a message receiving unit configured to execute receiving a download completion notification message sent by the client after the download of the multimedia resource is completed;
and the resource marking unit is configured to add a mark to the downloaded multimedia resource according to the download completion notification message to obtain the multimedia resource with the mark, and the mark is used for indicating that the multimedia resource is the downloaded multimedia resource.
10. The apparatus for downloading a multimedia resource according to claim 9, further comprising:
a resource deletion unit configured to perform deletion of the tagged multimedia resource cached by the origin server.
11. An apparatus for downloading multimedia resources, the apparatus being applied to a client and comprising:
the request generating unit is configured to execute a resource downloading request generated in response to a resource downloading operation, wherein the resource downloading operation is a downloading operation for a non-homologous resource when a user triggers a downloading label;
the request sending unit is configured to send the resource downloading request to a homologous server and receive a homologous link returned by the homologous server in response to the resource downloading request, wherein the homologous link is generated by the homologous server according to a multimedia resource sent by a non-homologous server and a preset link generation mode;
and the link replacing unit is configured to replace the hyperlink href in the downloading label with the homologous link so as to trigger the downloading of the multimedia resource corresponding to the homologous link.
12. The apparatus for downloading a multimedia resource according to claim 11, further comprising:
the message generating unit is configured to generate a download completion notification message after the multimedia resource is downloaded;
and the message sending unit is configured to send the download completion notification message to the homologous server, so that the homologous server adds a mark to the downloaded multimedia resource according to the download completion notification message to obtain the marked multimedia resource.
13. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of downloading a multimedia asset of any of claims 1 to 4.
14. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of downloading a multimedia asset of claim 5 or 6.
15. A storage medium in which instructions, when executed by a processor of a server, enable the server to perform a method of downloading a multimedia asset as claimed in any one of claims 1 to 4.
16. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of downloading a multimedia asset as claimed in claim 5 or 6.
CN202010113660.6A 2020-02-24 2020-02-24 Method and device for downloading multimedia resources, server and electronic equipment Active CN111343268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010113660.6A CN111343268B (en) 2020-02-24 2020-02-24 Method and device for downloading multimedia resources, server and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010113660.6A CN111343268B (en) 2020-02-24 2020-02-24 Method and device for downloading multimedia resources, server and electronic equipment

Publications (2)

Publication Number Publication Date
CN111343268A CN111343268A (en) 2020-06-26
CN111343268B true CN111343268B (en) 2022-03-25

Family

ID=71185437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010113660.6A Active CN111343268B (en) 2020-02-24 2020-02-24 Method and device for downloading multimedia resources, server and electronic equipment

Country Status (1)

Country Link
CN (1) CN111343268B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309861A (en) * 2012-03-07 2013-09-18 阿里巴巴集团控股有限公司 Method and device for acquiring cross-domain data
CN106375144A (en) * 2016-08-29 2017-02-01 北京知道未来信息技术有限公司 Network tracing method capable of acquiring information in cross-domain way based on JSONP (JavaScript Object Notation with Padding)
CN109756748A (en) * 2019-01-30 2019-05-14 百度在线网络技术(北京)有限公司 Generation method, device and the computer equipment of multimedia album
CN109981595A (en) * 2019-03-05 2019-07-05 网宿科技股份有限公司 A kind of resource acquiring method, resource return method and server, storage medium
CN110362773A (en) * 2019-06-18 2019-10-22 中国平安人寿保险股份有限公司 Cross-domain communication method, device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10631068B2 (en) * 2008-11-26 2020-04-21 Free Stream Media Corp. Content exposure attribution based on renderings of related content across multiple devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309861A (en) * 2012-03-07 2013-09-18 阿里巴巴集团控股有限公司 Method and device for acquiring cross-domain data
CN106375144A (en) * 2016-08-29 2017-02-01 北京知道未来信息技术有限公司 Network tracing method capable of acquiring information in cross-domain way based on JSONP (JavaScript Object Notation with Padding)
CN109756748A (en) * 2019-01-30 2019-05-14 百度在线网络技术(北京)有限公司 Generation method, device and the computer equipment of multimedia album
CN109981595A (en) * 2019-03-05 2019-07-05 网宿科技股份有限公司 A kind of resource acquiring method, resource return method and server, storage medium
CN110362773A (en) * 2019-06-18 2019-10-22 中国平安人寿保险股份有限公司 Cross-domain communication method, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
浏览器跨域通信安全技术研究;何良等;《信息安全与通信保密》;20130410;全文 *

Also Published As

Publication number Publication date
CN111343268A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
CN107220059B (en) Application interface display method and device
CN106547547B (en) data acquisition method and device
CN106792442B (en) Data migration method and device
CN111737617A (en) Page resource loading method and device, electronic equipment and storage medium
CN111639276A (en) Resource preloading method and device and storage medium
CN111695064B (en) Buried point loading method and device
CN107220371B (en) Page display method and device and storage medium
CN111079040B (en) Resource sniffing method, device, terminal, server and storage medium
CN112328330A (en) iOS component calling method, device, middleware, electronic equipment and medium
CN111343268B (en) Method and device for downloading multimedia resources, server and electronic equipment
CN107679205B (en) Multimedia data playing method and device, computer equipment and storage medium
CN110543265A (en) Page title bar generation method and device, electronic equipment and storage medium
CN112069437B (en) Webpage request processing method and device, electronic equipment and storage medium
CN115509872A (en) Client behavior data acquisition method and device
CN109766501B (en) Crawler protocol management method and device and crawler system
CN110659253A (en) File packaging method and device, electronic equipment and medium
CN112182449A (en) Page loading method and device, electronic equipment and storage medium
CN112860625A (en) Data acquisition method, data storage method, device, equipment and storage medium
CN111597106A (en) Point burying management method and device
CN110989987A (en) Portal webpage generation method, portal webpage generation device, client, server and storage medium
CN111131000B (en) Information transmission method, device, server and terminal
CN110995767B (en) Request processing method and device
CN112182027B (en) Information query method, device, electronic equipment and storage medium
CN110311968B (en) Method and device for loading file in streaming mode and intelligent 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221221

Address after: 2101 Xingguang City, No. 1766 Binsheng Road, Changhe Street, Binjiang District, Hangzhou City, Zhejiang Province, 310056

Patentee after: Hangzhou Tangzhi Cosmic Technology Co.,Ltd.

Address before: 101d1-7, 1st floor, building 1, No. 6, Shangdi West Road, Haidian District, Beijing 100085

Patentee before: Beijing Dajia Internet Information Technology Co.,Ltd.

TR01 Transfer of patent right