Digital twin proxy pool system based on Lyapunov optimization and resource optimization method

By introducing the digital twin proxy model and resource pooling mechanism, combined with the Lyapunov optimization method, the data synchronization and resource utilization problems in digital twin management are solved, and the stability and resource utilization of mobile edge computing systems are improved.

CN120343634APending Publication Date: 2025-07-18NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510418487.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The prior art has problems with data synchronization, network bandwidth pressure and insufficient system stability in digital twin management, especially when mobile terminals frequently switch and load fluctuate, which affects system reliability and performance.

Method used

The digital twin agent model and resource pooling mechanism are introduced, combined with the Lyapunov optimization method, data synchronization and resource scheduling are realized through the digital twin agent pool, the size of the agent pool is dynamically adjusted to optimize resource utilization, and the system stability is measured through the Lyapunov function, and queue stability and resource consumption are balanced.

Benefits of technology

It realizes efficient data synchronization and resource utilization under frequent handover and load fluctuations of mobile terminals, improves system stability and performance, and reduces network latency and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343634A_ABST
    Figure CN120343634A_ABST
Patent Text Reader

Abstract

The invention provides a digital twin proxy pool system based on Lyapunov optimization and a resource optimization method, and belongs to the technical field of mobile edge computing. According to the technical scheme, the method comprises the following steps: S1, a digital twin proxy mechanism; s2, a pooling mechanism of the digital twin proxy; s3, a Lyapunov optimization mechanism is carried out; and S4, cloud edge collaborative digital twin storage and synchronization architecture. The method has the beneficial effects that the agent mode, the resource pooling and the Lyapunov optimization are introduced;
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mobile edge computing, and particularly to a digital twin proxy pool system and resource optimization method based on Lyapunov optimization. Background Art

[0002] With the popularization of 5G and the upcoming 6G network, the importance of mobile edge computing (MEC) in fields such as smart cities, industrial automation, and vehicle-to-everything (V2X) has become increasingly prominent. As a key technology of MEC, digital twin realizes real-time monitoring and optimization of physical devices by creating virtual models of physical devices. However, with the rapid increase in the number of mobile devices and the improvement of application complexity, the efficient management of digital twin objects has become the key to improving system performance. The current digital twin management methods are unable to cope with these challenges, mainly reflected in the following aspects:

[0003] Data synchronization problem: When a mobile terminal switches between different base stations, the traditional digital twin object migration method is difficult to achieve real-time data synchronization during migration, thus affecting system reliability.

[0004] Network bandwidth pressure: The large amount of data transmission requirements have made network resources tend to be tense, especially in areas with dense mobile terminals. The traditional digital twin migration method will further exacerbate network congestion and increase network transmission latency.

[0005] Insufficient system stability: The traditional digital twin object management method is difficult to maintain system stability in the face of frequent mobile terminal switching and load fluctuations, which may lead to service interruption or performance degradation, affecting the user experience.

[0006] In summary, the existing technology has obvious limitations in the management of digital twins, and there is an urgent need for a more efficient digital twin management solution. Summary of the Invention

[0007] The purpose of the present invention is to provide a digital twin proxy pool system and resource optimization method based on Lyapunov optimization. By introducing the proxy mode, resource pooling, and Lyapunov optimization, the present invention aims to provide an efficient digital twin management solution to solve the deficiencies in the existing technology and improve the performance and resource utilization rate of the MEC system.

[0008] To achieve the above invention purpose, the technical solution adopted by the present invention is specifically as follows: A digital twin proxy pool system and resource optimization method based on Lyapunov optimization, including the following steps:

[0009] Step 1: Digital twin proxy pool

[0010] The introduced digital twin agent enhances the digital twin corresponding to the physical entity while maintaining the functional cohesion of the digital twin, enabling the digital twin module to focus on modeling and mapping the attributes and behaviors of the physical entity. The digital twin agent module takes the digital twin module as its reference member and provides functions such as real-time data synchronization and analysis, strengthening the functions of the digital twin module. As a bridge between the physical entity and the digital world, the digital twin agent is responsible for real-time monitoring, collecting, and preprocessing the status data of the physical entity, including but not limited to the operating status of the device, environmental parameters, and location information. For example, in an intelligent transportation system, the digital twin agent can collect data such as the speed, fuel consumption, and surrounding traffic conditions of a vehicle through GPS and sensors, and then transmit this data to the edge server or the cloud for further analysis and processing. The data synchronization from the physical entity to the digital world mainly includes two aspects:

[0011] First, the digital twin synchronization within the base station area, also known as edge digital twin synchronization. The digital twin agent establishes a data synchronization connection between the mobile terminal requesting synchronization and the digital twin object in the edge server, and periodically synchronizes the status data of the mobile terminal in real time. Here, the data belongs to the short-term digital twin object, which records the digital twin data of the mobile terminal when it stays within the signal coverage of the current base station; when the mobile terminal moves from one base station area to another, the mobile terminal will synchronize the status data of the mobile terminal to the digital twin object in the new base station area through the digital twin agent in the edge server of the newly accessed base station, so as to maintain the continuity and integrity of the data.

[0012] Second, the data twin synchronization across base station areas, also known as cloud digital twin synchronization. The digital twin agent synchronizes the short-term digital twin object of the mobile terminal to the long-term digital twin object corresponding to the mobile terminal in the cloud repository. The condition for triggering cloud digital twin synchronization is when the mobile terminal leaves the signal coverage of the current base station. Then, the short-term digital twin object that stays in the current edge server during its stay within the signal coverage of the current base station will become invalid, and the status data of the mobile terminal stored in it needs to be incrementally synchronized to the long-term digital twin object corresponding to the mobile terminal in the cloud repository. In terms of cross-region data synchronization, the digital twin agent mode ensures the seamless flow and consistency of data between different regions through the collaborative work of the edge and the cloud.

[0013] In terms of resource management and scheduling, the digital twin agent model achieves efficient utilization of resources through resource pooling. Each digital twin agent in the agent pool can be dynamically allocated and recycled, and flexibly scheduled according to the system load conditions and resource usage status. This mechanism ensures that the system can respond in a timely manner under high load, while saving resources and improving overall resource utilization under low load. Specifically, a digital twin agent pool is pre-created on each edge server. When a new mobile terminal makes a digital twin data synchronization request, the edge server obtains an available digital twin agent from the digital twin agent pool. If there is no available digital twin agent in the pool, the edge server can dynamically create a new digital twin agent according to the optimization strategy and add it to the pool. Similarly, if the digital twin data synchronization request rate of the mobile terminal is low, the edge server will reduce the number of digital twin agents in the digital twin pool to ensure efficient use of resources.

[0014] Step 2: Lyapunov Optimization Method

[0015] Define the Lyapunov function to measure the stability of the system, and dynamically adjust the number of digital twin agents in the digital twin agent pool by minimizing the drift plus penalty term to balance queue stability and resource consumption. The design of the Lyapunov function considers the risk of timeout requests in the virtual queue, and controls the trade-off between timeout risk and queue stability by adjusting the relaxation factor.

[0016] Main queue Q(t): Represents the number of mobile terminals waiting for digital twin data synchronization requests (backlog queue length). Its queue dynamic equation, that is, the formula for the evolution of the backlog queue in the digital twin pool over time is:

[0017] Q(t + 1) = max{Q(t) + a(t) - μN(t), 0},

[0018] where a(t) is the number of newly arrived digital twin data synchronization requests in time slot t, its mean is λ, and the variance is μ is the service rate of a single digital twin agent in the digital twin agent pool, and N(t) is the number of available digital twin agents in the digital twin agent pool in time slot t.

[0019] Virtual queue Z(t): Used to track the risk of timeout requests for digital twin data synchronization, defined as:

[0020] Z(t + 1) = max(Z(t) + I{Q(t + 1) > η}·(Q(t + 1) - η) - ∈, 0),

[0021] Among them, I{Q(t + 1) > η} is an indicator function, whose value is 1 when Q(t + 1) > η and 0 otherwise. η is the queue length threshold (calculated by Little's law: η = λD, where λ is the mean of the arrival process a(t) and D is the threshold of the data synchronization waiting time of the digital twin data specified by the quality of service QoS). The stricter the threshold (the smaller η), the higher the requirement for queue stability. ∈ is the stability adjustment parameter of the virtual queue. If the number of timeout requests for digital twin data synchronization exceeds ∈, the virtual queue Z(t) grows, triggering the control strategy of the digital twin agent pool to increase the number N(t) of digital twin agents in the agent pool. Otherwise, Z(t) decays naturally, moderately saving resources. ∈ adjusts the cumulative decay rate of the virtual queue Z(t). Set ∈ > 0. This parameter forces the virtual queue Z(t) to decay at a rate of ∈, thus effectively suppressing the continuous accumulation of the timeout risk caused by the main queue length exceeding the threshold. Increasing the relaxation factor ∈ can tolerate more timeout requests, but at the cost of queue stability. Assume that the request arrival process a(t) is independent and identically distributed, and the mathematical expectation E[a(t)] = λ, and the request arrival rate satisfies λ < μN max , if the arrival rate does not satisfy the above inequality, relevant measures such as emergency capacity expansion can be taken during the implementation phase. When the main queue length Q(t + 1) ≤ η, Z(t + 1) = max{Z(t) - ∈, 0}, and the virtual queue will decay naturally. This mechanism allows the system to tolerate slightly exceeding the threshold of the main queue length briefly, thus avoiding over-allocation of digital twin agents in the digital twin agent pool and ensuring the reasonable utilization of resources. When the main queue length Q(t + 1) > η, the growth amount Q(t + 1) - η of the virtual queue will be partially offset by ∈. This design aims to prevent the resource allocation strategy from overreacting to instantaneous burst traffic and ensure the stability and reliability of the system.

[0022] Lyapunov function: Used to measure the "stability degree" of the system. The Lyapunov function is defined as follows:

[0023]

[0024] Drift: Used to describe the expected change in the queue state. The function of drift is defined as follows:

[0025] Δ(t) = E[L(t + 1) - L(t)|Q(t), Z(t)],

[0026] Optimization objective: Dynamically adjust the number N(t) of digital twin agents by minimizing the drift plus penalty term, balancing queue stability and resource consumption:

[0027] min N(t) {Δ(t) + V·E[c·N(t)|Q(t), Z(t)]},

[0028] Among them, V is a weight parameter that controls the resource-latency trade-off. Increasing V can reduce resource consumption, but the queue latency increases. Decreasing V has the opposite effect; c is the resource cost of a single digital twin agent.

[0029] Substitute the Lyapunov function into Δ(t), and according to max{x,0} 2 ≤x 2 It can be obtained that

[0030]

[0031] Among them, Q t+1 =Q(t + 1). Substitute E[Q t+1 =Q(t)+λ - μN(t) into the above optimization objective function and simplify to get:

[0032]

[0033] Take the first derivative of the above objective function with respect to N(t) and set it to zero to obtain the optimal N opt (T):

[0034]

[0035] Finally, apply the constraint 0 ≤ N opt (t) ≤ N max , and it can be obtained that:

[0036]

[0037] Based on the Lyapunov stability theory, conduct a stability analysis of the digital twin agent pool. First, propose a theorem for the digital twin agent pool:

[0038] Theorem (Lyapunov stability of the digital twin agent pool)

[0039] As mentioned above, Z(t) and Q(t) represent the virtual queue length and the main queue length at time t, respectively, where is used as the Lyapunov function. Assume that there exist constants B ≥ 0 and ∈ > 0 such that for all t, the conditional Lyapunov drift satisfies:

[0040] E[ΔL(t)|Q(t),Z(t)] ≤ B - ∈Z(t),

[0041] Then for all time slots t > 0, the time-averaged queue size satisfies:

[0042]

[0043] Proof process:

[0044] By applying the expectation operator to both sides of the drift inequality, we obtain:

[0045] E[ΔL(t)] ≤ B - ∈E[Z(t)]

[0046] Summing over τ ∈ {0, 1,..., t - 1} and applying the telescoping property, we get:

[0047]

[0048] Utilizing the non - negativity of L(t) and rearranging the terms in the above expression, the result can be obtained.

[0049] Using the above theorem, analyze the stability of the Lyapunov optimization scheme.

[0050] The analysis starts from the restricted drift. The drift is defined as:

[0051]

[0052] Consider the virtual queue dynamics:

[0053] Z(t + 1) = max{Z(t)+I{Q(t + 1)>η}·(Q(t + 1)-η)-∈, 0}, and we analyze two cases:

[0054] Case 1: Q(t + 1) ≤ η

[0055] When Q(t + 1) ≤ η, the indicator function I{Q(t + 1)>η} becomes 0, and the virtual queue dynamics simplifies to:

[0056] Z(t + 1) = max(Z(t)-∈, 0)

[0057] Sub - case 1.1: Z(t) ≥ ∈

[0058] If Z(t) ≥ ∈, the virtual queue decreases by ∈:

[0059] Z(t + 1) = Z(t)-∈

[0060] The corresponding drift calculation is:

[0061]

[0062] This expression satisfies the system stability condition required by Theorem 1, ensuring that the time - average value of the queue size Z(t) is bounded.

[0063] Sub - case 1.2: Z(t) < ∈

[0064] If Z(t) < ∈, the virtual queue is zero:

[0065] Z(t + 1) = 0

[0066] The drift at this time is:

[0067]

[0068] A non-positive drift indicates system stability.

[0069] Case 2: Q(t + 1) > η

[0070] The indicator function I{Q(t + 1) > η} becomes 1, and the virtual queue dynamics become:

[0071] Z(t + 1) = max(Z(t) + (Q(t + 1) - η) - ∈, 0)

[0072] Sub-case 2.1: Z(t) + (Q(t + 1) - n) - ∈ > 0

[0073] At this time: Z(t + 1) = Z(t) + (Q(t + 1) - η) - ∈

[0074] Drift Due to the bounded variance of the arrival process a(t) So the term is bounded. In addition, by balancing the drift and the penalty term, the optimal N(t) makes Q(t + 1) - η - ∈ < 0, so that Z(t)(Q(t) - η - ∈) is negative, and according to the Lyapunov stability theorem of the digital twin agent pool, the time average of Z(t) is bounded.

[0075] Sub-case 2.2: Z(t) + (Q(t + 1) - η) - ∈ ≤ 0

[0076] At this time:

[0077] Z(t + 1) = 0

[0078] The drift is:

[0079]

[0080] Similarly, a non-positive drift indicates system stability.

[0081] Compared with the prior art, the beneficial effects of the present invention are:

[0082] 1. The present invention combines the proxy mode and the resource pooling mode to pre-create a digital twin agent pool on each edge server. According to the digital twin synchronization request load situation of the current mobile terminal, the size of the agent pool is dynamically adjusted to ensure the efficient use of resources.

[0083] 2. The present invention defines a Lyapunov function to measure the stability of the proxy pool system, and dynamically adjusts the capacity of the digital twin pool by minimizing the drift plus penalty term. The design of the Lyapunov function takes into account the risk of timeout requests in the virtual queue, and controls the trade-off between the timeout risk and the queue stability by adjusting the relaxation factor.

[0084] 3. The present invention designs a data synchronization mechanism. When a mobile terminal enables a new digital twin object on a new base station edge server, the corresponding digital twin in the original base station edge server will be synchronized to the long-term digital twin object of this mobile terminal in the cloud repository, realizing the cloud storage of the long-term historical state data of the mobile terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, but do not constitute a limitation to the present invention.

[0086] Figure 1 It is a schematic diagram of the application scenario for the implementation of the present invention.

[0087] Figure 2 It is the simulation result of the embodiment of the present invention Figure 1 。

[0088] Figure 3 It is the simulation result of the embodiment of the present invention Figure 2 。 DETAILED DESCRIPTION OF THE EMBODIMENTS

[0089] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0090] Embodiment 1

[0091] Refer to Figure 1 and Figure 3 . This embodiment provides its technical solution as follows. As shown in the attached Figure 1 , a base station (such as an RSU in the intelligent transportation scenario) is deployed at a certain distance interval. Each base station is equipped with an edge server, and a digital twin proxy pool is created on each edge server. A number of digital twin proxies are pre-created in the digital twin proxy pool. The specific number is the initial size of the digital twin proxy pool, which can be determined according to the historical average number of mobile terminals per unit time within the signal coverage range of the base station.

[0092] When implementing the digital twin agent pool, a queue (Queue) or a set (Set) is used to manage multiple digital twin agent objects. Agents are obtained from the pool as needed instead of creating new digital twin agents each time, which can reduce the overhead of creating and destroying digital twin agents, improve system performance, and reduce the waiting time for cold start. Additionally, a dictionary is used to store the status information of digital twin agents, with the agent ID or instance as the key and the status as the value, which can provide the ability to quickly look up and update the agent status.

[0093] When designing the digital twin agent, the proxy design pattern is adopted, with the digital twin as the target object of the proxy and injected into the member variable of the digital twin agent.

[0094] WebSocket is used for real-time two-way communication between the mobile terminal and the digital twin agent in the edge server. JSON data format is used to transfer data between the mobile terminal and the digital twin agent, and a queue is used to manage the updates and requests to be processed, ensuring the ordered sending and receiving of messages. During edge synchronization, the digital twin agent preprocesses the collected raw data, including data cleaning, format conversion, and preliminary analysis, etc., and then synchronizes it to the short-term digital twin object in the edge server.

[0095] As the position of the mobile terminal changes continuously, it switches from the signal coverage area of one base station to that of another base station. Then, the digital twin agents in the digital twin agent pool of the edge server related to the base stations will switch from the edge server A in one base station area to the edge server B in another base station area. The digital twin agent newly assigned to the mobile terminal in the digital twin agent pool of B will take over the data synchronization work of the corresponding original digital twin agent in A, synchronize the status data of the mobile terminal to the new short-term digital twin object in B, and the corresponding original short-term digital twin object in A will become invalid and be recycled. However, before recycling, the original digital twin agent in A will complete the cloud incremental synchronization of the original short-term digital twin object.

[0096] The short-term digital twin object captures the status data of each mobile terminal when it moves within the signal coverage of a certain base station. Each mobile terminal will send a digital twin data synchronization request to the edge server equipped with that base station through the base station it belongs to. After receiving the synchronization request, the edge server allocates an available agent from the digital twin agent pool to the mobile terminal. The mobile terminal performs data synchronization of the short-term digital twin object through this allocated digital twin agent. The data of the short-term digital twin object is saved in the database in real time. The solution uses an in-memory database suitable for storing digital twin objects (such as Redis), which usually has the characteristics of high performance, low latency, high concurrency processing ability, and easy expansion. Since there are multiple pre-created digital twin agents in the digital twin agent pool, these digital twin agents will provide digital twin data synchronization request services for multiple mobile terminals at the same time. Therefore, these digital twin agents must support the characteristics of multi-threading during implementation. The dynamic optimization algorithm of the digital twin agent pool based on Lyapunov optimization is as follows:

[0097] Initialize V, c, η, L(t), Z(t), Q(t) and N(t)

[0098] For each time slot t loop:

[0099] Update Q(t) and Z(t) according to the dynamic equation

[0100] Calculate the Lyapunov function:

[0101]

[0102] Calculate the drift:

[0103] Δ(t) = E[L(t + 1) - L(t)|Q(t), Z(t)]

[0104] Calculate the optimum that minimizes the following objective function:

[0105] Δ(t) + V·E[c·N(t)|Q(t), Z(t)

[0106] Adjust the number of digital twin agents in the pool according to the optimal N(t), complete the scale-up and scale-down, and enter the next time slot:

[0107] t = t + 1

[0108] End of loop

[0109] The above dynamic optimization algorithm of the digital twin agent pool based on Lyapunov optimization will be compared with the following dynamic adjustment algorithm based on thresholds. The dynamic adjustment algorithm based on thresholds is as follows:

[0110] Initialize

[0111] Set an initial threshold η, and a reasonable initial value can be determined based on historical data or experience.

[0112] Set the step size Δ of resource allocation, the adjustment interval time T, etc.

[0113] Initialize the current resource allocation amount R, and set it according to the current system load situation or the estimated initial demand.

[0114] Loop for each time slot t:

[0115] Monitor the queue length in real time: Obtain the queue length Q of the current system.

[0116] Judge the relationship between the queue length and the threshold:

[0117] If Q > η:

[0118] Increase the resource allocation: Increase the current resource allocation amount R by Δ, that is, R = R + Δ.

[0119] Execute the resource allocation operation to reduce the system latency and improve the performance.

[0120] If Q ≤ η:

[0121] Release some resources: Reduce the current resource allocation amount R by Δ, that is, R = R - Δ,

[0122] but ensure that R is not less than the minimum resource requirement for the system to run.

[0123] Execute the resource release operation to improve the resource utilization efficiency.

[0124] Proceed to the next time slot: t = t + 1

[0125] End of loop

[0126] Through the above process, continuously monitor the queue length and dynamically adjust the resources to maintain the balance between the system performance and resource utilization efficiency. The following are the key points:

[0127] 1) Determination and adjustment of the threshold: The setting of the initial threshold has an important impact on the performance of the algorithm, and it can be determined based on historical data, system characteristics, and performance requirements. During the operation of the algorithm, the threshold can also be dynamically adjusted according to the actual operation situation and performance indicators of the system to adapt to different workloads and system states.

[0128] 2) Resource adjustment step size: The size of the step size Δ determines the amplitude of each resource adjustment. A too large step size may lead to frequent adjustment and fluctuation of resources, while a too small step size may make the system response slower. It is necessary to reasonably set the size of the step size according to the system characteristics and the cost of resource adjustment.

[0129] 3) Adjust the interval time: When setting the adjustment interval time T, it is necessary to comprehensively consider the real-time performance of the system and the overhead of resource adjustment. A too short interval time will increase the computational and communication overhead of the system, while a too long interval time may cause the system to fail to respond to load changes in a timely manner. The appropriate adjustment interval time can be determined according to the specific requirements and performance requirements of the system.

[0130] 4) Through the above dynamic adjustment algorithm based on thresholds, dynamic allocation and optimization of system resources can be achieved, improving the performance and resource utilization efficiency of the system.

[0131] To evaluate the performance, numerical simulations were conducted. In the Lyapunov-based scheme, mobile terminals arrive according to a Poisson distribution with an average rate of 10 terminals per time slot. The key parameter settings are as follows: weight parameter V = 2, relaxation factor ∈ = 0.001, service rate ′ = 5, and queue length threshold η = 20. In contrast, the dynamic threshold scheme adjusts the queue length threshold to 20 and sets the resource adjustment factor to 1. These values are determined to ensure a fair and effective comparison between the two schemes.

[0132] Figure 2 Shows the queue length fluctuations of the two schemes in the MEC environment within 500 time slots. The Lyapunov-based optimization scheme (blue line) maintains a lower and more stable queue length, mostly between 0 and 20, with only occasional peaks. In contrast, the threshold-based adjustment scheme (red line) exhibits a higher and more volatile queue length, frequently exceeding 30. This indicates that the Lyapunov optimization scheme can more effectively maintain system stability and resource utilization efficiency under dynamic loads.

[0133] Figure 3 Depicts the number of digital twin agents of the two schemes within 500 time slots. The Lyapunov optimization scheme (blue line) shows a lower and more stable number of agents, usually between 0 and 4. In contrast, the threshold-based adjustment scheme (red line) has more frequent and higher peaks, usually reaching 5 or even higher. This indicates that the Lyapunov scheme can better maintain system stability and resource utilization efficiency.

[0134] Example 2

[0135] The difference between Example 2 and Example 1 lies in the handling of abnormal situations, and the other parts are the same. The specific differences are as follows:

[0136] In Example 1, the arrival of synchronous requests for digital twins follows a Poisson distribution, but in actual scenarios, there may be sudden peak traffic, such as when a mobile terminal cluster goes online simultaneously. At this time, in Example 1, the capacity of the digital twin agent pool in the edge server reaches the maximum value N max, operate at full load to handle the passing of peak traffic. However, during this period, the waiting queue for digital twin synchronization requests will become longer, and the waiting time will increase. The solution adopted in Embodiment 2 is that if the duration of the peak traffic exceeds the set time threshold, the digital twin synchronization requests of the mobile terminal are directly synchronized to the digital twin object corresponding to the mobile terminal in the cloud server through the base station, thereby reducing the synchronization delay and improving the reliability of synchronization.

[0137] The above are only the preferred embodiments of this embodiment and are not intended to limit this embodiment. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this embodiment shall be included within the protection scope of this embodiment.

Claims

1. A digital twin proxy pool system and resource optimization method based on Lyapunov optimization, characterized in that Including the following steps: S1. Digital twin agent mechanism, which is used to enhance the functions of the digital twin. By monitoring the status of the mobile terminal in real time, establishing communication with the status data sending module, acquiring various real-time performance data of the terminal and encapsulating them, generating data conforming to the digital twin object format, and saving it to the local edge server or the cloud; S2. Pooling mechanism of digital twin agents, which is used to centrally manage and dynamically schedule multiple digital twin agents to achieve efficient utilization and optimization of resources; S3. Lyapunov optimization mechanism, which is used to dynamically adjust the number of digital twin agents in the digital twin agent pool by minimizing the drift plus penalty term, so as to dynamically scale the digital twin agent pool and balance queue stability and resource consumption; S4. Cloud-edge collaborative digital twin synchronization mechanism, which is used to store the short-term status data of the mobile terminal in the short-term digital twin objects of different edge servers in a time- and space-distributed manner, and incrementally synchronize the short-term digital twin object data to the long-term digital twin object in the cloud when the mobile terminal switches base stations.

2. The digital twin agent pool system and resource optimization method based on Lyapunov optimization according to claim 1, wherein The step S1 includes the following steps: S11. Digital twin agent design pattern, which maintains the high cohesion of the digital twin object module, and performs dependency injection by taking the original digital twin object as a member reference variable of the digital twin agent; S12. Edge digital twin synchronization, which is used to establish a data synchronization connection between the mobile terminal requesting digital twin data synchronization and the digital twin object of this terminal in the edge server, periodically and real-time synchronize the status data of the mobile terminal, and establish a short-term digital twin object of this mobile terminal in the in-memory database of the edge server; S13. Cloud digital twin synchronization, which is used to synchronize the short-term digital twin object of the edge server to the long-term digital twin object in the cloud repository.

3. The digital twin proxy pool system and resource optimization method based on Lyapunov optimization according to claim 1, characterized in that, The step S2 includes the following steps: S21. Pre-creation of digital twin agents, which is used to pre-create digital twin agents in the digital twin agent pool on the edge server to ensure that when the digital twin data synchronization request of the mobile terminal arrives, the pre-created digital twin agents can be quickly enabled to provide digital twin data synchronization services; S22. On-demand allocation of digital twin agents, which is used to dynamically allocate an available digital twin agent from the digital twin agent pool to provide digital twin data synchronization services for this mobile terminal according to the digital twin data synchronization request of the mobile terminal; S23. Dynamic supplement of digital twin agents, which is used to dynamically create new digital twin agents when the number of available digital twin agents in the digital twin agent pool is insufficient; S24. Dynamic recycling of digital twin agents, which is used to destroy the redundant digital twin agents in the digital twin agent pool to save resources; S25. Load balancing of digital twin agents: which is used to evenly distribute the digital twin data synchronization requests of the mobile terminal to different digital twin agents.

4. The digital twin agent pool system and resource optimization method based on Lyapunov optimization according to claim 1, characterized in that In the step S3, the Lyapunov optimization mechanism includes the following steps: S31. Main queue and virtual queue, where the main queue Q(t) is used to model the backlog of digital twin data synchronization requests of the mobile terminal, and its queue dynamic equation is: Q(t + 1) = max{Q(t) + a(t) - μN(t), 0}; The virtual queue models the cumulative timeout risk of the digital twin data synchronization requests of the mobile terminals. Its queue dynamic equation is as follows: Z(t + 1) = max(Z(t) + I{Q(t + 1) > η}·(Q(t + 1) - η) - ∈, 0), where a(t) is the number of newly arrived digital twin data synchronization requests in time slot t, μ is the service rate of a single digital twin agent in the digital twin agent pool, N(t) is the number of available digital twin agents in the digital twin agent pool in time slot t, I{·} is the indicator function, η is the queue length threshold, and ∈ is the stability adjustment parameter of the virtual queue; S32. Design of the Lyapunov function, which is used to measure the queue stability degree in the system. The larger the value of this function, the more unstable the system is, and the smaller the value, the more stable the system is. The Lyapunov function is defined as follows: S33. Drift term, which is used to measure the stability of the digital twin data synchronization request queue in the system. The drift term is defined as follows: Δ(t) = E[L(t + 1) - L(t)|Q(t), Z(t)]; where E[.] represents taking the mathematical expectation; S34. Penalty term, which is used to measure the total resource consumption of the digital twin agents in the digital twin agent pool. The penalty term is defined as c·N(t), where c represents the resource consumption coefficient of a digital twin agent; S35. Optimization objective, which is used to dynamically adjust the number of digital twin agents in the digital twin agent pool, balance the queue stability and the computing resource consumption of the edge server. The objective function is defined as follows: min N(t) {Δ(t) + V·E[c·N(t)|Q(t), Z(t)]}。 5. The digital twin agent pool system and resource optimization method based on Lyapunov optimization according to claim 1, characterized in that, In step S4, the cloud-edge collaborative digital twin synchronization architecture includes multiple base stations, and each base station is equipped with an edge server. A digital twin agent pool is pre-created. Each edge server is connected to the cloud server through a transmission network. Each edge server has an in-memory database, and there is a data warehouse in the cloud server. Each mobile terminal in the working scenario corresponds to a unique long-term digital twin object in this data warehouse, which stores the long-term historical data of the mobile terminal. The in-memory database of the edge server stores the short-term digital twin objects of the mobile terminals, which record the short-term states of the mobile terminals when they roam within the signal coverage range of the local base station. This short-term state data will be incrementally synchronized to the long-term digital twin objects in the cloud by the digital twin agent objects when the mobile terminals switch between different base stations. The cloud-edge collaborative digital twin synchronization in step S4 includes the following steps: S41. Edge digital twin synchronization, which is used to establish a data synchronization connection between the mobile terminal requesting digital twin data synchronization and the digital twin object of this terminal in the edge server, and periodically and real-time synchronize the status data of the mobile terminal, so as to establish the short-term digital twin object of this mobile terminal in the in-memory database of the edge server; S42. Cloud digital twin synchronization is used to synchronize the short-term digital twin object of the edge server to the long-term digital twin object in the cloud repository. The trigger condition is that when the mobile terminal leaves the signal coverage area of the current base station, the short-term digital twin object synchronized on the current edge server during its stay within the signal coverage area of the current base station will become invalid, and the status data of the mobile terminal stored in it needs to be incrementally synchronized to the long-term digital twin object corresponding to the mobile terminal in the cloud repository.