Local cache resource optimization method and system combined with node status

By comprehensively considering the multi-dimensional state indicators of nodes, calculating the target cache value and adjusting the cache strategy, the problem of unreasonable resource allocation in the existing technology is solved, and the efficiency and security of the distributed network are improved.

CN120343045BActive Publication Date: 2025-08-19THE FIFTH RES INST OF TELECOMM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510819917.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-08-19
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

The existing local cache resource management method fails to fully consider the multi-dimensional state of the node, resulting in unreasonable resource allocation, affecting the node's operating efficiency and security, and increasing network bandwidth waste and resource transmission delay.

Method used

By obtaining the node's resource usage status, security level, anti-destructive performance and transmission cost indicators, the target cache value is calculated, and the local cache decision parameters are generated based on dynamic adjustment factors, and the cache synchronization strategy of neighboring nodes is adjusted to achieve resource collaborative operation.

Benefits of technology

It improves node resource utilization and security, reduces network bandwidth waste and resource transmission delay, and enhances the overall performance and damage resistance of distributed networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343045B_ABST
    Figure CN120343045B_ABST
Patent Text Reader

Abstract

The present invention provides a local cache resource optimization method and system combined with node status, which relates to the field of cloud storage optimization technology. First, a set of status indicators of multiple nodes in a distributed network, including indicators such as resource usage, security level, anti-destruction performance and transmission cost, is obtained. Based on this, the target cache value of the current node for the target information resource is calculated. After being corrected by a dynamic adjustment factor, a local cache decision parameter is generated. If the local cache decision parameter exceeds the node cache trigger threshold, the target information resource is stored in the local cache of the current node and a cache resource distribution update instruction is generated. Then, the cache synchronization strategy of adjacent nodes is adjusted according to the cache resource distribution update instruction to realize cache resource collaborative operation and improve the distributed network resource utilization and access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud storage optimization, and in particular to a method and system for optimizing local cache resources in combination with node status. Background Art

[0002] In existing distributed network environments, managing and optimizing local cache resources has always been a challenging problem. Traditional local cache resource management methods often only consider single factors, such as node storage capacity or resource access frequency. These methods fail to comprehensively consider the node's status across multiple dimensions, including resource usage, security, survivability, and resource transmission costs.

[0003] The lack of consideration for the multi-dimensional state of nodes leads to irrationality in the allocation of cache resources. For example, resources may be cached to a node where resource usage is close to saturation, which not only affects the normal operation of the node but also may lead to inefficient resource access. At the same time, the security level and anti-destruction performance of the node are not taken into account, which makes the cached resources face higher security risks and the possibility of being destroyed. In addition, the failure to consider the cost of resource transmission will result in wasted network bandwidth and increased resource transmission delays. Therefore, there is an urgent need for a method that can optimize local cache resources by combining the multi-dimensional state of nodes. Summary of the Invention

[0004] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a method for optimizing local cache resources in combination with node status, the method comprising:

[0005] Acquire a set of status indicators of multiple nodes in a distributed network, wherein the set of status indicators includes a node resource usage status indicator, a node safety level indicator, a node invulnerability performance indicator, and a resource transmission cost indicator;

[0006] Calculating a target cache value of the current node for the target information resource based on the state indicator set, wherein the target cache value is positively correlated with the node resource usage state indicator and the node security level indicator, and negatively correlated with the resource transmission cost indicator;

[0007] Modifying the target cache value in real time based on a preset dynamic adjustment factor to generate a local cache decision parameter that matches the current node;

[0008] If the local cache decision parameter exceeds a preset node cache trigger threshold, the target information resource is stored in the local cache space of the current node, and a cache resource distribution update instruction is generated;

[0009] The cache synchronization strategies of adjacent nodes in the distributed network are adjusted according to the cache resource distribution update instruction, so that the adjacent nodes perform cache resource collaborative operations based on the adjusted cache synchronization strategies.

[0010] On the other hand, an embodiment of the present invention also provides a local cache resource optimization system combined with node status, including a processor and a machine-readable storage medium, the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.

[0011] Based on the above aspects, the embodiment of the present invention calculates the target cache value and makes real-time corrections by comprehensively considering multi-dimensional status indicators such as the resource usage status, security level, anti-destruction performance and resource transmission cost of nodes in the distributed network, and can generate more reasonable local cache decision parameters. This allows for a more comprehensive evaluation of the node's comprehensive status when making cache resource storage decisions, avoiding caching resources to unsuitable nodes, and effectively improving the utilization and security of node resources. At the same time, based on the cache resource distribution update instruction, the cache synchronization strategy of adjacent nodes is adjusted to achieve the coordinated operation of cache resources, reduce the waste of network bandwidth and resource transmission delay, improve the resource access efficiency and stability of the entire distributed network, and enhance the overall performance and anti-destruction capability of the distributed network. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a schematic diagram of the execution flow of the local cache resource optimization method combined with node status provided by an embodiment of the present invention.

[0013] Figure 2 Schematic diagram of exemplary hardware and software components of a local cache resource optimization system combined with node status provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0014] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 FIG1 is a flow chart of a method for optimizing local cache resources in combination with node status provided by an embodiment of the present invention. The method for optimizing local cache resources in combination with node status is introduced in detail below.

[0015] Step S110: obtaining a set of status indicators of multiple nodes in a distributed network, wherein the set of status indicators includes a node resource usage status indicator, a node safety level indicator, a node invulnerability performance indicator, and a resource transmission cost indicator.

[0016] In a distributed network environment, optimizing local cache resources requires first obtaining a set of status indicators for multiple nodes. This is because different node status indicators influence caching decisions for target information resources. Comprehensive and accurate acquisition of these indicators facilitates more efficient and appropriate cache resource allocation. The following details the process for obtaining each indicator.

[0017] Step S111: traverse the real-time operation log data of all nodes in the distributed network, extract the resource access frequency and resource storage capacity occupancy ratio of the node within the preset time window, and normalize the resource access frequency and resource storage capacity occupancy ratio to obtain the node resource usage status indicator.

[0018] First, the real-time operation log data of each node in the distributed network needs to be traversed. The real-time operation log records various operations and events during the node's operation and is an important data source for obtaining node resource usage. The preset time window is set based on the network's operating characteristics and cache optimization requirements. For example, for networks with frequent updates and high data timeliness requirements, the preset time window can be set shorter; for relatively stable networks with slower data changes, the preset time window can be appropriately extended.

[0019] Within a preset time window, extract the resource access frequency and resource storage capacity utilization ratio. The resource access frequency refers to the number of times a node is accessed within that time window. This value can be obtained by counting the number of access requests recorded in the log. Assuming that the number of times a node is accessed within the preset time window T is N, the resource access frequency F = N / T. The resource storage capacity utilization ratio refers to the ratio of the node's used storage capacity to the total storage capacity. By obtaining the node's storage system information, the used storage capacity U and the total storage capacity C can be obtained. The resource storage capacity utilization ratio R = U / C.

[0020] Since the dimensions and value ranges of resource access frequency and resource storage capacity utilization ratio may differ, they need to be normalized to facilitate subsequent calculations and comparisons. The purpose of normalization is to map different data to a unified interval, typically the interval [0, 1]. For resource access frequency F, assuming its maximum value is F_max and its minimum value is F_min, the normalized resource access frequency F_norm = (F - F_min) / (F_max - F_min). For resource storage capacity utilization ratio R, since its value range is within [0, 1], additional normalization may not be required. However, if it is necessary to compare with other indicators under the same standard, a similar normalization method can be used. Finally, the normalized resource access frequency F_norm and resource storage capacity utilization ratio R are combined to form the node resource usage status indicator S_usage. For example, a weighted average method can be used: S_usage = α*F_norm + (1-α)*R, where α is a weight coefficient that is adjusted according to actual conditions.

[0021] Step S112: Call the node security audit interface to obtain the historical security event record set of the node, perform feature encoding on the security threat type in the historical security event record set, generate a security threat encoding vector, input the security threat encoding vector into the pre-trained security scoring model, and output the node security level index.

[0022] To assess a node's security level, you need to use the node's security audit interface. This interface is specifically used to record and query security-related information within the node system. By calling this interface, you can obtain a collection of historical security event records for the node, which contains detailed information about various security threats encountered by the node over the past period of time, such as attack time, attack type, and attack source.

[0023] Characterizing security threat types in a collection of historical security event records involves converting different types of security threats into a vector form that can be processed by computers. There are many types of security threats, such as network attacks (including DDoS attacks and SQL injection attacks), data leaks, and malware infections. To encode these types, we first need to create a dictionary of security threat types, assigning each type a unique code. For example, a DDoS attack is coded as 001, an SQL injection attack is coded as 002, and so on. Next, we count the number of occurrences of each security threat type in the collection of historical security event records and arrange these occurrences in the order of their codes to form the security threat encoding vector V.

[0024] The generated security threat encoding vector V is input into a pre-trained security scoring model. The pre-trained security scoring model is trained using a large amount of security data and can learn the mapping between the security threat encoding vector and the node security level. The model structure can adopt a multi-layer perceptron (MLP), which consists of an input layer, a hidden layer, and an output layer. The number of neurons in the input layer is the same as the dimension of the security threat encoding vector. There can be multiple hidden layers, each containing a certain number of neurons. The output layer has only one neuron, and the output value is the node security level indicator S_security. During the training process, a large number of security threat encoding vectors with security level labels are used as training data. The model parameters are continuously adjusted through the backpropagation algorithm to ensure that the model output is as close as possible to the actual security level label.

[0025] Step S113: Monitor the hardware redundancy configuration data and network topology connection strength data of the node, calculate the node device replacement rate based on the hardware redundancy configuration data, construct an anti-destruction performance evaluation function in combination with the network topology connection strength data, and generate the node anti-destruction performance index through the anti-destruction performance evaluation function.

[0026] Node survivability is crucial to the stability of distributed networks, so accurate assessment is crucial. First, we need to monitor the node's hardware redundancy configuration data and network topology connection strength data. Hardware redundancy configuration data includes information such as the number, type, and availability of backup hardware devices equipped on the node. Network topology connection strength data reflects the strength of a node's connections within the network topology, including the number of connections to other nodes and the bandwidth of those connections.

[0027] Calculate the node device replacement rate based on the hardware redundancy configuration data. The node device replacement rate refers to the probability that a hardware device on a node can be replaced in a timely manner if it fails. Assume that the node has n types of hardware devices, with the number of spares for each type being s_1, s_2, …, s_n, and the failure rate for each type being f_1, f_2, …, f_n. For the i-th type of hardware device, its device replacement rate r_i can be calculated using the formula r_i = s_i / (s_i + f_i). Then, the device replacement rates of all hardware devices are weighted averaged to obtain the node device replacement rate R_replace. The weights can be determined based on the importance of the hardware devices.

[0028] A resiliency performance evaluation function is constructed by combining the network topology connection strength data. The network topology connection strength can be represented by the connection weight between the node and other nodes. The connection weight can be determined based on factors such as the bandwidth and stability of the connection. Assume that the node is connected to m other nodes, and the connection weights are w_1, w_2, …, w_m. A network topology connection strength index T=∑(w_i) can be defined, where i ranges from 1 to m. The node device replacement rate R_replace and the network topology connection strength index T are used as inputs to the resiliency performance evaluation function. The resiliency performance evaluation function can be in the form of a linear combination, for example A=β*R_replace+(1-β)*T, where β is a weight coefficient that is adjusted according to actual conditions. The result calculated by this resiliency performance evaluation function is the node resiliency performance index S_resilience.

[0029] Step S114: Counting network transmission path characteristics between the node and the source node to which the target information resource belongs, and calculating the resource transmission cost index according to the path hop count, link bandwidth and transmission delay data in the network transmission path characteristics.

[0030] To calculate the resource transmission cost metric, we need to count the network transmission path characteristics between the node and the source node of the target information resource. Network transmission path characteristics contain multiple important pieces of information, among which the number of path hops, link bandwidth, and transmission delay data are key factors.

[0031] The number of path hops refers to the number of intermediate nodes required to travel from the current node to the source node of the target information resource. The number of path hops can be determined based on network topology and routing information. Assume the number of path hops is H. Link bandwidth refers to the available bandwidth of each link in the network transmission path, typically expressed in bits per second (bps). Network monitoring tools can be used to obtain bandwidth information for each link, and the minimum value of all link bandwidths is taken as the effective link bandwidth, B. Transmission delay refers to the time required for data to travel from the current node to the source node of the target information resource, including propagation delay, queuing delay, and other factors. Transmission delay can be measured by sending test packets and recording the round-trip time. Assume the transmission delay is D.

[0032] Based on this data, resource transmission cost indicators can be calculated using a comprehensive formula, such as C = γ_1*H + γ_2 / B + γ_3*D. γ_1, γ_2, and γ_3 are weight coefficients adjusted based on the impact of different factors on transmission cost. This takes into account the fact that resource transmission costs increase with more path hops, smaller link bandwidth, and greater transmission delay.

[0033] Step S115: performing standardization and alignment processing on the node resource usage status indicator, the node safety level indicator, the node invulnerability performance indicator, and the resource transmission cost indicator to generate the status indicator set.

[0034] Because the dimensions and value ranges of node resource usage status indicators, node safety level indicators, node invulnerability indicators, and resource transmission cost indicators may differ, standardization and alignment are required to combine them into a unified set of status indicators. The purpose of standardization and alignment is to convert these indicators to a common scale for subsequent calculation and comparison.

[0035] The Z-score standardization method can be used. For each indicator, first calculate its mean μ and standard deviation σ. For the node resource usage status indicator S_usage, the standardized indicator S_usage_std = (S_usage - μ_usage) / σ_usage; for the node security level indicator S_security, the standardized indicator S_security_std = (S_security - μ_security) / σ_security; for the node anti-destruction performance indicator S_resilience, the standardized indicator S_resilience_std = (S_resilience - μ_resilience) / σ_resilience; for the resource transmission cost indicator C, the standardized indicator C_std = (C - μ_C) / σ_C. Then, combine these four standardized indicators to form the status indicator set S = [S_usage_std, S_security_std, S_resilience_std, C_std].

[0036] Step S120: Calculate the target cache value of the current node for the target information resource based on the state indicator set, wherein the target cache value is positively correlated with the node resource usage state indicator and the node security level indicator, and negatively correlated with the resource transmission cost indicator.

[0037] After obtaining a set of status indicators for multiple nodes in a distributed network, the next step is to calculate the target cache value of the current node for the target information resource based on this set of status indicators. The target cache value reflects the overall benefit of the current node caching the target information resource. It is positively correlated with the node's resource utilization status indicator and the node's security level indicator, meaning that the better the node's resource utilization status and the higher the security level, the higher the target cache value. It is negatively correlated with the resource transmission cost indicator, meaning that the higher the resource transmission cost, the lower the target cache value. The calculation process is detailed below.

[0038] Step S121: extracting the first value of the node resource usage status indicator, the second value of the node safety level indicator, the third value of the resource transmission cost indicator, and the fourth value of the node invulnerability performance indicator from the status indicator set.

[0039] Extract the values of each indicator from the previously generated state indicator set S = [S_usage_std, S_security_std, S_resilience_std, C_std]. Denote the value of the node resource usage indicator S_usage_std as the first value a; the value of the node security level indicator S_security_std as the second value b; the value of the resource transmission cost indicator C_std as the third value c; and the value of the node resilience indicator S_resilience_std as the fourth value d.

[0040] Step S122: performing weighted processing on the first value based on a preset cache value benchmark coefficient to generate a resource usage status contribution value.

[0041] The preset cache value benchmark coefficient is a coefficient determined based on actual conditions and experience, and is used to measure the contribution of node resource usage to the target cache value. Assume the preset cache value benchmark coefficient is k_1. Multiply the first value a by the cache value benchmark coefficient k_1 to obtain the resource usage contribution value V_usage = k_1*a. This status contribution value reflects the positive contribution of the node resource usage status to the target cache value.

[0042] Step S123: determining a security level correction coefficient according to the second value and a preset security level mapping table, wherein the security level mapping table includes correction weight intervals corresponding to different security levels.

[0043] The preset security level mapping table is a predefined table that records the correction weight intervals corresponding to different security levels. Based on the security level corresponding to the second value b, the corresponding correction weight interval is searched from the security level mapping table, and then a specific security level correction coefficient k_2 is determined. For example, if the second value b is within the correction weight interval [w_min, w_max] corresponding to a certain security level, the security level correction coefficient k_2 can be determined according to a set rule, such as a linear interpolation method. Assuming linear interpolation is used, k_2 = w_min + (b-b_min) * (w_max-w_min) / (b_max-b_min), where b_min and b_max are the minimum and maximum values of the second value corresponding to the security level.

[0044] Step S124: calling a dynamic transmission cost function to perform inverse proportional transformation on the third value to generate a transmission cost suppression factor, wherein the output value of the dynamic transmission cost function decreases as the third value increases.

[0045] The dynamic transmission cost function inversely transforms the value of the resource transmission cost indicator to reflect its suppressive effect on the target cache value. Assume the dynamic transmission cost function is f(x), where x is the input value of the resource transmission cost indicator (i.e., the third value c). The characteristic of the function f(x) is that as x increases, the output value decreases. For example, the form f(x) = 1 / (x + ε) can be used, where ε is a small positive number to avoid the denominator being zero. Substituting the third value c into the dynamic transmission cost function f(x) yields the transmission cost suppression factor k_3 = f(c).

[0046] Step S125: determining a dynamic redundancy compensation weight according to the fourth value and a preset redundancy enhancement coefficient table, wherein the redundancy enhancement coefficient table stores compensation coefficients corresponding to different invulnerability performance indicator intervals.

[0047] The preset redundancy enhancement coefficient table records the compensation coefficients corresponding to different invulnerability performance index intervals. Based on the invulnerability performance index interval in which the fourth value d falls, the corresponding compensation coefficient is searched from the redundancy enhancement coefficient table and used as the dynamic redundancy compensation weight k_4. For example, if the fourth value d falls within the invulnerability performance index interval [d_min, d_max], and the compensation coefficient corresponding to this invulnerability performance index interval is k, then the dynamic redundancy compensation weight k_4 = k.

[0048] Step S126: normalizing the node resource usage status indicator, the node safety level indicator, and the node invulnerability performance indicator respectively, and converting them into forward gain coefficients within a uniform proportional range.

[0049] To make the node resource usage status indicator, node safety level indicator, and node invulnerability performance indicator comparable when calculating the target cache value, they need to be normalized and converted into forward gain coefficients with a uniform scale range. The normalization method mentioned above can be used, such as mapping the value of each indicator to the interval [0, 1]. For the first value a of the node resource usage status indicator, the normalized forward gain coefficient g_1 = (a - a_min) / (a_max - a_min); for the second value b of the node safety level indicator, the normalized forward gain coefficient g_2 = (b - b_min) / (b_max - b_min); and for the fourth value d of the node invulnerability performance indicator, the normalized forward gain coefficient g_3 = (d - d_min) / (d_max - d_min), where a_min, a_max, b_min, b_max, d_min, and d_max are the minimum and maximum values of the corresponding indicators, respectively.

[0050] Step S127: normalize the resource transmission cost indicator and convert it into a reverse suppression coefficient.

[0051] Similarly, the third value c of the resource transmission cost indicator is normalized and converted into a reverse suppression coefficient. Using the normalization method, the third value c is mapped to the interval [0, 1], resulting in a normalized value c_norm = (c - c_min) / (c_max - c_min). Then, to reflect its reverse suppression effect, the normalized value is inverted to obtain the reverse suppression coefficient g_4 = 1 - c_norm.

[0052] Step S128: performing a weighted summation on the forward gain coefficients to generate a comprehensive gain factor, and then performing a weighted difference operation on the forward gain coefficients to obtain the target cache value.

[0053] The forward gain coefficients g_1, g_2, and g_3 obtained above are weighted and summed to generate the comprehensive gain factor G. Assuming the weighting coefficients are ω_1, ω_2, and ω_3, the comprehensive gain factor G = ω_1*g_1 + ω_2*g_2 + ω_3*g_3. Then, the comprehensive gain factor G is weighted and subtracted from the reverse suppression coefficient g_4 to obtain the target cache value V. Assuming the weighting coefficients are ω_G and ω_g4, the target cache value V = ω_G*G - ω_g4*g_4.

[0054] Step S130: modifying the target cache value in real time based on a preset dynamic adjustment factor to generate a local cache decision parameter that matches the current node.

[0055] After obtaining the target cache value, in order to make the cache decision more in line with the actual situation of the current node, it is necessary to adjust the target cache value in real time based on a preset dynamic adjustment factor, so as to generate local cache decision parameters that match the current node. The specific adjustment process is described in detail below.

[0056] Step S131: Monitor in real time the remaining capacity of the local cache space of the current node and the storage space requirement of the target information resource.

[0057] Real-time monitoring of the remaining capacity of the local cache space of the current node and the storage space requirement of the target information resource is the basis for making cache decisions. The remaining capacity of the local cache space L_remain can be obtained by querying the storage system information of the node, and the storage space requirement L_need can be determined by analyzing the attributes of the target information resource.

[0058] Step S132: When the remaining capacity of the local cache space is less than the storage space requirement, generate an alarm signal for insufficient cache space, and trigger a cache resource elimination strategy based on the alarm signal for insufficient cache space.

[0059] If it is monitored that the remaining capacity of the local cache space L_remain is less than the storage space requirement of the target information resource L_need, that is, L_remain < L_need, it means that the local cache space of the current node is not enough to store the target information resource. At this time, an alarm signal for insufficient cache space is generated. This alarm signal for insufficient cache space will trigger a cache resource elimination strategy to release some cache space to store the target information resource.

[0060] Step S133: Calculate the priority score of the information resources already stored in the local cache space according to the cache resource elimination strategy, and mark the information resources already stored with a priority score lower than the preset elimination threshold as replaceable resources.

[0061] The cache resource elimination strategy needs to comprehensively consider multiple factors to calculate the priority score of the information resources already stored in the local cache space. These factors can include the access frequency of the information resources, the most recent access time, the timeliness of the data, and the importance to the business, etc.

[0062] The access frequency of information resources can be measured by counting the number of times the information resource is accessed within a set time window. Assume that within time window T, the number of accesses to stored information resource i is F_i. For the most recent access time, the time point when the information resource was last accessed can be recorded and represented by the time difference. Let the time difference between the most recent access of information resource i and the current time be D_i. Regarding data timeliness, different types of information resources have different timeliness requirements. Based on the type of information resource, a timeliness weight W_ti can be assigned to each resource. The importance of each information resource to the business can be determined by assigning an importance weight W_ii to each resource based on business rules or administrator settings.

[0063] To calculate the priority score based on these factors, we can first normalize each factor to the same dimension and range. For access frequency F_i, we can normalize it by calculating its relative frequency among all stored information resources. Let the normalized access frequency be F_i_norm. For the most recent access time difference D_i, we can convert it into a relative value, with larger values indicating lower priority. The normalized value is D_i_norm.

[0064] Then, we assign weights to each factor based on its importance. Let ω_F be the weight for access frequency, ω_D be the weight for recent access time, ω_t be the weight for timeliness, and ω_i be the weight for business importance. The priority score P_i for information resource i can be calculated by weighted summation: P_i = ω_F * F_i_norm + ω_D * D_i_norm + ω_t * W_ti + ω_i * W_ii.

[0065] The preset elimination threshold is a fixed value set according to the node's cache strategy and actual needs, set as P_threshold. The calculated priority score P_i of each stored information resource is compared with the preset elimination threshold P_threshold. If P_i is less than P_threshold, the information resource is marked as a replaceable resource.

[0066] Step S134: performing a difference comparison between the target cache value and the priority score of the replaceable resource. If the target cache value exceeds the maximum replaceable resource score, a cache replacement execution instruction is generated.

[0067] After marking the replaceable resources, obtain the maximum priority score in the replaceable resources, denoted as P_max_replace. Compare the difference between the previously calculated target cache value V and P_max_replace. The purpose of the comparison is to determine whether the target information resource is worth replacing the replaceable resources in the current cache. If the target cache value V exceeds the maximum replaceable resource score P_max_replace, that is, V > P_max_replace, it means that the target information resource has a higher value in the cache. At this time, generate a cache replacement execution instruction. This instruction is used to trigger subsequent cache replacement operations, store the target information resource in the local cache, and remove the corresponding replaceable resources.

[0068] Step S135: Release the storage space corresponding to the replaceable resources based on the cache replacement execution instruction, and calculate the remaining capacity of the local cache space after the release.

[0069] After generating the cache replacement execution instruction, process the replaceable resources according to this instruction. First, the storage locations of the information resources marked as replaceable resources in the local cache space can be located, and then these information resources are deleted from the cache to release the storage space they occupy. Let the total storage space occupied by the replaceable resources be L_replace. After releasing this storage space, recalculate the remaining capacity of the local cache space. The previous remaining capacity of the local cache space is L_remain, and the remaining capacity of the local cache space L_remain_new after the release can be calculated by L_remain + L_replace.

[0070] Step S136: If the remaining capacity of the local cache space after the release still cannot meet the storage space requirement, recursively execute the cache resource elimination strategy until the released space meets the requirement or there are no replaceable resources.

[0071] After calculating the remaining capacity of the local cache space L_remain_new after the release, compare it with the storage space requirement L_need of the target information resource. If L_remain_new is still less than L_need, that is, L_remain_new < L_need, it means that the released storage space is not enough to store the target information resource. At this time, the cache resource elimination strategy needs to be recursively executed. When recursively executing, the priority scores of the remaining stored information resources in the local cache space are recalculated, the replaceable resources are marked again, and then the storage space of these replaceable resources is released, and the remaining capacity of the local cache space after the release is calculated again. This process will be repeated continuously until the released space meets the storage space requirement of the target information resource, that is, L_remain_new >= L_need, or there are no replaceable resources in the local cache space.

[0072] Step S137: Dynamically adjust the weight of the dynamic adjustment factor according to the ratio between the final available capacity and the storage demand, wherein the lower the available capacity ratio is, the greater the correction range of the dynamic adjustment factor on the target cache value is.

[0073] After the previous steps, the final available capacity of the local cache space, L_available, is obtained. The ratio of the final available capacity to the storage space requirement of the target information resource is calculated and set to R = L_available / L_need. The dynamic adjustment factor is an important parameter used to correct the target cache value, and its weight is dynamically adjusted according to the size of the ratio R. When the ratio R is low, it means that the local cache space is relatively tight. At this time, the target cache value needs to be corrected more significantly to ensure that the cache decision is more cautious. Different weights can be set according to different intervals of the ratio R. For example, when R is in the interval [0, R_1), the weight of the dynamic adjustment factor is ω_1; when R is in the interval [R_1, R_2), the weight of the dynamic adjustment factor is ω_2, and ω_1 < ω_2. As R increases, the weight of the dynamic adjustment factor gradually increases, and the correction amplitude of the target cache value gradually decreases.

[0074] Step S138: Generate the local cache decision parameter based on the revised target cache value.

[0075] The target cache value V is revised based on the weight distribution rule of the dynamically adjusted dynamic adjustment factor. Let's assume the dynamic adjustment factor is A. The revised target cache value V' can be calculated by combining V and A according to the adjusted weight distribution rule. For example, if a weighted multiplication method is used, V'=V*A*ω, where ω is the weight of the dynamic adjustment factor at the current ratio R. The revised target cache value V' is the final local cache decision parameter, which will be used to determine whether to store the target information resource in the local cache space.

[0076] Step S140: If the local cache decision parameter exceeds a preset node cache trigger threshold, the target information resource is stored in the local cache space of the current node, and a cache resource distribution update instruction is generated.

[0077] The generated local cache decision parameter V' is compared with the preset node cache trigger threshold P_trigger. The preset node cache trigger threshold is a fixed value pre-set based on factors such as the node's cache strategy and performance. If the local cache decision parameter V' exceeds the preset node cache trigger threshold P_trigger, that is, V'>P_trigger, it means that the current node cache target information resource has high value and necessity. At this time, the target information resource can be stored in the local cache space of the current node. During the storage process, corresponding storage space can be allocated to the target information resource to ensure that it can be stored and accessed normally. At the same time, in order to ensure the consistency and coordination of the cache resources of each node in the distributed network, a cache resource distribution update instruction can be generated. The instruction contains relevant information of the target information resource, such as resource identifier, storage location, etc., which is used to notify other nodes to update the distribution information of the cache resource.

[0078] Step S150: adjusting the cache synchronization strategies of adjacent nodes in the distributed network according to the cache resource distribution update instruction, so that the adjacent nodes perform cache resource collaborative operations based on the adjusted cache synchronization strategies.

[0079] After generating a cache resource distribution update instruction, you need to adjust the cache synchronization strategy of adjacent nodes in the distributed network according to the instruction to achieve coordinated operation of cache resources. The specific steps are as follows:

[0080] Step S151: parsing the target information resource identifier and source node location information in the cache resource distribution update instruction.

[0081] After receiving a cache resource distribution update instruction, it is first parsed. This instruction contains the identifier of the target information resource and the location information of the source node. The target information resource identifier is a code that uniquely identifies the target information resource, allowing accurate location and identification of the target information resource. The source node location information indicates the node where the target information resource was originally located. Parsing this information is the foundation for subsequent operations. Accurately obtaining this information provides a basis for determining the transmission path and performing cache synchronization.

[0082] Step S152: query the topology data of the distributed network according to the source node location information, and determine the optimal transmission path between the current node and the source node and the set of nodes covered by the path.

[0083] Based on the parsed source node location information, the distributed network's topology data can be queried. This data records information such as the connections and communication paths between nodes in the network. By analyzing and calculating this topology data, the optimal transmission path between the current node and the source node can be determined. This determination can take into account multiple factors, such as path length, bandwidth, and latency. Methods such as the shortest path algorithm and the bandwidth-first algorithm can be used to calculate the optimal transmission path. During the process of determining the optimal transmission path, the path coverage node set—that is, the set of all intermediate nodes traversed by the transmission path—is also obtained.

[0084] Step S153: Sending a cache synchronization detection request to each intermediate node in the path coverage node set, wherein the cache synchronization detection request includes the target information resource identifier and the local cache decision parameter.

[0085] After determining the set of path coverage nodes, a cache synchronization check request can be sent to each intermediate node in the set. This cache synchronization check request contains the target information resource identifier and local cache decision parameters. The target information resource identifier allows the intermediate node to identify the target information resource to be synchronized, while the local cache decision parameters allow the intermediate node to understand the current node's cache decision for the target information resource. Upon receiving the cache synchronization check request, the intermediate node will process and provide feedback based on this information.

[0086] Step S154: receiving cache status response data returned by the intermediate node, wherein the cache status response data includes the current cache load rate and available storage capacity of the intermediate node.

[0087] After receiving a cache synchronization check request, the intermediate node checks its own cache status and returns the results in the form of cache status response data. This cache status response data includes the intermediate node's current cache load ratio and available storage capacity. The current cache load ratio refers to the proportion of the intermediate node's used cache space to its total cache space, while the available storage capacity refers to the amount of space currently available for data storage. After receiving this cache status response data, further analysis and processing can be performed.

[0088] Step S155: Calculate the cache synchronization priority of the intermediate node according to the current cache load rate and the available storage capacity, and sort the intermediate nodes according to the cache synchronization priority.

[0089] Based on the received information about the intermediate node's current cache load rate and available storage capacity, the intermediate node's cache synchronization priority can be calculated. This calculation takes into account multiple factors, including the current cache load rate and available storage capacity, as well as the intermediate node's historical cache access history, network bandwidth utilization, and processor load.

[0090] First, we obtain the intermediate node's historical cache access records and extract resource request frequency and resource type distribution characteristics. Resource request frequency reflects the intermediate node's demand for cached resources, while resource type distribution characteristics reflect the intermediate node's preference for different resource types. Based on the resource type distribution characteristics, we determine the intermediate node's preference coefficient for the resource type to which the target information resource belongs. For example, if the intermediate node has a high historical request frequency for a certain resource type, then its preference coefficient for that resource type is relatively high.

[0091] The expected cache utility value of the intermediate node is calculated based on the resource request frequency and preference coefficient. The expected cache utility value represents the potential benefit of the intermediate node caching the target information resource. The node's real-time network bandwidth utilization and processor load are also monitored, and the node performance degradation factor is calculated based on these real-time network bandwidth utilization and processor load. The node performance degradation factor reflects the performance of the intermediate node under the current network and processing capabilities.

[0092] The expected cache utility value and the node performance decay factor are weighted and summed to obtain the initial synchronization priority score of the intermediate node. This initial synchronization priority score is then negatively modified based on the current cache load ratio to obtain the modified synchronization priority score. Finally, this modified synchronization priority score is compared with the preset priority threshold to determine the cache synchronization priority level of the intermediate node.

[0093] The intermediate nodes are sorted according to the cache synchronization priority level, with the nodes with higher priority being placed in front, so that the cache synchronization tasks can be allocated according to the sorting results later.

[0094] Step S156: performing correlation analysis on the sorted intermediate node queues and the local cache decision parameters to generate a cache synchronization task allocation list.

[0095] The sorted intermediate node queue is associated with the local cache decision parameters for analysis. The local cache decision parameters include the current node's cache decision on the target information resource, such as the necessity of caching, the value of caching, etc. Through association analysis, the role and task volume of each intermediate node in the cache synchronization task can be determined. For example, if the cache synchronization priority of an intermediate node is high, and the local cache decision parameters show that the cache value of the target information resource is large, then the intermediate node may take on more cache synchronization tasks. Based on the results of the association analysis, a cache synchronization task allocation list is generated, which records the specific content and requirements of the cache synchronization tasks that each intermediate node needs to perform.

[0096] Step S157: Before sending the cache synchronization policy instruction, check whether the available storage capacity of the intermediate node is greater than the data volume of the target information resource. If so, give priority to the full cache copy instruction. Otherwise, select the incremental cache update instruction based on the version difference data volume of the target information resource, or only send the cache metadata backup instruction; and when the available storage capacity of the intermediate node is lower than the preset safety threshold, suspend the allocation of cache synchronization tasks to it and mark it as a restricted node.

[0097] Before sending a cache synchronization policy instruction, the available storage capacity of the intermediate node needs to be verified. The available storage capacity of the intermediate node is compared with the data volume of the target information resource. If the available storage capacity of the intermediate node is greater than the data volume of the target information resource, it means that the intermediate node has sufficient space to store the full data of the target information resource. In this case, the full cache copy instruction is preferred, and the complete data of the target information resource is copied to the intermediate node's cache.

[0098] If the available storage capacity of the intermediate node is less than the target resource's data volume, further evaluation will be required based on the target resource's version difference data volume. If the version difference data volume is small, an incremental cache update instruction can be selected to synchronize only the target resource's version difference data to the intermediate node's cache, reducing data transmission and storage requirements. If the version difference data volume is large, or the intermediate node's storage capacity is limited, a cache metadata backup instruction can be sent to back up only the target resource's metadata, such as the resource's name, type, and update time.

[0099] To ensure cache security and stability on intermediate nodes, a preset safety threshold is set. When the available storage capacity of an intermediate node falls below the preset safety threshold, it indicates that the node's storage resources are severely limited. At this point, cache synchronization tasks are suspended and the node is marked as a restricted node. The restricted node will no longer participate in subsequent cache synchronization operations until its available storage capacity returns to a safe range.

[0100] Step S210: creating a cache metadata index of the target information resource in the current node, wherein the cache metadata index includes a resource version identifier, a cache validity period, and source node verification information.

[0101] After storing the target information resource in the local cache space of the current node, it is necessary to create a cache metadata index of the target information resource in the current node. The cache metadata index is an important information set used to manage and maintain cached data, which includes the resource version identifier, cache validity period and source node verification information. The resource version identifier is used to uniquely identify different versions of the target information resource. This identifier can accurately identify and distinguish different versions of resources. The cache validity period specifies the effective time range in which the target information resource can be used in the local cache. Beyond this time range, the cached data may need to be updated or verified. The source node verification information is used to communicate and verify with the source node to ensure the accuracy and consistency of the cached data. In the process of creating the cache metadata index, this information can be organized and stored for subsequent cache health checks and data update operations.

[0102] Step S220: Start a periodic cache health check task, which performs the following operations based on the cache metadata index: establish a communication connection with the source node through the source node verification information, verify the consistency of the resource version identifier with the current resource version of the source node, and verify the remaining duration of the cache validity period.

[0103] After the cache metadata index is created, a periodic cache health check task is started. The main purpose of this task is to ensure the accuracy and validity of the target information resources in the local cache. The cache health check task operates based on the cache metadata index. First, a communication connection with the source node is established through the source node verification information in the cache metadata index. After the communication connection is established, the version identifier of the current resource of the source node can be obtained and compared with the resource version identifier of the target information resource in the local cache to verify the consistency of the two. If the versions are inconsistent, it means that the data in the local cache may be outdated and needs to be updated.

[0104] At the same time, you can verify the remaining duration of the cache validity period. Based on the cache validity period recorded in the cache metadata index, calculate the remaining time from the current time to the end of the cache validity period. If the remaining time is lower than the set threshold, it means that the cached data is about to expire and needs to be processed accordingly, such as renewal or update.

[0105] Step S221: configuring the basic execution interval and maximum allowable delay time of the cache health check task.

[0106] To properly schedule cache health check execution, you need to configure the base execution interval and maximum permissible delay. The base execution interval refers to the normal execution period for cache health checks, for example, running checks at regular intervals. The maximum permissible delay specifies the maximum length of time that cache health check execution can be delayed in special circumstances, such as high system load or network congestion. By configuring these two time parameters, you can ensure cache data accuracy while minimizing impacts on system performance.

[0107] Step S222: monitoring the system load status and network congestion level of the current node, and dynamically extending the basic execution interval according to the system load status.

[0108] During the cache health check task execution, the system load status and network congestion level of the current node need to be monitored in real time. The system load status reflects the utilization of the current node's processor, memory, and other resources, while the network congestion level reflects the network communication status. When the system load status is high, it indicates that the node's resources are becoming increasingly scarce. In this case, to prevent the cache health check task from significantly impacting system performance, the basic execution interval can be dynamically extended based on the system load status. For example, when the system load reaches the set threshold, the basic execution interval can be extended to twice the original time.

[0109] Step S223: When it is detected that the network congestion level exceeds a preset congestion threshold, the delayed execution queue is enabled to temporarily store the cache health check task, and the tasks in the queue are executed in order of priority after the network congestion level decreases.

[0110] When network congestion exceeds the preset congestion threshold, a deferred execution queue can be enabled to ensure the smooth execution of cache health check tasks and avoid placing additional pressure on the network. This deferred execution queue temporarily stores cache health check tasks that were originally scheduled to be executed. When tasks are stored in the deferred execution queue, each task can be assigned a priority. The priority is determined based on various factors, such as the importance of the target information resource and the remaining cache validity period. Tasks with high importance and a shorter remaining cache validity period are given a higher priority.

[0111] This embodiment continuously monitors the level of network congestion. When the level of network congestion drops to a set level, that is, below a preset executable threshold, it begins executing tasks in the delayed execution queue in order of their priority. Before executing a task, the validity of the task can be checked again, for example, to check whether the target information resource still exists in the cache, whether the cache metadata index is still valid, etc. If the task is invalid, it can be removed from the delayed execution queue. For valid tasks, they can be executed in order from high to low priority, ensuring that important and urgent tasks are processed first.

[0112] Step S224: Record the execution time and resource consumption data of each cache health check task, and train the task scheduling optimization model based on the historical execution data.

[0113] Each time a cache health check task is executed, detailed records of the task's execution time and resource consumption are recorded. The execution time reflects the efficiency of the task, while resource consumption data includes the use of resources such as processor, memory, and network bandwidth during the task execution. This data is stored in the system's log files, forming historical execution data.

[0114] This historical execution data is used to train a task scheduling optimization model. This model can employ machine learning algorithms, such as neural networks. During training, the model uses historical execution data as input to learn the relationship between task execution time and resource consumption and task-related characteristics (such as the size and type of target information resources, and cache expiration). By continuously adjusting the model's parameters, the model can accurately predict the execution time and resource consumption of different tasks under varying system conditions. This allows the model to schedule tasks in a reasonable order and at a reasonable time, based on their characteristics and the current system state, improving task scheduling efficiency.

[0115] Step S225: calling the task scheduling optimization model to predict the node load change trend in the future time period, and dynamically adjusting the triggering time point of the cache health check task based on the prediction result.

[0116] After training the task scheduling optimization model, you can use it to predict node load trends over future time periods. The task scheduling optimization model predicts the node's processor load, memory usage, network bandwidth, and other resource usage over the next period of time based on the current system state, historical execution data, and other relevant information.

[0117] Based on predicted node load trends, the cache health check triggering time can be dynamically adjusted. If high node load is predicted for a certain period in the future, the cache health check triggering time can be postponed to a period with lower node load to avoid significant impact on system performance. Conversely, if low node load is predicted for the future, the cache health check can be triggered in advance to improve the accuracy and timeliness of cached data.

[0118] Step S226: When it is detected that the target information resource is marked as a priority resource, a mandatory check instruction is generated to cover the dynamically adjusted trigger time point.

[0119] During system operation, the status of the target information resource is monitored in real time. If the target information resource is detected as a priority resource, this means that the resource is important for the normal operation of the system or the development of business, and a timely cache health check is required. At this time, a mandatory check instruction can be generated, which will overwrite the trigger time point that was previously dynamically adjusted based on the node load trend. Regardless of the current node load, the cache health check task for this priority resource can be executed immediately to ensure that the cached data of this resource remains accurate and valid.

[0120] Step S230: When it is detected that the resource version identifier of the target information resource is inconsistent with the current resource version of the source node, an incremental data synchronization request is triggered, and version difference data is obtained from the source node based on the source node verification information and the local cache content is updated.

[0121] During a cache health check, if the target resource's version identifier is detected to be inconsistent with the source node's current resource version, the data in the local cache is outdated and needs to be updated. At this point, an incremental data synchronization request can be triggered. This request only requests the version difference data for the target resource, not the entire resource data.

[0122] Next, a communication connection is established with the source node based on the source node verification information in the cache metadata index, and an incremental data synchronization request is sent to the source node. Upon receiving the request, the source node calculates the version difference based on the latest locally stored resource data and the locally cached resource version information included in the request. The source node then sends this version difference data to the current node. Upon receiving this version difference data, the current node applies it to the target information resource in its local cache, updating its local cache content to align with the latest resource version from the source node.

[0123] Step S240: When it is detected that the remaining duration of the cache validity period is lower than the preset expiration threshold, a cache renewal request including the resource version identifier and source node verification information is generated and sent to the source node, and the cache validity period is extended after receiving the renewal authorization response returned by the source node.

[0124] In the cache health check task, if it is detected that the remaining duration of the cache validity period of the target information resource is lower than the preset expiration threshold, it means that the cached data is about to expire and needs to be renewed. A cache renewal request can be generated, which contains the resource version identifier of the target information resource and the source node verification information.

[0125] A cache renewal request can be sent to the source node. Upon receiving the request, the source node will review it according to its own policies and rules. This review may include resource usage, data security, and other aspects. If the review passes, the source node will return a renewal authorization response containing the new cache expiration date. Upon receiving the renewal authorization response, the current node will extend the cache expiration date of the target information resource based on the information in the response, ensuring that the resource can continue to be used in the local cache.

[0126] Step S250: Real-time statistics are collected on the access frequency of the target information resource in the local cache space and the data transmission volume based on the cache metadata index record, and a period adjustment function is established including an access frequency factor, a data transmission volume factor and a cache validity period factor. The execution period of the cache health check task is dynamically adjusted according to the period adjustment function, wherein the execution period is negatively correlated with the access frequency factor and positively correlated with the data transmission volume factor.

[0127] The access frequency of the target information resource in the local cache space and the data transmission volume based on the cache metadata index record can be counted in real time. The access frequency reflects the user's demand for the resource, while the data transmission volume reflects the resource's usage in the network.

[0128] Based on these statistics, a period adjustment function is established. The period adjustment function includes an access frequency factor, a data transmission volume factor, and a cache validity period factor. The access frequency factor is related to the access frequency of the target information resource, the data transmission volume factor is related to the data transmission volume, and the cache validity period factor is related to the remaining cache validity period.

[0129] The execution cycle of the cache health check task can be dynamically adjusted based on the cycle adjustment function. Since the execution cycle is negatively correlated with the access frequency factor, a high access frequency of the target information resource indicates that the resource is important and frequently used, requiring more frequent cache health checks. Therefore, the execution cycle will be shortened. The execution cycle is positively correlated with the data transfer volume factor. A high data transfer volume indicates a busy network. To avoid excessive network pressure, the execution cycle will be appropriately extended. Furthermore, the cache validity period factor also affects the execution cycle. If the remaining cache validity period is short, the execution cycle can be appropriately shortened to ensure that the cache is checked and updated before it expires.

[0130] Step S310: registering a cache location change event of the target information resource in the control plane of the distributed network, and generating a resource location metadata update request.

[0131] After storing the target information resource in the local cache space of the current node and generating a cache resource distribution update instruction, it is necessary to register the cache location change event of the target information resource with the control plane of the distributed network. The control plane of the distributed network is responsible for managing and coordinating various resources and events in the network. Registering the cache location change event allows the control plane to promptly notify the cache location of the target information resource of any changes.

[0132] After registration is complete, a resource location metadata update request can be generated. This request contains the latest cached location information of the target information resource and is used to notify other nodes in the network to update their location information for that resource. This request is generated to ensure the accuracy of the target information resource's location and access by each node in the distributed network.

[0133] Step S320: broadcast the resource location metadata update request to all routing nodes in the distributed network, triggering a forwarding rule update operation of the routing nodes.

[0134] After generating a resource location metadata update request, you can broadcast it to all routing nodes in the distributed network. Routing nodes are responsible for data forwarding and routing in a distributed network. The purpose of broadcasting a resource location metadata update request is to ensure that all routing nodes receive the latest cached location information for the target information resource.

[0135] When a routing node receives a resource location metadata update request, it triggers a forwarding rule update. Based on the latest cache location information included in the request, the routing node updates its forwarding rules, ensuring that subsequent data transfers accurately route requests for the target information resource to the latest cache location, improving data transfer efficiency and accuracy.

[0136] Step S330: receiving a rule update confirmation signal returned by the routing node, and counting the number of routing nodes that have confirmed the update and a list of unconfirmed nodes.

[0137] After completing a forwarding rule update, a routing node returns a rule update confirmation signal. After receiving these rule update confirmation signals, the system counts the number of routing nodes that have confirmed the update. It also keeps a record of routing nodes that have not returned confirmation signals, forming a list of unconfirmed nodes. Counting the number of routing nodes that have confirmed the update allows the system to understand the execution status of the forwarding rule update, while the list of unconfirmed nodes is used for subsequent follow-up and processing.

[0138] Step S340: resending the metadata update request to the routing nodes in the unconfirmed node list, and starting a retry counter to limit the number of transmissions.

[0139] For routing nodes in the unconfirmed node list, metadata update requests can be resent to ensure that these nodes can also update their forwarding rules in a timely manner, avoiding data transmission problems caused by some nodes not updating their rules.

[0140] During the request resending process, a retry counter can be started. The retry counter is used to record the number of times the request is resent. Setting a limit on the number of resends is to avoid sending requests endlessly and wasting network resources. For example, when the retry counter reaches the preset maximum number of retries, the request will stop being sent to the node.

[0141] Step S350: When the retry counter reaches a preset maximum retry threshold and no confirmation signal is received, the routing nodes in the unconfirmed node list are marked as abnormal nodes and a network topology reconstruction process is triggered.

[0142] If the retry counter reaches the preset maximum retry threshold and no confirmation signal is received from the routing node in the unconfirmed node list, it means that the routing node may have an abnormality, such as a network failure or node failure. In this case, the routing node can be marked as an abnormal node.

[0143] After marking abnormal nodes, the network topology reconstruction process can be triggered. The purpose of the network topology reconstruction process is to re-plan the network topology structure, bypass abnormal nodes, and ensure the normal operation of the network and the effective transmission of data.

[0144] For example, step S351: obtaining the global topology diagram of the distributed network and the connection status data between nodes.

[0145] When triggering the network topology reconstruction process, the first step is to obtain the global topology diagram and inter-node connection status data of the distributed network. The global topology diagram shows the location of all nodes in the network and the connections between them, while the inter-node connection status data records the status of each connection, such as availability and bandwidth. This data can be obtained through a network management system or information exchange between nodes. Information from each node can be collected and integrated into the global topology diagram and inter-node connection status data, providing the foundation for subsequent topology reconstruction.

[0146] Step S352: Remove the abnormal node and all its associated connection edges from the global topology graph to generate an initial reconstructed topology graph.

[0147] After obtaining the global topology and node connectivity data, we can remove outlier nodes and all their associated edges from the global topology. Outlier nodes are previously marked as nodes that have not responded to metadata update requests and have reached the maximum number of retries. After removing outlier nodes and their associated edges, we obtain an initial reconstructed topology. This initial reconstructed topology reflects the network topology after removing the outlier nodes, providing a foundation for further topology optimization.

[0148] Step S353: Calculate the size of each connected subgraph in the initial reconstructed topological graph, and mark the connected subgraph with a size smaller than a preset threshold as an invalid partition.

[0149] After obtaining the initial reconstructed topology, the size of each connected subgraph can be calculated. A connected subgraph is a set of interconnected nodes in the graph. Size can be measured by the number of nodes or edges. Connected subgraphs with a size below a preset threshold can be marked as invalid. The preset threshold is a criterion set based on the actual network conditions and performance requirements, and is used to determine whether the connected subgraph has sufficient size to maintain effective network communication. Marking invalid partitions allows for subsequent processing to restore network connectivity and performance.

[0150] Step S354: identifying candidate nodes with cross-partition connection capabilities in the invalid partition, and adding virtual connection channels for the candidate nodes to restore inter-partition communication.

[0151] For the connected subgraph marked as invalid partitions, we can identify candidate nodes with cross-partition connectivity capabilities. Candidate nodes are those that have the conditions and capabilities to connect to other partitions, such as having redundant network interfaces or strong communication capabilities.

[0152] After candidate nodes are identified, virtual connection channels can be added to them. Virtual connection channels can be implemented using software-defined networking (SDN) or virtual private networking (VPN) technologies. The purpose of adding virtual connection channels is to restore communication between the invalid partition and other partitions, allowing the network to re-establish a connected whole.

[0153] Step S355: recalculating the average path length and network diameter index of the global topology structure graph, and evaluating the network transmission efficiency after the topology reconstruction.

[0154] After adding a virtual link to restore inter-partition communication, you can recalculate the average path length and network diameter metrics of the global topology graph. The average path length is the average length of the shortest path between any two nodes in the network, and the network diameter is the longest shortest path between any two nodes in the network.

[0155] By recalculating these metrics, we can assess the network transmission efficiency after topology reconfiguration. Shorter average path lengths and smaller network diameters indicate higher network transmission efficiency. If these metrics improve, the topology reconfiguration has been effective. If these metrics do not improve significantly or deteriorate, further topology adjustments may be necessary.

[0156] Step S356: When the network transmission efficiency is lower than a preset efficiency threshold, a set of standby relay nodes is enabled to establish an additional data transmission path.

[0157] If the evaluation finds that the network transmission efficiency after the topology reconstruction is lower than the preset efficiency threshold, it means that the current network topology still cannot meet the network performance requirements. In this case, the backup relay node set can be activated. The backup relay node set is a pre-configured group of nodes that is used when network problems occur or when additional transmission paths are needed.

[0158] This embodiment can utilize a set of backup relay nodes to establish additional data transmission paths. These additional data transmission paths can bypass areas with poor performance, improving network transmission efficiency. When establishing additional data transmission paths, factors such as node load and connection bandwidth can be considered to ensure that the new paths can effectively share network traffic.

[0159] Step S357: Update the routing table information of all nodes according to the reconstructed global topology diagram, and synchronize it to the control plane database of the distributed network.

[0160] After completing the topology reconstruction and establishing additional data transmission paths, the routing table information of all nodes can be updated based on the reconstructed global topology. The routing table is important information that nodes use to determine the data transmission path. Updating the routing table information ensures that nodes can accurately route data to the target node.

[0161] The updated routing table information is synchronized to the distributed network's control plane database. The control plane database is the core database for storing and managing network configuration information in a distributed network. Synchronizing the updated routing table information to this database ensures that all nodes in the network have access to the latest routing information, thereby ensuring stable and efficient network operation.

[0162] Step S360: updating the node connection relationship of the distributed network according to the network topology reconstruction process, and generating a new optimal transmission path to bypass the abnormal node.

[0163] After the network topology reconstruction process is triggered, the node connectivity of the distributed network can be updated according to the process. This includes removing abnormal nodes and their associated connection edges, and recalculating the connectivity and paths between nodes.

[0164] Based on the updated node connectivity, a new optimal transmission path can be generated to bypass abnormal nodes. This can be achieved using methods such as the shortest path algorithm and the bandwidth-first algorithm, taking into account factors such as path length, bandwidth, and latency to ensure that the new transmission path can efficiently transmit data. The updated network topology and the new optimal transmission path are then applied to the distributed network, ensuring stable and efficient operation despite the presence of abnormal nodes.

[0165] In the above embodiment, during the data collection phase, for the acquisition of the status indicator set of multiple nodes in the distributed network, the collected data all come from legal and compliant channels. The collection of data such as real-time operation log data, historical security event record set, hardware redundancy configuration data, network topology connection strength data, and network transmission path characteristics is all carried out under the authorization of the node owner or manager. For privacy-sensitive data, a series of strict privacy protection and anti-leakage technical means are adopted. For example, during the data transmission process, encryption algorithms are used to encrypt the data to prevent the data from being stolen or tampered with during transmission. In terms of data storage, data is stored in a classified manner and different access rights are set. Only authorized personnel can access the corresponding data. At the same time, data is backed up regularly to prevent data loss or damage.

[0166] In the label management process, both the signature encoding of security threat types and the standardized alignment of various node status indicators are based on the principles of objectivity and fairness. Security threat types are encoded based on their actual characteristics and properties, without any subjective bias. During the standardized alignment process, all node indicators are processed according to unified standards and methods, ensuring that every node is treated fairly and is not discriminated against based on factors such as identity or status.

[0167] Regarding rule settings, the various preset thresholds, coefficients, and weights are determined through scientific analysis and evaluation. For example, the node cache trigger threshold, preset elimination threshold, priority threshold, congestion threshold, expiration threshold, and maximum retry threshold are all set based on the actual network operation and performance requirements to ensure stable and efficient operation, rather than based on any unfair or discriminatory factors. The cache value baseline coefficient, security level correction coefficient, dynamic transmission cost function, redundancy enhancement coefficient table, and weighting coefficients are also determined through extensive data analysis and experimentation to achieve optimal caching decisions, without favoritism or discrimination against specific nodes or resources.

[0168] During the recommendation decision-making process, whether determining the target cache value, local cache decision parameters, or cache synchronization task allocation, all are based on objective indicators and data. The calculation of the target cache value comprehensively considers multiple factors, including node resource usage status indicators, node safety level indicators, node anti-destruction performance indicators, and resource transmission cost indicators. Each factor has its own reasonable weight and calculation method to ensure the fairness and rationality of the decision. When allocating cache synchronization tasks, sorting and task allocation are carried out according to the cache synchronization priority of the intermediate nodes. The calculation of cache synchronization priority takes into account multiple factors such as the current cache load rate, available storage capacity, historical cache access records, network bandwidth utilization, processor load status, etc. of the intermediate nodes, avoiding human intervention and unfair allocation.

[0169] The principles of fairness and justice are also adhered to during the construction and training of AI models. The training data for the pre-trained security scoring model and task scheduling optimization model is rigorously screened and processed to ensure data diversity and representativeness, preventing discriminatory model results due to data bias. During model training, fairness assessment metrics and methods are employed to monitor and adjust model outputs, ensuring fairness and impartiality when processing different nodes and resources.

[0170] Throughout the implementation of this method, we aim to ensure the normal operation of the network, improve resource utilization efficiency, and maintain fairness and justice. Through strict systems and technical means, we ensure that each link complies with the requirements of the law and social morality, and that there are no violations of the law, violations of fairness and justice, or discrimination and prejudice. This provides a strong guarantee for the stable and sustainable development of the distributed network.

[0171] These principles are also strictly adhered to during operations such as cache resource distribution updates and network topology reconstruction. All nodes are treated equally when broadcasting resource location metadata update requests, triggering routing node forwarding rule updates, and performing network topology reconstruction. The handling of abnormal nodes is also based on objective criteria, namely, whether they respond to metadata update requests in a timely manner, rather than other node attributes. During the network topology reconstruction process, operations such as adding virtual connection channels to invalid partitions and enabling backup relay node sets are all aimed at restoring network connectivity and improving transmission efficiency, rather than favoring certain nodes or regions.

[0172] During cache health check execution, whether dynamically adjusting the execution cycle or forcing checks on priority resources, it's all based on actual resource availability and network status, not on any discriminatory factors. Real-time statistics are collected on target information resources' access frequency and data transfer volume, and the check cycle is dynamically adjusted based on this data. This ensures the accuracy and timeliness of cached data while avoiding excessive network pressure and ensuring that all resources are properly managed and maintained.

[0173] A supervision and audit mechanism has been established throughout the system's operation. Data collection, tag management, rule setting, and recommendation decision-making processes are regularly reviewed to ensure compliance with the law and the requirements of fairness and justice. Any violations discovered are promptly corrected and addressed to maintain the system's normal operation and fairness. Furthermore, a user feedback channel has been established to allow users to provide opinions and suggestions on system operations and decision-making, so that potential issues can be promptly identified and resolved, continuously optimizing system performance and fairness.

[0174] We strictly adhere to relevant laws and regulations regarding data usage and sharing. Collected node status metrics and other related information are used solely for local cache resource optimization and will not be disclosed to third parties or used for other illegal purposes. When sharing data with other systems or organizations, strict confidentiality and data usage agreements are in place to ensure data security and legal use.

[0175] Figure 2A schematic diagram illustrates exemplary hardware and software components of a node-state-based local cache resource optimization system 100, which can implement the concepts of the present application, according to some embodiments of the present application. For example, the processor 120 can be used in the node-state-based local cache resource optimization system 100 to perform the functions of the present application.

[0176] The node state-based local cache resource optimization system 100 can be a general-purpose server or a special-purpose server, both of which can be used to implement the node state-based local cache resource optimization method of this application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.

[0177] For example, the local cache resource optimization system 100 in combination with node status may include a network port 110 connected to the network, one or more processors 120 for executing program instructions, a communication bus 130, and storage media 140 in different forms, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the local cache resource optimization system 100 in combination with node status may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The local cache resource optimization system 100 in combination with node status also includes an I / O interface 150 between the computer and other input and output devices.

[0178] For ease of explanation, only one processor is described in the local cache resource optimization system 100 in combination with node status. However, it should be noted that the local cache resource optimization system 100 in combination with node status in the present application may also include multiple processors, so the steps performed by one processor described in the present application may also be performed jointly or individually by multiple processors. For example, if the processor of the local cache resource optimization system 100 in combination with node status executes step A and step B, it should be understood that step A and step B may also be executed jointly by two different processors or individually in one processor. For example, the first processor executes step A, the second processor executes step B, or the first processor and the second processor execute steps A and B together.

[0179] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the local cache resource optimization method combined with the node status as described above is implemented.

[0180] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.

Claims

1. A local cache resource optimization method combined with node status, characterized in that: The method comprises: Acquire a set of status indicators of multiple nodes in a distributed network, wherein the set of status indicators includes a node resource usage status indicator, a node safety level indicator, a node invulnerability performance indicator, and a resource transmission cost indicator; Calculating a target cache value of the current node for the target information resource based on the state indicator set, wherein the target cache value is positively correlated with the node resource usage state indicator and the node security level indicator, and negatively correlated with the resource transmission cost indicator; Modifying the target cache value in real time based on a preset dynamic adjustment factor to generate a local cache decision parameter that matches the current node; If the local cache decision parameter exceeds a preset node cache trigger threshold, the target information resource is stored in the local cache space of the current node, and a cache resource distribution update instruction is generated; Adjusting cache synchronization policies of adjacent nodes in the distributed network according to the cache resource distribution update instruction, so that the adjacent nodes perform cache resource collaborative operations based on the adjusted cache synchronization policies; The real-time correction of the target cache value based on the preset dynamic adjustment factor to generate a local cache decision parameter matching the current node includes: Real-time monitoring of the remaining capacity of the local cache space of the current node and the storage space requirement of the target information resource; When the remaining capacity of the local cache space is less than the storage space requirement, a cache space shortage alarm signal is generated, and a cache resource elimination strategy is triggered based on the cache space shortage alarm signal; Calculating priority scores of information resources stored in the local cache space according to the cache resource elimination strategy, and marking stored information resources with priority scores lower than a preset elimination threshold as replaceable resources; Comparing the difference between the target cache value and the priority score of the replaceable resource, and generating a cache replacement execution instruction if the target cache value exceeds the maximum replaceable resource score; releasing the storage space corresponding to the replaceable resource based on the cache replacement execution instruction, and calculating the remaining capacity of the local cache space after the release; If the remaining capacity of the released local cache space still cannot meet the storage space demand, the cache resource elimination strategy is recursively executed until the released space meets the demand or there is no replacement resource; Dynamically adjust the weight of the dynamic adjustment factor according to the ratio of the final available capacity to the storage demand, wherein the lower the available capacity ratio, the greater the correction amplitude of the dynamic adjustment factor on the target cache value; generating the local cache decision parameter based on the revised target cache value; The adjusting the cache synchronization strategy of adjacent nodes in the distributed network according to the cache resource distribution update instruction includes: Parsing the target information resource identifier and source node location information in the cache resource distribution update instruction; Querying the topology data of the distributed network according to the location information of the source node to determine the optimal transmission path between the current node and the source node and the set of nodes covered by the path; Sending a cache synchronization detection request to each intermediate node in the path coverage node set, wherein the cache synchronization detection request includes the target information resource identifier and the local cache decision parameter; Receiving cache status response data returned by the intermediate node, the cache status response data including the current cache load rate and available storage capacity of the intermediate node; Calculating the cache synchronization priority of the intermediate node according to the current cache load rate and the available storage capacity, and sorting the intermediate nodes according to the cache synchronization priority; Performing an association analysis on the sorted intermediate node queue and the local cache decision parameters to generate a cache synchronization task allocation list, wherein the role and task amount of each intermediate node in the cache synchronization task are determined through the association analysis, and based on the results of the association analysis, the cache synchronization task allocation list is generated, wherein the cache synchronization task allocation list records the specific content and requirements of the cache synchronization tasks that each intermediate node needs to perform; Before sending the cache synchronization policy instruction, check whether the available storage capacity of the intermediate node is greater than the data volume of the target information resource. If so, give priority to the full cache copy instruction. If not, select the incremental cache update instruction based on the version difference data volume of the target information resource, or only send the cache metadata backup instruction; Furthermore, when the available storage capacity of the intermediate node is lower than a preset safety threshold, allocating cache synchronization tasks to the intermediate node is suspended and the intermediate node is marked as a restricted node.

2. The local cache resource optimization method according to claim 1, characterized in that: The obtaining of a set of status indicators of multiple nodes in a distributed network includes: Traversing the real-time operation log data of all nodes in the distributed network, extracting the resource access frequency and resource storage capacity occupancy ratio of the nodes within a preset time window, and normalizing the resource access frequency and resource storage capacity occupancy ratio to obtain the node resource usage status indicator; Calling a node security audit interface to obtain a set of historical security event records for the node, encoding the security threat types in the set of historical security event records to generate a security threat encoding vector, inputting the security threat encoding vector into a pre-trained security scoring model, and outputting the node security level indicator; monitoring hardware redundancy configuration data and network topology connection strength data of the node, calculating a node device replacement rate based on the hardware redundancy configuration data, constructing an invulnerability performance evaluation function in combination with the network topology connection strength data, and generating the node invulnerability performance index using the invulnerability performance evaluation function; Counting network transmission path characteristics between the node and the source node to which the target information resource belongs, and calculating the resource transmission cost index based on the number of path hops, link bandwidth and transmission delay data in the network transmission path characteristics; The node resource usage status indicator, the node safety level indicator, the node invulnerability performance indicator and the resource transmission cost indicator are standardized and aligned to generate the status indicator set.

3. The local cache resource optimization method according to claim 1, characterized in that: Calculating the target cache value of the current node for the target information resource according to the state indicator set includes: Extracting a first value of the node resource usage status indicator, a second value of the node security level indicator, a third value of the resource transmission cost indicator, and a fourth value of the node invulnerability performance indicator from the status indicator set; Performing weighted processing on the first value based on a preset cache value benchmark coefficient to generate a resource usage status contribution value; determining a security level correction coefficient according to the second value and a preset security level mapping table, wherein the security level mapping table includes correction weight intervals corresponding to different security levels; Calling a dynamic transmission cost function to perform an inverse proportional transformation on the third value to generate a transmission cost suppression factor, wherein an output value of the dynamic transmission cost function decreases as the third value increases; determining a dynamic redundancy compensation weight according to the fourth value and a preset redundancy enhancement coefficient table, wherein the redundancy enhancement coefficient table stores compensation coefficients corresponding to different invulnerability performance index intervals; Normalizing the node resource usage status indicator, the node safety level indicator, and the node invulnerability performance indicator respectively, and converting them into forward gain coefficients within a uniform proportional range; Normalizing the resource transmission cost indicator and converting it into a reverse inhibition coefficient; The forward gain coefficients are weighted and summed to generate a comprehensive gain factor, which is then weighted-differed with the reverse suppression coefficient to obtain the target cache value.

4. The local cache resource optimization method according to claim 1, characterized in that: The calculating the cache synchronization priority of the intermediate node according to the current cache load rate and the available storage capacity includes: Obtaining historical cache access records of the intermediate node, and extracting resource request frequencies and resource type distribution characteristics from the historical cache access records; Determining a preference coefficient of the intermediate node for the resource type to which the target information resource belongs according to the resource type distribution characteristics; Calculating the expected cache utility value of the intermediate node based on the resource request frequency and the preference coefficient; Monitoring the real-time network bandwidth utilization and processor load status of the intermediate node, and calculating the node performance attenuation factor based on the real-time network bandwidth utilization and processor load status; Performing a weighted summation of the expected cache utility value and the node performance decay factor to obtain an initial synchronization priority score of the intermediate node; Performing a negative correction on the initial synchronization priority score according to the current cache load rate to obtain a corrected synchronization priority score; The cache synchronization priority level of the intermediate node is determined based on a comparison between the revised synchronization priority score and a preset priority threshold.

5. The local cache resource optimization method according to claim 1, characterized in that: After storing the target information resource in the local cache space of the current node, the method further includes: Creating a cache metadata index of the target information resource in the current node, wherein the cache metadata index includes a resource version identifier, a cache validity period, and source node verification information; Initiate a periodic cache health check task, wherein the cache health check task performs the following operations based on the cache metadata index: establish a communication connection with the source node through the source node verification information, verify the consistency of the resource version identifier with the current resource version of the source node, and verify the remaining duration of the cache validity period; When it is detected that the resource version identifier of the target information resource is inconsistent with the current resource version of the source node, an incremental data synchronization request is triggered, and version difference data is obtained from the source node based on the source node verification information and the local cache content is updated; When it is detected that the remaining duration of the cache validity period is lower than a preset expiration threshold, a cache renewal request including the resource version identifier and source node verification information is generated and sent to the source node, and the cache validity period is extended after receiving a renewal authorization response returned by the source node; The access frequency of the target information resource in the local cache space and the data transmission volume based on the cache metadata index record are counted in real time, and a period adjustment function including an access frequency factor, a data transmission volume factor and a cache validity period factor is established. The execution period of the cache health check task is dynamically adjusted according to the period adjustment function, wherein the execution period is negatively correlated with the access frequency factor and positively correlated with the data transmission volume factor.

6. The local cache resource optimization method according to claim 5, characterized in that: The start of the periodic cache health check task includes: Configure the basic execution interval and maximum allowed delay time of the cache health check task; Monitoring the system load status and network congestion level of the current node, and dynamically extending the basic execution interval according to the system load status; When it is detected that the network congestion level exceeds a preset congestion threshold, the delayed execution queue is enabled to temporarily store the cache health check task, and the tasks in the queue are executed in order of priority after the network congestion level decreases; Record the execution time and resource consumption data of each cache health check task, and train the task scheduling optimization model based on historical execution data; Calling the task scheduling optimization model to predict the node load change trend in the future time period, and dynamically adjusting the triggering time point of the cache health check task based on the prediction result; When it is detected that the target information resource is marked as a priority resource, a mandatory check instruction is generated to cover the dynamically adjusted trigger time point.

7. The local cache resource optimization method according to claim 1, characterized in that: After generating the cache resource distribution update instruction, the method further includes: Registering a cache location change event of the target information resource in a control plane of the distributed network, and generating a resource location metadata update request; Broadcasting the resource location metadata update request to all routing nodes in the distributed network to trigger a forwarding rule update operation of the routing nodes; Receive the rule update confirmation signal returned by the routing node, count the number of routing nodes that have confirmed the update and the list of unconfirmed nodes; Resending the metadata update request to the routing nodes in the unconfirmed node list and starting a retry counter to limit the number of transmissions; When the retry counter reaches a preset maximum retry threshold and no confirmation signal is received, marking the routing node in the unconfirmed node list as an abnormal node and triggering a network topology reconstruction process; The node connection relationship of the distributed network is updated according to the network topology reconstruction process, and a new optimal transmission path is generated to bypass the abnormal node.

8. A local cache resource optimization system combined with node status, characterized in that: It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the local cache resource optimization method combined with node status as described in any one of claims 1 to 7 above.

Citation Information

Patent Citations

  • Destroy-resistant wireless sensor network node under field survival conditions

    CN105611652A

  • Method for allocating millimeter wave phased-array antenna communication resources as required

    CN110891317A