Mirror image exporting method and device, electronic equipment and computer program product
By using a two-layer fuzzy neural network model, the mirror export strategy and compression configuration are automatically selected, which solves the problems of low efficiency and insufficient flexibility in the existing mirror export technology, and realizes a more efficient and flexible mirror export process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-05-15
AI Technical Summary
Existing cloud computing platform image export technologies mainly rely on static export strategies and single compression algorithms, resulting in a lack of flexibility and low export efficiency. They are unable to adapt to the dynamic changes in the cloud computing environment, cannot optimize resource utilization, and cannot quickly respond to users' needs for rapid deployment and dynamic resource management.
A two-layer fuzzy neural network model is adopted. By acquiring memory usage information, network bandwidth usage information, image type and image size as input, the optimal image export strategy and compression configuration are automatically selected, including the expected export time, number of blocks, target availability zone and target export bucket, to optimize the image export process.
It improves the efficiency and success rate of image export, optimizes resource utilization, enhances the flexibility and response speed of image export, and adapts to the dynamic changes in the cloud computing environment.
Smart Images

Figure CN122044751A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and computer program product for image export. Background Technology
[0002] In related technologies, cloud computing platform image export technology mainly relies on static export strategies and a single compression algorithm. A static export strategy refers to the method of performing image export operations according to a pre-defined and relatively fixed set of rules and configurations within the cloud computing platform. These strategies do not depend on dynamic runtime conditions but are executed based on predefined conditions. Common static strategies include a single image compression algorithm and preset export parameters. Export efficiency varies significantly depending on the type of image being exported, and insufficient backend storage resources can lead to image export failure. Summary of the Invention
[0003] This application provides a mirror export method, apparatus, electronic device, and computer program product that can improve mirror export efficiency.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for exporting an image, the method comprising: Obtain information on memory usage, network bandwidth usage, and the image type and size of the image to be exported; The memory usage information, the network bandwidth usage information, the image type, and the image size are input into a two-layer fuzzy neural network model to obtain the image export strategy and compression configuration information. The image to be exported is exported based on the image export strategy and the compression configuration information.
[0005] This application provides an image export device, including: The acquisition unit is used to acquire information such as memory usage, network bandwidth usage, and the image type and size of the image to be exported. The unit is used to input the memory usage information, the network bandwidth usage information, the image type and the image size into a two-layer fuzzy neural network model to obtain the image export strategy and compression configuration information. The export unit is used to export the image to be exported based on the image export strategy and the compression configuration information.
[0006] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method provided in the embodiments of this application.
[0007] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the image export method provided in this application.
[0008] The embodiments of this application have the following beneficial effects: By using memory usage information, network bandwidth usage information, the image type and size corresponding to the image to be exported as input to a two-layer fuzzy neural network model, and considering that memory stores both the data to be compressed and the compressed data, which largely determines the compression algorithm, and that network bandwidth is positively correlated with high compression ratio data network transmission, using these as inputs to the two-layer fuzzy neural network model can better determine the image export strategy and compression configuration information. Furthermore, based on the image export strategy and compression configuration information obtained from the two-layer fuzzy neural network model, the optimal image export strategy and compression configuration can be automatically selected by the fuzzy neural network model, thereby improving image export efficiency. Attached Figure Description
[0009] Figure 1 A schematic flowchart illustrating a mirror export method provided in an embodiment of this application; Figure 2 A schematic diagram of an exemplary two-layer fuzzy neural network model provided in this application embodiment; Figure 3 A schematic diagram illustrating an exemplary fuzzy subset partitioning of input and output quantities provided for an embodiment of this application; Figure 4 A schematic diagram illustrating an exemplary process for deriving a fuzzy neural network, as provided in an embodiment of this application. Figure 5 A schematic diagram illustrating another exemplary process for exporting a fuzzy neural network image, provided as an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a mirror export device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0012] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," etc., may be interchanged in a specific order or sequence where permissible, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0013] Current cloud computing platform image export technologies primarily rely on static export strategies and single compression algorithms. Static export strategies refer to the method of performing image export operations according to a pre-defined and relatively fixed set of rules and configurations within the cloud computing platform. These strategies do not depend on dynamic runtime conditions but are executed based on predefined conditions. Common static strategies include a single image compression algorithm and preset export parameters. Export efficiency varies significantly depending on the type of image being exported, and image export failure can occur when backend storage resources are insufficient.
[0014] In related technologies, methods for exporting and assembling images based on container layering technology delegate the creation, reading, writing, exporting, and assembly of container layers to the user. Users can customize and select container layers to assemble and create the desired container images. This enables incremental transmission during cross-cluster transfers.
[0015] However, cloud computing platform image export technology mainly relies on static strategies and a single compression algorithm. Its disadvantages are a lack of flexibility and low export efficiency. It is difficult to adapt to the dynamic changes in the cloud computing environment, cannot optimize resource utilization, and cannot quickly respond to users' needs for rapid deployment and dynamic resource management.
[0016] Based on this, embodiments of this application provide a mirror export method. Figure 1 This is a flowchart illustrating a mirror export method provided in an embodiment of this application; as shown below. Figure 1 As shown, the method includes: S101. Obtain memory usage information, network bandwidth usage information, and the image type and size corresponding to the image to be exported.
[0017] It should be noted that memory usage information can be understood as real-time resource consumption or memory utilization rate; network bandwidth usage information can be understood as network bandwidth utilization rate or real-time network status. Image types include at least operating system images, data-intensive images, and special format images. The image size can be determined based on the actual size of the image to be exported and is not limited here. Obtaining memory usage information, network bandwidth usage information, the image type and size corresponding to the image to be exported can be understood as the image console obtaining these information when it detects a user creating an image export request. Specifically, memory usage information and network bandwidth usage information are obtained through real-time monitoring, while the image type and size are obtained by the image console through the image's Application Programming Interface (API).
[0018] S102. Input memory usage information, network bandwidth usage information, image type and image size into a two-layer fuzzy neural network model to obtain image export strategy and compression configuration information.
[0019] It should be noted that the two-layer fuzzy neural network model is a pre-trained two-layer fuzzy neural network model, including an input layer, a fuzzification layer, a fuzzy inference layer, a normalization layer, and an output layer. The mirror export strategy includes at least the first export duration, the number of blocks, the target availability zone, and the target export bucket corresponding to the image to be exported; the first export duration can be understood as the estimated export duration. Compression configuration information can be understood as the selection of different compression algorithms. Inputting memory usage information, network bandwidth usage information, image type, and image size into the two-layer fuzzy neural network model yields the mirror export strategy and compression configuration information. This can be understood as automatically obtaining the first export duration, the number of blocks, the target availability zone, the target export bucket, and the compression algorithm corresponding to the image to be exported.
[0020] S103. Export the image to be exported based on the image export strategy and compression configuration information.
[0021] It should be noted that exporting the image to be exported based on the image export strategy and compression configuration information can be understood as exporting the image to be exported to the corresponding object storage bucket based on the image export strategy and compression configuration information.
[0022] The solution in this application uses memory usage information, network bandwidth usage information, the image type and size corresponding to the image to be exported as input to a two-layer fuzzy neural network model. Since memory stores the data to be compressed and the compressed data, it largely determines the compression algorithm. At the same time, network bandwidth is positively correlated with the transmission of data over a high compression ratio. Using these as inputs to the two-layer fuzzy neural network model can better determine the image export strategy and compression configuration information. Furthermore, based on the image export strategy and compression configuration information obtained from the two-layer fuzzy neural network model, the optimal image export strategy and compression configuration are automatically selected by the fuzzy neural network model, thereby improving the image export efficiency.
[0023] In this embodiment, the process of inputting memory usage information, network bandwidth usage information, image type, and image size into a two-layer fuzzy neural network model to obtain image export strategy and compression configuration information specifically includes: determining the first fuzzy subset corresponding to memory usage information, the second fuzzy subset corresponding to network bandwidth usage information, the third fuzzy subset corresponding to image type, and the fourth fuzzy subset corresponding to image size; and determining the image export strategy and compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset, and preset fuzzy rules.
[0024] It should be noted that determining the first fuzzy subset corresponding to memory usage information, the second fuzzy subset corresponding to network bandwidth usage information, the third fuzzy subset corresponding to image type, and the fourth fuzzy subset corresponding to image size can be understood as determining the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, and the fourth fuzzy subset through the fuzzification layer in the two-layer fuzzy neural network model.
[0025] It should be noted that memory usage information, network bandwidth usage information, image type, and image size each correspond to three fuzzy subsets, which can be denoted as S, M, and B. The first fuzzy subset corresponding to memory usage information can be understood as memory usage information being S, M, or B; the second fuzzy subset corresponding to network bandwidth usage information can be understood as network bandwidth usage information being S, M, or B; the third fuzzy subset corresponding to image type can be understood as image type being S, M, or B; and the fourth fuzzy subset corresponding to image size can be understood as image size being S, M, or B. For ease of understanding, an example is provided here. Let the range of input quantities (including memory usage information, network bandwidth usage information, image type, and image size) be [a, b]. The calculation relationship of the fuzzy subsets can be represented by S = [a, (2a+b) / 3)], M = [(2a+b) / 3, (2b+a) / 3], and B = [(2b+a) / 3, b].
[0026] In this embodiment of the application, the process of determining the first fuzzy subset corresponding to memory usage information, the second fuzzy subset corresponding to network bandwidth usage information, the third fuzzy subset corresponding to image type, and the fourth fuzzy subset corresponding to image size specifically includes: determining the first membership value corresponding to memory usage information, the second membership value corresponding to network bandwidth usage information, the third membership value corresponding to image type, and the fourth membership value corresponding to image size; determining the first fuzzy subset based on the first membership value; determining the second fuzzy subset based on the second membership value; determining the third fuzzy subset based on the third membership value; and determining the fourth fuzzy subset based on the fourth membership value.
[0027] It should be noted that determining the first membership value corresponding to memory usage information, the second membership value corresponding to network bandwidth usage information, the third membership value corresponding to image type, and the fourth membership value corresponding to image size can be understood as calculating these values using the corresponding Gaussian membership functions. In practical applications, the membership functions can be... , where i is the node number of the input layer, i=1,2; j is the node number of the fuzzing layer, j=1,2,3,4; , These represent the width and center position of the Gaussian membership function, respectively. Determining the first fuzzy subset based on the first membership value can be understood as determining the degree to which memory occupancy information belongs to each fuzzy subset based on the first membership value, thereby identifying the corresponding first fuzzy subset. The determination methods for the second, third, and fourth fuzzy subsets are the same as for the first fuzzy subset, and will not be repeated here.
[0028] In this embodiment of the application, the process of determining the image export strategy and compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset and the preset fuzzy rules specifically includes: determining the fifth fuzzy subset corresponding to the image export strategy and compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset and the preset fuzzy rules; and performing normalization and clearing processing on the fifth fuzzy subset to obtain the image export strategy and compression configuration information.
[0029] It should be noted that determining the fifth fuzzy subset corresponding to the mirror export strategy and compressed configuration information based on the first, second, third, and fourth fuzzy subsets and preset fuzzy rules can be understood as follows: in the fuzzy inference layer of the two-layer fuzzy neural network model, the fifth fuzzy subset corresponding to the mirror export strategy and compressed configuration information is determined based on the first, second, third, and fourth fuzzy subsets and preset fuzzy rules. Normalizing and clarifying the fifth fuzzy subset to obtain the mirror export strategy and compressed configuration information can be understood as follows: the fifth fuzzy subset is normalized through the normalization layer of the two-layer fuzzy neural network model, and then clarified through the output layer of the two-layer fuzzy neural network model to obtain the mirror export strategy and compressed configuration information.
[0030] It should be noted that the fifth fuzzy subset corresponding to the image export strategy and compression configuration information can be understood as the fuzzy subset corresponding to the expected export duration, number of blocks, target availability zone, target export bucket, and compression algorithm. Determining the fifth fuzzy subset corresponding to the image export strategy and compression configuration information based on the first, second, third, and fourth fuzzy subsets and preset fuzzy rules can also be understood as determining the fifth fuzzy subset corresponding to the image export strategy and compression configuration information according to the first, third, and fourth fuzzy subsets and preset fuzzy rules; the second fuzzy subset, regardless of whether it belongs to S, M, or B, does not affect the fifth fuzzy subset corresponding to the image export strategy and compression configuration information.
[0031] In the embodiments of this application, the preset fuzzy procedure includes at least one of the following: when the first fuzzy subset is S, the third fuzzy subset is S, and the fourth fuzzy subset is S, the fuzzy subset corresponding to the first export duration is S, the fuzzy subset corresponding to the compression configuration information is S, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is S; when the first fuzzy subset is M, the third fuzzy subset is M, and the fourth fuzzy subset is M, the fuzzy subset corresponding to the first export duration is M, the fuzzy subset corresponding to the compression configuration information is M, the fuzzy subset corresponding to the number of blocks is M, the fuzzy subset corresponding to the target availability zone is M, and the fuzzy subset corresponding to the target export bucket is M; when the first fuzzy subset is B, the third fuzzy subset is B, and the fourth fuzzy subset is B, the fuzzy subset corresponding to the first export duration is B, the fuzzy subset corresponding to the compression configuration information is B, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is B.
[0032] It should be noted that the first fuzzy subset S can be understood as memory usage information (memory utilization rate) being S; the third fuzzy subset S can be understood as image type being S; and the fourth fuzzy subset S can be understood as image size being S. The meanings of the first fuzzy subset being M or B, the third fuzzy subset being M or B, and the fourth fuzzy subset being M or B are the same as those described above, and will not be repeated here.
[0033] It should be noted that, when the first fuzzy subset is S, the third fuzzy subset is S, and the fourth fuzzy subset is S, the fuzzy subset corresponding to the first export duration is S, the fuzzy subset corresponding to the compression configuration information is S, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is S. For example, if the memory usage is S, the image type is S, and the image size is S, then the expected export duration is S, the compression algorithm is S, the number of blocks is S, the target Availability Zone is B, and the target export bucket is S.
[0034] It should be noted that, when the first fuzzy subset is M, the third fuzzy subset is M, and the fourth fuzzy subset is M, the fuzzy subset corresponding to the first export duration is M, the fuzzy subset corresponding to the compression configuration information is M, the fuzzy subset corresponding to the number of blocks is M, the fuzzy subset corresponding to the target availability zone is M, and the fuzzy subset corresponding to the target export bucket is M. For example, if the memory usage is M, the image type is M, and the image size is M, then the expected export duration is M, the compression algorithm is M, the number of blocks is M, the target availability zone is M, and the target export bucket is M.
[0035] It should be noted that, when the first fuzzy subset is B, the third fuzzy subset is B, and the fourth fuzzy subset is B, the fuzzy subset corresponding to the first export duration is B, the fuzzy subset corresponding to the compression configuration information is B, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is B. For example, if the memory usage rate is B, the image type is B, and the image size is B, then the expected export duration is B, the compression algorithm is B, the number of blocks is S, the target availability zone is S, and the target export bucket is B.
[0036] The solution in this application embodiment fuzzifies the input quantities (memory usage information, network bandwidth usage information, image type and image size), and then outputs the optimal image export strategy and compression configuration through a two-layer fuzzy neural network model, thereby optimizing image compression efficiency and improving image export efficiency.
[0037] In this embodiment of the application, the method further includes: obtaining the sample export duration, sample memory usage information, sample network bandwidth usage information, sample image type, and sample image size corresponding to the exported sample image; inputting the sample memory usage information, sample network bandwidth usage information, sample image type, and sample image size into the initial two-layer fuzzy neural network model to obtain the second export duration; and training the initial two-layer fuzzy neural network model using the sample export duration and the second export duration to obtain the two-layer fuzzy neural network model.
[0038] It should be noted that the initial two-layer fuzzy neural network model is an untrained fuzzy neural network model; the two-layer fuzzy neural network model is a trained fuzzy neural network model.
[0039] It should be noted that the sample export duration can be understood as the actual time required to export the sample image, i.e., the actual export time. Sample memory usage information can be understood as the sample memory usage rate, or as the memory usage metric during the sample image export process. Sample network bandwidth usage information can be understood as the sample network bandwidth utilization rate, or as the network bandwidth utilization rate during sample image export overload. Sample image type and sample image size can be understood as the image type and size corresponding to the exported sample image; image types include operating system images, data-intensive images, and special format images; image size can be determined based on actual circumstances and is not limited here.
[0040] It should be noted that the second export duration can be understood as the expected export duration obtained using the initial two-layer fuzzy neural network model, i.e., the expected export time. Training the initial two-layer fuzzy neural network model using the sample export duration and the second export duration yields a two-layer fuzzy neural network model. This can be understood as updating the model parameters of the initial two-layer fuzzy neural network model using the difference between the sample export duration and the second export duration until the difference is less than the error threshold, thus obtaining the two-layer fuzzy neural network model. The model parameters to be updated include the center position and width of the membership function. The error threshold can be determined based on the mirror size and is not limited here; as an example, when the mirror size (G) is [0,5], the error threshold can be set to 1 minute (min); when the mirror size (G) is [5,10], the error threshold can be set to 2 minutes (min); and when the mirror size (G) is [10,15], the error threshold can be set to 3 minutes (min).
[0041] The solution in this application, by using the sample export time and the second export time to train the initial two-layer fuzzy neural network model, can ensure that the error between the expected export time and the actual export time is less than the error threshold, thereby improving the accuracy of the prediction of the trained two-layer fuzzy neural network model.
[0042] To facilitate understanding, an example is provided here to illustrate the above method. The image export method described above can be used as an example to illustrate an optimized method for cloud computing image export, offering the following advantages: 1. Improves image export efficiency. Currently, image export uses a single compression algorithm, fixed block size, and maximum number of blocks. When the number of blocks does not exceed the maximum number of blocks, the block size takes the default value, resulting in a large difference in compression efficiency between different images. Since memory needs to store the data to be compressed and the compressed data, it largely determines the compression algorithm. At the same time, network bandwidth is positively correlated with high compression ratio data network transmission. Therefore, this application uses memory usage, network bandwidth utilization, image type, and image size as input to the fuzzy neural network model, and outputs the predicted export time, the optimal image compression algorithm, and the number of image blocks to optimize image compression efficiency and improve image export efficiency.
[0043] 2. Optimize the user experience of image export. Currently, image export uses a fixed export strategy, which is manually triggered by the user. The target Availability Zone (AZ) and image export bucket are pre-set in the image console and executed by the underlying image export interface. If the target AZ is too far from the workload or the target export bucket has insufficient space, the image export will fail. This proposal will collect real-time data on the target AZ node's memory usage and the target export bucket's status to select the optimal AZ node and target export bucket, thereby improving the success rate of image export.
[0044] The above-described mirror export method can be detailed as follows: First, design a fuzzy neural network model for mirror export, collect multi-dimensional training datasets from historical mirror export tasks, and use fuzzy logic to fuzzify the input and output before feeding them into the fuzzy neural network for training. The mirror console transmits real-time input data to the model, which then outputs the optimal export strategy and compression configuration. Finally, the underlying mirror export interface is called to complete the mirror export.
[0045] 1. Construction of fuzzy neural network model.
[0046] Fuzzy neural networks can output optimal image export strategies and compression configurations based on real-time network conditions, resource consumption, the type and size of the image to be exported, and the image size. The challenge lies in designing the structure of the fuzzy neural network. This application proposes a two-layer fuzzy neural network (FNN) to better handle the complexity and uncertainty in image export tasks. The two-layer fuzzy neural network possesses self-learning and fuzzy inference capabilities, aiming to improve the model's performance when dealing with nonlinear and uncertain problems. The fuzzy neural network consists of five layers: an input layer, a fuzzification layer, a fuzzy inference layer, a normalization layer, and an output layer. The components and working principle of this model are explained in detail below.
[0047] (1) Input layer: It does not participate in logical operations, but only transmits signals, including four indicators: memory usage, network bandwidth utilization, image type and image size.
[0048] (2) Fuzzification layer: This layer completes the fuzzification of the input variables in (1). Each node in this layer is a fuzzy subset, such as S, M, B, etc. In this paper, Gaussian membership function is used to calculate the membership value of each input variable relative to the fuzzy variable to complete the fuzzification of the input variables. Let the range of the input quantity be [a, b]. The calculation relationship of the fuzzy subset is as follows: S=[a, (2a+b) / 3)], M=[(2a+b) / 3, (2b+a) / 3], B=[(2b+a) / 3, b]. After collecting historical mirror export data, the fuzzy subsets corresponding to the four input quantities are shown in Table 1. Table 1 is the correspondence table between the input quantities and the fuzzy subsets. Table 1 is shown below: Table 1
[0049] The membership degree of the fuzzy subset is calculated as follows, where the membership function expression is: The membership value corresponding to each input can be represented by formulas (1), (2), (3) and (4), as follows: (1) (2) (3) (4) In the above formula, i is the node number of the input layer, where i = 1, 2; j is the node number of the fuzzing layer, where j = 1, 2, 3, 4; , These represent the width and center position of the Gaussian membership function, respectively.
[0050] (3) Fuzzy Inference Layer: This layer mainly uses Madmdani fuzzy rules to calculate the membership values of fuzzy output variables, including derivation strategies, compression settings, etc. Each node represents the membership value of the fuzzy variable to which the output quantity belongs. The calculation formula is shown in formula (5): (5) In the formula, i=1,2,3,4; m=1,2,3,4; n=1,2,3,4.
[0051] (4) Normalization layer: This layer normalizes the fuzzy values of the fuzzy output variable U. The calculation formula is shown in formula (6): (6) (5) Input layer: This layer defuzzifies the fuzzy values of the output variables, meaning the output values can be directly used as parameters for the mirror export API interface. In this case, a weighted average method is used to achieve defuzzification. The calculation formula is shown in formula (7): (7) For ease of understanding, Figure 2 A schematic diagram of an exemplary two-layer fuzzy neural network model provided in this application embodiment; as shown Figure 2 As shown, it includes an input layer, a fuzzification layer, a fuzzy inference layer, a normalization layer, and an output layer. The inputs are network bandwidth, memory usage, image type, and image size. The outputs are the expected export duration, compression algorithm, number of blocks, target AZ, and target export bucket.
[0052] During the training process, the fuzzy neural network primarily updates its model parameters based on the error between the predicted and actual output times. The parameters to be updated include the center position and width of the membership function. Through iterative parameter updates, the difference between the predicted and actual image output times is kept below an error threshold. The error thresholds for different image sizes are shown in Table 2, which illustrates the correspondence between image size and error thresholds. Table 2
[0053] The main parameters of the fuzzy neural network are set as follows: 2000 iterations, a learning rate of 0.05, and an error threshold. The mirror-derived training data is input into the input layer for training. Training terminates when the difference between the expected and actual mirror-derived time is less than the corresponding error threshold. At this point, the mean absolute error (MAE) on the test set is 0.022, indicating that the model meets the fuzzy control requirements for mirror-derived output.
[0054] 2. Construction of training data and determination of fuzzy rules.
[0055] The accuracy of fuzzy neural network predictions is determined by both the training data and the fuzzy rules. The following will explain in detail the formulation of training data and fuzzy rules.
[0056] 2.1 Development of training data.
[0057] (1) Export time: Record the duration of the export process for each mirror export task as the model output, provide the model with the export time difference for reverse training, and at the same time, the model serves as an important indicator for evaluating the mirror export effect.
[0058] (2) Resource consumption: Record the memory usage metrics during each image export task. Memory is used to store the data to be compressed and the compressed data. For large-scale data processing, sufficient memory can ensure the efficient operation of the compression algorithm and largely determines the compression algorithm.
[0059] (3) Network Status: Monitor and record network bandwidth usage during the image export process. This indicator directly affects the export speed and success rate. Network bandwidth is positively correlated with high compression ratio data network transmission and largely determines the data transmission speed during the image export process.
[0060] (4) Image Type: Exported images are categorized and recorded, including image type and image size. This proposal involves three image types: operating system images, data-intensive images, and special format images. Different image types have different export characteristics and requirements, which helps the model learn the processing characteristics of different images. The image compression types involved in this application embodiment are gzip, lz4, zstd, and Snappy. Table 3 shows the compression algorithm performance table provided in this application embodiment, as shown below: Table 3
[0061] 2.2 The following principles shall be followed in establishing fuzzy rules.
[0062] The fuzzy subsets of compression algorithms gzip, lz4, zstd, and Snappy correspond to B, M, M, and S, respectively. The target availability zone (AZ) is divided into fuzzy subsets (B, M, S) based on the number of image export tasks under the current AZ. The target export bucket determines the fuzzy subsets (B, M, S) based on the maximum number of image blocks. The subsets with the maximum number of blocks are as follows: B ∈ (10000-15000), M ∈ (5000-10000), S ∈ (0-5000). This application embodiment collects historical data on memory usage, image type, and image size, and creates fuzzy rules based on the performance of the above compression algorithms, as detailed below: (1) If the memory usage rate is S, the image type is S, and the image size is S, then the expected export time is S, the compression algorithm is S, the number of blocks is S, the target AZ is B, and the target export bucket is S.
[0063] (2) If the memory usage rate is M, the image type is M, and the image size is M, then the expected export time is M, the compression algorithm is M, the number of blocks is M, the target AZ is M, and the target export bucket is M.
[0064] (3) If the memory usage rate is B, the image type is B, and the image size is B, then the expected export time is B, the compression algorithm is B, the number of blocks is S, the target AZ is S, and the target export bucket is B.
[0065] To briefly describe (1) above, if the memory usage is S, the image type is an image of type S, and the image size is also S, then in the output, the export duration is S, the number of blocks is also S, the target AZ distance can be B, and the target export bucket resource capacity can be S.
[0066] All training data can be obtained through mirror component log analysis, monitoring tools, and API interfaces. Data preprocessing was performed on the training data, including data cleaning, missing value handling, and data transformation. This study collected 1000 mirror-exported data entries. To ensure the model is adequately trained and to prevent overfitting, the processed data was divided into training, validation, and test sets at a ratio of 70%, 15%, and 15%, respectively, for model training, parameter tuning, and final performance evaluation.
[0067] 3. Fuzzification of input and output parameters.
[0068] The uncertainty of input variables is addressed using fuzzy set theory. Each input variable corresponds to three fuzzy subsets (S, M, B) and a corresponding Gaussian membership function. The membership function determines the degree to which each input value belongs to each fuzzy set. The fuzzy signal processed by the fuzzy logic layer is directly used as the input to the neural network layer. The output of the neural network layer includes the compression configuration of the derivation strategy. The derivation strategy includes the target AZ, the target derivation bucket, and the number of blocks. The compression configuration represents the selection of different compression algorithms. Each output variable maintains the same fuzzy subset as the input variable. Taking network bandwidth utilization as an example, the division of the fuzzy domain is illustrated. Figure 3 This application provides an exemplary schematic diagram of fuzzy subset partitioning of input and output quantities; as shown in the embodiments of this application. Figure 3 As shown, the fuzzy subsets corresponding to [0,7.5], (7.5,22.5], and (22.5,30] are S, M, and B, respectively.
[0069] 4. Optimized image export path.
[0070] Since different types of images have different requirements for memory and bandwidth, using an appropriate number of blocks can improve the speed of image transmission. Based on the export strategy and compression configuration of the fuzzy neural network output, different compression algorithms and transmission block numbers are used for different types of images to improve the concurrent download speed. At the same time, the remaining space of the export bucket and the concurrent write volume are obtained, and the export bucket with a concurrent write volume greater than the number of image blocks is selected first. Thus, the overall orchestration of image export is completed. Figure 4 This application provides an exemplary flowchart illustrating the process of deriving a fuzzy neural network; for example... Figure 4 As shown, the specific steps are as follows: 1. Create an image export request.
[0071] It should be noted that users create image export requests to the image console.
[0072] 2. Input real-time parameters: Export start time, resource consumption, network status and image type.
[0073] It should be noted that the mirror console inputs real-time parameters to the fuzzy neural network model.
[0074] 3. Output parameters: estimated export time, target AZ, export bucket name, compression algorithm, and number of image blocks.
[0075] It should be noted that the fuzzy neural network model outputs parameters to the image management component.
[0076] 4. Export to the corresponding storage bucket, including image sharding, block verification, and asynchronous transfer.
[0077] It should be noted that the image management component is exported to the corresponding object storage bucket.
[0078] Figure 5 This application provides another exemplary flowchart for exporting a fuzzy neural network image; as shown in the embodiments of this application. Figure 5 As shown, it includes neural network input acquisition, neural network prediction output, and image export. Neural network input acquisition includes the image console acquiring information from user source data and monitoring memory usage and network bandwidth in real time. It obtains the image type and image size through the image acquisition API and inputs them into the fuzzy neural network. The output is the compression algorithm, number of blocks, target AZ and target bucket. It is then exported to the image management component through the image export API for block verification (e.g., dividing into massive small files and GB / TB large files) and asynchronously transmitted to object storage.
[0079] The solution in this application embodiment automatically selects the optimal image export strategy and compression configuration through a trained fuzzy neural network model, and automatically verifies the storage backend, thereby improving the success rate and speed of image export.
[0080] This application provides an image export device. Figure 6 This is a schematic diagram of the structure of a mirror export device provided in an embodiment of this application; as shown below. Figure 6 As shown, the mirror export device 600 includes: The acquisition unit 601 is used to acquire memory usage information, network bandwidth usage information, and the image type and size corresponding to the image to be exported. Unit 602 is used to input the memory usage information, the network bandwidth usage information, the image type and the image size into a two-layer fuzzy neural network model to obtain the image export strategy and compression configuration information. The export unit 603 is used to export the image to be exported based on the image export strategy and the compression configuration information.
[0081] In some embodiments, the obtaining unit 602 is further configured to determine the first fuzzy subset corresponding to the memory usage information, the second fuzzy subset corresponding to the network bandwidth usage information, the third fuzzy subset corresponding to the image type, and the fourth fuzzy subset corresponding to the image size; and determine the image export strategy and compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset, and preset fuzzy rules.
[0082] In some embodiments, the obtaining unit 602 is further configured to determine, respectively, a first membership value corresponding to the memory usage information, a second membership value corresponding to the network bandwidth usage information, a third membership value corresponding to the image type, and a fourth membership value corresponding to the image size; determine a first fuzzy subset based on the first membership value; determine a second fuzzy subset based on the second membership value; determine a third fuzzy subset based on the third membership value; and determine a fourth fuzzy subset based on the fourth membership value.
[0083] In some embodiments, the obtaining unit 602 is further configured to determine a fifth fuzzy subset corresponding to the image export strategy and the compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset and a preset fuzzy rule; and to perform normalization and clearing processing on the fifth fuzzy subset to obtain the image export strategy and the compression configuration information.
[0084] In some embodiments, the image export strategy includes at least the first export duration, the number of blocks, the target availability zone, and the target export bucket corresponding to the image to be exported.
[0085] In some embodiments, the preset fuzzy rule includes at least one of the following: When the first fuzzy subset is S, the third fuzzy subset is S, and the fourth fuzzy subset is S, the fuzzy subset corresponding to the first export duration is S, the fuzzy subset corresponding to the compression configuration information is S, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is S. When the first fuzzy subset is M, the third fuzzy subset is M, and the fourth fuzzy subset is M, the fuzzy subset corresponding to the first export duration is M, the fuzzy subset corresponding to the compression configuration information is M, the fuzzy subset corresponding to the number of blocks is M, the fuzzy subset corresponding to the target availability zone is M, and the fuzzy subset corresponding to the target export bucket is M. When the first fuzzy subset is B, the third fuzzy subset is B, and the fourth fuzzy subset is B, the fuzzy subset corresponding to the first export duration is B, the fuzzy subset corresponding to the compression configuration information is B, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is B.
[0086] In some embodiments, the image export device 600 further includes a training unit, configured to acquire sample export duration, sample memory usage information, sample network bandwidth usage information, sample image type, and sample image size corresponding to the exported sample image; input the sample memory usage information, the sample network bandwidth usage information, the sample image type, and the sample image size into an initial two-layer fuzzy neural network model to obtain a second export duration; and train the initial two-layer fuzzy neural network model using the sample export duration and the second export duration to obtain the two-layer fuzzy neural network model.
[0087] This application also provides an electronic device. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown below. Figure 7 As shown, the electronic device 700 includes a processor 701 and a memory 703. Optionally, the electronic device 700 may also include a communication bus 702.
[0088] In specific embodiments, the processor 701 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.
[0089] In this embodiment, the communication bus 702 is used to establish communication between the processor 701 and the memory 703; when the processor 701 executes the running program stored in the memory 703, it implements the following image export method: Obtain memory usage information, network bandwidth usage information, image type and image size corresponding to the image to be exported; input the memory usage information, network bandwidth usage information, image type and image size into a two-layer fuzzy neural network model to obtain image export strategy and compression configuration information; export the image to be exported based on the image export strategy and compression configuration information.
[0090] Furthermore, the processor 701 is also configured to determine the first fuzzy subset corresponding to the memory usage information, the second fuzzy subset corresponding to the network bandwidth usage information, the third fuzzy subset corresponding to the image type, and the fourth fuzzy subset corresponding to the image size; and to determine the image export strategy and compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset, and preset fuzzy rules.
[0091] Furthermore, the processor 701 is also configured to determine, respectively, a first membership value corresponding to the memory usage information, a second membership value corresponding to the network bandwidth usage information, a third membership value corresponding to the image type, and a fourth membership value corresponding to the image size; determine a first fuzzy subset based on the first membership value; determine a second fuzzy subset based on the second membership value; determine a third fuzzy subset based on the third membership value; and determine a fourth fuzzy subset based on the fourth membership value.
[0092] Furthermore, the processor 701 is also configured to determine a fifth fuzzy subset corresponding to the image export strategy and the compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset and preset fuzzy rules; and to perform normalization and clearing processing on the fifth fuzzy subset to obtain the image export strategy and the compression configuration information.
[0093] Furthermore, the image export strategy includes at least the first export duration, the number of blocks, the target availability zone, and the target export bucket corresponding to the image to be exported.
[0094] Further, the preset fuzzy rules include at least one of the following: when the first fuzzy subset is S, the third fuzzy subset is S, and the fourth fuzzy subset is S, the fuzzy subset corresponding to the first export duration is S, the fuzzy subset corresponding to the compression configuration information is S, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is S; when the first fuzzy subset is M, the third fuzzy subset is M, and the fourth fuzzy subset is M, the fuzzy subset corresponding to the first export duration is M. The fuzzy subset corresponding to the compression configuration information is M, the fuzzy subset corresponding to the number of blocks is M, the fuzzy subset corresponding to the target availability zone is M, and the fuzzy subset corresponding to the target export bucket is M; when the first fuzzy subset is B, the third fuzzy subset is B, and the fourth fuzzy subset is B, the fuzzy subset corresponding to the first export duration is B, the fuzzy subset corresponding to the compression configuration information is B, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is B.
[0095] Furthermore, the processor 701 is also used to obtain the sample export duration, sample memory usage information, sample network bandwidth usage information, sample image type, and sample image size corresponding to the exported sample image; input the sample memory usage information, the sample network bandwidth usage information, the sample image type, and the sample image size into the initial two-layer fuzzy neural network model to obtain the second export duration; and train the initial two-layer fuzzy neural network model using the sample export duration and the second export duration to obtain the two-layer fuzzy neural network model.
[0096] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors. The computer program implements the image export method described above.
[0097] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the image export method as described above.
[0098] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0100] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method for exporting an image, characterized in that, The method includes: Obtain information on memory usage, network bandwidth usage, and the image type and size of the image to be exported; The memory usage information, the network bandwidth usage information, the image type, and the image size are input into a two-layer fuzzy neural network model to obtain the image export strategy and compression configuration information. The image to be exported is exported based on the image export strategy and the compression configuration information.
2. The method according to claim 1, characterized in that, The process of inputting the memory usage information, network bandwidth usage information, image type, and image size into a two-layer neural network model to obtain image export strategy and compression configuration information includes: The first fuzzy subset corresponding to the memory usage information, the second fuzzy subset corresponding to the network bandwidth usage information, the third fuzzy subset corresponding to the image type, and the fourth fuzzy subset corresponding to the image size are determined respectively. The image export strategy and compression configuration information are determined based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset, and preset fuzzy rules.
3. The method according to claim 2, characterized in that, The step of determining the first fuzzy subset corresponding to the memory usage information, the second fuzzy subset corresponding to the network bandwidth usage information, the third fuzzy subset corresponding to the image type, and the fourth fuzzy subset corresponding to the image size includes: The first membership value corresponding to the memory usage information, the second membership value corresponding to the network bandwidth usage information, the third membership value corresponding to the image type, and the fourth membership value corresponding to the image size are determined respectively. The first fuzzy subset is determined based on the first membership value; the second fuzzy subset is determined based on the second membership value; the third fuzzy subset is determined based on the third membership value; and the fourth fuzzy subset is determined based on the fourth membership value.
4. The method according to claim 2, characterized in that, The step of determining the image export strategy and compression configuration information based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset, and preset fuzzy rules includes: Based on the first fuzzy subset, the second fuzzy subset, the third fuzzy subset, the fourth fuzzy subset, and preset fuzzy rules, a fifth fuzzy subset corresponding to the image export strategy and the compression configuration information is determined; The fifth fuzzy subset is normalized and clarified to obtain the image export strategy and the compression configuration information.
5. The method according to claim 1, characterized in that, The image export strategy includes at least the first export duration, number of blocks, target availability zone, and target export bucket corresponding to the image to be exported.
6. The method according to claim 3, characterized in that, The preset fuzzy rules include at least one of the following: When the first fuzzy subset is S, the third fuzzy subset is S, and the fourth fuzzy subset is S, the fuzzy subset corresponding to the first export duration is S, the fuzzy subset corresponding to the compression configuration information is S, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is S. When the first fuzzy subset is M, the third fuzzy subset is M, and the fourth fuzzy subset is M, the fuzzy subset corresponding to the first export duration is M, the fuzzy subset corresponding to the compression configuration information is M, the fuzzy subset corresponding to the number of blocks is M, the fuzzy subset corresponding to the target availability zone is M, and the fuzzy subset corresponding to the target export bucket is M. When the first fuzzy subset is B, the third fuzzy subset is B, and the fourth fuzzy subset is B, the fuzzy subset corresponding to the first export duration is B, the fuzzy subset corresponding to the compression configuration information is B, the fuzzy subset corresponding to the number of blocks is S, the fuzzy subset corresponding to the target availability zone is S, and the fuzzy subset corresponding to the target export bucket is B.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the sample export time, sample memory usage, sample network bandwidth usage, sample image type, and sample image size corresponding to the exported sample image; Input the sample memory usage information, the sample network bandwidth usage information, the sample image type, and the sample image size into the initial two-layer fuzzy neural network model to obtain the second duration to be exported. The initial two-layer fuzzy neural network model is trained using the sample export duration and the second export duration to obtain the two-layer fuzzy neural network model.
8. A mirror export device, characterized in that, The device includes: The acquisition unit is used to acquire information such as memory usage, network bandwidth usage, and the image type and size of the image to be exported. The unit is used to input the memory usage information, the network bandwidth usage information, the image type and the image size into a two-layer fuzzy neural network model to obtain the image export strategy and compression configuration information. The export unit is used to export the image to be exported based on the image export strategy and the compression configuration information.
9. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, they implement the method described in any one of claims 1 to 7.