A fast and efficient content caching optimization method based on ZKP
By introducing ZKP and blockchain technology into the fog wireless access network, optimizing the user request smart contract process, and combining the PSO algorithm to optimize the caching strategy, the security issues of the user device layer in the fog wireless access network are solved, the caching efficiency and privacy protection are improved, and efficient content caching and privacy protection are achieved.
Patent Information
- Application Number
- CN202510316824.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Existing technologies do not fully consider the security requirements of the user device layer in fog wireless access networks, resulting in user data privacy information being vulnerable to attacks, and insufficient cache efficiency and privacy protection.
A fast and efficient content caching optimization method based on ZKP is adopted. By building a fog wireless access network that supports blockchain, ZKP is introduced to optimize the user request smart contract process, a content caching optimization model is established, and the PSO algorithm is used to optimize the caching strategy, predict the popularity of cached content, improve the cache hit rate and reduce latency.
It improves the cache hit rate and reduces latency while improving the privacy protection mechanism, maximizing resource utilization efficiency, reducing the direct exchange of sensitive information, and improving user privacy and security.
Smart Images

Figure CN120238959B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of privacy protection and content caching in fog wireless access networks, and in particular to a fast and efficient content caching optimization method based on ZKP. Background Art
[0002] As a new type of wireless access network, fog wireless access networks (Fog Wireless Access Networks) move computing and storage resources to the network edge, providing low-latency services to mobile users. However, while content caching in Fog Wireless Access Networks brings network convenience, data privacy and user privacy information are also more vulnerable to attacks in edge environments and collaborative models. Therefore, while developing caching technology, designing effective privacy protection solutions is also a key component of content caching. Expanding the application of blockchain technology is key to achieving this goal.
[0003] Currently, existing technologies primarily utilize blockchain technology to protect content caches from the cloud computing network layer to the fog wireless access network, but have yet to fully consider the security needs of the user device layer. This layer directly affects end-user data interaction and privacy protection, and privacy and security issues at the user device layer remain a pressing issue in this field. Summary of the Invention
[0004] In response to 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 while reducing latency, but also improve the privacy protection mechanism while improving the content caching efficiency, thereby achieving more comprehensive optimization of the system.
[0005] The present invention discloses a fast and efficient content cache optimization method based on ZKP, comprising:
[0006] S1: Build a fog wireless access network supporting blockchain;
[0007] S2: Introducing ZKP into the fog wireless access network for providing authorized registration and service subscription to optimize the process of user request smart contracts;
[0008] S3: Confirm cache hit rate and content delivery time as content cache optimization goals, establish a content cache optimization model to predict the popularity of cached content;
[0009] S4: Use the PSO algorithm to optimize the cache strategy so that the cached content can maximize the cache hit rate and minimize the transmission time.
[0010] Furthermore, in said 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;
[0011] Among them, the cloud computing network layer concentrates several baseband processing units to form a baseband processing unit pool;
[0012] Below the cloud computing network layer, the fog wireless access layer includes wireless remote radio units, fog wireless access points, and high-power nodes;
[0013] The user equipment layer includes traditional user equipment UE and fog computing user equipment F-UE. The fog computing user equipment has the collaborative capabilities of collaborative wireless signal processing and collaborative wireless resource management, and can communicate in D2D mode.
[0014] Furthermore, in 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 transaction timestamp, the ID of the fog wireless access point participating in the transaction, and the specific content data involved in the transaction.
[0015] Furthermore, in step S2:
[0016] 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;
[0017] The service subscription process 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 wishes to subscribe to, and a digital signature generated by the user's private key to ensure the security of the request and identity verification.
[0018] Furthermore, the step S2 includes:
[0019] The user creates a request and generates a corresponding subscription certificate (zero-knowledge proof) to indicate that the user has the right to subscribe to the corresponding service type;
[0020] The user sends a request containing the service type and subscription proof to the fog wireless access point;
[0021] 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;
[0022] The fog wireless access point generates a smart contract based on the user's request, records the service details including service type, duration, and fee, and sends the smart contract back to the user;
[0023] After the user reviews the smart contract details, they complete the payment process using proof of payment (another zero-knowledge proof) to ensure the payment is completed without revealing the payment details;
[0024] 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 obtains the requested service.
[0025] Furthermore, the fog wireless access network is used to cache content with high user demand through fog wireless access points;
[0026] The step S3 includes:
[0027] Delivery time τ for providing content n based on user request tot Expressed as:
[0028]
[0029] 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;
[0030] The cache status variable x indicates whether the content is cached in the fog node i,n , the expression is as follows:
[0031]
[0032] The first optimization goal is the maximum cache hit rate. The corresponding content cache optimization model construction expression is as follows:
[0033]
[0034] Among them, η refers to the maximum cache hit rate, r n Refers to the request frequency of content n; if content n is cached at fog wireless access point m i In the case of x i,n =1, otherwise x i,n =0
[0035] The second optimization goal is to minimize the standardized content delivery time. The corresponding content cache optimization model construction expression is as follows:
[0036]
[0037] Among them, τ norm Refers to minimizing the time it takes to deliver standardized content;
[0038] Constraints include:
[0039] 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:
[0040]
[0041] Constraint C2, used to express 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 repeated caching and wasting space. Its expression is as follows:
[0042]
[0043] Constraint C3 is used to indicate that the content cached by the fog wireless access point meets the hit rate of a or above, ensuring that frequently requested content is cached first. Its expression is as follows:
[0044]
[0045] 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:
[0046]
[0047] Constraint C5: To ensure the quality of service, the cache strategy needs to meet the delay constraint:
[0048]
[0049] The constructed content cache optimization model is trained on a neural network to predict the popularity of cached content.
[0050] Furthermore, the neural network training of the constructed content cache optimization model for predicting the popularity of cached content includes:
[0051] Use blockchain to record users' historical request data, which includes the number of times users requested different content;
[0052] Load and preprocess the selected dataset, dividing it into a training set and a validation set; the dataset includes user evaluations of several applications reflecting content popularity;
[0053] Define a neural network consisting of an embedding layer, a fully connected layer, and a bias layer. The embedding layer maps the app ID into a high-dimensional vector, capturing potential features related to content popularity. The output feature vector is then densely processed and corrected by the app's bias term to obtain a predicted popularity score for each app.
[0054] Compile the model and use 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 future user request behavior more and more accurately;
[0055] The model is trained using the training set, and the validation data is used to evaluate the model performance. The number of user requests is then predicted on the validation set, and the mean square error of the model is calculated and output as the evaluation metric.
[0056] Based on the number of user requests predicted by the model, the most popular content is output.
[0057] Furthermore, the step S4 includes:
[0058] 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;
[0059] Define a 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 Then start the iteration and update each particle speed, position, p best and g best ;
[0061] Output the current optimal solution and return g best Corresponding cache hit ratio and minimized normalized content delivery time.
[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 fast and efficient content cache optimization method based on ZKP is implemented.
[0063] The present invention also discloses an electronic device, comprising:
[0064] processor; and
[0065] a memory for storing executable instructions of the processor;
[0066] The processor is configured to execute the above-mentioned ZKP-based fast and efficient content cache optimization method by executing the executable instructions.
[0067] The present invention has at least the following beneficial effects:
[0068] The present invention introduces a ZKP smart contract that protects the privacy of user requests into a fog wireless access network system that supports blockchain technology. This contract can avoid multiple direct exchanges of sensitive information by reducing the process of repeated user interactions with nodes, thereby greatly protecting user privacy.
[0069] In order to improve the user experience quality and reduce transmission costs, the present invention uses content popularity as a reference to implement the content caching strategy in the system, thereby improving the cache hit rate while reducing the content interaction delay, thereby 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 embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0072] Figure 1 This is a flowchart of a fast and efficient content caching optimization method based on ZKP disclosed in a preferred embodiment of the present invention.
[0073] Figure 2 This is a schematic diagram of the network architecture of the fog wireless access network provided by the preferred embodiment of the present invention.
[0074] Figure 3 A schematic diagram of the ZKP-based user request content protection smart contract process provided in a preferred embodiment of the present invention.
[0075] Figure 4 Schematic diagram of the ZKP user request smart contract protection process provided by the preferred embodiment of the present invention.
[0076] Figure 5 Schematic diagram of the traditional user request smart contract protection process provided by the preferred embodiment of the present invention.
[0077] Figure 6 A comparison chart of the protection rates of user information provided by a traditional architecture-based user request smart contract and a ZKP-based user request smart contract in accordance with a preferred embodiment of the present invention.
[0078] Figure 7 Flowchart of the PSO cache optimization algorithm based on content popularity provided by the preferred embodiment of the present invention.
[0079] Figure 8 A schematic diagram of standardized content delivery time under different cache capacities provided by a preferred embodiment of the present invention.
[0080] Figure 9 A schematic diagram of cache hit rates under different cache capacities provided by a preferred embodiment of the present invention.
[0081] Figure 10 A schematic diagram of the changes in cache hit rate and content delivery time with the number of iterations provided in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0082] To make the objectives, technical solutions, and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other implementations obtained by those of ordinary skill in the art without inventive effort are within the scope of protection of the present invention.
[0083] The professional terms involved in the present invention are explained as follows:
[0084] ZKP, Zero-Knowledge Proof, zero-knowledge proof;
[0085] BC-FRAN, a blockchain-based fog wireless access network;
[0086] BBU, Baseband Unit, baseband processing unit;
[0087] RRH, Remote Radio Head, wireless remote radio unit;
[0088] F-AP, Fog Access Point, fog wireless access point / fog node;
[0089] F-APs, Fog Access Points, fog wireless access points / fog nodes;
[0090] proof subscription , proof of subscription;
[0091] proof payment , proof of payment / proof of payment;
[0092] st means subject to, which means being bound;
[0093] PSO, Particle Swarm optimization, particle swarm optimization algorithm;
[0094] p best , Personal Best, individual optimal solution;
[0095] g best , Global Best, global optimal solution.
[0096] The above-mentioned English abbreviations are also commonly used in this field, and their specific concepts and principles will not be described in detail in this article.
[0097] The serial numbers of the steps in each embodiment are only for distinguishing different steps, and are not used to limit the time sequence. Those skilled in the art should understand that they should combine actual needs under the guidance of the disclosure of the specification.
[0098] Example 1
[0099] This embodiment is primarily used in privacy protection and content caching in fog wireless access networks. In a F-RAN environment, content caching plays an important role in reducing network congestion, improving user experience, and saving network resources. However, F-APs are typically deployed in edge environments, which are open and easily compromised. Furthermore, in the F-RAN multi-part collaborative shared environment, user data may be distributed across multiple fog nodes, and the same infrastructure may be shared by different network service users. In a collaborative caching environment, shared data typically contains a lot of user private information, as well as the names and data of content obtained by users on F-APs. During data sharing, user data may be subject to access attacks, and private information may inevitably be leaked. Therefore, the significance of this embodiment lies in designing an efficient content caching algorithm in a fog wireless access network and preventing the leakage of user privacy information.
[0100] like Figure 1 As shown, this embodiment discloses a fast and efficient content cache optimization method based on ZKP, including:
[0101] S1: Build a fog wireless access network supporting blockchain;
[0102] S2: Introducing ZKP into the fog wireless access network for providing authorized registration and service subscription to optimize the process of user request smart contracts;
[0103] S3: Confirm cache hit rate and content delivery time as content cache optimization goals, establish a content cache optimization model to predict the popularity of cached content;
[0104] S4: Use the PSO algorithm to optimize the cache strategy so that the cached content can maximize the cache hit rate and minimize the transmission time.
[0105] The present invention is described in detail below with reference to specific cases:
[0106] The fast and efficient ZKP-based content caching optimization algorithm disclosed in this embodiment is applied to privacy protection and content caching in fog wireless access networks, and includes the following steps:
[0107] (1) Build a BC-FRAN system that supports blockchain. Figure 2 As shown, this embodiment demonstrates a fog wireless access network architecture. The fog wireless access network architecture is divided from top to bottom into a cloud computing network layer, a fog wireless access layer, and a user equipment layer. The cloud computing network layer centralizes multiple baseband processing units to form a BBU pool, which has centralized storage and computing capabilities. Below the cloud computing network layer, the fog wireless access layer is composed of wireless remote radio units, fog wireless access points, and high-power nodes. The wireless remote radio units are deployed remotely and forward user signals directly to the BBU pool via a high-bandwidth, low-latency fronthaul link after receiving the user signal from the RRH to provide services to the user. As a key component of the fog wireless access network, F-APs not only have the various functions of the RRH, but also have the functions of collaborative wireless signal processing and collaborative wireless resource management, which can effectively help the fog wireless access network alleviate the wireless network load pressure. The high-power nodes are mainly connected to the BBU pool via backhaul links to achieve control signaling distribution and wide-area seamless coverage. The wireless remote radio units, F-APs, and high-power nodes can achieve extremely low-interference joint processing and scheduling among the three through multi-point coordinated technology. The user equipment layer consists of multiple user equipment, including traditional user equipment UE and fog computing user equipment F-UE. F-UE has the collaborative capabilities of collaborative wireless signal processing and collaborative wireless resource management, and can communicate in D2D mode.
[0108] The introduction of blockchain technology offers new technical improvements for content caching in fog wireless access networks. The decentralization, transparency, and security of blockchain enable efficient collaboration and data sharing between nodes, thereby improving the efficiency and security of content caching. Blockchain can be used to build a decentralized cache management system, enabling resource allocation and scheduling between nodes through smart contracts. Each edge node can participate in caching tasks based on its own computing and storage capabilities. By recording transaction history and reputation scores on the blockchain, the most suitable node is selected for content caching. Furthermore, blockchain's encryption mechanisms ensure the secure transmission and storage of cached content between nodes, preventing unauthorized access and data tampering.
[0109] (2) BC-FRAN system provides two services: authorization registration and service subscription. In BC-FRAN, users have a pair of private keys. and public key First, the user generates a virtual identity VID using his public key u And the virtual identity is used for registration in the blockchain. The virtual identity is generated by the public key as the hash value of the public key, see the following formula:
[0110]
[0111] The user then sends their public key and virtual identity to the BC-FRAN of the F-APs for registration. Next, the blockchain node uses the user's public key and virtual identity to generate a signature using the user's private key:
[0112]
[0113] The blockchain node sends the user's public key, virtual identity and generated signature as a transaction to the blockchain network for registration. All blockchain nodes in 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 VID containing his virtual identity to the system. u This request should also include the type of service the user wants to subscribe to, and the user's private key Generated digital signature:
[0115]
[0116] Ensure request security and identity verification.
[0117] The F-APs that receive the request will first verify the user’s virtual identity in the public ledger of the blockchain.
[0118] VID u . After successful verification, F-APs check whether the requested service type is available and review whether the user is eligible to subscribe to the service. Once this information is confirmed to be correct, F-APs generates a new smart contract instance that records the user's service subscription details, including service type, subscription period and any related fee information. The smart contract establishes a clear agreement between the user and F-APs, clarifying the responsibilities and rights of both parties. The user completes the subscription process by paying the corresponding fee. Once the transaction is confirmed, the smart contract will activate the service, allowing the user to access the subscribed service. At the same time, the contract will record all transactions and status changes on the blockchain to ensure transparency and traceability of the service.
[0119] (3) Introduce ZKP to optimize the user request smart contract process. ZKP technology is an encryption 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 having to display 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 identities 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 u and associated valid subscription credentials, 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] ZKP (proofpayment )=ZK-STARKs({payment details}, {service type ,amount})
[0128] (3.6) After receiving the payment proof, F-APs activate the service and update the service status and related transactions to the blockchain using the hashed user ID hash (VID u ), further ensuring user privacy, the transaction is completed, and the user receives the requested service.
[0129] The ZKP-based user request smart contract is shown in Table 1 below.
[0130] Table 1: ZKP-based user request smart contract
[0131]
[0132] During the ZKP-based smart contract simulation, each user registers on the blockchain using ZKP and generates a virtual ID tied to their public key. This virtual ID ensures the privacy of the user's identity. The registration process utilizes the ECDSA signature mechanism, and both the user's public key and virtual ID are recorded on the blockchain. Once the user completes registration, they can choose to subscribe to a service. The service subscription request is verified using ZKP, and subscription information such as the service type, subscription fee, and marketplace is recorded in the smart contract. Once payment is confirmed, the smart contract activates, and the result is recorded on the blockchain.
[0133] Figure 4 This is the ZKP user request smart contract protection process proposed in this embodiment. Figure 5 Request smart contract protection process for traditional users, through Figure 4 and Figure 5 It can be seen from the comparison that the method provided in this embodiment effectively reduces the number of times information is exchanged during the user's content request process, and at the same time uses ZKP technology to effectively protect the user's virtual identity, signature and other privacy information, effectively reducing the risk of privacy exposure during the user's content request process, thereby achieving the purpose of protecting user privacy.
[0134] Figure 6This figure shows the protection rates of user information for traditional and ZKP-based user request smart contracts. These include replay attacks, tampering attacks, and man-in-the-middle attacks. The ZKP-based user request smart contract demonstrates significant superiority in all three attack scenarios. Its dynamic challenge-response mechanism makes it difficult for attackers to forge legitimate requests, thereby improving attack resistance and protection rates. This demonstrates that the ZKP-based user request smart contract can more effectively protect user privacy.
[0135] (4) Determine the two optimization goals of cache hit rate and content delivery time. To improve user experience quality and reduce transmission costs, F-APs in BC-FRAN can cache content in advance, pre-caching content with high user demand on F-APs closer to the user. If the content requested by the user is available in the node's cache, it can be provided immediately; uncached content needs to be obtained from the cloud, which increases transmission latency.
[0136] Content delivery time is an important indicator for evaluating content caching efficiency. The delivery time τ for the network to provide the requested content n to the user tot It can be expressed as:
[0137]
[0138] Among them, τ BH represents the transmission time from the cloud to the fog node; τ AC represents the transmission time from the fog node to the user.
[0139] Set the content set to be expressed as N = {n1, n2, ..., n N}, each content n j Represents the resources that can be requested by users. The fog node set is represented as M = {m1, m2, ..., m M}, where each fog node m i There is a limited cache capacity C i Let x i,n Is a cache state variable, indicating the content n j Whether it is cached to fog node m i middle.
[0140]
[0141] To predict the popularity of each piece of content, each F-AP needs to review all transaction histories available in the network based on the public ledger generated by the blockchain. The content is ranked based on its estimated popularity based on the public ledger. First, the total number of requests for each function is calculated, and then the content is ranked in descending order of the number of requests.
[0142] Therefore, two optimization objectives can be obtained. The first optimization objective is the maximum cache hit rate η.
[0143]
[0144] Among them, r n Indicates the request frequency of content n; if content n is cached in fog node m i Zhongzex i,n =1, otherwise x i,n =0.
[0145] The second optimization goal is to minimize the normalized content delivery time τ norm .
[0146]
[0147] (5) Establish a content cache optimization model.
[0148] The caching strategy should satisfy the cache capacity constraint of each fog node.
[0149]
[0150] Among them, s j Indicates content n j Size, C i Represents fog node m i cache capacity.
[0151] Therefore, the content cache optimization model can be constructed as follows:
[0152]
[0153] Among them, the constraint C1 ensures that each fog node m i The total size of the cached content cannot exceed its cache capacity C i , where s n Indicates the size of the content n; constraint C2 indicates x i,n is a binary variable indicating whether content n is cached in fog node m i In the above example, each content n can only be cached to one fog node at most to avoid wasting space by repeated caching. Constraint C3 means that the content cached by the fog node meets the hit rate a or above, ensuring that the content with high frequency requests is cached first. Constraint C4 means that the bandwidth resources of the fog node are limited, b i,n Represents node m i The bandwidth allocated for content n, B i is the total bandwidth of the node, constraint C5 ensures the system quality of service, and the caching strategy needs to meet the delay constraint.
[0154] (6) Train a neural network to predict the future popularity of cached content.
[0155] (6.1) Use blockchain to record users’ historical request data, which includes the number of times users requested different content.
[0156] (6.2) Use the latest Movielens dataset, which contains 20 million ratings from 138,000 users on 27,000 movies. Load and preprocess the data, splitting it into training and validation sets.
[0157] (6.3) Define a neural network consisting of an embedding layer, a fully connected layer, and a bias layer. The embedding layer maps the movie ID into a high-dimensional vector, capturing the latent features related to the content's popularity. The output feature vector is then densely processed and corrected by the movie's bias term to obtain the predicted popularity score for each movie.
[0158] (6.4) Compile the model and use the 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.
[0159] (6.5) Use the training set to train the model, and the validation data to evaluate the model performance. Then, use the validation set to predict the number of user requests, and calculate and output the mean squared error of the model as the evaluation metric.
[0160] (6.6) Based on the number of user requests predicted by the model, output the top Z most popular contents, where Z is a positive integer.
[0161] (7) Use PSO to optimize cache strategy.
[0162] Step 7.1: Initialize the particle swarm, use the top Z most popular contents as the initial cache state, and each particle corresponds to a cache strategy vector x;
[0163] Step 7.2: Define the fitness function f(x), which is expressed 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 Then start the iteration and update each particle speed, position, p best and g best Move it 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 strategy g best The corresponding cache hit rate η and the minimized normalized content delivery time.
[0168] In this embodiment, steps (6) and (7) can be found in Figure 7 shown.
[0169] The fast and efficient content caching optimization algorithm based on ZKP is shown in Table 2 below.
[0170] Table 2 PSO cache optimization algorithm based on content popularity
[0171]
[0172]
[0173] like Figures 8 to 10 The overall performance analysis of content caching is shown in FIG. Figure 8 represents the standardized content delivery time under different cache capacities, from Figure 8 As can be seen from the example, for both traditional and ZKP-based smart contracts, content delivery time decreases with increasing cache capacity, improving overall system performance. However, traditional smart contracts are limited by the latency generated by complex user request interaction strategies. ZKP-based smart contracts reduce the transmission latency of user-requested content by reducing the number of request interactions, thereby improving system responsiveness and reducing user wait time.
[0174] like Figure 9 As shown in the figure, it represents the cache hit rate under different cache capacities. With the traditional method, the cache hit rate gradually increases with the increase in cache capacity and tends to stabilize at higher cache capacities. However, the cache hit rate still increases relatively slowly. The ZKP-based smart contract proposed in this embodiment has a higher cache hit rate than the traditional method at the same cache capacity, indicating that the ZKP-based smart contract proposed in this embodiment effectively optimizes the cache hit rate.
[0175] like Figure 10 As shown in the figure, it shows the changes in cache hit rate and content delivery time with the number of iterations. As the number of iterations increases, the PSO algorithm gradually optimizes the position of particles and 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 be stable, close to the optimal solution, and the system performance is close to the optimal solution.
[0176] Example 2
[0177] This embodiment discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the fast and efficient content cache optimization method based on ZKP described in the first embodiment is implemented.
[0178] Example 3
[0179] This embodiment discloses an electronic device, including:
[0180] processor; and
[0181] a memory for storing executable instructions of the processor;
[0182] The processor is configured to execute the ZKP-based fast and efficient content cache optimization method described in the first embodiment by executing the executable instructions.
[0183] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.
Claims
1. A fast and efficient content cache optimization method based on ZKP, characterized in that: include: S1: Build a fog wireless access network supporting blockchain; S2: Introducing ZKP into the fog wireless access network for providing authorized registration and service subscription to optimize the process of user request smart contracts; S3: Confirm cache hit rate and content delivery time as content cache optimization goals, establish a content cache optimization model to predict the popularity of cached content; S4: Use the PSO algorithm to optimize the cache strategy so that the cached content can maximize the cache hit rate and minimize the transmission time; The fog wireless access network is used to cache content with high user demand through fog wireless access points; The step S3 includes: Content provided based on user requests n Delivery time τ tot Expressed as: ; in, τ 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; A cache status variable indicating whether the content is cached in the fog node x i,n , the expression is as follows: ; The first optimization goal is to maximize the cache hit rate , The corresponding content cache optimization model construction expression is as follows: ; in, η Refers to the maximum cache hit rate, r n Refers to content n The request frequency; if the content n Caching at fog wireless access points m i In 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: ; in, Refers to minimizing the time it takes to deliver standardized content; 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 is used to express 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 repeated caching and wasting space. Its 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 α 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 Representation node m i For content n allocated bandwidth, 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, the cache strategy needs to meet the delay constraint: 。 2. The fast and efficient content cache optimization method based on ZKP according to claim 1 is characterized in that: In 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 equipment layer includes traditional user equipment UE and fog computing user equipment F-UE. The fog computing user equipment has the collaborative capabilities of collaborative wireless signal processing and collaborative wireless resource management, and can communicate in D2D mode.
3. The fast and efficient content cache optimization method based on ZKP according to claim 2 is characterized in that: In 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 transaction timestamp, the ID of the fog wireless access point participating 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 process 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 wishes 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 includes: 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 service details including service type, duration, and fee, 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 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 obtains 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 constructed content cache optimization model is trained on a neural network to predict the popularity of cached content, including: Use blockchain to record users' historical request data, which includes the number of times users requested different content; Load and preprocess the selected dataset, dividing it into a training set and a validation set; the dataset includes the rating records and popularity distribution of different content by several users; Define a neural network consisting of an embedding layer, a fully connected layer, and a bias layer. The embedding layer maps the app ID into a high-dimensional vector, capturing potential features related to content popularity. The output feature vector is then densely processed and corrected by the app's bias term to obtain a predicted popularity score for each app. Compile the model and use 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 future user request behavior more and more accurately; The model is trained using the training set, and the validation data is used to evaluate the model performance. The number of user requests is then predicted on the validation set, and the mean square error of the model is calculated and output as the evaluation metric. Based on the number of user requests predicted by the model, the most popular content is output.
7. The fast and efficient content cache optimization method based on ZKP according to claim 6, characterized in that: The step S4 includes: 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; initialization and Then start the iteration and update the speed and position of each particle. and ; Output the current optimal solution and return Corresponding cache hit ratio and minimized normalized content delivery time.
8. 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 7 is implemented.
9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the ZKP-based fast and efficient content cache optimization method according to any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Data security traceability and access control system under cloud computing framework
CN111327620A
Multi-factor identity authentication method, device and equipment based on chaotic zero knowledge
CN117527260A