Distributed cache delay optimization method and system for multiple computing copies

By sharding the data set and intelligent scheduling of cached replicas, a cache value evaluation function based on historical time segments is built, which solves the problem of insufficient cache replica value evaluation in distributed cache systems, and achieves efficient cache hit rate and calculation performance improvement.

CN120371480AActive Publication Date: 2025-07-25北京镜舟科技有限公司

Patent Information

Application Number
CN202510845967.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-07-25
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

In large-scale data processing scenarios, existing distributed cache systems lack time-dimensional quantitative evaluation of cache replica value, resulting in low cache hit rate, frequent data return to source and scheduling delays between nodes, affecting computing performance.

Method used

By sharding the data set to be processed, multiple data shards are generated, and cache replicas are created on each computing node, a cache replica value evaluation function is built based on the historical time segment and time interval, a cache weight value is generated, a cache scheduling algorithm is optimized, and a cache preheating strategy and incremental data replication mechanism is combined to achieve intelligent node selection and cache acceleration.

Benefits of technology

It significantly improves cache hit rate and compute throughput, reduces cache access cross-node communication overhead, and improves task response speed and overall computing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371480A_ABST
    Figure CN120371480A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed cache delay optimization method and system for multiple calculation copies, and the method comprises the steps: carrying out the fragmentation processing of a to-be-processed data set, and generating a plurality of data fragments; scheduling the data fragments to different computing nodes respectively, creating a computing copy for each data fragment on the corresponding computing node, and creating a corresponding cache copy on the computing node where each computing copy is located; constructing a value evaluation function of the cache copy based on historical existence time sections of the cache copy in each computing node and a time interval between each time section and the current time point, and generating a cache weight value corresponding to each computing node according to the value evaluation function; and after the calculation copy of the target data fragment is allocated to the new calculation node, constructing a new cache copy corresponding to the target data fragment on the new calculation node. The method has the effect of improving the cache performance and the cache management efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of distributed computing and cache scheduling, and in particular, to a distributed cache latency optimization method and system for multiple computing replicas. Background Art

[0002] In current large-scale data processing scenarios, distributed computing frameworks usually divide the data to be processed into multiple shards and distribute them to multiple computing nodes for parallel processing. To improve processing efficiency, cache replicas are usually configured near each computing replica to accelerate data access. However, with the increase in the number of computing tasks and nodes, traditional cache scheduling strategies are difficult to effectively evaluate the dynamic availability and value of cache replicas in each node, resulting in a low cache hit rate, which causes frequent data backhaul and scheduling delays between nodes.

[0003] In the prior art, most distributed cache systems adopt static or least recently used (LRU) and other strategies for replica scheduling, lacking an analysis mechanism for the timeliness of cache replicas in nodes and unable to dynamically evaluate the latency impact of cache replicas on different nodes. In addition, existing scheduling algorithms usually do not fully consider the actual availability of cache replicas and the cooperation of future preheating mechanisms when scheduling computing replicas, which easily leads to cache cold starts in the initial stage of new replica startup, further affecting processing performance.

[0004] The above prior art solutions have the following defects: lacking a quantitative evaluation of the value of cache replicas in the time dimension, not fully considering the existence time history and preheating ability of cache replicas during the scheduling process, resulting in an increase in cache response latency after computing replica scheduling, affecting the overall system throughput performance and task processing efficiency, so there is room for improvement. Summary of the Invention

[0005] To improve cache performance and cache management efficiency, this application provides a distributed cache latency optimization method and system for multiple computing replicas.

[0006] The first inventive object of this application is achieved through the following technical solutions: A distributed cache latency optimization method for multiple computing replicas, the distributed cache latency optimization method for multiple computing replicas includes: Performing sharding processing on the data set to be processed to generate multiple data shards; Scheduling the data shards to different computing nodes respectively, creating computing replicas for each data shard on the corresponding computing nodes, and establishing corresponding cache replicas on the computing nodes where each computing replica is located; Construct a value evaluation function for the cache replica based on the historical existence time period of the cache replica in each computing node and the time interval from each time period to the current time point, and generate cache weight values corresponding to each computing node according to the value evaluation function; Input the cache weight values corresponding to each cache replica in each computing node into the replica scheduling algorithm. When scheduling the computing replicas of each data shard, use the corresponding cache weight value as a reference factor for the priority of computing node selection; After the replica scheduling algorithm allocates the computing replica of the target data shard to a new computing node, construct a new cache replica corresponding to the target data shard on the new computing node; According to the cache preheating strategy preset in association with the target data shard, perform cache data preheating operations on the new cache replica in the new computing node; Establish an incremental data replication mechanism among the computing nodes containing the target data shard. When performing data writing involving the target data shard, incrementally replicate the written data among the cache replicas containing the target data shard.

[0007] By adopting the above technical solutions, by performing sharding processing on the data set to be processed to generate multiple data shards, the data set can be divided into smaller-granularity units, improving the utilization efficiency of computing resources, thereby reducing the parallel computing pressure in big data processing scenarios; by synchronously constructing bound cache replicas on the computing replica deployment nodes to form a co-node cooperation mechanism between computing and caching, the problem of insufficient affinity caused by the independent deployment of cache services and computing services in common distributed cache systems is solved, thereby significantly reducing the cross-node communication overhead of cache access and effectively improving the acquisition efficiency of cache data and the response speed of task execution. Especially in high-frequency access and low-latency computing scenarios, a high cache hit rate and computing throughput can be maintained; by scheduling data shards to different computing nodes respectively and creating computing replicas and cache replicas for each data shard on the computing nodes, parallel distribution of tasks and cache acceleration can be achieved, thereby improving the overall computing speed and data access performance; by constructing a value evaluation function based on the historical existence time period and time interval and generating cache weight values for each node, the relative value of cache replicas in different nodes can be accurately quantified, thereby improving the priority utilization of efficient cache nodes during scheduling; by inputting the cache weight values into the replica scheduling algorithm and performing computing replica scheduling according to the weight priority, intelligent node selection based on the cache state can be realized, thereby further reducing the cache hit latency and task response time.

[0008] In one example, the present application can be further configured as: the sharding process of the data set to be processed to generate multiple data shards includes: The hash algorithm is used to scatter the to-be-processed data set, and the data set is divided into the multiple data shards; When generating the multiple data shards, a distribution balance strategy is adopted to control the data scale of each data shard, ensuring that the computing loads after the generated data shards are distributed among different computing nodes are balanced, and avoiding excessive computing pressure on a single node.

[0009] By adopting the above technical solution, by using the hash algorithm to scatter the to-be-processed data set and combining the distribution balance strategy to control the shard data scale, data skew and single-point bottlenecks can be avoided, thereby ensuring that the processing pressures of each computing node are relatively balanced and improving the overall system throughput.

[0010] In one example of the present application, it can be further configured that: creating a computing copy for each data shard on the corresponding computing node, and establishing a corresponding cache copy on each computing node where the computing copy is located includes: Based on the scheduling result after shard processing, deploy a computing task bound to the corresponding data shard in each scheduling target computing node to generate a corresponding computing copy; When the deployment of the computing copy is completed, based on the operating environment configuration, task context, and data access path of the computing copy in the target computing node, construct a cache copy bound to the computing copy.

[0011] By adopting the above technical solution, by deploying a computing copy bound to a computing task in the target computing node and constructing a cache copy based on the operating environment and data path, the cache copy can accurately match the computing requirements, thereby improving the data loading efficiency and task startup speed.

[0012] In one example of the present application, it can be further configured that: constructing a value evaluation function of the cache copy based on the historical existence time period of the cache copy in each computing node and the time interval between each time period and the current time point, and generating a cache weight value corresponding to each computing node according to the value evaluation function includes: Collect multiple historical existence time periods of each cache copy in the computing node to which it belongs, and represent each historical existence time period as a time interval set composed of a start time and an end time; For the historical existence time period of the cache copy, calculate the duration of the historical existence time period and the time distance between the end time and the current time point as the time characteristic parameter of the cache copy; Construct a value evaluation function of the cache copy based on the time characteristic parameter, and the value evaluation function obtains the value score of the cache copy through integral calculation by applying a time decay function and a state indication function to the historical time period. Normalize the value score of the cache copy and use it as the cache weight value corresponding to the computing node where the cache copy is located.

[0013] By adopting the above technical solution, by collecting the historical existence time period and time interval of the cache copy, and constructing a value evaluation function based on time characteristics, the timeliness and activity of the cache copy can be comprehensively evaluated, so as to more reasonably guide the scheduling and elimination of cache resources; by normalizing the value score into a cache weight value, the cache capacity of nodes can be compared on a unified scale, thus optimizing the scoring input index of the scheduling algorithm.

[0014] In one example of the present application, it can be further configured that: constructing the value evaluation function of the cache copy based on the time characteristic parameters, and the value evaluation function obtains the value score of the cache copy through integral calculation by applying a time decay function and a state indication function to the historical time period, including: Construct a time decay function for each historical existence time period, and the time decay function is used to measure the value weight between any time point in the historical existence time period and the current time point; Define a state indication function in each historical existence time period, and the state indication function takes the value of 1 when the cache copy is in an effective existence state at a certain computing node, and takes the value of 0 when the cache copy is invalid or does not exist; Perform sectional integration on the time decay function and the state indication function to form an integral expression: Cache copy value score = , where v(x) is the time decay function, g(x) is the state indication function, x represents the historical time point, t is the start time of the historical existence time period, and 0 is the current time point.

[0015] By adopting the above technical solution, by constructing a time decay function to measure the weights of different historical time points and the current time point, and combining with the state indication function for integral calculation, the existence duration and use effectiveness of the cache copy can be comprehensively considered, thus improving the accuracy and discrimination ability of the cache evaluation result.

[0016] In one example of the present application, it can be further configured that: inputting the cache weight value corresponding to each cache copy in each computing node into the copy scheduling algorithm, and when scheduling the computing copy of each data shard, using the corresponding cache weight value as the priority reference factor for computing node selection, including: Collect the cache weight values of all cache copies associated with the data shard to be scheduled in their respective computing nodes, establish the corresponding relationship between the cache copy identifier and the computing node identifier, and extract the cache weight values associated with each computing node; The cache weight values of each computing node, together with the current processing load metrics, task queuing waiting time metrics, and resource utilization rate metrics of the corresponding computing node, are used as multi-dimensional scheduling factors and input into the replica scheduling algorithm; Based on the comprehensive scoring results of each candidate computing node obtained from the replica scheduling algorithm, the computing node with the highest comprehensive score in the comprehensive scoring results is selected as the computing replica deployment node for the data shard to be scheduled.

[0017] By adopting the above technical solution, by collecting the cache replica weight values related to the data shard to be scheduled and establishing a mapping relationship, an evaluation channel between the cache replica and the node performance can be formed; by introducing the real-time load, queuing time, and resource occupancy metrics of the node as scheduling factors, multi-dimensional and multi-objective comprehensive scheduling optimization can be achieved, thereby improving the scientificity and rationality of data shard replica deployment.

[0018] In one example of the present application, it can be further configured that: the cache data preheating operation on the new cache replica in the new computing node according to the cache preheating policy preset in association with the target data shard includes: In the new computing node, based on the loading stage before the start of the computing replica task of the target data shard, parse the parameters of the cache preheating policy preset in association with the target data shard, and obtain the historical access path, prefetch data block range, and access frequency threshold in the cache preheating policy; According to the preheating trigger condition and preheating method defined in the cache preheating policy, schedule the new cache replica to perform data preheating operation; After completing the data preheating operation, construct the preheating data index and mapping structure of the target data shard.

[0019] By adopting the above technical solution, by parsing the cache preheating policy of the target data shard in the computing replica startup stage, the preheating operation can be made controllable and targeted; by performing data loading based on the preheating parameters and constructing the preheating data index, the cache hit rate and startup efficiency can be improved, thereby reducing the first calculation response delay and improving the startup performance of the system.

[0020] The above second invention object of the present application is achieved through the following technical solution: A distributed cache latency optimization system for multiple computing replicas, the distributed cache latency optimization system for multiple computing replicas includes: A sharding module, configured to perform sharding processing on the data set to be processed to generate multiple data shards; A copy creation module, configured to schedule the data shards to different computing nodes respectively, create computing copies for each data shard on the corresponding computing nodes, and establish corresponding cache copies on the computing nodes where each computing copy is located; A construction function module, configured to construct a value evaluation function for the cache copies based on the historical existence time periods of the cache copies in each computing node and the time intervals from each time period to the current time point, and generate cache weight values corresponding to each computing node according to the value evaluation function; An input module, configured to input the cache weight values corresponding to each cache copy in each computing node into a copy scheduling algorithm, and use the corresponding cache weight values as the priority reference factors for computing node selection when scheduling the computing copies of each data shard; A scheduling module, configured to, after the copy scheduling algorithm allocates the computing copy of a target data shard to a new computing node, construct a new cache copy corresponding to the target data shard on the new computing node; A preheating module, configured to perform a cache data preheating operation on the new cache copy in the new computing node according to a cache preheating strategy preset in association with the target data shard; An incremental replication module, configured to establish an incremental data replication mechanism among the computing nodes including the target data shard, and perform incremental replication of the written data among the cache copies including the target data shard when performing data writing involving the target data shard.

[0021] By adopting the above technical solutions, by performing sharding processing on the data set to be processed to generate multiple data shards, the data set can be divided into smaller-granularity units, improving the utilization efficiency of computing resources, thereby reducing the parallel computing pressure in the big data processing scenario; by scheduling the data shards to different computing nodes respectively and creating computing copies and cache copies for each data shard on the computing nodes, parallel distribution of tasks and cache acceleration can be achieved, thereby improving the overall computing speed and data access performance; by constructing a value evaluation function based on the historical existence time periods and time intervals and generating cache weight values for each node, the relative value of the cache copies in different nodes can be accurately quantified, thereby improving the priority utilization of high-efficiency cache nodes during scheduling; by inputting the cache weight values into the copy scheduling algorithm and scheduling the computing copies according to the weight priorities, intelligent node selection based on the cache status can be achieved, thereby further reducing the cache hit latency and task response time.

[0022] In summary, the present application includes the following beneficial technical effects: 1. By performing sharding on the data set to be processed, multiple data shards are generated, which can divide the data set into smaller units, improve the utilization efficiency of computing resources, and thus reduce the parallel computing pressure in big data processing scenarios; by scheduling the data shards to different computing nodes respectively and creating computing replicas and cache replicas for each data shard on the computing nodes, parallel distribution of tasks and acceleration of local access to the cache can be achieved, thereby improving the overall computing speed and data access performance. 2. By constructing a value evaluation function based on the historical existence time period and time interval and generating the cache weight values of each node, the relative value of the cache replicas in different nodes can be accurately quantified, thereby improving the preferential utilization of high-efficiency cache nodes during scheduling; by inputting the cache weight values into the replica scheduling algorithm and performing computing replica scheduling according to the weight priority, intelligent node selection based on the cache status can be achieved, thereby further reducing the cache hit latency and task response time. Brief Description of the Drawings

[0023] Figure 1 is a flowchart of a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 2 is an implementation flowchart of step S10 in a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 3 is an implementation flowchart of step S20 in a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 4 is an implementation flowchart of step S30 in a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 5 is an implementation flowchart of step S33 in a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 6 is an implementation flowchart of step S40 in a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 7 is an implementation flowchart of step S60 in a distributed cache latency optimization method for multiple computing replicas in an embodiment of the present application; Figure 8 is a principle block diagram of a distributed cache latency optimization system for multiple computing replicas in an embodiment of the present application. Detailed Description of the Embodiment

[0024] The present application will be further described in detail below with reference to the accompanying drawings.

[0025] In one embodiment, asFigure 1 As shown in Figure 1 , the present application discloses a distributed cache latency optimization method for multiple computing replicas, which specifically includes the following steps: S10: Shard the set of data to be processed to generate multiple data shards.

[0026] Specifically, after receiving the set of data to be processed passed in by the upper-layer task distribution module, use a preset data sharding engine to perform key-based hash partitioning or range splitting operations on the data set, and decompose the set of data to be processed into multiple data subsets with consistent structures and non-overlapping according to the data primary key or specified field value. Each data subset logically constitutes an independent data shard, and each data shard is managed by a unique shard identifier to ensure fast retrieval and positioning during subsequent scheduling. The generated data shards can adopt a dynamic data structure to support the status tracking of subsequent computing replicas and the scheduling status management. In the scenario of big data batch processing, for example, hundreds of millions of user behavior log data can be divided into several blocks sharded by day or modulo by user ID, and each block is processed as an independently schedulable task unit.

[0027] S20: Schedule the data shards to different computing nodes respectively, create computing replicas for each data shard on the corresponding computing nodes, and establish corresponding cache replicas on the computing nodes where each computing replica is located.

[0028] Specifically, after the data sharding is completed, based on the resource utilization rate, computing power evaluation value, and scheduling priority of each computing node in the current cluster, the scheduling controller distributes each data shard to a suitable computing node, and allocates a task execution container on the selected computing node to deploy the computing replica of the shard. After the computing replica is deployed, a local cache area associated with its input and output data paths is automatically loaded in its running environment and initialized as an independent cache replica. This cache replica is uniquely bound to the current computing replica, loads the historical intermediate state or necessary index structure during the initialization of the computing task, and sets an access policy to ensure continuous monitoring of data heat and replica validity.

[0029] S30: Based on the historical existence time period of the cache replicas in each computing node and the time interval from each time period to the current time point, construct a value evaluation function for the cache replicas, and generate cache weight values corresponding to each computing node according to the value evaluation function.

[0030] Specifically, in the cache copy status record module maintained in the system background, query the historical existence status change logs of each cache copy on its affiliated computing node, extract the time periods continuously in the valid state as the sample set of the historical existence time periods, and calculate the time intervals between the end times of each time period and the current time point according to the current timestamp. Call the function interface to assign a time decay factor to each time period to represent the decay degree of the value of this period for the current copy. Use the above period samples to construct an integral value function model, combine the duration of the historical existence time period with the time decay coefficient, perform cumulative integration operations, and then obtain the current relative value score of the cache copy. Furthermore, normalize the scores of multiple cache copies into the cache weight values corresponding to each computing node, which are used to characterize the response ability and usage value level of the cache resources on this node.

[0031] S40: Input the cache weight values corresponding to each cache copy in each computing node into the copy scheduling algorithm. When scheduling the computing copies of each data shard, use the corresponding cache weight values as the priority reference factors for computing node selection.

[0032] Specifically, before the copy scheduling engine is ready to execute the computing copy allocation, call the cache value weight acquisition module to retrieve the cache weight values of the cache copies corresponding to the target data shard in all candidate computing nodes, and construct a mapping table of cache copy identifiers and computing node identifiers to support the input binding of the scheduling function. At the same time, combine the cache weight values with real-time load information such as the CPU usage rate, remaining memory capacity, and task waiting time of the current computing node to form the comprehensive scoring factor of the scheduling algorithm, and input it into the copy scheduling algorithm model designed based on the hierarchical priority strategy for scoring and sorting. Finally, select the target node most suitable for executing the shard computing task according to the scoring results. Further, when constructing the priority reference factor of the copy scheduling algorithm, the node affinity between the cache copy and the computing task can be introduced as a weighted parameter. If there is already a cache copy of the target data shard on a certain computing node and it is physically node-consistent with the computing copy, then increase the scheduling priority of this node, so as to balance data availability and scheduling efficiency, further strengthen the fusion mechanism of local computing and local caching, and thus reduce the overhead of cross-node migration and cache cold start during the actual deployment process.

[0033] S50: After the copy scheduling algorithm allocates the computing copy of the target data shard to a new computing node, construct a new cache copy corresponding to the target data shard on the new computing node.

[0034] Specifically, when the replica scheduling result determines that a new compute replica of the target data shard needs to be generated on a new compute node, first initialize an instance of the data processing flow in the task scheduling container of this node, and load the task configuration and dependency metadata of the target data shard. Subsequently, create a cache area exclusive to the compute replica of this shard. This cache area is bound with the task running path as the index as a new cache replica, maintaining an independent namespace from the original cache structure. Initialize the data mapping table and cache replacement policy in lazy loading mode, and set a monitoring probe for this cache replica to control the triggering of subsequent warm-up and data write synchronization.

[0035] S60: According to the cache warm-up policy preset in association with the target data shard, perform a cache data warm-up operation on the new cache replica in the new compute node.

[0036] Specifically, before the newly constructed cache replica is officially written with data, extract the warm-up parameter configuration of the target data shard from the cache warm-up policy template issued by the system configuration center, including information such as the access frequency threshold, warm-up data block range, historical access path, etc. Select the prefetch data blocks by constructing a local access heat prediction model, and use a data fetcher to asynchronously load relevant data from the upstream data source or other replicas and fill it into the specified space segment in the cache replica. During the data warm-up loading, the main task execution is not blocked, but a callback hook is set to notify the task container to complete the cache structure update after the warm-up is completed.

[0037] S70: Establish an incremental data replication mechanism among the compute nodes containing the target data shard, and when performing data writes involving the target data shard, incrementally replicate the written data among the cache replicas containing the target data shard.

[0038] Specifically, to maintain data consistency among multiple replicas, record the distribution locations of all replicas where the target data shard is located in the scheduling console and register them in a unified replica synchronization management module. After detecting a write request for the target data shard on any replica node, collect the specific data blocks of this write through a write interceptor and construct an incremental write data packet. At the same time, consult the replica distribution mapping table to determine the list of target nodes to be synchronized, and sequentially push the incremental data to the cache write interfaces of each replica through a lightweight network synchronization protocol to ensure that each replica maintains a data consistent state with relatively small communication and computing overheads, and avoid risks of read-write conflicts and consistency failures.

[0039] In one embodiment, when establishing an incremental data replication mechanism among computing nodes containing target data shards, a synchronous replication or asynchronous replication strategy can be selected based on business consistency requirements and performance trade-offs: When using synchronous replication for data writing, when a write operation is performed on a target data shard on a certain computing node, the operation process will be blocked simultaneously until all other cache copies containing the target data shard successfully receive and complete the current write data, ensuring that the consistency of all copies always remains in the same state. However, synchronous replication may lead to an increase in the overall write latency and is applicable to critical data scenarios with extremely high consistency requirements. When using asynchronous replication for data writing, after a computing node completes the write operation of the target data shard, it can immediately return the response result without waiting for other copies to complete the data update operation. Subsequently, the background thread or replication agent will asynchronously push the current write data to other cache copies containing the target data shard within a specified time window, improving the write throughput efficiency and system response speed. However, it may cause a short-term data consistency delay and is applicable to business scenarios with high timeliness requirements but can tolerate short-term copy differences.

[0040] By adopting the above technical solutions, through sharding the data set to be processed to generate multiple data shards, the data set can be divided into smaller-grained units, improving the utilization efficiency of computing resources, thereby reducing the parallel computing pressure in big data processing scenarios; by scheduling the data shards to different computing nodes respectively and creating computing copies and cache copies for each data shard on the computing nodes, parallel task distribution and cache acceleration can be achieved, thereby improving the overall computing speed and data access performance; by constructing a value evaluation function based on the historical existence time period and time interval and generating the cache weight values of each node, the relative value of the cache copies in different nodes can be accurately quantified, thereby improving the preferential utilization of high-efficiency cache nodes during scheduling; by inputting the cache weight values into the copy scheduling algorithm and performing computing copy scheduling according to the weight priority, intelligent node selection based on the cache state can be realized, thereby further reducing the cache hit latency and task response time.

[0041] In one embodiment, as Figure 2 shown, in step S10, that is, sharding the data set to be processed to generate multiple data shards, specifically including: S11: Use the hash algorithm to scatter the data set to be processed and divide the data set into multiple data shards.

[0042] Specifically, after receiving the data set to be processed, the data splitting module calls the built-in hash function to perform a hash mapping operation on the primary key field of each data record in the data set. The data records are assigned to different data buckets by taking the modulus of the hash value with the fixed number of shards. During the hashing process, the consistent hashing strategy is adopted to ensure that when the number of shards or computing nodes changes, the impact of the existing data migration can be minimized as much as possible. At the same time, by setting the hash seed and partition range, the distribution characteristics of shard generation are controlled. For example, when processing one million user logs, ten shards can be generated based on the user ID field, and each shard is mapped to a data queue for subsequent independent scheduling and processing, so as to break up the original data set into multiple data subsets with processing isolation.

[0043] S12: When generating multiple data shards, adopt a distribution balance strategy to control the data scale of each data shard, ensure that the computing load after the generated data shards are distributed among different computing nodes remains balanced, and avoid excessive computing pressure on a single node.

[0044] Specifically, after initially dividing several data shards, execute the distribution balance adjustment logic to statistically analyze the number of data records in each data shard. By setting the maximum tolerance deviation range, judge whether the current data distribution is significantly unbalanced. If it is found that the data volume of some shards exceeds the preset mean threshold, split the over-large shards according to the sorted data density curve or migrate some data to the shards with smaller data volume for supplementation. During the adjustment process, adopt the principle of unchanged data heat to avoid frequent migration of frequently accessed data among multiple nodes. Finally, the output data shard set remains within a controllable deviation range in terms of physical size, record quantity, and access pressure, so as to improve the resource allocation efficiency and task running stability in the subsequent computing node scheduling stage.

[0045] In one embodiment, as Figure 3 shown, in step S20, that is, create a computing copy for each data shard on the corresponding computing node, and establish a corresponding cache copy on the computing node where each computing copy is located. Specifically include: S21: Based on the scheduling result after shard processing, deploy the computing tasks bound to the corresponding data shards in each scheduling target computing node to generate the corresponding computing copies.

[0046] Specifically, after completing the sharding process of the data set to be processed and obtaining the sharding scheduling target, the task scheduling module assembles the task context and processing logic of each data shard into an independent computing task unit. Combining the target computing node identifier specified in the scheduling result, the computing task unit is sent to the task receiving interface of the target node. Subsequently, the task initialization operation is executed inside the computing node to load the execution environment and runtime dependencies. After the task is bound to the data shard, a computing replica is formally generated, and local resources such as memory buffers and computing thread pools are allocated to support subsequent data processing work. During this process, the one-to-one correspondence between the shard identifier and the computing replica is maintained, so as to ensure that the computing logic of each shard is reliably mapped to the specified computing node.

[0047] S22: When the deployment of the computing replica is completed, based on the runtime environment configuration, task context, and data access path of the computing replica in the target computing node, construct a cache replica bound to the computing replica.

[0048] Specifically, after the computing replica is deployed and enters the ready state, the cache construction logic parses the task context information of the computing replica, including the data processing function entry, access mode identifier, and input / output interface constraints. Then, combined with the runtime environment configuration of the current target computing node, such as the local storage directory, memory usage limit, and inter-process communication structure, determine the read / write data paths that the computing replica may involve during execution, load the hot data and frequently used index files associated with this path into the local high-speed cache area, and at the same time establish the mapping rule between the data access path and the cache data structure for quickly hitting the cache space during runtime. Finally, complete the construction of the cache replica bound to the computing replica, and generate a unique identifier in the cache directory structure to support subsequent data synchronization and heat evaluation operations. Further, during the process of constructing the cache replica bound to the computing replica, the cache space physically adjacent to the computing replica is directly allocated inside the target computing node to achieve the node affinity between the cache replica and the computing replica. This affinity mechanism ensures that the cache data access path does not rely on cross-node network communication, thus significantly reducing the cache access latency and improving the data locality processing efficiency. Compared with the traditional distributed computing mode that relies on external independent cache services, it reduces the system synchronization overhead and I / O bottleneck while ensuring the computing efficiency.

[0049] In one embodiment, as Figure 4 shown, in step S30, that is, based on the historical existence time period of the cache replica in each computing node and the time interval between each time period and the current time point, construct a value evaluation function for the cache replica, and generate the cache weight value corresponding to each computing node according to the value evaluation function, specifically including: S31: Collect multiple historical existence time segments of each cache copy in its affiliated computing node, and represent each historical existence time segment as a set of time intervals composed of a start time and an end time.

[0050] Specifically, after the initialization of the cache copy is completed and it enters the life cycle management stage, call the cache monitoring logic to record the residency status change of each cache copy on its affiliated computing node in real time. Record the entry timestamp when the cache copy transitions from the created state to the valid state, and record the exit timestamp when the cache copy is cleared, replaced, or removed due to the space eviction policy. Then, record each period of valid residency as a time interval composed of a start time and an end time, and continuously accumulate over time to form the set of historical existence time segments of the cache copy on this node, and save it in the metadata management structure of the cache copy in the form of an interval list for subsequent value analysis calls.

[0051] S32: For the historical existence time segments of the cache copy, calculate the duration of the historical existence time segment and the time distance between the end time and the current time point as the time characteristic parameters of the cache copy.

[0052] Specifically, traverse the list of collected historical existence time segments. For each time interval, calculate its duration, i.e., the time length obtained by subtracting the start time from the end time, and at the same time calculate the time difference between the end time of this time interval and the current system time as the basis for time decay measurement. Finally, pair up the duration of each time segment with the current time interval to form the set of time characteristic parameters corresponding to the cache copy in the current computing node. This set is used to describe the activity and historical contribution degree of the cache copy in the time series dimension, and provides the basic input for constructing the subsequent value evaluation function.

[0053] S33: Construct a value evaluation function for the cache copy based on the time characteristic parameters. The value evaluation function obtains the value score of the cache copy by performing integral calculations on the historical time segments using the time decay function and the state indication function.

[0054] Specifically, select each historical existence time segment, use the start time of this time segment to the current time point as the integration interval, define the time decay function v(x) to represent the value decay relationship of any historical time point x relative to the current time, and at the same time define the state indication function g(x) to mark whether the cache copy is in the valid state at this time point. When the cache copy is valid, g(x) takes 1, otherwise it takes 0. Perform segment integration on the time decay function and the state indication function according to the time segment, and the calculation expression is , where t is the start time of the segment and 0 is the current time. By summing up the integral results of all time segments, the comprehensive value evaluation value of the cache copy in the current node is obtained, which is the value score of the cache copy.

[0055] S34: Normalize the value scores of the cache copies and use them as cache weight values corresponding to the computing nodes where the cache copies are located.

[0056] Specifically, the value scores corresponding to all cache copies in multiple computing nodes are collected to form a sample set, the maximum and minimum values of the sample set are calculated, and a normalization formula is applied to the value score of each cache copy. For example, linear normalization is used to convert it into a relative value between 0 and 1. The result of the normalization is the cache weight value of the cache copy in the computing node to which it belongs. The cache weight value is then mapped to the scheduling input structure and associated with the computing node to which it belongs, for subsequent computing copy scheduling priority decisions.

[0057] In one embodiment, if Figure 5 As shown, in step S33, a value evaluation function of the cache copy is constructed based on the time characteristic parameter. The value evaluation function obtains the value score of the cache copy by applying the time decay function and the state indication function to the historical time segment for integral calculation, which specifically includes: S331: Construct a time decay function for each historical time segment, where the time decay function is used to measure the value weight between any time point in the historical time segment and the current time point.

[0058] Specifically, in the historical existence time segment of each cache copy, the time point closer to the current time point is given a higher weight, and the time point farther away is given a lower weight. The time decay function v(x) is constructed to represent the influence factor of the time point x relative to the current time point 0, where the time decay function can use an exponential function, a hyperbolic function or a piecewise linear function to achieve nonlinear enhanced expression of the time difference. For example, when the exponential decay form is selected, v(x)=e^(-λ·(0-x)), where λ is the decay coefficient, which can control the speed of decay. When the λ value is large, it tends to emphasize the influence of recent data and ignore remote data. By setting the λ value, the degree of attention to the contribution of historical time can be flexibly adjusted and the importance of data freshness can be reflected.

[0059] S332: defining a state indication function in each historical existence time segment, the state indication function takes a value of 1 when the cache copy is in a valid existence state on a computing node, and takes a value of 0 when the cache copy is invalid or does not exist.

[0060] Specifically, for the historical existence time period of each cache copy in its affiliated computing node, a state indication function g(x) is set to perform binary identification on whether it is in a valid existence state at any time point within this time period. When a certain time point x is within the valid stage where the cache copy has been loaded and can normally respond to data requests, the value of g(x) is set to 1, indicating that this time point has actual effectiveness in the copy life cycle; if x falls within the idle stage where the cache copy has not been established or has been cleared, the value of g(x) is set to 0, indicating that the cache copy does not have the data access ability on this computing node at this time. The state indication function is constructed in the form of a Boolean function in combination with the valid time boundary in the time period, and is used to eliminate the influence of invalid time during the integration processing stage.

[0061] S333: Perform sectional integration on the time decay function and the state indication function to form an integral expression: Cache copy value score = , where v(x) is the time decay function, g(x) is the state indication function, x represents the historical time point, t is the start time of the historical existence time period, and 0 is the current time point.

[0062] Specifically, perform interval integration operations on the historical existence time period of each cache copy, multiply and combine the time decay function v(x) and the state indication function g(x), and establish an integral expression between the start time t of the time period and the current time point 0. , during the integral calculation process, if g(x) of a certain time point is 0, then this time point makes no contribution to the integral value; if g(x) is 1, its contribution degree will depend on the value of v(x). Finally, the value quantity of this time period under the joint action of time and state is obtained, and the integral results of all historical existence time periods are accumulated as the total value score of this cache copy in the current computing node. This integral method can accurately reflect the historical importance distribution of the cache copy within the valid time range and eliminate the interference of invalid time.

[0063] In one embodiment, as Figure 6 shown, in step S40, that is, input the cache weight value corresponding to each cache copy in each computing node into the copy scheduling algorithm. When scheduling the computing copies of each data shard, use the corresponding cache weight value as the priority reference factor for computing node selection, specifically including: S41: Collect the cache weight values of all cache copies associated with the data shard to be scheduled in their respective affiliated computing nodes, establish the corresponding relationship between the cache copy identifier and the computing node identifier, and extract the cache weight values associated with each computing node.

[0064] Specifically, before scheduling the data shards to be processed, retrieve the list of all cached replicas associated with the data shards based on the identification information of the current scheduling target, locate each cached replica on the corresponding computing node one by one, extract the cache weight value corresponding to each cached replica in its home computing node from the cache resource management data structure, and at the same time construct an association mapping structure between the cached replicas and the computing nodes. In this mapping structure, use the unique identifier of the cached replica and the computing node identifier to form a key-value pair relationship, so as to quickly reverse-check and match the cache distribution status in the subsequent scheduling process. Finally, sort out the set of available cache weight values of the data shards to be scheduled in different computing nodes, providing the original input parameters for the priority sorting of the scheduling computing nodes.

[0065] S42: Use the cache weight values of each computing node, together with the current processing load index, task queuing waiting time index, and resource utilization rate index of the corresponding computing node, as multi-dimensional scheduling factors to input into the replica scheduling algorithm.

[0066] Specifically, to improve the global rationality and execution efficiency of replica scheduling, when preparing the factor parameters for inputting into the replica scheduling algorithm, collect the number of tasks to be executed in the current processing queue for all candidate computing nodes to measure the task queuing waiting time, obtain the CPU and memory resource utilization rate indexes to reflect the node resource load situation, and combine the aforementioned cache weight values as the constituent elements of the scheduling evaluation model. Construct a multi-dimensional feature vector in a unified format for each node and perform standardization processing to ensure that each index has a unified measurement scale in the evaluation process. This multi-dimensional factor combination can not only reflect the historical cache availability of each computing node but also reflect the running pressure and processing capacity of the node in real time, providing a decision-making basis for the scheduling algorithm to comprehensively balance the cache hit rate and the node's bearing capacity.

[0067] S43: According to the comprehensive scoring results of each candidate computing node obtained by the replica scheduling algorithm, select the computing node with the highest comprehensive score in the comprehensive scoring results as the computing replica deployment node for the data shards to be scheduled.

[0068] Specifically, input the constructed multi-dimensional scheduling factor vector into the replica scheduling algorithm in sequence to execute the calculation and scoring process. The scheduling algorithm assigns scoring weights to the cache weight value, load index, queuing waiting time, and resource utilization rate index respectively according to the preset scoring weight rules and performs weighted accumulation to obtain the comprehensive scoring results of each candidate computing node. By sorting the scores of all candidate nodes, select the computing node with the highest score as the deployment location of the computing replica for the current data shards to be scheduled. This node is considered to have the optimal cache matching degree and scheduling response ability at the current moment, thereby improving the cache hit rate of subsequent computing tasks and reducing the overall computing latency.

[0069] In one embodiment, asFigure 7 As shown in Figure 7 , in step S60, according to the cache warm-up policy preset in association with the target data shard, a cache data warm-up operation is performed on the new cache copy in the new computing node, which specifically includes: S61: In the new computing node, based on the pre-loading phase before the start of the computing copy task of the target data shard, parse the parameters of the cache warm-up policy preset in association with the target data shard, and obtain the historical access path, pre-read data block range, and access frequency threshold in the cache warm-up policy.

[0070] Specifically, in the initialization phase of loading the computing copy of the target data shard, according to the cache warm-up policy identifier bound to the target data shard, retrieve the preset policy configuration file or policy template, parse the defined parameter fields therein, extract the historical access path information from it to determine the data access trajectory that has been frequently accessed, read the pre-read data block range to clarify the offset segment and length interval of the cache data to be loaded in the data shard, and extract the access frequency threshold as the conditional standard for judging whether specific data should be pre-loaded into the cache, thereby completing the initialization preparation of the cache warm-up policy parameters and laying a configuration foundation for the accurate warm-up scheduling of the subsequent cache copy.

[0071] S62: According to the warm-up trigger condition and warm-up method defined in the cache warm-up policy, schedule the new cache copy to perform the data warm-up operation.

[0072] Specifically, based on the trigger condition field defined in the aforementioned cache warm-up policy, judge whether the current computing copy loading phase meets the logical threshold for starting the warm-up. For example, detect whether the task life cycle state is in the preprocessing phase or whether there is a historical data missing mark. After judging that the warm-up condition is met, read the warm-up method parameter specified in the policy. If it is set to synchronous warm-up, immediately load the target data block during the main thread scheduling process. If it is set to asynchronous warm-up, dispatch the loading task to the auxiliary thread or background process for processing. When performing the specific warm-up operation, read the high-frequency sections in the target data shard in the order of the historical access path marked in the policy in chunks, and load the warm-up data into the corresponding buffer position in the local cache copy to ensure that the subsequent computing process can directly hit the cache area, thereby improving the data access response speed.

[0073] S63: After completing the data warm-up operation, construct the warm-up data index and mapping structure of the target data shard.

[0074] Specifically, after the target cache copy completes the loading action of all marked warm-up data blocks, the offset information of the loaded data blocks and their storage locations cached in the memory address space are extracted, and a warm-up data index structure is constructed to achieve a fast mapping from data offset to physical address. At the same time, the access priority and life cycle management marks of each warm-up data block are recorded in this index structure. For example, an access weight field can be set for subsequent cache replacement policy judgment, or an expiration field can be set for judging the validity of the warm-up content during the cache cleaning process. The finally generated data index and mapping structure are stored in the cache directory table as the metadata of the cache copy, and are loaded into the context when the computing copy task is started for fast retrieval during the subsequent data access phase.

[0075] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0076] In one embodiment, a distributed cache latency optimization system for multiple computing copies is provided. This distributed cache latency optimization system for multiple computing copies corresponds one-to-one with the distributed cache latency optimization method for multiple computing copies in the above embodiment. As Figure 8 shown, this distributed cache latency optimization system for multiple computing copies includes a sharding module, a replica creation module, a construction function module, an input module, a scheduling module, a warm-up module, and an incremental replication module. The detailed description of each functional module is as follows: The sharding module is used to shard the data set to be processed to generate multiple data shards; The replica creation module is used to schedule the data shards to different computing nodes respectively, create computing copies for each data shard on the corresponding computing nodes, and establish corresponding cache copies on the computing nodes where each computing copy is located; The construction function module is used to construct a value evaluation function of the cache copy based on the historical existence time period of the cache copy in each computing node and the time interval from each time period to the current time point, and generate cache weight values corresponding to each computing node according to the value evaluation function; The input module is used to input the cache weight values corresponding to each cache copy in each computing node into the replica scheduling algorithm, and use the corresponding cache weight values as the priority reference factor for computing node selection when scheduling the computing copies of each data shard; The scheduling module is used to construct a new cache copy corresponding to the target data shard on the new computing node after the replica scheduling algorithm allocates the computing copy of the target data shard to a new computing node; A warm-up module, which is used to perform cache data warm-up operations on new cache copies in a new computing node according to a cache warm-up policy preset in association with a target data shard; An incremental replication module, which is used to establish an incremental data replication mechanism among computing nodes containing the target data shard, and perform incremental replication of the written data among cache copies containing the target data shard when data writing involving the target data shard is executed.

[0077] Optionally, the sharding module includes: A hash sharding sub-module, which is used to perform a shattering process on a data set to be processed by using a hash algorithm, and divide the data set into multiple data shards; An equilibrium control sub-module, which is used to control the data scale of each data shard by using a distribution equilibrium strategy when generating multiple data shards, so as to ensure that the computing loads after the generated data shards are distributed among different computing nodes are balanced, and avoid excessive computing pressure on a single node.

[0078] Optionally, the replica creation module includes: A replica deployment sub-module, which is used to deploy a computing task bound to the corresponding data shard in each scheduled target computing node based on the scheduling result after sharding processing, and generate a corresponding computing replica; A cache binding sub-module, which is used to construct a cache copy bound to the computing replica based on the running environment configuration, task context and data access path of the computing replica in the target computing node when the computing replica deployment is completed.

[0079] Optionally, the construction function module includes: A historical collection sub-module, which is used to collect multiple historical existence time periods of each cache copy in its affiliated computing node, and represent each historical existence time period as a set of time intervals composed of a start time and an end time; A time parameter extraction sub-module, which is used to calculate the duration of the historical existence time period and the time distance between the end time and the current time point for the historical existence time period of the cache copy, as the time feature parameter of the cache copy; A value evaluation sub-module, which is used to construct a value evaluation function of the cache copy based on the time feature parameter, and the value evaluation function obtains the value score of the cache copy through integral calculation by applying a time decay function and a state indication function to the historical time period; A weight normalization sub-module, which is used to normalize the value score of the cache copy and use it as the cache weight value corresponding to the computing node where the cache copy is located.

[0080] Optionally, the value evaluation sub-module includes: An attenuation function construction unit for constructing a time attenuation function for each historical existence time period, where the time attenuation function is used to measure the value weight between any time point in the historical existence time period and the current time point; A state function construction unit for defining a state indication function in each historical existence time period, where the state indication function takes a value of 1 when the cache copy is in a valid existence state at a certain computing node, and takes a value of 0 when the cache copy is invalid or does not exist; An integral calculation unit for performing sectional integration on the time attenuation function and the state indication function to form an integral expression: The value score of the cache copy = , where v(x) is the time attenuation function, g(x) is the state indication function, x represents the historical time point, t is the start time of the historical existence time period, and 0 is the current time point.

[0081] Optionally, the input module includes: A cache metric extraction sub-module for collecting the cache weight values of all cache copies associated with the data shard to be scheduled in their respective computing nodes, establishing the correspondence between the cache copy identifier and the computing node identifier, and extracting the cache weight values associated with each computing node; A scheduling factor fusion sub-module for taking the cache weight values of each computing node together with the current processing load metric, task queuing waiting time metric, and resource utilization rate metric of the corresponding computing node as multi-dimensional scheduling factors and inputting them into the replica scheduling algorithm; A scoring decision sub-module for selecting the computing node with the highest comprehensive score in the comprehensive score results of each candidate computing node obtained according to the replica scheduling algorithm as the computing replica deployment node for the data shard to be scheduled.

[0082] Optionally, the warm-up module includes; A policy parsing sub-module for parsing the parameters of the cache warm-up policy associated with the target data shard during the preloading stage before the start of the computing replica task of the target data shard in the new computing node, and obtaining the historical access path, prefetch data block range, and access frequency threshold in the cache warm-up policy; A warm-up execution sub-module for scheduling a new cache copy to perform data warm-up operations according to the warm-up trigger condition and warm-up method defined in the cache warm-up policy; An index construction sub-module for constructing a warm-up data index and mapping structure of the target data shard after the data warm-up operation is completed.

[0083] For the specific limitations of a distributed cache latency optimization system for multiple computing replicas, reference may be made to the limitations of a distributed cache latency optimization method for multiple computing replicas in the foregoing text, which will not be elaborated herein. Each module in the above-mentioned distributed cache latency optimization system for multiple computing replicas can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above-mentioned modules.

[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the system is divided into different functional units or modules to complete all or part of the functions described above.

[0085] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A distributed cache latency optimization method for multiple computing replicas, characterized in that, The distributed cache delay optimization method for multiple computing copies includes: The data set to be processed is sharded to generate multiple data shards; Dispatching the data shards to different computing nodes respectively, creating computing copies for each data shard on the corresponding computing nodes, and establishing corresponding cache copies on the computing nodes where each computing copy is located; Based on the historical existence time segments of the cache copy in each computing node and the time interval between each time segment and the current time point, construct a value evaluation function of the cache copy, and generate a cache weight value corresponding to each computing node according to the value evaluation function; The cache weight value corresponding to each cache replica in each computing node is input into the replica scheduling algorithm. When scheduling the computing replica of each data shard, the corresponding cache weight value is used as the priority reference factor for computing node selection; After the replica scheduling algorithm allocates the computational replica of the target data shard to the new computing node, a new cache replica corresponding to the target data shard is constructed on the new computing node; According to a cache preheating strategy preset and associated with the target data shard, a cache data preheating operation is performed on the new cache copy in the new computing node; An incremental data replication mechanism is established between each computing node including the target data shard, and when executing data write involving the target data shard, the write data is incrementally replicated between each cache copy including the target data shard.

2. The distributed cache latency optimization method for multiple computing replicas according to claim 1, wherein The sharding of the data set to be processed to generate multiple data shards includes: Using a hash algorithm to scatter the data set to be processed, and dividing the data set into the multiple data fragments; When generating the multiple data shards, a distribution balancing strategy is used to control the data size of each data shard, ensuring that the computing load of the generated data shards after being distributed among different computing nodes remains balanced, thereby avoiding excessive computing pressure on a single node.

3. A distributed cache latency optimization method for multiple computing replicas according to claim 1, characterized in that The step of creating a computing copy for each data shard on a corresponding computing node and establishing a corresponding cache copy on the computing node where each computing copy is located includes: Based on the scheduling results after sharding, the computing tasks bound to the corresponding data shards are deployed in each scheduling target computing node to generate corresponding computing replicas; When the computing replica is deployed, a cache replica bound to the computing replica is constructed based on the operating environment configuration, task context and data access path of the computing replica in the target computing node.

4. A distributed cache latency optimization method for multiple computing replicas according to claim 1, characterized in that The constructing of a value evaluation function of the cache copy based on the historical existence time segment of the cache copy in each computing node and the time interval between each time segment and the current time point, and generating a cache weight value corresponding to each computing node according to the value evaluation function includes: Collect multiple historical existence time segments of each cache copy in the corresponding computing node, and represent each historical existence time segment as a time interval set consisting of a start time and an end time; For the historical existence time period of the cache copy, calculate the duration of the historical existence time period and the time distance between the end time and the current time point, as the time characteristic parameter of the cache copy; Based on the time characteristic parameter, construct a value evaluation function for the cache copy. The value evaluation function is obtained by integrating the time decay function and the state indication function over the historical time period, and the value score of the cache copy is obtained; Normalize the value score of the cache copy as the cache weight value corresponding to the computing node where the cache copy is located.

5. A distributed cache latency optimization method for multiple computing replicas according to claim 4, characterized in that, The constructing the value evaluation function for the cache copy based on the time characteristic parameter, where the value evaluation function is obtained by integrating the time decay function and the state indication function over the historical time period, and the value score of the cache copy includes: Construct a time decay function for each historical existence time period. The time decay function is used to measure the value weight between any time point in the historical existence time period and the current time point; Define a state indication function in each historical existence time period. The state indication function takes a value of 1 when the cache copy is in an effective existence state at a certain computing node, and takes a value of 0 when the cache copy is invalid or does not exist; Integrate the time decay function and the state indication function over the time period to form an integral expression: Cached copy value score = , where v(x) is a time decay function, g(x) is a state indicator function, x represents a historical time point, t is the start time of the historical existence time period, and 0 is the current time point.

6. A distributed cache latency optimization method for multiple computing replicas according to claim 1, characterized in that The inputting the cache weight value corresponding to each cache copy in each computing node into the replica scheduling algorithm. When scheduling the computing replicas of each data shard, using the corresponding cache weight value as the priority reference factor for computing node selection includes: Collect the cache weight values of all cache copies associated with the data shard to be scheduled in their respective computing nodes, establish the correspondence between the cache copy identifier and the computing node identifier, and extract the cache weight values associated with each computing node; Take the cache weight values of each computing node together with the current processing load index, task queuing waiting time index, and resource utilization rate index of the corresponding computing node as multi-dimensional scheduling factors and input them into the replica scheduling algorithm; According to the comprehensive scoring results of each candidate computing node obtained by the replica scheduling algorithm, select the computing node with the highest comprehensive score in the comprehensive scoring results as the deployment node of the computing replica of the data shard to be scheduled.

7. A distributed cache latency optimization method for multiple computing replicas according to claim 1, characterized in that The performing cache data preheating operation on the new cache copy in the new computing node according to the cache preheating strategy preset in association with the target data shard includes: In the new computing node, based on the loading phase before the start of the computing replica task of the target data shard, parse the parameters of the cache preheating strategy preset in association with the target data shard, and obtain the historical access path, prefetch data block range, and access frequency threshold in the cache preheating strategy; According to the preheating trigger condition and preheating method defined in the cache preheating strategy, schedule the new cache copy for data preheating operation; After completing the data preheating operation, construct the preheating data index and mapping structure of the target data shard.

8. A distributed cache latency optimization system for multiple computing replicas, characterized in that, A distributed cache latency optimization system for multi-computing replicas includes: The sharding module is used to shard the data set to be processed, generating multiple data shards; The replica creation module is used to schedule the data shards to different computing nodes respectively, create computing replicas for each data shard on the corresponding computing nodes, and establish corresponding cache replicas on the computing nodes where each computing replica is located; The construction function module is used to construct a value evaluation function for the cache replicas based on the historical existence time periods of the cache replicas in each computing node and the time intervals from each time period to the current time point, and generate cache weight values corresponding to each computing node according to the value evaluation function; The input module is used to input the cache weight values corresponding to each cache replica in each computing node into the replica scheduling algorithm, and use the corresponding cache weight values as the priority reference factors for computing node selection when scheduling the computing replicas of each data shard; The scheduling module is used to construct a new cache replica corresponding to the target data shard on the new computing node after the replica scheduling algorithm allocates the computing replica of the target data shard to a new computing node; The preheating module is used to perform cache data preheating operations on the new cache replica in the new computing node according to the cache preheating policy preset in association with the target data shard; The incremental replication module is used to establish an incremental data replication mechanism among the computing nodes containing the target data shard, and perform incremental replication of the written data among the cache replicas containing the target data shard when performing data writing involving the target data shard.

Citation Information

Patent Citations

  • Data processing optimization device and method based on distributed system

    CN108182213A

  • Distributed caching system

    CN109491975A

  • Dynamic copy placement method based on improved particle swarm algorithm

    CN111124762A

  • Multi-copy-based task scheduling method and system for edge computing environment

    CN111381950A

  • Dynamic telescopic distribution method based on multi-copy cache

    CN113590039A

Cited By

  • Method for dynamically dividing data into buckets

    CN121560946A