CN112463653A - Data refreshing method and device and electronic equipment - Google Patents
Data refreshing method and device and electronic equipment Download PDFInfo
- Publication number
- CN112463653A CN112463653A CN202011490332.4A CN202011490332A CN112463653A CN 112463653 A CN112463653 A CN 112463653A CN 202011490332 A CN202011490332 A CN 202011490332A CN 112463653 A CN112463653 A CN 112463653A
- Authority
- CN
- China
- Prior art keywords
- refreshing
- data
- cache
- target data
- refresh
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000012545 processing Methods 0.000 claims abstract description 7
- 238000004891 communication Methods 0.000 claims description 14
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000001914 filtration Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0815—Cache consistency protocols
- G06F12/0817—Cache consistency protocols using directory methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0804—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method, a device and electronic equipment for refreshing data, which relate to the technical field of data processing, and the method comprises the steps of receiving a refreshing request aiming at target data; determining whether the target data is stored in the local cache; and if the target data is stored in the local cache, refreshing the target data according to the refreshing request. In the embodiment of the invention, the node server filters the refresh request in advance, and only the refresh information of the data in the local cache is transmitted to the cache device for refreshing, so that invalid refresh requests are filtered, the cache pressure of CDN nodes is reduced, and the refresh efficiency and the refresh success rate are improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for refreshing data, and an electronic device.
Background
A Content Delivery Network (CDN) node usually includes multiple cache devices, which are generally more than 10 devices according to different sizes, and one resource (e.g., video, picture, etc.) is often cached only on one or more cache devices in the node, but a client does not know which devices are cached specifically. Therefore, in the conventional CDN node refresh scheme, a refresh request for one resource is sent to all cache devices in a node to ensure that the refresh is successful. However, this refresh method may amplify a request invalidity, for example, if there are 10 devices in a CDN node and only one device caches a target resource, if a refresh request of the target resource is sent to all 10 devices in the node, it is equivalent to amplify the refresh request by 9 times, thereby increasing the operation difficulty of the client and the cache pressure of the CDN.
Overall, the existing CDN node refresh method may result in many invalid refresh requests, which increases the cache pressure of the CDN node.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, and an electronic device for data refreshing, which can alleviate the problem of more invalid refresh requests in the CDN node refresh, reduce the cache pressure of the CDN node, and improve the refresh efficiency.
In a first aspect, an embodiment of the present invention provides a data refreshing method, which is applied to a node server, and the method includes: receiving a refresh request for target data; determining whether the target data is stored in the local cache; and if the target data is stored in the local cache, refreshing the target data according to the refreshing request.
In an optional embodiment of the present invention, the step of determining whether the local cache stores the target data includes: acquiring an index directory of cache data in a local cache; searching the index of the target data from the index directory; and determining whether the target data is stored in the local cache or not according to the index searching result of the target data.
In an optional embodiment of the present invention, the step of obtaining the index directory of the cached data in the local cache includes: acquiring an index directory of cache data in a local cache through a preset refreshing proxy service and a cache service corresponding to the local cache; the refreshing proxy service runs on the node server, is in communication connection with the cache service, and is used for generating an index directory of the cache data.
In an optional embodiment of the present invention, the step of obtaining the index directory of the cache data in the local cache through the preset refresh agent service and the cache service corresponding to the local cache includes: when monitoring that the refreshing proxy service is started, establishing communication connection between the cache service and the refreshing proxy service; through the caching service, the index directory of the cached data in the local cache is synchronized to the refresh agent service in a heartbeat manner.
In an optional embodiment of the present invention, the method further includes: and if the local cache does not store the target data, returning that the refreshing is successful.
In a second aspect, an embodiment of the present invention further provides a data refreshing apparatus, which is applied to a node server, and the apparatus includes: the device comprises a refresh request receiving module, a refresh request receiving module and a refresh request processing module, wherein the refresh request receiving module is used for receiving a refresh request aiming at target data; the judging module is used for determining whether the target data is stored in the local cache or not; and the refreshing module is used for refreshing the target data according to the refreshing request if the target data is stored in the local cache.
In an optional embodiment of the present invention, the determining module is further configured to: acquiring an index directory of cache data in a local cache; searching the index of the target data from the index directory; and determining whether the target data is stored in the local cache or not according to the index searching result of the target data.
In an optional embodiment of the present invention, the refresh module is further configured to: and if the local cache is determined not to store the target data, returning the refreshing success.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-mentioned data refreshing method.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above-described method for data refresh.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a method, a device and electronic equipment for refreshing data, which receive a refreshing request aiming at target data; determining whether the target data is stored in the local cache; and if the target data is stored in the local cache, refreshing the target data according to the refreshing request. In the mode, the node server filters the refreshing request in advance, and only transmits the refreshing information of the data in the local cache to the cache device for refreshing, so that invalid refreshing requests are filtered, the cache pressure of CDN nodes is reduced, and the refreshing efficiency and the refreshing success rate are improved.
Furthermore, the refreshing proxy service is arranged in the node server, and the requirement for filtering the refreshing request is stripped from the cache service to the refreshing proxy service, so that the basic storage function of the cache service can be further restored.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of a scenario for accessing a CDN network according to an embodiment of the present invention;
fig. 2 is a schematic architecture diagram of a content distribution network according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for refreshing data according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating another method for refreshing data according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a CDN node refresh process according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a data refreshing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 61-a refresh request receiving module; 62-a judgment module; 63-a refresh module; 71-a processor; 72-a memory; 73-bus; 74 — communication interface.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present 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.
For a common Internet user, each CDN node is equivalent to a website server placed around it, and through taking over DNS (Domain Name System), the user's request is transparently directed to the node closest to it, and the CDN server in the node responds to the user's request like the origin server of the website, and thus the response time is necessarily faster because it is closer to the user. The intelligent scheduling DNS is a key system in the CDN service, when a user accesses a website added with the CDN service, a domain name resolution request is finally processed by the intelligent scheduling DNS, and a node address closest to the user at that time is provided for the user through a set of predefined strategies, so that the user can obtain rapid service. Meanwhile, it needs to keep communication with CDN nodes distributed in various regions, track health status, capacity, and the like of each node, and ensure that a user's request is distributed to nodes available nearby.
As shown in fig. 1, it is a schematic view of a scenario for accessing a CDN network, where when a client accesses the CDN network, an interaction between the client and a domain name system DNS and an edge node in the CDN network is a necessary flow, and an interaction between the edge node, a middle node, an upper node, and a source station is an optional flow, where if a cache is hit in the edge node, the access does not involve an interaction between the edge node and another node (i.e., the flow does not pass through a dotted line portion in fig. 1).
Referring to fig. 2, a schematic diagram of an architecture of a content delivery network is shown, where the CDN node includes multiple Cache caches and multiple proxy servers Nginx, each Nginx is communicatively connected to a Linux Virtual Server (LVS), and in actual operation, an access request of a user is sent to each proxy Server Nginx through the LVS, and the Nginx provides a load balancing service, and distributes the access request to the Cache caches to respond to the access request.
In actual operation, when a user accesses the CDN network, the edge nodes directly serve the user (netizen), and the number is the largest; the middle-layer nodes are mainly source returning requests of the aggregation edge nodes, do not directly serve the netizens, and are fewer in number; the upper node mainly converges the request of the middle node to the source, and does not directly serve the netizens, and the number is relatively minimum. Also, typically the user does not need to pay for the bandwidth generated by the middle/upper nodes.
In consideration of the problems that the existing CDN node refresh method may cause many invalid refresh requests and increase the cache pressure of the CDN node, embodiments of the present invention provide a method and an apparatus for data refresh, and an electronic device. For the convenience of understanding the present embodiment, a detailed description will be given to a data refreshing method disclosed in the present embodiment.
Referring to fig. 3, which is a schematic flowchart of a method for refreshing data according to an embodiment of the present invention, wherein the method is applied to a node server, as shown in fig. 3, the method includes the following steps:
step S302: a refresh request for target data is received.
The target data may be a video, a picture, a document, or the like, and the refreshing of the target data may include at least one of adding data, deleting data, and modifying data. The node server may be an edge node server in the CDN network, and directly receives a refresh request of a user for target data, and forwards the refresh request to a cache device in the node, so that the cache device performs a refresh operation on the data according to the refresh request.
Step S304: determining whether the target data is stored in the local cache, if so, executing step S306; if not, step S308 is performed.
After receiving a refresh request, the node server firstly determines whether the target data is stored in a local cache, and if the target data is stored, the node server refreshes the target data according to the refresh request; if the target data is not stored, a refresh success is returned directly without forwarding the refresh request to a cache device within the node.
Generally, each CDN node contains multiple cache devices, but for a specific resource, such as a video, a picture, etc., only one or more cache devices are cached, and a client itself does not know which cache device the resource is cached in, so to ensure that a refresh is successful, a conventional refresh method is to hit a refresh request for the resource to all cache devices in the node, which may result in invalidating the refresh request by multiple times. In this embodiment, the node server determines in advance whether the target data to be refreshed is stored in the local cache, and if the target data to be refreshed does not exist in the local cache, it is not necessary to forward the refresh request to the cache device in the node, so that invalid refresh is avoided, and an effective refresh request is passed through to the cache device.
Step S306: and refreshing the target data according to the refreshing request.
And if the node server confirms that the target data is stored in the local cache, releasing the refreshing request, transmitting the refreshing request to the cache equipment, and performing data refreshing operation by the cache equipment according to the refreshing request.
Step S308: and returning the refreshing success.
If the node server confirms that the target data is not stored in the local cache, it indicates that the refresh request is an "invalid" request, i.e., even if the refresh request is sent to each cache device, no data update actually occurs, and thus, an unnecessary refresh operation is performed. In this embodiment, if the target data is not stored in the local cache, the refresh success is directly returned. Therefore, the method saves the operation of sending the refresh request to each cache device, and each cache device does not need to carry out 'invalid' refresh according to the refresh request.
According to the data refreshing method provided by the embodiment of the invention, when a refreshing request aiming at target data is received, whether the target data is stored in a local cache or not is firstly determined, if the target data is stored in the local cache, the target data is refreshed according to the refreshing request, and otherwise, the refreshing success is directly returned. In the method, the node server filters the refreshing request in advance, and only the refreshing information of the data in the local cache is transmitted to the cache device for refreshing, so that invalid refreshing requests are filtered, the cache pressure of the CDN node is reduced, and the refreshing efficiency and the refreshing success rate are improved.
On the basis of the method for refreshing data shown in fig. 1, the present embodiment has been described with respect to a specific implementation manner of step S304 (determining whether the local cache stores the target data) in the foregoing embodiment, so as to facilitate a deeper understanding of the scheme.
Fig. 4 is a schematic flow chart of another method for refreshing data, which is applied to a node server, and as can be seen from fig. 4, the method includes the following steps:
step S402: a refresh request for target data is received.
Step S404: and acquiring an index directory of the cache data in the local cache.
In one possible implementation manner, a refresh proxy service may be set on the node server, and when the node server monitors that the refresh proxy service is started, a communication connection between a cache service corresponding to a local cache and the refresh proxy service is established. In other possible embodiments, the refresh agent service may also be configured to start up.
The cache service is further configured to generate an index directory of the local cache data, so that the refresh agent service can obtain the index directory of the cache data from the cache service, and further determine whether the target data exists in the local cache according to the index directory. In practical operation, after the cache service establishes communication connection with the refresh proxy service, the index directory of the cached data in the local cache can be synchronized to the refresh proxy service in real time in a heartbeat manner, so that the refresh proxy service can know the latest cached data condition in the cache device.
Step S406: and searching the index of the target data from the index directory.
For example, the refresh agent service may perform lookup according to the obtained index directory, and determine whether there is an index of the target data in the index directory.
Step S408: determining whether the target data is stored in the local cache or not according to the index search result of the target data, and if so, executing the step S410; if not, step S412 is performed.
If the index of the target data is found in the index directory, the target data is stored in the local cache, so that the target data is refreshed according to the refreshing request, specifically, the refreshing request is released and sent to the cache device, so that the cache device refreshes the target data according to the refreshing request.
If the index of the target data is not found in the index directory, the target data is not stored in the local cache, at the moment, the refreshing request is intercepted, the refreshing request is not sent to the cache equipment, and the refreshing success is directly returned. In other possible embodiments, a prompt may be returned to the user indicating that the target data is not stored in the local cache.
Step S410: and refreshing the target data according to the refreshing request.
Step S412: and returning the refreshing success.
Here, the steps S410 and S412 correspond to the steps S306 to S308 in the above embodiment, and the corresponding contents may refer to the corresponding parts in the above embodiment, which are not described herein again.
In order to more clearly understand the data refreshing method provided by the present embodiment, an application example is introduced here. Referring to fig. 5, which is a schematic flow diagram of CDN node refresh provided in an embodiment of the present invention, in an implementation shown in fig. 5, a process of refreshing a CDN node by using a data refresh method in the foregoing embodiment is shown, where a refresh proxy service (refresh) is run on the CDN node, and the refresh process is as follows:
firstly, a client submits a refresh request to a refresh center through a console or an API (Application Programming Interface), and the refresh center distributes the refresh request to an agent on a relay machine of a CDN node.
When the refreshing proxy service is started, the caching device is actively connected, all directory information is requested to be obtained from the caching device, a local directory structure is established, and then the long connection is maintained with the caching service of the caching device in a heartbeat mode. Here, when the cache device is normally served, the newly added or deleted cache file is synchronized in real time to the refresh proxy service through the long connection, and the refresh proxy service maintains a content directory in the cache device, and the two are kept consistent.
Then, when the refresh request is sent to the refresh proxy service, the refresh proxy service filters the refresh request according to the directory information of the cache data, if the target resource requested to be refreshed exists in the local cache, the refresh request is required to be processed, and then the refresh request is transmitted to the cache device, and is returned to the client after the refresh is successful.
Therefore, in the CDN node, because the refreshing request of the customer is filtered through the refreshing proxy service, only the refreshing information of the data existing in the local cache is transmitted to the cache service program, so that the node refreshing pressure is reduced, and the refreshing efficiency is improved.
In practical applications, for example, during a large-scale e-commerce promotion activity, pictures of a product activity detail page need to be updated in real time, and it is estimated that a single machine needs to support processing of a refresh request of 20k QPS (query-per-second), and such high-frequency refresh requests may cause a great pressure on a cache device in a node, which affects normal netizen access. In addition, because the refreshing proxy service is arranged in the node server, and the requirement for filtering the refreshing request is stripped from the cache service to the refreshing proxy service, the basic storage function of the cache service can be further restored.
Corresponding to the method for refreshing data shown in fig. 1, an embodiment of the present invention further provides a device for refreshing data, as shown in fig. 6, which is a schematic structural diagram of a device for refreshing data, and the device is applied to a node server. As can be seen from fig. 6, the apparatus includes a refresh request receiving module 61, a judging module 62 and a refresh module 63 connected in sequence, where the functions of the respective modules are as follows:
a refresh request receiving module 61, configured to receive a refresh request for target data;
a judging module 62, configured to determine whether the target data is stored in the local cache;
and a refresh module 63, configured to refresh the target data according to the refresh request if the local cache stores the target data.
In one possible implementation, the determining module 62 is further configured to: acquiring an index directory of cache data in a local cache; searching the index of the target data from the index directory; and determining whether the target data is stored in the local cache or not according to the index searching result of the target data.
In another possible implementation, the refresh module 63 is further configured to: and if the local cache is determined not to store the target data, returning the refreshing success.
In another possible implementation, the determining module 62 is further configured to: acquiring an index directory of cache data in a local cache through a preset refreshing proxy service and a cache service corresponding to the local cache; the refreshing proxy service runs on the node server, is in communication connection with the cache service, and is used for generating an index directory of the cache data.
In another possible implementation, the determining module 62 is further configured to: when monitoring that the refreshing proxy service is started, establishing communication connection between the cache service and the refreshing proxy service; through the caching service, the index directory of the cached data in the local cache is synchronized to the refresh agent service in a heartbeat manner.
The implementation principle and the generated technical effect of the data refreshing apparatus provided by the embodiment of the present invention are the same as those of the foregoing data refreshing method embodiment, and for brief description, reference may be made to corresponding contents in the foregoing data refreshing method embodiment for the part where the embodiment of the data refreshing apparatus is not mentioned.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, which is a schematic structural diagram of the electronic device, where the electronic device includes a processor 71 and a memory 72, the memory 72 stores machine executable instructions capable of being executed by the processor 71, and the processor 71 executes the machine executable instructions to implement the above-mentioned data refreshing method.
In the embodiment shown in fig. 7, the electronic device further comprises a bus 73 and a communication interface 74, wherein the processor 71, the communication interface 74 and the memory 72 are connected by the bus.
The Memory 72 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 74 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used. The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
The processor 71 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 71. The Processor 71 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 devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and the processor 71 reads information in the memory 72 and performs the steps of the data refreshing method of the foregoing embodiment in combination with hardware thereof.
Embodiments of the present invention further provide a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method for refreshing data, and specific implementation may refer to the foregoing method embodiments, and is not described herein again.
The method for refreshing data, the apparatus for refreshing data, and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the method for refreshing data described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. 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.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. A method for refreshing data, which is applied to a node server, and comprises the following steps:
receiving a refresh request for target data;
determining whether a local cache stores the target data;
and if the target data is stored in the local cache, refreshing the target data according to the refreshing request.
2. The method of claim 1, wherein the step of determining whether the local cache stores the target data comprises:
acquiring an index directory of cache data in a local cache;
searching the index of the target data from the index directory;
and determining whether the target data is stored in the local cache or not according to the index searching result of the target data.
3. The method for refreshing data according to claim 2, wherein the step of obtaining the index directory of the cached data in the local cache comprises:
acquiring an index directory of cache data in a local cache through a preset refreshing proxy service and a cache service corresponding to the local cache;
the refreshing proxy service operates on the node server, is in communication connection with the cache service, and is used for generating an index directory of the cache data.
4. The method for refreshing data according to claim 3, wherein the step of obtaining the index directory of the cached data in the local cache through a preset refreshing proxy service and a cache service corresponding to the local cache comprises:
when the refreshing proxy service is monitored to be started, establishing communication connection between the cache service and the refreshing proxy service;
and synchronizing the index directory of the cached data in the local cache to the refreshing proxy service in a heartbeat mode through the caching service.
5. The method of data refresh as claimed in claim 1, further comprising:
and if the target data is not stored in the local cache, returning a refreshing success.
6. An apparatus for refreshing data, applied to a node server, the apparatus comprising:
the device comprises a refresh request receiving module, a refresh request receiving module and a refresh request processing module, wherein the refresh request receiving module is used for receiving a refresh request aiming at target data;
the judging module is used for determining whether the target data is stored in the local cache or not;
and the refreshing module is used for refreshing the target data according to the refreshing request if the target data is stored in the local cache.
7. The apparatus for data refresh of claim 6, wherein the determining module is further configured to:
acquiring an index directory of cache data in a local cache;
searching the index of the target data from the index directory;
and determining whether the target data is stored in the local cache or not according to the index searching result of the target data.
8. The apparatus for data refresh of claim 6, wherein the refresh module is further configured to:
and if the local cache is determined not to store the target data, returning the refreshing success.
9. An electronic device, comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of data refresh of any of claims 1 to 5.
10. A computer-readable storage medium having stored thereon computer-executable instructions which, when invoked and executed by a processor, cause the processor to carry out the method of data refresh of any of claims 1 to 5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011490332.4A CN112463653B (en) | 2020-12-15 | 2020-12-15 | Data refreshing method and device and electronic equipment |
PCT/CN2021/123638 WO2022127319A1 (en) | 2020-12-15 | 2021-10-13 | Data refreshing method and apparatus, and electronic device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011490332.4A CN112463653B (en) | 2020-12-15 | 2020-12-15 | Data refreshing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112463653A true CN112463653A (en) | 2021-03-09 |
CN112463653B CN112463653B (en) | 2024-07-23 |
Family
ID=74802985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011490332.4A Active CN112463653B (en) | 2020-12-15 | 2020-12-15 | Data refreshing method and device and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112463653B (en) |
WO (1) | WO2022127319A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113271359A (en) * | 2021-05-19 | 2021-08-17 | 北京百度网讯科技有限公司 | Method and device for refreshing cache data, electronic equipment and storage medium |
CN113709232A (en) * | 2021-08-24 | 2021-11-26 | 广州文远知行科技有限公司 | Data packet loading method, client agent, device and storage medium |
WO2022127319A1 (en) * | 2020-12-15 | 2022-06-23 | 北京金山云网络技术有限公司 | Data refreshing method and apparatus, and electronic device and computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040068579A1 (en) * | 2002-08-13 | 2004-04-08 | International Business Machines Corporation | System and method to refresh proxy cache server objects |
CN101472166A (en) * | 2007-12-26 | 2009-07-01 | 华为技术有限公司 | Method for caching and enquiring content as well as point-to-point medium transmission system |
CN106202112A (en) * | 2015-05-06 | 2016-12-07 | 阿里巴巴集团控股有限公司 | CACHE DIRECTORY method for refreshing and device |
CN108173952A (en) * | 2017-12-29 | 2018-06-15 | 北京奇虎科技有限公司 | A kind of data access method and device of content distributing network CDN |
CN111385316A (en) * | 2018-12-27 | 2020-07-07 | 阿里巴巴集团控股有限公司 | Resource refreshing method, access method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8539160B2 (en) * | 2009-09-10 | 2013-09-17 | Red Hat, Inc. | Asynchronous cache refresh for systems with a heavy load |
CN105847395A (en) * | 2016-04-25 | 2016-08-10 | 乐视控股(北京)有限公司 | Cache file processing method and device |
CN112463653B (en) * | 2020-12-15 | 2024-07-23 | 北京金山云网络技术有限公司 | Data refreshing method and device and electronic equipment |
-
2020
- 2020-12-15 CN CN202011490332.4A patent/CN112463653B/en active Active
-
2021
- 2021-10-13 WO PCT/CN2021/123638 patent/WO2022127319A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040068579A1 (en) * | 2002-08-13 | 2004-04-08 | International Business Machines Corporation | System and method to refresh proxy cache server objects |
CN101472166A (en) * | 2007-12-26 | 2009-07-01 | 华为技术有限公司 | Method for caching and enquiring content as well as point-to-point medium transmission system |
CN106202112A (en) * | 2015-05-06 | 2016-12-07 | 阿里巴巴集团控股有限公司 | CACHE DIRECTORY method for refreshing and device |
CN108173952A (en) * | 2017-12-29 | 2018-06-15 | 北京奇虎科技有限公司 | A kind of data access method and device of content distributing network CDN |
CN111385316A (en) * | 2018-12-27 | 2020-07-07 | 阿里巴巴集团控股有限公司 | Resource refreshing method, access method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022127319A1 (en) * | 2020-12-15 | 2022-06-23 | 北京金山云网络技术有限公司 | Data refreshing method and apparatus, and electronic device and computer-readable storage medium |
CN113271359A (en) * | 2021-05-19 | 2021-08-17 | 北京百度网讯科技有限公司 | Method and device for refreshing cache data, electronic equipment and storage medium |
CN113709232A (en) * | 2021-08-24 | 2021-11-26 | 广州文远知行科技有限公司 | Data packet loading method, client agent, device and storage medium |
CN113709232B (en) * | 2021-08-24 | 2024-05-17 | 广州文远知行科技有限公司 | Data packet loading method, client agent, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2022127319A1 (en) | 2022-06-23 |
CN112463653B (en) | 2024-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112463653A (en) | Data refreshing method and device and electronic equipment | |
CN102137006B (en) | Data transmission method and equipment in CDN (Content Delivery Network) | |
US8510415B2 (en) | Data distribution method, data distribution system and relevant devices in edge network | |
US8352615B2 (en) | Content management | |
US10313452B2 (en) | Migrating a chat message service provided by a chat server to a new chat server | |
WO2017045538A1 (en) | Http-based cache, request and response methods, and corresponding apparatuses | |
US9392081B2 (en) | Method and device for sending requests | |
WO2017080459A1 (en) | Method, device and system for caching and providing service contents and storage medium | |
CN112153160A (en) | Access request processing method and device and electronic equipment | |
WO2012089044A1 (en) | Cache sharing method and apparatus for content delivery network | |
US20090245265A1 (en) | Communication gateway device and relay method of the same | |
WO2015120766A1 (en) | Video optimisation system and method | |
WO2011015009A1 (en) | Method and server for obtaining page data, and method and server for updating page | |
US9686724B2 (en) | Network storage method, switch device, and controller | |
CN112104752B (en) | Hot spot balancing method and system for cache nodes of content distribution network | |
CN107580021A (en) | A kind of method and apparatus of file transmission | |
WO2011138359A1 (en) | Content delivery over a peer-to-peer network | |
CN109873855A (en) | A kind of resource acquiring method and system based on block chain network | |
US9344363B2 (en) | Information processing system, relay device, information processing device, and information processing method | |
US20150006622A1 (en) | Web contents transmission method and apparatus | |
CN112637339A (en) | Network acceleration method and device, electronic equipment and storage medium | |
JP2011510572A (en) | Method, apparatus and system for realizing fingerprint technology | |
KR102141444B1 (en) | Apparatus and method for delivering and receiving data in mobile content network | |
CN109510864B (en) | Forwarding method, transmission method and related device of cache request | |
CN113497813B (en) | Content refreshing method and device for content distribution network and electronic equipment |
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 |