Mirror image management method and device, electronic equipment and computer program product
By obtaining network and node load data in image management and uploading image shards dynamically and in parallel, the problem of low image upload storage efficiency is solved, and efficient resource utilization and deployment efficiency are achieved.
Patent Information
- Application Number
- CN202510811235.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-26
AI Technical Summary
Existing image management technology suffers from low upload efficiency and low storage resource utilization when uploading and storing large AI models. This leads to system performance bottlenecks and high costs, especially in cases of load imbalance and limited resources.
By obtaining the network load data of the storage node cluster, dynamically sharding the image and uploading it to the storage node cluster, optimizing the sharding strategy by combining hash similarity and node load data, and utilizing the parallel upload and caching mechanism to select the best storage node for storage and deployment of the image shards.
It improves image upload efficiency and storage resource utilization, optimizes system performance and scalability, and reduces overall operation and maintenance costs.
Smart Images

Figure CN120704879A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud and edge computing, and more specifically, to a mirror management method, device, electronic device, and computer program product. Background Art
[0002] With the development of cloud computing technology, in large-scale artificial intelligence (AI) computing scenarios, cloud platforms are widely used for AI model training and inference by leveraging their powerful computing capabilities and flexibility. Cloud platform deployment modes are mainly divided into virtual machine mode and bare metal mode. The bare metal mode has gradually become the first choice for AI training and inference applications because it provides direct access to physical hardware and higher performance.
[0003] In existing cloud platforms, image management is a critical step in AI model deployment. Glance components can be used to register, query, upload, and download images. However, traditional image management technologies present multiple challenges when handling large AI models, limiting the performance and efficiency of cloud platforms. First, traditional image upload and download rely primarily on a single channel. While simple to implement, this approach is limited by the network bandwidth and server processing power of a single channel. In resource-intensive AI applications, uploading and downloading large AI model images is extremely slow, creating a significant performance bottleneck that severely impacts user experience and AI model deployment efficiency. Second, existing image storage strategies suffer from uneven load distribution across storage nodes. Some nodes become overloaded due to frequent access, while others may be idle. This load imbalance not only wastes storage resources but can also become a performance bottleneck, limiting image processing efficiency. Finally, traditional image management architectures often require expensive hardware upgrades and capacity expansions to meet increased data processing and transmission requirements when the system scales rapidly. This architectural design not only increases costs but also limits the system's long-term scalability and adaptability.
[0004] To solve the above problems, related technologies have adopted object storage fragment upload technology for improvement, dividing large files into multiple small blocks and uploading them concurrently to the object storage service through the transmission protocol. This method has improved the upload speed to a certain extent, but there is still a performance bottleneck in the integration stage when the storage backend resources are limited.
[0005] Regarding the technical problems of low upload efficiency and low storage resource utilization when uploading and storing images in related technologies, no effective solution has been proposed yet. Summary of the Invention
[0006] The main purpose of this application is to provide a mirror management method, device, electronic device and computer program product to solve the technical problems of low upload efficiency and low storage resource utilization when uploading and storing mirrors in related technologies.
[0007] To achieve the above-mentioned objectives, according to one aspect of the present application, a method for managing an image is provided. The method comprises: obtaining network load data of a storage node cluster, sharding the image to be deployed according to the network load data to obtain N image shards, and uploading the N image shards to the storage node cluster, wherein the image to be deployed is extracted from an image upload request, the image to be deployed refers to the file required to deploy a preset model, and N is a positive integer; upon receiving a server deployment request, extracting N image shards from the storage node cluster according to the server deployment request, and forming an image file from the N image shards; loading the image file, and deploying the preset model to the target area.
[0008] Furthermore, sharding the image to be deployed according to the network load data to obtain N image shards includes: extracting network status data and bandwidth data from the network load data, and extracting the deployment time period from the image upload request; determining the network connection data according to the network status data, calculating the ratio of the deployment time period to the network connection data to obtain the deployment ratio, calculating the product of the bandwidth data and the deployment ratio to obtain the initial number of shards; obtaining the image memory data of the image to be deployed, and determining the shard lower limit and the shard upper limit according to the image memory data; comparing the initial number of shards with the shard lower limit and the shard upper limit respectively to obtain a comparison result, and determining a sharding strategy according to the comparison result; sharding the image to be deployed based on the sharding strategy to obtain N image shards.
[0009] Furthermore, uploading N mirror shards to the storage node cluster includes: obtaining mirror memory data of the image to be deployed, extracting a concurrency limit threshold from network load data, wherein the concurrency limit threshold includes a concurrency upper limit value and a concurrency lower limit value; calculating the ratio of the mirror memory data to N to obtain an initial concurrency number, comparing the initial concurrency number with the concurrency upper limit value and the concurrency lower limit value respectively to obtain a target concurrency number; and executing the step of uploading N mirror shards to the storage node cluster based on the target concurrency number.
[0010] Furthermore, before uploading the N mirror shards to the storage node cluster, the method further includes: extracting Y cache mirror shards from a preset cache area, calculating a hash value of each mirror shard to obtain N mirror hash values, and calculating a hash value of each cache mirror shard to obtain Y cache mirror hash values, where Y is a positive integer; calculating the similarity between each mirror hash value and the Y cache mirror hash values to obtain N groups of hash similarity sets, and judging whether there is a cache mirror shard whose hash similarity is greater than a preset threshold based on each group of hash similarity sets, where each group of hash similarities includes Y hash similarities. ; If there are no cache mirror shards whose hash similarity is greater than the preset threshold, perform the step of uploading N mirror shards to the storage node cluster; if there are cache mirror shards whose hash similarity is greater than the preset threshold, extract Q target cache mirror shards from the preset cache area, wherein Q target cache mirror shards refer to cache mirror shards whose hash similarity is greater than the preset threshold, Q is less than or equal to Y, and Q is a positive integer; extract mirror shards that are not related to the Q target cache mirror shards from the N mirror shards to obtain NQ mirror shards, and upload the NQ mirror shards to the storage node cluster.
[0011] Furthermore, uploading N mirror shards to the storage node cluster includes: obtaining node load data of M storage nodes in the storage node cluster to obtain M node load data, wherein each node load data includes at least one of the following: geographic location, network delay data, performance parameters, and input and output load data, and M is a positive integer; obtaining load weight, performing weighted calculation on each storage node based on the load weight and each node load data to obtain M node scores; sorting the M storage nodes in descending order according to the M node scores to obtain a node arrangement, and uploading the N mirror shards to the M storage nodes based on the node arrangement.
[0012] Furthermore, N image shards are extracted from the storage node cluster according to the server deployment request, and the image file is formed by the N image shards, including: determining the deployment requirements and the bare metal cluster to be deployed according to the server deployment request, wherein the bare metal cluster includes K bare metal nodes, and K is a positive integer; calculating the network distance between each bare metal node and M storage nodes in the storage node cluster to obtain K groups of network distances, and determining the storage node associated with each bare metal node according to each group of network distances; controlling each bare metal node to extract image shards from the storage node associated with each bare metal node, and forming the image file according to the extracted image shards.
[0013] Furthermore, controlling each bare metal node to extract image shards from the storage node associated with each bare metal node includes: obtaining status data of K bare metal nodes in the bare metal cluster to obtain K bare metal node data, wherein each bare metal node data at least includes network bandwidth data and latency data; determining the transmission protocol of each bare metal node according to deployment requirements and each bare metal node data, and executing the step of extracting image shards from the storage node associated with each bare metal node according to each transmission protocol.
[0014] To achieve the above-mentioned object, according to another aspect of the present application, a mirror management system is provided. The system includes: a user interaction layer, connected to the intelligent scheduling layer through a programming interface, configured to receive an image upload request, extract the image to be deployed from the image upload request, and forward the image to be deployed to the intelligent scheduling layer, wherein the image to be deployed refers to a file required for deploying a preset model; the intelligent scheduling layer, establishing two-way communication with the distributed storage layer and the server node layer, configured to obtain network load data of the storage node cluster in the distributed storage layer when receiving the image to be deployed, shard the image to be deployed according to the network load data to obtain N image shards, and send the N image shards to the distributed storage layer, wherein N is a positive integer; the distributed storage layer, configured to upload the N image shards to the storage node cluster; and the server node layer, performing data transmission with the server node layer, configured to extract N image shards from the distributed storage layer according to the server deployment request when receiving a server deployment request, form an image file from the N image shards, load the image file, and deploy the preset model to a target area.
[0015] To achieve the above-mentioned purpose, according to another aspect of the present application, a mirror management device is provided. The device includes: an acquisition unit, configured to acquire network load data of a storage node cluster, shard the image to be deployed according to the network load data to obtain N image shards, and upload the N image shards to the storage node cluster, wherein the image to be deployed is extracted from an image upload request, the image to be deployed refers to the file required to deploy a preset model, and N is a positive integer; a first extraction unit, configured to extract N image shards from the storage node cluster according to the server deployment request upon receiving a server deployment request, and the N image shards constitute an image file; and a loading unit, configured to load the image file and deploy the preset model to a target area.
[0016] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which includes a stored executable program, wherein when the executable program runs, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned image management methods.
[0017] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory stores an executable program, and the processor is used to run the program, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any of the above-mentioned mirror management methods.
[0018] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned image management methods is implemented.
[0019] In an embodiment of the present application, a mirror management method is adopted. By obtaining the network load data of the storage node cluster, the image to be deployed is fragmented according to the network load data to obtain N mirror fragments, and the N mirror fragments are uploaded to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, and the image to be deployed refers to the file required for deploying the preset model, and N is a positive integer; when a server deployment request is received, N mirror fragments are extracted from the storage node cluster according to the server deployment request, and the image file is composed of N mirror fragments; the image file is loaded, and the preset model is deployed to the target area, which solves the technical problems of low upload efficiency and low storage resource utilization when uploading and storing images in the related art. By fragmenting the image to be deployed according to the network load data of the storage node cluster, uploading the image fragments to the storage node cluster, and extracting the image fragments from the storage node cluster according to the server deployment request when a server deployment request is received, the image file composed of the image fragments is loaded and deployed, thereby achieving the technical effect of improving image upload efficiency and deployment efficiency and improving storage resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0021] Figure 1 The present invention is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a mirror management method;
[0022] Figure 2 This is a flowchart of a mirror management method provided in accordance with an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of the historical image management method provided by the embodiment of the present application. Figure 1 ;
[0024] Figure 4This is a schematic diagram of the historical image management method provided by the embodiment of the present application. Figure 2 ;
[0025] Figure 5 Schematic diagram of a method for uploading image fragments according to an embodiment of the present application;
[0026] Figure 6 is a schematic diagram of a mirror management system provided according to an embodiment of the present application;
[0027] Figure 7 Schematic diagram of a method for slicing an image file according to an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of a bare metal deployment method provided according to an embodiment of the present application;
[0029] Figure 9 is a schematic diagram of an image management method applied to an image management system according to an embodiment of the present application;
[0030] Figure 10 is a schematic diagram of a mirror management device provided according to an embodiment of the present application;
[0031] Figure 11 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0035] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse use.
[0036] Example 1
[0037] According to an embodiment of the present application, an embodiment of a method for managing an image is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 It is a hardware structure diagram of a computer terminal (or mobile device) for implementing a mirror management method, such as Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more ( Figure 1 The computer system 102 includes a processor 102 (the processor 102 may include but is not limited to a microcontroller unit (MCU) or a programmable logic device (FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, the computer system 102 may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS), a network interface, a keyboard, a cursor control device, a power supply, and / or a camera. It will be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0039] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0040] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the mirror management method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned mirror management method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0041] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC) and a network interface, which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0042] The display may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0043] Under the above operating environment, this application provides Figure 2 The management method of the image shown. Figure 2 Flowchart of the mirror management method provided in accordance with the embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:
[0044] Step S201, obtain the network load data of the storage node cluster, slice the image to be deployed according to the network load data, obtain N image slices, and upload the N image slices to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, the image to be deployed refers to the file required to deploy the preset model, and N is a positive integer.
[0045] It should be noted that the preset model can be an AI (Artificial Intelligence) model. The image refers to a file or data set that contains a complete operating environment. The image can provide a standardized and encapsulated operating environment, thereby realizing the creation of virtual machines, artificial intelligence models or containers. For example, when it is necessary to quickly deploy and run an AI model on a server, the AI model image can be used for operation. At this time, the image contains the model's weights, architecture definition, dependency libraries and other necessary operating environments.
[0046] Traditional image management technology mainly adopts a single channel upload and download mode. Figure 3 This is a schematic diagram of the historical image management method provided by the embodiment of the present application. Figure 1 ,like Figure 3 As shown in the figure, users can upload or download image files through the Glance API (Glance Application Programming Interface). The Glance server receives the entire file and stores it in the backend storage system (such as the local file system, Swift object storage system, Ceph storage, etc.) through a single storage channel. When the image needs to be used, the entire image file is downloaded from the storage system through the same path. Although this method is simple to implement, its performance is limited by the bandwidth and processing power of a single channel. To solve the above problems, Figure 4 This is a schematic diagram of the historical image management method provided by the embodiment of the present application. Figure 2 ,like Figure 4As shown, it is necessary to split the large image file into multiple fragments, and then upload them concurrently to some storage blocks in the object storage service via HTTP (HyperText Transfer Protocol). Although this method can improve the upload speed to a certain extent, it still has a performance bottleneck in the integration stage when the storage backend resources are limited. In addition, in terms of bare metal deployment, related technologies mainly use TFTP (Trivial File Transfer Protocol) or HTTP to download the image from a single image storage server, that is, the bare metal node is first booted and started through PXE (Preboot eXecution Environment), and then the initialization environment is loaded, and then the complete image is downloaded from the storage server via TFTP or HTTP protocol. However, this method is prone to network congestion and excessive storage server load in large-scale deployment scenarios.
[0047] Therefore, in order to solve the above problems, first, after receiving the image upload request, the network load data of the storage node cluster in the distributed storage system can be obtained, and the image to be deployed, which represents the complete set of files that need to be uploaded when deploying the preset model, can be extracted from the image upload request. Then, the above network load data is used to dynamically adjust the shards of the image to be deployed to obtain multiple image shards, and upload them to different storage nodes in the storage node cluster to ensure that the upload process can fully utilize network resources while avoiding overload of any single node. Among them, the network load data can include key indicators such as load conditions, network status and bandwidth utilization. The image to be deployed contains all necessary components of the AI model, such as model parameters, runtime dependency libraries, configuration files, operating system images, etc.
[0048] It should be noted that when obtaining network load data, several network monitoring agents can be added to the storage node cluster for continuous monitoring, and then the network load data of all storage nodes can be summarized, analyzed and processed to generate global network load data; in the process of uploading image shards, the upload progress and node load status can be monitored, and the shard upload strategy can be dynamically adjusted according to actual conditions. For example, if it is detected that the network bandwidth utilization of a node is close to saturation, the number of shards allocated to the node can be reduced, or the shard size can be increased to reduce concurrent requests to the node, thereby ensuring a smooth and stable upload process.
[0049] Step S202: When a server deployment request is received, N image slices are extracted from the storage node cluster according to the server deployment request, and the N image slices constitute an image file.
[0050] Specifically, a server deployment request may refer to a bare metal deployment request, which may indicate an image-based deployment operation of an AI model. After receiving the server deployment request, in order to ensure that the AI model can be quickly and accurately deployed on a bare metal server or other computing resources, the request may be parsed to extract relevant information of the image file, such as the shard location information of the required image file, and then the required image shards may be obtained and reassembled into a complete image file.
[0051] Furthermore, based on the queried mirror shard location information, the network conditions between the storage node (such as network latency, bandwidth, etc.) are analyzed, and then the optimal path for each shard transmission is selected based on this information, thereby extracting the required mirror shard. It should be noted that when transmitting mirror shards, a variety of network protocols can be used to ensure transmission efficiency and data integrity. For example, if the network environment has sufficient bandwidth and low latency, the iSCSI (Internet Small Computer System Interface) protocol is selected to provide faster block-level data transmission; if multiple bare metal nodes require the same mirror shard, the P2P (Peer-to-Peer, peer-to-peer network architecture) transmission mechanism is enabled to reduce the load on the central storage node.
[0052] Furthermore, after all image shards are transferred to the bare metal server, they are reassembled to form a complete image file. The reassembly process may include an integrity check on each shard to ensure that the data has not been changed or damaged during the transmission process, thereby avoiding potential system instability or security issues.
[0053] Step S203: Load the image file and deploy the preset model to the target area.
[0054] Specifically, after obtaining the complete image file, an operating environment is initialized on the target server, and the preset model and the model's binary files, related configuration files, dependent libraries and other information are extracted from the image. These model files are decompressed and configured to the correct location to adapt to the operating environment of the target server. Then, resource allocation is dynamically adjusted according to real-time resource usage to ensure optimal utilization of resources during model runtime, thereby realizing the model deployment operation.
[0055] The image management method provided by the embodiment of the present application obtains the network load data of the storage node cluster, slices the image to be deployed according to the network load data, obtains N image slices, and uploads the N image slices to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, and the image to be deployed refers to the file required for deploying the preset model, and N is a positive integer; when a server deployment request is received, N image slices are extracted from the storage node cluster according to the server deployment request, and the image file is composed of the N image slices; the image file is loaded, and the preset model is deployed to the target area, which solves the technical problems of low upload efficiency and low storage resource utilization when uploading and storing images in the related art. By slicing the image to be deployed according to the network load data of the storage node cluster, uploading the image slices to the storage node cluster, and extracting the image slices from the storage node cluster according to the server deployment request when a server deployment request is received, the image file composed of the image slices is loaded and deployed, thereby achieving the technical effect of improving image upload efficiency and deployment efficiency and improving storage resource utilization.
[0056] Optionally, in the mirror management method provided in the embodiment of the present application, the image to be deployed is fragmented according to the network load data to obtain N mirror fragments, including: extracting network status data and bandwidth data from the network load data, and extracting the deployment time period from the image upload request; determining the network connection data according to the network status data, calculating the ratio of the deployment time period and the network connection data to obtain the deployment ratio, calculating the product of the bandwidth data and the deployment ratio to obtain the initial number of fragments; obtaining the image memory data of the image to be deployed, and determining the fragment lower limit and the fragment upper limit according to the image memory data; comparing the initial number of fragments with the fragment lower limit and the fragment upper limit respectively to obtain a comparison result, and determining the fragmentation strategy according to the comparison result; fragmenting the image to be deployed based on the fragmentation strategy to obtain N mirror fragments.
[0057] Specifically, in order to optimize the image upload and deployment efficiency of the AI model and achieve effective resource utilization, it is necessary to be able to dynamically adjust the sharding strategy according to the real-time network status and image characteristics. When sharding the obtained image, the network status data and bandwidth data can be first extracted from the network load data of the mobile phone. Since the image upload time will directly affect the effectiveness of the sharding strategy, for example, during non-peak hours, the network bandwidth is more abundant and can support larger shards and higher concurrent uploads; during peak hours, in order to prevent network congestion, it is necessary to reduce the shard size and limit the number of concurrent uploads. Therefore, it is also necessary to determine the upload time (that is, the deployment time period) for preparing to upload the image. Based on the above data and combined with the image size used to assist in formulating the sharding strategy (that is, the image memory data of the image to be deployed), the optimal shard size is calculated to ensure that the shards are not too small or too large, affecting the upload efficiency or resource utilization, thereby realizing the image splitting operation according to the calculated shards.
[0058] Specifically, the sharding strategy can be determined by the following formula: S = min(max(BT / N, Smin), Smax); where BT / N represents the initial number of shards, S is the shard size obtained based on the sharding strategy, B is the current bandwidth data, T is the deployment time period, Smin and Smax are the lower and upper limits of the shards respectively, and N is the network connection data, which can characterize the number of network connections that are currently transmitting data or waiting for data transmission to be completed. It can be used to determine whether the current network and storage resources are sufficient to support more concurrent upload operations. If the network connection data is close to the upper limit of concurrent processing, it is necessary to reduce the number of concurrent shard uploads to avoid network congestion or storage node overload. Conversely, if the network connection data is small, the number of concurrent uploads can be increased to make full use of idle resources and improve the upload speed.
[0059] If the initial number of shards is lower than the lower limit, it means that the network conditions are insufficient to support parallel uploads. In this case, you can choose a larger shard size and a lower concurrent upload rate. Conversely, if it is higher than the upper limit, you need to adjust the shard size or the number of concurrent uploads to ensure that it does not exceed the network capacity and the processing capacity of the storage node. For example, if the network bandwidth is sufficient, you can choose a smaller shard size and a higher number of concurrent uploads to fully utilize network resources.
[0060] This embodiment uses network load data to determine the number of shards, so that under the condition of limited network bandwidth, it can maximize the use of available resources for image upload, thereby effectively avoiding network congestion, achieving optimal upload efficiency and minimum resource consumption, and reducing overall operation and maintenance costs.
[0061] Optionally, in the mirror management method provided in the embodiment of the present application, uploading N mirror shards to the storage node cluster includes: obtaining the mirror memory data of the mirror to be deployed, extracting the concurrency limit threshold from the network load data, wherein the concurrency limit threshold includes the concurrency upper limit value and the concurrency lower limit value; calculating the ratio of the mirror memory data to N to obtain the initial concurrency number, comparing the initial concurrency number with the concurrency upper limit value and the concurrency lower limit value respectively to obtain the target concurrency number; and executing the step of uploading N mirror shards to the storage node cluster based on the target concurrency number.
[0062] It should be noted that image memory data refers to the representation of the image file in memory, which can include information such as the image size, structure, and estimated memory usage; while network load data reflects the current network environment, including bandwidth, latency, and the number of concurrent connections in use. Before uploading and storing the multiple split image shards, it is necessary to dynamically adjust the upload strategy based on the real-time load of the storage node. At this time, the target concurrency C can be calculated based on the image memory data of the image to be deployed (i.e., the total file size) and the concurrency limit threshold. This can be calculated using the following formula: C = min(max(F / S, Cmin), Cmax); where S is the shard size obtained based on the sharding strategy, F is the image memory data, F / S is the initial concurrency, Cmin and Cmax are the lower and upper concurrency limits, respectively. The upper concurrency limit can avoid network congestion or storage node overload, while the lower concurrency limit ensures that the upload process can fully utilize network resources and avoid resource waste.
[0063] Furthermore, when uploading image shards based on the target concurrency, each shard group is uploaded to different storage nodes at the same time, thereby achieving parallel uploading. If the load on a storage node in the storage node cluster is high, the number of shards assigned to the node can be reduced, or the shard size can be increased to reduce the concurrency pressure; when the storage node load is low, the number of assigned shards can be increased or the shard size can be reduced to improve concurrency.
[0064] This embodiment fully utilizes network and storage resources by dynamically adjusting the number of parallel uploads, avoids overloading of a single node, improves storage utilization and stability, and avoids upload failures or increased time consumption due to network congestion.
[0065] Optionally, in the mirror management method provided in the embodiment of the present application, before uploading N mirror shards to the storage node cluster, the method further includes: extracting Y cache mirror shards from a preset cache area, calculating the hash value of each mirror shard to obtain N mirror hash values, and calculating the hash value of each cache mirror shard to obtain Y cache mirror hash values, where Y is a positive integer; calculating the similarity between each mirror hash value and the Y cache mirror hash values to obtain N groups of hash similarity sets, and judging whether there is a cache mirror shard whose hash similarity is greater than a preset threshold according to each group of hash similarity sets, where each group of hash similarity is greater than a preset threshold. Including Y hash similarities; if there is no cache mirror shard with a hash similarity greater than a preset threshold, executing the step of uploading N mirror shards to the storage node cluster; if there is a cache mirror shard with a hash similarity greater than the preset threshold, extracting Q target cache mirror shards from a preset cache area, wherein the Q target cache mirror shards refer to cache mirror shards with a hash similarity greater than the preset threshold, Q is less than or equal to Y, and Q is a positive integer; extracting mirror shards that are unrelated to the Q target cache mirror shards from the N mirror shards to obtain NQ mirror shards, and uploading the NQ mirror shards to the storage node cluster.
[0066] Specifically, the preset cache area can refer to the local cache. In the efficient cloud platform image management, in order to improve performance and save resources, the cache mechanism can be used to reduce unnecessary data uploads. Figure 5 Schematic diagram of a method for uploading image fragments according to an embodiment of the present application, such as Figure 5 As shown, before receiving an image upload request and uploading an image shard, the cache manager can be used to check whether the local cache contains the same or similar cache image shards (i.e., similar blocks). When detecting cache image shards, all cached cache image shards can be obtained from the local cache. Then, the cache image hash value of each cache image shard and the image hash value of each image shard are calculated to achieve content deduplication and fast search. The similarity algorithm is used to calculate the similarity between each image hash value and all cache image hash values, and multiple hash similarity sets containing multiple hash similarities are obtained.
[0067] Furthermore, the hash similarity of each hash similarity set is compared with a preset threshold to determine whether the cached image shard is sufficiently similar to the image shard to be uploaded (i.e., to determine whether it is a hit). If the hash similarity of one or more cached image shards exceeds the preset threshold, it means that this part of the image already exists in the cache and does not need to be re-uploaded. At this time, it can be directly extracted from the preset cache area. It should be noted that in order to ensure data consistency, integrity verification is required before using the cached image shards. At this time, the hash value can be compared to ensure that the data has not been tampered with. For partially matched cached image shards (i.e., there are small differences in the content), differential transmission technology can be used to transmit only the changed parts, further reducing the upload traffic, thereby greatly reducing the data transmission volume and greatly improving efficiency.
[0068] For image shards whose hash similarity is less than the preset threshold, that is, there are significant differences in content between the remaining cached image shards in the preset cache area and the cached shards to be uploaded, these cached shards need to be uploaded to the storage node cluster separately. At this time, the cache strategy can be adjusted according to the access frequency and importance for upload (that is, the standard upload process is executed and the local cache is updated), thereby realizing the upload process.
[0069] This embodiment can significantly reduce the transmission of duplicate data in the network by comparing the hash similarity of different mirror shards, lower the demand for network bandwidth, avoid waste of storage space, improve storage efficiency, and ensure efficient use of resources.
[0070] Optionally, in the mirror management method provided in the embodiment of the present application, uploading N mirror shards to the storage node cluster includes: obtaining node load data of M storage nodes in the storage node cluster to obtain M node load data, wherein each node load data includes at least one of the following: geographic location, network delay data, performance parameters, and input and output load data, and M is a positive integer; obtaining load weight, performing weighted calculation on each storage node based on the load weight and each node load data to obtain M node scores; sorting the M storage nodes in descending order according to the M node scores to obtain a node arrangement, and uploading the N mirror shards to the M storage nodes based on the node arrangement.
[0071] It should be noted that when uploading image shards, in order to optimize storage decisions, you can first monitor the operating status of the storage node cluster and collect node load data associated with each storage node, such as geographic location, network latency data, performance parameters, and input and output load data (also known as I / O (Input / Output) load data). Each storage node has independent storage space and processing capabilities. Then, based on business needs and the characteristics of the system architecture, determine the weight coefficient of each type of node load data in the node load data, and then obtain multiple load weights. For example, network latency data, performance parameters, and I / O load data directly affect upload speed and storage efficiency, and the load weight that can be set is larger. Geographical location mainly affects long-term resource allocation, and a smaller load weight can be set.
[0072] Furthermore, based on the collected node load data and preset load weights, a weighted calculation is performed on each node, resulting in a comprehensive score reflecting the current load status of each load node, namely the node score. All storage nodes are then sorted in descending order based on the calculated node scores, forming a node arrangement. The nodes at the top of this arrangement have better load conditions and are more suitable for uploading and storing image shards. Finally, image shards are uploaded to the storage nodes with the highest scores according to the node arrangement, ensuring that image shards are stored first on nodes with the most abundant resources and the best network conditions, improving upload speed and storage efficiency.
[0073] It should be noted that after uploading the image shards, the node load data of each storage node can be continuously monitored. If the load of a storage node is too high due to frequent access to some image shards, these image shards can be copied to other low-load nodes and the access route can be updated.
[0074] This embodiment calculates the node score of each storage node and then uploads the mirror fragments based on the score, which can more effectively utilize storage resources, avoid resource waste and over-concentration, improve the stability and availability of the storage node cluster, and enhance the flexibility and efficiency of deployment.
[0075] Optionally, in the image management method provided in an embodiment of the present application, N image shards are extracted from the storage node cluster according to the server deployment request, and the image file is formed by the N image shards, including: determining the deployment requirements and the bare metal cluster to be deployed according to the server deployment request, wherein the bare metal cluster includes K bare metal nodes, and K is a positive integer; calculating the network distance between each bare metal node and the M storage nodes in the storage node cluster to obtain K groups of network distances, and determining the storage node associated with each bare metal node according to each group of network distances; controlling each bare metal node to extract image shards from the storage node associated with each bare metal node, and forming an image file according to the extracted image shards.
[0076] Specifically, if it is necessary to extract image shards from a storage node cluster, in order to reduce network transmission time, the server deployment request can be parsed first, and then the deployment requirements including the resources required for the model, the deployment time window, etc. are determined. Then, based on the deployment requirements, a bare metal cluster containing multiple bare metal nodes is determined, and the network distance between each bare metal node and each storage node in the storage node cluster is determined. Then, based on the network distance, the network delay and network bandwidth status of the transmission are determined. The network distance can be a physical distance based on the network topology, or a comprehensive evaluation of network delay and bandwidth.
[0077] Furthermore, the best associated storage node for each bare metal node is determined by each set of network distances mentioned above. That is, when a bare metal node needs to access the image shards of a storage node, the storage node with the closest network distance is given priority to reduce network transmission time and resource consumption. The status of the bare metal cluster is then continuously monitored to achieve intelligent pre-allocation of images. That is, when an upcoming deployment operation is detected (such as receiving the above-mentioned server deployment request or scheduling plan), the required image shards can be transferred to the storage nodes near each bare metal node in advance, and resources can be prepared in advance. Each bare metal node can then be controlled to extract the required image shards from the storage node associated with it, achieving parallel downloading and increasing deployment speed. Furthermore, after each bare metal node receives the corresponding image shards, it can be integrated into the original image file, ensuring the integrity and consistency of the data, and laying a solid foundation for the next step of model deployment.
[0078] This embodiment selects the storage node closest to the bare metal node to transmit the image shards, which greatly reduces the data transmission time, avoids idleness and waste of resources, improves the utilization of storage nodes, reduces the need for expansion, and enables network resources to be more evenly allocated to various deployment tasks, reducing network latency and bandwidth waste, thereby improving the overall success rate of deployment.
[0079] Optionally, in the mirror management method provided in the embodiment of the present application, controlling each bare metal node to extract mirror shards from the storage node associated with each bare metal node includes: obtaining status data of K bare metal nodes in the bare metal cluster to obtain K bare metal node data, wherein each bare metal node data includes at least network bandwidth data and latency data; determining the transmission protocol of each bare metal node according to the deployment requirements and the data of each bare metal node, and executing the step of extracting mirror shards from the storage node associated with each bare metal node according to each transmission protocol.
[0080] Specifically, when transferring image shards from storage nodes to each bare metal node, in order to improve transmission efficiency and thus achieve efficient image deployment, the optimal transmission method can be dynamically selected based on the network environment and deployment requirements. First, the status data (i.e., bare metal node data) that characterizes the current network bandwidth utilization and available bandwidth of each bare metal node can be continuously monitored. Then, based on the deployment requirements and bare metal node data (such as network bandwidth, latency characteristics, image size, security requirements, and hardware compatibility), the transmission protocol can be determined. For example, in a high-bandwidth, low-latency environment, the iSCSI protocol can be selected to provide block-level access through the IP (Internet Protocol) network; when deploying across regions, the HTTP / HTTPS protocol that supports breakpoint resumption and content addressing can be used; when deploying the same image on multiple nodes at the same time, the P2P (Peer-to-Peer) transmission mechanism can be enabled to reduce the pressure on the central storage, that is, to reduce the load on the central storage node through direct transmission between nodes.
[0081] Finally, each bare metal node can be controlled to retrieve image shards from its associated storage node based on the determined transport protocol. It should be noted that during the transfer process, network status and transmission efficiency can be continuously monitored, and the transport protocol can be dynamically adjusted as necessary. For example, if a sudden drop in network bandwidth is detected for a specific bare metal node, the iSCSI protocol can be switched to the HTTP protocol to ensure transmission continuity and data consistency.
[0082] This embodiment can significantly speed up the transmission speed of image shards by selecting the most appropriate transmission protocol based on the real-time status of bare metal nodes, thereby optimizing resource utilization, reducing the demand for high-performance network equipment, and improving overall resource utilization and deployment success rate.
[0083] The embodiment of the present application also provides a mirror management system. It should be noted that the mirror management system of the embodiment of the present application can be used to execute the mirror management method provided in the embodiment of the present application. The mirror management system provided in the embodiment of the present application is introduced below.
[0084] Figure 6is a schematic diagram of a mirror management system provided according to an embodiment of the present application, such as Figure 6 As shown, the system includes:
[0085] The user interaction layer 601 is connected to the intelligent scheduling layer 602 through a programming interface, and is used to receive image upload requests, extract the image to be deployed from the image upload request, and forward the image to be deployed to the intelligent scheduling layer 602. The image to be deployed refers to the file required to deploy the preset model;
[0086] Specifically, the user interaction layer 601 is not only the contact point between the user and the system, but also the receiver and processor of the image upload request. The user interaction layer 601 can be closely connected with the intelligent scheduling layer 602 through the application programming interface (API), ensuring that user needs can be accurately and efficiently converted into system operation instructions.
[0087] In addition, the user interaction layer 601 provides an intuitive and user-friendly user interface, allowing users to quickly and easily initiate image upload requests. When a user submits an image upload request through the user interface or programming interface, the user interaction layer 601 first parses the request, extracts information including the image to be deployed, and then encapsulates it into a standard data packet and forwards it to the intelligent scheduling layer 602. It should be noted that before forwarding it to the intelligent scheduling layer 602, the user interaction layer 601 can perform preliminary preprocessing on the received image to be deployed, such as checking the image signature, verifying file integrity, and compressing large files to reduce transmission time, in preparation for subsequent parallel transmission.
[0088] It should be noted that since a two-way communication mechanism is established between the user interaction layer 601 and the intelligent scheduling layer 602, once the intelligent scheduling layer 602 starts processing the upload request, it can return status updates to the user interaction layer 601 through the programming interface, including upload progress, estimated completion time, possible problems and suggested solutions. The user interaction layer 601 can receive this status information in real time and present it to the user, providing real-time upload progress, thereby enhancing the user experience.
[0089] The intelligent scheduling layer 602 establishes bidirectional communication with the distributed storage layer 603 and the server node layer 604. Upon receiving the image to be deployed, the intelligent scheduling layer 602 obtains network load data of the storage node cluster in the distributed storage layer 603, shards the image to be deployed based on the network load data, obtains N image shards, and sends the N image shards to the distributed storage layer 603, where N is a positive integer.
[0090] It should be noted that the intelligent scheduling layer 602, as one of the core components of the system, can achieve intelligent allocation of the entire system resources by establishing two-way communication with the distributed storage layer 603 and the server node layer 604. In particular, when receiving a request for an image to be deployed, it can make efficient sharding and storage decisions based on network load data. That is, the intelligent scheduling layer 602 can send instructions and data to the distributed storage layer 603, such as sharding information and upload commands for the image to be deployed, and can also receive real-time network load data, storage node status information, and image storage status from the distributed storage layer 603, providing a data basis for its decision-making. When the intelligent scheduling layer 602 maintains two-way communication with the bare metal server node layer 604, it can receive deployment requests, monitor node status, and issue image download and deployment instructions, ensuring that the intelligent scheduling layer 602 can respond to requests from the server node layer 604 in a timely manner and make the most optimized decisions based on the latest status data.
[0091] When the intelligent scheduling layer 602 receives the image to be deployed sent by the user interaction layer 601, Figure 7 Schematic diagram of a method for slicing an image file according to an embodiment of the present application. Figure 7 As shown, first, the image file information (including file size, type and priority) can be obtained from the user interaction layer 601, and then the system status data is collected based on the deployed resource monitoring module, that is, the network load data of the storage node cluster in the distributed storage layer 603 (such as storage node load data and network bandwidth and delay data) is collected. Then, the analysis engine calculates the parameters, that is, the optimal parameters (which may include shard size and concurrency) are calculated based on the network load data, so as to formulate a dynamic image sharding strategy. For example, when it is detected that the network bandwidth is sufficient and the storage node I / O load is low, a smaller shard size and a higher concurrency can be selected to achieve parallel uploading; otherwise, a larger shard and a lower concurrency can be selected to avoid excessive occupation of network resources and storage node load. The shard size can be calculated by the following formula: S = min(max(BT / N, Smin), Smax); wherein BT / N represents the initial number of shards, S is the shard size obtained based on the sharding strategy, B is the current bandwidth data, T is the deployment time period, Smin and Smax are the lower limit and upper limit of the shard, respectively, and N is the network connection data. The concurrency can be calculated using the following formula: C = min(max(F / S, Cmin), Cmax); where S is the shard size based on the sharding strategy, F is the mirrored memory data, F / S is the initial concurrency, and Cmin and Cmax are the lower and upper concurrency limits, respectively.
[0092] Furthermore, the intelligent scheduling layer 602 can split the image to be deployed into multiple image shards based on the dynamic sharding strategy and perform the shard upload operation, that is, intelligently allocate these shards to different nodes in the storage node cluster and simultaneously start the upload process. During the upload process, the intelligent scheduling layer 602 continuously monitors the network status and resource usage of the storage nodes, monitors the upload progress, dynamically adjusts parameters and then adjusts the allocation strategy based on the parameters, determines the optimal storage location for each image shard, and ensures that the upload of the image shards is both efficient and stable. For example, when it is detected that the resources of a storage node are becoming scarce, subsequent shards can be uploaded to other nodes, thereby achieving balanced distribution and efficient utilization of resources.
[0093] Distributed storage layer 603, used to upload N image shards to the storage node cluster;
[0094] Specifically, the distributed storage layer 603 is associated with a storage node cluster, which includes multiple storage nodes. After the distributed storage layer 603 receives the image shard to be uploaded, it uses an adaptive sharding strategy to evaluate the suitability of the storage node based on the current status of the storage node (such as the storage node's load, network bandwidth, and latency). That is, it calculates a score based on factors such as each node's storage capacity, I / O performance, network latency, and geographical location, and ensures that the image shard can be uploaded to the optimal location based on the score. It then continuously monitors node load data to dynamically adjust the shard size, the number of concurrent uploads, and the location where the image shard is stored, so that the upload process can fully utilize resources and avoid bottlenecks, and then upload the image shard to the subsidized storage node in the storage node cluster.
[0095] It should be noted that during the upload process, the distributed storage layer 603 also needs to maintain metadata such as the location information, sharding status and access rights of the image file, adjust the number and location of copies according to the load status of the storage node and the frequency of data access, and create data copies between different nodes according to the configuration strategy to improve data access speed and system fault tolerance; and verify the integrity of each shard, use a hash algorithm to ensure the integrity and consistency of the data during transmission, and avoid data tampering or damage during the upload process. For example, based on the hot data identification capability, the mirror shards with higher access frequency are detected and migrated from high-load nodes to low-load nodes, further improving the overall performance and user experience through load balancing.
[0096] The server node layer 604 transmits data with the server node layer 604 and is used to extract N mirror shards from the distributed storage layer 603 according to the server deployment request when a server deployment request is received, form an image file by the N mirror shards, load the image file, and deploy the preset model to the target area.
[0097] Specifically, the server node layer 604 can be a bare metal node layer, which can efficiently extract image shards from the distributed storage layer 603 according to the server deployment request, form a complete image file, and ultimately complete the deployment of the model. When the server node layer 604 receives a deployment request, it first parses the key information in the request (which may include the location of the target area, the preset model type to be deployed, the model version, and any specific configuration parameters), and then determines the image shard to be extracted from the distributed storage layer 603 based on the model information in the request and its own status data (such as network bandwidth and latency information).
[0098] Figure 8 This is a schematic diagram of a bare metal deployment method provided in accordance with an embodiment of the present application, which is applied to Figure 6 The image management system shown in Figure 8 As shown, mirror shards are efficiently extracted from multiple storage nodes in a distributed storage cluster by performing parallel data transfer operations. The intelligent scheduling layer 602 then performs image data localization, "distance matrix" selection, dynamic resource scheduling, image pre-allocation, and an adaptive transmission mechanism that supports multiple protocols. Distance matrix selection refers to recording the network distance between the storage node and the bare metal node. When the bare metal node needs to access the image, it prioritizes the storage node with the closest network distance to reduce network transmission time. Image pre-allocation refers to realizing intelligent pre-allocation of images by continuously monitoring the status of the bare metal cluster. That is, when an upcoming deployment operation is detected, the required image is transferred to a storage node or cache near the target bare metal node in advance, and based on historical deployment patterns and current status blocks, machine learning technology is used to predict the most likely deployment target and prepare resources in advance. The adaptive transmission mechanism refers to dynamically selecting the optimal transmission method based on the network environment and deployment requirements through protocols such as NFS, iSCSI, HTTP / HTTPS, and P2P in the multi-protocol transport layer. For example, the iSCSI protocol is selected in a high-bandwidth and low-latency environment; when deploying across regions, the HTTP / HTTPS protocol that supports breakpoint resumption is used; when the same image is deployed on multiple nodes at the same time, the P2P transmission mechanism is enabled to reduce the pressure on the central storage.
[0099] Furthermore, the image shards in the storage node are transferred to different bare metal nodes in the bare metal node cluster through the above-mentioned transmission mechanism and the learning-based deployment target prediction algorithm, and these shards are merged into a complete image file. After the image file is successfully merged, the server node layer 604 can load the image file and deploy the preset model to the target area according to the deployment script or instructions of the preset model, where the target area can be a specific hard disk partition, memory area or virtual machine environment of the server.
[0100] The image management system provided by the embodiment of the present application is connected to the intelligent scheduling layer 602 through a programming interface through a user interaction layer 601, and is used to receive image upload requests, extract the image to be deployed from the image upload request, and forward the image to be deployed to the intelligent scheduling layer 602, wherein the image to be deployed refers to the file required for deploying the preset model; the intelligent scheduling layer 602 establishes two-way communication with the distributed storage layer 603 and the server node layer 604, and is used to obtain the network load data of the storage node cluster in the distributed storage layer 603 when receiving the image to be deployed, and to fragment the image to be deployed according to the network load data to obtain N image fragments, and send the N image fragments to the distributed storage layer 603, wherein N is a positive integer; the distributed storage layer 603 is used to upload the N image fragments to the storage node cluster; the server node layer 604, The system transmits data with the server node layer 604 and is used to extract N image shards from the distributed storage layer 603 according to the server deployment request when a server deployment request is received, form an image file by the N image shards, load the image file, and deploy the preset model to the target area, thereby solving the technical problems of low upload efficiency and low storage resource utilization when uploading and storing images in related technologies. Through the coordinated operation of the user interaction layer 601, the intelligent scheduling layer 602, the distributed storage layer 603 and the server node layer 604, the image to be deployed is sharded. When a server deployment request is received, the image shards are extracted from the storage node cluster according to the server deployment request, and loaded and deployed based on the image file composed of the image shards, thereby achieving the technical effect of improving the image upload efficiency and deployment efficiency and improving the storage resource utilization.
[0101] The present application also provides a mirror management method. Figure 9 Schematic diagram of an image management method for an image management system provided in accordance with an embodiment of the present application, such as Figure 9 As shown, the method includes: when a user initiates an image upload request, the intelligent scheduling layer analyzes the image characteristics and system status, collects storage node load, network status and bandwidth utilization, and then the resource monitoring module performs real-time data analysis. Based on this data, the optimal sharding strategy and storage distribution are determined, that is, the shard size and concurrency number are calculated based on the resource status.
[0102] Furthermore, after obtaining the above-mentioned optimal sharding strategy and storage distribution, shard upload is performed and the front-end cache is updated at the same time, that is, the distributed storage nodes receive the shards and distribute them according to the scheduling results. When the upload is completed, the metadata service records the image information and its location in the distributed storage. When the user initiates a bare metal deployment request, the system selects the optimal transmission method and storage node based on the deployment requirements and resource status, and then controls the bare metal node to obtain the image from the nearest storage node through the optimal protocol, and completes the image loading and system startup to achieve rapid deployment of the AI model. Among them, the best storage node can be selected based on the distance matrix, and the transmission protocol (which may include iSCSI, HTTP, P2P and other protocols) can be dynamically selected.
[0103] This embodiment divides the image to be deployed into shards according to the network load data of the storage node cluster, uploads the image shards to the storage node cluster, extracts the image shards from the storage node cluster according to the server deployment request, and loads and deploys the image file based on the image shards, thereby achieving the technical effect of improving the image upload efficiency and deployment efficiency and improving the utilization of storage resources.
[0104] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0105] Example 2
[0106] The embodiment of the present application further provides a mirror management device. It should be noted that the mirror management device of the embodiment of the present application can be used to execute the mirror management method provided in the embodiment of the present application. The mirror management device provided in the embodiment of the present application is introduced below.
[0107] According to an embodiment of the present application, a device for implementing the above-mentioned mirror management method is also provided. Figure 10 Schematic diagram of a mirror management device provided according to an embodiment of the present application, such as Figure 10 As shown, the device includes: an acquisition unit 1001, a first extraction unit 1002, and a loading unit 1003.
[0108] An acquisition unit 1001 is configured to acquire network load data of a storage node cluster, shard the image to be deployed according to the network load data to obtain N image shards, and upload the N image shards to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, the image to be deployed refers to the file required to deploy a preset model, and N is a positive integer;
[0109] The first extraction unit 1002 is configured to extract N image shards from the storage node cluster according to the server deployment request when receiving the server deployment request, and form an image file from the N image shards;
[0110] The loading unit 1003 is used to load the image file and deploy the preset model to the target area.
[0111] The image management device provided by the embodiment of the present application obtains network load data of the storage node cluster through the acquisition unit 1001, slices the image to be deployed according to the network load data to obtain N image slices, and uploads the N image slices to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, and the image to be deployed refers to the file required for deploying the preset model, and N is a positive integer; the first extraction unit 1002 extracts N image slices from the storage node cluster according to the server deployment request when receiving the server deployment request, and the N image slices constitute the image file; the loading unit 1003 loads the image file and deploys the preset model to the target area, which solves the technical problems of low upload efficiency and low storage resource utilization when uploading and storing images in the related art. By slicing the image to be deployed according to the network load data of the storage node cluster, uploading the image slices to the storage node cluster, and extracting the image slices from the storage node cluster according to the server deployment request when receiving the server deployment request, loading and deploying the image file based on the image slices, thereby achieving the technical effect of improving image upload efficiency and deployment efficiency and improving storage resource utilization.
[0112] Optionally, in the image management device provided in the embodiment of the present application, the acquisition unit 1001 includes: an extraction module, used to extract network status data and bandwidth data from the network load data, and extract the deployment time period from the image upload request; a first determination module, used to determine the network connection data based on the network status data, calculate the ratio of the deployment time period and the network connection data, obtain the deployment ratio, calculate the product of the bandwidth data and the deployment ratio, and obtain the initial number of shards; a first acquisition module, used to obtain the image memory data of the image to be deployed, and determine the shard lower limit and the shard upper limit based on the image memory data; a comparison module, used to compare the initial number of shards with the shard lower limit and the shard upper limit respectively, to obtain a comparison result, and determine the sharding strategy based on the comparison result; a sharding module, used to shard the image to be deployed based on the sharding strategy to obtain N image shards.
[0113] Optionally, in the mirror management device provided in the embodiment of the present application, the acquisition unit 1001 includes: a second acquisition module, used to obtain the mirror memory data of the mirror to be deployed, and extract the concurrency limit threshold from the network load data, wherein the concurrency limit threshold includes a concurrency upper limit value and a concurrency lower limit value; a first calculation module, used to calculate the ratio of the mirror memory data to N, obtain the initial concurrency number, and compare the initial concurrency number with the concurrency upper limit value and the concurrency lower limit value respectively to obtain the target concurrency number; an execution module, used to execute the step of uploading N mirror shards to the storage node cluster based on the target concurrency number.
[0114] Optionally, in the image management device provided in the embodiment of the present application, the device further includes: a second extraction unit, used to extract Y cache image shards from a preset cache area before uploading N image shards to the storage node cluster, calculate the hash value of each image shard to obtain N image hash values, and calculate the hash value of each cache image shard to obtain Y cache image hash values, where Y is a positive integer; a calculation unit, used to calculate the similarity between each image hash value and the Y cache image hash values, to obtain N groups of hash similarity sets, and determine whether there is a cache image shard with a hash similarity greater than a preset threshold based on each group of hash similarity sets, where each group of hash similarities includes Y hash values. Hash similarity; an execution unit, configured to, if there is no cache mirror shard whose hash similarity is greater than a preset threshold, execute the step of uploading N mirror shards to the storage node cluster; a third extraction unit, configured to, if there is a cache mirror shard whose hash similarity is greater than a preset threshold, extract Q target cache mirror shards from a preset cache area, wherein the Q target cache mirror shards refer to cache mirror shards whose hash similarity is greater than a preset threshold, Q is less than or equal to Y, and Q is a positive integer; a fourth extraction unit, configured to extract mirror shards that are unrelated to the Q target cache mirror shards from the N mirror shards, obtain NQ mirror shards, and upload the NQ mirror shards to the storage node cluster.
[0115] Optionally, in the mirror management device provided in the embodiment of the present application, the acquisition unit 1001 includes: a third acquisition module, used to obtain node load data of M storage nodes in the storage node cluster, and obtain M node load data, wherein each node load data includes at least one of the following: geographic location, network delay data, performance parameters, and input and output load data, and M is a positive integer; a fourth acquisition module, used to obtain load weight, perform weighted calculation on each storage node based on the load weight and each node load data, and obtain M node scores; a sorting module, used to sort the M storage nodes in descending order according to the M node scores, obtain a node arrangement, and upload N mirror shards to the M storage nodes based on the node arrangement.
[0116] Optionally, in the image management device provided in an embodiment of the present application, the first extraction unit 1002 includes: a second determination module, used to determine the deployment requirements and the bare metal cluster to be deployed according to the server deployment request, wherein the bare metal cluster includes K bare metal nodes, and K is a positive integer; a second calculation module, used to calculate the network distance between each bare metal node and the M storage nodes in the storage node cluster, obtain K groups of network distances, and determine the storage node associated with each bare metal node according to each group of network distances; a control module, used to control each bare metal node to extract image shards from the storage nodes associated with each bare metal node, and construct an image file according to the extracted image shards.
[0117] Optionally, in the mirror management device provided in an embodiment of the present application, the first extraction unit 1002 includes: a fifth acquisition module, used to obtain status data of K bare metal nodes in a bare metal cluster to obtain K bare metal node data, wherein each bare metal node data includes at least network bandwidth data and delay data; a third determination module, used to determine the transmission protocol of each bare metal node according to the deployment requirements and the data of each bare metal node, and execute the step of extracting mirror shards from the storage node associated with each bare metal node according to each transmission protocol.
[0118] It should be noted that the acquisition unit 1001, the first extraction unit 1002, and the loading unit 1003 described above correspond to steps S201 to S203 in Example 1. The examples and application scenarios implemented by the above units and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and can be run in the computer terminal 10 provided in Example 1.
[0119] Example 3
[0120] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal or an electronic device.
[0121] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.
[0122] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the image management method: obtaining network load data of the storage node cluster, sharding the image to be deployed according to the network load data to obtain N image shards, and uploading the N image shards to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, the image to be deployed refers to the file required to deploy the preset model, and N is a positive integer; when a server deployment request is received, N image shards are extracted from the storage node cluster according to the server deployment request, and the image file is composed of N image shards; loading the image file, and deploying the preset model to the target area.
[0123] Optionally, the computer terminal may execute the program code of the following steps in the image management method: extracting network status data and bandwidth data from network load data, and extracting a deployment time period from an image upload request; determining network connection data based on the network status data, calculating a ratio of the deployment time period to the network connection data to obtain a deployment ratio, calculating the product of the bandwidth data and the deployment ratio to obtain an initial number of shards; obtaining image memory data of the image to be deployed, and determining a shard lower limit and a shard upper limit based on the image memory data; comparing the initial number of shards with the shard lower limit and the shard upper limit, respectively, to obtain a comparison result, and determining a sharding strategy based on the comparison result; sharding the image to be deployed based on the sharding strategy to obtain N image shards.
[0124] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the image management method: obtaining the image memory data of the image to be deployed, extracting the concurrency limit threshold from the network load data, wherein the concurrency limit threshold includes the concurrency upper limit value and the concurrency lower limit value; calculating the ratio of the image memory data to N to obtain the initial concurrency number, comparing the initial concurrency number with the concurrency upper limit value and the concurrency lower limit value respectively to obtain the target concurrency number; and executing the step of uploading N image shards to the storage node cluster based on the target concurrency number.
[0125] Optionally, the computer terminal can execute the program code of the following steps in the image management method: extracting Y cache image shards from a preset cache area, calculating the hash value of each image shard to obtain N image hash values, and calculating the hash value of each cache image shard to obtain Y cache image hash values, where Y is a positive integer; calculating the similarity between each image hash value and the Y cache image hash values to obtain N groups of hash similarity sets, and judging whether there is a cache image shard with a hash similarity greater than a preset threshold according to each group of hash similarity sets, where each group of hash similarities includes Y hash similarities. ; If there are no cache mirror shards whose hash similarity is greater than the preset threshold, perform the step of uploading N mirror shards to the storage node cluster; if there are cache mirror shards whose hash similarity is greater than the preset threshold, extract Q target cache mirror shards from the preset cache area, wherein Q target cache mirror shards refer to cache mirror shards whose hash similarity is greater than the preset threshold, Q is less than or equal to Y, and Q is a positive integer; extract mirror shards that are not related to the Q target cache mirror shards from the N mirror shards to obtain NQ mirror shards, and upload the NQ mirror shards to the storage node cluster.
[0126] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the mirror management method: obtain node load data of M storage nodes in the storage node cluster to obtain M node load data, wherein each node load data includes at least one of the following: geographic location, network delay data, performance parameters and input and output load data, and M is a positive integer; obtain load weight, perform weighted calculation on each storage node based on the load weight and each node load data to obtain M node scores; sort the M storage nodes in descending order according to the M node scores to obtain node arrangement, and upload N mirror shards to the M storage nodes based on the node arrangement.
[0127] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the image management method: determine the deployment requirements and the bare metal cluster to be deployed according to the server deployment request, wherein the bare metal cluster includes K bare metal nodes, and K is a positive integer; calculate the network distance between each bare metal node and the M storage nodes in the storage node cluster to obtain K groups of network distances, and determine the storage node associated with each bare metal node according to each group of network distances; control each bare metal node to extract image shards from the storage node associated with each bare metal node, and construct an image file according to the extracted image shards.
[0128] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the image management method: obtaining the status data of K bare metal nodes in the bare metal cluster to obtain K bare metal node data, wherein each bare metal node data includes at least network bandwidth data and delay data; determining the transmission protocol of each bare metal node according to the deployment requirements and each bare metal node data, and executing the step of extracting the image shards from the storage node associated with each bare metal node according to each transmission protocol.
[0129] Optionally, Figure 11 This is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 11 As shown, the electronic device may include: one or more ( Figure 11 Only one is shown) processor 1102, memory 1104, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0130] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the mirror management method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned mirror management method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.
[0131] The processor may call the information and application programs stored in the memory through the transmission device to execute the above steps in the above mirror management method.
[0132] The embodiment of the present application provides a solution for image management. By obtaining network load data of a storage node cluster, the image to be deployed is sliced according to the network load data to obtain N image slices, and the N image slices are uploaded to the storage node cluster, wherein the image to be deployed is extracted from an image upload request, and the image to be deployed refers to a file required for deploying a preset model, and N is a positive integer; when a server deployment request is received, N image slices are extracted from the storage node cluster according to the server deployment request, and an image file is formed by the N image slices; the image file is loaded, and the preset model is deployed to a target area, thereby solving the technical problems of low upload efficiency and low storage resource utilization when uploading and storing images in related technologies. By slicing the image to be deployed according to the network load data of the storage node cluster, uploading the image slices to the storage node cluster, and extracting the image slices from the storage node cluster according to the server deployment request when a server deployment request is received, the image file composed of the image slices is loaded and deployed, thereby achieving the technical effect of improving image upload efficiency and deployment efficiency and improving storage resource utilization.
[0133] It can be understood by those skilled in the art that Figure 11 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), or a PAD. Figure 11 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 11 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 11 Different configurations shown.
[0134] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0135] Example 4
[0136] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the image management method provided in the first embodiment.
[0137] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0138] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining network load data of the storage node cluster, sharding the image to be deployed according to the network load data to obtain N image shards, and uploading the N image shards to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, the image to be deployed refers to the file required to deploy the preset model, and N is a positive integer; when a server deployment request is received, N image shards are extracted from the storage node cluster according to the server deployment request, and the image file is composed of the N image shards; loading the image file, and deploying the preset model to the target area.
[0139] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the image management method.
[0140] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0141] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0142] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0143] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0144] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0146] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A mirror management method, characterized in that: include: Obtain network load data of the storage node cluster, shard the image to be deployed according to the network load data to obtain N image shards, and upload the N image shards to the storage node cluster, wherein the image to be deployed is extracted from the image upload request, the image to be deployed refers to the file required to deploy the preset model, and N is a positive integer; When a server deployment request is received, extracting the N image shards from the storage node cluster according to the server deployment request, and forming an image file from the N image shards; The image file is loaded and the preset model is deployed to the target area.
2. The method according to claim 1, characterized in that The image to be deployed is fragmented according to the network load data to obtain N image fragments including: Extracting network status data and bandwidth data from the network load data, and extracting a deployment time period from the image upload request; Determine network connection data according to the network status data, calculate a ratio of the deployment time period to the network connection data to obtain a deployment ratio, calculate the product of the bandwidth data and the deployment ratio to obtain an initial number of shards; Obtaining image memory data of the image to be deployed, and determining a shard lower limit value and a shard upper limit value according to the image memory data; Comparing the initial number of shards with the shard lower limit and the shard upper limit respectively to obtain a comparison result, and determining a sharding strategy according to the comparison result; The image to be deployed is fragmented based on the fragmentation strategy to obtain the N image fragments.
3. The method according to claim 1, characterized in that Uploading the N image shards to the storage node cluster includes: Obtaining image memory data of the image to be deployed, and extracting a concurrency limit threshold from the network load data, wherein the concurrency limit threshold includes a concurrency upper limit value and a concurrency lower limit value; Calculate the ratio of the mirror memory data to N to obtain an initial concurrency number, and compare the initial concurrency number with the concurrency upper limit and the concurrency lower limit respectively to obtain a target concurrency number; The step of uploading the N mirror shards to the storage node cluster is performed based on the target concurrent number.
4. The method according to claim 1, wherein Before uploading the N mirror shards to the storage node cluster, the method further includes: Extract Y cache image shards from a preset cache area, calculate the hash value of each image shard to obtain N image hash values, and calculate the hash value of each cache image shard to obtain Y cache image hash values, where Y is a positive integer; Calculate the similarity between each image hash value and the Y cache image hash values to obtain N groups of hash similarity sets, and determine whether there is a cache image shard whose hash similarity is greater than a preset threshold based on each group of hash similarity sets, wherein each group of hash similarities includes Y hash similarities; If there is no cached image shard whose hash similarity is greater than the preset threshold, performing the step of uploading the N image shards to the storage node cluster; If there are cache image shards whose hash similarity is greater than the preset threshold, extract Q target cache image shards from the preset cache area, wherein the Q target cache image shards refer to cache image shards whose hash similarity is greater than the preset threshold, Q is less than or equal to Y, and Q is a positive integer; Mirror shards that are not related to the Q target cache mirror shards are extracted from the N mirror shards to obtain NQ mirror shards, and the NQ mirror shards are uploaded to the storage node cluster.
5. The method according to claim 1, wherein Uploading the N image shards to the storage node cluster includes: Obtain node load data of M storage nodes in the storage node cluster to obtain M node load data, wherein each node load data includes at least one of the following: geographic location, network delay data, performance parameters, and input and output load data, and M is a positive integer; Obtaining a load weight, and performing weighted calculation on each storage node based on the load weight and the load data of each node to obtain M node scores; The M storage nodes are sorted in descending order according to the M node scores to obtain a node arrangement, and the N mirror shards are uploaded to the M storage nodes based on the node arrangement.
6. The method according to claim 1, characterized in that Extracting the N image shards from the storage node cluster according to the server deployment request, and forming an image file from the N image shards includes: Determining deployment requirements and a bare metal cluster to be deployed according to the server deployment request, wherein the bare metal cluster includes K bare metal nodes, where K is a positive integer; Calculate the network distance between each bare metal node and the M storage nodes in the storage node cluster to obtain K groups of network distances, and determine the storage node associated with each bare metal node based on each group of network distances; Each bare metal node is controlled to extract image slices from a storage node associated with each bare metal node, and the image file is constructed according to the extracted image slices.
7. The method according to claim 6, characterized in that Controlling each bare metal node to extract image shards from the storage node associated with each bare metal node includes: Obtaining status data of the K bare metal nodes in the bare metal cluster to obtain K bare metal node data, wherein the data of each bare metal node includes at least network bandwidth data and latency data; The transmission protocol of each bare metal node is determined according to the deployment requirements and the data of each bare metal node, and the step of extracting the mirror shards from the storage nodes associated with each bare metal node is performed according to each transmission protocol.
8. A mirror management system, characterized in that: include: The user interaction layer is connected to the intelligent scheduling layer through a programming interface, and is used to receive image upload requests, extract the image to be deployed from the image upload request, and forward the image to be deployed to the intelligent scheduling layer, wherein the image to be deployed refers to the file required to deploy the preset model; The intelligent scheduling layer establishes bidirectional communication with the distributed storage layer and the server node layer, and is configured to, upon receiving the image to be deployed, obtain network load data of the storage node cluster in the distributed storage layer, shard the image to be deployed according to the network load data to obtain N image shards, and send the N image shards to the distributed storage layer, where N is a positive integer; The distributed storage layer is used to upload the N mirror shards to the storage node cluster; The server node layer transmits data with the server node layer, and is used to extract the N mirror shards from the distributed storage layer according to the server deployment request when receiving a server deployment request, form an image file with the N mirror shards, load the image file, and deploy the preset model to the target area.
9. An electronic device, characterized in that: include: a memory storing an executable program; A processor, configured to run the program, wherein the program, when running, executes the mirror management method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the mirror management method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Startup file transmission method and device, electronic equipment and storage medium
CN120729856A
Life cycle management method and system for multiple artificial intelligence models
CN121187707A
A lifecycle management method and system for multiple artificial intelligence models
CN121187707B