Distributed simulation system intelligent caching method based on multi-factor decision
By adopting intelligent caching methods based on multi-factor decision-making in distributed simulation systems, the problems of single, static and lack of predictability of cache strategies in the existing technology are solved, and more efficient cache management and performance improvement are achieved.
Patent Information
- Application Number
- CN202510155771.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-06-24
AI Technical Summary
The cache strategy of existing distributed simulation systems has single factor decision-making, static strategy, lack of predictiveness and multi-level cache collaborative management capabilities, which is difficult to meet the performance needs of complex simulation environments.
An intelligent caching method based on multi-factor decisions is adopted to initialize system parameters, calculate the evaluation factor of data items, predict future access probability, adjust the cache decision value, and determine the cache location and replacement strategy of the data items based on the cache threshold and spatial situation.
It realizes more accurate cache decisions, improves cache hit rate, adapts to dynamically changing simulation environments, has predictive and multi-level cache collaborative management capabilities, and has small computing overhead.
Smart Images

Figure CN120196567A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of distributed computing and relates to an intelligent caching method for a distributed simulation system based on multi-factor decision-making. Background Art
[0002] In a distributed simulation system, the efficient management and access of data are crucial for system performance. With the continuous improvement of simulation complexity, especially in large-scale distributed simulations in fields such as automotive and aerospace, traditional caching strategies have become difficult to meet the growing performance requirements, mainly presenting the following problems:
[0003] 1. Single-factor decision-making: Most existing caching strategies only consider a single factor, such as data size or access frequency. Such methods often perform poorly in complex simulation environments because they ignore other important factors, such as data importance and timeliness.
[0004] 2. Static caching strategy: Existing systems mostly adopt static caching strategies and cannot adapt to the dynamically changing simulation environment.
[0005] 3. Lack of predictability: Most existing caching strategies are reactive and lack the ability to predict future data access patterns.
[0006] 4. Lack of multi-level cache coordination: In large-scale distributed simulations, the coordinated management of multi-level caches (such as local caches, edge caches, and central caches) is crucial, and there are still significant challenges in the coordinated optimization of multi-level caches in existing technologies.
[0007] In view of the above deficiencies of the existing technologies, there is an urgent need for an intelligent caching strategy that can comprehensively consider multiple factors, be dynamically adaptive, have predictive ability, be applicable to specific fields, support multi-level cache coordination, and have a relatively small computational overhead. Summary of the Invention
[0008] The technical problem solved by the present invention is: to overcome the deficiencies of the existing technologies and propose a new and efficient intelligent caching method for a distributed simulation system based on multi-factor decision-making.
[0009] The technical solution adopted by the present invention is:
[0010] In a first aspect, the present invention provides an intelligent caching method for a distributed simulation system based on multi-factor decision-making. The steps of the method include:
[0011] Step 1: Initialize system parameters, including initial weight values, cache thresholds, and other adjustable parameters;
[0012] Step 2: Calculate the evaluation factors of the data items to be cached, including data size factor, access frequency factor, data importance factor, and time correlation factor;
[0013] Step 3: Calculate the cache decision value of the data item to be cached based on the evaluation factors in Step 2;
[0014] Step 4: Use a time series prediction model to calculate the probability that the data item to be cached will be accessed in the future, and adjust the cache decision value in combination with this probability;
[0015] Step 5: According to the adjusted cache decision value and the preset cache threshold, decide whether to cache the data item to be cached. If so, determine the cache location and go to Step 6; if not, go to Step 7;
[0016] Step 6: Judge whether the cache space is sufficient. If it is sufficient, cache the data item to be cached at the cache location and go to Step 7; if it is not sufficient, determine the data item to be replaced based on the retention score, store the data item to be cached at the position of the replaced data item, and go to Step 7;
[0017] Step 7: Receive the next data item to be cached and return to Step 2.
[0018] Preferably, in Step 2, for the data item to be cached d, the calculation formulas of its respective factors are as follows:
[0019] Data size factor: size(d) is the data item size, and max_size is the maximum data item size acceptable by the system;
[0020] Access frequency factor: F(d) = 1 - e -λf(d) , where f(d) is the access frequency of the data item to be cached, and λ is the access frequency impact factor;
[0021] Data importance factor: importance(d) is the importance score, and max_importance is the highest importance score defined in the system;
[0022] Time correlation factor: T(d) = e -μΔt , where Δt is the time elapsed since the last access, and μ is the time decay parameter.
[0023] Preferably, in Step 3, the cache decision value D(d) of the data item to be cached d satisfies
[0024] D(d) = w s S(d) + w f F(d) + w i I(d) + w t T(d)
[0025] w s 、w f 、wi , w t are the weights of the corresponding factors, and w s + w f + w i + w t = 1.
[0026] Preferably, in step 4, the adjusted cache decision value D'(d) satisfies
[0027] D'(d)= D(d)+ βP(d)
[0028] where P(d) is the probability that the data item d to be cached will be accessed in the future, β is the prediction influence factor, and D(d) is the cache decision value of the data item d to be cached calculated in step 3.
[0029] Preferably, in step 5,
[0030] If D'(d)≥ θ l , then the data item to be cached needs to be cached, and the data item d to be cached is stored in the local cache; D'(d) is the adjusted cache decision value;
[0031] If θ c ≤ D'(d)< θ l , the data item to be cached needs to be cached, and the data item d to be cached is stored in the central cache;
[0032] If D'(d)< θ c , the data item d to be cached is not cached;
[0033] where θ l is the local cache threshold, and θ c is the central cache threshold.
[0034] Preferably, in step 6, the data item to be replaced is determined based on the retention score, and the data item to be cached is stored in the position of the replaced data item, and the method is as follows:
[0035] 6.1 Calculate the retention score R(d') of each cached data item d':
[0036] where age(d') is the residence time of the cached data item d' in the cache, D'(d') is the adjusted cache decision value of the cached data item d', and max_age is the preset maximum residence time
[0037] 6.2 Find the data item with the lowest retention score;
[0038] 6.3 Remove the data item and store the data item to be cached in the position of the replaced data item.
[0039] Preferably, during the execution of the intelligent caching method, the weights of various factors and system parameters are adjusted periodically.
[0040] Preferably, the method for periodically adjusting the weights of various factors is as follows:
[0041] 8.1 Calculate the performance gain performance_gain caused by the j-th factor j ;
[0042] 8.2 Calculate the average performance gain of all factors
[0043] 8.3 Update the weight of the j-th factor using the following formula:
[0044]
[0045] where, w j (t) is the weight of the j-th factor in the t-th cycle, and α is the learning rate;
[0046] 8.4 Normalize the weights to ensure that ∑w j = 1.
[0047] In a second aspect, the present invention provides a terminal device, including:
[0048] A memory for storing instructions executed by at least one processor;
[0049] A processor for executing the instructions stored in the memory to implement the method described in the first aspect above.
[0050] In a third aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are run on a computer, the computer is caused to execute the method described in the first aspect above.
[0051] The beneficial effects of the present invention compared with the prior art are:
[0052] (1) By comprehensively considering multiple factors such as data size, access frequency, importance, and time correlation, the present invention realizes more accurate caching decisions and improves the cache hit rate.
[0053] (2) Through the dynamic weight adjustment mechanism, the present invention can automatically adjust the importance of various factors according to system performance feedback, adapting to different simulation scenarios and data characteristics.
[0054] (3) The present invention introduces a predictive caching mechanism that can predict future access patterns based on historical data and pre-cache the data that may be accessed, further improving system performance.
[0055] (4) By introducing the concept of retention fraction, the present invention can make a better replacement decision when the cache space is insufficient, balancing the importance and timeliness of data.
[0056] (5) The method of the present invention is applicable to various types of distributed simulation systems. By adjusting parameters and thresholds, it can meet the requirements of different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flowchart of an intelligent caching method for a distributed simulation system based on multi-factor decision-making. DETAILED DESCRIPTION OF THE INVENTION
[0058] The present invention will be further described below in conjunction with the drawings and embodiments.
[0059] As Figure 1 shown, the present invention proposes an intelligent caching method for a distributed simulation system based on multi-factor decision-making, which mainly includes the following steps:
[0060] 1 System initialization
[0061] 1.1 Parameter initialization:
[0062] Set the initial weight values: w s 、w f 、w i 、w t , satisfying w s +w f +w i +w t = 1.
[0063] Set the cache threshold: θ l (local cache threshold), θ c (central cache threshold).
[0064] Set other parameters: λ (access frequency impact factor), μ (time decay parameter), α (learning rate), β (prediction impact factor).
[0065] 1.2 Define the maximum values:
[0066] Set max_size as the maximum data item size acceptable by the system.
[0067] Set max_importance as the highest importance score defined in the system.
[0068] Set max_age as the maximum residence time of data items in the cache.
[0069] 2 Data item evaluation: For each data item d to be cached, calculate its cache decision value D(d):
[0070] 2.1 Calculate each factor:
[0071] Data size factor:
[0072] Access frequency factor: F(d) = 1 - e -λf(d) , where f(d) is the access frequency of the data item.
[0073] Data importance factor:
[0074] Time correlation factor: T(d) = e -μΔt , where Δt is the time elapsed since the last access. 3 Calculate the cache decision value: D(d) = w s S(d) + w f F(d) + w i I(d) + w t T(d)
[0075] 4 Predictive cache evaluation
[0076] 4.1 Use a time series prediction model to calculate the probability P(d) that the data item d to be cached will be accessed in the future:
[0077] Maintain the access history of each data item
[0078] Use models such as moving average, exponential smoothing, or ARIMA for prediction
[0079] Normalize the prediction result to the interval [0, 1] to obtain P(d).
[0080] 4.2 Calculate the adjusted cache decision value: D′(d) = D(d) + βP(d)
[0081] 5 Cache decision, based on the calculated D′(d) value, determine the cache location of the data item:
[0082] - If D′(d) ≥ θ l , store the data item d in the local cache
[0083] - If θ c ≤ D′(d) < θ l , store the data item d in the central cache
[0084] - If D′(d) < θ c , do not cache the data item d 6 Cache replacement, when the cache space is insufficient, perform the following steps:
[0085] 6.1 Calculate the retention score of each cached data item:
[0086] Among them, age(d′) is the residence time of the data item in the cache. 5.2 Find the data item with the lowest retention fraction R(d).
[0087] 5.3 Remove this data item to make room for the new data item.
[0088] 7 Dynamic weight adjustment, perform the following steps regularly:
[0089] 6.1 Calculate the performance gain performance_gain caused by each factor j (which can be measured by the improvement of the cache hit rate).
[0090] 6.2 Calculate the average performance gain
[0091] 6.3 Update the weight of each factor:
[0092] Among them,
[0093] w j (t) is the weight of the jth factor in the tth cycle, and α is the learning rate.
[0094] 6.4 Normalize the weights to ensure that ∑w j = 1.
[0095] 8 Loop back to step 2 and continue to process new data items to form a continuously optimized closed-loop system.
[0096] The present invention also provides a terminal device, including: a memory for storing instructions executed by at least one processor; a processor for executing the instructions stored in the memory to implement the above method.
[0097] The present invention also provides a computer-readable storage medium, and the computer-readable storage medium stores computer instructions. When the computer instructions are run on a computer, the computer is made to execute the above method.
[0098] Embodiment:
[0099] This embodiment applies an intelligent cache strategy in the distributed simulation of an automotive system. The simulation system includes 5 simulation functional units, which are distributed and run on 3 simulation terminals. Each simulation functional unit has several input and output ports. The implementation manner of the present invention in this system is described in detail below.
[0100] 1 System initialization
[0101] 1.1 Simulation system configuration
[0102] · Simulation terminals: 3, named Terminal-A, Terminal-B, and Terminal-C respectively
[0103] · Simulation function units: 5, namely
[0104] 1. Engine simulation unit (Engine-Sim)
[0105] 2. Transmission system simulation unit (Transmission-Sim)
[0106] 3. Chassis simulation unit (Chassis-Sim)
[0107] 4. Body simulation unit (Body-Sim)
[0108] 5. Electronic control unit simulation (ECU-Sim)
[0109] 1.2 Parameter initialization
[0110] · Initial values of each factor weight: w s =w f =w i =w t =0.25
[0111] · Cache threshold: θ l =0.7, θ c =0.4
[0112] · Other parameters: λ = 0.1, μ = 0.01, α = 0.01, β = 0.3
[0113] · Maximum value setting:
[0114] - max_size = 1GB (assuming the maximum allowable size of a single data item is 1GB)
[0115] - max_importance = 10 (importance score range is 0 - 10)
[0116] - max_age = 3600 seconds (the longest cache data retention time is 1 hour)
[0117] 2 Data item evaluation
[0118] Taking the output data "engine speed" of the engine simulation unit (Engine-Sim) as an example:
[0119] 2.1 Factor calculation
[0120] · Assuming the data size is 10MB, then
[0121] · Assume 5 accesses per second, f(d) = 5, then F(d) = 1 - e -0.1×5 = 0.39
[0122] · Assume the importance score is 8, then
[0123] · Assume 2 seconds have passed since the last access, then T(d) = e -0.01×2 = 0.98
[0124] 2.2 Cache decision value calculation
[0125] D(d) = 0.25×0.99 + 0.25×0.39 + 0.25×0.8 + 0.25×0.98 = 0.79
[0126] 3 Predictive cache evaluation
[0127] Assume based on historical data, the prediction model gives a probability of 0.9 that the "engine speed" data will be accessed within the next 10 seconds.
[0128] Adjusted cache decision value: D′(d) = 0.79 + 0.3×0.9 = 1.06
[0129] 4 Cache decision
[0130] Since D′(d) = 1.06 > θ l = 0.7, it is decided to store the "engine speed" data in the local cache of Terminal - A.
[0131] 5 Cache replacement
[0132] Assume the local cache of Terminal - A is full and needs to be replaced. For each data item in the cache, calculate the retention score.
[0133] Take the "fuel injection volume" data in the cache as an example: Assume its current D′(d) = 0.6 and it has been in the cache for 1800 seconds
[0134] Retention score:
[0135] Calculate the retention scores for all cache data items and remove the item with the lowest score to make room for the "engine speed" data.
[0136] 6 Dynamic weight adjustment
[0137] Assume after 1000 cache operations, the system evaluates the performance gain as follows:
[0138] - performance_gain s = 0.05 (data size factor)
[0139] - performance_gain f = 0.08 (access frequency factor)
[0140] - performance_gain i = 0.03 (data importance factor)
[0141] - performance_gain t = 0.04 (time correlation factor)
[0142] Average performance gain: Update weight (taking w s as an example): w s (new) = 0.25 + 0.01×(0.05 - 0.05) = 0.25
[0143] Perform similar calculations for other weights and then normalize to ensure the sum is 1.
[0144] Execute in loop 7
[0145] The system continues to process the next data item, such as the output data "gear position" of the Transmission - Sim unit, and repeats the process of steps 2 - 6.
[0146] In this way, the system can continuously optimize the cache strategy according to the specific requirements and data characteristics of the vehicle simulation, improving the simulation efficiency. For example, data such as engine speed and gear position that changes frequently and is referenced by multiple units may be stored more in the local cache, while relatively static data such as vehicle body parameters may be stored more in the central cache. This intelligent cache strategy can significantly reduce data transmission latency and improve the real - time performance and efficiency of the entire vehicle system simulation.
[0147] Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications to the technical solution of the present invention without departing from the spirit and scope of the present invention. Therefore, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention all fall within the protection scope of the technical solution of the present invention.
Claims
1. A distributed simulation system intelligent caching method based on multi-factor decision making, characterized in that The steps of the method include: Step 1: Initialize system parameters, including initial weight values, cache thresholds, and other adjustable parameters; Step 2: Calculate the evaluation factors of the data items to be cached, including data size factor, access frequency factor, data importance factor and time correlation factor; Step 3: Calculate the cache decision value of the data item to be cached based on the evaluation factor in step 2; Step 4: Use the time series prediction model to calculate the probability of the cached data item being accessed in the future, and adjust the cache decision value based on the probability; Step 5: decide whether to cache the cached data item according to the adjusted cache decision value and the preset cache threshold. If yes, determine the cache location and proceed to step 6; if no, proceed to step 7; Step 6: Determine whether the cache space is sufficient. If so, cache the data item to be cached to the cache position, and proceed to step 7. If not, determine the data item to be replaced based on the retention score, store the data item to be cached in the position of the replaced data item, and proceed to step 7. Step 7: Receive the next data item to be cached and return to step 2.
2. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 1 is characterized in that: In step 2, for the data item d to be cached, the calculation formulas of its various factors are as follows: Data size factor: size(d) is the data item size, and max_size is the maximum data item size that the system can accept; Access frequency factor: F(d) = 1-e -λf(d) , where f(d) is the access frequency of the data item to be cached, and λ is the access frequency influencing factor; Data importance factor: importance(d) is the importance score, and max_importance is the highest importance score defined in the system; Time correlation factor: T(d) = e -μΔt , where Δt is the time elapsed since the last visit and μ is the time decay parameter.
3. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 2 is characterized in that: In step 3, the cache decision value D(d) of the data item to be cached satisfies D(d)=w s S(d)+w f F(d)+w i I(d)+w t T(d) w s 、w f 、w i 、w t are the weights of the corresponding factors, and w s +w f +w i +w t =1.
4. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 1 is characterized in that: In step 4, the adjusted cache decision value D′(d) satisfies D′(d)=D(d)+βP(d) P(d) is the probability that the cached data item d will be accessed in the future, β is the prediction impact factor, and D(d) is the cache decision value of the cached data item d calculated in step 3.
5. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 1 is characterized in that: In step 5, If D′(d)≥θ l , then the data item to be cached needs to be cached and the data item to be cached d is stored in the local cache; D′(d) is the adjusted cache decision value; If θ c ≤D′(d)<θ l , it is necessary to cache the data item to be cached, and store the data item d to be cached in the central cache; If D′(d)<θ c , the cached data item d is not cached; where θ l is the local cache threshold, θ c is the central cache threshold.
6. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 1 is characterized in that: In step 6, the replaced data item is determined based on the retention score, and the data item to be cached is stored in the position of the replaced data item, as follows: 6.1 Calculate the retention score R(d′) of each cached data item d′: Where age(d′) is the residence time of cached data item d′ in the cache, D′(d′) is the adjusted cache decision value of cached data item d′, and max_age is the preset maximum residence time. 6.2 Find the data item with the lowest retention score; 6.3 Remove the data item and store the data item to be cached in the position of the data item to be replaced.
7. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 1 is characterized in that: During the execution of the intelligent caching method, the weights of various factors and system parameters are periodically adjusted.
8. The distributed simulation system intelligent caching method based on multi-factor decision-making according to claim 1 is characterized in that: the method of periodically adjusting the weight of each factor is as follows: 8.1 Calculate the performance gain caused by the jth factor performance_gain j ; 8.2 Calculate the average performance gain of all factors 8.3 Update the weight of the jth factor using the following formula: in, w j (t) The weight of the jth factor in the tth cycle, α is the learning rate; 8.4 Normalize weights to ensure ∑w j =1.
9. A terminal device, characterized in that: include: a memory for storing instructions executed by at least one processor; A processor, configured to execute instructions stored in a memory to implement a method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.