Search

CN-121984957-A - Website cache management method and device and related equipment

CN121984957ACN 121984957 ACN121984957 ACN 121984957ACN-121984957-A

Abstract

The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for managing a website cache, and related devices. The method comprises the steps of obtaining first cache information of each network device, wherein the first cache information of one network device comprises URL and hit times of a cached website of the network device, accumulating 1 for each obtained first cache information, the hit times of second cache information corresponding to the first cache information in a candidate cache list, wherein the hit times of the second cache information are represented by the number of hits of the network device, which is larger than or equal to a first preset value, and indicating the website cache corresponding to the URL in the whole network device to be cached in advance if judging that third cache information corresponding to the second cache information does not exist in the whole network effective cache list for each second cache information in the candidate cache list, and the increase number of the hit times of the second cache information in a preset duration is larger than or equal to a second preset value.

Inventors

  • WANG YONGWEI
  • FANG YA

Assignees

  • 新华三技术有限公司

Dates

Publication Date
20260505
Application Date
20260227

Claims (12)

  1. 1. The website cache management method is characterized by being applied to an SDN controller, wherein the SDN controller is used for managing network equipment included in a network, and the network equipment can be used for caching a website cache requested by a user, and comprises the following steps: acquiring first cache information of each network device, wherein the first cache information of one network device comprises URLs and hit times of each website cached by the network device; accumulating 1 hit times included in second cache information corresponding to URLs included in the first cache information in a candidate cache list aiming at each piece of acquired first cache information, wherein hit times included in one piece of second cache information represent the number of network devices with hit times of the URLs included in the corresponding first cache information being larger than or equal to a first preset value; And aiming at each piece of second cache information in the candidate cache list, if the fact that third cache information corresponding to the URL included in the second cache information does not exist in the full-network effective cache list maintained locally is judged, and the number of hits of the second cache information in the preset time is greater than or equal to a second preset value, indicating full-network equipment to pre-cache the website cache corresponding to the URL.
  2. 2. The method of claim 1, wherein the method further comprises: and aiming at each piece of second cache information in the candidate cache list, if the reduction number of the second cache information in the preset time period is larger than or equal to a third preset value, indicating the whole network equipment to reduce the aging time of the website cache corresponding to the URL by the preset time period.
  3. 3. The method of claim 2, wherein the method further comprises: And if the third cache information corresponding to the URL included in the second cache information exists in the full-network effective cache list maintained locally, removing the third cache information from the full-network effective cache list.
  4. 4. The method of claim 1, wherein the method further comprises: and adding third cache information corresponding to the URL included in the second cache information into the full-network effective cache list.
  5. 5. The method as claimed in claim 1, wherein the step of accumulating 1 the hit number included in the second cache information corresponding to the URL included in the first cache information in the candidate cache list includes: If it is determined that second cache information corresponding to the URL included in the first cache information exists in the locally maintained candidate cache list, and the hit number of the URL included in the first cache information is greater than or equal to a first preset value, accumulating 1 the hit number of the second cache information corresponding to the URL included in the second cache information in the candidate cache list; if it is determined that the second cache information corresponding to the URL included in the first cache information does not exist in the locally maintained candidate cache list, and the hit number of the URL included in the first cache information is greater than or equal to a first preset value, adding the second cache information corresponding to the URL to the candidate cache list, and setting the hit number of the second cache information corresponding to the URL to be 1.
  6. 6. The website cache management device is characterized by being applied to an SDN controller, wherein the SDN controller is used for managing network devices included in a network, each network device can be used for caching a website cache requested by a user, and the device comprises: the system comprises an acquisition unit, a storage unit and a storage unit, wherein the acquisition unit is used for acquiring first cache information of each network device, and the first cache information of one network device comprises URLs and hit times of each website cached by the network device; The updating unit is used for accumulating 1 hit times included in second cache information corresponding to the URL included in the first cache information in the candidate cache list aiming at each piece of acquired first cache information, wherein hit times included in one piece of second cache information represent the number of network devices with hit times greater than or equal to a first preset value corresponding to the URL included in the first cache information; And the judging unit judges that the third cache information corresponding to the URL included in the second cache information does not exist in the full-network effective cache list maintained locally aiming at each piece of second cache information in the candidate cache list, and if the number of the increase of the hit times of the second cache information within the preset duration is greater than or equal to a second preset value, the full-network equipment is instructed to pre-cache the website cache corresponding to the URL.
  7. 7. The apparatus of claim 6, wherein, And aiming at each piece of second cache information in the candidate cache list, if the judging unit judges that the reduction number of the second cache information in the preset time period is larger than or equal to a third preset value, indicating the whole network equipment to reduce the aging time of the website cache corresponding to the URL by the preset time period.
  8. 8. The apparatus of claim 7, wherein, And if the judging unit judges that the third cache information corresponding to the URL included in the second cache information exists in the full-network effective cache list maintained locally, removing the third cache information from the full-network effective cache list.
  9. 9. The apparatus of claim 6, wherein the apparatus further comprises: And the adding unit is used for adding third cache information corresponding to the URL included in the second cache information into the full-network effective cache list.
  10. 10. The apparatus of claim 6, wherein when accumulating the hit number included in the second cache information corresponding to the URL included in the first cache information in the candidate cache list by 1, the updating unit is specifically configured to: If it is determined that second cache information corresponding to the URL included in the first cache information exists in the locally maintained candidate cache list, and the hit number of the URL included in the first cache information is greater than or equal to a first preset value, accumulating 1 the hit number of the second cache information corresponding to the URL included in the second cache information in the candidate cache list; if it is determined that the second cache information corresponding to the URL included in the first cache information does not exist in the locally maintained candidate cache list, and the hit number of the URL included in the first cache information is greater than or equal to a first preset value, adding the second cache information corresponding to the URL to the candidate cache list, and setting the hit number of the second cache information corresponding to the URL to be 1.
  11. 11. A website cache management apparatus, characterized in that the website cache management apparatus comprises: A memory for storing program instructions; A processor for invoking program instructions stored in the memory and performing the steps of the method according to any of claims 1-5 in accordance with the obtained program instructions.
  12. 12. A computer readable storage medium storing computer executable instructions for causing a computer to perform the steps of the method according to any one of claims 1-5.

Description

Website cache management method and device and related equipment Technical Field The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for managing a website cache, and related devices. Background With the rapid development of cloud network technology, SDN (Software Defined Network, software defined networking) technology is widely applied to various fields and various user actual networks. The SDN controller is used as a brain of a network to control and schedule the issuing of various network operation and maintenance services. The Web Cache is a website caching technology, content on a Web page of a specified address server accessed by a user through an HTTP/HTTPS protocol is cached locally, and when the user accesses the same content within the aging time of a Cache file, the user directly responds from the local, so that the effects of reducing the access flow of the server, reducing the transmission cost and saving the bandwidth of equipment are achieved. The Web Cache only aims at the website Cache of a single device, and the website content Cache is carried out indiscriminately, so that the usable disk Cache space configured by a user is occupied quickly, the website content accessed at high frequency cannot be cached, and the user experience is poor. Disclosure of Invention The application provides a website cache management method, a website cache management device and related equipment. In a first aspect, the present application provides a website cache management method, applied to an SDN controller, where the SDN controller is configured to receive network devices included in a network, where each network device may be used to cache a website cache requested by a user, where the method includes: acquiring first cache information of each network device, wherein the first cache information of one network device comprises URLs and hit times of each website cached by the network device; accumulating 1 hit times included in second cache information corresponding to URLs included in the first cache information in a candidate cache list aiming at each piece of acquired first cache information, wherein hit times included in one piece of second cache information represent the number of network devices with hit times of the URLs included in the corresponding first cache information being larger than or equal to a first preset value; And aiming at each piece of second cache information in the candidate cache list, if the fact that third cache information corresponding to the URL included in the second cache information does not exist in the full-network effective cache list maintained locally is judged, and the number of hits of the second cache information in the preset time is greater than or equal to a second preset value, indicating full-network equipment to pre-cache the website cache corresponding to the URL. Optionally, the method further comprises: and aiming at each piece of second cache information in the candidate cache list, if the reduction number of the second cache information in the preset time period is larger than or equal to a third preset value, indicating the whole network equipment to reduce the aging time of the website cache corresponding to the URL by the preset time period. Optionally, the method further comprises: And if the third cache information corresponding to the URL included in the second cache information exists in the full-network effective cache list maintained locally, removing the third cache information from the full-network effective cache list. Optionally, the method further comprises: and adding third cache information corresponding to the URL included in the second cache information into the full-network effective cache list. Optionally, the step of accumulating 1 the hit number included in the second cache information corresponding to the URL included in the first cache information in the candidate cache list includes: If it is determined that second cache information corresponding to the URL included in the first cache information exists in the locally maintained candidate cache list, and the hit number of the URL included in the first cache information is greater than or equal to a first preset value, accumulating 1 the hit number of the second cache information corresponding to the URL included in the second cache information in the candidate cache list; if it is determined that the second cache information corresponding to the URL included in the first cache information does not exist in the locally maintained candidate cache list, and the hit number of the URL included in the first cache information is greater than or equal to a first preset value, adding the second cache information corresponding to the URL to the candidate cache list, and setting the hit number of the second cache information corresponding to the URL to be 1. In a second aspect, the present application provides a websit