[go: up one dir, main page]

CN113590915A - Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium - Google Patents

Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium Download PDF

Info

Publication number
CN113590915A
CN113590915A CN202110735199.2A CN202110735199A CN113590915A CN 113590915 A CN113590915 A CN 113590915A CN 202110735199 A CN202110735199 A CN 202110735199A CN 113590915 A CN113590915 A CN 113590915A
Authority
CN
China
Prior art keywords
request
cache information
cache
address
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110735199.2A
Other languages
Chinese (zh)
Inventor
那强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Insta360 Innovation Technology Co Ltd
Original Assignee
Insta360 Innovation Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Insta360 Innovation Technology Co Ltd filed Critical Insta360 Innovation Technology Co Ltd
Priority to CN202110735199.2A priority Critical patent/CN113590915A/en
Publication of CN113590915A publication Critical patent/CN113590915A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明适用计算机技术领域,提供了一种分片数据的缓存、访问方法、装置、终端及存储介质,该方法包括:接收请求访问指定分片数据的HTTP请求时,从HTTP请求中获取包括请求地址、请求方法以及请求范围参数的参数值,根据请求地址获取预设的缓存信息列表,根据请求方法以及请求范围查找指定分片数据在缓存信息列表中的缓存信息,当未查找到缓存信息时,向服务器发送HTTP请求,接受服务器对HTTP请求的响应,将响应存储到预设的存储单元,根据存储单元的地址信息以及前述请求参数生成响应对应的缓存信息,最后将响应对应的缓存信息添加到缓存信息列表中,从而实现分片数据的缓存,在后续用户访问分片数据时,提高访问效率。

Figure 202110735199

The present invention is applicable to the field of computer technology, and provides a cache, access method, device, terminal and storage medium for fragmented data. The method includes: when receiving an HTTP request requesting access to specified fragmented data, obtaining the request including the request from the HTTP request. The parameter values of the address, request method, and request range parameters, obtain the preset cache information list according to the request address, and search the cache information of the specified shard data in the cache information list according to the request method and request range. When no cache information is found , send an HTTP request to the server, accept the server's response to the HTTP request, store the response in a preset storage unit, generate cache information corresponding to the response according to the address information of the storage unit and the aforementioned request parameters, and finally add the cache information corresponding to the response In the cache information list, the fragmented data is cached, and the access efficiency is improved when subsequent users access the fragmented data.

Figure 202110735199

Description

Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a fragment data caching and accessing method, a fragment data caching and accessing device, a fragment data caching and accessing terminal and a fragment data storage medium.
Background
The Hypertext Transfer Protocol (HTTP) is a simple request-response Protocol, which is a Transfer Protocol for a server to Transfer Hypertext to a client (e.g., a browser). The caching mechanism of the HTTP is a technical means capable of improving the multiplexing rate of the client to the server data, reducing the number of requests, and improving the access experience, and has been widely applied to a software system with HTTP requests.
According to whether an HTTP request needs to be sent to a server or not, the caching process is divided into two parts, namely strong caching and negotiation caching. Specifically, when a client requests a server for a network resource, a message header (header) information of the resource cache is acquired first, whether the strong cache is hit is judged according to cache control (cache-control) and effective time (expires) information in the message header, and if the strong cache is hit, the resource information is directly acquired from the cache and includes cache message header information, and the resource request cannot be communicated with the server. If the strong cache is not hit, the client sends a request to the server, the request carries the first returned information of the message header field related to the cache, and the server compares the result according to the information of the message header to judge whether the cache is hit or not. If the resource content is hit, the server returns new response message header information to update the corresponding message header information in the cache, but the requested resource content is not returned, the returned new response message header information tells the client that the new response message header information can be directly obtained from the cache, otherwise, the latest resource content is returned.
However, the caching scheme of the existing HTTP protocol does not support Range request, that is, a designated file or partial data of data returned by the server cannot be cached, and fragmented data (a piece of data) returned by the server is not cached at the client. Thus, the client still needs to go back to the server for downloading when the same Range request is made next time.
Disclosure of Invention
The invention aims to provide a fragment data caching method, an access method, a device, a terminal and a storage medium, and aims to solve the problem that fragment or segment data cannot be normally cached due to the fact that the prior art cannot provide a method for effectively caching the fragment or segment data in a file.
In one aspect, the present invention provides a fragment data caching method, including the following steps:
receiving an HTTP request for requesting to access appointed fragment data;
acquiring parameter values of preset request parameters from the HTTP request, wherein the request parameters comprise a request address, a request method and a request range;
acquiring a preset cache information list according to the request address, and searching the cache information of the designated fragment data in the cache information list according to the request method and the request range;
when the cache information is not found, sending the HTTP request to the server, receiving the response of the server to the HTTP request, and storing the response to a preset storage unit;
generating cache information corresponding to the response according to the address information of the storage unit and the request parameter;
and adding the cache information corresponding to the response into the cache information list.
On the other hand, the invention also provides an access method of the fragmented data, which comprises the following steps:
receiving an HTTP request for requesting to access appointed fragment data;
acquiring parameter values of preset request parameters from the HTTP request, wherein the request parameters comprise a request address, a request method and a request range;
according to the request address, obtaining a cache information list of cached data, and according to the request method and the request range, searching the cache information of the designated fragment data in the cache information list;
and when the cache information is found, acquiring the cached designated fragment data according to the cache information.
On the other hand, the invention also provides a device for caching fragmented data, which comprises:
a request receiving unit, configured to receive an HTTP request requesting access to specified fragmented data;
the value acquisition unit is used for acquiring parameter values of preset request parameters from the HTTP request, wherein the request parameters comprise a request address, a request method and a request range;
the information searching unit is used for acquiring a preset cache information list according to the request address and searching the cache information of the designated fragment data in the cache information list according to the request method and the request range;
the response storage unit is used for sending the HTTP request to the server when the cache information is not found, receiving the response of the server to the HTTP request, and storing the response to a preset storage unit;
the information generating unit is used for generating cache information corresponding to the response according to the address information of the storage unit and the request parameter; and
and the information adding unit is used for adding the cache information corresponding to the response into the cache information list.
In another aspect, the present invention also provides a computing device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the computer program.
In another aspect, the present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described above.
When an HTTP request requesting access to appointed fragmented data is received, parameter values including a request address, a request method and a request range parameter are obtained from the HTTP request, a preset cache information list is obtained according to the request address, cache information of the appointed fragmented data in the cache information list is searched according to the request method and the request range, when the cache information is not searched, the HTTP request is sent to a server, the response of the server to the HTTP request is received, the response is stored to a preset storage unit, cache information corresponding to the response is generated according to the address information of the storage unit and the request parameter, and finally the cache information corresponding to the response is added to the cache information list, so that caching of the fragmented data is achieved, and when a subsequent user accesses the fragmented data, the access efficiency is improved.
Drawings
Fig. 1 is a flowchart illustrating an implementation of a fragment data caching method according to an embodiment of the present invention;
fig. 2 is a flowchart of an implementation of the method for accessing fragmented data according to the second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a fragment data caching apparatus according to a third embodiment of the present invention; and
fig. 4 is a schematic structural diagram of a computing device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The following detailed description of specific implementations of the present invention is provided in conjunction with specific embodiments:
the first embodiment is as follows:
fig. 1 shows an implementation flow of a fragment data caching method according to an embodiment of the present invention, and for convenience of description, only parts related to the embodiment of the present invention are shown, which are detailed as follows:
in step S101, an HTTP request requesting access to the designated fragmented data is received;
the embodiment of the invention is suitable for computing equipment, in particular to a client in a client/server (C/S) mode, wherein the client is connected with a server through a network, receives a request of a user, sends an HTTP request to the server through the network and operates (accesses) a target file. In this embodiment of the present invention, the HTTP request is a request for operating specified fragmented data of the target file, where the specified fragmented data is a part of the target file stored on the server, that is, requests to access data in a specified Range in the target file on the server, and specifically, the specified Range is specified by a request Range (e.g., a Range parameter) in a header of the HTTP request.
In step S102, obtaining parameter values of preset request parameters from the HTTP request, where the request parameters include a request address, a request method, and a request range;
in the embodiment of the invention, after the client receives the HTTP request of the user, the parameter value of the preset request parameter is obtained from the HTTP request, and the request parameter comprises the request address, the request method and the request range, so that the request parameter settings of different request methods in the HTTP request are unified, and the response efficiency of the HTTP request is improved.
In the request parameters of the HTTP request, the request address is an address, for example, a URL (Uniform Resource Locator) address, of a Resource or data (target file) to be requested to access, the request method specifies what operation the client wants to perform on the target file on the server, and the request scope specifies a scope of the target file to be requested to operate or access, that is, a location of the fragmented data in the target file. Preferably, the request method includes a GET method and a HEAD method, so that the fragment data obtained by the GET method is cached in the following, and response efficiency when the fragment data is accessed again is improved. In addition, the request header information of the HTTP request can be acquired through the HEAD method, and the validity of the resource or the hyperlink can be detected through caching the request header information. Here, in order to unify the request parameter settings of different request methods in the HTTP request, when the request method in the HTTP request is the HEAD method, the range of the request range may be set to a range in which a start value and an end value are the same, such as 0 to 0, so as to simplify the parameter configuration when the request method is the HEAD method, and improve the access efficiency of the subsequent cache.
In step S103, a preset cache information list is obtained according to the request address, and cache information of the designated fragment data in the cache information list is searched according to the request method and the request range;
the embodiment of the invention sets a cache information list at the client for recording the cache information of the fragment data at the client, and the cache information list can be any table, file and the like capable of recording the cache information. Specifically, the cache information list may include a plurality of cache information items, each cache information item may correspond to cache information of one piece of fragmented data, and the cache information item may include a request address, a request method, and request range parameter information in an HTPP request responded by the server, and may further include a cache address of the fragmented data at the client. Preferably, the method may further include obtaining an identification number through operation of the request address and the request method, so as to quickly find the corresponding cache information item through the identification number, and further finally determine whether the requested fragment data is cached through the request range parameter.
Specifically, when the cache information of the designated fragment data in the cache information list is searched, the cache information list corresponding to the request address is first obtained, and when the cache information list corresponding to the request address is not obtained, it is determined that the cache information is not searched. And when the cache information list corresponding to the request address is acquired, matching the request method in the acquired cache information list, and when the request method is not matched, determining that the cache information is not found. And when the request method is matched, acquiring the corresponding cache information item, and searching the cache information item corresponding to the request range in the HTTP request in the acquired cache information item. When the cache information item corresponding to the request range in the HTTP request is searched for in the obtained cache information item, specifically, a start value and an end value of the request range in the HTTP request may be compared with a start value and an end value of the request range in the cache information item, when the start value of the request range in the HTTP request is greater than or equal to the start value of the request range in the cache information item and the end value is less than or equal to the end value of the request range in the cache information item, it is determined that the corresponding cache information item is searched for, otherwise, it is determined that the corresponding cache information item is not searched for. When the cache information item is not found, determining that the cache information is not found, and quickly positioning the cache information of the designated fragment data in the client cache information list according to the request address, the request method and the request range in the HTTP request.
In step S104, when the cache information is not found, sending an HTTP request to the server, receiving a response from the server to the HTTP request, and storing the response in a preset storage unit;
in the embodiment of the invention, when the cache information of the specified fragment data at the client is not found, the client sends an HTTP request to the server, the server obtains a target file requested to be accessed by the client according to a request address in the HTTP request after receiving the HTTP request, then executes a corresponding request method for the specified fragment data in a corresponding range of the target file according to a request range, and then returns a corresponding response to the client. And the client receives the response to the HTTP request returned by the server and stores the response to a preset storage unit of the client. Specifically, when the response data is stored in a preset storage unit, for example, when the request method in the HTTP request is the GET method, the requested data may be stored, and when the request method in the HTTP request is the HEAD method, only the response header information of the request is stored.
In step S105, generating cache information corresponding to a response according to the address information of the storage unit and the request parameter;
after the response of the server is stored in the storage unit of the client, the client generates cache information corresponding to the response according to the address information of the storage unit and the request parameter in the HTTP request.
Specifically, when the cache information corresponding to the response is generated, the request address, the request method, and the request range parameter information in the HTPP request may be set in the cache information, and the cache address of the fragmented data at the client may also be set in the cache information. Preferably, when the cache information is generated, an identification number is obtained through operation of a request address and a request method, and the identification number is added to the cache information, so that the cache information can be searched quickly through the identification number in the following process, and the cache (fragmented data) is finally positioned through a request range. Of course, when the cache information is generated, the information such as the validity period of the cache may also be set.
In step S106, the cache information corresponding to the response is added to the cache information list.
After the cache information corresponding to the response is added to the cache information list, the cache information becomes a cache information item in the cache information list, and subsequently, when an HTTP request requesting to access the same fragmented data is received, the list can be acquired to acquire the cached fragmented data.
When an HTTP request for requesting to access specified fragment data is received, the embodiment of the invention acquires parameter values comprising a request address, a request method and a request range parameter from the HTTP request, obtaining a preset cache information list according to the request address, searching the cache information of the appointed fragment data in the cache information list according to the request method and the request range, when the cache information is not found, sending an HTTP request to the server, receiving the response of the server to the HTTP request, storing the response to a preset storage unit, generating cache information corresponding to the response according to the address information of the storage unit and the request parameter, and finally adding the cache information corresponding to the response into a cache information list, thereby not needing to change the server, the cache of the fragment data can be realized, and the access efficiency is improved when the subsequent user accesses the fragment data.
Example two:
fig. 2 shows an implementation flow of the method for accessing fragmented data according to the second embodiment of the present invention, and for convenience of description, only the parts related to the second embodiment of the present invention are shown, which are detailed as follows:
in step S201, an HTTP request requesting access to the designated fragmented data is received;
the embodiment of the invention is suitable for computing equipment, in particular to a client in a client/server (C/S) mode, wherein the client is connected with a server through a network, receives a request of a user, sends an HTTP request to the server through the network and operates (accesses) a target file. In this embodiment of the present invention, the HTTP request is an HTTP request for operating specified fragment data of the target file, where the specified fragment data is a part of the target file stored on the server, that is, requests to access data in a specified Range in the target file on the server, and specifically, the specified Range is specified by a request Range (for example, a Range parameter) in a header of the HTTP request.
In step S202, parameter values of preset request parameters are obtained from the HTTP request, where the request parameters include a request address, a request method, and a request range;
in the embodiment of the invention, after the client receives the HTTP request of the user, the parameter value of the preset request parameter is obtained from the HTTP request, and the request parameter comprises the request address, the request method and the request range, so that the request parameter settings of different request methods in the HTTP request are unified, and the response efficiency of the HTTP request is improved.
In the request parameters of the HTTP request, the request address is an address of a request for accessing a resource or data (a target file), the request method specifies what operation the client wants to perform on the target file on the server, and the request range specifies a range of the target file requested to operate or access, that is, a position of the fragmented data in the target file. Preferably, the request method includes a GET method and a HEAD method, so that the fragment data obtained by the GET method is cached in the following, and response efficiency when the fragment data is accessed again is improved. In addition, the request header information of the HTTP request can be acquired through the HEAD method, and the validity or accessibility of the resource or the hyperlink can be detected through caching the request header information. Here, in order to unify the request parameter settings of different request methods in the HTTP request, when the request method in the HTTP request is the HEAD method, the range of the request range may be set to a range in which a start value and an end value are the same, such as 0 to 0, so as to simplify the parameter configuration when the request method is the HEAD method, and improve the access efficiency of the subsequent cache.
In step S203, a preset cache information list is obtained according to the request address, and cache information of the designated fragment data in the cache information list is searched according to the request method and the request range;
the embodiment of the invention sets a cache information list at the client for recording the cache information of the fragment data at the client, and the cache information list can be any table, file and the like capable of recording the cache information. Specifically, the cache information list may include a plurality of cache information items, each cache information item may correspond to cache information of one piece of fragmented data, and the cache information item may include a request address, a request method, and request range parameter information in an HTPP request responded by the server, and may further include a cache address of the fragmented data at the client. Preferably, the method may further include obtaining an identification number through operation of the request address and the request method, so as to quickly find the corresponding cache information item through the identification number, and further finally determine whether the requested fragment data is cached through the request range parameter.
Specifically, when searching for the cache information of the designated fragment data in the cache information list, firstly, according to the request address in the HTTP request, obtaining the cache information list corresponding to the request address, matching the request method in the obtained cache information list, when the request method is matched in the cache information list, obtaining the corresponding cache information item, searching for the cache information item corresponding to the request range in the HTTP request in the obtained cache information item, when the request is found, obtaining the cache information in the searched cache information item, and determining the obtained cache information as the cache information of the designated fragment data in the cache information list, thereby quickly locating the cache information of the designated fragment data in the client cache information list according to the request address, the request method, and the request range in the HTTP request. When the cache information item corresponding to the request range in the HTTP request is searched for in the obtained cache information item, specifically, a start value and an end value of the request range in the HTTP request may be compared with a start value and an end value of the request range in the cache information item, and when the start value of the request range in the HTTP request is greater than or equal to the start value of the request range in the cache information item and the end value is less than or equal to the end value of the request range in the cache information item, it is determined that the cache information item is the cache information corresponding to the designated fragment data.
In step S204, when the cache information is found, the cached designated fragment data is obtained according to the cache information.
In the embodiment of the invention, after the cache information is found, the address information of the storage unit for storing the specified fragment data is obtained from the cache information, and the cached specified fragment data is read according to the address information. Specifically, when the start value of the request range in the HTTP request is greater than the start value of the request range in the cache information item and the end value is less than the end value of the request range in the cache information item, it indicates that the cached data covers the fragmented data that the user wants to access, at this time, the cache data corresponding to the cache information item is obtained, and the fragmented data corresponding to the request range in the HTTP request is intercepted from the obtained cache data according to the request range (i.e., the start value and the end value of the request range) in the HTTP request, so as to accurately obtain the cached specified fragmented data.
Further, after the fragment data corresponding to the request range in the HTTP request is intercepted, the fragment data may be stored in a storage unit (cache memory) of the client, cache information corresponding to the fragment data is generated according to the address information of the storage unit and the request parameter in the HTTP request, and then the generated cache information is added to a cache information list, so that the latest accessed fragment data of the user is cached, and the hit rate of subsequent caches is improved.
According to the embodiment of the invention, when an HTTP request requesting to access the designated fragment data is received, parameter values including a request address, a request method and a request range parameter are obtained from the HTTP request, a preset cache information list is obtained according to the request address, cache information of the designated fragment data in the cache information list is searched according to the request method and the request range, and when the cache information is searched, the cached designated fragment data is obtained according to the cache information, so that the cached fragment data is used for responding to the fragment data request of a user, the fragment data request is not required to be obtained from a server, and the access efficiency of the fragment data is improved.
Example three:
fig. 3 shows a structure of a fragment data caching apparatus according to a third embodiment of the present invention, and for convenience of description, only a part related to the third embodiment of the present invention is shown, where the structure includes:
a request receiving unit 31, configured to receive an HTTP request requesting access to specified fragmented data;
a value obtaining unit 32, configured to obtain parameter values of preset request parameters from the HTTP request, where the request parameters include a request address, a request method, and a request range;
an information searching unit 33, configured to obtain a preset cache information list according to the request address, and search for cache information of the designated fragment data in the cache information list according to the request method and the request range;
a response storage unit 34, configured to send the HTTP request to the server when the cache information is not found, accept a response of the server to the HTTP request, and store the response in a preset storage unit;
an information generating unit 35, configured to generate cache information corresponding to the response according to the address information of the storage unit and the request parameter; and
an information adding unit 36, configured to add the cache information corresponding to the response to the cache information list.
In the embodiment of the present invention, each unit of the cache apparatus may be implemented by a corresponding hardware or software unit, and each unit may be an independent software or hardware unit, or may be integrated into a software or hardware unit, which is not limited herein. For the specific implementation of each unit, reference may be made to the description of the implementation of the first unit, which is not described herein again.
Example four:
fig. 4 shows a structure of a computing device according to a fourth embodiment of the present invention, and for convenience of explanation, only a part related to the embodiment of the present invention is shown.
Computing device 4 of an embodiment of the present invention includes a processor 40, a memory 41, and a computer program 42 stored in memory 41 and executable on processor 40. The processor 40, when executing the computer program 42, implements the steps in the various method embodiments described above, such as the steps S101 to S106 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the units in the above-described device embodiments, such as the functions of the units 31 to 36 shown in fig. 3.
The computing device of the embodiment of the invention can be a personal computer, a mobile device and other networking devices using an HTTP protocol. The steps implemented when the processor 40 in the computing device 4 executes the computer program 42 to implement the method can refer to the description of the foregoing method embodiments, and are not described herein again.
Example five:
in an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps in the above-described method embodiments, e.g., steps S101 to S106 shown in fig. 1. Alternatively, the computer program may be adapted to perform the functions of the units of the above-described embodiments of the apparatus, such as the functions of the units 31 to 36 shown in fig. 3, when executed by the processor.
When an HTTP request for requesting to access specified fragment data is received, the embodiment of the invention acquires parameter values comprising a request address, a request method and a request range parameter from the HTTP request, obtaining a preset cache information list according to the request address, searching the cache information of the appointed fragment data in the cache information list according to the request method and the request range, when the cache information is not found, sending an HTTP request to the server, receiving the response of the server to the HTTP request, storing the response to a preset storage unit, generating cache information corresponding to the response according to the address information of the storage unit and the request parameter, and finally adding the cache information corresponding to the response into a cache information list, thereby not needing to change the server, the cache of the fragment data can be realized, and the access efficiency is improved when the subsequent user accesses the fragment data.
The computer readable storage medium of the embodiments of the present invention may include any entity or device capable of carrying computer program code, a recording medium, such as a ROM/RAM, a magnetic disk, an optical disk, a flash memory, or the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for caching fragmented data, the method comprising the steps of:
receiving an HTTP request for requesting to access appointed fragment data;
acquiring parameter values of preset request parameters from the HTTP request, wherein the request parameters comprise a request address, a request method and a request range;
acquiring a preset cache information list according to the request address, and searching the cache information of the designated fragment data in the cache information list according to the request method and the request range;
when the cache information is not found, sending the HTTP request to the server, receiving the response of the server to the HTTP request, and storing the response to a preset storage unit;
generating cache information corresponding to the response according to the address information of the storage unit and the request parameter;
and adding the cache information corresponding to the response into the cache information list.
2. The method of claim 1, wherein the step of searching the cache information of the designated fragmented data in the cache information list comprises:
obtaining a cache information list corresponding to the request address, and matching the request method in the obtained cache information list;
and when the cache information is not matched with the request method, determining that the cache information is not found.
3. The method of claim 2, wherein the step of searching the cache information of the designated fragmented data in the cache information list further comprises:
when the request method is matched, acquiring a corresponding cache information item;
searching the cache information item corresponding to the request range in the HTTP request in the acquired cache information item;
and when the cache information item is not found, determining that the cache information is not found.
4. The method of claim 1, wherein the request methods include a GET method and a HEAD method.
5. A method for accessing fragmented data, the method comprising the steps of:
receiving an HTTP request for requesting to access appointed fragment data;
acquiring parameter values of preset request parameters from the HTTP request, wherein the request parameters comprise a request address, a request method and a request range;
acquiring a preset cache information list according to the request address, and searching the cache information of the designated fragment data in the cache information list according to the request method and the request range;
and when the cache information is found, acquiring the cached designated fragment data according to the cache information.
6. The method according to claim 5, wherein the step of obtaining a cache information list of cached data according to the request address, and searching for the cache information of the designated fragment data in the cache information list according to the request method and the request scope comprises:
according to the request address, obtaining a cache information list corresponding to the request address;
matching the request method in the obtained cache information list;
when the request method is matched in the cache information list, acquiring a corresponding cache information item;
searching the cache information item corresponding to the request range in the HTTP request in the acquired cache information item;
when the cache information item is found, cache information is obtained from the found cache information item, and the obtained cache information is determined as the cache information of the designated fragment data in the cache information list.
7. The method according to claim 5, wherein the step of obtaining the cached designated fragment data according to the caching information comprises:
and acquiring address information of a storage unit for storing the specified fragment data from the cache information, and reading the cached specified fragment data according to the address information.
8. An apparatus for caching fragmented data, the apparatus comprising:
the system comprises a request receiving unit, a server and a server, wherein the request receiving unit is used for receiving an HTTP request for requesting to access specified fragmented data, and the specified fragmented data is deployed on the server;
the value acquisition unit is used for acquiring parameter values of preset request parameters from the HTTP request, wherein the request parameters comprise a request address, a request method and a request range;
the information searching unit is used for acquiring a preset cache information list according to the request address and searching the cache information of the designated fragment data in the cache information list according to the request method and the request range;
the response storage unit is used for sending the HTTP request to the server when the cache information is not found, receiving the response of the server to the HTTP request, and storing the response to a preset storage unit;
the information generating unit is used for generating cache information corresponding to the response according to the address information of the storage unit and the request parameter; and
and the information adding unit is used for adding the cache information corresponding to the response into the cache information list.
9. A computing device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110735199.2A 2021-06-30 2021-06-30 Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium Pending CN113590915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110735199.2A CN113590915A (en) 2021-06-30 2021-06-30 Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110735199.2A CN113590915A (en) 2021-06-30 2021-06-30 Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113590915A true CN113590915A (en) 2021-11-02

Family

ID=78245377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110735199.2A Pending CN113590915A (en) 2021-06-30 2021-06-30 Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113590915A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840764A (en) * 2022-11-11 2023-03-24 网易(杭州)网络有限公司 Data processing method and device and electronic equipment
CN119520646A (en) * 2024-11-06 2025-02-25 中国建设银行股份有限公司 HTTP protocol-based message splitting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791366A (en) * 2014-12-26 2016-07-20 中国电信股份有限公司 A large file HTTP-Range download method, cache server and system
CN105959358A (en) * 2016-04-25 2016-09-21 乐视控股(北京)有限公司 CDN server and method of CDN server of caching data
US20170116124A1 (en) * 2015-10-26 2017-04-27 Salesforce.Com, Inc. Buffering Request Data for In-Memory Cache
CN107025234A (en) * 2016-02-01 2017-08-08 中国移动通信集团公司 A kind of information-pushing method and caching server
CN113032335A (en) * 2021-05-24 2021-06-25 北京世纪好未来教育科技有限公司 File access method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791366A (en) * 2014-12-26 2016-07-20 中国电信股份有限公司 A large file HTTP-Range download method, cache server and system
US20170116124A1 (en) * 2015-10-26 2017-04-27 Salesforce.Com, Inc. Buffering Request Data for In-Memory Cache
CN107025234A (en) * 2016-02-01 2017-08-08 中国移动通信集团公司 A kind of information-pushing method and caching server
CN105959358A (en) * 2016-04-25 2016-09-21 乐视控股(北京)有限公司 CDN server and method of CDN server of caching data
CN113032335A (en) * 2021-05-24 2021-06-25 北京世纪好未来教育科技有限公司 File access method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
甘桂梅;: "基于Web应用的缓存技术概述", 中国科技信息, no. 17, pages 97 - 98 *
高连歌,孙成状,王德学: "网络环境下的教育信息技术", 中国金融出版社, pages: 181 - 182 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840764A (en) * 2022-11-11 2023-03-24 网易(杭州)网络有限公司 Data processing method and device and electronic equipment
CN119520646A (en) * 2024-11-06 2025-02-25 中国建设银行股份有限公司 HTTP protocol-based message splitting method and device

Similar Documents

Publication Publication Date Title
US11461402B2 (en) Routing based request correlation
CN106534243B (en) Cache, request, response method and corresponding device based on HTTP protocol
JP6091579B2 (en) Method and apparatus for handling nested fragment caching of web pages
US9148332B2 (en) Content delivery network
JP7056893B2 (en) Application programming interface Methods, devices, API gateways, and programs for transmitting API requests.
US10735528B1 (en) Geographic relocation of content source in a content delivery network
CN109067936B (en) Method and device for domain name resolution
RU2017106890A (en) METHOD FOR ACCESS TO WEB-UNITS, DEVICE AND WEB-UNIT SYSTEM
US9088462B2 (en) Common web accessible data store for client side page processing
WO2021007752A1 (en) Return-to-source method and related device in content delivery network
CN103973834A (en) Domain name resolution (DNS) acceleration method and device based on home gateway
RU2738447C1 (en) Video caching method and video caching device
WO2017166524A1 (en) Domain name parsing method and apparatus
CN115695580B (en) Resource acquisition method, device, equipment and storage medium
CN116996578B (en) Resource processing method and device based on content distribution network
CN113590915A (en) Partitioned data caching method, partitioned data accessing method, partitioned data caching device, partitioned data accessing device, terminal and storage medium
CN105959358A (en) CDN server and method of CDN server of caching data
CN108881516A (en) A kind of method and apparatus for dispatching more CDN service systems
CN110943876B (en) URL state detection method, device, equipment and system
CN102843615B (en) The caching indexing means of Online Video file and caching server
WO2019196225A1 (en) Resource file feedback method and apparatus
KR101650829B1 (en) Method, apparatus, and system for acquiring object
CN114449044B (en) A CDN cache verification method, device and electronic equipment
CN110855786B (en) Processing method and device for network data request and computer storage medium
CN112149017A (en) Webpage access method, device and system, electronic equipment and storage medium

Legal Events

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

Application publication date: 20211102