Method and apparatus for determining cache node, electronic device and storage medium
By evaluating node information using a random walk algorithm, determining caching probabilities, and optimizing cache nodes, this approach solves the problem of low caching efficiency in dynamic network environments using traditional caching strategies. It enables fast and flexible storage of cached content, improving user experience and network performance.
Patent Information
- Application Number
- CN202410597554.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-05-14
AI Technical Summary
In existing technologies, traditional caching strategies cannot flexibly store cached content in dynamic network environments, resulting in decreased caching efficiency and insufficient stability of device nodes, making them unable to adapt to changes in device node mobility and network connectivity.
A random walk algorithm is used to evaluate node information. By obtaining the request content and node attributes, the caching probability is determined, and the most suitable cache node is selected for content storage. The node evaluation is combined with the cache hit rate and energy consumption optimization objective function.
It enables rapid and flexible adjustment of cache nodes in dynamic network environments, improving caching efficiency and user experience, ensuring reliable access to content, and enhancing network performance.
Smart Images

Figure CN118488109B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of content caching, and in particular to a method and device for determining a caching node, an electronic device and a storage medium. BACKGROUND
[0002] With the popularity of intelligent devices, smart home networks have become an important part of daily life.
[0003] For smart home network services, the mobility of devices and changes in network conditions have a significant impact on the stability and efficiency of the caching system. In the prior art, traditional node caching strategies are usually used in static network environments, which can only cache content according to the set device nodes, and cannot flexibly store the content that needs to be cached, and there is no dynamicity.
[0004] Therefore, when the network connection between the device nodes changes or the device nodes have mobility, the traditional fixed caching method cannot effectively adapt to the dynamic changes of the device nodes and does not perform effective caching content allocation in a timely manner, thereby causing the caching content to be invalid or the caching efficiency to be reduced, and the stability of the device nodes cannot be guaranteed. SUMMARY
[0005] The present application provides a method and device for determining a caching node, an electronic device and a storage medium, which solves the problem of the prior art that the content that needs to be cached cannot be flexibly stored, and realizes the rapid evaluation of node information according to the caching content, timely adjustment of the determination of the caching node, placement of the caching content, reduction of network congestion, and improvement of the caching efficiency and user experience.
[0006] The present application provides a method for determining a caching node, comprising:
[0007] obtaining a request content;
[0008] obtaining node information according to the request content; wherein the node information comprises first node information corresponding to an initial request initiating node and second node information corresponding to a candidate node, the first node information is used to represent the node attribute of the initial request initiating node, the second node information is used to represent the node attribute of the candidate node, the initial request initiating node is a node that receives the request content, and the candidate node is a node other than the initial request initiating node in the network environment;
[0009] determining a caching probability according to the node information and a random walk algorithm; wherein the caching probability is a set of one-to-one sub-caching probabilities of all candidate nodes;
[0010] determining a caching node according to the caching probability; wherein the caching node is used to cache the request content.
[0011] According to the method for determining the cache placement node, the first node information comprises a first request number and a second request number, the first request number is a mutual request number between the initial request initiating node and the candidate node, and the second request number is a number of requests for common content between the initial request initiating node and the candidate node; the second node information comprises a node network centrality and a node moving speed; the cache probability is determined according to the node information and a random walk algorithm, comprising: determining a weight parameter; wherein the weight parameter is used to represent the association strength between the initial request initiating node and the candidate node; determining a target weight according to the first request number, the second request number, the node network centrality, the node moving speed, the weight parameter and a moving speed threshold value; wherein the moving speed threshold value is the maximum moving speed in the moving speed of the initial request initiating node and the candidate node; and determining the cache probability according to the target weight and the random walk algorithm.
[0012] According to the method for determining the cache placement node, the cache probability is determined according to the target weight and the random walk algorithm, comprising: performing random walk according to the target weight and the random walk algorithm until all candidate nodes are walked, determining all walk probabilities in the walking process of the candidate nodes; determining a sub-cache probability of the candidate node according to the sum of all walk probabilities; and determining the cache probability of the candidate node according to a set of sub-cache probabilities corresponding to all candidate nodes.
[0013] According to the method for determining the cache placement node, the cache node is determined according to the cache probability, comprising: determining a target cache probability according to the maximum value of the cache probability; and determining the cache node according to the target cache probability.
[0014] According to the method for determining the cache placement node, after the cache node is determined according to the cache probability, the method further comprises: obtaining a first node parameter of the cache node; determining an evaluation index of the cache node according to the first node parameter and a second node parameter of the initial request initiating node; determining a target function according to the evaluation index; and determining an evaluation result according to the target function.
[0015] According to the method for determining the cache placement node, the first node parameter comprises a transmission time between the initial request initiating node and the cache node, the second node parameter comprises a probability of caching the request content at the initial request initiating node and a probability of the request content being within the communication range of the initial request initiating node; the evaluation index comprises a cache hit rate and an average energy consumption; wherein the cache hit rate represents the probability of caching the request content at the initial request initiating node, μ represents the initial request initiating node, and f represents the cache node, c represents local caching, t μ,frepresents a connection valid time between an initial request initiation node and a cache node, l represents a transmission delay, represents a probability that a request content is within a communication range of an initial request initiation node; average energy consumption represents a transmission power for transmission through a first transmission mode, r represents a sending distance, d represents a transmission mode, and tau d represents a transmission time, represents a transmission power for transmission through a second transmission mode, represents a probability for transmission through the second transmission mode.
[0016] According to the application, a determination method of a cache placement node is provided, and a target function U μ,f = beta * (1-H) + (1-beta) * E μ,f / E max wherein beta represents an adjustment parameter, H represents a cache hit rate, E μ,f represents average energy consumption, E max represents maximum energy consumption of a request content.
[0017] The application further provides a determination device of a cache node, which comprises:
[0018] a content acquisition module, configured to acquire a request content;
[0019] an information acquisition module, configured to acquire node information according to the request content; wherein the node information comprises first node information corresponding to an initial request initiation node and second node information corresponding to a candidate node, the first node information is used for representing node attributes of the initial request initiation node, the second node information is used for representing node attributes of the candidate node, the initial request initiation node is a node receiving the request content, and the candidate node is a node other than the initial request initiation node in a network environment;
[0020] a probability determination module, configured to determine a cache probability according to the node information and a random walk algorithm; wherein the cache probability is a set of one-to-one corresponding sub-cache probabilities of all candidate nodes;
[0021] a node determination module, configured to determine a cache node according to the cache probability; wherein the cache node is used for caching the request content.
[0022] The application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the determination method of the cache node as described above when executing the program.
[0023] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement any of the above methods for determining a cache node.
[0024] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement any of the above methods for determining a cache node.
[0025] The application provides a method, device and electronic equipment for determining a cache node, and a storage medium. The method comprises the following steps: obtaining request content; obtaining node information according to the request content; wherein the node information comprises first node information corresponding to an initial request initiating node and second node information corresponding to a candidate node, the first node information is used to represent the node attribute of the initial request initiating node, the second node information is used to represent the node attribute of the candidate node, the initial request initiating node is a node that receives the request content, and the candidate node is a node other than the initial request initiating node in a network environment; determining a cache probability according to the node information and a random walk algorithm; wherein the cache probability is a set of one-to-one corresponding sub-cache probabilities of all candidate nodes; determining a cache node according to the cache probability; and the cache node is used to cache the request content. The technical scheme of the application can obtain node information in time after obtaining cache content, and can perform walk evaluation according to the node information by using a random walk algorithm, so as to determine a cache node suitable for storing the cache content, solve the defect that the content to be cached cannot be flexibly stored in the prior art, realize rapid evaluation of a node according to cache content, timely adjustment and determination of a cache node, improve cache efficiency, and improve user experience. BRIEF DESCRIPTION OF DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0027] Figure 1 is one of the flowcharts of the method for determining a cache node provided by the present application;
[0028] Figure 2 is the second flowchart of the method for determining a cache node provided by the present application;
[0029] Figure 3 is the structural schematic diagram of the device for determining a cache node provided by the present application;
[0030] Figure 4 is the structural schematic diagram of the electronic equipment provided by the present application. DETAILED DESCRIPTION
[0031] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0032] It should be noted that the serial numbers of the described objects in the present application, such as "first", "second" and the like, are only used to distinguish the described objects, and do not have any sequence or technical meaning.
[0033] The technical solutions in the present application will be described below with reference to the drawings in the present application. Figures 1-2 The determination method of the cache node provided by the present application will be described, Figure 1 is one of the flowcharts of the determination method of the cache node provided by the present application. The determination method of the cache node provided by the present application can be applied to the storage condition of the cached content in a network environment. The execution subject of the present method can be an electronic device, or a determination device of the cache node arranged in the electronic device. The determination device of the cache node can be realized by software, hardware or a combination of both. As shown in the figure, the determination method of the cache node comprises steps 101 to 104. Figure 1
[0034] Step 101, obtaining a request content.
[0035] In the present step, the request content refers to the content information randomly accessed by a user to different devices received by an initial request initiating node. The request content mainly comprises the memory size occupied by the content, and the present embodiment does not limit the same.
[0036] Specifically, the initial request initiating node receives a request indication, the request indication is used to indicate the specific request content, the corresponding request content is obtained according to the request indication, and the memory size occupied by the content is determined.
[0037] Step 102, obtaining node information according to the request content.
[0038] In the present step, the node information comprises first node information corresponding to the initial request initiating node and second node information corresponding to a candidate node. The first node information is used to represent the node attribute of the initial request initiating node, and the second node information is used to represent the node attribute of the candidate node. The initial request initiating node is the node receiving the request content, and the candidate node is other node in the network environment except the initial request initiating node.
[0039] The first node information specifically includes an Internet Protocol (IP) of the initial request initiating node, a name of the initial request initiating node, a node performance of the initial request initiating node, a storage space of the initial request initiating node, a network connection status of the initial request initiating node, a power condition of the initial request initiating node, an energy consumption condition of the initial request initiating node, and a moving speed of the initial request initiating node. The second node information specifically includes an IP of the candidate node, a name of the candidate node, a node performance of the candidate node, a storage space of the candidate node, a network connection status of the candidate node, a power condition of the candidate node, an energy consumption condition of the candidate node, and a moving speed of the candidate node. The embodiments are not limited in this regard.
[0040] The first node information further includes a first request number and a second request number. The first request number is a mutual request number between the initial request initiating node and the candidate node. The second request number is a number of requests for common content between the initial request initiating node and the candidate node. The request for common content refers to that the request content of the initial request initiating node is consistent with the request content of the candidate node. The second node information includes a node network centrality and a node moving speed. The node network centrality refers to a network complexity of the node. The node moving speed refers to a speed of displacement of the node in a specific direction, with a distance moved by the node in a unit time as an evaluation index.
[0041] Specifically, after the request content is determined, the first node information of the initial request initiating node, i.e., the IP of the initial request initiating node, the name of the initial request initiating node, the node performance of the initial request initiating node, the storage space of the initial request initiating node, the network connection status of the initial request initiating node, the power condition of the initial request initiating node, the energy consumption condition of the initial request initiating node, and the moving speed of the candidate node, and the second node information of the candidate node, i.e., the IP of the candidate node, the name of the candidate node, the node performance of the candidate node, the storage space of the candidate node, the network connection status of the candidate node, the power condition of the candidate node, the energy consumption condition of the candidate node, and the moving speed of the candidate node, are obtained according to a memory size required to be occupied by the request content.
[0042] In step 103, a cache probability is determined according to the node information and a random walk algorithm.
[0043] In this step, the cache probability is a set of sub-cache probabilities corresponding to all candidate nodes. The candidate nodes are at least one node.
[0044] Specifically, after the node information is obtained, a random walk is performed from the initial request initiating node according to the node information and the random walk algorithm, a plurality of walk probabilities of all candidate nodes are determined respectively, the plurality of walk probabilities of the candidate nodes are superimposed to determine a sub-cache probability of the candidate node, and the set of sub-cache probabilities of all candidate nodes is determined as the cache probability.
[0045] In an embodiment, the cache probability is determined according to the node information and the random walk algorithm, and can be realized by the following manner:
[0046] Determine a weight parameter; determine a target weight according to the first request number, the second request number, the node network centrality, the node moving speed, the weight parameter and the moving speed threshold; determine the cache probability according to the target weight and the random walk algorithm.
[0047] Specifically, first, after determining the node information, the weight parameter is determined by optimization and solving according to the particle swarm algorithm, and the initial value of the weight parameter can be randomly generated. Then, the target weight is determined according to the mutual request number between the initial request initiating node and the candidate node in the node information, the number of requesting common content between the initial request initiating node and the candidate node, the node network centrality of the candidate node, the node moving speed of the candidate node, the weight parameter and the moving speed threshold. The target weight Weight μ,v = x1i1+ x2i2+ x3i3+ x4(V max -V v ), wherein μ represents the initial request initiating node, v represents the candidate node, x1, x2, x3 and x4 are pre-set weight parameters, i1 represents the mutual request number between the initial request initiating node and the candidate node, i2 represents the number of requesting common content between the initial request initiating node and the candidate node, i3 represents the node network centrality of the candidate node, V max represents the moving speed threshold, i.e. the maximum speed of the initial request initiating node and all candidate nodes in the network environment, and V v represents the moving speed of the candidate node. After determining the target weight, the target weights of all candidate nodes are added one by one to determine the weight sum, and the ratio of the target weight of any candidate node to the weight sum is calculated respectively, so as to determine the sub-cache probability corresponding to each candidate node respectively, determine the maximum value of all sub-cache probabilities, take the maximum value of the sub-cache probability as a constant coefficient, take the candidate node corresponding to the maximum value of the sub-cache probability as a new starting node, determine the connection relevance between the candidate node and the remaining candidate nodes and the initial request initiating node, update the weight parameter, and re-calculate the target weight. According to the target weight and the random walk algorithm, the random walk is performed until all candidate nodes are walked, all walking probabilities in the walking process of the candidate nodes are determined, and so on. All candidate nodes are walked, and finally the relevance and interaction intensity of the initial request initiating node and all candidate nodes are calculated. According to the sum of all walking probabilities, the sub-cache probability of the candidate node is determined. Finally, the cache probability of the candidate node is determined according to the set of the sub-cache probability corresponding to each candidate node.
[0048] Step 104, determine the cache node according to the cache probability.
[0049] In this step, the cache node is used to cache the request content.
[0050] Specifically, after determining the cache probability of the candidate node, the cache node is determined according to the cache probability.
[0051] In an embodiment, the cache node is determined according to the cache probability, and specifically, the determination can be realized by the following way:
[0052] The target cache probability is determined according to the maximum value of the cache probability, and the cache node is determined according to the target cache probability.
[0053] In this step, the target cache probability is the maximum cache probability of all sub-cache probabilities corresponding to the meaning of the candidate node in the cache probability, and the cache node is the candidate node corresponding to the target cache probability.
[0054] Specifically, after determining the cache probability, the maximum sub-cache probability in the cache probability is determined as the target cache probability, and the candidate node corresponding to the maximum sub-cache probability is determined as the cache node.
[0055] The application provides a cache node determination method, device, electronic equipment and storage medium, which acquires request content, acquires node information according to the request content, wherein the node information includes first node information corresponding to an initial request initiation node and second node information corresponding to a candidate node, the first node information is used to represent the node attribute of the initial request initiation node, the second node information is used to represent the node attribute of the candidate node, the initial request initiation node is a node receiving the request content, and the candidate node is other node in the network environment except the initial request initiation node, the cache probability is determined according to the node information and the random walk algorithm, wherein the cache probability is a set of all sub-cache probabilities corresponding to the candidate node, and the cache node is determined according to the cache probability, wherein the cache node is used to cache the request content. The technical scheme of the application acquires node information in time after acquiring cache content, evaluates the node information, determines the cache node suitable for storing the cache content, solves the defect that the content needing to be cached cannot be stored flexibly in the prior art, realizes the quick evaluation of the node according to the cache content, timely adjusts and determines the cache node, improves the cache efficiency, and improves the user experience.
[0056] Figure 2 It is a flowchart of the cache node determination method provided by the application, and the cache node determination method provided by the application can be applied to the storage of the cache content in the network environment. The execution subject of the method can be an electronic equipment or a cache node determination device arranged in the electronic equipment. The cache node determination device can be realized by software, hardware or a combination of the two. Further, the cache node determination method according to the cache probability and the optimization after the cache node determination according to the cache probability are as shown in the following figure: Figure 2 The cache node determination method includes steps 201 to 209.
[0057] Step 201, acquire request content.
[0058] Specifically, the initial request initiating node receives a request indication, acquires corresponding request content according to the request indication, and determines the memory size of the node required by the content.
[0059] Step 202, acquire node information according to the request content.
[0060] Specifically, after determining the request content, the first node information of the initial request initiating node and the second node information of the candidate node are acquired according to the memory size of the node required by the request content.
[0061] Step 203, determine the cache probability according to the node information and the random walk algorithm.
[0062] Specifically, after acquiring the node information, the random walk algorithm is used to start from the initial request initiating node to determine multiple walk probabilities of all candidate nodes, superimpose the multiple walk probabilities of the candidate nodes to determine the sub-cache probability of the candidate node, and determine the set of sub-cache probabilities of all candidate nodes as the cache probability.
[0063] The advantage of such setting is that when the node moves or the network condition changes, the node can be evaluated in real time through the random walk algorithm, and the node that can cache the request content can be adjusted to ensure effective caching of the request content, and on the basis of effective caching of the request content, the user can effectively and quickly access the request content regardless of the location, improving the network performance and improving the user experience.
[0064] Step 204, determine the target cache probability according to the maximum value of the cache probability.
[0065] In this step, the target cache probability is the maximum cache probability of the sub-cache probability corresponding to all candidate nodes in the cache probability.
[0066] Specifically, after determining the cache probability, the maximum sub-cache probability in the cache probability is determined as the target cache probability according to the determined sub-cache probability of all candidate nodes.
[0067] Step 205, determine the cache node according to the target cache probability.
[0068] In this step, the cache node is the candidate node corresponding to the target cache probability.
[0069] Specifically, after determining the target cache probability, the candidate node corresponding to the target cache probability is taken as the cache node to cache the request content.
[0070] Step 206: Obtain the first node parameter of the cache node.
[0071] In this step, the first node parameter includes the transmission time between the initial request initiating node and the cache node, and the second node parameter includes the probability that the request content is cached at the initial request initiating node and the probability that the request content is within the communication range of the initial request initiating node.
[0072] Specifically, after determining the cache node, the transmission time between the initial request initiating node and the cache node, as well as the probability that the request content is cached at the initial request initiating node and the probability that the request content is within the communication range of the initial request initiating node are obtained based on the determined cache node.
[0073] Step 207: Determine the evaluation metrics of the cache node based on the parameters of the first node and the parameters of the second node of the initial request initiating node.
[0074] In this step, the evaluation metrics include cache hit rate and average power consumption; among them, cache hit rate... This represents the probability that the requested content is cached in the node that initiated the initial request, where μ represents the node that initiated the initial request and f represents the cache node. c Indicates local cache, t μ,f This indicates the effective connection time between the initial request initiating node and the cache node, where l represents the transmission delay. Indicates the probability that the requested content is within the communication range of the node that initially initiated the request; average energy consumption. The transmission power is represented by the first transmission method, r represents the transmission distance, d represents the transmission method, and τ represents the transmission power. d Indicates transmission time. This indicates the transmission power transmitted via the second transmission method. This indicates the probability of transmission via the second transmission method.
[0075] Specifically, when calculating the cache hit rate as an evaluation metric, it is first necessary to construct a system model corresponding to the network environment. In a dynamic network environment, the node set M = {μ1, μ2, μ3, ..., μ...} is determined. D} where μ represents all existing nodes, with subscripts 1, 2, 3, ..., and D represents the number of nodes, where D is a positive integer greater than or equal to 2. Then, the positions of all nodes are modeled as independent and identically distributed Poisson point processes PPPsφ. μ It has a spatial density λ μThis model predicts the probability distribution of node occurrences within any specific region B. This modeling considers the dynamic nature of the smart home network environment, allowing nodes to freely enter and leave the network, thus reflecting real-world node usage and movement patterns. In this model, nodes are treated as entities capable of simultaneously sending and receiving data, simulating the versatility of modern smart home devices. Furthermore, it assumes that each node can independently and randomly request services and become a receiver. The model also considers the number of all candidate nodes within a certain communication range of the initial requesting node. N represents the communication range of the initial request initiating node, B represents the area of the two-dimensional plane within the communication range in the network environment, and the Poisson point process gives the probability of n Poisson points appearing in a certain two-dimensional plane, where n is the number of Poisson points, n is a positive integer, and λ is the spatial density. Regarding the request content, assume there is a total content library F containing F content. F = {1, 2, ..., F}, where the content sizes of items 1-F are all the same and each item has a size of K. The probability that content F is cached by the node is P. F This forms a probability vector P = (P1, P2, ..., P...). F )∈[0,1] 1×F Each node can independently and randomly determine its own request content. The probability vector P represents the node's personalized cache, which can be dynamically adjusted based on the node's historical behavior. Furthermore, during the request content stage, the node's request content needs to be recorded, the initial request initiating node and its corresponding request content determined, and then the location for sending the request, PPPsφ, is determined based on the displacement theorem and the wireless mobility model. μ Therefore, in the stage of retrieving the requested content, in the first case, the cache hit rate of the requested content cached at the node that initially initiated the request is... This represents the probability that the requested content is cached in the node that initiated the initial request, where μ represents the node that initiated the initial request and f represents the cache node. c Indicates local cache, ω μ This represents the historical interaction data of the node that initiated the initial request, where M represents the set of all nodes in the network environment, i.e., the node that initiated the initial request and all candidate nodes. In the second case, the cache hit rate of the cached nodes for the requested content within the device-to-device communication range of the node that initiated the initial request is... μ represents the node initiating the initial request, f represents the cache node, N is the communication range of the node initiating the initial request, B is the area of the two-dimensional plane within the communication range in the network environment, and n is the number of Poisson points. In the third case, the cache hit rate when transmitting via a router is...
[0076] determining the connection valid time t between the initial request originating node and the cache node μ,f Since deployment and request events only occur when two mobile nodes interact, in considering the impact of mobility on distributed caching, in this scheme, a network environment is considered in which an initial request originating node is located at the origin of coordinates and other candidate nodes move relative to the initial request originating node. Only when these candidate nodes enter the communication range of the initial request originating node, deployment and request events can occur. In this case, if a candidate node enters the communication range of the initial request originating node and remains for a period of time, a direct device-to-device link can be established between the candidate node and the initial request originating node and the active connection is maintained during this period of time. In order to simplify the model and focus on the main impact of mobility, it is assumed that the nodes other than the initial request originating node move in a random direction and speed within the duration, with the speed range being [0, V max ]. Specifically, any general node can be at any position within the circular area centered on the initial request originating and with a radius R d . Although this does not describe the full complexity of user movement in a two-dimensional plane, it provides a basis for simulating node mobility and its impact on device-to-device link establishment and duration. This approach allows the overall impact of node mobility on content deployment and access to be analyzed without considering individual motion details. The connection valid time t μ,f between the initial request originating node and the candidate node in the device-to-device communication range is a random variable reflecting the residence time of the initial request originating node in the direct communication range of the candidate node, which is influenced by many factors, such as the movement speed of the initial request originating node and the relative movement direction and relative movement speed between the initial request originating node and the candidate node, and the connection valid time is crucial for determining which candidate node should cache the requested content. According to the above, the distance between the initial request originating node and the candidate node is obtained, and a candidate node is randomly selected within the circle with the initial request originating node as the center and the communication range as the radius, the distance r μ,f from the initial request originating node to the candidate node is calculated, then the area S d of the circle with the communication range as the radius is calculated, and the expected value E between the initial request originating node and the candidate node is determined, where r μ,f represents the distance from the candidate node to the initial request originating node, and S d represents the area of the circle with the communication range as the radius. Further, the connection valid time t v fThe moving speed of the candidate node.
[0077] In determining the transmission delay l, l=κ / v, wherein the transmission delay l represents the time required for transmitting a certain amount of data, which depends not only on the amount of data but also on network conditions, κ represents the amount of data in the transmission process, and v represents the transmission rate of data in the transmission process, which is a key indicator for measuring user experience and is jointly affected by channel bandwidth, transmission power, and channel gain. Transmission rate wherein W represents the channel bandwidth, a represents the transmission power, h represents the channel gain, σ 2 represents Gaussian white noise, which is a basic factor in a communication system. In a networked smart home network environment, Gaussian white noise may be caused by electromagnetic interference of each node, which affects the clarity of the signal and thus directly affects the quality and reliability of node data transmission. Channel gain h=h'α, which is mainly affected by two aspects: the first aspect is the large-scale path loss of the path loss index α, and the second aspect is the small-scale Rayleigh fading with unit mean. These assumptions ensure that the model can accurately reflect the propagation characteristics of signals in the real world. The path loss index α is closely related to the signal propagation environment, such as indoor and outdoor environmental structure, wall material, etc. The small-scale Rayleigh fading describes the rapid random variation of signal strength due to multi-path propagation, which is independently and identically distributed at different links and times. Further, the initial channel gain A d represents the antenna gain, f c represents the carrier frequency, d i represents the distance between the transmitting and receiving ends, d e represents the path loss index.
[0078] In determining the average energy consumption P r d represents the transmission power for transmission through the first transmission mode, r represents the transmission distance, d represents the transmission mode, τ d represents the transmission time, P r b represents the transmission power for transmission through the second transmission mode, represents the probability of transmission through the second transmission mode.
[0079] Step 208, determining the objective function according to the evaluation index.
[0080] In this step, the objective function U μ,f =β(1-H)+(1-β)E μ,f / E max wherein β represents an adjustment parameter, H is the cache hit rate, and Eμ,f E represents the average energy consumption, E max E represents the maximum energy consumption of the content requested once.
[0081] Specifically, after determining the evaluation index cache hit rate H and the average energy consumption E , the objective function U μ,f is determined according to the cache hit rate H and the average energy consumption E μ,f = β(1-H) + (1-β)E μ,f / E max , wherein β represents an adjustment parameter, H is the cache hit rate, E μ,f represents the average energy consumption, E max represents the maximum energy consumption of the content requested once.
[0082] Step 209, determining the evaluation result according to the objective function.
[0083] In this step, after determining the objective function, the cache nodes that cache the requested content are optimized considering the mobility constraints of the cache nodes that cache the requested content. Specifically, a model can be established as follows X U represents the cache node, U μ,f represents the objective function, and the constraint condition of the model is 0≤H≤1, 0≤β≤1, μ∈M, f∈F. If it is determined that the objective function meets a preset threshold, it is determined that the evaluation index of the cache node meets the demand of the requested content; if it is determined that the objective function does not meet the preset threshold, it is determined that the evaluation index of the cache node does not meet the demand of the requested content. The preset threshold is a preset function threshold for judging the objective function.
[0084] This invention provides a method, apparatus, electronic device, and storage medium for determining cache nodes. The method involves: obtaining request content; obtaining node information based on the request content; wherein the node information includes first node information corresponding to the initial request initiating node and second node information corresponding to candidate nodes, the first node information representing the node attributes of the initial request initiating node, and the second node information representing the node attributes of the candidate nodes; the initial request initiating node being the node that received the request content, and the candidate nodes being other nodes in the network environment besides the initial request initiating node; determining a cache probability based on the node information and a random walk algorithm; wherein the cache probability is the set of sub-cache probabilities corresponding to all candidate nodes; determining a cache node based on the cache probability; wherein the cache node is used to cache the request content; obtaining first node parameters of the cache node; determining an evaluation index for the cache node based on the first node parameters and the second node parameters of the initial request initiating node; determining an objective function based on the evaluation index; and determining an evaluation result based on the objective function. The technical solution of this invention, after obtaining cached content, promptly acquires node information and evaluates the node information to determine cache nodes suitable for storing the cached content. Furthermore, after determining the cache nodes, it establishes a model to determine the evaluation indicators of the cache nodes, determines the objective function based on the evaluation indicators, and evaluates whether the cache nodes meet the caching requirements of the requested content based on the objective function. This solves the defect in the prior art that it cannot flexibly store the content that needs to be cached, realizes the rapid evaluation of nodes based on cached content, timely adjustment and determination of cache nodes, improves caching efficiency, and enhances the user experience.
[0085] The cache node determination apparatus provided by the present invention will be described below. The cache node determination apparatus described below can be referred to in correspondence with the cache node determination method described above.
[0086] Figure 3 This is a schematic diagram of the structure of the cache node determination device provided by the present invention, with reference to... Figure 3 As shown, the cache node determination device 300 includes: a content acquisition module 301, an information acquisition module 302, a probability determination module 303, and a node determination module 304; wherein,
[0087] Content acquisition module 301 is used to acquire the requested content;
[0088] The information acquisition module 302 is used to acquire node information based on the request content; wherein, the node information includes first node information corresponding to the initial request initiating node and second node information corresponding to the candidate node. The first node information is used to represent the node attributes of the initial request initiating node, and the second node information is used to represent the node attributes of the candidate node. The initial request initiating node is the node that receives the request content, and the candidate node is other nodes in the network environment other than the initial request initiating node.
[0089] a probability determination module 303, configured to determine a cache probability according to the node information and a random walk algorithm; the cache probability is a set of sub-cache probabilities corresponding to all candidate nodes;
[0090] a node determination module 304, configured to determine a cache node according to the cache probability; the cache node is used to cache a requested content.
[0091] In an example embodiment, the first node information includes a first request frequency and a second request frequency; the first request frequency is a mutual request frequency between the initial request initiating node and the candidate node; the second request frequency is a frequency of requesting a common content between the initial request initiating node and the candidate node; and the second node information includes a node network centrality and a node moving speed.
[0092] In an example embodiment, the probability determination module 303 is specifically configured to:
[0093] determine a weight parameter; the weight parameter is used to represent an association strength between the initial request initiating node and the candidate node;
[0094] determine a target weight according to the first request frequency, the second request frequency, the node network centrality, the node moving speed, the weight parameter, and a moving speed threshold; the moving speed threshold is a maximum moving speed of the initial request initiating node and the candidate node;
[0095] determine the cache probability according to the target weight and the random walk algorithm.
[0096] In an example embodiment, the probability determination module 303 is specifically configured to determine the cache probability according to the target weight and the random walk algorithm.
[0097] perform random walk according to the target weight and the random walk algorithm until all candidate nodes are walked, to determine all walk probabilities in a walk process of the candidate nodes;
[0098] determine a sub-cache probability of the candidate node according to a sum of the all walk probabilities;
[0099] determine the cache probability of the candidate node according to a set of the sub-cache probabilities corresponding to all candidate nodes.
[0100] In an example embodiment, the node determination module 304 is specifically configured to:
[0101] determine a target cache probability according to a maximum value of the cache probability;
[0102] determine the cache node according to the target cache probability.
[0103] In an example embodiment, the apparatus further comprises a node evaluation module. After determining the cache node according to the cache probability, the node evaluation module is configured to:
[0104] obtain a first node parameter of the cache node;
[0105] determine an evaluation index of the cache node according to the first node parameter and a second node parameter of the initial request initiating node;
[0106] determine a target function according to the evaluation index;
[0107] determine an evaluation result according to the target function.
[0108] In an example embodiment, the first node parameter comprises a transmission time between the initial request initiating node and the cache node, the second node parameter comprises a probability that the request content is cached in the initial request initiating node and a probability that the request content is within a communication range of the initial request initiating node; the evaluation index comprises a cache hit rate and an average energy consumption; wherein,
[0109] the cache hit rate represents the probability that the request content is cached in the initial request initiating node, μ represents the initial request initiating node, and f represents the cache node, c represents the local cache, t μ,f represents a connection valid time between the initial request initiating node and the cache node, and l represents a transmission delay, represents the probability that the request content is within the communication range of the initial request initiating node;
[0110] the average energy consumption P r d represents a transmission power for transmission through a first transmission mode, r represents a transmission distance, d represents a transmission mode, and τ d represents a transmission time, represents a transmission power for transmission through a second transmission mode, represents a probability for transmission through the second transmission mode.
[0111] In an example embodiment, the target function U μ,f = β(1-H) + (1-β)E μ,f / E max wherein β represents an adjustment parameter, H represents the cache hit rate, E μ,f represents the average energy consumption, and E max represents a maximum energy consumption for one request content.
[0112] The apparatus of this embodiment can be used to execute the method of any embodiment in the method for determining cache nodes. Its specific implementation process and technical effects are similar to those in the method for determining cache nodes. For details, please refer to the detailed description in the method for determining cache nodes, which will not be repeated here.
[0113] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for determining cache nodes. This method includes: obtaining request content; obtaining node information based on the request content; wherein the node information includes first node information corresponding to the initial request initiating node and second node information corresponding to candidate nodes, the first node information representing the node attributes of the initial request initiating node, and the second node information representing the node attributes of the candidate nodes; the initial request initiating node being the node that received the request content, and the candidate nodes being other nodes in the network environment besides the initial request initiating node; determining cache probabilities based on the node information and a random walk algorithm; wherein the cache probability is the set of sub-cache probabilities corresponding to all candidate nodes; determining cache nodes based on the cache probabilities; wherein the cache node is used to cache the request content.
[0114] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0115] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program being stored in a non-transitory computer readable storage medium, and the computer program being executable by a processor to enable the computer to perform the method for determining the cache node provided by any of the above methods, the method comprising: obtaining a request content; obtaining node information according to the request content; wherein the node information comprises first node information corresponding to an initial request initiating node and second node information corresponding to a candidate node, the first node information being used to represent node attributes of the initial request initiating node, the second node information being used to represent node attributes of the candidate node, the initial request initiating node being a node receiving the request content, and the candidate node being a node other than the initial request initiating node in a network environment; determining a cache probability according to the node information and a random walk algorithm; wherein the cache probability is a set of one-to-one corresponding sub-cache probabilities of all candidate nodes; and determining a cache node according to the cache probability; wherein the cache node is used to cache the request content.
[0116] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executable by a processor to implement the method for determining the cache node provided by any of the above methods, the method comprising: obtaining a request content; obtaining node information according to the request content; wherein the node information comprises first node information corresponding to an initial request initiating node and second node information corresponding to a candidate node, the first node information being used to represent node attributes of the initial request initiating node, the second node information being used to represent node attributes of the candidate node, the initial request initiating node being a node receiving the request content, and the candidate node being a node other than the initial request initiating node in a network environment; determining a cache probability according to the node information and a random walk algorithm; wherein the cache probability is a set of one-to-one corresponding sub-cache probabilities of all candidate nodes; and determining a cache node according to the cache probability; wherein the cache node is used to cache the request content.
[0117] The device embodiments described above are only schematic, wherein units shown as separate components can or can not be physically separate, and components shown as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0118] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and necessary general hardware platforms through the description of the above embodiments, and of course, the implementation can also be through hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods of the various embodiments or some parts of the embodiments.
[0119] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for determining a cache node, characterized in that, The method comprises: acquiring request content; acquiring node information according to the request content; wherein the node information comprises first node information corresponding to an initial request initiating node and second node information corresponding to a candidate node, the first node information is used to represent node attributes of the initial request initiating node, the second node information is used to represent node attributes of the candidate node, the initial request initiating node is a node receiving the request content, and the candidate node is a node other than the initial request initiating node in a network environment; the first node information comprises a first request number and a second request number, the first request number is a mutual request number between the initial request initiating node and the candidate node, and the second request number is a number of requests for common content between the initial request initiating node and the candidate node; and the second node information comprises a node network centrality and a node moving speed; determining a caching probability according to the node information and a random walk algorithm; wherein the caching probability is a set of sub-caching probabilities corresponding to all the candidate nodes; the determination of the caching probability according to the node information and the random walk algorithm comprises: determining a weight parameter; wherein the weight parameter is used to represent an association strength between the initial request initiating node and the candidate node; determining a target weight according to the first request number, the second request number, the node network centrality, the node moving speed, the weight parameter, and a moving speed threshold value; wherein the moving speed threshold value is a maximum moving speed of the moving speeds of the initial request initiating node and the candidate node; and determining the caching probability according to the target weight and the random walk algorithm; determining a caching node according to the caching probability; wherein the caching node is used to cache the request content.
2. The method of claim 1, wherein, The determination of the caching probability according to the target weight and the random walk algorithm comprises: performing random walk according to the target weight and the random walk algorithm until all the candidate nodes complete the random walk, and determining all walk probabilities in the random walk process of the candidate nodes; determining the sub-caching probability of the candidate nodes according to a sum of all the walk probabilities; determining the caching probability of the candidate nodes according to the set of the sub-caching probabilities corresponding to all the candidate nodes.
3. The method of claim 1, wherein, The determination of the caching node according to the caching probability comprises: determining a target caching probability according to a maximum value of the caching probability; determining the caching node according to the target caching probability.
4. The method of claim 1, wherein, After the determination of the caching node according to the caching probability, the method further comprises: acquiring a first node parameter of the caching node; determining an evaluation index of the caching node according to the first node parameter and a second node parameter of the initial request initiating node; determining a target function according to the evaluation index; determining an evaluation result according to the target function.
5. The method of claim 4, wherein, The first node parameter comprises a transmission time between the initial request initiating node and the cache node, the second node parameter comprises a probability of the request content being cached at the initial request initiating node and a probability of the request content being within a communication range of the initial request initiating node; the evaluation index comprises a cache hit rate and an average energy consumption; wherein, the cache hit rate , denotes the probability that the requested content is cached at the initial request originating node, denotes the initial request originating node, denotes the cache node, denotes the local cache, denotes the connection validity time between the initial request originating node and the cache node, denotes the transmission delay, denotes the probability that the requested content is within the communication range of the initial request originating node; the average energy consumption , denotes a transmission power for transmission by the first transmission mode, denotes a transmission distance, denotes a transmission mode, denotes a transmission time, denotes a transmission power for transmission by the second transmission mode, denotes a probability for transmission by the second transmission mode.
6. The method of determining cache nodes according to claim 5, wherein, the objective function wherein, denotes an adjustment parameter, is the cache hit rate, denotes the average energy consumption, denotes the maximum energy consumption for requesting content once.
7. A determining apparatus of a cache node, characterized in that, Comprise: A content obtaining module, configured to obtain a request content; An information obtaining module, configured to obtain node information according to the request content; wherein, the node information comprises first node information corresponding to an initial request initiating node and second node information corresponding to a candidate node, the first node information is used to represent node attributes of the initial request initiating node, the second node information is used to represent node attributes of the candidate node, the initial request initiating node is a node receiving the request content, and the candidate node is a node other than the initial request initiating node in a network environment; the first node information comprises a first request number and a second request number, the first request number is a mutual request number between the initial request initiating node and the candidate node, and the second request number is a number of requests for common content between the initial request initiating node and the candidate node; and the second node information comprises a node network centrality and a node moving speed; A probability determining module, configured to determine a cache probability according to the node information and a random walk algorithm; wherein, the cache probability is a set of one-to-one corresponding sub-cache probabilities of all the candidate nodes; the determination of the cache probability according to the node information and the random walk algorithm comprises: determining a weight parameter; wherein, the weight parameter is used to represent an association strength between the initial request initiating node and the candidate node; determining a target weight according to the first request number, the second request number, the node network centrality, the node moving speed, the weight parameter and a moving speed threshold value; wherein, the moving speed threshold value is a maximum moving speed of the initial request initiating node and the candidate node; and determining the cache probability according to the target weight and the random walk algorithm; A node determining module, configured to determine a cache node according to the cache probability; wherein, the cache node is used to cache the request content.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the determination method of the cache node according to any one of claims 1 to 6. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the determination method of the cache node according to any one of claims 1 to 6.
Citation Information
Patent Citations
Distributed storage method based on multi-hop cooperation, distributed storage device, and electronic equipment
CN107155197A
Mobile terminal BIM model intelligent caching method based on building construction process network recommendation
CN110442977A