Mirror image processing method and device, equipment and computer storage medium
By obtaining and analyzing the resource usage and availability information of the private mirror library, selecting the appropriate private mirror library to perform operations, and optimizing resource allocation, the problem of low mirror processing efficiency is solved, and more efficient mirror processing and resource utilization are achieved. .
Patent Information
- Application Number
- CN202410797772.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-27
AI Technical Summary
The mirror processing efficiency in the existing technology is low. The private mirror library may need to wait when performing a download or upload operation. Moreover, random selection of the private mirror library results in unreasonable utilization of storage resources, and multiple private mirror libraries cannot be effectively utilized.
By obtaining the node resource usage and storage resource availability information of multiple basic mirror private libraries, select the mirror private library with the lowest resource usage or the highest storage resource availability as the target mirror private library, perform the operation corresponding to the user request, and pass Predict trend curves and resource weight coefficients to allocate storage resources and rationally utilize mirror private libraries.
It improves the efficiency of image processing, reduces the operation waiting time, rationally utilizes the storage resources of multiple image private libraries, and improves the efficiency of image management.
Smart Images

Figure CN118714145A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, computer storage medium, and computer program product for image processing. Background Art
[0002] In the computer field, basic images are used more and more widely, and users can download or upload basic images of different applications to meet their own needs.
[0003] In the related art, when processing an image download request, it is necessary to randomly select a private image repository from multiple private image repositories to perform the image download operation. Since the private image repository may need to perform other planned operations before performing this download operation, it will cause more waiting time to perform this operation. When processing an image upload request, it is necessary to randomly select a private image repository from multiple private image repositories to perform the image upload operation. Since a private image repository is randomly selected to upload an image in the related art, it may cause the storage resources of a private image repository to be exhausted while the storage resources of the other private image repositories are sufficient, and it is impossible to reasonably use multiple private image repositories to store images. In summary, the related art is not efficient in processing images. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, apparatus, device, computer storage medium, and computer program product for image processing, which can improve the processing efficiency of a basic image.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for image processing, the method comprising:
[0006] When the user request information is obtained, node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple basic image private repositories is obtained;
[0007] According to the multiple acquired node resource utilization information or storage resource availability information, a basic image private library with the lowest node resource utilization rate or the highest storage resource availability rate is selected from the multiple basic image private libraries as the target image private library;
[0008] A target operation corresponding to the user request information is performed on the target image in the target image private library, and the target image represents the image corresponding to the user request information.
[0009] In an achievable implementation, the user request information includes user upload request information and user download request information. When the user request information is obtained, node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple private image repositories is obtained, including:
[0010] When the user upload request information is obtained, the storage resource availability information of multiple basic image private repositories is obtained;
[0011] When the user download request information is obtained, the node resource usage information of multiple basic image private repositories is obtained.
[0012] In an achievable implementation, the image includes a tool-based image and a business-based image, and the method further includes:
[0013] Obtain storage resource availability information and node resource usage information of the private image repository of the tool-type basic image and the business-type basic image within the first period of time;
[0014] According to the prediction trend curves corresponding to the storage resource availability information and the node resource utilization information of the image private repository of the tool-class basic image and the business-class basic image in the first period of time, storage resource trend information corresponding to the tool-class basic image and the business-class basic image is obtained, and the prediction trend curve is obtained based on at least one of the image historical call information, the historical node resource utilization information of the image private repository, and the historical storage resource availability information of the image private repository;
[0015] According to the storage resource trend information corresponding to the tool-class basic image and the business-class basic image, the resource weight coefficients of the tool-class basic image and the business-class basic image in the image private library are determined, and the sum of the resource weight coefficients of the tool-class basic image in the image private library and the resource weight coefficients of the business-class basic image in the image private library is equal to 1;
[0016] Allocate storage resources of the private image repository based on the resource weight coefficients of the tool-based images and business-based images in the private image repository.
[0017] In one possible implementation, the method further includes:
[0018] Obtain image call information of tool-class basic images and business-class basic images within the second time period;
[0019] Obtaining call trend information corresponding to the tool-class basic image and the business-class basic image according to the image call information of the tool-class basic image and the business-class basic image within the second period and the prediction trend curve corresponding to the image call information;
[0020] Determine, according to the call trend information corresponding to the tool class basic image and the business class basic image, a plurality of tool class basic image control parameters corresponding to the tool class basic image and a plurality of business class basic image control parameters corresponding to the business class basic image;
[0021] According to the call trend information corresponding to the tool class basic image and the business class basic image, respectively determine the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image, and the sum of the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image is equal to 1;
[0022] By using the preset control value formula, the number of copies of the tool class basic image and the business class basic image is determined according to the tool class basic image control parameters, the business class basic image control parameters, the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image.
[0023] In an achievable implementation, before obtaining the call trend information corresponding to the tool class basic image and the business class basic image according to the image call information of the tool class basic image and the business class basic image within the second time period and the prediction trend curve corresponding to the image call information, the method further includes:
[0024] Obtain historical operation information, including historical image call information, historical node resource usage information of the image private library, and historical storage resource availability information of the image private library;
[0025] According to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period, a plurality of corresponding trend curves are obtained respectively;
[0026] Linear regression training is performed on multiple trend curves to obtain multiple predicted trend curves.
[0027] In an achievable implementation, before obtaining a plurality of corresponding trend curves according to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period, the method further includes:
[0028] Detect whether the preset training cycle has been reached;
[0029] When the preset training cycle is detected, determine to obtain a plurality of corresponding trend curves according to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period;
[0030] or
[0031] Detect whether the storage resource availability information of the private image repository is lower than a first threshold;
[0032] When it is detected that the storage resource availability information of the mirror private library is lower than the first threshold, determine to obtain a corresponding trend curve according to the storage resource availability information of the mirror private library within the third time period;
[0033] or
[0034] Detect whether the node resource usage information of the private image library is lower than the second threshold;
[0035] When it is detected that the node resource usage information of the mirror private library is lower than the second threshold, it is determined to obtain a corresponding trend curve according to the node resource usage information of the mirror private library within a third time period.
[0036] In an achievable implementation, after performing a target operation corresponding to the user request information on the target image in the target image private library, the method further includes:
[0037] Record the operation information corresponding to the target operation;
[0038] The operation information and the historical operation information are combined to obtain the target historical operation information.
[0039] In a second aspect, an embodiment of the present disclosure provides a device for image processing, the device comprising:
[0040] An acquisition module, wherein the acquisition module is used to acquire node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple basic image private repositories when the user request information is acquired;
[0041] A selection module, the selection module is used to select a basic image private library with the lowest node resource utilization rate or the highest storage resource availability rate from multiple basic image private libraries as a target image private library according to multiple acquired node resource utilization rate information or storage resource availability rate information;
[0042] The execution module is used to execute a target operation corresponding to the user request information on the target image in the target image private library, and the target image represents the image corresponding to the user request information.
[0043] In a third aspect, an embodiment of the present disclosure provides a mirror processing device, the device comprising a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement a mirror processing method as described in any one of the first aspects.
[0044] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method for mirror processing as described in any one of the first aspects is implemented.
[0045] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which implements the mirror processing method as described in any one of the first aspects when the computer program is executed by a processor.
[0046] The image processing method, device, equipment, computer storage medium and computer program product provided by the embodiment of the present disclosure obtain node resource utilization information or storage resource availability information corresponding to the user request information of multiple basic image private repositories when user request information is obtained. By obtaining the node resource utilization information or storage resource availability information of multiple basic image private repositories in real time, the management efficiency of the basic image private repositories can be improved. According to the multiple acquired node resource utilization information or storage resource availability information, the basic image private repositories with the lowest node resource utilization or the highest storage resource availability are selected from the multiple basic image private repositories as the target image private repositories. The target operation corresponding to the user request information is performed on the target image in the target image private repositories. The embodiment of the present disclosure can reduce the waiting time required for this operation by selecting the basic image private repositories with the lowest node resource utilization rate from the multiple basic image private repositories as the target image private repositories. The embodiment of the present disclosure can reasonably utilize multiple image private repositories to store images by selecting the basic image private repositories with the highest storage resource availability from the multiple basic image private repositories as the target image private repositories. In summary, the embodiment of the present disclosure improves the processing efficiency of images. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 It is a flowchart of a mirror processing method provided by an embodiment of the present disclosure;
[0049] Figure 2 It is a flowchart of a method for obtaining node resource information provided by an embodiment of the present disclosure;
[0050] Figure 3 is a flowchart of a method for merging operation information provided by an embodiment of the present disclosure;
[0051] Figure 4 is a structural schematic diagram of a mirror processing device provided by an embodiment of the present disclosure;
[0052] Figure 5 It is a structural schematic diagram of a mirror processing device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present invention, rather than to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0054] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0055] Before describing the technical solutions provided by the embodiments of the present disclosure, in order to facilitate understanding of the embodiments of the present disclosure, the present disclosure specifically describes the problems existing in the related technologies:
[0056] Currently, basic images are used more and more widely, and users can download or upload basic images of different applications to meet their own needs.
[0057] In the related art, when processing an image download request, it is necessary to randomly select one of the multiple private image repositories to perform the image download operation. Since the private image repository may need to perform other planned operations before performing this download operation, it will cause more waiting time to perform this operation. When processing an image upload request, it is necessary to randomly select one of the multiple private image repositories to perform the image upload operation. Since a private image repository is randomly selected to upload an image in the related art, it may cause the storage resources of a private image repository to be exhausted while the storage resources of the other private image repositories are sufficient, and it is impossible to reasonably use multiple private image repositories to store images.
[0058] In addition, the related technology does not classify the basic images according to business types, nor does it conduct intelligent statistical analysis on the usage of the basic image private library.
[0059] In summary, the processing efficiency of the image by the related technology is not high.
[0060] In view of the above research findings of the inventors, the embodiments of the present disclosure provide a method, apparatus, device, computer storage medium and computer program product for image processing, which can solve at least one of the above technical problems existing in the related art.
[0061] After receiving the user request information, the disclosed embodiment obtains the resource usage and storage availability of multiple basic image private repositories, and selects the basic image private repository with the least resource usage or the most storage availability as the target image private repository. Finally, the target image private repository is used to perform the corresponding operation. By dynamically monitoring the resource conditions of multiple basic image nodes and selecting the best, the processing efficiency of the image is improved.
[0062] In addition, tool-based basic images are usually large in size, with high usage frequency and concurrency, and high requirements for distributed storage. Business-based basic images are usually small in size, with low usage frequency and concurrency, and low requirements for distributed storage. Therefore, based on the different application scenarios, uses, and characteristics of basic images of different business types, allocating corresponding resources to basic images by business type can improve management efficiency.
[0063] In addition, the basic image call data and related resource usage data are intelligently analyzed, that is, a prediction model is built based on the basic image call information and resource usage information obtained through monitoring. The prediction model predicts future needs and readjusts the resource allocation of nodes accordingly, improving the processing efficiency of images.
[0064] The following first introduces the mirror processing method provided by the embodiment of the present disclosure.
[0065] Figure 1 FIG. 1 is a flow chart showing a method for image processing provided by an embodiment of the present disclosure. Figure 1 The method may include the following steps S110-S130.
[0066] S110: When the user request information is obtained, node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple basic image private repositories is obtained.
[0067] After receiving the user request information, the master node uses the monitoring program to obtain the node resource usage rate information or storage resource availability rate information of multiple basic image private repositories corresponding to the user request information.
[0068] Among them, the basic image private library represents the slave node of the image cluster.
[0069] In an example, the node resource usage information may include information such as the node's CPU usage, memory usage, and I / O usage, and the storage resource availability information may include information such as the node's CPU availability, memory availability, and I / O availability.
[0070] S120: According to the multiple acquired node resource usage information or storage resource availability information, a basic image private repository with the lowest node resource usage or the highest storage resource availability is selected from the multiple basic image private repositories as the target image private repository.
[0071] After receiving multiple acquired node resource utilization information or storage resource availability information, the master node selects a node with the lowest node resource utilization rate or the highest storage resource availability rate from the multiple nodes as the target node.
[0072] S130: Execute a target operation corresponding to the user request information on the target image in the target image private library.
[0073] After being determined as a target node, the slave node performs a target operation corresponding to the user request information on the target image in the slave node, wherein the target image represents the image corresponding to the user request information.
[0074] In the case of obtaining user request information, the disclosed embodiment obtains node resource utilization information or storage resource availability information corresponding to the user request information of multiple basic image private repositories. By obtaining the node resource utilization information or storage resource availability information of multiple basic image private repositories in real time, the management efficiency of the basic image private repositories can be improved. According to the multiple acquired node resource utilization information or storage resource availability information, the basic image private repositories with the lowest node resource utilization or the highest storage resource availability are selected from the multiple basic image private repositories as the target image private repositories. The target operation corresponding to the user request information is performed on the target image in the target image private repositories. The disclosed embodiment can reduce the waiting time required for this operation by selecting the basic image private repositories with the lowest node resource utilization as the target image private repositories from the multiple basic image private repositories. The disclosed embodiment can reasonably utilize multiple image private repositories to store images by selecting the basic image private repositories with the highest storage resource availability as the target image private repositories from the multiple basic image private repositories. Therefore, the disclosed embodiment improves the processing efficiency of the image.
[0075] In one embodiment, Figure 2 As shown, step S110 obtains node resource usage information or storage resource availability information corresponding to the user request information of multiple basic image private repositories when the user request information is obtained, which may include steps S111 and S112.
[0076] S111: When user upload request information is obtained, storage resource availability information of multiple basic image private repositories is obtained.
[0077] When receiving the user's upload request information, the master node uses the monitoring application to obtain the storage resource availability information of multiple basic image private repositories.
[0078] S112: When the user download request information is obtained, node resource usage information of multiple basic image private repositories is obtained.
[0079] When receiving the download request information from the user, the master node uses the monitoring application to obtain the node resource usage information of multiple basic image private repositories.
[0080] When receiving different request information from users, the embodiment of the present disclosure obtains node resource information corresponding to the user request information, which reflects the ability of the embodiment of the present disclosure to flexibly process user request information.
[0081] In one embodiment, the mirror processing method further includes steps S210 - S240 .
[0082] S210: Obtain storage resource availability information and node resource usage information of the private image repository of the tool-type basic image and the business-type basic image within the first period of time.
[0083] The master node obtains storage resource availability information and node resource usage information of the private image repository of the tool-type basic image and the business-type basic image within a preset first time period according to the historical records. The length of the first time period is set according to user needs.
[0084] S220: Obtain storage resource trend information corresponding to the tool-class basic image and the business-class basic image according to the prediction trend curves corresponding to the storage resource availability information and the node resource usage information of the image private repositories of the tool-class basic image and the business-class basic image within the first period of time.
[0085] The master node inputs the storage resource availability information and node resource utilization information of the private image repository of the tool-type basic image and the business-type basic image within the first period of time into the corresponding prediction trend curve to determine the storage trend information of the tool-type basic image and the business-type basic image within a certain period of time in the future.
[0086] The prediction trend information represents the corresponding relationship between the node's resources and time. There are multiple prediction trend curves, which correspond to different node resources such as memory trend curve, hard disk capacity trend curve and other trend curves. The prediction trend curve is obtained based on at least one of the image history call information, the image private library's historical node resource utilization rate information and the image private library's historical storage resource availability rate information.
[0087] Among them, the prediction trend curves corresponding to the resources of different slave nodes are different.
[0088] S230: Determine resource weight coefficients of the tool-class basic image and the business-class basic image in the image private repository according to storage resource trend information corresponding to the tool-class basic image and the business-class basic image.
[0089] After the master node calculates the storage resource trend information corresponding to the tool class basic image and the business class basic image, it determines the resource weight coefficients of the tool class basic image and the business class basic image in the image private library according to the storage resource trend information corresponding to the tool class basic image and the business class basic image. Among them, the sum of the resource weight coefficient of the tool class basic image in the image private library and the resource weight coefficient of the business class basic image in the image private library is equal to 1.
[0090] In one example, WT is the hard disk capacity weight coefficient, including the tool class hard disk capacity weight coefficient WTT, the business class hard disk capacity weight coefficient WTB, and WTT+WTB=1. WC is the CPU weight coefficient, including the tool class CPU weight coefficient WCT, the business class CPU weight coefficient WCB, and WCT+WCB=1. WM is the memory weight coefficient, including the tool class memory weight coefficient WMT, the business class memory weight coefficient WMB, and WMT+WMB=1. WIO is the I / O weight coefficient, including the tool class I / O weight coefficient WIOT, the business class I / O weight coefficient WIOB, and WIOT+WIOB=1. WN is the network weight coefficient, including the tool class network weight coefficient WNT, the business class network weight coefficient WNB, and WNT+WNB=1.
[0091] S240: Allocate storage resources of the image private repository according to resource weight coefficients of the tool-type basic images and the business-type basic images in the image private repository.
[0092] After determining the resource weight coefficient of the tool-type basic image in the image private library and the resource weight coefficient of the business-type basic image in the image private library, the master node allocates storage resources to each image private library according to the corresponding resource weight coefficient.
[0093] The disclosed embodiment inputs the storage resource availability information and node resource utilization information of the tool-type basic image and the business-type basic image within a first period of time into a prediction trend curve, obtains the corresponding prediction trend information and determines the resource weight coefficient, thereby reasonably allocating storage resources and improving the availability of storage resources.
[0094] In one example, the mirroring method further includes steps S310 - S350 .
[0095] S310: Obtain image call information of a tool-type basic image and a business-type basic image within a second time period.
[0096] The master node uses the monitoring application to obtain the image call information of the tool-based image and the business-based image within the second time period. The length of the second time period is set according to user needs, and the image call information represents the usage frequency and concurrency of the tool-based image and the business-based image.
[0097] S320: Obtain call trend information corresponding to the tool-class basic image and the business-class basic image according to the image call information of the tool-class basic image and the business-class basic image within the second period and the prediction trend curve corresponding to the image call information.
[0098] After receiving the image call information of the tool class basic image and the business class basic image within the second time period, the master node inputs the image call information of the tool class basic image and the business class basic image within the second time period into the corresponding prediction trend curve to obtain the call trend information corresponding to the tool class basic image and the business class basic image.
[0099] S330: Determine a plurality of tool-class basic image control parameters corresponding to the tool-class basic image and a plurality of business-class basic image control parameters corresponding to the business-class basic image according to the call trend information corresponding to the tool-class basic image and the business-class basic image.
[0100] After the master node calculates the call trend information corresponding to the tool class basic image and the business class basic image, it determines multiple tool class basic image control parameters corresponding to the tool class basic image and multiple business class basic image control parameters corresponding to the business class basic image according to the call trend information corresponding to the tool class basic image and the business class basic image.
[0101] The number of basic image control parameters is not fixed, and frequency control parameters, concurrency control parameters or others may be used. The frequency control parameters and concurrency control parameters may include multiple levels.
[0102] In an example, the tool-class usage frequency control parameter LFT can be divided into 4 levels for control, such as LFT1, LFT2, LFT3, and LFT4, and the business-class usage frequency control parameter LFB can be divided into 3 levels for control, such as LFB1, LFB2, and LFB3. The tool-class concurrency control parameter LQT can be divided into 6 levels for control, such as LQT1, LQT2, LQT3, LQT4, LQT5, and LQT6, and the business-class concurrency control parameter LQB can be divided into 4 levels for control, such as LQB1, LQB2, LQB3, and LQB4.
[0103] S340: Determine a control weight coefficient of the tool-class basic image and a control weight coefficient of the business-class basic image respectively according to the call trend information corresponding to the tool-class basic image and the business-class basic image.
[0104] The master node determines the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image according to the calculated call trend information corresponding to the tool class basic image and the business class basic image.
[0105] The sum of the control weight coefficient of the tool-based basic image and the control weight coefficient of the business-based basic image is equal to 1.
[0106] In one example, the control weight coefficient includes a usage frequency control weight coefficient and a concurrency control weight coefficient.
[0107] S350: Determine the number of copies of the tool class basic image and the business class basic image by using a preset control value formula according to the tool class basic image control parameter, the business class basic image control parameter, the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image.
[0108] The master node inputs the calculated tool class basic image control parameters, business class basic image control parameters, control weight coefficient of the tool class basic image and control weight coefficient of the business class basic image into the preset control value formula to determine the number of copies of the tool class basic image and the business class basic image on the slave node.
[0109] In an example, the tool class image usage frequency control parameter is 1, the tool class image concurrency control parameter is 1, the tool class image usage frequency control weight coefficient is 0.5, and the tool class image concurrency control weight coefficient is 0.5. Then, the tool class image usage frequency control parameter and the tool class image concurrency control parameter are multiplied, and the result of multiplying the tool class image usage frequency control weight coefficient and the tool class image concurrency control parameter is added to obtain a calculation result of 1.25, and the number of tool class image copies is rounded up to 2.
[0110] The disclosed embodiment can determine the number of copies of the image and improve the availability of node storage resources by obtaining the control parameters and control weight coefficient of the image.
[0111] In an example, before obtaining the call trend information corresponding to the tool class basic image and the business class basic image according to the image call information of the tool class basic image and the business class basic image within the second time period and the predicted trend curve corresponding to the image call information in step S320, steps S410-S430 are also included.
[0112] S410: Obtain historical operation information.
[0113] The master node obtains the historical operation information stored internally, including the historical image call information, the historical node resource usage rate information of the image private library, and the historical storage resource availability rate information of the image private library.
[0114] S420: According to the image call information within the third time period, the node resource usage rate information of the image private library, and the storage resource availability rate information of the image private library, a plurality of corresponding trend curves are obtained respectively.
[0115] After the master node obtains the image call information, the node resource usage rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period, a plurality of corresponding trend curves are obtained.
[0116] S430: Performing linear regression training on the multiple trend curves to obtain multiple predicted trend curves.
[0117] After the master node obtains multiple trend curves, it combines the linear regression algorithm to perform model training and obtain a predicted trend curve.
[0118] The disclosed embodiment determines a trend curve by acquiring historical operation information, thereby determining a predicted trend curve, which can effectively determine a resource control weight coefficient and improve resource availability.
[0119] In one embodiment, before obtaining a plurality of corresponding trend curves according to the image call information, the node resource usage rate information of the image private library and the storage resource availability rate information of the image private library within the third time period in step S420, steps S510-S530 are also included.
[0120] S510: Detect whether a preset training cycle has been reached; when it is detected that the preset training cycle has been reached, determine to obtain a plurality of corresponding trend curves according to the image call information within a third time period, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library.
[0121] Before generating the trend curve, the master node detects whether the preset training cycle has been reached. When the preset training cycle has been reached, it is determined that multiple corresponding trend curves are obtained according to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period.
[0122] S520: Detect whether the storage resource availability information of the mirrored private repository is lower than a first threshold; when it is detected that the storage resource availability information of the mirrored private repository is lower than the first threshold, determine to obtain a corresponding trend curve based on the storage resource availability information of the mirrored private repository within a third time period.
[0123] Before generating the trend curve, the master node detects whether the storage resource availability information of the mirror private library is lower than the first threshold. If it is detected that the storage resource availability information of the mirror private library is lower than the first threshold, the corresponding trend curve is obtained based on the storage resource availability information of the mirror private library within the third time period. The first threshold represents the storage resource availability threshold.
[0124] In one example, if the storage resource availability of the mirror private library is 1%, which is lower than the first threshold of 10%, the master node is triggered to determine an action to obtain a corresponding trend curve based on the storage resource availability information of the mirror private library within the third time period.
[0125] S530: Detect whether the node resource utilization information of the mirror private library is lower than the second threshold; when it is detected that the node resource utilization information of the mirror private library is lower than the second threshold, determine to obtain a corresponding trend curve based on the node resource utilization information of the mirror private library within a third time period.
[0126] Before generating the trend curve, the master node detects whether the node resource utilization information of the mirror private library is lower than the second threshold. If it is detected that the node resource utilization information of the mirror private library is lower than the second threshold, the corresponding trend curve is obtained based on the node resource utilization information of the mirror private library within the third time period. The second threshold represents the node resource utilization threshold of the mirror private library.
[0127] The disclosed embodiment can automatically generate a trend curve by detecting whether a preset training cycle has been reached, detecting whether the storage resource availability information of the mirror private library is lower than a first threshold, and detecting whether the node resource usage information of the mirror private library is lower than a second threshold, thereby obtaining a predicted trend curve to adjust the node resource status.
[0128] In one embodiment, Figure 3 As shown, after performing the target operation corresponding to the user request information on the target image in the target image private library in step S130, steps S140 and S150 are also included:
[0129] S140: Recording operation information corresponding to the target operation.
[0130] After executing the target operation corresponding to the user request information, the master node records and saves the operation information corresponding to the target operation.
[0131] S150: Merge the operation information and the historical operation information to obtain target historical operation information.
[0132] The master node saves the operation information record corresponding to the target operation and merges it with the historical operation information to obtain the target historical operation information.
[0133] In the disclosed embodiment, the master node can obtain the latest historical operation information by recording and saving the operation information corresponding to the target operation and merging it with the historical operation information.
[0134] like Figure 4 As shown, the embodiment of the present disclosure further provides a mirror processing device 600, and the mirror processing device 600 includes:
[0135] The acquisition module 601 is used to acquire the node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple basic image private repositories when the user request information is acquired;
[0136] A selection module 602 is used to select a basic image private library with the lowest node resource utilization rate or the highest storage resource availability rate from multiple basic image private libraries as a target image private library according to multiple acquired node resource utilization rate information or storage resource availability rate information;
[0137] The execution module 603 is used to execute a target operation corresponding to the user request information on the target image in the target image private library, where the target image represents the image corresponding to the user request information.
[0138] In some embodiments, the acquisition module 601 is specifically used to:
[0139] When the user upload request information is obtained, the storage resource availability information of multiple basic image private repositories is obtained;
[0140] When the user download request information is obtained, the node resource usage information of multiple basic image private repositories is obtained.
[0141] In some embodiments, the acquisition module 601 is specifically used to:
[0142] Obtain storage resource availability information and node resource usage information of the private image repository of the tool-type basic image and the business-type basic image within the first period of time;
[0143] According to the prediction trend curves corresponding to the storage resource availability information and the node resource utilization information of the image private repository of the tool-class basic image and the business-class basic image in the first period of time, storage resource trend information corresponding to the tool-class basic image and the business-class basic image is obtained, and the prediction trend curve is obtained based on at least one of the image historical call information, the historical node resource utilization information of the image private repository, and the historical storage resource availability information of the image private repository;
[0144] According to the storage resource trend information corresponding to the tool-class basic image and the business-class basic image, the resource weight coefficients of the tool-class basic image and the business-class basic image in the image private library are determined, and the sum of the resource weight coefficients of the tool-class basic image in the image private library and the resource weight coefficients of the business-class basic image in the image private library is equal to 1;
[0145] Allocate storage resources of the private image repository based on the resource weight coefficients of the tool-based images and business-based images in the private image repository.
[0146] In some embodiments, the acquisition module 601 is specifically used to:
[0147] Obtain image call information of tool-class basic images and business-class basic images within the second time period;
[0148] Obtaining call trend information corresponding to the tool-class basic image and the business-class basic image according to the image call information of the tool-class basic image and the business-class basic image within the second period and the prediction trend curve corresponding to the image call information;
[0149] Determine, according to the call trend information corresponding to the tool class basic image and the business class basic image, a plurality of tool class basic image control parameters corresponding to the tool class basic image and a plurality of business class basic image control parameters corresponding to the business class basic image;
[0150] According to the call trend information corresponding to the tool class basic image and the business class basic image, respectively determine the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image, and the sum of the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image is equal to 1;
[0151] By using the preset control value formula, the number of copies of the tool class basic image and the business class basic image is determined according to the tool class basic image control parameters, the business class basic image control parameters, the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image.
[0152] In some embodiments, the acquisition module 601 is specifically used to:
[0153] Obtain historical operation information, including historical image call information, historical node resource usage information of the image private library, and historical storage resource availability information of the image private library;
[0154] According to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period, a plurality of corresponding trend curves are obtained respectively;
[0155] Linear regression training is performed on multiple trend curves to obtain multiple predicted trend curves.
[0156] In some embodiments, the apparatus for image processing includes a detection module, the detection module being used to detect whether a preset training period has been reached;
[0157] When the preset training cycle is detected, determine to obtain a plurality of corresponding trend curves according to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period;
[0158] or
[0159] Detect whether the storage resource availability information of the private image repository is lower than a first threshold;
[0160] When it is detected that the storage resource availability information of the mirror private library is lower than the first threshold, determine to obtain a corresponding trend curve according to the storage resource availability information of the mirror private library within the third time period;
[0161] or
[0162] Detect whether the node resource usage information of the private image library is lower than the second threshold;
[0163] When it is detected that the node resource usage information of the mirror private library is lower than the second threshold, it is determined to obtain a corresponding trend curve according to the node resource usage information of the mirror private library within a third time period.
[0164] In some embodiments, the acquisition module 601 is specifically used to:
[0165] Record the operation information corresponding to the target operation;
[0166] The operation information and the historical operation information are combined to obtain the target historical operation information.
[0167] Figure 4 Each module / unit in the device shown has the function of realizing Figure 1 The functions of each step executed by the application system in the present invention can achieve the corresponding technical effects. For the sake of brevity, they will not be repeated here.
[0168] Figure 5 A schematic diagram of the hardware structure of the mirroring process provided by an embodiment of the present disclosure is shown.
[0169] The mirroring device may include a processor 701 and a memory 702 storing computer program instructions.
[0170] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0171] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.
[0172] The memory 702 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.
[0173] The processor 701 implements any one of the mirroring processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .
[0174] In one example, the mirroring device may further include a communication interface 703 and a bus 704. Figure 5 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 704 and communicate with each other.
[0175] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0176] Bus 704 includes hardware, software or both, and couples the components of the online data traffic billing device to each other. For example, but not limitation, the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a front side bus (Front Side Bus, FSB), a hypertransport (Hyper Transport, HT) interconnection, an industry standard architecture (Industry Standard Architecture, ISA) bus, an infinite bandwidth interconnection, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses or a combination of two or more of these. In appropriate cases, bus 704 may include one or more buses. Although the embodiment of the present invention describes and illustrates a specific bus, the present invention considers any suitable bus or interconnection. In addition, in conjunction with the method for mirror processing in the above-mentioned embodiment, the embodiment of the present application also provides a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the mirror processing methods in the above embodiments is implemented.
[0177] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the mirror processing methods in the above embodiments when the computer program is executed by a processor.
[0178] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0179] The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0180] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0181] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0182] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A method for image processing, characterized in that: include: When the user request information is obtained, node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple basic image private repositories is obtained; According to the plurality of node resource utilization information or storage resource availability information obtained, a basic image private library with the lowest node resource utilization rate or the highest storage resource availability rate is correspondingly selected from the plurality of basic image private libraries as a target image private library; A target operation corresponding to the user request information is performed on a target image in the target image private library, where the target image represents the image corresponding to the user request information.
2. The method according to claim 1, characterized in that The user request information includes user upload request information and user download request information. When the user request information is obtained, obtaining node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple private image repositories includes: When the user upload request information is obtained, storage resource availability information of the plurality of basic image private repositories is obtained; When the user download request information is obtained, node resource usage information of the plurality of base image private repositories is obtained.
3. The method according to claim 2, characterized in that The image includes a tool-based image and a business-based image, and the method further includes: Obtain storage resource availability information and node resource usage information of the image private repository of the tool-class basic image and the business-class basic image within a first period of time; Obtain storage resource trend information corresponding to the tool-class basic image and the business-class basic image according to prediction trend curves corresponding to storage resource availability information and node resource utilization information of the image private repository of the tool-class basic image and the business-class basic image within the first time period, wherein the prediction trend curve is obtained based on at least one of image historical call information, historical node resource utilization information of the image private repository, and historical storage resource availability information of the image private repository; According to the storage resource trend information corresponding to the tool class basic image and the business class basic image, determine the resource weight coefficients of the tool class basic image and the business class basic image in the image private library, the resource weight coefficient of the tool class basic image in the image private library and the resource weight coefficient of the business class basic image in the image private library summed up to 1; The storage resources of the image private library are allocated according to the resource weight coefficients of the tool-class basic images and the business-class basic images in the image private library.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining image call information of the tool-class basic image and the business-class basic image within a second time period; Obtaining call trend information corresponding to the tool-class basic image and the business-class basic image according to the image call information of the tool-class basic image and the business-class basic image within the second time period and a prediction trend curve corresponding to the image call information; Determine, according to the call trend information corresponding to the tool class basic image and the business class basic image, a plurality of tool class basic image control parameters corresponding to the tool class basic image and a plurality of business class basic image control parameters corresponding to the business class basic image; According to the call trend information corresponding to the tool class basic image and the business class basic image, respectively determine the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image, the sum of the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image is equal to 1; The preset control value formula is used to determine the number of copies of the tool class basic image and the business class basic image according to the tool class basic image control parameters, the business class basic image control parameters, the control weight coefficient of the tool class basic image and the control weight coefficient of the business class basic image.
5. The method according to claim 4, characterized in that Before obtaining the call trend information corresponding to the tool-class basic image and the business-class basic image according to the image call information of the tool-class basic image and the business-class basic image within the second time period and the prediction trend curve corresponding to the image call information, the method further includes: Acquire historical operation information, wherein the historical operation information includes the image historical call information, the historical node resource usage rate information of the image private library, and the historical storage resource availability rate information of the image private library; According to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period, a plurality of corresponding trend curves are obtained respectively; Linear regression training is performed on the multiple trend curves to obtain multiple predicted trend curves.
6. The method according to claim 5, characterized in that Before obtaining a plurality of corresponding trend curves according to the image call information, the node resource usage rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period, the method further includes: Detect whether the preset training cycle has been reached; In the case of detecting that the preset training cycle has been reached, determining to obtain a plurality of corresponding trend curves according to the image call information, the node resource utilization rate information of the image private library, and the storage resource availability rate information of the image private library within the third time period; or Detecting whether the storage resource availability information of the mirror private library is lower than a first threshold; In the case where it is detected that the storage resource availability information of the mirrored private repository is lower than the first threshold, determining to obtain a corresponding trend curve according to the storage resource availability information of the mirrored private repository within the third time period; or Detecting whether the node resource usage information of the mirror private library is lower than a second threshold; When it is detected that the node resource usage information of the mirror private library is lower than the second threshold, it is determined to obtain a corresponding trend curve based on the node resource usage information of the mirror private library within the third time period.
7. The method according to claim 1, characterized in that After executing the target operation corresponding to the user request information on the target image in the target image private library, the method further includes: Recording operation information corresponding to the target operation; The operation information and the historical operation information are combined to obtain target historical operation information.
8. A mirror processing device, characterized in that: The device comprises: An acquisition module, wherein the acquisition module is used to acquire node resource usage rate information or storage resource availability rate information corresponding to the user request information of multiple basic image private repositories when the user request information is acquired; A selection module, wherein the selection module is used to select a basic image private library with the lowest node resource utilization rate or the highest storage resource availability rate from the multiple basic image private libraries according to the multiple acquired node resource utilization rate information or storage resource availability rate information as the target image private library; An execution module is used to execute a target operation corresponding to the user request information on a target image in the target image private library, wherein the target image represents an image corresponding to the user request information.
9. A mirror processing device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the mirror processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for mirroring according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the mirror processing method according to any one of claims 1 to 7.
Citation Information
Cited By
Business processing method and device, computer program product and electronic equipment
CN119628869A
Business processing method, apparatus, computer program product, and electronic device
CN119628869B
