Data caching method and device, equipment and medium
By dynamically updating the popularity table of routing nodes in the content center network, combining global popularity and node betweenness, optimizing the cache location solves the problem of inaccurate optimization and configuration of cache resources in the existing technology, and improves the quality and quality of content cache. Network performance.
Patent Information
- Application Number
- CN202311551415.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, the optimal configuration of routing node caching resources in the content center network has the problem of inaccurate popularity statistics, resulting in poor content caching quality, and distributed caching only uses content popularity and lacks globality, affecting the overall system caching. performance.
By dynamically updating the popularity table of routing nodes during the content request process, the global popularity is combined with node betweenness and cache space status to optimize the cache location of the content and improve the accuracy and quality of the cache.
It achieves more accurate data caching and content caching, improves network nodes' understanding of content popularity, adapts to changing content request patterns, and improves cache resource utilization and network performance.
Smart Images

Figure CN118803052A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a data caching method, device, equipment and medium. Background Art
[0002] The content-centric network is a content-centric network with built-in cache space in the routing nodes. The network is driven by user requests, using content names as transmission identifiers, and obtaining requested content by matching content names in the routing nodes passed through, providing services to users nearby, while reducing user request latency and improving network communication efficiency. Faced with the massive amount of content that continues to be generated in the network, the cache strategy determines which nodes cache content and what content the nodes cache, which directly affects the "quality" of the content cached by network nodes.
[0003] In the prior art, in order to achieve optimal configuration of routing node cache resources, the network topology position and content popularity are usually combined to make the network core nodes or edge nodes cache high-popularity content to meet user needs. However, this method makes the popularity statistics of the network nodes located in the central position inaccurate, resulting in poor content cache quality. Summary of the invention
[0004] The present application provides a data caching method, apparatus, device and medium, which can improve the accuracy of data caching and improve the quality of content caching.
[0005] In a first aspect, an embodiment of the present application provides a data caching method, the method comprising:
[0006] In the process of transmitting the first interest packet through the first path, based on the first interest packet, updating the popularity table corresponding to each routing node on the first path, the popularity table including global popularity corresponding to a plurality of transmission contents, the global popularity being used to indicate the frequency of the number of times the transmission contents are requested, and the first interest packet including the content identifier corresponding to the target content;
[0007] When the transmission of the first interest packet is completed, obtaining a data packet corresponding to the content identifier, where the data packet includes the target content;
[0008] In the case of transmitting a data packet, obtaining a first node betweenness of a first node, where the first node is any node in each routing node on the first path;
[0009] When the betweenness of the first node matches the maximum betweenness recorded in the data packet, if the cache space of the first node is full, the cache location of the target content is determined based on the first popularity table corresponding to the data packet and the first node.
[0010] In a second aspect, the present application provides a data cache device, the device comprising:
[0011] An updating module, configured to update a popularity table corresponding to each routing node on the first path based on the first interest packet during the transmission of the first interest packet through the first path, wherein the popularity table includes global popularity corresponding to a plurality of transmission contents, the global popularity is used to indicate the frequency of the number of times the transmission contents are requested, and the first interest packet includes a content identifier corresponding to the target content;
[0012] A first acquisition module, configured to acquire a data packet corresponding to the content identifier when the transmission of the first interest packet is completed, the data packet including the target content;
[0013] A second acquisition module is used to acquire a first node betweenness of a first node when transmitting a data packet, where the first node is any node in each routing node on the first path;
[0014] The cache module is used to determine the cache location of the target content based on the first popularity table corresponding to the data packet and the first node when the first node betweenness matches the maximum betweenness recorded in the data packet and if the cache space of the first node is full.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0016] When the processor executes the computer program instructions, the data caching method in any one of the embodiments of the first aspect is implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, a data caching method as in any one of the embodiments in the first aspect is implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a data caching method as in any one of the embodiments in the first aspect above.
[0019] In a data caching method, device, equipment and medium provided by an embodiment of the present application, in the process of transmitting a first interest packet through a first path, based on the first interest packet, the popularity table corresponding to each routing node on the first path is updated, the popularity table includes global popularity corresponding to multiple transmission contents, the global popularity is used to indicate the frequency of the number of times the transmission content is requested, and the first interest packet includes a content identifier corresponding to the target content; when the first interest packet is transmitted, a data packet corresponding to the content identifier is obtained, and the data includes the target content; when the data packet is transmitted, the first node betweenness of the first node is obtained, and the first node is any one of the routing nodes on the first path; when the first node betweenness matches the maximum betweenness recorded in the data, if the cache space of the first node is full, the cache location of the target content is determined based on the data packet and the first popularity table corresponding to the first node. In the above manner, the popularity table of the routing node is dynamically updated using information during the transmission of the first interest packet to more accurately reflect the global popularity of the transmission content. This popularity information is used to determine the cache location of the content, thereby improving the accuracy of the cache. And by combining global popularity with node betweenness and cache space status, more intelligent caching decisions can be made, improving the accuracy of data caching and the quality of content caching. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 It is a flowchart of a data caching method provided by an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of the data structure of an interest packet provided by an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of the data structure of a data packet provided by an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of the process of interest packet transmission provided by an embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of a flow chart of data packet transmission provided by an embodiment of the present application;
[0026] Figure 6 It is a structural diagram of a data cache device provided in an embodiment of the present application;
[0027] Figure 7It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0030] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0031] Today, the Internet has become an important infrastructure for social and economic life, profoundly affecting people's lifestyles. With the rapid expansion of the Internet network, the access method and role positioning of the Internet have undergone tremendous changes. The main functional requirements of the Internet today have changed from a simple data transmission mode to achieving high-efficiency, high-quality, and large-scale content acquisition and distribution.
[0032] Traditional network architecture not only affects the Internet service experience, but also restricts the further development of the Internet. For this reason, the future network architecture has emerged to achieve the focus on network content and meet the distribution needs of massive content. Content-centric network is the most representative one.
[0033] The content-centric network is a content-centric network with built-in cache space in the routing nodes. The network is driven by user requests and uses content names as transmission identifiers. The requested content is obtained by matching the content names in the routing nodes passed through, providing services to users nearby, while reducing user request latency and improving network communication efficiency. Faced with the massive amount of content continuously generated in the network, the cache strategy determines which nodes cache content and what content the nodes cache, which directly affects the "quality" of the cached content of the network nodes. An effective cache strategy can make full use of the cache resources in the network, improve the utilization rate of cache resources, enable the cached content to meet more user requests, and improve network service performance while reducing forwarding costs.
[0034] However, in the prior art, in order to achieve the optimal configuration of routing node cache resources, the network topology position is usually combined with the content popularity, so that the network core node or edge node caches high-popularity content to meet user needs. However, the statistics of popularity tend to ignore the aggregation and filtering effect of the routing node on the same request, resulting in the popularity of the network node statistics located in the central position not being global, and not being utilized to improve the overall cache performance of the system. Or the content popularity is used to calculate the maximum cache benefit. This calculation process does not distinguish between nodes and content, so that each node calculates the cache benefit for each content. The algorithm is relatively complex and difficult to adapt to application scenarios with large network topologies and numerous requested content. Or by considering distributed caching, however, distributed caching only uses the popularity of the content to make cache judgments. Since the statistics of the content popularity itself are not global, there is a certain error effect. At the same time, caching low-popularity content may still cause neighboring nodes to frequently replace cache content, increasing the node operation burden.
[0035] In order to solve the problems existing in the prior art, the embodiments of the present application provide a data caching method, apparatus, device and medium.
[0036] The present application embodiment provides a data caching method, apparatus, device and medium. The following first introduces the data caching method provided by the present application embodiment. Figure 1 As shown, the method specifically comprises the following steps:
[0037] S100, in the process of transmitting the first interest packet through the first path, based on the first interest packet, the popularity table corresponding to each routing node on the first path is updated, the popularity table includes global popularity corresponding to multiple transmitted contents, the global popularity is used to indicate the frequency of the number of times the transmitted content is requested, and the first interest packet includes a content identifier corresponding to the target content.
[0038] Optionally, in an embodiment of the present application, an interest packet is a data set of request data sent to the network by a terminal user or a routing node. The interest packet contains the content identifier requested by the user, which is usually the name of the content or the unique identifier of the object of interest. The interest packet propagates in the network, and the routing node searches and obtains the corresponding content based on it. When a node receives the interest packet and has a copy of the requested content, it can respond to the interest packet with a data packet.
[0039] Global popularity refers to how frequently or popular a piece of content is requested across the network. When a piece of content is requested by multiple users in the network, it has a high global popularity. Global popularity is used to measure the popularity of content to indicate whether a piece of content is widely requested. This is a key metric that helps in caching decisions, as it helps network nodes determine which content should be cached to satisfy user demand.
[0040] Optionally, in a feasible implementation of the present application, it is first necessary to determine the transmission path of the first interest packet according to the network topology, and the information of the Popu Count field can be carried in the interest packet, and the Popu Count field stores the global popularity of the target content. In the process of transmitting the interest packet on the first path, each routing node will receive the interest packet, which contains the information of the Popu Count field. Each routing node can update its own popularity table according to the Popu Count field in the interest packet.
[0041] In one possible implementation, when each routing node receives an interest packet, it can update the global popularity information of the content involved according to the value of the Popu Count field in the interest packet. These updates may include adding the value of the Popu Count field to the global popularity of the corresponding content to reflect the frequency of the number of times the content is requested. Each routing node needs to maintain a popularity table that contains the global popularity information corresponding to multiple transmitted contents.
[0042] In these optional embodiments, the popularity table of each routing node is updated by the first interest packet transmitted on the first path, so that the global popularity of the target content can be more accurately reflected. This popularity information can be used for subsequent caching decisions to improve the accuracy of data caching and the quality of content caching. It should be noted that in the embodiments of the present application, the update of the popularity table is dynamic and real-time, so as to ensure that the network nodes can adapt to the changing content request patterns.
[0043] S200, when the transmission of the first interest packet is completed, obtaining a data packet corresponding to the content identifier, the data packet including the target content.
[0044] Optionally, in a feasible implementation of the present application, during the transmission of the first interest packet, each routing node performs matching according to the content identifier contained in the first interest packet. Once a node matches the requested content identifier, it means that the node has the requested target content and needs to prepare the corresponding data packet. Once the match is successful, the node will prepare a data packet containing the requested target content. This data packet should contain the requested content so that it can be transmitted in the next step. After preparing the data packet, the node returns the data packet to the user requester to meet the user's request.
[0045] S300, in the case of transmitting a data packet, obtaining a first node betweenness of a first node, where the first node is any node in each routing node on a first path.
[0046] Optionally, in a possible implementation, for any first node in each routing node on the first path, a first node betweenness corresponding to the first node is calculated by a node betweenness tool;
[0047] Among them, the shortest path algorithm is used in the routing forwarding process, so in the embodiment of the present application, the node betweenness is used as the basis for the selection point of the cache decision, which can play an important role. Among them, the calculation formula of the node betweenness value is as follows:
[0048]
[0049] Among them, σ st represents the number of shortest paths between two nodes s and t, σ st (n) represents the number of paths from node s to node t passing through node n in region V. In an undirected graph, Bet(n) is normalized by dividing it by n(n-1) / 2 to obtain the corresponding node betweenness.
[0050] S400, when the betweenness of the first node matches the maximum betweenness recorded in the data packet, if the cache space of the first node is full, determine the cache location of the target content based on the first popularity table corresponding to the data packet and the first node.
[0051] Optionally, in a specific implementation of the present application, first, check whether the first node betweenness of the first node matches the maximum betweenness recorded in the data packet. This indicates whether the first node is located at an important position in the network topology. Then check whether the cache space of the first node is full. If the cache space is full, cache replacement is required to make room for storing new content. And determine the target content by checking the content identifier or other relevant information in the data packet.
[0052] Then, the first popularity table corresponding to the first node is used to find the global popularity information of the target content. Based on the global popularity of the target content, the cache location of the target content is determined. Specific decisions may include the following situations: If the global popularity ranking of the target content is in the top 30% (or other predetermined percentages) and the popularity is high enough, the content is cached at the next node to meet the needs of users and minimize request delays. If the target content does not meet the requirements of high popularity, but is of medium popularity (i.e., the popularity is not in the top 30%, and the global popularity of the target content is greater than the minimum popularity threshold), its cache benefit can be calculated. If the cache benefit is high enough (i.e., greater than the preset benefit threshold), it is cached in the previous node of the first node to reduce the load and replacement rate of the core node (i.e., the first node). If the target content is neither highly popular nor of medium popularity, you can choose not to cache it in order to better manage cache resources.
[0053] In these optional embodiments, the cache location of content is optimized based on global popularity and other factors to improve network performance and quality of content caching.
[0054] In a data caching method provided by an embodiment of the present application, in the process of transmitting a first interest packet through a first path, based on the first interest packet, a popularity table corresponding to each routing node on the first path is updated, the popularity table includes global popularity corresponding to multiple transmission contents, the global popularity is used to indicate the frequency of the number of times the transmission content is requested, and the first interest packet includes a content identifier corresponding to the target content; when the first interest packet is transmitted, a data packet corresponding to the content identifier is obtained, and the data includes the target content; when the data packet is transmitted, the first node betweenness of the first node is obtained, and the first node is any one of the routing nodes on the first path; when the first node betweenness matches the maximum betweenness recorded in the data, if the cache space of the first node is full, the cache location of the target content is determined based on the data packet and the first popularity table corresponding to the first node. In the above method, the information in the transmission process of the first interest packet is used to dynamically update the popularity table of the routing node to more accurately reflect the global popularity of the transmission content. This popularity information is used to determine the cache location of the content, thereby improving the accuracy of the cache. And by combining global popularity with node betweenness and cache space status, more intelligent caching decisions can be made, improving the accuracy of data caching and the quality of content caching.
[0055] In one embodiment, the first interest packet includes a popularity field; the above step 100 may specifically perform the following steps:
[0056] S110, in the process of transmitting the interest packet through the first path, when the interest packet is transmitted to the second node, obtaining the local popularity of the target content in the second node, where the second node is a node directly connected to the user terminal, and the second node is the starting point of the first path;
[0057] S120, updating the global popularity of the target content in the second popularity table corresponding to the second node to the local popularity, and updating the popularity field in the first interest packet to the local popularity;
[0058] S130, in the case of transmission to a third node, updating the popularity field of the first interest packet to the current popularity of the target content recorded in the third node, where the third node is a node in each routing node on the first path except the second node;
[0059] S140, obtaining popularity fields in all interest packets matching the content identifier in the third node, where all interest packets include the first interest packet;
[0060] S150, accumulating popularity fields in all interest packets to obtain a first popularity;
[0061] S160: Update the global popularity of the target content in the third popularity table corresponding to the third node to the first popularity.
[0062] Optionally, in a possible implementation of the present application, when the first interest packet is transmitted to the second node (the node directly connected to the user terminal, which is the starting point of the path), the second node can count the local popularity of the target content. Local popularity is a statistical count of the number of requests for the content at the second node, usually within a period of time. Subsequently, the second node updates the global popularity of the target content in the second popularity table and updates it to the local popularity value just obtained. At the same time, the popularity field in the first interest packet is updated to the local popularity value just obtained.
[0063] When the first interest packet is transmitted to a third node (a node on a path other than the second node), the popularity field of the first interest packet is updated by checking the current popularity of the target content recorded in the third node (i.e., the global popularity of the target content calculated last time).
[0064] Then, all interest packages matching the content identifier are obtained from the third node. These interest packages include the first interest package and other interest packages that may pass through the third node and include obtaining the target content. For all matching interest packages, their popularity fields are accumulated to obtain the first popularity. This means that at the third node, the global popularity of the target content is obtained by accumulating the popularity fields of all interest packages passing through this node. Then, the global popularity of the target content in the third popularity table corresponding to the third node is updated to the first popularity just calculated. These steps help nodes estimate the popularity of content more accurately through updates between local popularity and global popularity, thereby making better caching decisions. This can improve the quality of content caching to meet user needs and improve network performance.
[0065] Optionally, in another specific implementation of the present application, as Figure 2 and Figure 3 As shown, the packet structure of the interest packet and the data packet is modified. The newly added Node Value field in the interest packet is used to save the maximum betweenness value of the routing node that this interest packet passes through, the newly added Hop field is used to save the total number of hops of the routing nodes that this interest packet passes through, and the newly added Popu Count field is used to save the global popularity information of this content. The newly added Node Value field and Hop field in the data packet are used to copy the Node Value value and Hop value carried in the interest packet at the hit node (i.e., the end node of the first path).
[0066] Furthermore, the first interest packet carries the initial local popularity information (i.e., the local popularity calculated in the second node) and forwards it to the content source (i.e., the node storing the target content) in the shortest path (i.e., the first path). The intermediate routing node (i.e., the third node) extracts the Popu Count information in the interest packet and accumulates the Popu Count values in the same interest packets gathered from different ports of this node, and finally obtains the global popularity (TotalPopularity, TP) of the content on this node. The global popularity calculated by the real-time updated local popularity also has the real-time nature of the local popularity, and because it aggregates the user requests received from different ports, it is more representative of the requests, and can provide a more reliable basis for the node to make cache decisions. The calculation formula for global popularity is as follows:
[0067] TP i,n (t) = ∑ j∈V PC i,n,j (t)
[0068] Where V represents the set of port links directly connected to this node, PC i,n,j(t) represents the Popu Count value of content i received from port j in node n within period t. The more links this node is connected to, the more important its position in the network topology is, the higher the global popularity that can be aggregated, and the larger the scope of its influence in the network.
[0069] Finally, a content global popularity table can be saved in each routing node. When it is an edge node (i.e., the second node), the global popularity actually saves local popularity information. The node ranks the global popularity of the content. When the cache space is full, it is necessary to determine whether the newly arrived interest packet meets the cache conditions based on the ranking of the content global popularity. The global popularity table of a routing node is shown in Table 1;
[0070] Content Name Global popularity / Musics / book1.rar 423 / Musics / book2.rar 284 / Musics / book3.rar 147 ...... ......
[0071] Table 1 Global popularity record table
[0072] Optionally, in an embodiment of the present application, in order to avoid repeatedly forwarding interest packets for the same request and wasting network resources, the traditional content-centric network routing node will only forward the first received interest packet upward. When there is a subsequent interest packet with the same request, only the content name and port number of the interest packet will be recorded in the pending interest table. New interest packets are filtered out by nodes that have requested the same content, and their upstream nodes can no longer receive new interest packets. As a result, when calculating the global popularity of this content, it is easy to cause content that is not popular in a certain part but is popular in the entire network. The content does not reach the popularity threshold of the node cache content and the cache of this content is abandoned. For nodes in important topological positions in the network, since they have more connected ports, the resulting error impact will be greater. Therefore, in an embodiment of the present application, the method by which nodes handle interest packets of the same content is changed. Before the request data packet (i.e., the data packet of the target content obtained from the node storing the target content and sent to the requesting user) is returned, the routing node still forwards the subsequent interest packets of the same request upward, but only retains the content name (i.e., content identifier) and Popu Count information of the interest packet, thereby obtaining more reliable global popularity information at the upstream node in exchange for a smaller forwarding cost.
[0073] In an embodiment of the present application, statistics on local popularity of content are processed based on a dynamic and reasonable request sequence model, and by exchanging a smaller forwarding cost for upstream nodes to obtain more representative global popularity information, a more reliable caching basis is provided for upstream nodes.
[0074] In these optional embodiments, by acquiring, transmitting and updating the popularity information related to the target content, the node can more accurately understand the local and global popularity of the content. The global popularity of the target content is updated to the first popularity by the third node, which helps the node to more accurately understand the popularity of the target content globally. More accurate popularity information enables the node to make more intelligent cache decisions, thereby improving the quality of content cache. This is beneficial to network performance, can better meet user needs, reduce unnecessary cache and improve the utilization of cache resources.
[0075] In one embodiment, the above step 110 may specifically perform the following steps:
[0076] S111, calculating the local popularity of the target content in the second node based on a first formula, wherein the first formula is:
[0077]
[0078] Among them, LP i,n (t) represents the local popularity of the target content i in the second node n for t cycles, p i,n (t) represents the number of requests for target content i received by the second node n in the tth period, and t is the number of observation periods. is the attenuation factor,
[0079] Optionally, in an embodiment of the present application, an edge node (i.e., a second node) is defined as a routing node directly connected to a user. At this time, the user request record does not undergo routing aggregation, and can directly reflect the status of this node connecting to the user's requested content. Local popularity is defined as the number of content requests counted at the edge node. However, in view of the high dynamics of network request content, only recording the number of requests over a certain period of time in the past has a certain lag and cannot accurately reflect the popularity of the content at the current moment. The exponentially weighted moving average (EWMA) model can be combined to analyze and calculate historical popular data. For a period closer to the current one, the number of requests accounts for a larger proportion of the popularity, and the local popularity (LP) of the current content is more accurately counted. The calculation formula is as follows:
[0080]
[0081] Among them, LP i,n (t) represents the local popularity of content i in node n in recent cycles, p i,n (t) represents the number of requests for content i received by node n in the tth period, and t is the number of observation periods. is the attenuation factor, in the algorithm simulation
[0082] In these optional embodiments, through the EWMA model, the calculation of local popularity takes into account the number of requests in different time periods, making the local popularity more real-time. Compared with simply counting the number of requests, the EWMA model can better capture the popular trend of recent request content, thereby more accurately reflecting the current popularity of the content. The exponential weighting method of the EWMA model can reduce the lag of popularity statistics. The impact of the earlier number of requests on the local popularity gradually decreases, while the newer number of requests has a greater weight, which helps to capture changes in content popularity more quickly.
[0083] And by using the EWMA model, the calculation of local popularity takes into account recent content requests, so it can better adapt to changing content popularity. This is very useful for new content in the network or content with seasonal changes.
[0084] In one embodiment, the first interest packet further includes a node betweenness field (i.e., a Node Value field) and a node hop number field (i.e., a Hop field); after the above step 100, the method may further specifically perform the following steps:
[0085] S101, in a process of transmitting a first interest packet through a first path, for any fourth node in each routing node on the first path, when the packet is transmitted to the fourth node, obtaining a second node betweenness of the fourth node;
[0086] S102, when the second node betweenness is greater than the betweenness field in the first interest packet, updating the node betweenness field of the first interest packet to the second node betweenness;
[0087] S103, increase the node hop number field in the first interest packet by one.
[0088] Optionally, in an embodiment of the present application, during the forwarding process of the interest packet, the forwarding node (i.e., the fourth node) checks the Node Value in the interest packet. When the betweenness of its own node is less than the Node Value, it is not updated and written, so that the maximum betweenness value of the node is always saved in the Node Value field. The Hop field is the number of routing node hops that this interest packet passes through. Each time it passes through a routing node, the number of Hops increases by one, and the initial value defaults to 0. Popu Count is first written by the edge node to count the local popularity information of this content, and in the process of forwarding upward, the global popularity of this content is continuously updated and written by the intermediate forwarding node.
[0089] In these optional embodiments, by comprehensively considering the node betweenness and hop count information, the global popularity calculation more accurately reflects the actual popularity of the content, which will help better guide the cache decision of the node and enable the network to provide content more efficiently.
[0090] In one embodiment, the above step 200 may specifically perform the following steps:
[0091] S210, writing the node intermediate number field and the node hop number field of the first interest packet into the data packet;
[0092] S220, transmitting the data packet through a second path, where the second path is a reverse path of the first path.
[0093] Optionally, in a specific implementation of the present application, as Figure 4 As shown in the figure, the interest packet forwarding process during the user request is as follows:
[0094] Step 201: The routing node receives an interest packet;
[0095] Step 202: Check whether the node has cached content that matches the interest packet.
[0096] Step 203: If there is cached content, the content of the Node Value and Hop fields in the Interest packet is copied to the Data packet and forwarded back to the requesting user. At the same time, since the downstream node may cache this content, the probability of forwarding the content to this node again will be greatly reduced. Therefore, the global popularity of this content can be reduced by a certain proportion so that it can be replaced by content with higher global popularity.
[0097] Step 204: If there is no cached content, check whether the Node Value field value is greater than the node betweenness itself;
[0098] Step 205: If it is not greater than the node betweenness itself, the node betweenness itself is written as Node Value to replace the original value, so that the Node Value field can always store the maximum betweenness value of a node;
[0099] Step 206: If it is not greater than the node's own betweenness, the Hop forwarding number field is increased by 1, and the updated global popularity is written into the Popu Count of the interest packet, so that the interest packet carries the latest global popularity information, providing a reliable basis for the node to make caching decisions;
[0100] Step 207: After the node processes the interest packet, it continues to forward it to the upstream node according to the shortest request path to the content source until a certain routing node can satisfy the request content of the interest packet.
[0101] In these optional embodiments, the node betweenness field and the node hop number field in the first interest packet are written into the data packet, so that these key information can be transmitted along with the transmission of the data packet. This helps the subsequent routing nodes understand important information about the requested content, including the location of the requested content in the network and the number of hops of the propagation path, which can improve the accuracy of cache decisions, thereby improving network performance and user experience.
[0102] In one embodiment, the above step 400 may specifically perform the following steps:
[0103] S410, when the betweenness of the first node matches the maximum betweenness recorded in the data, if the cache space of the first node is full, obtaining the first ranking of the global popularity corresponding to the target content in the first popularity table in the first popularity table;
[0104] S420, when the first ranking is within the first preset ranking range, if the cache space of the fourth node is remaining, cache the target content in the fourth node, the fourth node being the next node of the first node in the second path;
[0105] S430, when the first ranking is within the first preset ranking range, if the cache space of the fourth node is full, delete the transmission content corresponding to the minimum global popularity in the third popularity table corresponding to the fourth node, and cache the target content in the fourth node.
[0106] Optionally, in a specific implementation of the present application, during the process of the data packet returning in the reverse direction along the interest packet path, each time it passes through a routing node, the Hop value is reduced by 1, and the Node Value field value is compared. When it is the same as the betweenness value of its own node, a cache decision is made. When the popularity ranking of this content is in the top 30% of the cache capacity of this node, it is identified as high-popularity content and cached at the next hop node of this node, so that the more popular content will be closer to the requesting user.
[0107] Optionally, in an embodiment of the present application, when the first node betweenness matches the maximum betweenness recorded in the data, this indicates that the node is in a key position in the network and has a high degree of credibility. In this case, if the cache is full, the ranking in the global popularity table is used to determine which content is most likely to be requested. This can improve the accuracy of cache decisions.
[0108] If the ranking of the target content is within the preset ranking range, it can be cached in the fourth node to improve the user request latency and reduce the load on the core nodes. This helps to better utilize cache resources. When the cache of the fourth node is full, the content elimination strategy is adopted to delete the transmission content corresponding to the minimum global popularity in the global popularity table to make room for new content. This helps to ensure that the content in the node cache is always the most valuable and improves the cache quality.
[0109] In one embodiment, the above step 400 may further specifically perform the following steps:
[0110] S440, determining a cache benefit of the target content based on a node hop count field in the data packet when the first ranking is within a second preset ranking range and is greater than a preset ranking threshold;
[0111] S450, when the cache revenue is greater than the revenue threshold, cache the target content in the first node, and delete the transmission content corresponding to the minimum global popularity in the first popularity table of the first node, where the revenue threshold is determined based on the first popularity table;
[0112] S460, when the cache revenue is less than or equal to the revenue threshold, if there is remaining cache space in the fifth node, cache the target content in the fifth node, the fifth node being the previous node of the first node in the second path;
[0113] S470, when the first ranking is within the first preset ranking range, if the cache space of the fifth node is full, delete the transmission content corresponding to the minimum global popularity in the fourth popularity table corresponding to the fifth node, and cache the target content in the fifth node.
[0114] Optionally, in the embodiment of the present application, when the popularity ranking of this content is lower than the minimum popularity threshold of this node, it is not cached; when the popularity of this content is located in the content after 30% of the node cache capacity and is greater than the minimum popularity threshold, it is identified as medium popularity content, and the cache revenue calculation is performed at this time, and the cache revenue value greater than the content ranked at 50% in the cache capacity table is identified as high-revenue content, and the high-revenue content is cached in the node with the maximum betweenness value to meet the needs of more users, otherwise the content is cached in the previous hop node of this node (i.e., the fifth node) to reduce the load and replacement rate of the core node. Among them, the calculation formula of cache revenue is as follows:
[0115] W i (t) = TP i (t)×Hop i ×S i -C i
[0116] Among them, Hop iThe number of hops between this node and the hit node. This value can be obtained from the Hop field in the data packet. i is the forwarding cost of each hop of content i, C i is the caching cost of content i at this node. Usually, the caching cost of content is much smaller than its transmission cost.
[0117] Optionally, in a specific implementation of the present application, as Figure 5 As shown, the example process of the data packet forwarding process is as follows:
[0118] Step 301: The routing node receives a data packet;
[0119] Step 302: Check whether the cache space of the node is full. If there is still some cache space left, in order to ensure the diversity of cached content and to make the content closer to the requesting user, no cache decision is made and step 310 is directly executed;
[0120] Step 303: If the cache space is full, check whether the Node Value in the data packet is consistent with the betweenness of the current node, and whether the current node needs to execute the cache decision;
[0121] Step 304: If the Node Value is inconsistent with the betweenness of the current node, it means that the current node does not need to perform a cache decision, and directly forwards the data packet to the next node in the direction of the user request;
[0122] Step 305: If the Node Value is consistent with the betweenness of the current node, the current node needs to execute the cache decision, first determining whether the content is a highly popular content, that is, the popularity ranking is in the top 30% of the cache capacity;
[0123] Step 306: If the content is highly popular, cache the content at the next node to bring the content closer to the user and reduce the user request latency;
[0124] Step 307: If it is not a high popularity content, then determine whether it is a medium popularity content. If it does not meet the medium popularity requirement, that is, it is a low popularity content, do not cache it, and execute step 304;
[0125] Step 308: If the content is of medium popularity, calculate the cache revenue of the content;
[0126] Step 309: If the content is not high-revenue content, cache the content in the previous node of the current node, so as to meet the content diversity and reduce the cache burden of the core node;
[0127] Step 310: If the content is high-yield content, it is cached at the node with the largest mean value, thereby possibly satisfying more user requests.
[0128] Optionally, in an embodiment of the present application, the edge node periodically counts the request content of users connected to this node, and calculates the local popularity of each content at this node based on historical request records. In the process of returning the data packet, the reference node topology position makes a cache decision judgment on the node with the largest betweenness on the request path. When the content is highly popular, it is directly cached in the next-level node; when it is medium-popular content, the cache location is determined based on the cache revenue of this content; when it is low-popularity, it is not cached to maximize the value of the cache space. By reasonably caching and placing high-popularity and medium-popularity content, the quality of cached content is improved, more requesting users are satisfied, and network transmission overhead is reduced.
[0129] In addition, this application uses edge nodes to count the frequency of user content requests and scientifically predict their changes. In order to prevent the interest packets of the same request from being filtered by routing aggregation, the routing method is changed so that the upstream node can grasp more representative global popularity information of the content, further improving the accuracy of the judgment of cached content. The node topology position is also used to combine content popularity with cache revenue, so that the node with the largest betweenness on the content request path makes cache decisions, caches high-popularity content in the next-level node of this node, caches medium-popularity and medium-high-revenue content in this node, and caches low-revenue nodes in the previous-level node of this node, and does not cache low-popularity content. While controlling the redundancy of node cache content, the quality of cached content is improved, and the cache location of high-popularity content is gradually moved closer to the user to reduce user request latency.
[0130] In these optional embodiments, the cache decision is made by the node with the largest betweenness on the request path, so that the content is distributed and reasonably cached, which can reduce the load of the core node and satisfy as many user requests as possible. The selection of cached content is judged more carefully, and the cache revenue of the content is added to the popularity of the content for auxiliary judgment, so as to ensure that the high-popularity content is closer to the requesting user while satisfying the demand for medium-popularity content, and avoid forwarding the medium-popularity content to a more distant routing node, which consumes more network bandwidth resources.
[0131] Figure 6 A schematic diagram of the structure of a data cache device provided in another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0132] Reference Figure 6 , the data caching device may include:
[0133] An updating module 601 is used to update a popularity table corresponding to each routing node on the first path based on the first interest packet during the transmission of the first interest packet through the first path, wherein the popularity table includes global popularity corresponding to a plurality of transmission contents, and the global popularity is used to indicate the frequency of the number of times the transmission contents are requested, and the first interest packet includes a content identifier corresponding to the target content;
[0134] A first acquisition module 602 is used to acquire a data packet corresponding to the content identifier when the first interest packet is transmitted, where the data packet includes the target content;
[0135] A second acquisition module 603 is used to acquire a first node betweenness of a first node when transmitting a data packet, where the first node is any node in each routing node on the first path;
[0136] The cache module 604 is used to determine the cache location of the target content based on the first popularity table corresponding to the data packet and the first node when the first node betweenness matches the maximum betweenness recorded in the data packet and if the cache space of the first node is full.
[0137] In one embodiment, the first interest packet includes a popularity field; the updating module 601 may include:
[0138] A first acquisition submodule is used to acquire the local popularity of the target content in the second node when the interest packet is transmitted to the second node during the transmission of the interest packet through the first path, where the second node is a node directly connected to the user terminal and the second node is the starting point of the first path;
[0139] A first updating submodule, configured to update the global popularity of the target content in the second popularity table corresponding to the second node to the local popularity, and to update the popularity field in the first interest packet to the local popularity;
[0140] A second updating submodule, configured to update the popularity field of the first interest packet to the current popularity of the target content recorded in the third node when the first interest packet is transmitted to the third node, where the third node is a node in each routing node on the first path except the second node;
[0141] A second acquisition submodule is used to acquire popularity fields in all interest packets matching the content identifier in the third node, where all interest packets include the first interest packet;
[0142] A first calculation submodule, configured to accumulate popularity fields in all interest packets to obtain a first popularity;
[0143] The third updating submodule is configured to update the global popularity of the target content in the third popularity table corresponding to the third node to the first popularity.
[0144] In one embodiment, the first acquisition submodule may include:
[0145] A calculation unit, configured to calculate the local popularity of the target content in the second node based on a first formula, wherein the first formula is:
[0146]
[0147] Among them, LP i,n (t) represents the local popularity of the target content i in the second node n for t cycles, p i,n (t) represents the number of requests for target content i received by the second node n in the tth period, and t is the number of observation periods. is the attenuation factor,
[0148] In one embodiment, the first interest packet further includes a node betweenness field and a node hop number field; the data cache may further include:
[0149] A third acquisition module is used for, in the process of transmitting the first interest packet through the first path, for any fourth node in each routing node on the first path, when the transmission is to the fourth node, acquiring the second node betweenness of the fourth node;
[0150] A second updating module, configured to update the node betweenness field of the first interest packet to the second node betweenness when the second node betweenness is greater than the betweenness field in the first interest packet;
[0151] The first calculation module is used to increase the node hop number field in the first interest packet by one.
[0152] In one embodiment, the first acquisition module 602 may include:
[0153] A fourth updating submodule, used to write the node intermediate number field and the node hop number field of the first interest packet into the data packet;
[0154] The first transmission submodule is used to transmit a data packet through a second path, where the second path is a reverse path of the first path.
[0155] In one embodiment, the cache module 604 may include:
[0156] A third acquisition submodule is used to obtain the first ranking of the global popularity corresponding to the target content in the first popularity table in the case where the betweenness of the first node matches the maximum betweenness recorded in the data and if the cache space of the first node is full;
[0157] A first cache submodule is configured to cache the target content in a fourth node if there is a surplus of cache space in the fourth node when the first ranking is within a first preset ranking range, and the fourth node is a node next to the first node in the second path;
[0158] The second cache submodule is used to delete the transmission content corresponding to the minimum global popularity in the third popularity table corresponding to the fourth node if the cache space of the fourth node is full when the first ranking is within the first preset ranking range, and cache the target content in the fourth node.
[0159] In one embodiment, the cache module 604 may further include:
[0160] A first determination submodule, configured to determine a cache benefit of the target content based on a node hop number field in a data packet when the first ranking is within a second preset ranking range and is greater than a preset ranking threshold;
[0161] A third cache submodule is used to cache the target content in the first node and delete the transmission content corresponding to the minimum global popularity in the first popularity table of the first node when the cache revenue is greater than the revenue threshold, and the revenue threshold is determined based on the first popularity table;
[0162] a fourth cache submodule, configured to cache the target content in the fifth node if there is surplus cache space in the fifth node when the cache revenue is less than or equal to the revenue threshold, the fifth node being the previous node of the first node in the second path;
[0163] The fifth cache submodule is used to delete the transmission content corresponding to the minimum global popularity in the fourth popularity table corresponding to the fifth node if the cache space of the fifth node is full when the first ranking is within the first preset ranking range, and cache the target content in the fifth node.
[0164] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned battery thermal runaway warning method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device. Its specific functions and technical effects can be found in the method embodiment part, which will not be repeated here.
[0165] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0166] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0167] The device may include a processor 701 and a memory 702 storing program instructions.
[0168] When the processor 701 executes the program, the steps in any of the above method embodiments are implemented.
[0169] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 702 and executed by the processor 701 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
[0170] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0171] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.
[0172] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0173] The processor 701 implements any one of the methods in the above embodiments by reading and executing program instructions stored in the memory 702 .
[0174] In one example, the electronic device may further include a communication interface 703 and a bus 710. The processor 701, the memory 702, and the communication interface 703 are connected via the bus 710 and communicate with each other.
[0175] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0176] Bus 710 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 710 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0177] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores program instructions; when the program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.
[0178] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0179] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0180] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0181] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0182] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0183] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0184] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0185] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data caching method, characterized in that: The method comprises: In the process of transmitting the first interest packet through the first path, based on the first interest packet, updating the popularity table corresponding to each routing node on the first path, the popularity table including global popularity corresponding to a plurality of transmission contents, the global popularity being used to indicate the frequency of the number of times the transmission contents are requested, and the first interest packet including the content identifier corresponding to the target content; When the transmission of the first interest packet is completed, obtaining a data packet corresponding to the content identifier, the data packet including the target content; In case of transmitting the data packet, obtaining a first node betweenness of a first node, where the first node is any one of each routing node on the first path; In the case where the first node betweenness matches the maximum betweenness recorded in the data packet, if the cache space of the first node is full, the cache location of the target content is determined based on the first popularity table corresponding to the data packet and the first node.
2. The method according to claim 1, characterized in that: The first interest packet includes a popularity field; In the process of transmitting the first interest packet through the first path, updating the popularity table corresponding to each routing node on the first path based on the first interest packet includes: In the process of transmitting the interest packet through the first path, when the interest packet is transmitted to the second node, obtaining the local popularity of the target content in the second node, where the second node is a node directly connected to the user terminal and the second node is the starting point of the first path; Update the global popularity of the target content in the second popularity table corresponding to the second node to the local popularity, and update the popularity field in the first interest packet to the local popularity; In the case of transmission to a third node, updating the popularity field of the first interest packet to the current popularity of the target content recorded in the third node, the third node being a node in each routing node on the first path except the second node; Obtaining popularity fields in all interest packets matching the content identifier in the third node, wherein all interest packets include the first interest packet; Accumulating the popularity fields in all the interest packets to obtain a first popularity; The global popularity of the target content in the third popularity table corresponding to the third node is updated to the first popularity.
3. The method according to claim 2, characterized in that In the case of transmitting to the second node, obtaining the local popularity of the target content in the second node includes: The local popularity of the target content in the second node is calculated based on a first formula, wherein the first formula is: Among them, LP i,n (t) represents the local popularity of the target content i in the second node n for t cycles, p i,n (t) represents the number of requests for the target content i received by the second node n in the tth period, and t is the number of observation periods. is the attenuation factor, 4. The method according to claim 1, characterized in that: The first interest packet further includes a node betweenness field and a node hop number field; In the process of transmitting the first interest packet through the first path, after updating the popularity table corresponding to each routing node on the first path based on the first interest packet, the method further includes: In the process of transmitting the first interest packet through the first path, for any fourth node in each routing node on the first path, when the packet is transmitted to the fourth node, obtaining the second node betweenness of the fourth node; When the second node betweenness is greater than the betweenness field in the first interest packet, updating the node betweenness field of the first interest packet to the second node betweenness; Increase the node hop count field in the first interest packet by one.
5. The method according to claim 4, characterized in that The acquiring, when the transmission of the first interest packet is completed, a data packet corresponding to the content identifier includes: Writing the node intermediate number field and the node hop number field of the first interest packet into the data packet; In the case where the transmission of the first interest packet is completed, after obtaining the data packet corresponding to the content identifier, the method further includes: The data packet is transmitted via a second path, where the second path is a reverse path of the first path.
6. The method according to claim 5, characterized in that In the case where the betweenness of the first node matches the maximum betweenness recorded in the data, if the cache space of the first node is full, determining the cache location of the target content based on the first popularity table corresponding to the data packet and the first node, includes: In the case where the betweenness of the first node matches the maximum betweenness recorded in the data, if the cache space of the first node is full, obtaining the first ranking of the global popularity corresponding to the target content in the first popularity table in the first popularity table; In the case where the first ranking is within a first preset ranking range, if there is remaining cache space in a fourth node, the target content is cached in the fourth node, and the fourth node is a next node of the first node in the second path; When the first ranking is within the first preset ranking range, if the cache space of the fourth node is full, the transmission content corresponding to the minimum global popularity in the third popularity table corresponding to the fourth node is deleted, and the target content is cached in the fourth node.
7. The method according to claim 6, characterized in that In the case where the betweenness of the first node matches the maximum betweenness recorded in the data, if the cache space of the first node is full, determining the cache location of the target content based on the first popularity table corresponding to the data packet and the first node, further comprising: When the first ranking is within a second preset ranking range and is greater than a preset ranking threshold, determining a cache benefit of the target content based on a node hop number field in the data packet; When the cache revenue is greater than a revenue threshold, cache the target content in the first node, and delete the transmission content corresponding to the minimum global popularity in the first popularity table of the first node, where the revenue threshold is determined based on the first popularity table; In the case where the cache revenue is less than or equal to the revenue threshold, if there is remaining cache space in the fifth node, the target content is cached in the fifth node, and the fifth node is a previous node of the first node in the second path; When the first ranking is within the first preset ranking range, if the cache space of the fifth node is full, the transmission content corresponding to the minimum global popularity in the fourth popularity table corresponding to the fifth node is deleted, and the target content is cached in the fifth node.
8. A data cache device, characterized in that: The device comprises: an updating module, configured to update, in a process of transmitting a first interest packet through a first path, a popularity table corresponding to each routing node on the first path based on the first interest packet, the popularity table including global popularity corresponding to a plurality of transmission contents, the global popularity being used to indicate a frequency of requests for the transmission contents, the first interest packet including a content identifier corresponding to a target content; A first acquisition module, configured to acquire a data packet corresponding to the content identifier when the transmission of the first interest packet is completed, wherein the data packet includes the target content; A second acquisition module is used to acquire a first node betweenness of a first node when transmitting the data packet, where the first node is any node in each routing node on the first path; A cache module is used to determine the cache location of the target content based on the first popularity table corresponding to the data packet and the first node when the first node betweenness matches the maximum betweenness recorded in the data packet and if the cache space of the first node is full.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data caching method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data caching method according to any one of claims 1 to 7 is implemented.
