Dynamic scalable data sharing system for serverless machine learning model training

CN117973558BActive Publication Date: 2026-10-23NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410128606.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2026-10-23
Estimated Expiration
2044-01-30

AI Technical Summary

Technical Problem

[0007]发明目的:本发明提供一种适用于 Serverless 机器学习模型训练场景的动态可伸缩的数据共享系统,解决现有技术在领域特定优化、与Serverless平台集成、动态伸缩性方面的不足等问题

Benefits of technology

(1)透明化共享,通过共享数据集描述API,本发明为机器学习模型训练任务提供了一个简单、透明的数据访问方式,使得机器学习模型训练任务更集中于算法本身,而非数据缓存细节。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117973558B_ABST
    Figure CN117973558B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic scalable data sharing system for a serverless machine learning model training, and through key components such as a shared dataset description API, a coordination service device, a data shard routing device, a data shard sharing device and a data sharing SDK, efficient and flexible management of data sharing in a machine learning model training task is realized. A user can create and manage a dataset by using the shared dataset description API, the coordination service device is responsible for the life cycle management of the entire dataset, the data shard routing device provides a data sharing service for a training task, and meanwhile, the dynamic adjustment of a shard range and the number of instances is realized through a dynamic shard tree structure. The data shard sharing device combines a field-specific cache eviction policy, that is, a longest sample distance (LSD), to optimize data caching, so that the sharing efficiency is improved. Through a parallel asynchronous prefetching mechanism, the data sharing SDK improves the data access speed without affecting the normal training process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a dynamically scalable data sharing system for training serverless machine learning models, belonging to the field of software maintenance technology. Background Technology

[0002] Serverless computing, also known as server-agnostic computing, is an emerging cloud computing model that uses functions as the basic unit of computation. This model provides developers with an efficient and concise way to implement business logic. Its core advantages lie in its on-demand usage and maintenance-free nature. Developers only need to focus on the code logic without worrying about the configuration and management of underlying resources. These characteristics make serverless computing a key trend in future cloud application development.

[0003] Serverless machine learning model training is a natural application of serverless computing, referring to the task of training machine learning models in a serverless environment. Compared to traditional machine learning model training service clusters, its main advantage lies in the ability to use GPU computing resources on demand. This not only reduces upfront server and graphics card purchase costs but also allows for flexible scaling as business needs grow. It is a highly attractive solution for small and medium-sized enterprises (SMEs) with limited resources or those seeking agile responses to market changes.

[0004] However, migrating machine learning model training tasks to a serverless environment also presents several challenges. One significant challenge is that serverless machine learning model training often employs a compute-in-deposit architecture—storing the dataset in a remote object storage service (such as S3) and dynamically retrieving metadata and training samples during training—resulting in slow data access during the training process. Furthermore, existing object storage services are not specifically optimized for machine learning model training scenarios.

[0005] Another challenge lies in the distributed nature of serverless machine learning model training and the need for on-demand use.

[0006] Some existing works utilize middleware services such as Redis and Memcached to provide caching services for serverless applications. However, these solutions do not fully consider the specific load characteristics of machine learning model training, such as the predictability of random sampling sequences, resulting in low data sharing efficiency. Other works have designed data sharing mechanisms for traditional machine learning model training service clusters and performed underlying optimizations for the cluster. However, these solutions do not consider the characteristics of serverless platforms, such as on-demand function allocation, a large number of instances, and uneven data access hotspots, and therefore cannot be effectively applied on serverless platforms. Summary of the Invention

[0007] Objective: This invention provides a dynamically scalable data sharing system suitable for serverless machine learning model training scenarios, addressing shortcomings in existing technologies regarding domain-specific optimization, integration with serverless platforms, and dynamic scalability. By designing a shared dataset description API, this invention achieves standardized modeling of the dataset to be shared, providing an efficient and unified dataset access interface for machine learning model training tasks. This invention implements a data sharing service based on dataset sharding caching, a domain-specific cache eviction policy (Longest Sample Distance, LSD), and a parallel asynchronous prefetching mechanism to improve data accessibility and sharing efficiency. Simultaneously, it can automatically deduce future data access needs based on the predictability of random sampling sequences in machine learning model training tasks, and, combined with actual data access conditions, statistical access indicators, and a dynamic sharding tree structure to intelligently adjust the number of data sharing shards. This flexible adjustment capability allows the data sharing service to dynamically scale up and down, greatly improving the overall resource utilization efficiency of the system. While ensuring reasonable resource utilization, this system effectively promotes data sharing rates between different training tasks and improves the data loading speed of training functions.

[0008] Technical solution: A dynamically scalable data sharing system for training serverless machine learning models, comprising the following: (1) Design a shared dataset description API for creating, using, and destroying shared datasets. When creating a dataset, specify the metadata and data sample information; when using a dataset, specify the access method, including whether random sampling is required and the data batch size.

[0009] (2) The coordination service device manages the entire lifecycle of the shared dataset, including the creation, sharing, and destruction of the dataset. When a dataset needs to be shared, the device creates an instance of the data sharding routing device as needed.

[0010] (3) Through the data sharding routing device, a data sharing service for a specified dataset is provided for multiple training functions. Based on the data access situation of the system, a dynamic sharding tree structure is maintained, and the sharding range and number of instances of the data sharding sharing device are controlled, thereby realizing flexible dynamic scaling.

[0011] (4) By using the data sharding and sharing device, according to the set sharding range and combined with the domain-specific cache eviction policy Longest Sampling Distance (LDU), a portion of a specific dataset is cached to provide shared data within the sharding range for the training function.

[0012] (5) Provide a data sharing SDK. The training function establishes a connection with the data sharing system through the SDK and uses the data sharing service of the specified dataset. With the help of a parallel asynchronous data prefetching mechanism, the required data is prefetched in batches from the data sharing system, while ensuring that this process does not interfere with the normal training process.

[0013] This invention is independent of specific serverless platforms, machine learning model training frameworks, and machine learning model training tasks. It does not modify the underlying runtime and scheduler of serverless platforms, and has good compatibility and versatility.

[0014] Data sharing systems can intelligently cache data metadata and samples based on the characteristics of training tasks, sharing these cached datasets across multiple machine learning model training tasks. This accelerates the data loading process and reduces training time, enabling more efficient and cost-effective machine learning model training in serverless environments.

[0015] In (1), the shared dataset description API specifically includes: (11) A shared dataset creation API is used to register relevant information for shared datasets, such as dataset ID, metadata of data samples and labels, and access address of the dataset's remote object storage service. This information is stored in a persistent database to ensure data security and persistence.

[0016] (12) The API for shared datasets allows you to specify the shared dataset ID to access related information, such as the length of the dataset, which is crucial for building local stub datasets. In addition, the API provides access addresses for data sharding routing devices to facilitate subsequent data access.

[0017] (13) Shared Dataset Destruction API: The destruction process is initialized by specifying the shared dataset ID. During this process, the dataset to be destroyed is added to the waiting queue and marked as soft-deleted, making it no longer available for new training tasks. Once all training functions using the dataset have finished executing, the system will destroy the data shard sharing device and the data shard routing device in sequence.

[0018] Specifically, (2) includes: (21) The coordination service device provides remote procedure call services based on the API description designed in (1), and exposes the service interface for the creation, destruction and sharing of datasets.

[0019] (22) When the training function requests access to a specific dataset, the coordination service device performs a check. If a corresponding data sharding routing device already exists, the system returns the entry address of the data sharding routing device to the training function; if it does not exist, the system creates a new data sharding routing device instance.

[0020] (23) When creating a new data sharding routing device instance, the relevant information of the shared dataset is passed to the data sharding routing device and started. Once the data sharding routing device is started successfully, its entry address is returned to the training function for access to the dataset.

[0021] Specifically, (3) includes: (31) The data sharding routing device provides a data sharing service for a specified dataset for multiple training functions in Serverless, and manages a group of data sharding sharing device instances, saving the unique identifier, network access address, and managed sharding range of each data sharding sharing device instance.

[0022] (32) Each time the training function needs to traverse a randomly shuffled dataset, the data sharding routing device creates a data reading task and generates a random sampling sequence that satisfies independent and identically distributed characteristics in advance. A random sampling sequence is an array, where each element represents an access key for a data sample.

[0023] (33) Communicate with the data sharding and sharing device instance periodically to obtain data access indicator information, such as cache hit rate and high hot data range information.

[0024] (34) Combining the information in (32) and (33), construct a dynamic segmentation tree.

[0025] (35) Use the information on the sharding range and the number of instances on the dynamic sharding tree to adjust the sharding range and the number of instances of the data sharding sharing device.

[0026] Specifically, (34) includes: (341) A dynamic sharded tree is a memory-based binary tree data structure, similar to a segment tree, with range update and query functions. Each tree corresponds to a dataset and records all the sharding information of that dataset. The tree contains two types of nodes: leaf nodes and intermediate nodes.

[0027] (342) Each leaf node represents a specific data shard range and corresponds to a data shard sharing device instance. The node contains various important information, such as the count of data to be accessed and data that has been accessed, a list of task IDs, and the number of shard instances.

[0028] (343) Intermediate nodes represent a virtual data partition range, mainly used to summarize and query statistical information about data access. Their child elements can be leaf nodes or intermediate nodes.

[0029] (344) The dynamic sharding tree can automatically merge and split leaf nodes based on data access statistics to flexibly adjust the data sharding range. In addition, the tree structure also supports adjusting the number of leaf node instances as needed.

[0030] (345) Node merging and splitting are performed dynamically based on cache hit rate. For example, when the cache hit rate of a leaf node drops below a set threshold Tl, the system will split the node into two new leaf nodes and create a new intermediate node as their parent node. Conversely, if the cache hit rate of the child nodes (all leaf nodes) of an intermediate node exceeds another set threshold Th, the two child nodes will be merged into a new leaf node, and its sharding range is the merge of the original two leaf nodes.

[0031] (346) The number of leaf node instances will be linearly adjusted according to the number of data reading tasks. The adjustment formula is N=RT, where N is the number of leaf node instances, T is the number of data reading tasks, and the proportional parameter R is an adjustable parameter of the system, which is specified in the initialization configuration of the data sharding routing device.

[0032] Specifically, (4) includes: (41) Initialize according to the configuration, which includes dataset ID, dataset access address (such as S3 service address), continuous data shard range and cache size.

[0033] (42) Periodically communicate with the data sharding routing device instance to upload data access metrics, such as cache hit rate and high hotspot data range information. At the same time, when a new data reading task is created or an old data reading task is completed, it also receives random sampling sequence information about the task.

[0034] (42) Initialize a fixed-size cache using configuration and adopt a cache eviction policy based on the longest sample distance (LSD).

[0035] (43) Upon receiving a data request, the device ensures that the requested sample is within the data fragment range and then checks the local cache. If the required data is already in the cache, the data is provided directly; otherwise, the data is retrieved from the dataset. Subsequently, based on the caching policy, it is decided whether to add the data to the cache or whether to evict existing data in the cache and add new data to the cache. Finally, the data is provided to the requester.

[0036] The longest sampling distance caching strategy in (42) specifically includes: (421) The core of the longest sampling distance caching strategy is to prioritize the eviction of cache items with the longest expected sampling distance in the future. Furthermore, if the predicted sampling distance of a data item to be added exceeds the maximum sampling distance of all items in the current cache, then this data item will not be added to the cache.

[0037] (422) The sampling distance is calculated based on the random sampling sequence of the tasks. Specifically, it is calculated by taking the weighted average of the positions of cache item K in the random sampling sequences of all tasks. For example, if cache item K appears at position 2 in the random sampling sequence of task 1 and at position 10 in task 2, then the sampling distance of K is calculated as (2 + 10) / 2 = 6. This value reflects the probability and urgency of the cache item being accessed in the future.

[0038] Specifically, (5) includes: (51) The training function uses the data sharing SDK (SDK for short) to specify the address of the coordination service device and the ID of the dataset to be shared, and calls the shared dataset usage API designed in (12). The training function then waits for the coordination service device to return detailed information about the dataset and the access address of the data sharding routing device.

[0039] (52) Based on the address obtained in (51), the training function establishes a connection with the data sharding routing device through the SDK, passes the data batch size parameter, and issues a request to "start reading the dataset". The training function waits for the device to return a "start reading the dataset" response.

[0040] (53) Throughout the training period, the SDK asynchronously and in parallel prefetches data of batch size N in a single thread (where N is the prefetch parameter, which can be set by the code).

[0041] (54) After completing a round of data reading, the SDK will receive a "data reading finished" response from the data sharding routing device.

[0042] Specifically, (53) includes: (531) Before each prefetch, the SDK sends a "Prefetch Request" to the data sharding routing device and receives a "Prefetch Response". The response includes the sharding range of the dataset, the access address of the corresponding data sharding sharing device, and a random sampling sequence of the data to be prefetched. This sequence is an array, where each element represents the access key of a data sample, and the sampling follows the principle of independent and identically distributed sampling.

[0043] (532) The SDK uses the dataset sharding range information to traverse the array of random sampling sequences of the data to be prefetched, thereby establishing a grouping table. The grouping table is a mapping table with the data sharding sharing device instance ID as the key and the array of data sample access keys as the value. The SDK traverses the array of random sampling sequences, and according to the access key of each data sample, queries the corresponding data sharding sharing device instance ID from the data sharding range information, and then inserts it into the grouping table. Subsequently, the SDK initiates "data access requests" in parallel to the corresponding data sharding sharing devices according to the grouping table, and waits for all sharded data to be returned.

[0044] (533) Once all data results are returned, the SDK will send a "prefetch end request" to the data sharding routing device. Then, the SDK will reorder the response data according to the random sampling sequence and finally deliver it to the training thread for use through inter-thread shared memory.

[0045] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a dynamically scalable data sharing system for training serverless machine learning models as described above.

[0046] A computer-readable storage medium storing a computer program that performs the dynamically scalable data sharing system for training a serverless machine learning model as described above.

[0047] Beneficial effects: Compared with existing technical solutions, the present invention has the following advantages: (1) Transparent sharing: By sharing the dataset description API, this invention provides a simple and transparent data access method for machine learning model training tasks, making machine learning model training tasks more focused on the algorithm itself rather than data caching details.

[0048] (2) High efficiency: By utilizing the characteristics of the sampling sequence trained by the machine learning model to construct a domain-specific data sharing mechanism, combined with parallel asynchronous data prefetching technology, the speed of data loading and processing is improved and the training latency is reduced.

[0049] (3) Dynamic scalability: Through intelligent data sharding and caching strategies, this system can dynamically adjust resources according to task requirements, realize automatic scaling up and down, significantly improve the system's flexibility and efficiency, and adapt to Serverless scenarios.

[0050] (4) Easy to integrate and expand. The designed system architecture and components are easy to integrate with existing serverless platforms and have good scalability, which can support the development of future technologies and new needs. Attached Figure Description

[0051] Figure 1 This is an overall execution flowchart of an embodiment of the present invention; Figure 2 This is a system architecture and workflow diagram of the devices in an embodiment of the present invention. Detailed Implementation

[0052] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0053] Design a data sharing system that intelligently caches metadata and samples based on the characteristics of the training task, sharing these cached datasets across multiple machine learning model training tasks. This accelerates the data loading process and reduces training time. The system should enable more efficient and cost-effective machine learning model training in a serverless environment.

[0054] Figure 1 The overall execution flowchart of an embodiment of the present invention is described, illustrating how developers can utilize the dynamically scalable data sharing system proposed in this invention to optimize data loading time during training when writing Serverless machine learning model training applications, including the following: (1) Users create a dataset D1 to be shared through the shared dataset creation API.

[0055] (2) In the training function code, the user uses the data sharing SDK to write the data loading related code and specifies that dataset D1 should be used. The data sharing SDK sends a request to the coordination service device to use dataset D1 and waits for a response.

[0056] (3) When the coordination service device receives the D1 dataset usage request, it creates the corresponding data sharding routing device instance.

[0057] (4) The data sharing SDK sends a data start reading request to the data fragmentation routing device and waits for a response.

[0058] (5) The data sharding routing device initializes the data reading tasks, generates a random sampling sequence for each data reading task, and updates the dynamic sharding tree structure. Based on the structure of the dynamic sharding tree, the number of data sharding sharing device instances in the cluster is dynamically controlled.

[0059] (6) The data sharing SDK sends a data prefetch request to the data fragmentation routing device and receives a response.

[0060] (7) The data sharing SDK sends data access requests to the data sharding and sharing device in parallel.

[0061] (8) The data sharing SDK reassembles the data access results according to the random sampling sequence and passes the data results to the training thread.

[0062] Figure 2 A system architecture diagram of an embodiment of the present invention is described. The objects involved in the diagram include multiple training functions in a serverless environment, a coordination service device in a data sharing system, a data sharding routing device, a data sharding sharing device group (multiple data sharding sharing devices for the same dataset), and a dynamic sharding tree. These objects are described below.

[0063] (1) Training functions: Independent units that perform specific machine learning model training tasks. These functions can run in parallel, are independent of each other, and can be flexibly expanded to adapt to different computational needs. Each training function can access the shared dataset as needed to perform data processing and model training.

[0064] (2) Coordination Service Unit: Responsible for managing the data flow of the entire system and coordinating access requests for training functions. It dynamically creates and manages data sharding routing units, maintains the metadata of the dataset, and handles the lifecycle of the shared dataset, including its creation, use, and destruction.

[0065] (3) Data Sharding Routing Device: Responsible for routing the "data access request" of the training function to the correct data sharding sharing device. Based on the current data loading task and data access metrics, it constructs a dynamic sharding tree to dynamically adjust the range of data shards and modifies the number of data sharding sharing device instances in the cluster.

[0066] (4) Data Sharding and Sharing Devices: These devices provide services for different data shards of the same dataset. Each data shard sharing device is responsible for storing and managing a portion of the dataset to support efficient data access and processing. These data shard sharing devices improve data accessibility and sharing efficiency through caching mechanisms and data prefetching strategies.

[0067] (5) Dynamic sharding tree: A special data structure managed by the data sharding routing device, used to dynamically manage the range and number of data shards for a dataset. The dynamic sharding tree can automatically adjust according to the sampling sequence of the training task, access hotspots, etc., to optimize data caching and access, thereby improving the overall performance and resource utilization of the system. Figure 2 The detailed execution flow of the embodiments of the present invention is described, and the steps include: (1) The training function requests the dataset from the coordination service device through the data sharing SDK.

[0068] (2) The coordination service device creates a data fragment routing device to manage the dataset.

[0069] (3) The training function requests the data sharding routing device to start reading data through the data sharing SDK.

[0070] (4) The data sharding routing device creates a data loading task and constructs a dynamic sharding tree, thereby controlling the number of data sharding sharing device instances.

[0071] (5) The training function requests data prefetching information from the data sharding routing device through the data sharing SDK.

[0072] (6) The training function sends “data access requests” to multiple data shard sharing devices in parallel based on the obtained data prefetch information and shard information. The request specifies the access key of the data sample in the dataset. The data shard sharing device uses the access key to query the corresponding sample data from its cache and returns it to the training function.

[0073] It is obvious to those skilled in the art that the systems and methods of the embodiments of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular combination of hardware and software.

Claims

1. A dynamically scalable data sharing system for training serverless machine learning models, characterized in that, Includes the following: (1) Design a shared dataset description API for creating, using, and destroying shared datasets, specifying the metadata and data sample information of the dataset when creating it, and specifying the access method of the dataset when using it; (2) Manage the entire lifecycle of the shared dataset through the coordination service device, including the creation, sharing and destruction of the dataset, and create instances of the data sharding routing device as needed to support dataset sharing; (3) Through the data sharding routing device, provide data sharing services for multiple training functions with specified datasets, maintain the dynamic sharding tree structure according to the data access situation of the system, control the sharding range and number of instances of the data sharding sharing device, thereby realizing dynamic expansion and contraction; (4) Through the data sharding and sharing device, according to the set sharding range and the domain cache eviction policy, a part of the dataset is cached to provide shared data within the sharding range for the training function; (5) Provide a data sharing SDK so that the training function can establish a connection with the data sharing system through the SDK and use the parallel asynchronous data prefetching mechanism to prefetch the required data in batches from the data sharing system; Specifically, (3) includes: (31) Data sharding routing device provides data sharing services for multiple training functions in Serverless with a specified dataset, and manages data sharding sharing device instances and maintains the routing status of these instances; (32) When the training function needs to traverse the randomly shuffled dataset, the data sharding routing device creates a data reading task and generates an independent and identically distributed random sampling sequence, which is in the form of an array, where each element represents an access key for a data sample; (33) Communicate with the data sharding and sharing device instance periodically to obtain data access indicators, including cache hit rate and high hot data range information; (34) Construct a dynamic sharding tree to adjust the data sharding range and the number of instances; In (34), the dynamic piecewise tree structure specifically includes: (341) The dynamic sharding tree is a binary tree structure in memory, similar to a segment tree, with interval update and query functions. Each tree represents a dataset, records all sharding information, and includes two types: leaf nodes and intermediate nodes. (342) Each leaf node represents a data shard range and corresponds to a data shard sharing device instance; the node contains the count of data to be accessed and data already accessed, a list of task IDs, and information on the number of shard instances; (343) Intermediate nodes represent virtual data fragmentation ranges, used to summarize and query statistical information about data access. The child elements of intermediate nodes are leaf nodes or intermediate nodes. (344) The dynamic sharding tree automatically merges and splits leaf nodes based on the statistical information of data access, adjusts the data sharding range, and supports adjusting the number of leaf node instances as needed. (345) The merging and splitting of nodes are dynamically performed based on the cache hit rate. If the cache hit rate of a leaf node is lower than the threshold Tl, it is split into two new leaf nodes and a new intermediate node is created as the parent node. If the cache hit rate of the child node of the intermediate node exceeds the threshold Th, the child nodes are merged. (346) The number of leaf node instances is linearly adjusted according to the number of data reading tasks.

2. The dynamically scalable data sharing system for training serverless machine learning models according to claim 1, characterized in that, In (1), the shared dataset description API specifically includes: (11) Shared dataset creation API, used to register the corresponding information of the shared dataset, including dataset ID, metadata of data samples and labels, and access address of the dataset's remote object storage service; (12) The shared dataset uses an API that allows access to related information by specifying the shared dataset ID, including the length of the dataset and the access address of the data sharding routing device; (13) Shared dataset destruction API: The destruction process is initialized by specifying the shared dataset ID. During this process, the dataset to be destroyed is added to the waiting queue and marked as soft deletion. The system destroys the data shard sharing device and the data shard routing device after all the training functions in use have been executed.

3. The dynamically scalable data sharing system for training serverless machine learning models according to claim 1, characterized in that, Specifically, (2) includes: (21) The coordination service device provides remote procedure call services based on the API description designed in (1), and exposes the service interfaces for the creation, destruction and sharing of datasets; (22) When the training function requests access to a specific dataset, the coordination service device checks; if a corresponding data sharding routing device already exists, the system returns the entry address of the data sharding routing device to the training function; if it does not exist, the system creates a new data sharding routing device instance. (23) When creating a new data sharding routing device instance, the relevant information of the shared dataset is passed to the data sharding routing device and started; once the data sharding routing device is started successfully, the entry address of the data sharding routing device is returned to the training function so that the dataset can be accessed.

4. The dynamically scalable data sharing system for training serverless machine learning models according to claim 1, characterized in that, (4) By using the data sharding and sharing device, a portion of the dataset is cached according to the set sharding range and the longest sampling distance of the domain cache eviction policy, so as to provide shared data within the sharding range for the training function; Specifically, (4) includes: (41) Initialize the data sharding and sharing device according to the configuration, which includes dataset ID, dataset access address, continuous data shard range and cache size parameter; (42) The data fragmentation and sharing device communicates with the data fragmentation routing device instance periodically, uploads data access indicators, including cache hit rate and high hot data range information, and receives random sampling sequence information about newly created or completed data reading tasks; (43) The data fragmentation and sharing device uses the longest sampling distance cache eviction policy to manage a fixed-size cache; (44) When faced with a data request, the data sharding and sharing device first confirms whether the requested sample is within the data sharding range, and then checks the local cache; if the data is in the cache, it is provided directly; if not, it is retrieved from the dataset and the cache is updated based on the longest sampling distance strategy.

5. The dynamically scalable data sharing system for serverless machine learning model training according to claim 4, characterized in that, The longest sampling distance caching strategy in (43) specifically includes: (421) In the longest sampling distance caching strategy, the cached item with the longest expected sampling distance in the future is preferentially eliminated, and if the predicted sampling distance of the data item to be added exceeds the maximum sampling distance of all items in the cache, the data item is not added. (422) Calculate the sampling distance based on the random sampling sequence of the task. The calculation method is to take the weighted average of the positions of the cached items in all task sequences to reflect the probability and urgency of the cached items being accessed.

6. The dynamically scalable data sharing system for training serverless machine learning models according to claim 1, characterized in that, Specifically, (5) includes: (51) Data sharing SDK, used to establish a connection between the training function and the data sharing system to realize data sharing services for a specified dataset; (52) A parallel asynchronous data prefetching mechanism, implemented through the SDK, is used to prefetch the required data in batches from the data sharing system; (53) During the training process, the training function uses the SDK to specify the address of the coordination service device and the ID of the dataset to be shared, calls the API of the shared dataset through the SDK, and waits for the returned dataset details and the access address of the data sharding routing device. (54) Before each prefetch, the SDK sends a prefetch preparation request to the data fragment routing device and receives a prefetch preparation response containing the dataset fragment range, the access address of the corresponding data fragment sharing device, and the random sampling sequence of the data to be prefetched. (55) The SDK extracts the data sample access key array according to the sampling sequence, groups it according to the dataset shard range, and sends "data access requests" to each data shard sharing device in parallel, waiting for all shard data to be returned; (56) After all data results are returned, the SDK sends a prefetch end request to the data sharding routing device, then reorders the response data according to the random sampling sequence, and delivers it to the training thread through inter-thread shared memory; (57) After completing a round of data set reading, the SDK receives the data end reading response sent by the data fragmentation routing device.

7. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a dynamically scalable data sharing system for serverless machine learning model training scenarios as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that executes a dynamically scalable data sharing system for serverless machine learning model training scenarios as described in any one of claims 1-6.