Data acquisition method and device, computer equipment, storage medium and computer program product
By sending data identification and refresh time parameters to the parent layer node in the CDN network when the edge node is refreshed missed in the CDN network, and obtaining cache time parameters to determine whether to refresh, the problem of low data refresh efficiency in the CDN network is solved, and the data refresh efficiency is realized Efficient data refresh and accurate acquisition.
Patent Information
- Application Number
- CN202411699368.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing CDN network has problems of high time cost and low efficiency during the data refresh process, and needs to be refreshed in a sequentially layered manner, resulting in low refresh efficiency.
When refreshing missed data at the edge node of the target network, send the identification and refresh time parameters of the data to be obtained to the parent layer node, obtain the cache time parameters, and judge whether to refresh based on the two, realize the one-time refresh task, which simplifies the Refreshing process of equipment at all levels.
It improves the simplicity and efficiency of data refresh, avoids data caching errors and inconsistent acquisition problems, and improves the accuracy of data acquisition.
Smart Images

Figure CN119211360A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network data management, and in particular to a data acquisition method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] Content Delivery Network (CDN) is a distributed network system used to improve the speed, reliability, and scalability of Internet content transmission. The core principle of CDN is to cache content from the source site to multiple geographically dispersed servers (edge servers) and intelligently route user requests to the edge servers closest to them, thereby speeding up content transmission and reducing latency. In a CDN network, when the source site updates certain files, a refresh task needs to be manually issued to force the device to expire the cached data.
[0003] In the current CDN network data refresh technology, tasks are issued in layers. For example, the data of the upper layer device is refreshed first, and after the refresh is completed, the data of the next layer device is refreshed. In the process of layered refresh, the refresh needs to be performed in order, which has the problems of high time cost and low efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a data acquisition method, apparatus, computer device, storage medium and computer program product to address the above technical issues.
[0005] In a first aspect, the present application provides a data acquisition method. The method comprises:
[0006] Receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired;
[0007] In the case that the edge node of the target network refreshes and misses the data to be acquired, sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network;
[0008] In the case where the parent node cache hits the data to be acquired, acquiring a cache time parameter of the parent node caching the data to be acquired;
[0009] The data to be acquired is acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired is sent to the data acquisition terminal.
[0010] In one of the embodiments, when the edge node of the target network refreshes and misses the data to be acquired, before sending the data to be acquired identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network, it also includes: judging whether the edge cache database of the edge node has the data to be acquired based on the data to be acquired identifier, and obtaining the data cache result corresponding to the edge node; when the data cache result indicates that the edge node has not cached the data to be acquired, obtaining the refresh hit result corresponding to the edge node.
[0011] In one of the embodiments, judging whether the data to be acquired exists in the edge cache database of the edge node based on the data identifier to be acquired, and obtaining the data cache result corresponding to the edge node, includes: comparing the data identifier to be acquired with a set of data identifiers of multiple edge cache data in the edge cache database to obtain a data matching result for the data identifier to be acquired; and obtaining the data cache result corresponding to the edge node based on the data matching result.
[0012] In one of the embodiments, when the data cache result indicates that the edge node has not cached the data to be acquired, obtaining the refresh hit result corresponding to the edge node includes: obtaining the data cache time parameter of the edge node, and obtaining the refresh time parameter of the data to be acquired; and obtaining the refresh hit result corresponding to the edge node based on the data cache time parameter and the refresh time parameter.
[0013] In one of the embodiments, the refresh hit result corresponding to the edge node is obtained according to the data cache time parameter and the refresh time parameter, including: if the data cache time parameter is earlier than the refresh time parameter, determining that the refresh hit result corresponding to the edge node is a refresh miss for the data to be acquired; if the data cache time parameter is later than the refresh time parameter, determining that the refresh hit result corresponding to the edge node is a non-refresh miss for the data to be acquired.
[0014] In one of the embodiments, the data to be acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired are acquired to the data acquisition terminal, including: if the cache time parameter is later than the refresh time parameter, the data to be acquired is acquired at the parent layer node, and the data to be acquired is sent to the data acquisition terminal; if the cache time parameter is later than the refresh time parameter, the data to be acquired is acquired at the corresponding data source station, and the data to be acquired is sent to the data acquisition terminal.
[0015] In a second aspect, the present application provides a data acquisition device. The device comprises:
[0016] A receiving module, used for receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired;
[0017] A sending module, used for sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network when the edge node of the target network refreshes and misses the data to be acquired;
[0018] A parameter acquisition module, used for acquiring a cache time parameter of the parent node caching the data to be acquired when the parent node cache hits the data to be acquired;
[0019] The data acquisition module is used to acquire the data to be acquired according to the cache time parameter and the refresh time parameter, and send the data to be acquired to the data acquisition terminal.
[0020] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0021] Receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired;
[0022] In the case that the edge node of the target network refreshes and misses the data to be acquired, sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network;
[0023] In the case where the parent node cache hits the data to be acquired, acquiring a cache time parameter of the parent node caching the data to be acquired;
[0024] The data to be acquired is acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired is sent to the data acquisition terminal.
[0025] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0026] Receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired;
[0027] In the case that the edge node of the target network refreshes and misses the data to be acquired, sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network;
[0028] In the case where the parent node cache hits the data to be acquired, acquiring a cache time parameter of the parent node caching the data to be acquired;
[0029] The data to be acquired is acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired is sent to the data acquisition terminal.
[0030] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0031] Receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired;
[0032] In the case that the edge node of the target network refreshes and misses the data to be acquired, sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network;
[0033] In the case where the parent node cache hits the data to be acquired, acquiring a cache time parameter of the parent node caching the data to be acquired;
[0034] The data to be acquired is acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired is sent to the data acquisition terminal.
[0035] In the above-mentioned data acquisition method, device, computer equipment, storage medium and computer program product, first, a data acquisition request sent by a data acquisition terminal can be received, and the data acquisition request includes a data identifier of the data to be acquired; next, when the edge node refresh of the target network does not hit the data to be acquired, the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired can be sent to the parent node of the target network; further, when the parent node cache hits the data to be acquired, the cache time parameter of the parent node cache of the data to be acquired can be obtained; finally, the data to be acquired can be acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired can be sent to the data acquisition terminal. In the method provided by the embodiment of the present application, a refresh task can be issued once during the data refresh process in the target network, and the data refresh of devices at all levels can be realized at one time, which can improve the simplicity and efficiency of data refresh. Furthermore, in combination with the data acquisition process implemented by the task distribution center of the target network, data cache errors and inconsistent data acquisition problems can be avoided, thereby improving the accuracy of data acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] FIG1 is a schematic diagram of a flow chart of a data acquisition method provided in an embodiment of the present application;
[0038] FIG2 is a flow chart of another data acquisition method provided in an embodiment of the present application;
[0039] FIG3 is a schematic diagram of a data refresh process provided by an embodiment of the present application;
[0040] FIG4 is a schematic diagram of a process for obtaining a refresh hit result corresponding to an edge node according to a data cache result provided by an embodiment of the present application;
[0041] FIG5 is a schematic diagram of a process for obtaining data cache results corresponding to an edge node provided in an embodiment of the present application;
[0042] 6 is a schematic diagram of a process for obtaining a refresh hit result corresponding to an edge node according to a data cache time parameter and a refresh time parameter provided by an embodiment of the present application;
[0043] FIG7 is a structural block diagram of a data acquisition device provided in an embodiment of the present application;
[0044] FIG8 is a diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] In an exemplary embodiment, as shown in FIG. 1 and FIG. 2, a data acquisition method is provided. This embodiment is illustrated by applying the method to a task distribution center of a target network. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0047] Step 102: receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired.
[0048] Among them, the target network can be a content delivery network (CDN), which is a network technology that optimizes content transmission and access speed by deploying servers in different geographical locations around the world. CDN caches the content of the source station (source server) on multiple servers (edge servers) and redirects requests to the nearest server (edge server) according to the user's geographical location, thereby reducing data transmission time and delay and improving website loading speed. The CDN network may include DNA but is not limited to source servers, regional servers, edge servers, and main control units, etc. The source station may also be called a source server. The source server is the original storage location of the content. It stores all the latest content resources, including web pages, pictures, videos and other files. In CDN, when the edge server does not cache the content or the cache has expired, the edge server will request the content from the source server. The source server is usually located in the main data center of the website; the edge server is a data center or cache node located near the user, which is used to cache the content of the source server. The edge server caches the content of the source server and provides it to the user, reducing the number of requests to the source server and speeding up the content transmission speed; the regional server is usually located between the edge server and the source server, playing the role of a transit cache. The regional server cache level is above the edge server and is suitable for systems that require efficient content caching and transmission.
[0049] As shown in Figure 3, in an embodiment of the present application, when the data of the source server is updated and / or a data refresh task pair is received from the data acquisition terminal, the main control unit in the CDN network can send the data refresh task to the task receiving service. Next, the task receiving service can send the data refresh task to the task distribution center, and the task distribution center can distribute the data refresh task to each of the multiple nodes at one time. The multiple nodes include edge nodes and parent nodes. The edge nodes can be called edge servers (for example, edge server 1 and edge server 2), and the parent nodes can be called regional servers (for example, regional server 1). Each of the multiple nodes can execute the data refresh task, update the corresponding data according to the data refresh task, and store the corresponding data cache time parameter, which can also be called a data cache timestamp.
[0050] In addition, users can access the CDN network to obtain data, and can initiate a data acquisition request to a specific URL through a data acquisition terminal, for example, to access a web page, download a file or watch a video. The URL usually corresponds to a domain name assigned by the CDN (such as cdn.example.com), rather than the domain name of the source server. This domain name points to the CDN network and is managed by the CDN provider. The main control unit of the CDN network can receive the data acquisition request sent by the data acquisition terminal, and the data acquisition request can include a data identifier of the data to be acquired. The main control unit can determine the corresponding data to be acquired according to the data identifier; and the computer domain name system (Domain Name System, DNS) server of the CDN network will dynamically select an IP address of an edge server closest to the user according to factors such as the user's geographical location, network delay, and server load, and determine the edge server corresponding to the data acquisition terminal; then, the main control unit can send the data acquisition request to the edge server corresponding to the data acquisition terminal, and the edge server can filter in the cache database of the edge server according to the data identifier to be acquired contained in the data acquisition request, determine whether the edge server has cached the data to be acquired, and obtain the data cache result corresponding to the edge server. In the case where the data cache result indicates that the edge server has cached the data to be obtained, the data to be obtained can be directly sent to the data acquisition terminal; in the case where the data cache result indicates that the edge server has not cached the data to be obtained, it is possible to further determine the miss type of the edge server not caching the data to be obtained, and obtain the refresh hit result of the edge server. If the edge server does not cache the data to be obtained due to the failure to refresh the data, it can be determined that the refresh hit result of the edge server is a refresh miss. The refresh miss may be that after receiving the user's data acquisition request, the edge server finds that the content of the cached data to be obtained has expired or does not comply with the cache policy, and therefore needs to obtain the latest content of the data to be obtained from the upper-level server or the source server.
[0051] Step 104 , when the edge node of the target network refreshes and misses the data to be acquired, the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired are sent to the parent node of the target network.
[0052] Wherein, the target network is a CDN network, and the edge node can be an edge server. In the case that the corresponding edge server refreshes and misses the data to be obtained, the updated data corresponding to the data to be obtained can be obtained from the source server, and the data identifier of the data to be obtained and the refresh time parameter of the data to be obtained can be sent to the regional server corresponding to the edge server, that is, the parent node. The corresponding regional server can detect whether to cache the data to be obtained according to the data identifier of the data to be obtained. In the case that the regional server does not cache the data to be obtained, that is, the data to be obtained is not hit, the data to be obtained can be obtained from the corresponding source server; in the case that the regional server caches the data to be obtained, that is, the cache hits the data to be obtained, it can be further determined whether the data to be obtained of the regional server is the updated data after the refresh, and then, according to the judgment result, the data acquisition source of the data to be obtained can be determined. In a possible implementation, in the case that the corresponding edge server does not refresh and misses the data to be obtained, it indicates that the edge server caches the data to be obtained. In this case, the data acquisition request of the data to be obtained can be sent to the corresponding regional server without carrying the refresh time parameter of the data to be obtained.
[0053] Step 106: When the parent node cache hits the data to be obtained, a cache time parameter of the parent node cache of the data to be obtained is obtained.
[0054] When the regional server cache hits the data to be obtained, a cache time parameter of the parent node cache of the data to be obtained may be obtained, and the cache time parameter is a timestamp of the regional server caching the data to be obtained.
[0055] Step 108: acquiring the data to be acquired according to the cache time parameter and the refresh time parameter, and sending the data to be acquired to the data acquisition terminal.
[0056] The refresh time parameter may be the timestamp of the latest update of the data to be acquired, and by comparing the cache time parameter and the refresh time parameter, it can be determined whether the data to be acquired of the regional server is the updated data after the refresh. If the cache time parameter is later than the refresh time parameter, it indicates that the data to be acquired of the regional server is the updated data after the refresh, and the data to be acquired can be acquired from the regional server and sent to the data acquisition terminal; if the cache time parameter is later than the refresh time parameter, it indicates that the data to be acquired of the regional server is not the updated data after the refresh, and the data to be acquired is acquired from the corresponding data source station and sent to the data acquisition terminal.
[0057] In the method of this embodiment, first, a data acquisition request sent by a data acquisition terminal can be received, and the data acquisition request includes a data identifier of the data to be acquired; next, when the edge node refresh of the target network does not hit the data to be acquired, the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired can be sent to the parent node of the target network; further, when the parent node cache hits the data to be acquired, the cache time parameter of the data to be acquired cached by the parent node can be obtained; finally, the data to be acquired can be acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired can be sent to the data acquisition terminal. In the method provided by the embodiment of the present application, a refresh task can be issued once during the data refresh process in the target network, and the data refresh of devices at all levels can be realized at one time, which can improve the simplicity and efficiency of data refresh. Furthermore, in combination with the data acquisition process implemented by the task distribution center of the target network, data cache errors and inconsistent data acquisition problems can be avoided, thereby improving the accuracy of data acquisition.
[0058] In an exemplary embodiment, as shown in FIG4 , the step may further include steps 402 to 404 before sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network when the edge node of the target network refreshes and misses the data to be acquired. Among them:
[0059] Step 402: determine whether the edge cache database of the edge node has the data to be obtained according to the identifier of the data to be obtained, and obtain the data cache result corresponding to the edge node.
[0060] Among them, the DNS server of the CDN network will dynamically select an IP address of an edge server closest to the user according to factors such as the user's geographical location, network delay, and server load, and determine the edge server corresponding to the data acquisition terminal, that is, the corresponding edge node; then, the main control unit can send the data acquisition request to the edge server corresponding to the data acquisition terminal, and the edge server can filter in the cache database of the edge server according to the identifier of the data to be acquired contained in the data acquisition request, and determine whether the edge server has cached the data to be acquired, and obtain the data cache result corresponding to the edge server. In the case where the data cache result indicates that the edge server has cached the data to be acquired, the data to be acquired can be directly sent to the data acquisition terminal; in the case where the data cache result indicates that the edge server has not cached the data to be acquired, it can be further determined that the edge server has not cached the data to be acquired. The type of miss can obtain the refresh hit result of the edge server.
[0061] Step 404: When the data cache result indicates that the edge node does not cache the data to be obtained, a refresh hit result corresponding to the edge node is obtained.
[0062] Among them, if the edge server does not cache the data to be obtained due to the reason that the data is not refreshed, it can be determined that the refresh hit result of the edge server is a refresh miss. The refresh miss can be a situation where the edge server finds that the content of the cached data to be obtained has expired or does not comply with the cache policy after receiving the user's data acquisition request, and therefore needs to obtain the latest content of the data to be obtained from the upper server or the source server. In the case that the corresponding edge server does not refresh the data to be obtained, it indicates that the edge server caches the data to be obtained. In this case, the data acquisition request for the data to be obtained can be sent to the corresponding regional server without carrying the refresh time parameter of the data to be obtained.
[0063] In the method of this embodiment, when a user initiates a data acquisition request through a data acquisition terminal, the edge server corresponding to the data acquisition terminal can first determine whether the data to be acquired is cached. In the case of a cache miss, the reason for the cache miss can be further determined. If the edge server does not cache the data to be acquired due to failure to refresh the data, it can be determined that the refresh hit result of the edge server is a refresh miss. The refresh miss may be that after receiving the user's data acquisition request, the edge server finds that the content of the cached data to be acquired has expired or does not comply with the cache policy, and therefore needs to obtain the latest content of the data to be acquired from the upper-level server or the source server. By discussing each case in this way, data caching errors and inconsistent data acquisition problems can be avoided, thereby improving the accuracy of data acquisition.
[0064] In an exemplary embodiment, as shown in FIG5 , step 402 may include steps 502 to 504. Among them:
[0065] Step 502 : Compare the data identifier to be obtained with a set of data identifiers of multiple edge cache data in the edge cache database to obtain a data matching result of the data identifier to be obtained.
[0066] The data cached by the edge server can be stored in a cache database. The cache data can include all cache data of the edge server, and can be multiple edge cache data. Each edge cache data in the multiple edge cache data is marked with an edge data identifier. Based on this, the data identifier to be obtained can be compared with the data identifier set of multiple edge cache data in the edge cache database. If the data identifier to be obtained exists in the data identifier set of the multiple edge cache data, it indicates that the edge server has cached the data to be obtained; if the data identifier to be obtained does not exist in the data identifier set of the multiple edge cache data, it indicates that the edge server has not cached the data to be obtained.
[0067] Step 504: Obtain the data cache result corresponding to the edge node according to the data matching result.
[0068] Wherein, if the edge server has cached the data to be obtained, the edge server may directly send the data to be obtained to the data obtaining terminal; if the edge server has not cached the data to be obtained, a data obtaining request for the data to be obtained may be sent to an upper-layer regional server, and the data obtaining request may include a data identification of the data to be obtained and a refresh time parameter of the data to be obtained.
[0069] In the method of this embodiment, it is possible to first detect whether the edge server caches the data to be acquired based on the identifier of the data to be acquired. If the edge server caches the data to be acquired, the data to be acquired can be directly sent to the data acquisition terminal, thereby improving the efficiency and accuracy of data acquisition.
[0070] In an exemplary embodiment, as shown in FIG6 , step 404 may include steps 602 to 604. Among them:
[0071] Step 602: Acquire the data cache time parameter of the edge node and acquire the refresh time parameter of the data to be acquired.
[0072] The data cache time parameter may be a timestamp of the edge server, ie, the edge node, caching the unupdated data corresponding to the data to be acquired. The refresh time parameter may be a timestamp of the latest update of the data to be acquired.
[0073] Step 604: Obtain the refresh hit result corresponding to the edge node according to the data cache time parameter and the refresh time parameter.
[0074] In an exemplary embodiment, step 604 may include: if the data cache time parameter is earlier than the refresh time parameter, determining that the refresh hit result corresponding to the edge node is a refresh miss data to be acquired; if the data cache time parameter is later than the refresh time parameter, determining that the refresh hit result corresponding to the edge node is a non-refresh miss data to be acquired.
[0075] If the data cache time parameter is earlier than the refresh time parameter, it indicates that the edge node has not refreshed the data to be obtained, and the content of the cached data to be obtained has expired or does not comply with the cache policy, then the refresh hit result corresponding to the edge node is determined to be a refresh miss for the data to be obtained. If the data cache time parameter is later than the refresh time parameter, then it indicates that the edge server has not cached the data to be obtained, and the corresponding reason is not due to data refresh, that is, it is determined that the refresh hit result corresponding to the edge node is a non-refresh miss for the data to be obtained. When the corresponding edge server does not refresh the data to be obtained, it indicates that the edge server caches the data to be obtained. In this case, the data acquisition request for the data to be obtained can be sent to the corresponding regional server without carrying the refresh time parameter for the data to be obtained.
[0076] In the method of this embodiment, in the case of a cache miss on the edge server, the cause of the cache miss can be further determined. If the edge server does not cache the data to be acquired due to failure to refresh the data, it can be determined that the refresh hit result of the edge server is a refresh miss. The refresh miss may be that after receiving a data acquisition request from a user, the edge server finds that the content of the cached data to be acquired has expired or does not comply with the cache policy, and therefore needs to obtain the latest content of the data to be acquired from the upper-level server or the source server. By discussing each case in this way, data cache errors and inconsistent data acquisition problems can be avoided, thereby improving the accuracy of data acquisition.
[0077] In an exemplary embodiment, step 108 may:
[0078] If the cache time parameter is later than the refresh time parameter, the data to be obtained is obtained at the parent node and sent to the data acquisition terminal; if the cache time parameter is later than the refresh time parameter, the data to be obtained is obtained at the corresponding data source station and sent to the data acquisition terminal.
[0079] The refresh time parameter may be the timestamp of the latest update of the data to be acquired, and by comparing the cache time parameter and the refresh time parameter, it can be determined whether the data to be acquired of the regional server is the updated data after the refresh. If the cache time parameter is later than the refresh time parameter, it indicates that the data to be acquired of the regional server is the updated data after the refresh, and the data to be acquired can be acquired from the regional server and sent to the data acquisition terminal; if the cache time parameter is later than the refresh time parameter, it indicates that the data to be acquired of the regional server is not the updated data after the refresh, and the data to be acquired is acquired from the corresponding data source station and sent to the data acquisition terminal.
[0080] In the method of this embodiment, when the data to be acquired is hit in the cache of the regional server, it can be further determined whether the data to be acquired of the regional server is refreshed updated data, thereby ensuring the accuracy of data acquisition.
[0081] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0082] Based on the same inventive concept, the embodiment of the present application also provides a data acquisition device for implementing the data acquisition method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more data acquisition device embodiments provided below can refer to the limitations on the data acquisition method above, and will not be repeated here.
[0083] In one embodiment, as shown in FIG. 7 , a data acquisition device is provided, including: a receiving module 702, a sending module 704, a parameter acquisition module 706, and a data acquisition module 708, wherein:
[0084] A receiving module 702 is used to receive a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired;
[0085] The sending module 704 is used to send the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network when the edge node of the target network refreshes and misses the data to be acquired;
[0086] A parameter acquisition module 706 is used to acquire a cache time parameter of the parent node caching the data to be acquired when the parent node cache hits the data to be acquired;
[0087] The data acquisition module 708 is used to acquire the data to be acquired according to the cache time parameter and the refresh time parameter, and send the data to be acquired to the data acquisition terminal.
[0088] In one embodiment, the sending module 704 is also used to: determine whether the edge cache database of the edge node has the data to be obtained based on the identifier of the data to be obtained, and obtain the data cache result corresponding to the edge node; if the data cache result indicates that the edge node does not cache the data to be obtained, obtain the refresh hit result corresponding to the edge node.
[0089] In one embodiment, the sending module 704 is further used to: compare the data identifier to be obtained with a set of data identifiers of multiple edge cache data in the edge cache database to obtain a data matching result of the data identifier to be obtained; and obtain the data cache result corresponding to the edge node based on the data matching result.
[0090] In one embodiment, the sending module 704 is further used to: obtain the data cache time parameter of the edge node, and obtain the refresh time parameter of the data to be obtained; and obtain the refresh hit result corresponding to the edge node according to the data cache time parameter and the refresh time parameter.
[0091] In one embodiment, the sending module 704 is also used to: if the data cache time parameter is earlier than the refresh time parameter, determine that the refresh hit result corresponding to the edge node is a refresh miss for the data to be acquired; if the data cache time parameter is later than the refresh time parameter, determine that the refresh hit result corresponding to the edge node is a non-refresh miss for the data to be acquired.
[0092] In one embodiment, the data acquisition module 708 is also used to: if the cache time parameter is later than the refresh time parameter, obtain the data to be acquired at the parent node, and send the data to be acquired to the data acquisition terminal; if the cache time parameter is later than the refresh time parameter, obtain the data to be acquired at the corresponding data source station, and send the data to be acquired to the data acquisition terminal.
[0093] Each module in the above data acquisition device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0094] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data acquisition related data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data acquisition method is implemented.
[0095] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0097] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0098] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0101] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0102] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data acquisition method, characterized in that: The method comprises: Receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired; In the case that the edge node of the target network refreshes and misses the data to be acquired, sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network; In the case where the parent node cache hits the data to be acquired, acquiring a cache time parameter of the parent node caching the data to be acquired; The data to be acquired is acquired according to the cache time parameter and the refresh time parameter, and the data to be acquired is sent to the data acquisition terminal.
2. The method according to claim 1, characterized in that In the case that the edge node of the target network refreshes and misses the data to be acquired, before sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network, the method further includes: According to the identifier of the data to be obtained, determining whether the data to be obtained exists in the edge cache database of the edge node, and obtaining a data cache result corresponding to the edge node; When the data cache result indicates that the edge node does not cache the data to be obtained, a refresh hit result corresponding to the edge node is obtained.
3. The method according to claim 2, characterized in that The determining, according to the identifier of the data to be acquired, whether the edge cache database of the edge node has the data to be acquired, and obtaining the data cache result corresponding to the edge node includes: Compare the data identifier to be obtained with a set of data identifiers of multiple edge cache data in the edge cache database to obtain a data matching result of the data identifier to be obtained; The data cache result corresponding to the edge node is obtained according to the data matching result.
4. The method according to claim 2, characterized in that: When the data cache result indicates that the edge node does not cache the data to be obtained, obtaining the refresh hit result corresponding to the edge node includes: Acquire a data cache time parameter of the edge node, and acquire a refresh time parameter of the data to be acquired; The refresh hit result corresponding to the edge node is obtained according to the data cache time parameter and the refresh time parameter.
5. The method according to claim 4, characterized in that The acquiring the refresh hit result corresponding to the edge node according to the data cache time parameter and the refresh time parameter includes: If the data cache time parameter is earlier than the refresh time parameter, determining that the refresh hit result corresponding to the edge node is a refresh miss for the data to be acquired; If the data cache time parameter is later than the refresh time parameter, it is determined that the refresh hit result corresponding to the edge node is a non-refresh miss for the data to be acquired.
6. The method according to claim 1, characterized in that The acquiring the data to be acquired according to the cache time parameter and the refresh time parameter, and sending the data to be acquired to the data acquisition terminal, comprises: If the cache time parameter is later than the refresh time parameter, acquiring the data to be acquired at the parent node, and sending the data to be acquired to the data acquisition terminal; If the cache time parameter is later than the refresh time parameter, the data to be acquired is acquired at the corresponding data source station, and the data to be acquired is sent to the data acquisition terminal.
7. A data acquisition device, characterized in that: The device comprises: A receiving module, used for receiving a data acquisition request sent by a data acquisition terminal, wherein the data acquisition request includes a data identifier of the data to be acquired; A sending module, used for sending the data identifier of the data to be acquired and the refresh time parameter of the data to be acquired to the parent node of the target network when the edge node of the target network refreshes and misses the data to be acquired; A parameter acquisition module, used for acquiring a cache time parameter of the parent node caching the data to be acquired when the parent node cache hits the data to be acquired; The data acquisition module is used to acquire the data to be acquired according to the cache time parameter and the refresh time parameter, and send the data to be acquired to the data acquisition terminal.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data processing method, related equipment and computer readable storage medium
CN112035496A
Data acquisition method and device, computing equipment, medium and computer program product
CN118193597A
Progressive object refreshes in content delivery networks
US11438433B1
Return-to-source method and related device in content delivery network
WO2021007752A1