ZKP-based rapid and efficient content cache optimization method
By introducing blockchain and ZKP technology into the fog wireless access network, the user requested smart contract process is optimized, and combined with PSO algorithm and neural network to predict the popularity of cached content, the user privacy security and cache efficiency problems in the fog wireless access network are solved, and efficient privacy protection and cache optimization are achieved.
Patent Information
- Application Number
- CN202510316824.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-18
AI Technical Summary
The prior art does not fully consider the privacy and security needs of the user equipment layer in the fog wireless access network, resulting in user data privacy information being vulnerable to attack in the edge environment, and the caching efficiency and delay problems have not been effectively solved.
Using a fast and efficient content cache optimization method based on ZKP, by building a fog wireless access network that supports blockchain, introducing ZKP to optimize user request smart contract process, establishing a content cache model with cache hit rate and content delivery time as optimization goals, and using PSO algorithm to optimize the cache strategy, combining with neural networks to predict the popularity of cached content.
It achieves the reduction of latency while improving the cache hit rate, improves the privacy protection mechanism, improves the quality of user experience and maximizes resource utilization efficiency.
Smart Images

Figure CN120238959A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of privacy protection and content caching in fog radio access networks, and particularly to a fast and efficient content caching optimization method based on ZKP. Background Art
[0002] As a new type of wireless access network, the fog radio access network sinks computing and storage resources to the network edge to provide low-latency services for mobile users. However, while the content caching in the fog radio access network brings convenience to the network, the data privacy in the network and the personal privacy information of users are more vulnerable to attacks in the network edge environment and cooperation mode. Therefore, while developing caching technologies, designing an effective privacy protection scheme is also an important part of content caching, and expanding the application of blockchain technology is the key to achieving this goal.
[0003] Currently, the existing technologies mainly use blockchain technology to protect the content caching from the cloud computing network layer to the fog radio access network, and have not fully considered the security requirements of the user equipment layer. The user equipment layer is directly involved in the data interaction and privacy protection of the end users, and the privacy and security issues of the user equipment layer are still problems to be solved urgently in this field. Summary of the Invention
[0004] Aiming at the problems existing in the above-mentioned prior art, the present invention provides a fast and efficient content caching optimization method based on ZKP (Zero-Knowledge Proof), which can not only improve the cache hit rate and reduce the latency, but also improve the privacy protection mechanism while enhancing the content caching efficiency, so as to realize a more comprehensive optimization of the system.
[0005] The present invention discloses a fast and efficient content caching optimization method based on ZKP, including:
[0006] S1: Construct a fog radio access network supporting blockchain;
[0007] S2: Introduce ZKP to the fog radio access network for providing authorization registration and service subscription, and optimize the intelligent contract process of user requests;
[0008] S3: Confirm that the cache hit rate and content delivery time are the content caching optimization goals, and establish a content caching optimization model for predicting the popularity of cached content;
[0009] S4: Optimize the caching strategy by using the PSO algorithm, so that the cached content can maximize the cache hit rate and minimize the transmission time.
[0010] Further, in the step S1, the network architecture of the fog radio access network includes, from top to bottom: a cloud computing network layer, a fog radio access layer, and a user equipment layer;
[0011] Among them, several baseband processing units are concentrated in the cloud computing network layer to form a baseband processing unit pool;
[0012] Below the cloud computing network layer, the fog radio access layer includes radio remote radio frequency units, fog radio access points, and high-power nodes;
[0013] Each user device in the user device layer includes: a traditional user device UE and a fog computing user device F-UE. Among them, the fog computing user device has the cooperation ability of cooperative wireless signal processing and cooperative wireless resource management, and can communicate through the D2D mode.
[0014] Furthermore, in step S1, a complete copy of a blockchain ledger is stored in all fog radio access points in the fog radio access network; this blockchain ledger records all resource transaction information related to content caching, including the timestamp of the transaction, the ID of the fog radio access point participating in the transaction, and the specific content data involved in the transaction.
[0015] Furthermore, in step S2:
[0016] The authorization registration includes: in the fog radio access network, a user represented by a pair of private key and public key generates a virtual identity using its public key and uses the virtual identity for registration in the blockchain; correspondingly, the user sends its public key and virtual identity to the fog radio access network of the fog radio access point for registration; then the fog radio access node generates a signature using the user's public key and virtual identity through the user's private key, and the fog radio access node sends the user's public key, virtual identity, and the generated signature to the blockchain network for registration;
[0017] The service subscription includes: the service subscription process uses a smart contract to manage the user's service subscription and access control; the user first needs to send a service subscription request containing its virtual identity; this request also includes the service type that the user hopes to subscribe to, and a digital signature generated by the user's private key to ensure the security of the request and the verification of the identity.
[0018] Furthermore, step S2 includes:
[0019] The user creates a request and generates a corresponding subscription proof (zero-knowledge proof) to represent the user's right to subscribe to the corresponding service type;
[0020] The user sends the request containing the service type and subscription proof to the fog radio access point;
[0021] The fog radio access point checks the validity of the subscription proof through relevant verification protocols. In the case of successful verification, the fog radio access point confirms the user's request permission;
[0022] The fog radio access point generates a smart contract according to the user's request, records the details of the service including the service type, duration, and cost, and sends the smart contract back to the user;
[0023] After reviewing the smart contract details, the user uses a payment proof (another zero-knowledge proof) to complete the payment process to ensure that the payment is completed without revealing the payment details;
[0024] After receiving the payment proof, the fog radio access point activates the service and updates the service status and related transactions to the blockchain. The transaction is completed and the user obtains the requested service.
[0025] Furthermore, the fog radio access network is used to cache the content with high user demand through the fog radio access point;
[0026] The step S3 includes:
[0027] Providing the delivery time τ of content n based on the user's request tot Expressed as:
[0028]
[0029] where τ BH represents the transmission time from the cloud computing network layer to the fog radio access point; τ AC represents the transmission time from the fog radio access point to the user;
[0030] x represents the cache status variable indicating whether the content is cached in the fog node i,n , and the expression is as follows:
[0031]
[0032] The first optimization objective is the maximum cache hit rate, and the corresponding content cache optimization model construction expression is as follows:
[0033]
[0034] where η refers to the maximum cache hit rate, and r n refers to the request frequency of content n; if content n is cached in the fog radio access point m i then x i,n = 1, otherwise x i,n = 0
[0035] The second optimization objective is to minimize the normalized content delivery time, and the corresponding content cache optimization model construction expression is as follows:
[0036]
[0037] Among them, τ norm refers to minimizing the normalized content delivery time;
[0038] The constraints include:
[0039] Constraint C1 is used to ensure that for each fog radio access point m i the total size of the cached content does not exceed its cache capacity C i , where s n represents the size of content n, and its expression is as follows:
[0040]
[0041] Constraint C2 is used to indicate that x i,n is a binary variable, whether content n is cached in fog radio access point m i For each content, it can be cached in at most one fog radio access point to avoid wasting space due to duplicate caching. Its expression is as follows:
[0042]
[0043] Constraint C3 is used to indicate that the content cached in the fog radio access point meets a hit rate of a or above, ensuring that the content with high-frequency requests is preferentially cached. Its expression is as follows:
[0044]
[0045] Constraint C4: The bandwidth resources of the fog node are limited. Among them, b i,n represents the bandwidth allocated by node m i for content n, and B i is the total bandwidth of the node. The following conditions need to be met for its bandwidth allocation:
[0046]
[0047] Constraint C5: To ensure the system service quality, the caching strategy needs to meet the delay constraint:
[0048]
[0049] Perform neural network training on the constructed content caching optimization model to predict the popularity of the cached content.
[0050] Furthermore, the neural network training on the constructed content caching optimization model for predicting the popularity of the cached content includes:
[0051] Using the blockchain to record the historical request data of users, which includes the number of requests made by users for different contents;
[0052] Load and preprocess the selected dataset, and divide the data into a training set and a validation set; among them, the dataset includes the evaluations of the popularity of the responses of several users to several applications.
[0053] Define a neural network, including an embedding layer, a fully connected layer, and a bias layer. The embedding layer maps the ID of the application to a high-dimensional vector, captures the potential features related to content popularity, and the output feature vector is processed by Dense and corrected by the bias term of the application to obtain the predicted popularity score of each application.
[0054] Compile the model, use the mean squared error as the loss function to minimize the error between the actual number of user requests and the predicted rating times, so that the model can predict the request behavior of future users more and more accurately.
[0055] Use the training set to train the model, and the validation data is used to evaluate the model performance. Then, predict the number of user requests for the validation set, calculate and output the mean squared error of the model as an evaluation index.
[0056] Output several pieces of content with the highest popularity according to the number of user requests predicted by the model.
[0057] Furthermore, step S4 described above includes:
[0058] Initialize the particle swarm, and use the first several most popular pieces of content as the initial cache state. Each particle corresponds to a cache policy vector.
[0059] Define the fitness function, whose goal is to maximize the cache hit rate and minimize the normalized content delivery time.
[0060] Initialize p best and g best After that, start iteration, update the velocity, position, p best and g best ;
[0061] Output the current optimal solution and return the cache hit rate and the minimized normalized content delivery time corresponding to g best .
[0062] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned fast and efficient content cache optimization method based on ZKP is implemented.
[0063] The present invention also discloses an electronic device, including:
[0064] A processor; and
[0065] A memory for storing the executable instructions of the processor;
[0066] Among them, the processor is configured to execute the above-mentioned fast and efficient content caching optimization method based on ZKP by executing the executable instructions.
[0067] The present invention has at least the following beneficial effects:
[0068] The present invention introduces a smart contract based on ZKP that protects user request privacy into a fog radio access network system supporting blockchain technology. This contract can avoid the direct exchange of sensitive information multiple times by reducing the process of users repeatedly interacting with nodes, greatly protecting user privacy.
[0069] In order to improve the quality of user experience and reduce transmission costs, the present invention uses content popularity as a reference to implement the content caching strategy in the system, reducing the content interaction delay while increasing the cache hit rate, maximizing the resource utilization efficiency of the entire network.
[0070] Other beneficial effects of the present invention will be described in detail in the specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0072] Figure 1 is a flowchart of a fast and efficient content caching optimization method based on ZKP disclosed in the preferred embodiment of the present invention.
[0073] Figure 2 is a schematic diagram of the fog radio access network architecture provided by the preferred embodiment of the present invention.
[0074] Figure 3 is a schematic diagram of the process of a smart contract for protecting user-requested content based on ZKP provided by the preferred embodiment of the present invention.
[0075] Figure 4 is a schematic diagram of the process of protecting user requests by a smart contract based on ZKP provided by the preferred embodiment of the present invention.
[0076] Figure 5 is a schematic diagram of the process of protecting traditional user requests by a smart contract provided by the preferred embodiment of the present invention.
[0077] Figure 6 is a comparison chart of the protection rates of user information by a traditional architecture-based user request smart contract and a ZKP-based user request smart contract provided by the preferred embodiment of the present invention.
[0078] Figure 7 Flow chart of the PSO cache optimization algorithm based on content popularity provided by the preferred embodiment of the present invention.
[0079] Figure 8 Schematic diagram of the normalized content delivery time under different cache capacities provided by the preferred embodiment of the present invention.
[0080] Figure 9 Schematic diagram of the cache hit rate under different cache capacities provided by the preferred embodiment of the present invention.
[0081] Figure 10 Schematic diagram of the change of the cache hit rate and the content delivery time with the number of iterations provided by the preferred embodiment of the present invention. Detailed implementation manners
[0082] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other implementation manners obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope protected by the present invention.
[0083] The professional terms related to the present invention are explained as follows:
[0084] ZKP, Zero-Knowledge Proof, zero-knowledge proof;
[0085] BC-FRAN, Blockchain-based Fog Radio Access Network;
[0086] BBU, Baseband Unit, baseband processing unit;
[0087] RRH, Remote Radio Head, remote radio head;
[0088] F-AP, Fog Access Point, fog radio access point / fog node;
[0089] F-APs, Fog Access Points, fog radio access points / fog nodes;
[0090] proof subscription , subscription proof;
[0091] proof payment , payment proof;
[0092] s.t. i.e., subject to, means being restricted;
[0093] PSO, Particle Swarm optimization, the particle swarm optimization algorithm;
[0094] p best , Personal Best, the individual optimal solution;
[0095] g best , Global Best, the global optimal solution.
[0096] The above English abbreviations are also common usages in this field, and their specific concepts and principles will not be elaborated in this article.
[0097] The serial numbers of the steps in each embodiment are only used to distinguish different steps, rather than to limit the time sequence. Those skilled in the art should understand that they should be combined with actual needs under the guidance of the disclosed content in the specification.
[0098] Embodiment 1
[0099] The main application of this embodiment is in the privacy protection and content caching of the fog radio access network. In the F-RAN environment, content caching plays an important role in reducing network congestion, improving user experience, and saving network resources. However, F-APs are usually deployed in the edge environment, and the edge environment is open, resulting in F-APs being easily damaged. At the same time, in the shared environment of multi-part cooperation in F-RAN, user data may be distributed on multiple fog nodes, and the same infrastructure may be shared by different network service users. In the environment of collaborative caching, the shared data usually contains a lot of private information of users, as well as the names and data of the content obtained by users at F-APs. During the process of data sharing, user data may be subject to access attacks, and privacy information will inevitably be leaked. Therefore, the significance of this embodiment is to design an efficient content caching algorithm in the fog radio access network and prevent the leakage of user privacy information.
[0100] As Figure 1 shown, this embodiment discloses a fast and efficient content caching optimization method based on ZKP, including:
[0101] S1: Construct a fog radio access network supporting blockchain;
[0102] S2: Introduce ZKP into the fog radio access network for providing authorized registration and service subscription, and optimize the user request smart contract process;
[0103] S3: Confirm that the cache hit rate and content delivery time are the content caching optimization objectives, and establish a content caching optimization model for predicting the popularity of cached content;
[0104] S4: Optimize the caching strategy using the PSO algorithm so that the cached content can maximize the cache hit rate and minimize the transmission time.
[0105] The present invention will be described in detail below with reference to specific cases:
[0106] The fast and efficient content caching optimization algorithm based on ZKP disclosed in this embodiment is applied to privacy protection and content caching in the fog radio access network, and includes the following steps:
[0107] (1) Construct a BC-FRAN system supporting blockchain. As Figure 2 shown, this embodiment shows a fog radio access network architecture. The fog radio access network architecture is divided into a cloud computing network layer, a fog radio access layer, and a user equipment layer from top to bottom. The cloud computing network layer aggregates multiple baseband processing units to form a BBU pool, which has centralized storage and computing capabilities. Below the cloud computing network layer, the fog radio access layer is composed of remote radio heads, fog radio access points, and high-power nodes. The remote radio heads are deployed remotely and directly forward the RRHs to the BBU pool after receiving user signals through a high-bandwidth, low-latency fronthaul link to provide services for users; F-APs, as a key component in the fog radio access network, not only have various functions of the RRHs, but also have the functions of cooperative radio signal processing and cooperative radio resource management, and can effectively help the fog radio access network relieve the wireless network load pressure; the high-power nodes are mainly connected to the BBU pool through a backhaul link to realize the distribution of control signaling and wide-area seamless coverage. The remote radio heads, F-APs, and high-power nodes can achieve joint processing and scheduling with extremely low interference among the three through multi-point cooperation technology. The user equipment layer is composed of multiple user equipments, including traditional user equipments UE and fog computing user equipments F-UE. The F-UE has the cooperative capabilities of cooperative radio signal processing and cooperative radio resource management and can communicate through the D2D mode.
[0108] The introduction of blockchain technology brings new technical improvement ideas for content caching in the fog radio access network. Through the decentralization, transparency, and security of blockchain, efficient cooperation and data sharing between nodes can be achieved, thereby improving the efficiency and security of content caching. Blockchain can be used to construct a decentralized cache management system, and resource allocation and scheduling between nodes can be realized through smart contracts. Each edge node can participate in the caching task according to its own computing and storage capabilities, record the transaction history and reputation score through blockchain, and select the most suitable node's content for caching. At the same time, the encryption mechanism of blockchain can ensure the secure transmission and storage of cached content between nodes, preventing unauthorized access and data tampering.
[0109] (2) The BC-FRAN system provides two services: authorized registration and service subscription. In BC-FRAN, a user has a pair of private keys and the public key denoted as follows. First, the user generates a virtual identity VID using their public key u and uses the virtual identity for registration on the blockchain. The virtual identity is generated from the public key and is the hash value of the public key, as shown in the following formula:
[0110]
[0111] Then the user sends their public key and virtual identity to the BC - FRAN of the F - APs for registration. Next, the blockchain node generates a signature using the user's public key and virtual identity with the user's private key:
[0112]
[0113] The blockchain node sends the user's public key, virtual identity, and the generated signature as a transaction to the blockchain network for registration. All blockchain nodes in the BC - FRAN store the user's public key and virtual identity.
[0114] The service subscription process uses smart contracts to manage user service subscriptions and access control. The user first needs to send a service subscription request to the system that contains their virtual identity VID u This request should also include the type of service the user wishes to subscribe to, as well as a digital signature generated by the user's private key:
[0115]
[0116] to ensure the security of the request and the authentication of the identity.
[0117] The receiving F - APs first verify the user's virtual identity
[0118] VID u in the public ledger of the blockchain. After successful verification, the F - APs check whether the requested service type is available and review whether the user is eligible to subscribe to the service. Once these details are confirmed, the F - APs generate a new smart contract instance that details the user's service subscription, including the service type, subscription period, and any relevant fee information. The smart contract establishes a clear agreement between the user and the F - APs, defining the responsibilities and rights of both parties. The user completes the subscription process by paying the corresponding fees. Once the transaction is confirmed, the smart contract activates the service, allowing the user to access the subscribed service. At the same time, the contract records all transactions and status changes on the blockchain, ensuring the transparency and traceability of the service.
[0119] (3) Introduce ZKP to optimize the user request smart contract process. ZKP technology is a cryptographic technology that allows users to prove to F-APs that they have a valid virtual identity, a corresponding valid private key, and subscription rights to a specified service without showing the actual private key, public key, and specific subscription details or any evidence that may leak personal information. Applying this technology to smart contracts means that users can prove the validity of their identity and permissions without directly exposing any private keys or identifiable information. This not only protects the user's privacy, but also reduces the need for data transmission, thereby reducing communication costs and security risks. Therefore, the user request content protection smart contract process based on ZKP is as follows: Figure 3 shown.
[0120] (3.1) Based on ZKP, the user requests content protection smart contract. First, the user creates a request message R = {service type , paramdeters}, then the user generates the corresponding zero-knowledge proof ZKP (proof subscription ), see the following formula:
[0121]
[0122] The user uses this proof to indicate that he has the right to subscribe to this type of service, but does not need to disclose his specific virtual identity VID u or private key Here ZK-STARKs are zero-knowledge scalable transparent arguments of knowledge, used to generate a proof that a user knows a unique identifier associated with their VID. u and associated with a valid subscription credential without displaying the information itself.
[0123] (3.2) The user sends the request information including the service type and zero-knowledge proof to F-APs.
[0124] (3.3) F-APs check the validity of the zero-knowledge proof through relevant verification protocols. Once the verification is successful, F-APs confirms the user's request authority without obtaining the user's specific identity information.
[0125] (3.4) F-APs generates a smart contract based on the user’s request information, records the service details such as service type, duration, and fee, and sends the contract back to the user.
[0126] (3.5) After the user reviews the contract details, another zero-knowledge proof ZKP (proof payment ) to complete the payment process, this proof ensures that the payment is completed without revealing the payment details.
[0127] ZKPpayment ) = ZK - STARKs({payment details}, {service type , amount})
[0128] (3.6) After receiving the payment proof, the F - APs activate the service and update the service status and related transactions to the blockchain using the hashed user identifier hash(VID u ), further ensuring user privacy. The transaction is completed and the user obtains the requested service.
[0129] The user - request smart contract based on ZKP is shown in Table 1 below.
[0130] Table 1: User - request smart contract based on ZKP
[0131]
[0132] During the simulation process of the ZKP - based smart contract, each user registers with the blockchain through ZKP and generates a virtual ID bound to its public key. The virtual ID ensures the privacy of the user's identity. The ECDSA signature mechanism is used during the registration process, and the user's public key and virtual ID are recorded on the blockchain together. Once the user completes registration, they can choose to subscribe to services. The service subscription request is verified through ZKP, and the subscription information of services such as service type, subscription fee, and market is recorded in the smart contract. The smart contract is activated after payment confirmation and the result is recorded on the blockchain.
[0133] Figure 4 For the protection process of the user - request smart contract of ZKP proposed in this embodiment, Figure 5 For the protection process of the traditional user - request smart contract, by comparing Figure 4 and Figure 5 , it can be seen that the method provided in this embodiment effectively reduces the number of times of exchanging information during the user - request content process, and at the same time uses ZKP technology to effectively protect privacy information such as the user's virtual identity and signature, effectively reducing the risk of privacy exposure during the user - request content process, achieving the purpose of protecting user privacy.
[0134] Figure 6Indicates the protection rates of user-request smart contracts based on traditional architectures and user-request smart contracts based on ZKP for user information. It includes three types of attacks: replay attack, tampering attack, and man-in-the-middle attack. User-request smart contracts based on ZKP show significant superiority in all three attack scenarios. Through a dynamic challenge-response mechanism, it is difficult for attackers to forge legitimate requests, thereby enhancing the anti-attack ability and protection rate. It demonstrates that user-request smart contracts based on ZKP can more effectively protect users' private information.
[0135] (4) Determine two optimization goals: cache hit rate and content delivery time. To improve the quality of user experience and reduce transmission costs, in BC-FRAN, F-APs can cache content first, and cache the content with high user demand in F-APs closer to users in advance. If the content requested by the user is available in the cache of the node, the content can be provided immediately; the content that is not cached needs to be obtained from the cloud layer, which will increase the transmission delay.
[0136] The content delivery time is an important indicator for evaluating the content caching efficiency. The delivery time τ of the content n requested by the network for the user tot can be expressed as:
[0137]
[0138] where τ BH represents the transmission time from the cloud layer to the fog node; τ AC represents the transmission time from the fog node to the user.
[0139] Set the content set to be represented as N = {n1, n2,..., n N}, and each content n j represents a resource that can be requested by the user. The fog node set is represented as M = {m1, m2,..., m M}, where each fog node m i has a finite cache capacity C i . Let x i,n be the cache status variable, indicating whether the content n j is cached in the fog node m i .
[0140]
[0141] To predict the popularity of each content, each F-AP needs to view all available transaction history records in the network according to the public ledger generated by the blockchain, and estimate the popularity of the content based on the content of the public ledger to sort the content. First, calculate the total number of requests for each function, and then sort the request times of the content in descending order.
[0142] Therefore, two optimization objectives can be obtained. The first optimization objective is the maximum cache hit rate η.
[0143]
[0144] Among them, r n represents the request frequency of content n; if content n is cached in fog node m i then x i,n = 1, otherwise x i,n = 0.
[0145] The second optimization objective is to minimize the normalized content delivery time τ norm .
[0146]
[0147] (5) Establish a content caching optimization model.
[0148] The caching policy should satisfy the cache capacity constraint of each fog node.
[0149]
[0150] Among them, s j represents the size of content n j , C i represents the cache capacity of fog node m i .
[0151] Thus, the content caching optimization model can be constructed as:
[0152]
[0153] Among them, the constraint condition C1 ensures that the total size of the content cached in each fog node m i cannot exceed its cache capacity C i , where s n represents the size of content n; the constraint condition C2 means that x i,n is a binary variable, indicating whether content n is cached in fog node m i , and each content n can be cached in at most one fog node to avoid wasting space due to duplicate caching; the constraint condition C3 means that the content cached in the fog node meets a hit rate of a or above, ensuring that the content with high-frequency requests is preferentially cached. The constraint condition C4 means that the bandwidth resources of the fog node are limited, b i,n represents the bandwidth allocated by node m i for content n, and B i is the total bandwidth of the node. The constraint condition C5 ensures the system service quality, and the caching policy needs to meet the delay constraint.
[0154] (6) Train the neural network to predict the future popularity of cached content.
[0155] (6.1) Use the blockchain to record the historical request data of users, which includes the number of requests made by users for different content.
[0156] (6.2) Adopt the latest Movielens dataset, which includes 20 million ratings of 27,000 movies by 138,000 users. Load and preprocess the data, and divide the data into a training set and a validation set;
[0157] (6.3) Define the neural network, including an embedding layer, a fully connected layer, and a bias layer. The embedding layer maps the ID of the movie to a high-dimensional vector to capture the latent features related to content popularity. The output feature vector is processed by Dense and corrected by the bias term of the movie to obtain the predicted popularity score of each movie;
[0158] (6.4) Compile the model, use the mean squared error as the loss function to minimize the error between the actual number of user requests and the predicted number of ratings, so that the model can predict the future request behavior of users more and more accurately.
[0159] (6.5) Use the training set to train the model, and the validation data is used to evaluate the model performance. Then, predict the number of user requests for the validation set, calculate and output the mean squared error of the model as an evaluation metric;
[0160] (6.6) According to the number of user requests predicted by the model, output the top Z most popular content, where Z is a positive integer.
[0161] (7) Use PSO to optimize the caching strategy.
[0162] Step 7.1: Initialize the particle swarm, and use the top Z most popular content as the initial caching state. Each particle corresponds to a caching strategy vector x;
[0163] Step 7.2: Define the fitness function f(x), and the expression is as follows:
[0164]
[0165] Its goal is to maximize the cache hit rate η and minimize the normalized content delivery time;
[0166] Step 7.3: Initialize p best and g best After that, start the iteration, update the velocity, position, p best and g best of each particle to make it move towards a better caching strategy and find the global optimal caching strategy;
[0167] Step 7.4: Output the current optimal solution and return the global optimal caching policy g best The corresponding cache hit rate η and the minimized normalized content delivery time.
[0168] In this embodiment, steps (6) and (7) can be referred to Figure 7 as shown.
[0169] The fast and efficient content caching optimization algorithm based on ZKP is shown in Table 2 below.
[0170] Table 2 PSO caching optimization algorithm based on content popularity
[0171]
[0172]
[0173] As Figures 8 to 10 shown in the overall performance analysis of content caching, where Figure 8 represents the normalized content delivery time under different cache capacities. It can be seen from Figure 8 that for both traditional smart contracts and ZKP-based smart contracts, the content delivery time decreases with the increase of cache capacity, and the overall system performance improves. However, traditional smart contracts are limited by the latency caused by complex user request interaction strategies. The ZKP-based smart contract reduces the transmission latency of user-requested content by reducing the number of request interactions, improves the system response speed, and reduces the user waiting time.
[0174] As Figure 9 shown, it represents the cache hit rate under different cache capacities. For traditional methods, as the cache capacity increases, the cache hit rate gradually increases and levels off at a relatively high cache capacity. However, the growth rate of the cache hit rate is relatively slow. The ZKP-based smart contract proposed in this embodiment has a higher cache hit rate than traditional methods under the same cache capacity, which indicates that the ZKP-based smart contract proposed in this embodiment effectively optimizes the cache hit rate.
[0175] As Figure 10 shown, it represents the variation of the cache hit rate and the content delivery time with the number of iterations. As the number of iterations increases, the PSO algorithm gradually optimizes the positions of the particles, continuously searches for the content distribution strategy that maximizes the cache hit rate and minimizes the content delivery time. After about 1000 iterations, the cache hit rate is improved, the content delivery delay is reduced, and both tend to level off, approaching the optimal solution, and the system performance is close to the optimal.
[0176] Embodiment 2
[0177] This embodiment discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the fast and efficient content caching optimization method based on ZKP described in Embodiment 1.
[0178] Embodiment 3
[0179] This embodiment discloses an electronic device, including:
[0180] a processor; and
[0181] a memory for storing executable instructions of the processor;
[0182] wherein, the processor is configured to execute the fast and efficient content caching optimization method based on ZKP described in Embodiment 1 by executing the executable instructions.
[0183] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should be covered within the protection scope of the present invention.
Claims
1. A fast and efficient content cache optimization method based on ZKP, characterized in that: include: S1: Build a blockchain-enabled fog wireless access network; S2: Introduce ZKP to the fog wireless access network used to provide authorized registration and service subscription, and optimize the user request smart contract process; S3: Confirm that cache hit rate and content delivery time are the content cache optimization goals, and establish a content cache optimization model to predict the popularity of cached content; S4: The PSO algorithm is used to optimize the cache strategy so that the cached content can maximize the cache hit rate and minimize the transmission time.
2. The fast and efficient content cache optimization method based on ZKP according to claim 1 is characterized in that: In the step S1, the network architecture of the fog wireless access network includes, from top to bottom, a cloud computing network layer, a fog wireless access layer, and a user equipment layer; Among them, the cloud computing network layer concentrates several baseband processing units to form a baseband processing unit pool; Below the cloud computing network layer, the fog wireless access layer includes wireless remote radio units, fog wireless access points, and high-power nodes; The user equipments in the user equipment layer include: traditional user equipment UE and fog computing user equipment F-UE, wherein the fog computing user equipment has the collaborative capability of collaborative wireless signal processing and collaborative wireless resource management, and can communicate through D2D mode.
3. The fast and efficient content cache optimization method based on ZKP according to claim 2 is characterized in that: In the step S1, a complete copy of a blockchain ledger is stored in all fog wireless access points in the fog wireless access network; the blockchain ledger records all resource transaction information related to content caching, including the timestamp of the transaction, the ID of the fog wireless access point involved in the transaction, and the specific content data involved in the transaction.
4. The fast and efficient content cache optimization method based on ZKP according to claim 3 is characterized in that: In the step S2: The authorized registration includes: in the fog wireless access network, a user represented by a pair of private keys and public keys uses his public key to generate a virtual identity, and uses the virtual identity for registration in the blockchain; correspondingly, the user sends his public key and virtual identity to the fog wireless access network of the fog wireless access point for registration; then the fog wireless access node uses the user's public key and virtual identity to generate a signature through the user's private key, and the fog wireless access node sends the user's public key, virtual identity and generated signature as a transaction to the blockchain network for registration; The service subscription includes: the service subscription process uses smart contracts to manage the user's service subscription and access control; the user first needs to send a service subscription request containing his or her virtual identity; the request also includes the type of service the user wants to subscribe to, and a digital signature generated by the user's private key to ensure the security of the request and identity verification.
5. The fast and efficient content cache optimization method based on ZKP according to claim 4 is characterized in that: The step S2 comprises: The user creates a request and generates a corresponding subscription certificate, which is used to indicate that the user has the right to subscribe to the corresponding service type; The user sends a request containing the service type and subscription proof to the fog wireless access point; The fog wireless access point checks the validity of the subscription certificate through the relevant verification protocol. If the verification is successful, the fog wireless access point confirms the user's request authority; The fog wireless access point generates a smart contract based on the user's request, records the details of the service including service type, duration, and cost, and sends the smart contract back to the user; After reviewing the smart contract details, the user completes the payment process using proof of payment to ensure that the payment is completed without revealing the payment details; After receiving the payment proof, the fog wireless access point activates the service and updates the service status and related transactions to the blockchain. The transaction is completed and the user gets the requested service; Among them, the types of subscription proof and payment proof are both zero-knowledge proof.
6. The fast and efficient content cache optimization method based on ZKP according to claim 5 is characterized in that: The fog wireless access network is used to cache the content with high user demand through the fog wireless access points; The step S3 comprises: The delivery time τ of providing content n based on user requests tot It is expressed as: Among them, τ BH represents the transmission time from the cloud computing network layer to the fog wireless access point; τ AC represents the transmission time from the fog wireless access point to the user; The cache status variable x indicates whether the content is cached in the fog node i,n , the expression is as follows: The first optimization goal is the maximum cache hit rate. The corresponding content cache optimization model construction expression is as follows: Among them, η refers to the maximum cache hit rate, r n Refers to the request frequency of content n; if content n is cached in fog wireless access point m i In, then x i,n =1, otherwise x i,n =0; The second optimization goal is to minimize the standardized content delivery time. The corresponding content cache optimization model construction expression is as follows: Among them, τ norm Refers to minimizing the time for standardized content delivery; The constraints include: Constraint C1 is used to ensure that each fog wireless access point m i The total size of the cached content does not exceed its cache capacity C i , where s n Indicates the size of content n, and its expression is as follows: C1: Constraint C2, used to represent x i,n is a binary variable, whether content n is cached to fog wireless access point m i In , each content can only be cached to one fog wireless access point at most to avoid wasting space by repeated caching. The expression is as follows: C2: Constraint C3 is used to indicate that the content cached by the fog wireless access point meets the hit rate of Q or above, ensuring that the content with high frequency requests is cached first. Its expression is as follows: C3: Constraint C4: The bandwidth resources of fog nodes are limited, where b i,n Represents node m i The bandwidth allocated for content n, B i is the total bandwidth of the node, and its bandwidth allocation needs to meet the following conditions: Constraint C5: To ensure the quality of service of the system, the cache strategy needs to meet the delay constraint:
7. The fast and efficient content cache optimization method based on ZKP according to claim 6 is characterized in that: The neural network training of the constructed content cache optimization model for predicting the popularity of cached content includes: Use blockchain to record users’ historical request data, which includes the number of times users requested different content; Load and preprocess the selected data set, and divide the data into a training set and a validation set; the data set includes the rating records and popularity distribution of several users on different contents; Define a neural network, including an embedding layer, a fully connected layer, and a bias layer. The embedding layer maps the app ID to a high-dimensional vector to capture the potential features related to content popularity. The output feature vector is processed by Dense and corrected by the bias term of the app to obtain the predicted popularity score of each app. Compile the model and use mean square error as the loss function to minimize the error between the actual number of user requests and the predicted number of ratings, so that the model can predict future user request behavior more and more accurately; The training set is used to train the model, and the validation data is used to evaluate the model performance. Then the validation set is used to predict the number of user requests, and the mean square error of the model is calculated and output as the evaluation indicator. Based on the number of user requests predicted by the model, the most popular content is output.
8. The fast and efficient content cache optimization method based on ZKP according to claim 7 is characterized in that: The step S4 comprises: Initialize the particle swarm, use the first several most popular contents as the initial cache state, and each particle corresponds to a cache strategy vector; Define a fitness function whose goal is to maximize the cache hit rate and minimize the normalized content delivery time; After initializing Pbest and gbest, start iteration and update each particle's speed, position, P best and g best ; Output the current optimal solution and return g best Corresponding cache hit ratio and minimized normalized content delivery time.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the fast and efficient content cache optimization method based on ZKP according to any one of claims 1 to 8 is implemented.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the fast and efficient content cache optimization method based on ZKP as described in any one of claims 1 to 8 by executing the executable instructions.
Citation Information
Patent Citations
Data security traceability and access control system under cloud computing framework
CN111327620A
Internet of vehicles crowd sensing reputation management system and method based on blockchain
CN113452681A
Multi-factor identity authentication method, device and equipment based on chaotic zero knowledge
CN117527260A
Privacy protected autonomous attestation
US20240333532A1