# US 2021/0344741 A1 · A method and device for feeding back a resource file

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0344741 A1
- Document ID: US20210344741A1
- Status: Published application
- Kind: A1
- Application number: 16/327,668
- Filed: 2018-07-12
- Published: 2021-11-04
- Earliest claimed: 2018-04-10
- Assignees: Wangsu Science & Technology Co., Ltd.
- Applicants: Wangsu Science & Technology Co., Ltd.
- Inventors: Lijuan CHEN; Lipeng WANG
- Web page: https://patentgrep.com/patent/US20210344741A1

## CPC

- H04L 67/06: specially adapted for file transfer, e.g. file transfer protocol [FTP]
- G06F 16/9574: {of access to content, e.g. by caching}
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 67/5651: Reducing the amount or size of exchanged application data
- H04L 67/568: Storing data temporarily at an intermediate stage, e.g. caching
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method includes: receiving a resource acquisition request of a target resource, and calculating resource identification information included in the resource acquisition request by using a first preset algorithm to obtain a target feature index value; if a resource file corresponding to the target feature index value exists locally, feeding back the resource file corresponding to the target feature index value, and if not, transmitting a data acquisition request of a specified segment of the target resource to a resource server of the target resource; receiving data of the specified segment fed back by the resource server, and calculating the data of the specified segment by using a second preset algorithm to obtain a target content index value; and if a resource file corresponding to the target content index value exists locally, feeding back the resource file corresponding to the target content index value, and if not, transmitting the resource acquisition request to the resource server.

## Claims

### Claim 1

A method for feeding back a resource file, comprising:
receiving a resource acquisition request of a target resource, and calculating resource identification information included in the resource acquisition request by using a first preset algorithm to obtain a target feature index value;
if a resource file corresponding to the target feature index value exists locally, feeding back the resource file corresponding to the target feature index value, and if the resource file corresponding to the target feature index value does not exist locally, transmitting a data acquisition request of a specified segment of the target resource to a resource server of the target resource;
receiving data of the specified segment of the target resource fed back by the resource server, and calculating the data of the specified segment by using a second preset algorithm to obtain a target content index value; and
if a resource file corresponding to the target content index value exists locally, feeding back the resource file corresponding to the target content index value, and if the resource file corresponding to the target content index value does not exist locally, transmitting the resource acquisition request of the target resource to the resource server.

### Claim 2 (depends on 1)

The method according to claim 1, wherein calculating the resource identification information included in the resource acquisition request by using the first preset algorithm to obtain the target feature index value further includes:
if the resource identification information included in the resource acquisition request matches a locally pre-stored target information format, extracting feature information in the resource identification information according to the locally pre-stored target information format, and calculating the feature information by using the first preset algorithm to obtain the target feature index value; and
if the resource identification information included in the resource acquisition request does not match any locally pre-stored information format, calculating the resource identification information included in the resource acquisition request by using the first preset algorithm to obtain the target feature index value.

### Claim 3 (depends on 1)

The method according to claim 1, wherein transmitting the data acquisition request of the specified segment of the target resource to the resource server of the target resource further includes:
if a data size of a resource file of the target resource is larger than a data size of the specified segment, transmitting the data acquisition request of the specified segment of the target resource to the resource server of the target resource, and if the data size of the resource file of the target resource is not larger than the data size of the specified segment, transmitting the resource acquisition request of the target resource to the resource server.

### Claim 4 (depends on 1)

The method according to claim 1, wherein calculating the data of the specified segment by using the second preset algorithm to obtain the target content index value further includes:
obtaining a data size of a whole resource in which the target resource is included, and combining the data size of the whole resource to calculate the data of the specified segment by using the second preset algorithm to obtain the target content index value.

### Claim 5 (depends on 1)

The method according to claim 1, wherein:
the resource acquisition request includes identifiers for target data segments; and
if the resource file corresponding to the target content index value exists locally, feeding back the resource file corresponding to the target content index value further includes:
if the resource file corresponding to the target content index value exists locally, and the resource file includes all resource data to which the identifiers of the target data segments are directed, feeding back all the resource data, in the resource file, to which the identifiers of the target data segments are directed, and
if the resource file corresponding to the target content index value exists locally, and the resource file does not include all the resource data to which the identifiers of the target data segments are directed, transmitting the resource acquisition request of the target resource to the resource server.

### Claim 6 (depends on 1)

The method according to claim 1, after transmitting the resource acquisition request of the target resource to the resource server, the method further includes:
receiving a resource file of the target resource fed back by the resource server, and correspondingly storing the target feature index value, the target content index value, and the resource file in the local.

### Claim 7

A device for feeding back a resource file, comprising:
a first calculation module that is configured to receive a resource acquisition request of a target resource, and calculate resource identification information included in the resource acquisition request by using a first preset algorithm to obtain a target feature index value;
a first transmission module that is configured to, if a resource file corresponding to the target feature index value exists locally, feed back the resource file corresponding to the target feature index value, and if the resource file corresponding to the target feature index value does not exist locally, transmit a data acquisition request of a specified segment of the target resource to a resource server of the target resource;
a second calculation module that is configured to receive data of the specified segment of the target resource fed back by the resource server, and calculate the data of the specified segment by using a second preset algorithm to obtain a target content index value; and
a second transmission module that is configured to, if a resource file corresponding to the target content index value exists locally, feed back the resource file corresponding to the target content index value, and if the resource file corresponding to the target content index value does not exist locally, transmit the resource acquisition request of the target resource to the resource server.

### Claim 8 (depends on 7)

The device according to claim 7, wherein the first calculation module is further configured to:
if the resource identification information included in the resource acquisition request matches a locally pre-stored target information format, extract feature information in the resource identification information according to the locally pre-stored target information format, and calculate the feature information by using the first preset algorithm to obtain the target feature index value; and
if the resource identification information included in the resource acquisition request does not match any locally pre-stored information format, calculate the resource identification information included in the resource acquisition request by using the first preset algorithm to obtain the target feature index value.

### Claim 9 (depends on 7)

The device according to claim 7, wherein the first transmission module is further configured to:
if a data size of a resource file of the target resource is larger than a data size of the specified segment, transmit the data acquisition request of the specified segment of the target resource to the resource server of the target resource, and if the data size of the resource file of the target resource is not larger than the data size of the specified segment, transmit the resource acquisition request of the target resource to the resource server.

### Claim 10 (depends on 7)

The device according to claim 7, wherein the second calculation module is further configured to:
obtain a data size of a whole resource in which the target resource is included, and combine the data size of the whole resource to calculate the data of the specified segment by using the second preset algorithm to obtain the target content index value.

### Claim 11 (depends on 7)

The device according to claim 7, wherein:
the resource acquisition request includes identifiers for target data segments; and
the second transmission module is further configured to:
if the resource file corresponding to the target content index value exists locally, and the resource file includes all resource data to which the identifiers of the target data segments are directed, feed back all the resource data, in the resource file, to which the identifiers of the target data segments are directed, and
if the resource file corresponding to the target content index value exists locally, and the resource file does not include all the resource data to which the identifiers of the target data segments are directed, transmit the resource acquisition request of the target resource to the resource server.

### Claim 12 (depends on 7)

The device according to claim 7, further comprising:
a storage module that is configured to receive a resource file of the target resource fed back by the resource server, and correspondingly store the target feature index value, the target content index value, and the resource file in the local.

### Claim 13

A cache server, 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, that is loaded and executed by the processor to implement a method for feeding back a resource file, and the method includes:
receiving a resource acquisition request of a target resource, and calculating resource identification information included in the resource acquisition request by using a first preset algorithm to obtain a target feature index value;
if a resource file corresponding to the target feature index value exists locally, feeding back the resource file corresponding to the target feature index value, and if the resource file corresponding to the target feature index value does not exist locally, transmitting a data acquisition request of a specified segment of the target resource to a resource server of the target resource;
receiving data of the specified segment of the target resource fed back by the resource server, and calculating the data of the specified segment by using a second preset algorithm to obtain a target content index value; and
if a resource file corresponding to the target content index value exists locally, feeding back the resource file corresponding to the target content index value, and if the resource file corresponding to the target content index value does not exist locally, transmitting the resource acquisition request of the target resource to the resource server.

### Claim 14

(canceled)

### Claim 15 (depends on 13)

The cache server according to claim 13, wherein calculating the resource identification information included in the resource acquisition request by using the first preset algorithm to obtain the target feature index value further includes:
if the resource identification information included in the resource acquisition request matches a locally pre-stored target information format, extracting feature information in the resource identification information according to the locally pre-stored target information format, and calculating the feature information by using the first preset algorithm to obtain the target feature index value; and
if the resource identification information included in the resource acquisition request does not match any locally pre-stored information format, calculating the resource identification information included in the resource acquisition request by using the first preset algorithm to obtain the target feature index value.

### Claim 16 (depends on 13)

The cache server according to claim 13, wherein transmitting the data acquisition request of the specified segment of the target resource to the resource server of the target resource further includes:
if a data size of a resource file of the target resource is larger than a data size of the specified segment, transmitting the data acquisition request of the specified segment of the target resource to the resource server of the target resource, and if the data size of the resource file of the target resource is not larger than the data size of the specified segment, transmitting the resource acquisition request of the target resource to the resource server.

### Claim 17 (depends on 13)

The cache server according to claim 13, wherein calculating the data of the specified segment by using the second preset algorithm to obtain the target content index value further includes:
obtaining a data size of the whole resource of the target resource, and combining the data size of the whole resource of the target resource to calculate the data of the specified segment by using the second preset algorithm to obtain the target content index value.

### Claim 18 (depends on 13)

The cache server according to claim 13, wherein:
the resource acquisition request includes identifiers for target data segments; and
if the resource file corresponding to the target content index value exists locally, feeding back the resource file corresponding to the target content index value further includes:
if the resource file corresponding to the target content index value exists locally, and the resource file includes all resource data to which the identifiers of the target data segments are directed, feeding back all the resource data, in the resource file, to which the identifiers of the target data segments are directed, and
if the resource file corresponding to the target content index value exists locally, and the resource file does not include all the resource data to which the identifiers of the target data segments are directed, transmitting the resource acquisition request of the target resource to the resource server.

### Claim 19 (depends on 13)

The cache server according to claim 13, after transmitting the resource acquisition request of the target resource to the resource server, the method further includes:
receiving a resource file of the target resource fed back by the resource server, and correspondingly storing the target feature index value, the target content index value, and the resource file in the local.
