Edge data caching method and device, medium and equipment
By constructing a quadratic unconstrained binary optimization model and a quantum computer-optimized edge data caching solution, the problems of difficult-to-determine caching solutions and poor results were solved, and latency was reduced, user satisfaction was improved, and resources were optimized.
Patent Information
- Application Number
- CN202410271963.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2025-09-12
AI Technical Summary
Existing edge data caching solutions are difficult to determine and have poor effects, resulting in high computing resource requirements and low cache hit rates, making it difficult to cope with high concurrent requests and large-scale data sets.
By constructing a quadratic unconstrained binary optimization model, using quantum computers to optimize the cache scheme, maximize the delay reduction of the cache scheme, determine the file cache location, and use quantum annealing machines and coherent Ising machines to solve it.
Significantly reduce user request latency, improve user satisfaction, reduce server load, save network bandwidth costs, and optimize data access and resource utilization.
Smart Images

Figure CN120639853A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge storage technology, and specifically relates to an edge data caching method, device, medium and equipment. Background Art
[0002] Edge data caching is a technology that utilizes edge nodes to store and manage data, aiming to improve application performance and user experience. By storing data at the edge, edge data caching can reduce data transmission latency and provide users with faster response times. Edge data caching devices can be applied to a variety of scenarios and applications. For example, in the Internet of Things, sensor data can be cached on edge devices to quickly respond to real-time data requests. In content delivery networks, it is common practice to cache frequently used content on edge servers to provide faster delivery to users. In edge computing environments, edge data caching can be combined with other edge computing technologies, such as edge computing task offloading and edge data analytics, to provide more powerful computing and data processing capabilities.
[0003] Several solutions exist for edge caching mechanism design, including the following common ones: Content-based caching: This approach makes caching decisions based on data content characteristics. When a request arrives, the edge node checks whether the requested data is already in the cache and makes a decision based on the data's content characteristics. This approach is simple and straightforward, but can lead to high storage overhead and low cache hit rates for large datasets. Location-based caching: This approach makes caching decisions based on the user or device's location information. The edge node caches data at the location closest to the user or device to provide faster access. However, this approach can face challenges with inaccurate or frequently changing location information, leading to uncertainty in caching decisions. Prediction-based caching: This approach leverages machine learning and data analytics to predict user request patterns and pre-cache likely requested data on edge nodes. This can improve cache hit rates and user experience, but requires accurate prediction models and a large amount of training data.
[0004] While these existing solutions can improve edge caching performance to a certain extent, they also have drawbacks. These solutions require complex algorithms and models to make caching decisions, consuming significant computing resources and time. This can limit real-time performance and scalability, and make it difficult to handle high-concurrency requests. Furthermore, these solutions have limited optimization effects. While they can improve cache hit rates and data access speed to a certain extent, their effectiveness may be limited for large-scale datasets and complex application scenarios.
[0005] In summary, the purpose of the present invention is to solve the problems of difficulty in determining caching solutions and poor results in existing edge data caching processes. Summary of the Invention
[0006] In view of the above analysis, embodiments of the present invention aim to provide an edge data caching method, apparatus, medium, and device to solve the problems of difficulty in determining caching solutions and poor results in existing edge data caching processes.
[0007] A first embodiment of the present invention provides an edge data caching method, comprising the following steps:
[0008] Obtain file data, server data, and user data. The user data includes the distribution of user requests for files and the set of direct servers of the user, where all servers in the set cover the user. The server data includes the transmission distance between any two servers.
[0009] Constructing a candidate cache solution space, the candidate cache solution space including a plurality of candidate cache solutions, defining a first binary variable to indicate whether any file is cached by any server, and all combinations of values of the first binary variable to constitute a candidate cache solution;
[0010] Taking maximizing the cache solution delay reduction as the objective function, the cache solution delay reduction includes the sum of all request delay reductions of all users;
[0011] According to a preset condition that the cache solution needs to meet, a constraint is established through the relationship between the first binary variable, the file data, the server data, the user data, and the request delay reduction amount;
[0012] forming a penalty term based on the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary model;
[0013] The quadratic unconstrained binary model is solved to determine the value of each first binary variable, and the file cache position is determined according to the value of the first binary variable.
[0014] In some embodiments, obtaining the file data includes obtaining a set of files to be cached f={f1, f2, ..., f F}, where f i Represents file i in the file collection;
[0015] Acquiring the server data includes acquiring a server set S = {S1, S2, ..., S n} and the server, where S i Denote server i in the server set. A server network graph is constructed based on the connections between servers. The shortest distance between any two servers is obtained using the Floyd-Warshall algorithm.
[0016] Acquiring the user data includes acquiring a user set U = {U1, U2, ..., U m}, where U i Denote user i in the user set, obtain the user direct server set σ(i) based on the coverage information of each server for user i, and obtain the request distribution of each user for each file, which is expressed as r i,f , if user i needs to request file f, then r i,f =1, otherwise r i,f =0;
[0017] The first binary variable is denoted as x j,f , if file f is cached on server j then x j,f =1, otherwise x j,f =0.
[0018] In some embodiments, the objective function is expressed as:
[0019] where b i,f represents the reduction in request latency for user i requesting file f, m represents the number of users in the user set, and F represents the number of files in the file set;
[0020] The method for obtaining the reduction in request delay of user i requesting file f includes:
[0021] Check the user's direct server set. If a server in the user's direct server set has file f cached, the request delay is 0. Otherwise, obtain the shortest transmission distance from the server that has file f cached to a server in the user's direct server set. This shortest transmission distance is used as the request delay.
[0022] The request delay reduction amount is determined according to the request delay: request delay reduction amount=preset value-request delay.
[0023] In some embodiments, the preset condition includes that the number of files cached by each server has an upper limit.
[0024] In some embodiments, constructing a constraint using the first binary variable, the file data, the server data, and the user data includes the following steps S31-S35:
[0025] S41. Constrain the first binary variable according to the preset condition. The constraint is expressed as:
[0026] ∑ 1≤f≤F x j,f ≤s,1≤j≤n(1), where s represents the upper limit;
[0027] S42. Define y i,k,j,f is the second binary variable. If for user i’s user direct server set σ(i), the server that caches file f is server j, and the server in σ(i) with the closest transmission distance to server j is server k, then y i,k,j,f =1, otherwise y i,k,j,f =0;
[0028] S43. Constrain the second binary variable according to the definition of the second binary variable. The constraint is expressed as:
[0029]
[0030] S44. Constrain the request delay reduction amount using the first binary variable, the second binary variable, the file data, the server data, and the user data. The constraint is expressed as:
[0031] b i,f ≥Δ kj ·x j,f ·r i,f , (3)
[0032] b i,f ≤Δ kj ·x j,f ·r i,f +(1-y i,k,j,f )M (4)
[0033] Among them, b i,f represents the reduction in user i’s request delay for file f, Δ kj represents the reduction in transmission delay between server k and server j, and M represents a preset positive constant.
[0034] In some embodiments, forming a penalty term based on the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary optimization model includes:
[0035] S41, converting the objective function into equivalent
[0036] S42, performing a second unconstraintization on the constraint and multiplying the constraint by a penalty coefficient to form a penalty term;
[0037] S43, adding the penalty term to the objective function to form the quadratic unconstrained binary optimization model, which is expressed as formula (5):
[0038]
[0039]
[0040] Where γ represents the penalty coefficient, slack1 and slack2 each represent the slack variables generated when the corresponding inequality constraint is quadratically unconstrained;
[0041] All the integer non-binary variables in the quadratic unconstrained binary optimization model are converted into a combination of several auxiliary binary variables through binary representation.
[0042] In some embodiments, the quadratic unconstrained binary optimization model is solved by a quantum computer.
[0043] A second embodiment of the present invention provides an edge data caching device, comprising:
[0044] An acquisition module acquires file data, server data, and user data. The user data includes the distribution of user requests for files and the set of direct servers of the user. All servers in the set of direct servers of the user cover the user. The server data includes the transmission distance between any two servers.
[0045] A decision space construction module is configured to construct a candidate cache solution space, wherein the candidate cache solution space includes a plurality of candidate cache solutions, and defines a first binary variable to indicate whether any file is cached by any server, wherein all combinations of values of the first binary variable constitute a candidate cache solution;
[0046] An objective function construction module is configured to maximize a cache solution delay reduction as an objective function, wherein the cache solution delay reduction includes the sum of all request delay reductions of all users;
[0047] A constraint module, which constructs a constraint based on a relationship between the first binary variable, the file data, the server data, the user data, and the request delay reduction according to a preset condition that the cache solution needs to meet;
[0048] a penalty generation module, forming a penalty term according to the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary model;
[0049] A solution module solves the quadratic unconstrained binary model to determine the value of each first binary variable, and determines the file cache position according to the value of the first binary variable.
[0050] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the edge data caching method described in any of the above embodiments is implemented.
[0051] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the edge data caching method as described in any of the above embodiments is implemented.
[0052] The embodiments of the present invention have at least the following beneficial effects:
[0053] 1. Overall latency reduction: By maximizing the total latency reduction of the caching solution, the latency of user requests can be significantly reduced. Storing the most frequently requested files allows them to be retrieved from the cache faster, reducing reliance on remote servers and network transmission time, thereby improving the user experience.
[0054] 2. Improve user satisfaction: Responding quickly to user requests is a key factor in improving user satisfaction. By maximizing latency reduction through caching solutions, user requests can be fulfilled more frequently and the required files can be delivered quickly. This significantly reduces user wait time and increases user satisfaction with the service.
[0055] 3. Reduce server load: Caching solutions can store popular files closer to users, thereby reducing the load on remote servers. By maximizing the latency reduction of caching solutions, cache capacity can be better utilized, reducing frequent access to remote servers and reducing server load pressure.
[0056] 4. Save network bandwidth costs: Maximizing latency reduction in caching solutions can reduce the demand for network bandwidth. Storing frequently requested files can reduce network traffic and lower the cost of data transmission in the network, thereby saving bandwidth costs for service providers. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0058] Figure 1 A schematic flow chart of an edge data caching method provided by an embodiment of the first aspect of the present invention;
[0059] Figure 2 This is a schematic diagram of the implementation process of an embodiment of the present invention;
[0060] Figure 3 A schematic diagram of the edge data caching device architecture provided by the present invention;
[0061] Figure 4 This is a schematic diagram of the electronic device architecture provided by the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. It should be noted that, in the absence of conflict, the embodiments and features in the embodiments disclosed in this disclosure can be combined, separated, interchanged and / or rearranged with each other. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0063] The terms used herein are for the purpose of describing specific embodiments and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, the features, integral bodies, steps, operations, parts, assemblies and / or their groups stated are explained, but the presence or addition of one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups is not excluded. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or the values provided that will be recognized by those of ordinary skill in the art.
[0064] A first embodiment of the present invention provides an edge data caching method, comprising the following steps:
[0065] Obtain file data, server data, and user data. The user data includes the distribution of user requests for files and the set of direct servers of the user, where all servers in the set cover the user. The server data includes the transmission distance between any two servers.
[0066] Constructing a candidate cache solution space, the candidate cache solution space including a plurality of candidate cache solutions, defining a first binary variable to indicate whether any file is cached by any server, and all combinations of values of the first binary variable to constitute a candidate cache solution;
[0067] Taking maximizing the cache solution delay reduction as the objective function, the cache solution delay reduction includes the sum of all request delay reductions of all users;
[0068] According to a preset condition that the cache solution needs to meet, a constraint is established through the relationship between the first binary variable, the file data, the server data, the user data, and the request delay reduction amount;
[0069] forming a penalty term based on the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary model;
[0070] The quadratic unconstrained binary model is solved to determine the value of each first binary variable, and the file cache position is determined according to the value of the first binary variable.
[0071] It should be understood that the decision space for the problem is to store a number of files on each server, where the number of files does not exceed the server capacity limit. The goal is to maximize the delay reduction corresponding to the caching solution. Another possible goal is to minimize the delay caused by the caching solution. However, some caching solutions may cause user requests to be unsatisfied, in which case it is impossible to define an appropriate delay. Therefore, the present invention defines the delay reduction when the request is not satisfied as 0, and determines the goal to maximize the overall delay reduction of the caching solution.
[0072] In some embodiments, obtaining the file data includes obtaining a set of files to be cached f={f1, f2, ..., f F}, where f i Represents file i in the file collection;
[0073] Acquiring the server data includes acquiring a server set S = {S1, S2, ..., S n} and the server, where S i Denote server i in the server set. A server network graph is constructed based on the connections between servers. The shortest distance between any two servers is obtained using the Floyd-Warshall algorithm.
[0074] The servers in a specific area form a server network. This embodiment models it as a graph G(V,E), where nodes represent servers and edges represent connections between two servers. Given the graph G(V,E) corresponding to the server network, this embodiment defines the transmission distance d between any two servers j and k in the network as jk is the shortest transmission distance between two corresponding nodes in graph G, which can be obtained using the Floyd-Warshall algorithm in graph theory. After obtaining the shortest transmission distance between servers, this embodiment defines the delay reduction when transmitting data between server j and server k as Δ jk =d max -d jk , where d max Denotes the maximum possible transmission distance in the server network. The delay reduction is closely related to the objective function of this embodiment, the overall delay reduction of the cache solution. The longer the transmission distance, the lower the delay reduction.
[0075] Acquiring the user data includes acquiring a user set U = {U1, U2, ..., U m}, where U i Denote user i in the user set, obtain the user direct server set σ(i) based on the coverage information of each server for user i, and obtain the request distribution of each user for each file, which is expressed as r i,f , if user i needs to request file f, then r i,f =1, otherwise r i,f = 0. In other words, the servers in the user direct server set σ(i) are the set of servers in the server set that directly cover user i.
[0076] Since different files have different popularity, different users will request different files. In this embodiment, we define r i,f Describes the distribution of user requested files, i.e. r i,f =1 means user i needs file f, otherwise r i,f = 0. Define M as a sufficiently large positive constant in this embodiment. In some embodiments, let M = d max .
[0077] Combinatorial optimization is a mathematical optimization technique that consists of discrete decision variables, an objective function, and constraints, with the goal of finding the optimal value of the objective function and the corresponding optimal solution. If the objective function is quadratic, there are no constraints, and the decision variables can only take 0 or 1, then this combinatorial optimization is called a quadratic unconstrained binary optimization model (QUBO). The QUBO model can be solved by dedicated quantum computers such as quantum annealing machines or coherent Ising machines. Using quantum computers to accelerate the solution of problems improves computing efficiency and solves the problems of difficulty in determining caching solutions and poor results in edge data caching in existing technologies.
[0078] To facilitate model construction, we first summarize the logic of the edge data caching problem. For a given caching solution, the corresponding files are stored on each server, and the corresponding benefits of the solution are calculated as follows.
[0079] First, for each request from each user, check whether the requested file exists in the server covering the user. If so, the delay is 0; otherwise, start from the server covering the user, find the server closest to these servers that stores the file, and calculate the corresponding delay reduction.
[0080] Then, the delay reduction corresponding to all users' requests is summed up to obtain the delay reduction corresponding to the caching solution.
[0081] Solve to find the optimal caching solution to maximize the overall latency reduction.
[0082] Specifically, in some embodiments, the first binary variable is represented as x j,f , if file f is cached on server j then x j,f =1, otherwise x j,f =0.
[0083] In some embodiments, the objective function is expressed as:
[0084] where b i,f represents the reduction in request latency for user i requesting file f, m represents the number of users in the user set, and F represents the number of files in the file set;
[0085] The method for obtaining the reduction in request delay of user i requesting file f includes:
[0086] Check the user's direct server set. If a server in the user's direct server set has file f cached, the request delay is 0. Otherwise, obtain the shortest transmission distance from the server that has file f cached to a server in the user's direct server set, and use this shortest transmission distance as the request delay. In other words, the request delay for user i requesting file f cached on a server in the user's direct server set σ(i) is zero, and the request delay reduction is the maximum value d. max If file f is not in σ(i), the server k (server k∈σ(i)) with the closest transmission distance to the server j that found the cached file f is used to calculate the request delay reduction of user i requesting file f, that is, the delay reduction from server j to server k.
[0087] The request delay reduction amount is determined according to the request delay: request delay reduction amount=preset value-request delay.
[0088] In some embodiments, the preset condition includes that the number of files cached by each server has an upper limit.
[0089] In some embodiments, constructing a constraint using the first binary variable, the file data, the server data, and the user data includes the following steps S31-S35:
[0090] S41. Constrain the first binary variable according to the preset condition. The constraint is expressed as:
[0091] ∑ 1≤f≤F x j,f ≤s,1≤j≤n(1), where s represents the upper limit.
[0092] This constraint means that for any server, the number of cached files cannot exceed the server capacity limit.
[0093] S42. Define y i,k,j,f is the second binary variable. If for user i’s user direct server set σ(i), the server that caches file f is server j, and the server in σ(i) with the closest transmission distance to server j is server k, then y i,k,j,f =1, otherwise y i,k,j,f =0.
[0094] S43. Constrain the second binary variable according to the definition of the second binary variable. The constraint is expressed as:
[0095] This constraint means that for any user i and file f, file f can only be cached in one server, and the transmission distance between this server and a certain server in σ(i) is the shortest.
[0096] S44. Constrain the request delay reduction amount using the first binary variable, the second binary variable, the file data, the server data, and the user data. The constraint is expressed as:
[0097] b i,f ≥Δ kj ·x j,f ·r i,f , (3)
[0098] b i,f ≤Δ kj ·x j,f ·r i,f +(1-y i,k,j,f )M (4)
[0099] Among them, b i,f represents the reduction in user i’s request delay for file f, Δ kj represents the reduction in transmission delay between server k and server j, and M represents a preset positive constant. Under the constraints (3) and (4), if the variable y i,k,j,f =1, then b i,f The limit is equal to the delay reduction from server k to server j, which meets the definition of request delay reduction. If y i,k,j,f = 0 means that user i cannot request file f through servers k and j or will not request f, b i,f =0, which satisfies constraints (3) and (4).
[0100] In some embodiments, forming a penalty term based on the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary optimization model includes:
[0101] S41, converting the objective function into equivalent
[0102] S42, performing a second unconstraintization on the constraint and multiplying the constraint by a penalty coefficient to form a penalty term;
[0103] In an embodiment of the present invention, performing secondary unconstraint on the constraints includes secondary unconstraint on the equality constraints, such as constraints (1) and (2).
[0104] The quadratic unconstraintization of the equality constraint includes rewriting the constraint equation into the form of f(x)=0, and then squaring the left side of the equation and multiplying it by the penalty coefficient to form a penalty term.
[0105] The quadratic unconstraintization of inequality constraints involves introducing slack variables into the inequality constraints, converting them into equality constraints, and then converting them into penalty terms according to the quadratic unconstraintization method of equality constraints, such as constraints (3) and (4).
[0106] In some embodiments, forming a penalty term based on the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary optimization model includes:
[0107] S41, converting the objective function into equivalent
[0108] S42, performing a second unconstraintization on the constraint and multiplying the constraint by a penalty coefficient to form a penalty term;
[0109] S43, adding the penalty term to the objective function to form the quadratic unconstrained binary optimization model, which is expressed as formula (5):
[0110]
[0111] Where γ represents the penalty coefficient, slack1 and slack2 each represent the slack variables generated when the corresponding inequality constraint is quadratically unconstrained;
[0112] All the integer non-binary variables in the quadratic unconstrained binary optimization model are converted into a combination of several auxiliary binary variables through binary representation.
[0113] The integer non-binary variables in the quadratic unconstrained binary optimization model are converted into a combination of several auxiliary binary variables through binary representation. Among them, the integer non-binary variables are, for example, the slack variables mentioned above in the embodiment of the present invention. For example, the slack variable slack1 needs to be represented in binary as a number of quantum bits slack (i) The weighted sum of:
[0114] slack1=∑ i 2 i slack (i) .
[0115] In some embodiments, the quadratic unconstrained binary optimization model is solved by a quantum computer.
[0116] Preferably, the QUBO model of the embodiment of the present invention is applicable to special quantum computers such as quantum annealing machines and coherent Ising machines (CIM). The implementation and solution of the physical machine takes the CIM based on the degenerate optical parametric oscillator (DOPO) as an example. This is a hybrid quantum computing system consisting of an optical part and an electrical part. The optical part includes a laser, an amplifier, a periodically poled lithium niobate crystal (PPLN) and an optical fiber loop. The laser uses a femtosecond pulse fiber laser and is equipped with an amplifier system. The amplified laser is first frequency-doubled using a PPLN crystal. The frequency-doubled laser is used as a pump source to synchronously pump the PPLN crystal in a fiber loop to form a degenerate optical parametric oscillation. Hundreds of oscillation pulses can exist simultaneously in the fiber loop. The electrical part includes an FPGA (Field Programmable Gate Array), AD / DA (digital-to-analog / analog-to-digital conversion), and a phase detection part. The laser output from the fiber loop and the fundamental frequency laser are measured using a phase detector, allowing the phase of the output light to be tested. FPGA is used with high-speed AD / DA for optical pulse measurement and feedback control.
[0117] Unlike classical computers, which operate on semiconductor integrated circuits, CIM uses laser pulses in optical fibers as quantum bits for computation. In DOPO, pump light is incident on a nonlinear optical crystal, splitting it into two beams. These two beams have the same polarization direction and a frequency half that of the pump light, remaining in a compressed state and functioning as a quantum bit. By gradually increasing the pump light power above the oscillation threshold, the generated light becomes coherent, with its phase splitting into two states (phase 0 and π). This phase can then be set to ±1 relative to the spin, enabling optimization problems.
[0118] CIM operates differently from traditional computers that rely on semiconductor integrated circuits. Instead, it uses laser pulses in optical fibers as the basic unit of calculation, called qubits. Initial research in academia focused on the idea of injection-synchronized laser Ising machines. Since the number of coupled lasers grows with the square of the qubits, an improved scheme based on degenerate optical parametric oscillators (DOPOs) was proposed. Using nonlinear optical crystals, two DOPO-based methods, optical delay line CIM and measurement feedback CIM, were developed. However, in the first scheme, the overhead and the need for precise control are unbearable. This scheme is based on measurement feedback CIM. Based on the QUBO form of this embodiment described above, it can be transformed into the Ising model and the corresponding maximum cut problem. The objective function can be expressed as maximizing Define two rotation unitary matrices U(C,γ)=e -iγC and U(B,β)=e -iβB After repeating the operation p times, the following new state can be obtained:
[0119] |ψ(γ,β)〉=|γ,β〉=U(B,β p )U(C,γ p )…U(B, β2)U(C, γ2)U(B, β1)U(C, γ1)|ψ>. Then follow the steps below to get the approximate solution:
[0120] 1. Build a QAOA quantum circuit, which contains trainable parameters;
[0121] 2. Initialize the parameters in the circuit. Initialize the quantum state in the quantum computer;
[0122] 3. Run the quantum circuit to obtain the quantum state;
[0123] 4. Use quantum states to calculate the expected value of the target function and the Hamiltonian in a classical computer;
[0124] 5. Repeat steps 2-4 several times, that is, measure the same set of parameters γ and β multiple times to obtain the distribution of quantum states;
[0125] 6. Use grid search to optimize the parameters in the circuit. Repeat steps 2-5 for a new set of parameters γ and β. After obtaining the distribution of quantum states, select the one with the largest target value.
[0126] 7. Based on the results of step 4, calculate the approximate solution to the target problem.
[0127] Specifically, in some embodiments, the present invention is implemented as follows Figure 2 As shown in Figure 1, the system primarily consists of a client, a server, and a coherent Ising machine. The client uploads the distribution of user file requests to the server. After collecting the data, the server, combined with data such as the transmission distance between servers, builds a corresponding QUBO model. This mathematical model is then fed into the coherent Ising machine to compute the optimal solution to the problem. The coherent Ising machine returns the solution to the server, which uses the data to perform corresponding cache file operations.
[0128] In addition, designing edge caching solutions based on optical quantum computers can bring the following benefits:
[0129] Handling Complex Problems: Designing edge caching mechanisms is an NP-hard problem, meaning it's difficult to find an exact solution within an acceptable timeframe. Optical quantum computers possess powerful computing capabilities, enabling them to handle complex problems and large-scale file collections. By leveraging the quantum properties of optical quantum computers, solutions for edge caching mechanisms can be more efficiently searched and optimized, improving problem-solving efficiency.
[0130] Providing better performance optimization: Edge caching mechanisms are designed to optimize data access and caching strategies to provide better performance and resource utilization. Design solutions based on optical quantum computers can leverage quantum algorithms and quantum optimization techniques to find optimal caching strategies for different problem constraints and optimization objectives. This can improve data access latency, network bandwidth utilization, and energy consumption, ultimately boosting system performance.
[0131] Processing large file sets: Edge computing environments require processing large file sets and complex data access patterns. Solutions based on optical quantum computers can fully leverage the parallel computing and storage capabilities of optical quantum computers to more efficiently process large file collections. This helps improve the processing power and scalability of edge data caches to adapt to growing data demands.
[0132] Future Technological Developments: As an emerging computing technology, optical quantum computers are constantly developing and evolving. Design solutions based on optical quantum computers can leverage their unique characteristics to explore and develop new algorithms and optimization techniques, providing more advanced solutions for edge caching mechanism design. This will help drive innovation and development in edge computing and data management.
[0133] The second embodiment of the present invention provides an edge data caching device, such as Figure 3 Shown, including:
[0134] An acquisition module is configured to acquire a grid set and a sector set associated with any grid, wherein a sector has a plurality of beams, and acquire the beam signal strength of any beam in any grid; define a first binary variable to indicate whether any beam of any sector is selected, and define a second binary variable to indicate whether any grid is a high-quality grid;
[0135] An objective function representation module, representing the total number of high-quality grids according to the second binary variable, to determine an objective function to maximize the total number of high-quality grids;
[0136] A constraint construction module is configured to construct a constraint between the beam signal strength, the first binary variable, and the second binary variable according to a preset condition that the high-quality grid needs to meet, so that when the constraint is met, the beam selected by the sector represented by the first binary variable can enable the second binary variable corresponding to the high-quality grid that meets the preset condition to take a value representing the high-quality grid;
[0137] a penalty generation module, forming a penalty term according to the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary optimization model;
[0138] A solution module is used to solve the quadratic unconstrained binary optimization model to determine the value of each first binary variable, and determine the beam selection of each sector according to the value of the first binary variable.
[0139] A third aspect of the present invention provides an electronic device, such as Figure 4 As shown, it includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the edge data caching method as described in any of the above embodiments is implemented.
[0140] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the edge data caching method as described in any of the above embodiments is implemented.
[0141] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0142] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0143] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0144] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An edge data caching method, characterized in that: The following steps are involved: Obtain file data, server data, and user data. The user data includes the distribution of user requests for files and the set of direct servers of the user, where all servers in the set cover the user. The server data includes the transmission distance between any two servers. Constructing a candidate cache solution space, the candidate cache solution space including a plurality of candidate cache solutions, defining a first binary variable to indicate whether any file is cached by any server, and all combinations of values of the first binary variable to constitute a candidate cache solution; Taking maximizing the cache solution delay reduction as the objective function, the cache solution delay reduction includes the sum of all request delay reductions of all users; According to a preset condition that the cache solution needs to meet, a constraint is established through the relationship between the first binary variable, the file data, the server data, the user data, and the request delay reduction amount; forming a penalty term based on the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary model; The quadratic unconstrained binary model is solved to determine the value of each first binary variable, and the file cache position is determined according to the value of the first binary variable.
2. The edge data caching method according to claim 1, wherein: Acquiring the file data includes acquiring a file set to be cached f={f1, f2, ..., f F }, where f i Represents file i in the file collection; Acquiring the server data includes acquiring a server set S = {S1, S2, ..., S n } and the server, where S i Denote server i in the server set. A server network graph is constructed based on the connections between servers. The shortest distance between any two servers is obtained using the Floyd-Warshall algorithm. Acquiring the user data includes acquiring a user set U = {U1, U2, ..., U m }, where U i Denote user i in the user set, obtain the user direct server set σ(i) based on the coverage information of each server for user i, and obtain the request distribution of each user for each file, which is expressed as r i,f , if user i needs to request file f, then r i,f =1, otherwise r i,f =0; The first binary variable is denoted as x j,f , if file f is cached on server j then x j,f =1, otherwise x j,f =0.
3. The edge data caching method according to claim 2, wherein: The objective function is expressed as: where b i,f represents the reduction in request latency for user i requesting file f, m represents the number of users in the user set, and F represents the number of files in the file set; The method for obtaining the reduction in request delay of user i requesting file f includes: Check the user's direct server set. If a server in the user's direct server set has file f cached, the request delay is 0. Otherwise, obtain the shortest transmission distance from the server that has file f cached to a server in the user's direct server set. This shortest transmission distance is used as the request delay. The request delay reduction amount is determined according to the request delay: request delay reduction amount=preset value-request delay.
4. The edge data caching method according to claim 3, wherein: The preset condition includes that the number of files cached by each server has an upper limit.
5. The edge data caching method according to claim 4, wherein: Constructing a constraint by using the first binary variable, the file data, the server data, and the user data includes the following steps S31-S35: S41. Constrain the first binary variable according to the preset condition. The constraint is expressed as: ∑ 1≤f≤F x j,f ≤s,1≤j≤n(1), where s represents the upper limit; S42. Define y i,k,j,f is the second binary variable. If for user i’s user direct server set σ(i), the server that caches file f is server j, and the server in σ(i) with the closest transmission distance to server j is server k, then y i,k,j,f =1, otherwise y i,k,j,f =0; S43. Constrain the second binary variable according to the definition of the second binary variable. The constraint is expressed as: S44. Constrain the request delay reduction amount using the first binary variable, the second binary variable, the file data, the server data, and the user data. The constraint is expressed as: b i,f ≥Δ kj ·x j,f ·r i,f , (3) b i,f ≤Δ kj ·x j,f ·r i,f + (1-y i,k,j,f )M (4) Among them, b i,f represents the reduction in user i’s request delay for file f, Δ kj represents the reduction in transmission delay between server k and server j, and M represents a preset positive constant.
6. The edge data caching method according to claim 5, wherein: Forming a penalty term according to the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary optimization model, comprising: S41, converting the objective function into equivalent S42, performing a second unconstraintization on the constraint and multiplying the constraint by a penalty coefficient to form a penalty term; S43, adding the penalty term to the objective function to form the quadratic unconstrained binary optimization model, which is expressed as formula (5): Where γ represents the penalty coefficient, slack1 and slack2 each represent the slack variables generated when the corresponding inequality constraint is quadratically unconstrained; All the integer non-binary variables in the quadratic unconstrained binary optimization model are converted into a combination of several auxiliary binary variables through binary representation.
7. The edge data caching method according to claim 1, wherein: The quadratic unconstrained binary optimization model is solved by a quantum computer.
8. An edge data caching device, characterized in that: include: An acquisition module acquires file data, server data, and user data. The user data includes the distribution of user requests for files and the set of direct servers of the user. All servers in the set of direct servers of the user cover the user. The server data includes the transmission distance between any two servers. A decision space construction module is configured to construct a candidate cache solution space, wherein the candidate cache solution space includes a plurality of candidate cache solutions, and defines a first binary variable to indicate whether any file is cached by any server, wherein all combinations of values of the first binary variable constitute a candidate cache solution; An objective function construction module is configured to maximize a cache solution delay reduction as an objective function, wherein the cache solution delay reduction includes the sum of all request delay reductions of all users; A constraint module, which constructs a constraint based on a relationship between the first binary variable, the file data, the server data, the user data, and the request delay reduction according to a preset condition that the cache solution needs to meet; a penalty generation module, forming a penalty term according to the constraint, and adding the penalty term to the objective function to form a quadratic unconstrained binary model; A solution module solves the quadratic unconstrained binary model to determine the value of each first binary variable, and determines the file cache position according to the value of the first binary variable.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the edge data caching method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the edge data caching method according to any one of claims 1 to 7 is implemented.