An intelligent prediction-based industrial service cache optimization method and system
By using the Transformer model and SAC algorithm to optimize industrial service caching in industrial edge computing systems, the shortcomings of existing methods in caching decision-making are addressed. This enables collaborative caching and closed-loop optimization across multiple edge servers, improving cache resource utilization and adaptive decision-making capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN NORMAL UNIVERSITY
- Filing Date
- 2026-06-24
- Publication Date
- 2026-07-21
AI Technical Summary
Existing industrial edge service caching methods are unable to fully characterize the temporal changes in industrial service requests, lack joint state modeling of multiple edge servers and collaborative caching decision-making mechanisms, have a single optimization objective, and lack a closed-loop mechanism for prediction, decision-making, execution and feedback, resulting in weak adaptive caching decision-making capabilities.
The Transformer model is used to extract features from historical industrial service request sequences, construct a candidate cache service set, and perform joint optimization of multiple edge servers through a collaborative caching decision model based on the soft actor-critic algorithm (SAC). The model comprehensively considers cache hit rate, average total service response latency, wired backhaul link load, and service replacement cost, forming a closed-loop mechanism of prediction-decision-execution-feedback.
It improves the ability to predict service requests, enhances the utilization of edge cache resources, achieves a comprehensive trade-off between multiple optimization objectives, and strengthens the adaptive ability of cache decisions.
Smart Images

Figure CN122437887A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial Internet of Things and edge computing technology, and more specifically, relates to an industrial service caching optimization method and system based on intelligent prediction. Background Technology
[0002] With the rapid development of the Industrial Internet, edge computing, and artificial intelligence technologies, a large number of industrial devices are continuously generating intelligent computing tasks such as industrial visual inspection, equipment fault diagnosis, industrial video analysis, and predictive maintenance. Traditional industrial cloud computing models typically upload these tasks to the cloud for execution. While the cloud offers powerful computing capabilities, the stringent requirements of low latency and high reliability in industrial scenarios mean that uploading large-scale industrial tasks can lead to network congestion and increased task processing latency. Therefore, utilizing edge servers to pre-cachate industrial services has become an important research direction for reducing industrial task processing latency and alleviating cloud access pressure.
[0003] Existing industrial edge service caching methods mainly include static rule-based service caching methods and intelligent decision-based service caching methods. Static rule-based service caching methods deploy frequently requested industrial services on edge servers based on historical access frequency, fixed caching rules, or least recently used strategies. Intelligent decision-based service caching methods use machine learning or reinforcement learning methods to generate caching decisions based on changes in industrial service requests, edge server status, and cache status.
[0004] However, both existing industrial service caching methods have some significant drawbacks:
[0005] (1) The above-mentioned service caching method based on static rules is difficult to fully characterize the temporal change characteristics of industrial service requests, resulting in insufficient prediction ability of service requests in the next time slot;
[0006] (2) The above-mentioned service caching methods based on intelligent decision-making mostly take a single edge server as an independent decision-making object, lacking joint state modeling and collaborative caching decision-making mechanism for multiple edge servers, which can easily lead to duplicate caching or insufficient utilization of cache resources.
[0007] (3) The optimization objectives of the above two types of service caching methods are usually relatively simple, lacking a comprehensive consideration of indicators such as cache hit rate, average total service response latency, wired backhaul link load and service replacement cost, which makes it difficult to meet the comprehensive optimization needs of the system.
[0008] (4) Most of the above-mentioned service caching methods based on intelligent decision-making lack a closed-loop mechanism between prediction, decision-making, execution and feedback, making it difficult to dynamically adjust the scope of candidate cache services according to the cache execution results and policy uncertainty, resulting in weak adaptive cache decision-making capabilities. Summary of the Invention
[0009] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides an industrial service caching optimization method and system based on intelligent prediction. Its purpose is to solve the following technical problems: Firstly, existing static rule-based service caching methods struggle to fully characterize the temporal changes in industrial service requests, leading to insufficient prediction capabilities for service requests in the next time slot. Secondly, existing intelligent decision-based service caching methods often treat a single edge server as an independent decision-making object, lacking joint state modeling and collaborative caching decision-making mechanisms across multiple edge servers, easily resulting in duplicate caching or insufficient cache resource utilization. Thirdly, most lack a closed-loop mechanism between prediction, decision-making, execution, and feedback, making it difficult to dynamically adjust the candidate cache service range based on cache execution results and policy uncertainties, resulting in weak adaptive cache decision-making capabilities. Finally, the optimization objectives of the above two types of service caching methods are usually relatively singular, lacking a comprehensive consideration of indicators such as cache hit rate, average total service response latency, wired backhaul link load, and service replacement cost, making it difficult to meet the comprehensive optimization needs of the system.
[0010] To achieve the above objectives, according to one aspect of the present invention, an industrial service caching optimization method based on intelligent prediction is provided, which is applied to an industrial edge computing system comprising I industrial devices, M edge servers, and a cloud, wherein I and M are arbitrary natural numbers. The method includes the following steps:
[0011] (1) The i-th industrial device generates an industrial task at time t and sends an industrial service request message and the parameters of the industrial task to its m-th edge server. The parameters include the industrial services required by the i-th industrial device to generate the industrial task at time t. ,in , , T represents the total number of time slots divided within a preset operating cycle of the industrial edge computing system;
[0012] (2) The m-th edge server constructs the nearest edge service request based on the industrial service request information received in step (1) using a sliding window method. Historical industrial service request sequence within a time slot and the historical industrial service request sequence Input a Transformer model to obtain the set of candidate caching services for the m-th edge server at time t+1. ,in The value range is from 5 to 20;
[0013] (3) The cloud uses the candidate cache service set obtained in step (2) All M edge servers are modeled as M caching decision agents. Based on all caching decision agents, and using a collaborative caching decision model based on the soft actor-critic algorithm (SAC), the binary caching decision of the m-th edge server for the final industrial service at time t+1 is generated. :
[0014] (4) The m-th edge server makes a binary caching decision for the final industrial service at time t+1 based on the result of step (3). Update its local cache content to obtain the local cache state of the m-th edge server at time t+1.
[0015] Preferably, the parameters of the industrial task also include industrial services. The type number k in the pre-set set of industrial service type numbers, and the amount of industrial task data generated at time t. Computing resource requirements and maximum tolerable latency ; K represents the total number of industrial service types in the industrial edge computing system;
[0016] The industrial service caching optimization method further includes the following steps after step (1) and before step (2):
[0017] (A) The m-th edge server obtains its local cache state for the k-th type of industrial service at time t. And based on the local cache state Determine the industrial services required by the i-th industrial equipment to generate the industrial task at time t. Whether to cache it within itself; if so, set the local acquisition identifier of the i-th industrial device at time t. Configure the neighbor edge server of this industrial equipment to obtain the identifier. and cloud-based identification of the industrial equipment And proceed to step (D), otherwise set the local acquisition identifier of the i-th industrial device at time t. , and proceed to step (B);
[0018] (B) The m-th edge server determines industrial services Whether to cache in one of its neighbor edge servers in the set of neighbor edge servers; if so, then set the neighbor edge server of the i-th industrial device to obtain the identifier at time t. Configure the local acquisition identifier for this industrial equipment. Obtaining identifiers from the cloud And based on the transmission rate between the nth neighboring edge server and the mth edge server at time t. Obtaining this industrial service Neighbor service acquisition latency Proceed to step (D), otherwise set the neighbor edge server to obtain the identifier. And proceed to step (C); where This indicates that the cache has industrial services. The sequence number of the neighboring edge server in the edge server set;
[0019] (C) The m-th edge server obtains the industrial services required for this industrial task from the cloud. Set the cloud-based identifier for the i-th industrial device at time t. Configure the local acquisition identifier for this industrial equipment. Obtain identifiers from neighboring edge servers And based on the wired backhaul link capacity of the m-th edge server at time t. Obtain the industrial services Corresponding cloud service acquisition latency And proceed to step (D);
[0020] (D) The m-th edge server obtains the industrial task parameters and the local identifier of the industrial equipment based on the industrial equipment obtained in step (1). Obtaining identifiers from neighboring edge servers and cloud-based identification The neighbor service acquisition delay obtained in step (B) and the cloud service acquisition latency obtained in step (C). Get the service cache hit rate of the m-th edge server at time t. Average total service response time Wired backhaul link load and service replacement costs The caching revenue of the m-th edge server, which consists of the four components, at time t. And the caching revenue obtained by all edge servers at time t The overall cache gain of the industrial edge computing system at time t is obtained by integrating the results, and the optimization objective P1 of the industrial edge computing system is obtained based on the overall cache gain.
[0021] Preferably, the industrial service is obtained in step (B). Corresponding Neighbor Service Acquisition Latency The following formula is used:
[0022] ;
[0023] The communication between the nth neighbor edge server and the mth edge server uses orthogonal frequency division multiple access. , This represents the sub-channel communication bandwidth between the m-th edge server and its n-th neighboring edge server. This represents the transmission power of the m-th edge server at time t. Let represent the channel gain between the m-th edge server and its n-th neighboring edge server at time t, and let it follow an exponential distribution. This represents the noise power of the wireless channel. Let represent the interference power experienced by the communication between the nth neighboring edge server and the mth edge server at time t. This represents the data size of the k-th type of industrial service. This represents the cache state of the nth neighboring edge server for the kth type of industrial service at time t. This represents the set of neighboring edge servers of the m-th edge server;
[0024] Cloud service acquisition latency in step (D) The calculation formula is as follows:
[0025] ;
[0027] Preferably, step (D) specifically involves:
[0028] First, the m-th edge server obtains the local identifier of the industrial equipment based on the information obtained in step (A). Get the service cache hit rate of the m-th edge server at time t. ;
[0029] Subsequently, the m-th edge server calculates the amount of industrial task data generated by the i-th industrial device at time t. And the transmission rate between the i-th industrial device and the m-th edge server at time t. Get the industrial task upload delay generated by the i-th industrial device at time t. :
[0030] Then, the m-th edge server obtains the identifier locally from the industrial equipment. Obtaining identifiers from neighboring edge servers Obtaining identifiers from the cloud The neighbor service acquisition delay obtained in step (B) and the cloud service acquisition latency obtained in step (C). The service retrieval latency for the industrial services required by the industrial task generated by the i-th industrial device at time t is obtained. Subsequently, the m-th edge server determines the computing resource requirements of the industrial task generated by the i-th industrial device at time t. Obtain the computation latency of this industrial task on the m-th edge server. :
[0031] Then, the m-th edge server uploads latency based on the industrial task. Service acquisition latency and computational delay Get the total service response delay of the industrial tasks generated by the i-th industrial device at time t. :
[0032] Subsequently, the m-th edge server determines the total service response latency based on the industrial tasks generated by the i-th industrial device at time t. Calculate the average total service response latency of the m-th edge server at time t. Subsequently, the m-th edge server obtains the identifier from the cloud at time t based on step (C). The load on the wired backhaul link generated by the m-th edge server acquiring industrial services from the cloud at time t is obtained. :
[0033] Then, the m-th edge server obtains the local cache state for the k-th type of industrial service at time t based on step (A). And the local cache state for the k-th type of industrial service at time t-1. Obtain the service replacement cost incurred by the m-th edge server updating its local cache content at time t. ;
[0034] Then, the m-th edge server is based on the service cache hit rate at time t. Average total service response time Wired backhaul link load and service replacement costs Obtain the cache revenue at time t. :
[0035] Finally, the long-term average of the caching gains of the industrial edge computing system over T time slots is taken to obtain the optimization objective P1 of the industrial edge computing system.
[0036] Preferably, the service cache hit rate of the m-th edge server at time t. equal:
[0037] ;
[0038] in, This represents the set of indices of all industrial devices that send industrial service requests to the m-th edge server at time t. This represents the total number of indices in the index set of all industrial devices that send industrial service requests to the m-th edge server at time t.
[0039] The average total service response latency of the m-th edge server at time t equal:
[0040] ;
[0041] The m-th edge server acquires the wired backhaul link load generated by the industrial service from the cloud at time t. equal:
[0042] ;
[0043] in, This represents the capacity of the wired backhaul link between the m-th edge server and the cloud at time t;
[0044] The service replacement cost incurred when the m-th edge server updates its local cache at time t. equal:
[0045] ;
[0046] in, This represents the unit replacement cost of the k-th type of industrial service;
[0047] Cache benefits at time t equal:
[0048] ;
[0049] in, To normalize the average total service response time, (t) represents the preset maximum tolerable delay; To normalize the load on the wired backhaul link, This represents the maximum load value when the backhaul link is fully loaded. To normalize service replacement costs, To maximize the theoretical service replacement cost; These are weighting coefficients used to adjust the impact of service cache hit rate, average total service response latency, wired backhaul link load, and service replacement cost on cache benefits, respectively, and satisfying the following conditions: ;
[0050] The optimization objective P1 of the industrial edge computing system is equal to:
[0051] ;
[0052] ;
[0053] Among them, the C1 constraint indicates that the edge server cache capacity is limited; the C2 constraint indicates that the industrial service cache state is a binary variable; the C3 constraint indicates the uniqueness constraint of the service acquisition method of the industrial task generated by the i-th industrial device at time t; and the C4 constraint indicates the service acquisition constraint of the neighboring edge server.
[0054] Preferably, step (2) includes the following sub-steps:
[0055] (2-1) The m-th edge server obtains its own information from the industrial service request information received in step (1). Continuous to t The number of each type of industrial service request received within each time slot is used to construct a historical industrial service request sequence at time t using a sliding window approach based on this number. :
[0056] ;
[0057] in, Let represent the statistical vector of industrial service requests received by the m-th edge server at time t, and we have:
[0058] ;
[0059] in, This represents the number of requests for the k-th type of industrial service received by the m-th edge server at time t;
[0060] (2-2) The m-th edge server obtains the historical industrial service request sequence in step (2-1). The industrial service request statistics vector obtained in step (2-1) Vectorization encoding is performed to obtain the input feature vector of the m-th edge server at time t. :
[0061] ;
[0062] in, This represents a trainable vectorized mapping matrix of service requests. This represents the bias vector. The time position code at time t is calculated as follows:
[0063] ;
[0064] ;
[0065] in, This represents the position code of the p-th time position in an even-numbered dimension. This represents the positional encoding of the p-th time position in an odd-numbered dimension, where j represents the dimension index in the positional encoding vector; d represents the input feature vector. The dimension of p is [1,..,w];
[0066] (2-3) The m-th edge server uses the input feature vector obtained in step (2-2) Obtain the input feature sequence of the Transformer :
[0067] ;
[0068] (2-4) The m-th edge server will process the input feature sequence obtained in step (2-3). The input is a Transformer encoder, which utilizes a multi-head self-attention mechanism to extract correlation features between different industrial services and between different time slots, and then obtains the predicted probability vector of industrial service requests at time t+1. :
[0069] ;
[0070] in, Represents the normalized exponential function, Indicates Transformer encoder; This represents the weight matrix of the probability output layer in the Transformer encoder; This represents the bias vector of the probability output layer in the Transformer encoder;
[0071] (2-5) The m-th edge server sorts all K types of industrial services according to the predicted probabilities of all industrial service requests in the predicted probability vector of industrial service requests at time t+1 obtained in step (2-4), so as to obtain the candidate cache service set of the m-th edge server at time t+1. :
[0072] ;
[0073] in, This means selecting the previous ones according to their predicted probabilities from high to low. Operations for each type of industrial service. This represents the number of candidate cache services for the m-th edge server at time t+1, which can be set as the base number of candidates. Alternatively, it can be dynamically adjusted by combining the policy entropy at time t-1, and its calculation method is as follows:
[0074] ;
[0075] in, This represents the policy entropy obtained by the m-th edge server during the caching decision-making process at time t-1; This represents the maximum dynamic increment of the number of candidate cache services. This represents the policy entropy threshold, with a value ranging from 0.5 to 0.7. Indicates the temperature coefficient; Represents the Sigmoid function; This indicates the floor function.
[0076] Preferably, step (3) includes the following sub-steps:
[0077] (3-1) The set of candidate cache services for the m-th edge server at time t+1, obtained from step (2-5). Based on its remaining cache capacity, candidate service characteristics, and overall load status at time t, the local state space of the m-th edge server at time t is constructed. :
[0078] ;
[0079] in, Let represent the candidate service feature set constructed from the candidate cache service set of the m-th edge server at time t (which is time t+1), and it is equal to:
[0080] ;
[0081] in, Let represent the feature vector constructed by the m-th edge server for the k-th candidate industrial service at time t, and it is equal to:
[0082] ;
[0083] in, This represents the predicted probability of the m-th edge server making a request for the k-th type of industrial service at time t+1;
[0084] This represents the remaining cache capacity of the m-th edge server at time t. Let represent the overall load state of the m-th edge server at time t, and it is equal to:
[0085] ;
[0086] in, This represents the wired backhaul link load of the m-th edge server at time t; and Let be the weight coefficient, and satisfy... ;
[0087] (3-2) The local state space of the m-th edge server at time t obtained in step (3-1) in the cloud. Obtain the global state space of M edge servers at time t. :
[0088] ;
[0089] (3-3) The m-th edge server will use the local state space obtained in step (3-1) Input the action output branch of the SAC-based collaborative caching decision model to obtain the action of the m-th edge server for the candidate caching service set. Cache action probability vector And based on the cache action probability vector Construct the joint caching action probability vector for all M edge servers at time t. Among them are:
[0090] ;
[0091] in, This represents the probability of the m-th edge server caching the k-th candidate industrial service at time t; the higher this caching probability, the more likely the m-th edge server is to cache the k-th industrial service at time t+1.
[0092] (3-4) The m-th edge server uses the candidate cache service set obtained in step (3-3) The probability of caching actions is used to obtain the policy entropy of the m-th edge server at time t. :
[0093] ;
[0094] in, Represents a very small positive number;
[0095] (3-5) The cache revenue of the industrial edge computing system at time t obtained from step (D) is used as the local instant cache reward of the m-th edge server at time t. ;
[0096] (3-6) The cloud provides local real-time cache rewards for all edge servers at time t. Integrate to obtain the global cache reward for building an industrial edge computing system at time t. :
[0097] ;
[0098] (3-7) The global state space of the M edge servers in the cloud at time t, obtained from step (3-2). The joint caching action probability vector of the M edge servers at time t obtained in step (3-3) The global cache reward of the industrial edge computing system at time t obtained in steps (3-6) And the global state space of the M edge servers obtained in step (3-2) at time t+1. Construct global experience samples at time t :
[0099] ;
[0100] (3-8) The cloud will use the global experience samples obtained in step (3-7) The data is stored in a pre-established shared experience replay pool. Multiple experience samples are randomly sampled from the shared experience replay pool. Subsequently, the cloud updates the parameters of the two Q-evaluation networks and the shared policy network in the SAC-based collaborative caching decision model based on the multiple experience samples, and performs a soft update on the target Q-evaluation network to obtain the updated parameters of the shared policy network.
[0101] (3-9) The m-th edge server obtains the updated sharing policy network parameters from the cloud in step (3-8). For the local state space of itself at time t obtained in step (3-1) The input is processed by a shared policy network to obtain a set of candidate industrial services. The caching action probabilities of each candidate industrial service are used to sort all candidate industrial services in descending order to obtain a priority sequence of candidate industrial services. Then, all candidate industrial services in this priority sequence that satisfy constraint C1 in the cache optimization objective P1 are selected as the binary caching decision for the final industrial service by the m-th edge server at time t+1. .
[0102] Preferably, step (3-8) specifically involves:
[0103] First, the cloud will process the global experience samples obtained in steps (3-7). Stored in a pre-established shared experience replay pool, which is used to store global experience samples generated in different time slots;
[0104] Then, the cloud randomly samples experience samples from the shared experience replay pool to obtain experience sample batches;
[0105] Then, for the global experience samples in the experience sample batch, the cloud performs global state space analysis based on their time t+1. And generate the corresponding joint cache action probability vector at time t+1 using the shared policy network. Building goals value :
[0106] Then, the cloud determines the target The parameters of the two Q-evaluation networks are updated using the empirical sample batches obtained from the sampling and values, in order to obtain their loss functions. :
[0107] Subsequently, the cloud platform adjusts the parameters of the j-th Q-evaluation network based on the loss function of each Q-evaluation network. Perform an update to obtain the parameters of the updated Q-evaluation network:
[0108] Subsequently, the cloud uses the global state space obtained from the sampling. Regenerate the joint cache action probability vector using the current shared policy network. And based on the joint cache action probability vector Obtain the loss function of the shared policy network :
[0109] Subsequently, the cloud uses the loss function of the shared policy network. Parameters of the shared policy network Perform gradient descent updates to obtain the updated parameters of the shared policy network:
[0110] Subsequently, the cloud platform updated the parameters of the Q-rated network. Soft update objective Q-evaluation network parameters :
[0111] Finally, the cloud evaluates the network parameters based on the two Q-squares. Parameters of shared policy networks and the parameters of the target Q evaluation network The updated results are used to complete the centralized training and update of the SAC-based collaborative caching decision model, and the parameters of the updated shared policy network are obtained.
[0112] Preferably, the target value equal:
[0113] ;
[0114] in, Indicates the discount factor. Represents the strategy entropy temperature coefficient. Denotes the j-th objective in the SAC-based collaborative caching decision model. Evaluate the network, This represents the shared policy network of the SAC-based collaborative caching decision model. The parameters of the shared policy network are denoted as j∈[1,2];
[0115] The loss function for each Q-evaluation network is equal to:
[0116] ;
[0117] in, This indicates a shared experience replay pool. This represents the j-th Q-evaluation network of the SAC-based collaborative caching decision model. This represents the parameters of the j-th Q-evaluation network;
[0118] The updated parameters of the Q-evaluation network are:
[0119] ;
[0120] in, Q represents the learning rate of the network. This represents the loss function of each Q-evaluation network. Regarding parameters The gradient;
[0121] The loss function of a shared policy network is equal to:
[0122] ;
[0123] in, Parameters representing shared policy networks, This represents the strategy entropy temperature coefficient;
[0124] The updated parameters of the shared policy network are:
[0125] ;
[0126] in, This represents the learning rate of a shared policy network. Represents the loss function of a shared policy network. Parameters of shared policy networks The gradient;
[0127] Soft update objective Q-evaluation network parameters equal:
[0128] ;
[0129] in, This indicates the soft update parameter.
[0130] According to another aspect of the present invention, an industrial service caching optimization system based on intelligent prediction is provided. This system is applied in an industrial edge computing system comprising I industrial devices, M edge servers, and a cloud, where I and M are arbitrary natural numbers. The system includes the following modules:
[0131] The first module, located on the i-th industrial device, is used to generate industrial tasks at time t and send industrial service request information and parameters of the industrial task to its m-th edge server. These parameters include the industrial services required by the i-th industrial device to generate the industrial task at time t. ,in , , T represents the total number of time slots divided within a preset operating cycle of the industrial edge computing system;
[0132] The second module, located on the m-th edge server, is used to construct the nearest edge server based on the industrial service request information received from the first module, using a sliding window approach. Historical industrial service request sequence within a time slot and the historical industrial service request sequence Input a Transformer model to obtain the set of candidate caching services for the m-th edge server at time t+1. ,in The value range is from 5 to 20;
[0133] The third module, located in the cloud, is used to process the candidate cache service set obtained from the second module. All M edge servers are modeled as M caching decision agents. Based on all caching decision agents, and using a collaborative caching decision model based on the soft actor-critic algorithm (SAC), the binary caching decision of the m-th edge server for the final industrial service at time t+1 is generated. :
[0134] The fourth module, located on the m-th edge server, is used to make binary caching decisions for the final industrial service based on the results obtained from the third module at time t+1. Update its local cache content to obtain the local cache state of the m-th edge server at time t+1.
[0135] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:
[0136] (1) Since the present invention adopts step (2), it uses the Transformer model to extract features and predict probabilities of historical industrial service request sequences to obtain the prediction probability vector of various industrial service requests at time t+1. Therefore, it can solve the technical problems of existing service caching methods based on static rules that are difficult to fully characterize the temporal change features of industrial service requests and have insufficient prediction ability of service requests in the next time slot.
[0137] (2) Because the present invention adopts step (3), by modeling multiple edge servers as multiple cache decision agents and using the SAC-based collaborative cache decision model for joint optimization, it can solve the technical problems of existing intelligent decision-based service caching methods lacking multi-edge server collaborative caching mechanism and low edge cache resource utilization.
[0138] (3) Since the present invention adopts steps (D) and (3), it constructs cache revenue by comprehensively considering cache hit rate, average total service response latency, wired backhaul link load and service replacement cost, and uses the cache revenue as the reward basis for the collaborative caching decision model. Therefore, it can solve the technical problem of the single optimization target of the two existing service caching methods.
[0139] (4) Since the present invention adopts steps (2) to (4), by sequentially completing candidate cache service prediction, final industrial service binary cache decision and local cache status update, and feeding back the cache execution result to the subsequent prediction and decision process, it can solve the technical problems of existing intelligent decision-based service caching methods lacking prediction, decision, execution and feedback closed-loop mechanism and having weak cache decision adaptive capability. Attached Figure Description
[0140] Figure 1 This is a flowchart of the industrial service caching optimization method based on intelligent prediction of the present invention. Detailed Implementation
[0141] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0142] The basic idea of this invention is to provide an industrial service caching optimization method based on intelligent prediction. First, industrial equipment generates an industrial task and sends industrial service request information and task parameters to its associated edge server. The edge server, based on the industrial service required by the task, sequentially checks whether the corresponding industrial service exists on its local edge server, neighboring edge servers, and in the cloud, determining the service acquisition method. Subsequently, based on the service acquisition method and cache status, it calculates the service cache hit rate, average total service response latency, wired backhaul link load, and service replacement cost to construct an industrial service caching optimization objective.
[0143] Based on this, the Transformer model is used to obtain the predicted probability of industrial service requests at time t+1 according to the historical industrial service request sequence, and a candidate cache service set is generated. Then, the candidate service features, remaining cache capacity, and comprehensive load status are input into a collaborative caching decision model based on the Soft Actor-Critic (SAC) algorithm to generate the final binary caching decision for the industrial service under the constraint of cache capacity. Finally, the local cache state of the edge server is updated according to the final binary caching decision for the industrial service, and the cache benefit, policy entropy, and the final binary caching decision for the industrial service are used in the subsequent cache optimization process, thus forming a closed loop of "prediction-decision-execution-feedback" for proactive cache optimization of industrial services.
[0144] like Figure 1 As shown, this invention provides an industrial service caching optimization method based on intelligent prediction, which is applied to an industrial edge computing system including I industrial devices, M edge servers, and the cloud (where I and M are arbitrary natural numbers). The method includes the following steps:
[0145] (1) The i-th industrial device generates an industrial task at time t and sends an industrial service request message and the parameters of the industrial task to its m-th edge server. The parameters include the industrial services required by the i-th industrial device to generate the industrial task at time t. Its type number k in the pre-set set of industrial service type numbers, and the amount of data of the industrial task generated at time t. Computing resource requirements and maximum tolerable latency ,in , , , K represents the total number of industrial service types in the industrial edge computing system, and T represents the total number of time slots divided by the industrial edge computing system within a preset operating cycle.
[0146] (2) The m-th edge server obtains its local cache status for the k-th type of industrial service at time t. And based on the local cache state Determine the industrial services required by the i-th industrial equipment to generate the industrial task at time t. Whether it is cached within itself, if so, indicates that the industrial service The acquisition method is to obtain it from the local edge server, and set the local acquisition identifier of the i-th industrial device at time t. (The superscript 'l' in the numerical symbol indicates 'local', meaning local). Configure the neighboring edge server of this industrial device to obtain the identifier. and cloud-based identification of the industrial equipment And proceed to step (5), otherwise set the local acquisition identifier of the i-th industrial device at time t. , and proceed to step (3);
[0147] (3) The m-th edge server determines the industrial services required by the i-th industrial device at time t for the industrial task. Whether it is cached on one of its neighboring edge servers in the set of neighboring edge servers; if so, it indicates that the industrial service... The method of obtaining the identifier is from the neighboring edge server. The identifier of the i-th industrial device at time t is obtained from the neighboring edge server. (Where the superscript 'e' indicates edge, i.e., edge server), set the local acquisition identifier for this industrial device. Obtaining identifiers from the cloud And based on the transmission rate between the nth neighboring edge server and the mth edge server at time t. Obtaining this industrial service Neighbor service acquisition latency And proceed to step (5), otherwise set the neighbor edge server to obtain the identifier. and proceed to step (4); where This indicates that the cache has industrial services. The sequence number of the neighboring edge server in the edge server set;
[0148] Specifically, this step involves obtaining the industrial service. Corresponding Neighbor Service Acquisition Latency The following formula is used:
[0149] ;
[0150] The communication between the nth neighboring edge server and the mth edge server uses orthogonal frequency division multiple access (OFDMA). , This represents the sub-channel communication bandwidth between the m-th edge server and its n-th neighboring edge server. This represents the transmission power of the m-th edge server at time t. Let represent the channel gain between the m-th edge server and its n-th neighboring edge server at time t, and let it follow an exponential distribution. This represents the noise power of the wireless channel. Let represent the interference power experienced by the communication between the nth neighboring edge server and the mth edge server at time t. This represents the data size of the k-th type of industrial service. This represents the cache state of the nth neighboring edge server for the kth type of industrial service at time t. This represents the set of neighboring edge servers of the m-th edge server.
[0151] (4) The m-th edge server obtains the industrial services required for the industrial task from the cloud. Set the cloud-based identifier for the i-th industrial device at time t. (The superscript 'c' in the numerical symbol indicates 'cloud,' meaning the cloud platform), setting the local acquisition identifier for this industrial device. Obtain identifiers from neighboring edge servers And based on the wired backhaul link capacity of the m-th edge server at time t. Obtain the industrial services Corresponding cloud service acquisition latency , and proceed to step (5);
[0152] The cloud service acquisition latency in this step The calculation formula is as follows:
[0153] ;
[0154] (5) The m-th edge server obtains the industrial task parameters and the local identifier of the industrial equipment based on the industrial equipment obtained in step (1). Obtaining identifiers from neighboring edge servers and cloud-based identification The neighbor service acquisition delay obtained in step (3) and the cloud service acquisition latency obtained in step (4) Get the service cache hit rate of the m-th edge server at time t. Average total service response time Wired backhaul link load and service replacement costs The caching revenue of the m-th edge server, which consists of the four components, at time t. And the caching revenue obtained by all edge servers at time t The overall cache gain of the industrial edge computing system at time t is obtained by integrating the results, and the optimization objective P1 of the industrial edge computing system is obtained based on the overall cache gain.
[0155] Specifically, this step involves the m-th edge server first acquiring the local identifier of the industrial equipment obtained in step (2). Get the service cache hit rate of the m-th edge server at time t. :
[0156] ;
[0157] in, This represents the set of indices of all industrial devices that send industrial service requests to the m-th edge server at time t. This represents the total number of indices in the index set of all industrial devices that send industrial service requests to the m-th edge server at time t.
[0158] Subsequently, the m-th edge server calculates the amount of industrial task data generated by the i-th industrial device at time t. And the transmission rate between the i-th industrial device and the m-th edge server at time t. Get the industrial task upload delay generated by the i-th industrial device at time t. :
[0159] ;
[0160] Then, the m-th edge server obtains the identifier locally from the industrial equipment. Obtaining identifiers from neighboring edge servers Obtaining identifiers from the cloud The neighbor service acquisition delay obtained in step (3) and the cloud service acquisition latency obtained in step (4) The service retrieval latency for obtaining the industrial services required by the industrial task generated by the i-th industrial device at time t is as follows:
[0161] ;
[0162] in This indicates the industrial services The corresponding local service retrieval latency is a small constant or approximately denoted as... =0.
[0163] Subsequently, the m-th edge server determines the computing resource requirements of the industrial tasks generated by the i-th industrial device at time t. Obtain the computation latency of this industrial task on the m-th edge server. :
[0164] ;
[0165] in, This represents the computing resources allocated by the m-th edge server to the industrial tasks generated by the i-th industrial equipment at time t, which can usually be expressed as the computing power available per unit time.
[0166] Then, the m-th edge server uploads latency based on the industrial task. Service acquisition latency and computational delay Get the total service response delay of the industrial tasks generated by the i-th industrial device at time t. :
[0167] ;
[0168] Subsequently, the m-th edge server determines the total service response latency based on the industrial tasks generated by the i-th industrial device at time t. Calculate the average total service response latency of the m-th edge server at time t. :
[0169] ;
[0170] Subsequently, the m-th edge server obtains the identifier in the cloud at time t based on the result obtained in step (4). The load on the wired backhaul link generated by the m-th edge server acquiring industrial services from the cloud at time t is obtained. :
[0171] ;
[0172] in, This represents the capacity of the wired backhaul link between the m-th edge server and the cloud at time t.
[0173] Then, the m-th edge server obtains the local cache state for the k-th type of industrial service at time t in step (2). And the local cache state for the k-th type of industrial service at time t-1. Obtain the service replacement cost incurred by the m-th edge server updating its local cache content at time t. The calculation formula is as follows:
[0174] ;
[0175] in, This represents the unit replacement cost of the k-th type of industrial service.
[0176] Then, the m-th edge server is based on the service cache hit rate at time t. Average total service response time Wired backhaul link load and service replacement costs Obtain the cache revenue at time t. :
[0177] ;
[0178] in, To normalize the average total service response time, (t) represents the preset maximum tolerable delay; To normalize the load on the wired backhaul link, This represents the maximum load value when the backhaul link is fully loaded. To normalize service replacement costs, To maximize the theoretical service replacement cost; These are weighting coefficients used to adjust the impact of service cache hit rate, average total service response latency, wired backhaul link load, and service replacement cost on cache benefits, respectively, and satisfying the following conditions: .
[0179] Finally, the long-term average of the caching gains of the industrial edge computing system over T time slots is taken to obtain the optimization objective P1 of the industrial edge computing system:
[0180] ;
[0181] ;
[0182] Among them, constraint C1 indicates that the edge server cache capacity is limited; constraint C2 indicates that the industrial service cache state is a binary variable; constraint C3 indicates the uniqueness constraint of the service acquisition method of the industrial task generated by the i-th industrial device at time t, that is, the service of the industrial task generated by the i-th industrial device at time t can only be selected from the local edge server, the neighbor edge server, or the cloud; constraint C4 indicates the service acquisition constraint of the neighbor edge server, that is, the industrial device can only obtain the corresponding service through the neighbor edge server if the industrial service required by the industrial task is cached in the neighbor edge server.
[0183] (6) The m-th edge server constructs the nearest edge service request based on the industrial service request information received in step (1) using a sliding window method. Historical industrial service request sequence within a time slot and the historical industrial service request sequence Input a Transformer model to obtain the set of candidate caching services for the m-th edge server at time t+1. ,in The value range is from 5 to 20, with 10 being the preferred value.
[0184] Step (6) includes the following sub-steps:
[0185] (6-1) The m-th edge server obtains its own information from the industrial service request information received in step (1). Continuous to t The number of each type of industrial service request received within each time slot is used to construct a historical industrial service request sequence at time t using a sliding window approach based on this number. :
[0186] ;
[0187] in, Let represent the statistical vector of industrial service requests received by the m-th edge server at time t, and we have:
[0188] ;
[0189] in, This represents the number of requests for the k-th type of industrial service received by the m-th edge server at time t.
[0190] (6-2) The m-th edge server obtains the historical industrial service request sequence in step (6-1). The industrial service request statistics vector obtained in step (6-1) Vectorization encoding is performed to obtain the input feature vector of the m-th edge server at time t. :
[0191] ;
[0192] in, This represents a trainable vectorized mapping matrix of service requests. This represents the bias vector. The time position code at time t is calculated as follows:
[0193] ;
[0194] ;
[0195] in, This represents the position code of the p-th time position in an even-numbered dimension. This represents the positional encoding of the p-th time position in an odd-numbered dimension, where j represents the dimension index in the positional encoding vector; d represents the input feature vector. The dimension of p ∈ [1,..,w].
[0196] (6-3) The m-th edge server uses the input feature vector obtained in step (6-2) Obtain the input feature sequence of the Transformer :
[0197] ;
[0198] (6-4) The m-th edge server will process the input feature sequence obtained in step (6-3). The input is a Transformer encoder, which utilizes a multi-head self-attention mechanism to extract correlation features between different industrial services and between different time slots, and then obtains the predicted probability vector of industrial service requests at time t+1. :
[0199] ;
[0200] in, Represents the normalized exponential function, Indicates Transformer encoder; This represents the weight matrix of the probability output layer in the Transformer encoder; This represents the bias vector of the probability output layer in the Transformer encoder;
[0201] (6-5) The m-th edge server sorts all K types of industrial services according to the predicted probabilities of all industrial service requests in the predicted probability vector of industrial service requests at time t+1 obtained in step (6-4), so as to obtain the candidate cache service set of the m-th edge server at time t+1. :
[0202] ;
[0203] in, This means selecting the previous ones according to their predicted probabilities from high to low. Operations for each type of industrial service. This represents the number of candidate cache services for the m-th edge server at time t+1, which can be set as the base number of candidates. (Its value ranges from 5 to 15, preferably 10), or it can be dynamically adjusted in conjunction with the policy entropy at time t-1, and its calculation method is as follows:
[0204] ;
[0205] in, This represents the policy entropy obtained by the m-th edge server during the caching decision-making process at time t-1; This represents the maximum dynamic increment of the number of candidate cache services. The policy entropy threshold is represented, and its value ranges from 0.5 to 0.7, preferably 0.6. Indicates the temperature coefficient; Represents the Sigmoid function; This indicates a round-down operation;
[0206] The advantage of the sub-steps (6-1) to (6-5) above is that by constructing a historical industrial service request sequence through a sliding window and utilizing the Transformer model to provide temporal variation characteristics in the historical request sequence, the probability of various industrial service requests at time t+1 can be predicted in advance. A set of candidate cache services is generated based on the prediction results, thereby improving the accuracy of candidate cache service selection.
[0207] (7) The cloud obtains the set of candidate cache services for the m-th edge server at time t+1 based on step (6). All M edge servers are modeled as M caching decision agents. Based on all caching decision agents, and using a collaborative caching decision model based on the Soft Actor-Critic (SAC) algorithm, the binary caching decision of the m-th edge server for the final industrial service at time t+1 is generated. :
[0208] Step (7) includes the following sub-steps:
[0209] (7-1) The set of candidate cache services for the m-th edge server at time t+1, obtained from step (6-5). Based on its remaining cache capacity, candidate service characteristics, and overall load status at time t, the local state space of the m-th edge server at time t is constructed. :
[0210] ;
[0211] in, Let represent the candidate service feature set constructed from the candidate cache service set of the m-th edge server at time t (which is time t+1), and it is equal to:
[0212] ;
[0213] in, Let represent the feature vector constructed by the m-th edge server for the k-th candidate industrial service at time t, and it is equal to:
[0214] ;
[0215] This represents the remaining cache capacity of the m-th edge server at time t. Let represent the overall load state of the m-th edge server at time t, and it is equal to:
[0216] ;
[0217] in, This represents the wired backhaul link load of the m-th edge server at time t. and Let be the weight coefficient, and satisfy... .
[0218] (7-2) The local state space of the m-th edge server at time t obtained in step (7-1) in the cloud. Obtain the global state space of M edge servers at time t. :
[0219] ;
[0220] (7-3) The m-th edge server will use the local state space obtained in step (7-1) Input the action output branch of the SAC-based collaborative caching decision model to obtain the action of the m-th edge server for the candidate caching service set. Cache action probability vector And based on the cache action probability vector Construct the joint caching action probability vector for all M edge servers at time t. Among them are:
[0221] ;
[0222] in, This represents the probability of the m-th edge server caching the k-th candidate industrial service at time t. The higher this caching probability, the more likely the m-th edge server is to cache the k-th industrial service at time t+1.
[0223] (7-4) The m-th edge server uses the candidate cache service set obtained in step (7-3) The probability of caching actions is used to obtain the policy entropy of the m-th edge server at time t. :
[0224] ;
[0225] in, This represents the smallest positive number used to avoid zero input to the logarithmic function; it can usually be taken as... or . It has no actual physical meaning; it is only used to ensure the stability of the formula calculation.
[0226] Specifically, when the policy entropy is large, the number of candidate cache services should be increased appropriately to expand the search scope for subsequent cache decisions; when the policy entropy is small, the number of candidate cache services should be reduced appropriately to reduce the decision-making overhead caused by invalid candidate cache services.
[0227] The advantage of step (7-4) is that by calculating the policy entropy of the m-th edge server at time t, it can reflect the uncertainty of the probability distribution of the current caching action, providing a basis for dynamically adjusting the number of candidate caching services in the future, thereby improving the adaptive capability of caching decisions.
[0228] (7-5) The cache revenue of the industrial edge computing system at time t obtained in step (5) is used as the local instant cache reward of the m-th edge server at time t. .
[0229] (7-6) The cloud provides local real-time cache rewards for all edge servers at time t. Integrate to obtain the global cache reward for building an industrial edge computing system at time t. :
[0230] ;
[0231] in, Centralized training for SAC-based collaborative caching decision models enables the shared policy network to improve caching benefits of a single edge server while also taking into account the collaborative caching effect among multiple edge servers.
[0232] (7-7) The global state space of the M edge servers in the cloud at time t, obtained from step (7-2). The joint caching action probability vector of the M edge servers at time t obtained in step (7-3) The global cache reward of the industrial edge computing system at time t obtained in step (7-6) And the global state space of the M edge servers obtained in step (7-2) at time t+1. Construct global experience samples at time t :
[0233] ;
[0234] (7-8) The cloud will use the global experience samples obtained in step (7-7) The data is stored in a pre-established shared experience replay pool. Multiple experience samples are randomly sampled from the shared experience replay pool. Subsequently, the cloud updates the parameters of the two Q-evaluation networks and the shared policy network in the SAC-based collaborative caching decision model based on the multiple experience samples, and performs a soft update on the target Q-evaluation network to obtain the updated parameters of the shared policy network.
[0235] Specifically, this step involves the cloud first processing the global experience samples obtained in step (7-7). The experience samples are stored in a pre-established shared experience replay pool, which is used to store global experience samples generated in different time slots. Then, the cloud randomly samples batches of experience samples from the shared experience replay pool.
[0236] Then, for the global experience samples in the experience sample batch, the cloud performs global state space analysis based on their time t+1. And generate the corresponding joint cache action probability vector at time t+1 using the shared policy network. Building goals value :
[0237] ;
[0238] in, Indicates the discount factor. Represents the strategy entropy temperature coefficient. Denotes the j-th objective in the SAC-based collaborative caching decision model. Evaluate the network, This represents the shared policy network of the SAC-based collaborative caching decision model. The parameters of the shared policy network are denoted as j∈[1,2].
[0239] Then, the cloud determines the target Using the empirical sample batches obtained from the sampling and evaluation values, the parameters of the two Q-evaluation networks are updated to obtain their loss functions:
[0240] ;
[0241] in, This indicates a shared experience replay pool. This represents the j-th Q-evaluation network of the SAC-based collaborative caching decision model. This represents the parameters of the j-th Q-evaluation network.
[0242] Subsequently, the cloud platform adjusts the parameters of the j-th Q-evaluation network based on the loss function of each Q-evaluation network. Perform an update to obtain the parameters of the updated Q-evaluation network:
[0243] ;
[0244] in, Q represents the learning rate of the network. This represents the loss function of each Q-evaluation network. Regarding parameters The gradient;
[0245] Subsequently, the cloud uses the global state space obtained from the sampling. Regenerate the joint cache action probability vector using the current shared policy network. And based on the joint cache action probability vector Obtain the loss function for the shared policy network:
[0246] ;
[0247] in, Parameters representing shared policy networks, This represents the strategy entropy temperature coefficient;
[0248] Subsequently, the cloud uses the loss function of the shared policy network. Parameters of the shared policy network Perform gradient descent updates to obtain the updated parameters of the shared policy network:
[0249] ;
[0250] in, This represents the learning rate of a shared policy network. Represents the loss function of a shared policy network. Parameters of shared policy networks The gradient;
[0251] Subsequently, the cloud platform updated the parameters of the Q-rated network. Soft update objective Q-evaluation network parameters :
[0252] ;
[0253] in, This indicates the soft update parameter.
[0254] Finally, the cloud evaluates the network parameters based on the two Q-squares. Parameters of shared policy networks and the parameters of the target Q evaluation network The updated results are used to complete the centralized training and update of the SAC-based collaborative caching decision model, and the parameters of the updated shared policy network are obtained.
[0255] (7-9) The m-th edge server uses the updated shared policy network parameters obtained from the cloud in step (7-8). For the local state space of itself at time t obtained in step (7-1) The input is processed by a shared policy network to obtain a set of candidate industrial services. The caching action probabilities of each candidate industrial service are used to sort all candidate industrial services in descending order to obtain a priority sequence of candidate industrial services. Then, all candidate industrial services in this priority sequence that satisfy constraint C1 in the cache optimization objective P1 are selected as the binary caching decision for the final industrial service by the m-th edge server at time t+1. ;
[0256] The advantage of the above sub-steps (7-7) to (7-9) is that, by sharing the experience replay pool and updating the shared policy network parameters, the cloud can train the collaborative caching decision model based on global experience samples, and use the updated shared policy network parameters for distributed caching decisions on each edge server, thereby achieving collaborative caching optimization that combines centralized training with distributed execution.
[0257] (8) The m-th edge server makes a binary caching decision for the final industrial service at time t+1 based on the result of step (7). Update its local cache content to obtain the local cache state of the m-th edge server at time t+1.
[0258] In general, the present invention has the following advantages:
[0259] (1) The present invention can solve the problem of low cache hit rate in existing industrial service caching methods: Since the present invention uses the Transformer model to extract features and predict the request probability of historical industrial service request sequences, and generates a set of candidate cached services based on the prediction results, it can identify industrial services that may be frequently requested in the next moment in advance, thereby improving the industrial service cache hit rate.
[0260] (2) The present invention can solve the problem of frequent cloud access and high backhaul link load in the existing industrial edge computing system: Since the present invention constructs an industrial service acquisition mechanism that queries the local edge server, neighboring edge servers and the cloud in sequence, when the local edge server does not cache the target industrial service, it can prioritize obtaining the corresponding service from the neighboring edge server, thereby reducing the number of cloud service acquisitions and reducing the backhaul link load.
[0261] (3) The present invention can improve the comprehensive optimization capability of industrial service caching decision-making: Since the present invention comprehensively considers the service cache hit rate, average total service response latency, wired backhaul link load and service replacement cost to construct cache revenue, and uses the cache revenue as the reward basis for the SAC-based collaborative caching decision-making model, it can improve the cache hit rate while taking into account service response latency, backhaul link pressure and cache replacement overhead.
[0262] (4) The present invention can solve the problem of insufficient collaborative capability caused by independent caching decision of a single edge server: Since the present invention models multiple edge servers as multiple caching decision agents and uses a collaborative caching decision model based on SAC for joint optimization, it can realize collaborative configuration of caching resources between different edge servers, reduce duplicate caching and invalid caching, and improve the utilization rate of edge caching resources.
[0263] (5) The present invention can improve the dynamic adaptability of industrial service caching strategy: Since the present invention updates the local cache status of the edge server according to the final binary caching decision, and feeds back the cache hit status, service acquisition method change, cache capacity occupation status and service replacement status to the subsequent cache benefit calculation, service request prediction and collaborative caching decision process, it can form a closed loop of "prediction-decision-execution-feedback" for proactive caching optimization of industrial services.
[0264] This invention combines Transformer industrial service request prediction, local-neighbor-cloud collaborative service acquisition mechanism with SAC-based collaborative caching decision model, realizing proactive caching and collaborative optimization of industrial intelligent services in industrial edge scenarios, and has high engineering application value in the fields of industrial IoT and edge computing.
[0265] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An industrial service caching optimization method based on intelligent prediction, applied to an industrial edge computing system comprising I industrial devices, M edge servers, and a cloud, wherein I and M are arbitrary natural numbers, characterized in that... This industrial service caching optimization method includes the following steps: (1) The i-th industrial device generates an industrial task at time t and sends an industrial service request message and the parameters of the industrial task to its m-th edge server. The parameters include the industrial services required by the i-th industrial device to generate the industrial task at time t. ,in , , T represents the total number of time slots divided within a preset operating cycle of the industrial edge computing system; (2) The m-th edge server constructs the nearest edge service request based on the industrial service request information received in step (1) using a sliding window method. Historical industrial service request sequence within a time slot and the historical industrial service request sequence Input a Transformer model to obtain the set of candidate caching services for the m-th edge server at time t+1. ,in The value range is from 5 to 20; (3) The cloud obtains the set of candidate cache services for the m-th edge server at time t+1 based on step (2). All M edge servers are modeled as M caching decision agents. Based on all caching decision agents, and using a collaborative caching decision model based on the soft actor-critic algorithm (SAC), the binary caching decision of the m-th edge server for the final industrial service at time t+1 is generated. : (4) The m-th edge server makes a binary caching decision for the final industrial service at time t+1 based on the result of step (3). Update its local cache content to obtain the local cache state of the m-th edge server at time t+1.
2. The industrial service cache optimization method based on intelligent prediction according to claim 1, characterized in that, The parameters for industrial tasks also include industrial services. The type number k in the pre-set set of industrial service type numbers, and the amount of industrial task data generated at time t. Computing resource requirements and maximum tolerable latency ; K represents the total number of industrial service types in the industrial edge computing system; The industrial service caching optimization method further includes the following steps after step (1) and before step (2): (A) The m-th edge server obtains its local cache state for the k-th type of industrial service at time t. And based on the local cache state Determine the industrial services required by the i-th industrial equipment to generate the industrial task at time t. Whether to cache it within itself; if so, set the local acquisition identifier of the i-th industrial device at time t. Configure the neighbor edge server of this industrial equipment to obtain the identifier. and cloud-based identification of the industrial equipment And proceed to step (D), otherwise set the local acquisition identifier of the i-th industrial device at time t. , and proceed to step (B); (B) The m-th edge server determines industrial services Whether to cache in one of its neighbor edge servers in the set of neighbor edge servers; if so, then set the neighbor edge server of the i-th industrial device to obtain the identifier at time t. Configure the industrial equipment to acquire a local identifier. Obtaining identifiers from the cloud And based on the transmission rate between the nth neighboring edge server and the mth edge server at time t. Obtaining this industrial service Neighbor service acquisition latency Proceed to step (D), otherwise set the neighbor edge server to obtain the identifier. And proceed to step (C); where This indicates that the cache has industrial services. The sequence number of the neighboring edge server in the edge server set; (C) The m-th edge server obtains the industrial services required for this industrial task from the cloud. Set the cloud-based identifier for the i-th industrial device at time t. Configure the industrial equipment to acquire a local identifier. Obtain identifiers from neighboring edge servers And based on the wired backhaul link capacity of the m-th edge server at time t. Obtain industrial services Corresponding cloud service acquisition latency , and proceed to step (D); (D) The m-th edge server obtains the industrial task parameters and the local identifier of the industrial equipment based on the industrial equipment obtained in step (1). Obtaining identifiers from neighboring edge servers and cloud-based identification The neighbor service acquisition delay obtained in step (B) and the cloud service acquisition latency obtained in step (C). Get the service cache hit rate of the m-th edge server at time t. Average total service response time Wired backhaul link load and service replacement costs The caching revenue of the m-th edge server, which consists of the four components, at time t. And the caching revenue obtained by all edge servers at time t The overall cache gain of the industrial edge computing system at time t is obtained by integrating the results, and the optimization objective P1 of the industrial edge computing system is obtained based on the overall cache gain.
3. The industrial service cache optimization method based on intelligent prediction according to claim 2, characterized in that, Obtaining the industrial service in step (B) Corresponding Neighbor Service Acquisition Latency The following formula is used: ; The communication between the nth neighbor edge server and the mth edge server uses orthogonal frequency division multiple access. , This represents the sub-channel communication bandwidth between the m-th edge server and its n-th neighboring edge server. This represents the transmission power of the m-th edge server at time t. Let represent the channel gain between the m-th edge server and its n-th neighboring edge server at time t, and let it follow an exponential distribution. Indicates the noise power of the wireless channel. Let represent the interference power experienced by the communication between the nth neighboring edge server and the mth edge server at time t. This represents the data size of the k-th type of industrial service. This represents the cache state of the nth neighboring edge server for the kth type of industrial service at time t. This represents the set of neighboring edge servers of the m-th edge server; Cloud service acquisition latency in step (D) The calculation formula is as follows: 。 4. The industrial service cache optimization method based on intelligent prediction according to claim 3, characterized in that, Step (D) specifically involves: First, the m-th edge server obtains the local identifier of the industrial equipment based on the information obtained in step (A). Get the service cache hit rate of the m-th edge server at time t. ; Subsequently, the m-th edge server calculates the amount of industrial task data generated by the i-th industrial device at time t. And the transmission rate between the i-th industrial device and the m-th edge server at time t. Get the industrial task upload delay generated by the i-th industrial device at time t. : Then, the m-th edge server obtains the identifier locally from the industrial equipment. Obtaining identifiers from neighboring edge servers Obtaining identifiers from the cloud The neighbor service acquisition delay obtained in step (B) and the cloud service acquisition latency obtained in step (C). The service retrieval latency for the industrial services required by the industrial task generated by the i-th industrial device at time t is obtained. Subsequently, the m-th edge server determines the computing resource requirements of the industrial task generated by the i-th industrial device at time t. Obtain the computation latency of this industrial task on the m-th edge server. : Then, the m-th edge server uploads latency based on the industrial task. Service acquisition latency and computational delay Get the total service response delay of the industrial tasks generated by the i-th industrial device at time t. : Subsequently, the m-th edge server determines the total service response latency based on the industrial tasks generated by the i-th industrial device at time t. Calculate the average total service response latency of the m-th edge server at time t. Subsequently, the m-th edge server obtains the identifier from the cloud at time t based on step (C). The load on the wired backhaul link generated by the m-th edge server acquiring industrial services from the cloud at time t is obtained. : Then, the m-th edge server obtains the local cache state for the k-th type of industrial service at time t based on step (A). And the local cache state for the k-th type of industrial service at time t-1. Obtain the service replacement cost incurred by the m-th edge server updating its local cache content at time t. ; Then, the m-th edge server is based on the service cache hit rate at time t. Average total service response time Wired backhaul link load and service replacement costs Obtain the cache revenue at time t. : Finally, the long-term average of the caching gains of the industrial edge computing system over T time slots is taken to obtain the optimization objective P1 of the industrial edge computing system.
5. The industrial service cache optimization method based on intelligent prediction according to claim 4, characterized in that, Service cache hit rate of the m-th edge server at time t equal: ; in, This represents the set of indices of all industrial devices that send industrial service requests to the m-th edge server at time t. This represents the total number of indices in the index set of all industrial devices that send industrial service requests to the m-th edge server at time t. The average total service response latency of the m-th edge server at time t equal: ; The m-th edge server acquires the wired backhaul link load generated by the industrial service from the cloud at time t. equal: ; in, This represents the capacity of the wired backhaul link between the m-th edge server and the cloud at time t; The service replacement cost incurred when the m-th edge server updates its local cache at time t. equal: ; in, This represents the unit replacement cost of the k-th type of industrial service; Cache benefits at time t equal: ; in, To normalize the average total service response time, (t) represents the preset maximum tolerable delay; To normalize the load on the wired backhaul link, This represents the maximum load value when the backhaul link is fully loaded. To normalize service replacement costs, To maximize the theoretical service replacement cost; These are weighting coefficients used to adjust the impact of service cache hit rate, average total service response latency, wired backhaul link load, and service replacement cost on cache benefits, respectively, and satisfying the following conditions: ; The optimization objective P1 of the industrial edge computing system is equal to: ; ; Among them, the C1 constraint indicates that the edge server cache capacity is limited; the C2 constraint indicates that the industrial service cache state is a binary variable; the C3 constraint indicates the uniqueness constraint of the service acquisition method of the industrial task generated by the i-th industrial device at time t; and the C4 constraint indicates the service acquisition constraint of the neighboring edge server.
6. The industrial service cache optimization method based on intelligent prediction according to claim 5, characterized in that, Step (2) includes the following sub-steps: (2-1) The m-th edge server obtains its own information from the industrial service request information received in step (1). Continuous to t The number of each type of industrial service request received within each time slot is used to construct a historical industrial service request sequence at time t using a sliding window approach based on this number. : ; in, Let represent the statistical vector of industrial service requests received by the m-th edge server at time t, and we have: ; in, This represents the number of requests for the k-th type of industrial service received by the m-th edge server at time t; (2-2) The m-th edge server obtains the historical industrial service request sequence in step (2-1). The industrial service request statistics vector obtained in step (2-1) Vectorization encoding is performed to obtain the input feature vector of the m-th edge server at time t. : ; in, This represents a trainable vectorized mapping matrix of service requests. This represents the bias vector. The time position code at time t is calculated as follows: ; ; in, This represents the position code of the p-th time position in an even-numbered dimension. This represents the positional encoding of the p-th time position in an odd-numbered dimension, where j represents the dimension index in the positional encoding vector; d represents the input feature vector. The dimension of p is [1,..,w]; (2-3) The m-th edge server uses the input feature vector obtained in step (2-2) Obtain the input feature sequence of the Transformer : ; (2-4) The m-th edge server will process the input feature sequence obtained in step (2-3). The input is a Transformer encoder, which utilizes a multi-head self-attention mechanism to extract correlation features between different industrial services and between different time slots, and then obtains the predicted probability vector of industrial service requests at time t+1. : ; in, Represents the normalized exponential function, Indicates Transformer encoder; This represents the weight matrix of the probability output layer in the Transformer encoder; This represents the bias vector of the probability output layer in the Transformer encoder; (2-5) The m-th edge server sorts all K types of industrial services according to the predicted probabilities of all industrial service requests in the predicted probability vector of industrial service requests at time t+1 obtained in step (2-4), so as to obtain the candidate cache service set of the m-th edge server at time t+1. : ; in, This means selecting the previous ones according to their predicted probabilities from high to low. Operations for each type of industrial service. This represents the number of candidate cache services for the m-th edge server at time t+1, which can be set as the base number of candidates. Alternatively, it can be dynamically adjusted by combining the policy entropy at time t-1, and its calculation method is as follows: ; in, This represents the policy entropy obtained by the m-th edge server during the caching decision-making process at time t-1; This represents the maximum dynamic increment of the number of candidate cache services. This represents the policy entropy threshold, with a value ranging from 0.5 to 0.
7. Indicates the temperature coefficient; Represents the Sigmoid function; This indicates a round-down operation.
7. The industrial service cache optimization method based on intelligent prediction according to claim 6, characterized in that, Step (3) includes the following sub-steps: (3-1) The set of candidate cache services for the m-th edge server at time t+1, obtained from step (2-5). Based on its remaining cache capacity, candidate service characteristics, and overall load status at time t, the local state space of the m-th edge server at time t is constructed. : ; in, Let represent the candidate service feature set constructed from the candidate cache service set of the m-th edge server at time t (which is time t+1), and it is equal to: ; in, Let represent the feature vector constructed by the m-th edge server for the k-th candidate industrial service at time t, and it is equal to: ; in, This represents the predicted probability of the m-th edge server making a request for the k-th type of industrial service at time t+1; This represents the remaining cache capacity of the m-th edge server at time t. Let represent the overall load state of the m-th edge server at time t, and it is equal to: ; in, This represents the wired backhaul link load of the m-th edge server at time t; and Let be the weight coefficient, and satisfy... ; (3-2) The local state space of the m-th edge server at time t obtained in step (3-1) in the cloud. Obtain the global state space of M edge servers at time t. : ; (3-3) The m-th edge server will use the local state space obtained in step (3-1) Input the action output branch of the SAC-based collaborative caching decision model to obtain the action of the m-th edge server for the candidate caching service set. Cache action probability vector And based on the cache action probability vector Construct the joint caching action probability vector for all M edge servers at time t. Among them are: ; in, This represents the probability of the m-th edge server caching the k-th candidate industrial service at time t; the higher this caching probability, the more likely the m-th edge server is to cache the k-th industrial service at time t+1. (3-4) The m-th edge server uses the candidate cache service set obtained in step (3-3) The probability of caching actions is used to obtain the policy entropy of the m-th edge server at time t. : ; in, Represents a very small positive number; (3-5) The cache revenue of the industrial edge computing system at time t obtained from step (D) is used as the local instant cache reward of the m-th edge server at time t. ; (3-6) The cloud provides local real-time cache rewards for all edge servers at time t. Integrate to obtain the global cache reward for building an industrial edge computing system at time t. : ; (3-7) The global state space of the M edge servers in the cloud at time t, obtained from step (3-2). The joint caching action probability vector of the M edge servers at time t obtained in step (3-3) The global cache reward of the industrial edge computing system at time t obtained in steps (3-6) And the global state space of the M edge servers obtained in step (3-2) at time t+1. Construct global experience samples at time t : ; (3-8) The cloud will use the global experience samples obtained in step (3-7) The data is stored in a pre-established shared experience replay pool. Multiple experience samples are randomly sampled from the shared experience replay pool. Subsequently, the cloud updates the parameters of the two Q-evaluation networks and the shared policy network in the SAC-based collaborative caching decision model based on the multiple experience samples, and performs a soft update on the target Q-evaluation network to obtain the updated parameters of the shared policy network. (3-9) The m-th edge server obtains the updated sharing policy network parameters from the cloud in step (3-8). For the local state space of itself at time t obtained in step (3-1) The input is processed by a shared policy network to obtain a set of candidate industrial services. The caching action probabilities of each candidate industrial service are used to sort all candidate industrial services in descending order to obtain a priority sequence of candidate industrial services. Then, all candidate industrial services in this priority sequence that satisfy constraint C1 in the cache optimization objective P1 are selected as the binary caching decision for the final industrial service by the m-th edge server at time t+1. .
8. The industrial service cache optimization method based on intelligent prediction according to claim 7, characterized in that, Steps (3-8) are as follows: First, the cloud will process the global experience samples obtained in steps (3-7). Stored in a pre-established shared experience replay pool, which is used to store global experience samples generated in different time slots; Then, the cloud randomly samples experience samples from the shared experience replay pool to obtain experience sample batches; Then, for the global experience samples in the experience sample batch, the cloud performs global state space analysis based on their time t+1. And generate the corresponding joint cache action probability vector at time t+1 using the shared policy network. Build goals value : Then, the cloud, based on the target The parameters of the two Q-evaluation networks are updated using the empirical sample batches obtained from the sampling and values, in order to obtain their loss functions. : Subsequently, the cloud platform adjusts the parameters of the j-th Q-evaluation network based on the loss function of each Q-evaluation network. Perform an update to obtain the parameters of the updated Q-evaluation network: Subsequently, the cloud uses the global state space obtained from the sampling. Regenerate the joint cache action probability vector using the current shared policy network. And based on the joint cache action probability vector Obtain the loss function of the shared policy network : Subsequently, the cloud uses the loss function of the shared policy network. Parameters of the shared policy network Perform gradient descent updates to obtain the updated parameters of the shared policy network: Subsequently, the cloud platform updated the parameters of the Q-rated network. Soft update objective Q-evaluation network parameters : Finally, the cloud evaluates the network parameters based on the two Q-squares. Parameters of shared policy networks and the parameters of the target Q evaluation network The updated results are used to complete the centralized training and update of the SAC-based collaborative caching decision model, and the parameters of the updated shared policy network are obtained.
9. The industrial service cache optimization method based on intelligent prediction according to claim 8, characterized in that, Target value equal: ; in, Indicates the discount factor. Represents the policy entropy temperature coefficient. Denotes the j-th objective in the SAC-based collaborative caching decision model. Evaluate the network, This represents the shared policy network of the SAC-based collaborative caching decision model. The parameters of the shared policy network are denoted as j∈[1,2]; The loss function for each Q-evaluation network is equal to: ; in, This indicates a shared experience replay pool. This represents the j-th Q-evaluation network of the SAC-based collaborative caching decision model. This represents the parameters of the j-th Q-evaluation network; The updated parameters of the Q-evaluation network are: ; in, Q represents the learning rate of the network. This represents the loss function of each Q-evaluation network. Regarding parameters The gradient; The loss function of a shared policy network is equal to: ; in, Parameters representing shared policy networks, This represents the strategy entropy temperature coefficient; The updated parameters of the shared policy network are: ; in, This represents the learning rate of a shared policy network. Represents the loss function of a shared policy network. Parameters of shared policy networks The gradient; Soft update objective Q-evaluation network parameters equal: ; in, This indicates the soft update parameter.
10. An industrial service caching optimization system based on intelligent prediction, applied in an industrial edge computing system comprising I industrial devices, M edge servers, and a cloud, wherein I and M are arbitrary natural numbers, characterized in that... This industrial service cache optimization system includes the following modules: The first module, located on the i-th industrial device, is used to generate industrial tasks at time t and send industrial service request information and parameters of the industrial task to its m-th edge server. These parameters include the industrial services required by the i-th industrial device to generate the industrial task at time t. ,in , , T represents the total number of time slots divided within a preset operating cycle of the industrial edge computing system; The second module, located on the m-th edge server, is used to construct the nearest edge server based on the industrial service request information received from the first module, using a sliding window approach. Historical industrial service request sequence within a time slot and the historical industrial service request sequence Input a Transformer model to obtain the set of candidate caching services for the m-th edge server at time t+1. ,in The value range is from 5 to 20; The third module, located in the cloud, is used to process the set of candidate cache services for the m-th edge server at time t+1, obtained from the second module. All M edge servers are modeled as M caching decision agents. Based on all caching decision agents, and using a collaborative caching decision model based on the soft actor-critic algorithm (SAC), the binary caching decision of the m-th edge server for the final industrial service at time t+1 is generated. : The fourth module, located on the m-th edge server, is used to make binary caching decisions for the final industrial service based on the results obtained from the third module at time t+1. Update its local cache content to obtain the local cache state of the m-th edge server at time t+1.