Resource transmission method, device, equipment and storage medium

The CDN device obtains the shard and version identifier of the resource file from the object storage device, and reorganizes the resource file in the object storage device, solving the problem of shard version inconsistency caused by changes in the resource file version and achieving efficient resource file transfer.

CN119363761BActive Publication Date: 2025-04-29SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411940632.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-29
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

When the source station device transmits resource files to the object storage device, the change in the resource file version causes different versions of shards in the resource file obtained by the object storage, causing the content distribution network device to provide the terminal with different versions of resource file shards, resulting in the terminal being unable to use it.

Method used

The resource request is sent to the object storage device through the CDN device to obtain the first shard resource and the first identifier. When the version identifiers corresponding to the first shard resource and the second shard resource are both the first identifiers, the resource file is reorganized to ensure that each shard resource in the resource file belongs to the same version.

Benefits of technology

It avoids CDN devices providing different versions of resource file sharding to terminals, reduces the waste of data transmission resources, and improves the efficiency of resource file transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363761B_ABST
    Figure CN119363761B_ABST
Patent Text Reader

Abstract

The present application discloses a resource transmission method, device, computing device cluster and storage medium, which belongs to the field of content distribution. The method is executed by a content distribution network CDN device, and the method includes: sending a first resource request to an object storage device, the first resource request is used to request the object storage device to obtain a first shard resource, the first shard resource is a shard resource in a resource file; obtaining the first shard resource and a first identifier sent by the object storage device, the first identifier is a version identifier generated by a source station device for the resource file; in response to the version identifiers corresponding to the first shard resource and the second shard resource being both the first identifier, reorganizing the resource file based on the first shard resource and the second shard resource, the second shard resource is a shard resource in the resource file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of content distribution, and in particular to a resource transmission method, device, equipment and storage medium. Background Art

[0002] With the development of content distribution technology, content delivery network (CDN) devices are connected to object storage devices, and object storage devices are connected to source station devices. CDN devices deploy device nodes in different geographical locations, and reduce the delay in providing resources to users by caching content to the geographical locations around users. Object storage devices can achieve a flat storage structure.

[0003] In the related art, a content distribution network device initiates a resource request to an object storage device. When the object storage device does not store the requested resource file, the object storage device transmits the resource request to the source station device, and the source station device transmits the resource file to the object storage device.

[0004] However, if the resource file version changes when the source station device transmits the resource file to the object storage device (for example, the resource file is updated or edited), the resource file obtained by the object storage contains a sub-part corresponding to the first version and another sub-part corresponding to the second version. How to prevent the content distribution network device from providing fragments of resource files of different versions to the terminal used by the user, thereby preventing the terminal from being unable to use the resource file, is an urgent problem to be solved. Summary of the invention

[0005] The present application provides a resource transmission method, apparatus, device and storage medium, and the technical solution is as follows:

[0006] According to one aspect of the present application, a resource transmission method is provided, which is executed by a CDN device, and the method includes: sending a first resource request to an object storage device, the first resource request is used to request the object storage device to obtain a first shard resource, the first shard resource is a shard resource in a resource file; obtaining the first shard resource and a first identifier sent by the object storage device, the first identifier is a version identifier generated by a source station device for the resource file; in response to the version identifiers corresponding to the first shard resource and the second shard resource being the first identifier, reorganizing the resource file, the resource file including the first shard resource and the second shard resource, the second shard resource being the shard resource in the resource file.

[0007] The present application provides the first shard resource and the first identifier to the CDN device through the object storage device. Based on the response to the first resource request of the CDN device, the identification information of the first shard resource is provided. The first identifier is the identifier carried when the first shard resource is obtained from the source station device, and the identification information provided by the source station device as the data source device of the first shard resource is retained. In the case that the resource file to which the first shard resource belongs in the source station device changes, the identification information changes. The object storage device retains the identification information provided by the source station device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0008] In an optional implementation, in response to the fact that the version identifiers corresponding to the first shard resource and the second shard resource are both the first identifier, before reorganizing the resource file, the method further includes:

[0009] Send a second resource request to the object storage device, where the second resource request is used to request the object storage device to obtain the second shard resource; obtain the second shard resource and the first identifier sent by the object storage device, where the resource file is downloaded by the object storage device from the source station device.

[0010] When the present application sends the first shard resource and the second shard resource to the CDN device through the object storage device, the original identifier provided by the source station device is sent, and the identification information provided by the source station device as the data source device of the first shard resource is retained. The resource file is reorganized by the CDN device in response to the version identifiers corresponding to the first shard resource and the second shard resource being the first identifier, ensuring that each shard resource in the resource file belongs to the same version, thereby avoiding the CDN device from providing different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0011] In an optional implementation, the method further includes: obtaining a request for obtaining the resource file sent by a terminal; and sending the resource file to the terminal; wherein the first resource request and the second resource request are constructed based on the obtaining request.

[0012] The CDN device of the present application reassembles a resource file by using the version identifiers corresponding to the first fragment resource and the second fragment resource as the first identifier, and sends the resource file to the terminal, thereby ensuring that the fragment resources in the resource file belong to the same version, thereby avoiding the CDN device from providing fragments of resource files of different versions to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0013] In an optional implementation, the method also includes: sending a third resource request to the object storage device, the third resource request is used to request the object storage device to obtain a third shard resource, the third shard resource is a shard resource in the resource file; obtaining the third shard resource and a second identifier sent by the object storage device, the second identifier is a version identifier generated by the object storage device for the resource file to which the third shard resource belongs, and the third shard resource is entered into the object storage device based on human-computer interaction operations; in response to the first identifier corresponding to the first shard resource and the second identifier corresponding to the third shard resource being different, deleting the third shard resource.

[0014] When the present application sends the first shard resource and the third shard resource to the CDN device through the object storage device, the original identifier provided by the source station device is sent, and the identification information provided by the source station device as the data source device of the first shard resource is retained. In response to the difference in the identifiers corresponding to the first shard resource and the third shard resource, the CDN device deletes the third shard resource, and when the shard resources in the resource file belong to different versions of the resource file, the CDN device is prevented from providing shards of different versions of the resource file to the terminal, thereby avoiding the waste of data transmission resources and improving the efficiency of resource file transmission.

[0015] In an optional implementation manner, the first resource request carries an identity of the CDN device, and request header information of the first resource request includes the identity.

[0016] This application indicates to the object storage request that the first resource request is sent by the CDN device by carrying the identity of the CDN device, distinguishing between the method of directly using the terminal to request the object storage device or other methods to request resources in the object storage device. The object storage device can be flexibly configured to only provide the original identifier sent by the source station device to the CDN device, and provide the identifier generated by the object storage device itself to resource requests from other sources, so as to avoid affecting the data transmission between the object storage device and other computer devices or terminals.

[0017] In an optional implementation, the first identifier includes at least one of an entity tag and a modification time of the first slice resource.

[0018] The present application can effectively determine the version information of the resource file to which the first slice resource belongs by using the entity tag and / or modification time as the version identifier of the first slice resource.

[0019] According to another aspect of the present application, a resource transmission method is provided, the method being executed by an object storage device, the method comprising:

[0020] Obtain a first resource request sent by a CDN device, where the first resource request is used to request the object storage device to obtain a first shard resource, where the first shard resource is a shard resource in a resource file; in response to the first resource request, send the first shard resource and a first identifier to the CDN device, where the first identifier is a version identifier generated by the source station device for the resource file.

[0021] The present application provides the first shard resource and the first identifier to the CDN device through the object storage device. Based on the response to the first resource request of the CDN device, the identification information of the first shard resource is provided. The first identifier is the identifier carried when the first shard resource is obtained from the source station device, and the identification information provided by the source station device as the data source device of the first shard resource is retained. In the case that the resource file to which the first shard resource belongs in the source station device changes, the identification information changes. The object storage device retains the identification information provided by the source station device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0022] In an optional implementation, in response to the first resource request, sending the first shard resource and the first identifier to the CDN device includes: in response to the first resource request, sending a transparent resource request to the source station device, the transparent resource request is used to request the source station device to obtain the first shard resource; obtaining the first shard resource and the first identifier sent by the source station device; and sending the first shard resource and the first identifier to the CDN device.

[0023] In an optional implementation, the method further includes: storing the first slice resource and the first identifier, and adding a first identifier to the meta information of the first slice resource, wherein the first identifier is used to indicate that a data source of the first slice resource is the source station device;

[0024] The sending the first fragment resource and the first identifier to the CDN device includes: when the meta information of the first fragment resource includes the first identifier, sending the first fragment resource and the first identifier to the CDN device.

[0025] The present application verifies the metadata of the first shard resource, and when the data source of the shard resource in the resource file is the source station device, sends the identifier provided by the source station device, thereby avoiding sending the identifier generated by the object storage device for the resource file to the CDN device; provides a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of the resource file to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0026] In an optional implementation, in response to the first resource request, sending a transparent transmission resource request to the source station device includes:

[0027] In response to the first resource request, searching for the first shard resource among a plurality of candidate resources stored in the object storage device;

[0028] When the search result for the first shard resource is empty, the transparent transmission resource request is sent to the source station device.

[0029] The present application searches whether the first shard resource is stored in the object storage device before sending a transparent resource request, thereby restricting the request to the source station device for the first shard resource only when the first shard resource is not stored in the object storage device, thereby reducing the load pressure on the resource transmission bandwidth between the object storage device and the source station device.

[0030] In an optional implementation, in response to the first resource request, sending the first shard resource and the first identifier to the CDN device includes: in response to the first resource request, searching for the first shard resource among multiple candidate resources stored in the object storage device; and in a case where the multiple candidate resources include the first shard resource, sending the first shard resource and the first identifier to the CDN device.

[0031] The present application reduces the load pressure of the resource transmission bandwidth between the object storage device and the source station device by not requesting the source first shard resource back from the source station device when the first shard resource is stored in the object storage device.

[0032] In an optional implementation, the method further includes: sending a resource download request to the source station device, the resource download request being used to request the source station device to obtain the resource file to which the first fragment resource belongs; and storing the resource file sent by the source station device.

[0033] The present application sends a resource download request to the source station device, and the resource file is stored in the object storage device in an asynchronous manner after the first shard resource, thereby ensuring the integrity of the resource file to which the stored first shard resource belongs; when the second resource request sent by the CDN device is obtained, there is no need to request the source second shard resource from the source again from the source station device, and the shard resource, namely the second shard resource, can be obtained directly from the stored resource file, thereby saving the source return time of the second shard resource and improving data processing efficiency.

[0034] In an optional implementation, storing the resource file sent by the source station device includes: storing the resource file, and adding a first identifier to the meta-information of the resource file, wherein the first identifier is used to indicate that a data source of the resource file is the source station device.

[0035] The present application records the data source of the resource file in the object storage device by adding a first identifier to the metadata of the resource file, thereby providing a basis for sending the original identifier provided by the source station device to the CDN device based on the data source of the resource file, and providing a basis for the CDN device to verify whether the fragmented resources in the resource file belong to the same version, thereby avoiding the CDN device from providing fragments of resource files of different versions to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0036] In an optional implementation, the method further includes: obtaining a second resource request sent by the CDN device, the second resource request being used to request the object storage device to obtain a second shard resource; and in response to the second resource request, sending the second shard resource and the first identifier to the CDN device.

[0037] When the present application sends the first shard resource and the second shard resource to the CDN device through the object storage device, the original identifier provided by the source station device is sent, and the identification information provided by the source station device as the data source device of the first shard resource is retained. The resource file is reorganized by the CDN device in response to the version identifiers corresponding to the first shard resource and the second shard resource being the first identifier, ensuring that each shard resource in the resource file belongs to the same version, thereby avoiding the CDN device from providing different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0038] In an optional implementation, the method also includes: obtaining a third resource request sent by the CDN device, the third resource request is used to request the object storage device to obtain a third shard resource, and the third shard resource is a shard resource in the resource file; in response to the third resource request, sending the third shard resource and a second identifier to the CDN device; wherein the third shard resource is entered into the object storage device based on human-computer interaction operations, and the second identifier is generated by the object storage device.

[0039] In an optional implementation manner, the first resource request carries an identity of the CDN device, and request header information of the first resource request includes the identity.

[0040] This application indicates to the object storage request that the first resource request is sent by the CDN device by carrying the identity of the CDN device, distinguishing between the method of directly using the terminal to request the object storage device or other methods to request resources in the object storage device. The object storage device can be flexibly configured to only provide the original identifier sent by the source station device to the CDN device, and provide the identifier generated by the object storage device itself to resource requests from other sources, so as to avoid affecting the data transmission between the object storage device and other computer devices or terminals.

[0041] In an optional implementation, the first identifier includes at least one of an entity tag and a modification time of the first slice resource. The present application can effectively determine the version information of the resource file to which the first slice resource belongs by using the entity tag and / or the modification time as the version identifier of the first slice resource.

[0042] According to another aspect of the present application, a resource transmission device is provided, the device comprising: a sending module, used to send a first resource request to an object storage device, the first resource request is used to request the object storage device to obtain a first shard resource, the first shard resource is a shard resource in a resource file; an acquisition module, used to obtain the first shard resource and a first identifier sent by the object storage device, the first identifier is a version identifier generated by a source station device for the resource file; a processing module, used to reorganize the resource file in response to the version identifiers corresponding to the first shard resource and the second shard resource being the first identifier, the resource file comprising the first shard resource and the second shard resource, the second shard resource being the shard resource in the resource file.

[0043] According to another aspect of the present application, a resource transmission device is provided, the device comprising: an acquisition module, used to acquire a first resource request sent by a CDN device, the first resource request is used to request the object storage device to obtain a first shard resource, the first shard resource is a shard resource in a resource file; a sending module, used to send the first shard resource and a first identifier to the CDN device in response to the first resource request, the first identifier is a version identifier generated by the source station device for the resource file.

[0044] According to another aspect of the present application, a resource transmission system is provided, which includes a content distribution network CDN device and an object storage device, the CDN device is used to execute the resource transmission method described above, and the object storage device is used to execute the resource transmission method described above.

[0045] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the resource transmission method as described above.

[0046] According to another aspect of the present application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the computer-readable storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the resource transmission method described above.

[0047] According to another aspect of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the resource transmission method described above.

[0048] The beneficial effects of the technical solution provided by this application include at least:

[0049] The first shard resource and the first identifier are provided to the CDN device through the object storage device. Based on the response to the first resource request of the CDN device, the identification information of the first shard resource is provided. The first identifier is the identifier carried when the first shard resource is obtained from the source station device, and the identification information provided by the source station device as the data source device of the first shard resource is retained. In the case that the resource file to which the first shard resource belongs in the source station device changes, the identification information changes. The object storage device retains the identification information provided by the source station device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a schematic diagram of a computer system provided by an exemplary embodiment of the present application;

[0051] Figure 2 is a schematic diagram of a resource transmission method provided by an exemplary embodiment of the present application;

[0052] Figure 3 is a first flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0053] Figure 4 is a second flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0054] Figure 5 is a third flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0055] Figure 6 is a fourth flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0056] Figure 7 is a fifth flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0057] Figure 8 is a sixth flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0058] Fig. 9 is a seventh flow chart of a resource transmission method provided by an exemplary embodiment of the present application;

[0059] Fig.10 is a structural block diagram of a data transmission device provided by an exemplary embodiment of the present application;

[0060] Fig.11is a structural block diagram of another data transmission device provided by an exemplary embodiment of the present application;

[0061] Fig.12 is a structural block diagram of a computing device provided by an exemplary embodiment of the present application;

[0062] Fig.13 is a structural block diagram of a computing device cluster provided by an exemplary embodiment of the present application;

[0063] Fig.14 It is a schematic diagram of a computing device cluster provided by an exemplary embodiment of the present application.

[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION

[0065] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0067] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0068] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the acquisition request, first resource request and other information involved in this application are all obtained with full authorization.

[0069] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0070] Figure 1 A schematic diagram of a computer system provided by an embodiment of the present application is shown. The computer system can be implemented as a system architecture of a resource transmission method. The computer system may include: a content delivery network (CDN) device 20, an object storage device 30;

[0071] The CDN device 20 and the object storage device 30 can be implemented as electronic devices with data computing, processing and storage capabilities, such as servers; taking the CDN device 20 as a server deployed with content distribution services as an example, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Similarly, the object storage device 30 can be implemented as a server with object storage function.

[0072] Exemplarily, the CDN device 20 and the object storage device 30 may communicate with each other via a network, such as a wired or wireless network.

[0073] The computer system may further include: a terminal 10 and a source station device 40 .

[0074] The terminal 10 may be an electronic device such as a mobile phone, a tablet computer, a PC (personal computer), etc. The terminal 10 has the ability to send a request to the CDN device 20 to obtain resource files from the CDN device 20; illustratively, the terminal 10 and the CDN device 20 may communicate through a network, such as a wired or wireless network.

[0075] The source station device 40 can be implemented as an electronic device with data computing, processing and storage capabilities, such as a server; the source station device 40 can be implemented as a server with data storage and transmission capabilities, such as providing background support for the storage of resource files. Exemplarily, the source station device 40 and the object storage device 30 can communicate through a network, such as a wired or wireless network.

[0076] In the resource transmission method provided in the embodiment of the present application, the execution subject of each step may be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. Figure 1 Taking the implementation environment of the scheme shown as an example, the resource transmission method can be executed by the CDN device 20 or the object storage device 30 alone, or by the CDN device 20 or the object storage device 30 interacting and cooperating to execute the resource transmission method; the resource transmission method can also be executed by at least one of the terminal 10, the CDN device 20, the object storage device 30 and the source station device 40, and this application does not limit this.

[0077] Figure 2 A schematic diagram of a resource transmission method provided by an exemplary embodiment of the present application is shown.

[0078] The CDN device 20 sends a resource request 302 to the object storage device 30. The resource request 302 is used to request the object storage device 30 to obtain the shard resource in the resource file (taking the resource file including two shard resources as an example, the shard resource requested by the resource request 302 can be the first shard resource or the second shard resource).

[0079] Taking resource request 302 for obtaining the first shard resource as an example, if the object storage device 30 does not cache the resource file, the object storage device 30 sends a transparent resource request 304 to the source station device 40, requesting to obtain the first shard resource from the source station device 40.

[0080] In response to the transparent resource request 304, the source station device 40 returns the source shard resource to the object storage device 30 (here, the return of the first shard resource is used as an example for introduction); the object storage device 30 sends the requested shard resource to the CDN device 20, that is, sends the requested first shard resource. Exemplarily, when the source station device 40 returns the source first shard resource to the object storage device 30, it also sends the entity tag (entity tag, ETag) of the first shard resource; when the object storage device 30 sends the first shard resource to the CDN device 20, it also includes sending the ETag provided by the source station device 40.

[0081] As introduced above, the object storage device 30 requests the source station device 40 to return the first shard resource. In order to ensure that the object storage device completely stores the resource file belonging to the first shard resource, after receiving the first shard resource sent by the source station device, the object storage device 30 asynchronously requests the source station device 40 to download the resource file.

[0082] In the object storage device 30 , the ETag of each fragment resource of the resource file is regenerated by the object storage device 30 and has a value of: ccc. The object storage device 30 also records the original ETag of the resource file in the source station device 40 separately.

[0083] In one case, the resource file in the source station device 40 has not been updated, and the value of the original Etag recorded by the object storage device 30 is aaa. In another case, the resource file in the source station device 40 has been updated (for example, the uploader of the resource file provides a new version of the resource file to the source station device); accordingly, the file content of the resource file in the source station device has changed, and the value of Etag has changed to bbb; the resource file downloaded by the object storage device 30 is the resource file after the resource update, and the value of the original Etag recorded is bbb.

[0084] Exemplarily, in a resource request, the required slice resource is indicated by the file name of the resource file. In the case of a resource update, the file content of the resource file is updated (also known as a different version of the resource file), but the file name of the resource file does not change. Even if a resource update occurs, the resource request can obtain the slice resource according to the file name request.

[0085] Next, take resource request 302 to obtain the second shard resource as an example;

[0086] After obtaining the first shard resource, the CDN device 20 requests the object storage device 30 to obtain the second shard resource; since the object storage device 30 has downloaded the resource file from the source station device 40, that is, the object storage device 30 has cached the resource file, the object storage device 30 sends the requested shard resource to the CDN device 20, that is, sends the second shard resource, and sends the original Etag that separately records the resource file in the source station device 40.

[0087] For the CDN device 20, in one example, the ETag of the received first shard resource and the second shard resource are both aaa; for example, the resource file in the source station device 40 has never been updated; the ETag of the first shard resource and the second shard resource are the same, the first shard resource and the second shard resource belong to the same version of the resource file, the resource file spliced ​​based on the first shard resource and the second shard resource can be used normally, and the CDN device 20 retains the storage of the first shard resource and the second shard resource.

[0088] In another example, the ETag of the received first shard resource and the second shard resource are both bbb; for example, a resource update occurs before the source station device 40 returns the first shard resource to the object storage, the ETag of the first shard resource and the second shard resource are the same, and the first shard resource and the second shard resource received by the CDN device 20 are both shard resources in the resource file after the version update. The resource file spliced ​​based on the first shard resource and the second shard resource can be used normally, and the CDN device 20 retains the storage of the first shard resource and the second shard resource.

[0089] In another example, the ETag value of the received first shard resource is aaa, and the ETag value of the second shard resource is bbb; for example, no resource update occurs when the source station device 40 returns the first shard resource to the object storage; and the resource update occurs before the asynchronous download of the resource file, and the resource file stored in the object storage device 30 is the resource file after the resource update; the ETags of the first shard resource and the second shard resource are different, and the first shard resource and the second shard resource belong to different versions of resource files. The resource file obtained by splicing the first shard resource and the second shard resource cannot be used normally, and the CDN device 20 deletes the first shard resource and the second shard resource.

[0090] Next, the resource transmission method will be introduced through the following embodiments.

[0091] Figure 3 A first flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method can be performed by an object storage device and a CDN device. The method includes:

[0092] Step 500: The CDN device sends a first resource request to the object storage device.

[0093] Exemplarily, the first resource request is used to request the object storage device to obtain the first shard resource, and the first shard resource is a shard resource in a resource file. Exemplarily, the type of the resource file can be at least one of a multimedia file, a compressed file, a text file, a code file, etc. This application does not limit the file format and file content of the resource file.

[0094] Exemplarily, the first resource request may be sent when the CDN device does not store the first fragment resource, or may be sent when the CDN device needs to update the first fragment resource. The present application does not limit the reason for sending the first resource request.

[0095] CDN devices deploy device nodes in different geographical locations and cache content in the geographical locations around users, thereby reducing the delay in providing resources to users and improving resource access speed.

[0096] Step 510: The object storage device obtains a first resource request sent by the CDN device.

[0097] Exemplarily, the first resource request is usually transmitted through the Internet, but it does not rule out the situation where the object storage device and the CDN device are deployed in a close geographical location and there is an information transmission method such as a bus between the two.

[0098] Object storage devices manage and store data using objects as basic units. For example, object storage devices use a flat storage structure, such as no concept of folders, and all data is stored at the same level.

[0099] In an optional design, the first resource request carries the identity of the CDN device, and the request header information of the first resource request includes the identity. By carrying the identity of the CDN device to indicate to the object storage request that the first resource request is sent by the CDN device, it is distinguished between directly using a terminal to request the object storage device or other methods to request resources in the object storage device. The object storage device can be flexibly configured to only provide the original identifier sent by the source station device to the CDN device, and provide the identifier generated by the object storage device itself to resource requests from other sources, so as to avoid affecting the data transmission between the object storage device and other computer devices or terminals.

[0100] Step 520: The object storage device sends the first fragment resource and the first identifier to the CDN device in response to the first resource request.

[0101] The first slice resource is feedback information of the first resource request, and provides the requested first slice resource to the CDN device.

[0102] The first identifier is an identifier carried by the first shard resource when the object storage device obtains the first shard resource from the source station device. The first identifier is a version identifier generated by the source station device for the resource file; the object storage device retains the original identifier provided by the source station device when providing the first shard resource to the object storage.

[0103] In an optional implementation, the first identifier includes at least one of an entity tag (ETag) and a modification time of the first fragment resource. Exemplarily, the entity tag is used to indicate a response header in the hypertext transfer protocol (HTTP) for marking version information of the resource. The modification time is used to indicate the last modification time (last-modified) of the resource.

[0104] Exemplarily, the first identifier is used to instruct the CDN device to reorganize the resource file based on the first fragment resource and the second fragment resource when the version identifiers corresponding to the first fragment resource and the second fragment resource are both the first identifier, and the second fragment resource is the fragment resource in the resource file.

[0105] Step 540: The CDN device obtains the first fragment resource and the first identifier sent by the object storage device.

[0106] This step is a process of receiving the first fragment resource and the first identifier in step 520, and the CDN device obtains the first fragment resource and the first identifier.

[0107] Step 560: In response to the fact that the version identifiers corresponding to the first fragment resource and the second fragment resource are both the first identifier, the CDN device reorganizes the resource file.

[0108] Exemplarily, the resource file includes a first slice resource and a second slice resource; the resource file is reorganized by the CDN device based on the first slice resource and the second slice resource, such as splicing the first slice resource and the second slice resource front and back to obtain the resource file; the second slice resource is the slice resource in the resource file.

[0109] The second shard resource is a resource stored in the CDN device. The second shard resource can be sent by the object storage device before, after, or at the same time as the first shard resource; it can also be uploaded directly by the CDN device from the source station device or a user with resource upload permission. This application does not limit how the CDN device obtains the second shard resource.

[0110] In the case where the version identifiers corresponding to the first fragment resource and the second fragment resource are both the first identifier, the first fragment resource and the second fragment resource are fragment resources of the same version of the resource file. The first fragment resource and the second fragment resource belonging to the same version are merged, and the resource file obtained can be used normally, for example, the video file can be played normally. Avoid the problem that the resource file obtained after the merger cannot be used due to the different versions of the resource files belonging to the first fragment resource and the second fragment resource.

[0111] Step 510 and step 520 in this embodiment can be combined into a new embodiment and implemented separately, and implemented as a resource transmission method that can be executed by an object storage device. Step 500, step 540, and step 560 in this embodiment can be combined into a new embodiment and implemented separately, and implemented as a resource transmission method that can be executed by a CDN device. This application does not limit this.

[0112] In summary, the method provided in this embodiment provides the first shard resource and the first identifier to the CDN device through the object storage device, and provides identification information of the first shard resource based on the response to the first resource request of the CDN device. The first identifier is the identifier carried when the first shard resource is obtained from the source station device, and the identification information provided by the source station device as the data source device of the first shard resource is retained. In the case that the resource file to which the first shard resource belongs in the source station device changes, the identification information changes. The object storage device retains the identification information provided by the source station device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0113] Figure 4 A second flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method can be executed by an object storage device. Figure 3 On the basis of the embodiment in which step 510 and step 520 are performed separately in the illustrated embodiment, step 532, step 534, step 536, and step 538 are also included:

[0114] Step 532: Send a resource download request to the source station device;

[0115] The resource download request is used to request the source station device to obtain the resource file belonging to the first shard resource; when the CDN device requests the first shard resource from the object storage device, the object storage device sends a resource download request to the source station device in order to ensure the integrity of the resource file belonging to the stored first shard resource, so as to obtain the resource file belonging to the first shard resource.

[0116] Step 534: storing the resource file sent by the source station device;

[0117] The source station device responds to the resource download request and provides the resource file to the object storage device. In one example, the first shard resource is obtained by the object storage device requesting the source station device to mirror back to the source. After the object storage device requests the source station device to mirror back to the source, the object storage device sends a resource download request to the source station device in order to ensure the integrity of the resource file to which the first shard resource belongs. The resource file and the first shard resource are stored in the object storage device in an asynchronous manner. Optionally, a first identifier is also obtained when obtaining the resource file.

[0118] It can be understood that step 532 and step 534 in this embodiment can be Figure 3 Step 510 and step 520 in the illustrated embodiment are combined into a new embodiment and implemented separately, and the present application does not limit this.

[0119] Step 536: Obtain a second resource request sent by the CDN device;

[0120] Exemplarily, the second resource request is used to request the object storage device to obtain the second shard resource, and the second shard resource is the shard resource in the resource file; in this embodiment, the second shard resource in the CDN device is obtained by requesting the object storage device.

[0121] Step 538: In response to the second resource request, send the second fragment resource and the first identifier to the CDN device;

[0122] The object storage device sends the second shard resource and the first identifier to the CDN device; illustratively, the second shard resource is feedback information for the second resource request, and provides the requested second shard resource to the CDN device.

[0123] The first identifier is an identifier that the object storage device carries when it obtains the second shard resource from the source station device. The object storage device retains the original identifier provided by the source station device when providing the second shard resource to the object storage. Exemplarily, the object storage device obtains the first shard resource and the second shard resource from the source station device at different times, and the second shard resource is asynchronously downloaded from the source station device after the object storage returns the first shard resource; the object storage device retains the original identifier when the source station device provides the resource file to the object storage.

[0124] The resource file is sent by the source station device, and an identifier of the resource file is also obtained when the resource file is obtained; if there is no version change between the resource file and the first fragment resource obtained previously, the first identifier is also obtained when the resource file is obtained; accordingly, as described in step 538, the second fragment resource and the first identifier are sent to the CDN device. In another example, there is a version change between the resource file and the first fragment resource obtained previously (for example, the uploader of the resource file has updated the resource file). Due to the update of the content of the resource file, the object storage device obtains a new identifier when obtaining the resource file. The new identifier is a version identifier generated by the source station device for the resource file after the content is updated. The value of the new identifier (also called the updated first identifier) ​​is different from the first identifier. Furthermore, the identifier sent when sending the second fragment resource to the CDN device is different from the first identifier. The CDN device does not perform the reorganization of the resource file when the identifiers corresponding to the first fragment resource and the second fragment resource are different.

[0125] It can be understood that step 536 and step 538 in this embodiment can be Figure 3 Step 510 and step 520 in the illustrated embodiment are combined into a new embodiment and implemented separately, and the present application does not limit this.

[0126] In an optional implementation, the resource file is sent by the source station device and is feedback information for the resource download request; step 534 in the above text can be implemented as follows: the object storage device stores the resource file, and adds a first identifier to the metadata of the resource file, and the first identifier is used to indicate that the data source of the resource file is the source station device. In one example, different data sources are identified by identifiers with different values, and the value of the first identifier is a first numerical value, indicating that the data source of the resource file is the source station device. In another example, different data sources are indicated by whether the value of the identifier is empty, and the value of the first identifier is the identity information of the source station device; it can be understood that resource files or shard resources provided by different source station devices have different identifier values ​​in the metadata. When the identifier is empty, it indicates that the data source is not the source station device, such as being directly entered into the object storage device by the administrator of the direct object storage device.

[0127] Furthermore, the object storage device obtains a second resource request, and the second resource request is used to request the second shard resource. When the metadata of the resource file to which the second shard resource belongs includes the first identifier, the data source of the second shard resource is the source station device (the second shard resource is obtained by sharding from the resource file sent by the source station device), the second shard resource and the first identifier are sent to the CDN device, and the first identifier is a version identifier generated by the source station device for the resource file; by verifying the metadata, when the data source of the shard resource in the resource file is the source station device, the identifier provided by the source station device is sent, thereby avoiding sending the identifier generated by the object storage device for the resource file to the CDN device.

[0128] For resource files (such as the third shard resource) that are entered into the object storage device based on human-computer interaction, the data source of the third shard resource is not the source station device, but is directly entered into the object storage device, and the second identifier added to the meta information of the third shard resource is different from the first identifier. In response to the object storage device needing to send the third shard resource to the CDN device, when the meta information of the third shard resource includes the second identifier, a version identifier (such as the second identifier) ​​generated by the object storage device for the third shard resource is sent. The third shard resource and the second identifier will be introduced in a separate embodiment below.

[0129] In an optional implementation of the present application, this step may be implemented as follows:

[0130] In response to the second resource request, when both the first shard resource and the second shard resource correspond to the first identifier, sending the second shard resource and the first identifier to the CDN device;

[0131] The first identifier corresponding to the first shard resource is obtained when the object storage device requests the source station device to return the source first shard resource, and the first identifier corresponding to the second shard resource is provided by the source station device to the object storage device in response to the resource download request.

[0132] Before the object storage device provides feedback for the second resource request, it verifies whether the first identifiers corresponding to the first shard resource and the second shard resource are consistent; when both the first shard resource and the second shard resource correspond to the first identifier, the second shard resource and the first identifier are sent to the CDN device to prevent the object storage device from providing shard resources belonging to resource files of different versions to the CDN device.

[0133] Exemplarily, after the object storage device sends the first shard resource and the first identifier in step 520, the resource name and the first identifier of the first shard resource are stored in the operation log. In this step, when checking whether the first identifiers corresponding to the first shard resource and the second shard resource are consistent, the first identifier corresponding to the first shard resource is obtained from the operation log. Furthermore, the operation log also records the historical time of sending the first shard resource and the first identifier. When the historical time and the current time do not exceed the duration threshold, it is checked whether the first identifiers corresponding to the first shard resource and the second shard resource are consistent; when the CDN device continuously requests the first shard resource and the second shard resource, avoid providing the CDN device with shard resources belonging to different versions of resource files. Exemplarily, the duration threshold is pre-set, such as 1 minute.

[0134] Exemplarily, when the historical time and the current time exceed the duration threshold, the second shard resource and the identifier corresponding to the second shard resource are sent to the CDN device; exemplary, when the historical time and the current time exceed the duration threshold, the object storage device does not need to check whether the versions corresponding to different shard resources of the resource file are consistent.

[0135] Optionally, in response to the second resource request, when the identifiers corresponding to the first shard resource and the second shard resource are different, the resource file stored in the object storage device and the identifier of the resource file are sent to the CDN device.

[0136] Exemplarily, when the identifiers corresponding to the first shard resource and the second shard resource are different, the first shard resource sent previously in step 520 and the resource file stored by the object storage device at the current moment are different in version; in order to ensure that the CDN device can use the resource file normally, each shard resource in the resource file is retransmitted to the CDN device. Optionally, an indication message is sent, and the indication message is used to instruct the CDN device to delete the first shard resource and the first identifier obtained previously in step 540.

[0137] To sum up, the method provided in this embodiment sends a resource download request to the source station device, and the resource file is stored in the object storage device in an asynchronous manner after the first shard resource, thereby ensuring the integrity of the resource file to which the stored first shard resource belongs; when the second resource request sent by the CDN device is obtained, there is no need to request the source second shard resource from the source again from the source station device, and the shard resource, that is, the second shard resource, can be obtained directly from the stored resource file, thereby saving the return time of the second shard resource and improving data processing efficiency.

[0138] Figure 5 The third flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method can be executed by an object storage device and a CDN device. Figure 3 In the illustrated embodiment, steps 400, 542, 544, 546, 548 and 570 are also included:

[0139] Step 400: The CDN device obtains a request for obtaining a resource file sent by the terminal;

[0140] The terminal sends a request to obtain a resource file to the CDN device; accordingly, the CDN device obtains the request to obtain the resource file; the terminal is at least one of the computer devices used by the user, such as a mobile phone, a personal computer, a handheld computer, etc.

[0141] When the terminal has at least one of downloading, viewing, editing, etc., to execute on the resource file, the terminal sends a request for obtaining the resource file to the CDN device, requesting to obtain the resource file from the CDN device.

[0142] As described above, the first slice resource and the second slice resource are slice resources in the resource file, and the first resource request and the second resource request for requesting the first slice resource and the second slice resource are constructed based on the acquisition request.

[0143] Step 542: The CDN device sends a second resource request to the object storage device;

[0144] Exemplarily, the CDN device sends a second resource request to the object storage device. Exemplarily, the second resource request is used to request the object storage device to obtain a second shard resource; in this embodiment, the second shard resource is requested after obtaining the first shard resource.

[0145] Step 544: The object storage device obtains the second resource request sent by the CDN device;

[0146] The second resource request is used to request the object storage device to obtain the second slice resource, and the second slice resource is the slice resource in the resource file; in this embodiment, the second slice resource in the CDN device is obtained by requesting the object storage device.

[0147] Step 546: The object storage device sends the second fragment resource and the first identifier to the CDN device in response to the second resource request;

[0148] Exemplarily, the object storage device sends the second shard resource and the first identifier to the CDN device; exemplary, the second shard resource is feedback information to the second resource request, and provides the requested second shard resource to the CDN device.

[0149] The first identifier is an identifier carried by the object storage device when it obtains the second shard resource from the source station device. The object storage device retains the original identifier provided by the source station device when providing the first shard resource to the object storage.

[0150] Step 548: The CDN device obtains the second fragment resource and the first identifier sent by the object storage device;

[0151] In this embodiment, the resource file is downloaded by the object storage device from the source station device; the first identifier obtained by the CDN device is the original identifier of the resource file provided by the source station device. Figure 4 Step 536 and step 538 in the corresponding embodiment will not be repeated here one by one.

[0152] Step 560: In response to the fact that the version identifiers corresponding to the first fragment resource and the second fragment resource are both the first identifier, the CDN device reorganizes the resource file based on the first fragment resource and the second fragment resource;

[0153] The resource file is reorganized by the CDN device based on the first fragment resource and the second fragment resource, for example, the first fragment resource and the second fragment resource are spliced ​​front to back to obtain the resource file; illustratively, in different embodiments of the present application, the reorganized resource file uses a larger number of fragment resources.

[0154] It is understandable that the other steps except step 400 and step 570 in this embodiment can be combined into a new embodiment and implemented separately, and this application does not limit this. Step 542 and step 548 are performed before step 560. Step 500, step 540, step 542, step 548, and step 560 in this application can be combined into a new embodiment and executed separately by the CDN device.

[0155] Step 570: The CDN device sends the resource file to the terminal;

[0156] Exemplarily, the CDN device sends a resource file to the terminal in response to the resource file acquisition request sent by the terminal. Exemplarily, when the CDN device sends a resource file to the terminal, it may send the resource file as a whole, or it may send the fragmented resources one by one after fragmenting the resource file, or it may send the resource file after compressing it; this embodiment does not limit this. In some examples, the CDN device also sends an identifier of the resource file to the terminal, such as the CDN device retains the first identifier and sends it to the terminal; or the CDN device generates a new identifier for the resource file. By sending the identifier to the terminal, the version information of the resource file is indicated to the terminal.

[0157] In summary, the method provided in this embodiment sends the original identifier provided by the source station device when sending the first shard resource and the second shard resource to the CDN device through the object storage device, and retains the identification information provided by the source station device as the data source device of the first shard resource. The resource file is reorganized by the CDN device in response to the fact that the version identifiers corresponding to the first shard resource and the second shard resource are both the first identifier, ensuring that each shard resource in the resource file belongs to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0158] Figure 6 The fourth flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method can be executed by an object storage device and a CDN device. Figure 3 Based on the embodiment shown, the method further includes steps 550, 552, 554, 556 and 558:

[0159] Step 550: The CDN device sends a third resource request to the object storage device;

[0160] The CDN device sends a third resource request to the object storage device. Exemplarily, the third resource request is used to request the object storage device to obtain a third shard resource, and the third shard resource is a shard resource in the resource file.

[0161] The third resource request may be sent when the third fragment resource is not stored in the CDN device, or may be sent when the CDN device needs to update the third fragment resource.

[0162] Step 552: The object storage device obtains the third resource request sent by the CDN device;

[0163] The object storage device obtains a third resource request: This step is performed by the object storage device and is a step of receiving the third resource request corresponding to step 550. Exemplarily, the third resource request is used to request the object storage device to obtain a third shard resource, and the third shard resource is a shard resource in the resource file.

[0164] Step 554: the object storage device sends the third shard resource and the second identifier to the CDN device in response to the third resource request;

[0165] Exemplarily, the object storage device sends the third shard resource and the second identifier to the CDN device; in this embodiment, the third shard resource is entered into the object storage device based on human-computer interaction operations, and the second identifier is generated by the object storage device.

[0166] The data source of the third shard resource is independent of the source station device, and accordingly, the second identifier is independent of the source station device and is generated and retained by the object storage device. In response to the third resource request, the object storage device sends the third shard resource and the second identifier to the CDN device.

[0167] Step 556: The CDN device obtains the third fragment resource and the second identifier sent by the object storage device;

[0168] Exemplarily, this step is the process of receiving the third fragment resource and the second identifier in step 554, and the CDN device obtains the third fragment resource and the second identifier.

[0169] Step 558: In response to the first identifier corresponding to the first fragment resource and the second identifier corresponding to the third fragment resource being different, the CDN device deletes the third fragment resource;

[0170] When the first identifier corresponding to the first shard resource and the second identifier corresponding to the third shard resource are different, the first shard resource and the third shard resource are shard resources of different versions of resource files. Since the first shard resource and the third shard resource belong to different versions of resource files, even if the merged file obtained by merging the first shard resource and the third shard resource is merged, it cannot be used. In order to prevent the CDN device from distributing unusable files to the terminal and to reduce the load of the CDN device storing data, the CDN device deletes the third shard resource. In some examples, the CDN device also deletes the first shard resource and deletes all shard resources that cannot be reassembled into resource files, thereby saving storage space of the CDN device.

[0171] Exemplarily, the third shard resource is obtained by the CDN device after the first shard resource, and the newly obtained unavailable resource is deleted; Exemplarily, steps 550 to 558 in this embodiment can be the same as those in the above Figure 5 The steps in Figure 5The steps except step 400 and step 570 are combined to form a new embodiment.

[0172] An optional implementation of the present application also includes:

[0173] In response to the first identifier corresponding to the first shard resource and the second identifier corresponding to the third shard resource being different, the CDN device sends a retransmission request to the object storage device;

[0174] The retransmission request is used to instruct the re-acquisition of each shard resource in the resource file. The retransmission request carries the first identifier and / or the second identifier, indicating to the object storage device that the reason for the retransmission is an error in verifying the identifier of the shard resource.

[0175] In one implementation, the identifier of the shard resource is an entity tag (ETag); the retransmission request carries a first information pair and a second information pair, the first information pair includes a first identifier and a resource name of the first shard resource; the second information pair includes a second identifier and a resource name of a third shard resource.

[0176] Exemplarily, if the identifier of the resource file stored in the object storage device is the same as the first identifier, the object storage device responds to the retransmission request and sends the other fragment resources in the resource file except the first fragment resource to the CDN device; if the identifier of the resource file stored in the object storage device is the same as the second identifier, the object storage device responds to the retransmission request and sends the other fragment resources in the resource file except the third fragment resource to the CDN device.

[0177] By searching the object storage device for the identifier provided by the CDN device, repeated transmission of the object storage device is avoided, and the shard resources that can be used continuously are saved, thus saving the transmission bandwidth between the object storage device and the CDN device. It can be understood that this step and step 558 can be performed alternatively.

[0178] In another implementation, the identifier of the slice resource is the last modification time (last-modified); the retransmission request carries a reference identifier, which is the identifier closest to the current time among the last modification times recorded in the identifiers corresponding to the first slice resource and the third slice resource.

[0179] The object storage device sends the resource file to the CDN device based on the reference identifier. The resource file is a resource file stored by the CDN device with the same identifier as the reference identifier, or a resource file obtained by requesting the source site device back to the source based on the reference identifier, to ensure that the most recent modification time of the resource file sent to the CDN device is the latest version closest to the current time.

[0180] In summary, the method provided in this embodiment sends the original identifier provided by the source station device when sending the first shard resource and the third shard resource to the CDN device through the object storage device, and retains the identification information provided by the source station device as the data source device of the first shard resource. In response to the difference in the identifiers corresponding to the first shard resource and the third shard resource, the CDN device deletes the third shard resource, and when the shard resources in the resource file belong to different versions of the resource file, the CDN device is prevented from providing shards of different versions of the resource file to the terminal, thereby avoiding the waste of data transmission resources and improving the efficiency of resource file transmission.

[0181] Figure 7 A fifth flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method may be executed by an object storage device. The method includes:

[0182] Step 510: Obtain a first resource request sent by a CDN device;

[0183] Exemplarily, the object storage device obtains a first resource request sent by the CDN device; exemplary, the first resource request is usually transmitted through the Internet, but it does not rule out the possibility that the object storage device and the CDN device are deployed in close geographical locations and there is an information transmission method such as a bus between the two.

[0184] Step 522a: In response to the first resource request, send a transparent resource request to the source station device;

[0185] In this embodiment, the first shard resource is provided by the source station device to the object storage device, and the first shard resource is also called the resource file that the object storage device requests the source station device to return to the source.

[0186] The transparent resource request is used to request the source station device to obtain the first shard resource; illustratively, the object storage device constructs and sends the transparent resource request in response to receiving the first resource request. The transparent resource request is used to request the first shard resource in the source station device, or the resource file to which the first file belongs; illustratively, the transparent resource request in this embodiment is used to request at least the first shard resource, and can also request to obtain more resource files in the source station device, which is not limited by this application.

[0187] In an optional implementation, this step may be implemented as follows:

[0188] In response to the first resource request, searching for a first shard resource among a plurality of candidate resources stored in the object storage device;

[0189] Exemplarily, the object storage device determines whether the first slice resource is stored in the object storage device by searching for the file name of the first slice resource or the file name of the resource file to which the first slice resource belongs.

[0190] When the search result for the first shard resource is empty, a transparent resource request is sent to the source station device;

[0191] Exemplarily, when the search result for the first shard resource is empty, the first shard resource is not stored in the object storage device; the transparent resource request is sent to the source station device when the first shard resource is not stored in the object storage device.

[0192] Exemplarily, by searching whether the first shard resource is stored in the object storage device before sending a transparent resource request, it is constrained that the first shard resource is requested back from the source station device only when the first shard resource is not stored in the object storage device, thereby reducing the load pressure on the resource transmission bandwidth between the object storage device and the source station device.

[0193] Step 522b: Acquire the first slice resource and the first identifier sent by the source station device;

[0194] The first shard resource is a resource required by the object storage device that the source station device finds according to the transparent resource request. The first identifier is provided by the source station device to the object storage device. Exemplarily, the first identifier is a unique identifier of the first shard resource, and the first identifier indicates the entity tag and / or the last modification time of the first shard resource in the source station device.

[0195] Step 522c: Send the first fragment resource and the first identifier to the CDN device;

[0196] The object storage device retains the first identifier of the first shard resource provided by the source station device, and sends the first shard resource and the first identifier to the CDN device. The first identifier sent to the CDN device provides a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0197] In an optional implementation, before this step, it also includes: storing the first shard resource and the first identifier, and adding the first identifier to the meta-information of the first shard resource; accordingly, this step can be implemented as: when the meta-information of the first shard resource includes the first identifier, sending the first shard resource and the first identifier to the CDN device.

[0198] Exemplarily, the first identifier is used to indicate that the data source of the first shard resource is the source station device. By verifying the metadata, when the data source of the first shard resource is the source station device, the identifier provided by the source station device is sent to avoid sending the identifier generated by the object storage device for the resource file to the CDN device.

[0199] To summarize, the method provided in this embodiment provides a solution for the object storage device to obtain the first shard resource by sending a transparent resource request to the source station device; only when the first shard resource is not stored in the object storage device, the source station device is requested to return the first shard resource, thereby reducing the load pressure of the resource transmission bandwidth between the object storage device and the source station device; the object storage device retains the identification information provided by the source station device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0200] Figure 8 A sixth flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method may be executed by an object storage device. The method includes:

[0201] Step 510: Obtain a first resource request sent by a CDN device;

[0202] The object storage device obtains the first resource request sent by the CDN device; illustratively, the first resource request is usually transmitted through the Internet, but it does not rule out the situation where the object storage device and the CDN device are deployed in a close geographical location and there is an information transmission method such as a bus between the two.

[0203] Step 524a: In response to the first resource request, searching for a first shard resource among a plurality of candidate resources stored in the object storage device;

[0204] The object storage device determines whether the first slice resource is stored in the object storage device by searching for the file name of the first slice resource or the file name of the resource file to which the first slice resource belongs.

[0205] Step 524b: When the plurality of candidate resources include the first fragment resource, send the first fragment resource and the first identifier to the CDN device;

[0206] By searching whether the first shard resource is stored in the object storage device, if the first shard resource is stored in the object storage device, the first shard resource is no longer requested to be returned to the source from the source station device, but the first shard resource and the first identifier are directly sent to the CDN device; if the first shard resource is stored in the object storage device, there is no need to request the first shard resource to be returned to the source from the source station device, thereby reducing the load pressure of the resource transmission bandwidth between the object storage device and the source station device.

[0207] Exemplarily, the object storage device is capable of long-term storage of the first shard resource provided in advance by the source station device, and in the process of storing the first shard resource, retaining the first identifier provided by the source station device; when the first shard resource is stored, there is no need to transfer resources to and from the source station device, that is, the retained first identifier and the first shard resource can be transmitted to the CDN device, and the first identifier sent to the CDN device provides a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0208] To sum up, the method provided in this embodiment, when the first shard resource is stored in the object storage device, no longer requests the source first shard resource to be returned to the source device, thereby reducing the load pressure of the resource transmission bandwidth between the object storage device and the source device; the object storage device retains the identification information provided by the source device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0209] Fig. 9 The seventh flow chart of a resource transmission method provided by an exemplary embodiment of the present application is shown. The method can be performed by a terminal, a CDN device, an object storage device, and an origin station device. The method includes:

[0210] Step 702: The terminal sends a request to obtain a resource file to the CDN device;

[0211] When the terminal has at least one of downloading, viewing, editing, etc., to execute on the resource file, the terminal sends a request for obtaining the resource file to the CDN device, requesting to obtain the resource file from the CDN device.

[0212] Step 704: The CDN device sends a first resource request to the object storage device;

[0213] The first resource request is used to request the object storage device to obtain the first shard resource, and the first shard resource is a shard resource in the resource file. In one example, the first resource request carries the identity of the CDN device, and the request header information of the first resource request includes the identity. By carrying the identity of the CDN device to indicate to the object storage request that the first resource request is sent by the CDN device, it is distinguished between directly using a terminal to request the object storage device or other methods to request resources in the object storage device.

[0214] Step 706: The object storage device sends a transparent resource request to the source station device;

[0215] In response to the first resource request, a first shard resource is searched among multiple candidate resources stored in the object storage device; the object storage device determines whether the first shard resource is stored in the object storage device by searching the file name of the first shard resource or the file name of the resource file to which the first shard resource belongs.

[0216] When the search result for the first shard resource is empty, the first shard resource is not stored in the object storage device; by sending a transparent resource request to the source station device, when the first shard resource is not stored in the object storage device, a transparent resource request is sent to the source station device; the constraint is that only when the first shard resource is not stored in the object storage device, the source station device is requested to return the source first shard resource, thereby reducing the load pressure of the resource transmission bandwidth between the object storage device and the source station device.

[0217] Step 708: The source station device sends the first shard resource and the first identifier to the object storage device;

[0218] The first shard resource is a resource required by the object storage device that the source station device finds according to the transparent resource request. The first identifier is provided by the source station device to the object storage device. Exemplarily, the first identifier is a unique identifier of the first shard resource, and the first identifier indicates the entity tag and / or the last modification time of the first shard resource in the source station device.

[0219] Step 710: The object storage device sends a first fragment resource and a first identifier to the CDN device in response to the first resource request;

[0220] The CDN device obtains the first slice resource and the first identifier sent by the object storage device; the first slice resource is feedback information of the first resource request, and provides the requested first slice resource to the CDN device.

[0221] The first identifier is an identifier carried by the first shard resource when the object storage device obtains the first shard resource from the source station device. The object storage device retains the original identifier provided by the source station device when providing the first shard resource to the object storage.

[0222] Step 722: The object storage device sends a resource download request to the source station device;

[0223] The resource download request is used to request the source station device to obtain the resource file belonging to the first shard resource; when the CDN device requests the first shard resource from the object storage device, the object storage device sends a resource download request to the source station device in order to ensure the integrity of the resource file belonging to the stored first shard resource, so as to obtain the resource file belonging to the first shard resource.

[0224] Step 724: The source station device sends the resource file and the first identifier to the object storage device;

[0225] The source station device responds to the resource download request and provides the resource file to the object storage device. When acquiring the resource file sent by the source station device, there is no version change between the resource file and the first fragment resource acquired previously, and the identifier acquired when acquiring the resource file is the same as the first identifier.

[0226] Step 732: The CDN device sends a second resource request to the object storage device;

[0227] The second resource request is used to request the object storage device to obtain the second slice resource, and the second slice resource is the slice resource in the resource file; in this embodiment, the second slice resource in the CDN device is obtained by requesting the object storage device.

[0228] Step 734: The object storage device sends the second fragment resource and the first identifier to the CDN device in response to the second resource request;

[0229] Exemplarily, the object storage device sends the second shard resource and the first identifier to the CDN device; exemplary, the second shard resource is feedback information to the second resource request, and provides the requested second shard resource to the CDN device.

[0230] The second shard resource is asynchronously downloaded from the source station device after the object storage returns the first shard resource; that is, the second shard resource is obtained from the source station device in step 724.

[0231] Step 736: The CDN device sends the resource file to the terminal;

[0232] The resource file is reorganized by the CDN device based on the first fragment resource and the second fragment resource, such as splicing the first fragment resource and the second fragment resource front and back to obtain the resource file; the CDN device sends the resource file to the terminal to reply to the resource file acquisition request sent by the terminal. Exemplarily, when the CDN device sends the resource file to the terminal, it can send the resource file as a whole.

[0233] In some examples, the CDN device also sends an identifier of the resource file to the terminal, such as the CDN device retains the first identifier and sends it to the terminal; or the CDN device generates a new identifier for the resource file. By sending the identifier to the terminal, the version information of the resource file is indicated to the terminal.

[0234] In summary, the method provided in this embodiment provides the first shard resource and the first identifier to the CDN device through the object storage device, and provides identification information of the first shard resource based on the response to the first resource request of the CDN device. The first identifier is the identifier carried when the first shard resource is obtained from the source station device, and the identification information provided by the source station device as the data source device of the first shard resource is retained. In the case that the resource file to which the first shard resource belongs in the source station device changes, the identification information changes. The object storage device retains the identification information provided by the source station device and provides it to the CDN device, thereby providing a basis for verifying whether the shard resources in the resource file belong to the same version, thereby avoiding the CDN device from providing shards of different versions of resource files to the terminal, avoiding the waste of data transmission resources, and improving the efficiency of resource file transmission.

[0235] Those skilled in the art can understand that the above embodiments can be implemented independently, or the above embodiments can be freely combined to form new embodiments to implement the resource transmission method of the present application.

[0236] The embodiment of the present application also provides a resource transmission device. The resource transmission device can be implemented by software, hardware or a combination of both to become part or all of the object storage device. Fig.10 , the device comprises:

[0237] A sending module 810 is configured to send a first resource request to an object storage device, wherein the first resource request is used to request the object storage device to obtain a first shard resource, and the first shard resource is a shard resource in a resource file;

[0238] An acquisition module 820 is configured to acquire the first shard resource and a first identifier sent by the object storage device, where the first identifier is a version identifier generated by the source station device for the resource file;

[0239] Processing module 830 is used to reorganize the resource file in response to the version identifiers corresponding to the first slice resource and the second slice resource being the first identifier, wherein the resource file includes the first slice resource and the second slice resource, and the second slice resource is the slice resource in the resource file.

[0240] Among them, the acquisition module 820, the sending module 810, and the processing module 830 can all be implemented by software or by hardware. Exemplarily, the implementation method is introduced by taking the acquisition module 820 as an example. Similarly, the implementation method of the sending module 810 can refer to the implementation method of the acquisition module 820.

[0241] As an example of a software functional unit, the acquisition module 820 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 820 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Generally, a region may include multiple AZs.

[0242] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0243] As an example of a hardware functional unit, the acquisition module 820 may include at least one computing device, such as a server, etc. Alternatively, the acquisition module 820 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0244] The multiple computing devices included in the acquisition module 820 can be distributed in the same region or in different regions. The multiple computing devices included in the acquisition module 820 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the acquisition module 820 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0245] It should be noted that, in other embodiments, the acquisition module 820 can be used to execute any step in the resource transmission method, the sending module 810 / processing module 830 can be used to execute any step in the resource transmission method, and the steps that each module is responsible for implementing can be specified as needed. By implementing different steps in the resource transmission method in different ways, all functions of the resource transmission device can be realized.

[0246] In an optional implementation of this embodiment, the processing module 830 is further configured to:

[0247] Sending a second resource request to the object storage device, where the second resource request is used to request the object storage device to obtain the second shard resource;

[0248] Acquire the second shard resource and the first identifier sent by the object storage device, where the resource file is downloaded by the object storage device from the source station device;

[0249] In response to the fact that the version identifiers corresponding to the first slice resource and the second slice resource are both the first identifier, the resource file is reorganized based on the first slice resource and the second slice resource.

[0250] In an optional implementation of this embodiment, the acquisition module 820 is further used to acquire the acquisition request of the resource file sent by the terminal;

[0251] The sending module 810 is further configured to send the resource file to the terminal;

[0252] The first resource request and the second resource request are constructed based on the acquisition request.

[0253] In an optional implementation of this embodiment, the sending module 810 is further used to send a third resource request to the object storage device, where the third resource request is used to request the object storage device to obtain a third shard resource, where the third shard resource is a shard resource in the resource file;

[0254] The acquisition module 820 is further used to acquire the third shard resource and the second identifier sent by the object storage device, where the second identifier is a version identifier generated by the object storage device for the resource file to which the third shard resource belongs, and the third shard resource is entered into the object storage device based on human-computer interaction operations.

[0255] In an optional implementation manner of this embodiment, the first resource request carries an identity of the CDN device, and the request header information of the first resource request includes the identity.

[0256] In an optional implementation of this embodiment, the first identifier includes at least one of an entity tag and a modification time of the first slice resource.

[0257] The embodiment of the present application also provides a resource transmission device. The resource transmission device can be implemented by software, hardware or a combination of both to become part or all of the CDN device. Fig.11 , the device comprises:

[0258] An acquisition module 850 is configured to acquire a first resource request sent by a CDN device, wherein the first resource request is used to request the object storage device to acquire a first shard resource, and the first shard resource is a shard resource in a resource file;

[0259] The sending module 860 is used to send the first fragment resource and a first identifier to the CDN device in response to the first resource request, where the first identifier is a version identifier generated by the origin site device for the resource file.

[0260] Among them, the acquisition module 850 and the sending module 860 can be implemented by software or by hardware. Exemplarily, the implementation method is introduced by taking the acquisition module 850 as an example. Similarly, the implementation method of the sending module 860 can refer to the implementation method of the acquisition module 850.

[0261] As an example of a software functional unit, the acquisition module 850 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 850 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Generally, a region may include multiple AZs.

[0262] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0263] As an example of a hardware functional unit, the acquisition module 850 may include at least one computing device, such as a server, etc. Alternatively, the acquisition module 850 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0264] The multiple computing devices included in the acquisition module 850 can be distributed in the same region or in different regions. The multiple computing devices included in the acquisition module 850 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the acquisition module 850 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0265] It should be noted that, in other embodiments, the acquisition module 850 can be used to execute any step in the resource transmission method, the sending module 860 can be used to execute any step in the resource transmission method, and the steps that each module is responsible for implementing can be specified as needed. By implementing different steps in the resource transmission method in different ways, all functions of the resource transmission device can be realized.

[0266] In an optional implementation of this embodiment, the sending module 860 is further configured to:

[0267] In response to the first resource request, sending a transparent transmission resource request to the source station device, where the transparent transmission resource request is used to request the source station device to obtain the first slice resource;

[0268] Acquire the first slice resource and the first identifier sent by the source station device;

[0269] The first fragment resource and the first identifier are sent to the CDN device.

[0270] In an optional implementation of this embodiment, the sending module 860 is further configured to:

[0271] In response to the first resource request, searching for the first shard resource among a plurality of candidate resources stored in the object storage device;

[0272] When the search result for the first shard resource is empty, the transparent transmission resource request is sent to the source station device.

[0273] In an optional implementation of this embodiment, the sending module 860 is further configured to:

[0274] In response to the first resource request, searching for the first shard resource among a plurality of candidate resources stored in the object storage device;

[0275] In a case where the plurality of candidate resources include the first fragment resource, the first fragment resource and the first identifier are sent to the CDN device.

[0276] In an optional implementation of this embodiment, the sending module 860 is further used to send a resource download request to the source station device, where the resource download request is used to request the source station device to obtain the resource file to which the first fragment resource belongs;

[0277] The acquisition module 850 is further configured to store the resource file sent by the source station device.

[0278] In an optional implementation of this embodiment, the acquisition module 850 is further used to acquire a second resource request sent by the CDN device, where the second resource request is used to request the object storage device to acquire a second shard resource;

[0279] The sending module 860 is further configured to send the second fragment resource and the first identifier to the CDN device in response to the second resource request.

[0280] In an optional implementation of this embodiment, the acquisition module 850 is further used to acquire a third resource request sent by the CDN device, where the third resource request is used to request the object storage device to acquire a third shard resource, where the third shard resource is a shard resource in the resource file;

[0281] The sending module 860 is further configured to send the third fragment resource and the second identifier to the CDN device in response to the third resource request;

[0282] The third shard resource is entered into the object storage device based on a human-computer interaction operation, and the second identifier is generated by the object storage device.

[0283] In an optional implementation manner of this embodiment, the first resource request carries an identity of the CDN device, and the request header information of the first resource request includes the identity.

[0284] In an optional implementation of this embodiment, the first identifier includes at least one of an entity tag and a modification time of the first slice resource.

[0285] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0286] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.

[0287] The present application also provides a computing device, please refer to Fig.12 , the computing device includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.

[0288] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 The bus 102 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).

[0289] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0290] The memory 106 may include a volatile memory, such as a random access memory (RAM). The processor 104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0291] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the aforementioned modules A, B, and C, thereby implementing the resource transmission method. That is, the memory 106 stores instructions for executing the resource transmission method.

[0292] The communication interface 108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.

[0293] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0294] like Fig.13 As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the resource transmission method.

[0295] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the resource transmission method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the resource transmission method.

[0296] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the resource transmission device. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more modules among the sending module, the obtaining module and the processing module.

[0297] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.14 A possible implementation is shown. Fig.14 As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of module A. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of module B and module C.

[0298] It should be understood that Fig.14 The functions of the computing device 100A shown in FIG. 1 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.

[0299] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig.13 and Fig.14 The connection mode of the computing device cluster is different in that the memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the resource transmission method.

[0300] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the resource transmission method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the resource transmission method.

[0301] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions for executing part of the functions of the resource transmission system. That is, the instructions stored in the memory 106 in different computing devices 100 may implement Fig.10 , Fig.11 The functionality of one or more resource transfer devices is shown.

[0302] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the resource transfer method.

[0303] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the resource transmission method.

[0304] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A resource transmission method, characterized in that: The method is performed by a content delivery network (CDN) device, and the method includes: Sending a first resource request to an object storage device, where the first resource request is used to request the object storage device to obtain a first shard resource, where the first shard resource is a shard resource in a resource file, and the object storage device stores the shard resources in the resource file at the same level; Acquire the first shard resource and the first identifier sent by the object storage device, where the first identifier is a version identifier generated by the source station device for the resource file, the first shard resource and the first identifier are sent by the object storage device when the meta information of the first shard resource includes the first identifier, the first identifier is used to indicate that the data source of the first shard resource is the source station device, and the first shard resource is requested by the object storage device to the source station device; In response to the version identifiers corresponding to the first slice resource and the second slice resource being both the first identifier, the resource file is reorganized, the resource file including the first slice resource and the second slice resource, and the second slice resource is a slice resource in the resource file.

2. The method according to claim 1, characterized in that In response to the fact that the version identifiers corresponding to the first shard resource and the second shard resource are both the first identifiers, before reorganizing the resource file, the method further includes: Sending a second resource request to the object storage device, where the second resource request is used to request the object storage device to obtain the second shard resource; The second shard resource and the first identifier sent by the object storage device are obtained, and the resource file is downloaded by the object storage device from the source station device.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Sending a third resource request to the object storage device, where the third resource request is used to request the object storage device to obtain a third shard resource, where the third shard resource is a shard resource in the resource file; Acquire the third shard resource and the second identifier sent by the object storage device, where the second identifier is a version identifier generated by the object storage device for a resource file to which the third shard resource belongs, and the third shard resource is entered into the object storage device based on a human-computer interaction operation; In response to the first identifier corresponding to the first slice resource and the second identifier corresponding to the third slice resource being different, deleting the third slice resource.

4. The method according to claim 1 or 2, characterized in that: The first identifier includes at least one of an entity tag and a modification time of the first slice resource.

5. The method according to claim 1 or 2, characterized in that: The first resource request carries the identity of the CDN device, and the request header information of the first resource request includes the identity.

6. A resource transmission method, characterized in that: The method is performed by an object storage device, and the method includes: Obtaining a first resource request sent by a content delivery network CDN device, where the first resource request is used to request the object storage device to obtain a first shard resource, where the first shard resource is a shard resource in a resource file; In response to the first resource request, sending a transparent transmission resource request to the source station device, where the transparent transmission resource request is used to request the source station device to obtain the first slice resource; Acquire the first shard resource and the first identifier sent by the source station device, store the first shard resource and the first identifier, add a first identifier to the meta information of the first shard resource, the first identifier is used to indicate that the data source of the first shard resource is the source station device, and the object storage device stores the shard resources in the resource file at the same level; In a case where the meta information of the first fragment resource includes the first identifier, the first fragment resource and a first identifier are sent to the CDN device, where the first identifier is a version identifier generated by the origin station device for the resource file.

7. The method according to claim 6, characterized in that The method further comprises: Sending a resource download request to the source station device, where the resource download request is used to request the source station device to obtain the resource file to which the first fragment resource belongs; The resource file sent by the source station device is stored.

8. The method according to claim 7, characterized in that The storing the resource file sent by the source station device includes: The resource file is stored, and a first identifier is added to the meta-information of the resource file, where the first identifier is used to indicate that a data source of the resource file is the source station device.

9. A resource transmission device, characterized in that: The device comprises: A sending module, configured to send a first resource request to an object storage device, wherein the first resource request is used to request the object storage device to obtain a first shard resource, wherein the first shard resource is a shard resource in a resource file, and the object storage device stores the shard resources in the resource file at the same level; an acquisition module, configured to acquire the first shard resource and a first identifier sent by the object storage device, wherein the first identifier is a version identifier generated by the source station device for the resource file, the first shard resource and the first identifier are sent by the object storage device when the meta information of the first shard resource includes a first identifier, the first identifier is used to indicate that a data source of the first shard resource is the source station device, and the first shard resource is requested by the object storage device to the source station device; A processing module is used to reorganize the resource file based on the first slice resource and the second slice resource in response to the version identifiers corresponding to the first slice resource and the second slice resource being the first identifier, wherein the second slice resource is a slice resource in the resource file.

10. A resource transmission device, characterized in that: The device comprises: An acquisition module, configured to acquire a first resource request sent by a content delivery network CDN device, wherein the first resource request is used to request an object storage device to acquire a first shard resource, and the first shard resource is a shard resource in a resource file; A sending module, configured to send a transparent transmission resource request to a source station device in response to the first resource request, wherein the transparent transmission resource request is used to request the source station device to obtain the first slice resource; Acquire the first shard resource and the first identifier sent by the source station device, store the first shard resource and the first identifier, add a first identifier to the meta information of the first shard resource, the first identifier is used to indicate that the data source of the first shard resource is the source station device, and the object storage device stores the shard resources in the resource file at the same level; In a case where the meta information of the first fragment resource includes the first identifier, the first fragment resource and a first identifier are sent to the CDN device, where the first identifier is a version identifier generated by the origin station device for the resource file.

11. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein the memory stores at least one program; the processor is used to execute the at least one program in the memory to implement the resource transmission method as described in any one of claims 1 to 8.

12. A resource transmission system, characterized in that: The resource transmission system includes a content distribution network CDN device and an object storage device, the CDN device is used to execute the resource transmission method described in any one of claims 1 to 5, and the object storage device is used to execute the resource transmission method described in any one of claims 6 to 8.

Citation Information

Patent Citations

  • Resource acquisition method and device and server

    CN113411364A