CN112866356A - CDN cache method and device and electronic equipment - Google Patents

CDN cache method and device and electronic equipment Download PDF

Info

Publication number
CN112866356A
CN112866356A CN202110004379.3A CN202110004379A CN112866356A CN 112866356 A CN112866356 A CN 112866356A CN 202110004379 A CN202110004379 A CN 202110004379A CN 112866356 A CN112866356 A CN 112866356A
Authority
CN
China
Prior art keywords
cached
resource
cdn
url
resource url
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.)
Granted
Application number
CN202110004379.3A
Other languages
Chinese (zh)
Other versions
CN112866356B (en
Inventor
王伟
王小虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Knownsec Information Technology Co ltd
Original Assignee
Chengdu Knownsec Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Knownsec Information Technology Co ltd filed Critical Chengdu Knownsec Information Technology Co ltd
Priority to CN202110004379.3A priority Critical patent/CN112866356B/en
Publication of CN112866356A publication Critical patent/CN112866356A/en
Application granted granted Critical
Publication of CN112866356B publication Critical patent/CN112866356B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5681Pre-fetching or pre-delivering data based on network characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Abstract

The application provides a CDN cache method, a device and electronic equipment, and relates to the technical field of networks, wherein the method comprises the steps of setting cache list file data at a source station, regularly acquiring the cache list file data by a CDN system, wherein the cache list file data comprises a resource URL (uniform resource locator) to be cached by the CDN system; determining a resource URL to be cached according to the cache list file data and the cached resources of the CDN system; the method comprises the steps of initiating a source returning request to a source station based on a resource URL to be cached to store the resource to be cached to a CDN system, only adding a file list without modifying a source station code, not only informing the CDN to pull the resource which is not accessed by a user, caching the resource in advance, avoiding source returning caused by the fact that the CDN node has no resource in part of scenes to a certain extent, updating the resource of a website in real time, simultaneously preventing the source station from being updated and the CDN node from being updated, and avoiding source returning operation caused by overdue resources.

Description

CDN cache method and device and electronic equipment
Technical Field
The invention relates to the technical field of networks, in particular to a CDN cache method, a CDN cache device and electronic equipment.
Background
Accelerating the speed of accessing WEB services by clients through a Content Delivery Network (CDN) has become the choice of most HTTP/HTTPs services. CDNs can serve customers nearby through reverse proxy servers deployed on edge networks. The CDN node can store related resource files on a server close to the user, so that the user does not need to acquire resources from a WEB server of a source station when requesting, and the load of the source station and the time of waiting for the resources of the user are reduced.
However, in the existing caching method, when no corresponding cache exists locally at a CDN node, a resource must be cached after being requested once. In some special cases (such as killing the resource in a whole second), a large number of back-to-source requests are generated, the effect of the CDN cache is greatly reduced, access denial may be caused, and meanwhile, problems such as untimely resource update also exist, and when the resource station updates the resource, the CDN cannot be notified immediately to update the corresponding content.
Disclosure of Invention
The invention aims to provide a CDN cache method, a CDN cache device and electronic equipment to solve the problems of low cache efficiency, large source station load, poor timeliness and the like of the existing CDN cache method.
Embodiments of the invention may be implemented as follows:
in a first aspect, the present invention provides a CDN caching method, where the CDN caching method is applied to a CDN system, and the CDN caching method includes:
obtaining cache list file data at preset time intervals, wherein the cache list file data comprises resource URLs (uniform resource locators) which need to be cached by the CDN system;
determining a resource URL to be cached according to the cache list file data and the cached resources of the CDN system;
and initiating a source returning request to a source station based on the URL of the resource to be cached so as to store the resource to be cached to the CDN system.
In an optional embodiment, the step of determining a resource URL to be cached according to the cache list file data and the resource cached by the CDN system includes:
matching the resource URL to be cached by the CDN system with the cached resource URL of the CDN system;
if the resource URL needing to be cached by the CDN system is not matched with the cached resource URL of the CDN system, determining the unmatched resource URL needing to be cached as the resource URL to be cached.
In an optional embodiment, the cache list file data further includes an additional parameter corresponding to a resource URL that needs to be cached by the CDN system, the additional parameter includes an effective time of the resource URL that needs to be cached, and the step of determining the resource URL to be cached according to the cache list file data and the resource that has been cached by the CDN system further includes:
if the resource URL needing to be cached by the CDN system is matched with the cached resource URL of the CDN system, determining whether the cached resource URL is invalid or not according to the effective time corresponding to the resource URL needing to be cached;
if the cached resource URL of the CDN system fails, determining the resource URL needing caching, which is matched with the cached resource URL, as the resource URL to be cached.
In an optional embodiment, the step of obtaining the cache list file data includes:
and accessing the preset URL at preset time intervals to acquire the cache list file data stored in the source station.
In an optional embodiment, the CDN system further includes a deep learning module, where the CDN system initiates a back-to-source request to the source station through the deep learning module, and the method further includes:
determining a resource URL which is accessed most frequently according to a most frequently accessed resource algorithm based on the source returning request, wherein the source returning request comprises a resource URL to be cached;
and sending the URL of the most frequently accessed resource to a CDN node in an adjacent region so as to enable the CDN node to cache the resource to be cached.
In a second aspect, the present invention provides a CDN cache device, where the CDN cache device is applied to the CDN cache method according to any one of the foregoing embodiments, and the CDN cache device includes:
the acquisition module is used for acquiring cache list file data at preset time intervals, wherein the cache list file data comprises resource URLs (uniform resource locators) which need to be cached by the CDN system;
the processing module is used for determining a resource URL to be cached according to the cache list file data and the cached resources of the CDN system;
and the caching module is used for initiating a source returning request to a source station based on the URL of the resource to be cached so as to store the resource to be cached to the CDN system.
In an optional embodiment, the processing module is configured to match a resource URL that the CDN system needs to cache with a cached resource URL of the CDN system; if the resource URL needing to be cached by the CDN system is not matched with the cached resource URL of the CDN system, determining the unmatched resource URL needing to be cached as the resource URL to be cached.
In an optional embodiment, the cache list file data further includes an additional parameter corresponding to a resource URL that needs to be cached by the CDN system, where the additional parameter includes an effective time of the resource URL that needs to be cached, and the processing module is further configured to determine whether the cached resource URL is invalid according to the effective time corresponding to the resource URL that needs to be cached, if the resource URL that needs to be cached by the CDN system matches the cached resource URL of the CDN system; if the cached resource URL of the CDN system fails, determining the resource URL needing caching, which is matched with the cached resource URL, as the resource URL to be cached.
In an optional embodiment, the obtaining module is configured to access a preset URL at preset time intervals to obtain cache list file data stored in the source station.
In a third aspect, the present invention provides an electronic device, which includes a processor, and the processor is configured to execute computer-readable program instructions, and the computer-readable program instructions, when executed by the processor, implement the steps of the CDN caching method according to any one of the foregoing embodiments.
Compared with the prior art, according to the CDN cache method, the CDN cache device and the electronic equipment, cache list file data are set in a source station, a CDN system obtains the cache list file data at preset time intervals, and the cache list file data comprise resource URLs which need to be cached by the CDN system; determining a resource URL to be cached according to the cache list file data and the cached resources of the CDN system; and initiating a source returning request to a source station based on the URL of the resource to be cached to store the resource to be cached to the CDN system, and only adding a file list without modifying a source station code to inform the CDN to pull the resource which is not accessed by a user, caching the resource in advance, avoiding source returning caused by the fact that the CDN node has no resource in part of scenes to a certain extent, updating the resource of the website in real time, preventing the source station from being updated and the CDN node from being updated, and avoiding source returning operation caused by overdue resources.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flow diagram of a CDN caching method according to this embodiment;
fig. 2 is a schematic flow chart of another CDN caching method provided in this embodiment;
fig. 3 is a schematic flowchart of another CDN caching method provided in this embodiment;
fig. 4 is a schematic flowchart of another CDN caching method provided in this embodiment;
fig. 5 is a schematic diagram of functional modules of the CDN cache device provided in this embodiment;
fig. 6 is a schematic view of an electronic device provided in this embodiment.
Icon: 300-CDN cache means; 310-an acquisition module; 320-a processing module; 330-a cache module; 410-a processor; 411-a memory; 412-a bus; 413 — a communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
Speeding up client access to WEB services through CDN systems has currently become the choice for most HTTP/HTTPs services. CDNs can serve customers nearby through reverse proxy servers deployed on edge networks. The CDN node can store related resource files on a server close to the user, so that the user does not need to acquire resources from a WEB server of a source station when requesting, and the load of the source station and the time of waiting for the resources of the user are reduced. However, in the existing caching method, when no corresponding cache exists locally at a CDN node, a resource must be cached after being requested once. In some special cases (such as killing the resource in a whole second), a large number of back-to-source requests are generated, the effect of the CDN cache is greatly reduced, access denial may be caused, and meanwhile, problems such as untimely resource update also exist, and when the resource station updates the resource, the CDN cannot be notified immediately to update the corresponding content.
In order to solve the above problem, the present application provides a CDN caching method, please refer to fig. 1, where fig. 1 shows a flow diagram of the CDN caching method provided in this embodiment. The CDN caching method provided by the embodiment of the present application includes steps 210 to 230.
Step 210: and obtaining cache list file data at preset time intervals, wherein the cache list file data comprises resource URLs (uniform resource locators) which need to be cached by the CDN system.
The CDN system acquires cache list file data at preset time intervals, the cache list file stores resource URLs which need to be cached by the CDN system, the cache list file data is acquired, and the CDN system can acquire the resource URLs which need to be cached so as to perform caching.
Step 220: and determining the URL of the resource to be cached according to the cache list file data and the cached resource of the CDN system.
Determining a resource URL to be cached according to the acquired cache list file data and the resources cached by the CDN system, for example, determining that corresponding cache resources do not exist on the CDN system according to the cache list file data and the resources cached by the CDN system, and caching the resources; or if the cached resources on the CDN system are invalid or expired, the cached resources that are invalid or expired also need to be cached again to cache the valid resources into the CDN system.
Step 230: and initiating a source returning request to the source station based on the URL of the resource to be cached so as to store the resource to be cached to the CDN system.
And initiating a source returning request to the source station according to the URL of the resource to be cached so as to cache the resource to be cached to the CDN system.
According to the CDN cache method provided by the embodiment of the application, the cache list file data are obtained through regular access, and the CDN system obtains the cache list file data at preset time intervals, so that the resource URL needing to be cached can be obtained actively, a source return request is sent to the source station according to the resource URL to be cached, and the corresponding resource is cached. The method has the advantages that source station codes do not need to be modified, only one file list needs to be added, the CDN can be informed to pull resources which are not accessed by a user, the resources are cached in advance, source return caused by the fact that CDN nodes do not have the resources in a part of scenes is avoided to a certain extent, the resources of a website can be updated in real time, the source stations are prevented from being updated, the CDN nodes are not updated, and source return operation caused by overdue resources is avoided.
Before step 210, referring to fig. 2, the CDN caching method further includes:
step 200: and accessing the preset URL at preset time intervals to acquire the cache list file data stored in the source station.
In order to inform the CDN system which resources need to be updated, 1 cache list file may be added to the WEB server at the source station, and the file to be cached is recorded, where the file may be directly accessed by the CDN system through an external URL, and the content of the file includes a series of URLs, where the URLs are the resources that the CDN system needs to cache.
In some possible implementation manners, as an optional configuration, some fields such as valid duration, expiration time, version number, checksum and the like may be added in the list, so that the CDN system can make a comparison with existing cache content to determine whether to update, and based on these options, periodic updating may solve unnecessary back-to-source operations caused by possibly expired resources of the CDN system.
The CDN system periodically accesses the file at preset time intervals to obtain cache list file data, analyzes the content of the list, and adds or updates the cache file of the CDN system according to the content of the file list. After the CDN system analyzes the file, searching and comparing the file with the existing corresponding cache resources in the system according to the URL and the optional parameters in the list, if no corresponding resource exists, adding the file, and if the file exists, judging whether the file needs to be updated according to the optional parameters.
After the cache list file data is obtained, the URL of the resource to be cached is determined according to the cache list file data and the cached resource, and the following describes an implementation manner of step 220, and in some possible implementation manners, please refer to fig. 3, where step 220 includes the following sub-steps:
step 220-1: and matching the resource URL which needs to be cached by the CDN system with the cached resource URL of the CDN system.
Step 220-2: and if the resource URL needing to be cached by the CDN system is not matched with the cached resource URL of the CDN system, determining the unmatched resource URL needing to be cached as the resource URL to be cached.
The acquired resource URL to be cached by the CDN system is matched with the cached resource URL, if the resource URL to be cached by the CDN system already exists in the cached resource URL, the result indicates that the CDN system already caches the relevant resource, and if the resource URL to be cached by the CDN system does not exist in the cached resource URL, the result indicates that the CDN system does not cache the relevant resource and the relevant resource needs to be cached, and under the condition, the unmatched resource URL to be cached is determined as the resource URL to be cached.
Step 220-3: and if the resource URL needing to be cached by the CDN system is matched with the cached resource URL of the CDN system, determining whether the cached resource URL is invalid or not according to the effective time corresponding to the resource URL needing to be cached.
In a possible implementation manner, the cache list file data further includes an additional parameter corresponding to a resource URL that needs to be cached by the CDN system, the additional parameter includes valid time of the resource URL that needs to be cached, expiration time of the cache can be controlled by configuring the additional parameter of the cache list file data URL, and for a resource with higher time sensitivity, under the condition that a cached resource is not expired, the CDN system can update content quickly by modifying the additional parameter in the list. The function can start better effect in scenes of emergency insertion, live broadcast, content push and the like. For example, the expiration time set at the head of an original webpage is 1 day, and the file needs to be updated immediately after an emergency occurs, which can be implemented by modifying the effective time or update frequency of the additional parameter of the URL corresponding to the above list, and the CDN system updates the cache immediately after finding that the effective time or the update category changes.
If the resource URL that the CDN system needs to cache already exists in the cached resource URL, it indicates that the CDN system has cached the relevant resource, and under the condition that the CDN system has cached the relevant resource, it is also necessary to determine whether the relevant resource is valid. For example, whether the cached resource URL is invalid is determined according to the valid time corresponding to the resource URL to be cached.
Step 220-4: and if the cached resource URL of the CDN system fails, determining the resource URL needing caching, which is matched with the cached resource URL, as the resource URL to be cached.
And if the cached resource URL fails or is about to fail, determining the resource URL needing caching, which is matched with the cached resource URL which fails or is about to fail, as the resource URL to be cached.
According to the CDN cache method provided by the embodiment of the application, the resource URL to be cached in the cache list file data is compared with the cached resource URL of the CDN to determine the resource URL to be cached, meanwhile, the expiration time of the cache can be controlled by using the additional parameters in the cache list file data, and the CDN can update the content quickly by modifying the optional parameters in the list under the condition that the cached resource is not expired for the resource with higher time sensitivity, so that the CDN cache is more efficient and timely.
In addition, since the contents of the cache list file are all URLs for public access to the outside, there is no security problem. If the user thinks that the list file does not allow other users outside the CDN system to access, an internal IP can be set to be used, or an access rule is set to only allow the IP of the CDN system to access, the method does not conflict with the existing two methods of reading the cache by a source station after a client side does not hit the CDN cache and pushing the cache to the CDN through an API (application programming interface), and the method can be used at the same time and is a supplement of the method.
In order to further improve the intelligence of the CDN system for caching the related Resources in advance, in a possible implementation manner, a deep learning module is arranged in the CDN system, all source return requests between the CDN system and the source station are initiated by the deep learning module, the deep learning module is used to determine a recent access trend, retrieve key information of Resources with an MVR (Most frequently accessed Resources) ranked ahead and perform learning, extract output information, match the source station Resources, and update Resources with a higher priority level (the priority level may be determined by access frequency of the Resources or hit number of the key words, etc.) from the source station to a CDN node in an adjacent area, please refer to fig. 4, where optionally, the CDN caching method provided in this embodiment further includes:
step 240: and based on the source returning request, determining the most frequently accessed resource URL according to the most frequently accessed resource algorithm, wherein the source returning request comprises the resource URL to be cached.
And the deep learning module determines the URL of the most frequent access resource by using a most frequent access resource algorithm according to the source returning request of the CDN system.
Step 250: and sending the URL of the most frequently accessed resource to a CDN node in an adjacent region so that the CDN node caches the resource to be cached.
And sending the most frequently accessed URL to the CDN node in the adjacent region, so that the adjacent exact CDN node caches the most frequently accessed resource.
To execute the corresponding steps in the above embodiments and various possible implementations, an implementation of the log processing apparatus is given below, please refer to fig. 5, where fig. 5 is a CDN cache apparatus 300 according to a preferred embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the CDN caching device 300 provided in the present embodiment are substantially the same as the CDN caching method provided in the foregoing embodiment, and for a brief description, reference may be made to corresponding contents in the foregoing embodiment for a part that is not mentioned in this embodiment. The CDN caching device 300 provided in this embodiment includes an obtaining module 310, a processing module 320, and a caching module 330.
The obtaining module 310 is configured to obtain cache list file data at preset time intervals, where the cache list file data includes a resource URL that needs to be cached by the CDN system.
It is to be understood that, in one possible implementation manner, the obtaining module 310 may be configured to execute the step 210 in the above-mentioned figures to achieve the corresponding technical effect.
The processing module 320 is configured to determine a resource URL to be cached according to the cache list file data and the resource cached by the CDN system.
It will be appreciated that in one possible implementation, the processing module 320 may be configured to perform the step 220 in the above-mentioned figures to achieve the corresponding technical effect.
The caching module 330 is configured to initiate a source return request to the source station based on the URL of the resource to be cached, so as to store the resource to be cached in the CDN system.
It is to be appreciated that in one possible implementation, the caching module 330 can be configured to perform step 230 in the above-mentioned figures to achieve the corresponding technical effect.
The processing module 320 is configured to match a resource URL that needs to be cached by the CDN system with a cached resource URL of the CDN system; and if the resource URL needing to be cached by the CDN system is not matched with the cached resource URL of the CDN system, determining the unmatched resource URL needing to be cached as the resource URL to be cached.
The cache list file data further includes additional parameters corresponding to resource URLs that the CDN system needs to cache, where the additional parameters include effective time of the resource URLs that need to be cached, and the processing module 320 is further configured to determine whether cached resource URLs are invalid according to effective time corresponding to the resource URLs that need to be cached if the resource URLs that the CDN system needs to cache are matched with cached resource URLs of the CDN system; and if the cached resource URL of the CDN system fails, determining the resource URL needing caching, which is matched with the cached resource URL, as the resource URL to be cached.
The obtaining module 310 is further configured to access the preset URL at preset time intervals to obtain the cache list file data stored in the source station.
It is to be understood that the obtaining module 310 is further configured to perform the step 210 in the above-mentioned figures to achieve the corresponding technical effect.
In a possible implementation manner, the CDN caching device 300 further includes a deep learning module (not shown), where the deep learning module is configured to determine, according to a most frequently-visited resource algorithm, a most frequently-visited resource URL based on the back-to-source request, where the back-to-source request includes a resource URL to be cached; the deep learning module is further configured to send the URL of the most frequently accessed resource to a CDN node in an adjacent region, so that the CDN node caches the resource to be cached.
The embodiment of the invention also provides the electronic equipment, and the electronic equipment can be a CDN client. Referring to fig. 6, fig. 6 is a schematic structural diagram of the electronic device according to the embodiment. The electronic device includes a processor 410, a memory 411, and a bus 412. The processor 410 and the memory 411 are connected by a bus 412, and the processor 410 is configured to execute an executable module stored in the memory 411, such as computer readable program instructions, which when executed by the processor 410 implement the steps of the CDN caching method provided by the above-mentioned embodiment.
The processor 410 may be an integrated circuit chip having signal processing capabilities. In the implementation process, the steps of the CDN caching method provided in this embodiment may be completed by an integrated logic circuit of hardware in the processor 410 or instructions in the form of software. The Processor 410 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The Memory 411 may include a Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The bus 412 may be an ISA (Industry Standard architecture) bus, a PCI (peripheral Component interconnect) bus, an EISA (extended Industry Standard architecture) bus, or the like. Only one bi-directional arrow is shown in fig. 6, but this does not indicate only one bus 412 or one type of bus 412.
The memory 411 is used for storing programs, such as program instructions corresponding to the CDN cache device. The CDN caching device includes at least one software function module that can be stored in the memory 411 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device. After receiving the execution instruction, the processor 410 executes the program to implement the steps of the CDN caching method.
Possibly, the electronic device provided in the embodiment of the present application further includes a communication interface 413. Communication interface 413 is connected to processor 410 by a bus. The communication interface 413 may be configured to implement communication between the CDN system and the source station, initiate a source return request to the source station, and receive resource data returned by the source station.
It should be understood that the structure shown in fig. 6 is only a schematic structural diagram of a portion of an electronic device, and the electronic device may further include more or less components than those shown in fig. 6, or have a different configuration than that shown in fig. 6, and each component shown in fig. 6 may be implemented in hardware, software, or a combination thereof.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A CDN cache method is characterized in that the CDN cache method is applied to a CDN system, and the CDN cache method comprises the following steps:
obtaining cache list file data at preset time intervals, wherein the cache list file data comprises resource URLs (uniform resource locators) which need to be cached by the CDN system;
determining a resource URL to be cached according to the cache list file data and the cached resources of the CDN system;
and initiating a source returning request to a source station based on the URL of the resource to be cached so as to store the resource to be cached to the CDN system.
2. The CDN caching method of claim 1, wherein the step of determining a resource URL to be cached based on the cache list file data and a resource cached by the CDN system includes:
matching the resource URL to be cached by the CDN system with the cached resource URL of the CDN system;
if the resource URL needing to be cached by the CDN system is not matched with the cached resource URL of the CDN system, determining the unmatched resource URL needing to be cached as the resource URL to be cached.
3. The CDN caching method of claim 2, wherein the cache list file data further includes an additional parameter corresponding to a resource URL that the CDN system needs to cache, the additional parameter includes an effective time of the resource URL that needs to cache, and the step of determining a resource URL to be cached according to the cache list file data and a resource that the CDN system has cached further includes:
if the resource URL needing to be cached by the CDN system is matched with the cached resource URL of the CDN system, determining whether the cached resource URL is invalid or not according to the effective time corresponding to the resource URL needing to be cached;
if the cached resource URL of the CDN system fails, determining the resource URL needing caching, which is matched with the cached resource URL, as the resource URL to be cached.
4. The CDN caching method of claim 1, wherein the step of obtaining cache list file data comprises:
and accessing the preset URL at preset time intervals to acquire the cache list file data stored in the source station.
5. The CDN caching method of claim 1 wherein the CDN system further comprises a deep learning module, and wherein the CDN system initiates a back-to-source request to the source station via the deep learning module, the method further comprising:
determining a resource URL which is accessed most frequently according to a most frequently accessed resource algorithm based on the source returning request, wherein the source returning request comprises a resource URL to be cached;
and sending the URL of the most frequently accessed resource to a CDN node in an adjacent region so as to enable the CDN node to cache the resource to be cached.
6. A CDN cache device, wherein the CDN cache device is applied to the CDN cache method according to any one of claims 1 to 5, and the CDN cache device includes:
the acquisition module is used for acquiring cache list file data at preset time intervals, wherein the cache list file data comprises resource URLs (uniform resource locators) which need to be cached by the CDN system;
the processing module is used for determining a resource URL to be cached according to the cache list file data and the cached resources of the CDN system;
and the caching module is used for initiating a source returning request to a source station based on the URL of the resource to be cached so as to store the resource to be cached to the CDN system.
7. The CDN cache device of claim 6 wherein the processing module is configured to match a resource URL that the CDN system needs to cache with a cached resource URL of the CDN system; if the resource URL needing to be cached by the CDN system is not matched with the cached resource URL of the CDN system, determining the unmatched resource URL needing to be cached as the resource URL to be cached.
8. The CDN caching device of claim 7, wherein the cache list file data further includes an additional parameter corresponding to a resource URL that needs to be cached by the CDN system, the additional parameter includes an effective time of the resource URL that needs to be cached, and the processing module is further configured to determine whether the cached resource URL is invalid according to the effective time corresponding to the resource URL that needs to be cached, if the resource URL that needs to be cached by the CDN system matches the cached resource URL of the CDN system; if the cached resource URL of the CDN system fails, determining the resource URL needing caching, which is matched with the cached resource URL, as the resource URL to be cached.
9. The CDN caching device of claim 6, wherein the obtaining module is configured to access a preset URL at preset time intervals to obtain the cache list file data stored in the source station.
10. An electronic device, comprising a processor configured to execute computer-readable program instructions that, when executed by the processor, implement the steps of the CDN caching method of any one of claims 1-5.
CN202110004379.3A 2021-01-04 2021-01-04 CDN cache method and device and electronic equipment Active CN112866356B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110004379.3A CN112866356B (en) 2021-01-04 2021-01-04 CDN cache method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110004379.3A CN112866356B (en) 2021-01-04 2021-01-04 CDN cache method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112866356A true CN112866356A (en) 2021-05-28
CN112866356B CN112866356B (en) 2023-02-24

Family

ID=76001481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110004379.3A Active CN112866356B (en) 2021-01-04 2021-01-04 CDN cache method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112866356B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174690A (en) * 2022-09-08 2022-10-11 中国人民解放军国防科技大学 System and method for accelerating high-flow service under weak network or broken network condition

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200278A (en) * 2013-04-25 2013-07-10 网宿科技股份有限公司 Source station file updating and releasing method and cache file updating method
CN106462610A (en) * 2014-05-22 2017-02-22 华为技术有限公司 System and method for pre-fetching
CN106657249A (en) * 2016-10-25 2017-05-10 杭州迪普科技股份有限公司 Method and device for updating cache resources
CN107786668A (en) * 2017-11-09 2018-03-09 成都知道创宇信息技术有限公司 A kind of weight caching web site method based on CDN
CN108848173A (en) * 2018-06-25 2018-11-20 郑州云海信息技术有限公司 A kind of data-updating method, device, equipment and readable storage medium storing program for executing
CN109194772A (en) * 2018-11-13 2019-01-11 杭州领智云画科技有限公司 CDN fringe node returns source method and system
CN111949902A (en) * 2020-08-17 2020-11-17 上海七牛信息技术有限公司 CDN content refreshing system and method
WO2020244026A1 (en) * 2019-06-03 2020-12-10 网宿科技股份有限公司 Method for obtaining service data and converged cdn system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200278A (en) * 2013-04-25 2013-07-10 网宿科技股份有限公司 Source station file updating and releasing method and cache file updating method
CN106462610A (en) * 2014-05-22 2017-02-22 华为技术有限公司 System and method for pre-fetching
CN106657249A (en) * 2016-10-25 2017-05-10 杭州迪普科技股份有限公司 Method and device for updating cache resources
CN107786668A (en) * 2017-11-09 2018-03-09 成都知道创宇信息技术有限公司 A kind of weight caching web site method based on CDN
CN108848173A (en) * 2018-06-25 2018-11-20 郑州云海信息技术有限公司 A kind of data-updating method, device, equipment and readable storage medium storing program for executing
CN109194772A (en) * 2018-11-13 2019-01-11 杭州领智云画科技有限公司 CDN fringe node returns source method and system
WO2020244026A1 (en) * 2019-06-03 2020-12-10 网宿科技股份有限公司 Method for obtaining service data and converged cdn system
CN111949902A (en) * 2020-08-17 2020-11-17 上海七牛信息技术有限公司 CDN content refreshing system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱渝苏: ""基于Web平台的CDN检测系统的研究与实现"", 《中国优秀硕士论文全文数据库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174690A (en) * 2022-09-08 2022-10-11 中国人民解放军国防科技大学 System and method for accelerating high-flow service under weak network or broken network condition

Also Published As

Publication number Publication date
CN112866356B (en) 2023-02-24

Similar Documents

Publication Publication Date Title
US10491614B2 (en) Illegitimate typosquatting detection with internet protocol information
US10547679B1 (en) Cloud data synchronization based upon network sensing
EP3170091B1 (en) Method and server of remote information query
RU2615057C2 (en) Method and device for access to web-page and router
US9514243B2 (en) Intelligent caching for requests with query strings
EP3991389B1 (en) File upload control for client-side applications in proxy solutions
US8584240B1 (en) Community scan for web threat protection
WO2015014145A1 (en) Method and device for accelerating sub-resource loading velocity
EP3518109A1 (en) Method and apparatus for realizing communication between web page and native application, and electronic device
US9495469B2 (en) System and method to identify machine-readable codes
TW201512866A (en) Method, system, browser and proxy server for web page loading
US11463753B2 (en) Method and apparatus for downloading resources
CN110650214B (en) Agent method, device, electronic equipment and storage medium
AU2008355023A1 (en) Generating sitemaps
CN108900547B (en) Source returning control method and device
CN106899689B (en) Information pre-issuing method and server
CN112866356B (en) CDN cache method and device and electronic equipment
CN102882988A (en) Method, device and equipment for acquiring address information of resource information
CN110708402A (en) Accessible resource display method and device and resource access system
CN108055299B (en) Portal page pushing method, network access server and Portal authentication system
GB2562535A (en) Method for privacy protection
US11582226B2 (en) Malicious website discovery using legitimate third party identifiers
CN111723369A (en) File management method, equipment and medium of FTP server
KR102193481B1 (en) Proxy server, method of reconfigurating of web page using the same
US20160050292A1 (en) Local web resource access

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 9/F, Block C, No. 28 Tianfu Avenue North Section, Chengdu High tech Zone, China (Sichuan) Pilot Free Trade Zone, Chengdu City, Sichuan Province, 610000

Patentee after: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 610000, 11th floor, building 2, no.219, Tianfu Third Street, Chengdu pilot Free Trade Zone, hi tech Zone, Chengdu, Sichuan Province 610000

Patentee before: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder