A multi-region image resource sharing method for service opening

The multi-region image resource sharing method addresses inefficiencies in cloud systems by synchronizing and verifying data across regions, ensuring data reliability and stability through intelligent server allocation.

CN118568069BActive Publication Date: 2024-12-20CHINA NAT INST OF STANDARDIZATION
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410703670.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-12-20
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

In multi-region cloud systems, the existing technology faces inefficiencies due to the need for multiple copies of image files across regions, leading to bandwidth and storage waste, and lacks effective consistency and integrity verification of cross-regional synchronized data resources.

Method used

A multi-region image resource sharing method that synchronizes data resources from a main region to branch regions, performs integrity, consistency, and timing verification, and allocates servers based on load and demand indices to ensure data reliability and efficient resource utilization.

Benefits of technology

Ensures data reliability and stability by verifying data integrity and consistency, avoiding resource waste, and dynamically adjusting server allocation to prevent system crashes and improve overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568069B_ABST
    Figure CN118568069B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-region mirror resource sharing method for service opening, and relates to the technical field of mirror resource electric data processing. The multi-region mirror resource sharing method for service opening includes the following steps: synchronously sharing data resources in the main region mirror library of service opening to other branch region mirror libraries, performing integrity verification on the synchronously shared data resources, and obtaining verification results; based on the verification results, dividing each branch region mirror library into a branch region mirror library that can continue to be used and a branch region mirror library that cannot continue to be used; performing server allocation for the main region mirror library and each branch region mirror library that can continue to be used, thereby solving the consistency and integrity verification problem of cross-regional synchronized data resources in a distributed service opening system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mirror resource electric data processing, and in particular to a multi-region mirror resource sharing method for service opening. Background Art

[0002] Currently, computers contain various types of controllers. In addition to the core processor, they also include some managers, such as BMC (Baseboard Management Controller), which is the management center of the server and is used to manage information such as power supply, fan, network card, graphics card, etc. in the system.

[0003] In traditional multi-region cloud systems, image resources are isolated. Each time a region is created, a copy of all basic image resources must be uploaded. This not only wastes a lot of bandwidth resources but also takes up a high storage space, which is a waste of resources for the company's hardware. In addition, since different users require different image files, image files should provide as many types and versions of operating systems as possible to meet the needs of most users. Therefore, each OpenStack system must upload various types of operating systems. In a multi-region environment, multiple copies of the same image file must be uploaded. This not only takes up a lot of hard disk space, but also wastes time uploading image resources, affecting the efficiency of deploying the cloud system.

[0004] The Chinese invention patent with announcement number CN108234587B discloses a method for sharing multi-region image resources based on OpenStack, which includes the following steps: deploying a multi-region cloud system sharing glance module; users under different tenants can specify different sharing strategies to achieve the sharing of image resources or snapshots under multiple regions. The present invention adopts the setting of image resource sharing in multiple regions, which can not only reduce disk storage but also improve resource utilization. At the same time, the flexible resource sharing strategy can facilitate the efficient use of resources between different tenants and different regions, which also greatly improves the use efficiency of the cloud system and ensures the efficient and stable operation of the system.

[0005] However, the existing technology has the problem of inconvenience in verifying the consistency and integrity of cross-regional synchronized data resources. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention provides a multi-region mirror resource sharing method for service opening, which solves the consistency and integrity verification problem of cross-regional synchronized data resources in a distributed service opening system.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a multi-Region image resource sharing method for service opening, comprising the following steps: synchronously sharing the data resources in the main Region image library of the service opening to other branch Region image libraries, performing integrity verification on the synchronously shared data resources, and obtaining verification results; based on the verification results, dividing each branch Region image library into a branch Region image library that can continue to be used and a branch Region image library that cannot continue to be used; and allocating servers to the main Region image library and each branch Region image library that can continue to be used.

[0008] Furthermore, the verification result includes a first verification value and a second verification value, wherein the first verification value indicates that the resource data verification is successful, and the data resources of the branch Region mirror library are the same as the data resources of the main Region mirror library, and the second verification value indicates that the resource data verification is unsuccessful, and the data resources of the branch Region mirror library are different from the data resources of the main Region mirror library.

[0009] Further, the integrity verification of the synchronously shared data resources to obtain the verification result includes: performing data integrity verification on the synchronously shared data resources, if the branch Region mirror library data resources are incomplete, outputting the verification result as a second verification value; if the branch Region mirror library data resources are complete, performing data consistency verification on the synchronously shared data resources, if the branch Region mirror library data resources are inconsistent with the data resources of the main Region mirror library, outputting the verification result as the second verification value; if the branch Region mirror library data resources are consistent with the data resources of the main Region mirror library, performing timing consistency verification on the synchronously shared data resources, if the data update timestamp of the branch Region mirror library data resources is less than the timestamp of the last synchronization, the timing consistency verification fails, and the output verification result is the second verification value; if the data update timestamp of the branch Region mirror library data resources is greater than or equal to the timestamp of the last synchronization, the timing consistency verification is successful, and the output verification result is the first verification value.

[0010] Furthermore, the data integrity verification includes checksum verification and hash value verification, the data consistency verification includes data version comparison, entry number comparison and attribute integrity check, and the timing consistency verification includes timestamp verification.

[0011] Furthermore, the division of each branch Region mirror library into a branch Region mirror library that can continue to be used and a branch Region mirror library that cannot continue to be used based on the verification result includes: if the verification result is a first verification value, the corresponding branch Region mirror library is recorded as a branch Region mirror library that can continue to be used; if the verification result is a second verification value, the corresponding branch Region mirror library is recorded as a branch Region mirror library that cannot continue to be used.

[0012] Furthermore, the server allocation for the main Region image library and each branch Region image library that can continue to be used includes: obtaining the main image library status data of the main Region image library and the branch image library status data of each branch Region image library that can continue to be used; processing the main image library status data and the branch image library status data to obtain the main image library server weight allocation index and the branch image library server weight allocation index; and allocating available servers based on the main image library server weight allocation index and the branch image library server weight allocation index.

[0013] Furthermore, the main image library status data includes main image library demand data and main image library current load data, and the branch image library status data includes each branch image library demand data and each branch image library current load data.

[0014] Further, the processing of the main image library status data and the branch image library status data to obtain the main image library server weight distribution index and the branch image library server weight distribution index includes: processing the main image library status data to obtain the main image library server weight distribution index, and the calculation formula of the main image library server weight distribution index is as follows:

[0015]

[0016] Where W z is the weight distribution index of the main image library server, L Z is the load index of the main image library, which is obtained by analyzing the current load data of the main image library. Z The demand index of the main image library is obtained by analyzing the current load data of the main image library;

[0017] The status data of each branch image library is processed to obtain the weight distribution index of each branch image library server. The calculation formula of the weight distribution index of each branch image library server is as follows:

[0018]

[0019] In the formula, i is the number of each branch mirror library, i = 1, 2, 3, ..., n, n is the total number of branch mirror libraries, Wfi is the branch image library server weight allocation index of the i-th branch image library, L fi is the branch image library load index of the i-th branch image library, which is obtained by analyzing the current load data of the branch image library. fi is the branch image library demand index of the i-th branch image library, which is obtained by analyzing the current load data of the branch image library;

[0020] α is the demand adjustment factor, β is the load adjustment factor, and e is a natural constant.

[0021] Furthermore, the main image library status data includes the main image library access frequency and the main image library data transmission volume, and the main image library current load data includes the main image library current CPU usage rate, the main image library current memory usage rate and the main image library network bandwidth usage rate.

[0022] Furthermore, the status data of each branch mirror library includes the access frequency of each branch mirror library and the data transmission volume of each branch mirror library, and the current load data of each branch mirror library includes the current CPU utilization rate of each branch mirror library, the current memory utilization rate of each branch mirror library and the network bandwidth utilization rate of each branch mirror library.

[0023] The present invention has the following beneficial effects:

[0024] This multi-Region image resource sharing method for service opening can ensure efficient use of server resources and avoid resource waste and resource shortage problems by accurately calculating the load index and demand index and allocating resources based on the weight allocation index. It can dynamically adjust server resource allocation according to real-time load and demand to ensure timely expansion of resources during load peaks and prevent system crashes and performance degradation. By continuously monitoring the load and demand of the main image library and branch image library, it can timely discover and handle potential problems and improve the stability and reliability of the system. Reasonable allocation of resources can avoid excessive single-point load, disperse risks, and improve the reliability of the overall system.

[0025] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flow chart of the multi-Region mirror resource sharing method for service opening of the present invention.

[0027] Figure 2 The invention discloses an exponential function image of a weight distribution of a main image library server in a multi-Region image resource sharing method for service opening. DETAILED DESCRIPTION

[0028] The embodiment of the present application solves the problem of consistency and integrity verification of cross-regional synchronized data resources in a distributed service opening system through a multi-Region image resource sharing method for service opening, thereby ensuring the reliability of data resources in each regional image library and dynamically adjusting resource allocation according to the verification results, thereby improving the stability of the system and resource utilization efficiency.

[0029] The overall idea of ​​the problem in the embodiment of this application is as follows:

[0030] Synchronize the data resources in the main Region mirror library to the mirror libraries of each branch Region to ensure that the data is consistent in the mirror libraries of different regions. Verify the integrity of the synchronized data resources to ensure that the data is not damaged or lost during the transmission and synchronization process. Based on the results of the integrity verification, divide the branch Region mirror libraries into two categories: those that can continue to be used and those that cannot continue to be used. According to the classification results, reasonably allocate server resources for the main Region mirror library and the branch Region mirror libraries that can continue to be used to ensure the stability and efficiency of the system operation.

[0031] This multi-region image resource sharing method solves the consistency and integrity verification problem of cross-regional synchronized data resources in a distributed service open system, thereby ensuring the data resource reliability of each region's image library and dynamically adjusting resource allocation based on the verification results, thereby improving system stability and resource utilization efficiency.

[0032] See also Figure 1 The embodiment of the present invention provides a technical solution: a multi-Region image resource sharing method for service opening, comprising the following steps: synchronously sharing the data resources in the main Region image library of the service opening to other branch Region image libraries, this step ensures that the image library of each branch Region can be updated in time, obtain the latest data resources, and perform integrity verification on the synchronized and shared data resources to obtain verification results. After the data resource synchronization is completed, integrity verification is performed. The verification content includes the integrity and correctness of the data to ensure that the data has not been changed or damaged during the synchronization process.

[0033] Based on the verification results, each branch Region mirror library is divided into branch Region mirror libraries that can continue to be used and branch Region mirror libraries that cannot continue to be used. This classification helps identify those mirror libraries that have problems during the synchronization process; servers are allocated for the main Region mirror library and each branch Region mirror library that can continue to be used. The main Region mirror library and the branch Region mirror library that can continue to be used will obtain corresponding server resource support to ensure the overall performance and stability of the system.

[0034] Through the synchronization and verification mechanism, the data in the image libraries of different regions are ensured to be consistent, reducing the problems caused by data inconsistency. Based on the verification results, the server resources are reasonably allocated to avoid resource waste, and resources are concentrated on the available image libraries to improve the overall resource utilization efficiency, ensure that the main region and each branch region that can continue to be used can run stably, provide continuous service support, and improve user experience.

[0035] Specifically, the verification result includes a first verification value and a second verification value. The first verification value indicates that the resource data verification is successful, and the data resources of the branch Region mirror library are the same as the data resources of the main Region mirror library. The second verification value indicates that the resource data verification is unsuccessful, and the data resources of the branch Region mirror library are different from the data resources of the main Region mirror library. Exemplarily, the first verification value is 1 and the second verification value is 0.

[0036] Specifically, the integrity of the synchronously shared data resources is verified to obtain the verification results, including: data integrity verification of the synchronously shared data resources, including checking the size of the data file, hash value (such as MD5 or SHA256) and other parameters to ensure that the data is not lost or damaged during the transmission process. If the branch region mirror library data resources are incomplete, such as missing files, inconsistent file sizes, and mismatched hash values, the output verification result is the second verification value. By verifying the integrity of the data, it is ensured that all data files are transmitted and stored intact, avoiding data unavailability or errors caused by data loss or damage.

[0037] If the data resources of the branch region mirror library are complete, the data consistency verification is performed on the synchronously shared data resources, and the data in the branch region mirror library is compared with the data in the main region mirror library one by one to check whether the content is completely consistent. If the data resources of the branch region mirror library are inconsistent with the data resources of the main region mirror library, such as the data content is different, the output verification result is the second verification value. Ensure that the data content between the branch region and the main region is completely consistent to avoid data confusion and business logic errors caused by data differences.

[0038] If the data resources of the branch region mirror library are consistent with those of the main region mirror library, the synchronously shared data resources are verified for temporal consistency, and the update timestamp of the data resources in the branch region mirror library is checked to ensure that it is greater than or equal to the timestamp of the last synchronization. If the data update timestamp of the branch region mirror library data resources is less than the timestamp of the last synchronization, the temporal consistency verification fails, and the output verification result is the second verification value, ensuring that the data is up to date, avoiding old data from overwriting new data, ensuring the timeliness and effectiveness of the data, and maintaining the correctness of the business logic.

[0039] If the data update timestamp of the branch Region mirror library data resource is greater than or equal to the timestamp of the last synchronization, the timing consistency verification is successful, and the output verification result is the first verification value.

[0040] In this implementation, data loss or corruption that may occur during the transmission process can be discovered and handled in a timely manner, which not only improves data reliability, but also avoids system failures and business interruptions caused by incomplete data, and improves the stability of the overall system. Data consistency verification ensures that the data content in the branch region and the main region mirror library remains completely consistent, effectively avoiding business logic errors and data confusion caused by data differences between different regions, and ensuring consistency and coordination. Timing consistency verification ensures that the data in the branch region mirror library is the latest, prevents old data from overwriting new data, maintains the timeliness and effectiveness of the data, enables the system to respond to the latest data changes in a timely manner, and improves the accuracy and real-time nature of data decisions.

[0041] Through clear data integrity, data consistency and timing consistency verification steps, it is possible to quickly locate and identify the links where data problems exist. Based on the verification results, the allocation of server resources can be dynamically adjusted to concentrate resources on the mirror library that can continue to be used, thereby avoiding resource waste, improving resource utilization efficiency, ensuring cost savings while ensuring efficient operation, and improving the performance and stability of the overall system.

[0042] Specifically, data integrity verification includes checksum verification and hash value verification, data consistency verification includes data version comparison, entry number comparison and attribute integrity check, and timing consistency verification includes timestamp verification.

[0043] In this implementation scheme, checksum verification: during the data transmission process or after the transmission is completed, the checksum of the data file is calculated and compared with the expected checksum. The checksum verification can quickly detect whether any changes or damage have occurred to the data during the transmission process. Through checksum verification, the accuracy of data transmission can be ensured, and data loss or damage caused by transmission errors can be avoided. In addition, the checksum calculation is simple and fast, and will not significantly increase the processing burden.

[0044] Hash value verification: Calculate the hash value of the data file (such as MD5 or SHA256) and compare it with the hash value of the source data. Hash value verification provides higher verification accuracy and can detect even the smallest data changes. It can not only detect data integrity, but also prevent data from being maliciously tampered with, providing additional security.

[0045] Data version comparison: Compare the data versions in the branch Region image library and the main Region image library to ensure that they use the same version of data. Data version comparison ensures that all image libraries use the same version of data, avoiding data inconsistencies caused by version differences, simplifying the data synchronization and maintenance process, and reducing management complexity.

[0046] Item number comparison: Compare the number of data items in the branch region image library and the main region image library to ensure that they contain the same number of data items. Item number comparison can quickly identify whether data is missing, ensure that all data items are successfully transmitted and stored, and detect data inconsistency problems in a timely manner.

[0047] Attribute integrity check: Check each attribute of the data entry to ensure that each attribute is consistent in the branch region and the main Region mirror library. The attribute integrity check provides a more sophisticated verification method to ensure that all attributes of each data entry are accurate. By verifying each attribute, the integrity and accuracy of the data are ensured, and the data quality of the system is improved.

[0048] Timestamp verification: The update timestamp of the data resources in the branch region mirror library is ensured to be greater than or equal to the timestamp of the last synchronization. Timestamp verification ensures that the synchronized data is the latest and prevents old data from overwriting new data. Through timestamp verification, the system can maintain the latest data status, improve the accuracy and real-time performance of data decision-making, help maintain the temporal consistency of data, and ensure that data updates in mirror libraries in each region are synchronized.

[0049] Through a combination of multiple verification methods, this multi-Region mirror resource sharing method can fully guarantee the integrity, consistency and timeliness of data, improve reliability and stability, optimize resource utilization, and ultimately enhance user experience.

[0050] Specifically, based on the verification result, each branch Region mirror library is divided into a branch Region mirror library that can continue to be used and a branch Region mirror library that cannot continue to be used, including: if the verification result is a first verification value, the corresponding branch Region mirror library is recorded as a branch Region mirror library that can continue to be used; if the verification result is a second verification value, the corresponding branch Region mirror library is recorded as a branch Region mirror library that cannot continue to be used.

[0051] In this implementation scheme, each branch Region mirror library is classified according to the results of the aforementioned data integrity verification, data consistency verification and timing consistency verification. If a branch Region mirror library passes all verifications (data integrity, consistency, timing consistency verification), its verification result is the first verification value. If a branch Region mirror library fails in any verification link (incomplete data, inconsistent data or timing inconsistency), its verification result is the second verification value.

[0052] Allocate corresponding server resources to the branch region image library that can continue to be used to ensure that it can continue to provide stable and reliable services. For the branch region image library that can no longer be used, suspend its use to troubleshoot and repair the problem.

[0053] Specifically, server allocation is performed for the main Region image library and each branch Region image library that can continue to be used, including: obtaining the main image library status data of the main Region image library and the branch image library status data of each branch Region image library that can continue to be used; processing the main image library status data and the branch image library status data to obtain the main image library server weight allocation index and the branch image library server weight allocation index; and allocating available servers based on the main image library server weight allocation index and the branch image library server weight allocation index. The main image library status data includes the main image library demand data and the main image library current load data, and the branch image library status data includes the branch image library demand data and the branch image library current load data.

[0054] Processing the status data of the main image library and the status data of each branch image library to obtain the weight distribution index of the main image library server and the weight distribution index of each branch image library server, including: processing the status data of the main image library to obtain the weight distribution index of the main image library server, the calculation formula of the weight distribution index of the main image library server is as follows:

[0055]

[0056] Where W z is the weight distribution index of the main image library server, L Zis the load index of the main image library, which is obtained by analyzing the current load data of the main image library. Z The demand index of the main image library is obtained by analyzing the current load data of the main image library;

[0057] The status data of each branch image library is processed to obtain the weight distribution index of each branch image library server. The calculation formula of the weight distribution index of each branch image library server is as follows:

[0058]

[0059] In the formula, i is the number of each branch mirror library, i = 1, 2, 3, ..., n, n is the total number of branch mirror libraries, W fi is the branch image library server weight allocation index of the i-th branch image library, L fi is the branch image library load index of the i-th branch image library, which is obtained by analyzing the current load data of the branch image library. fi is the branch image library demand index of the i-th branch image library, which is obtained by analyzing the current load data of the branch image library;

[0060] α is the demand adjustment factor. Through historical data analysis and system performance testing, the impact of demand on system performance is evaluated and the appropriate adjustment factor is determined. β is the load adjustment factor. Through load testing and performance monitoring, the impact of load on system performance is evaluated and the appropriate adjustment factor is determined. e is a natural constant.

[0061] In this implementation scheme, the status data of the main Region image library and each branch Region image library that can continue to be used, including demand data and current load data, are collected, the load index and demand index of the main Region image library and each branch image library are calculated, the status data of the main Region image library and each branch image library are processed, and the server weight distribution index is calculated.

[0062] Based on the calculated weight allocation index, the available server resources are reasonably allocated to ensure that the main image library and each branch image library can obtain appropriate resource support, dynamically adjust server resource allocation, and expand resources in time during peak load periods to avoid system crashes and performance degradation, thereby improving system stability and reliability.

[0063] Figure 2This is the function graph of the weight allocation index of the main image library server. The horizontal axis represents the main image library load index, the vertical axis represents the main image library demand index, and the depth axis represents the main image library server weight allocation index. When the main image library demand index increases, the main image library server weight allocation index also increases, indicating that with the increase in demand, the allocated resources will also increase accordingly. When the main image library load index increases, the weight allocation index first decreases rapidly and then tends to be flat, indicating that with the increase in load, the allocation of resources will be suppressed to ensure that too many resources are not allocated due to excessive load, resulting in resource waste.

[0064] Specifically, the main image library status data includes the main image library access frequency and the main image library data transmission volume. The main image library current load data includes the main image library current CPU usage, the main image library current memory usage and the main image library network bandwidth usage.

[0065]

[0066] DZ=δ11*CPUz+δ12*NCz+δ13*KDz;

[0067] In the formula, MC z is the total number of access requests within a unit time t, and the number of access requests is counted through the server's access log or monitoring system. The access frequency of the main image library, zC z Reference access frequency for the main image library, used to standardize access frequency, γ 11 The access frequency weight factor of the main image library is used to adjust the impact of the access frequency on the load index. z is the data transmission volume of the main image library within a unit time t. The data transmission volume is obtained through the network monitoring system or bandwidth usage statistics tool. 12 The weight factor of the data transmission volume of the main image library is used to adjust the impact of data transmission volume on the load index. z is the reference transmission volume of the main image library data per unit time t, which is used to standardize the data transmission volume. z The current CPU usage of the main image library can be obtained through system monitoring tools such as Nagios, Zabbix or the system's own monitoring commands (such as top, vmstat),δ 11 The weight factor of the current CPU usage of the main image library, which is used to adjust the impact of CPU usage on the demand index. z The current memory usage of the main image library, obtained through the system monitoring tool, δ 12 The weight factor of the current memory usage of the main image library is used to adjust the impact of memory usage on the demand index. KD z The bandwidth usage of the main image library network is obtained through network monitoring tools.13 The weight factor of the network bandwidth usage rate of the main image library is used to adjust the impact of the network bandwidth usage rate on the demand index.

[0068] Table 1 L Z Parameter data table

[0069]

[0070] Table 2 D Z Parameter data table

[0071] <![CDATA[CPU z ]]> <![CDATA[NC z ]]> <![CDATA[zC z ]]> <![CDATA[δ 11 ]]> <![CDATA[δ 12 ]]> <![CDATA[δ 13 ]]> <![CDATA[D Z ]]> 75 65 80 0.5 0.3 0.2 73.0 80 70 85 0.5 0.3 0.2 78.0 85 75 90 0.5 0.3 0.2 83.0

[0072] As the access frequency and data transmission volume increase, the load index also increases accordingly. As the access frequency and data transmission volume increase, the load increases and the load index rises. As the CPU, memory and network bandwidth usage increase, the demand index also increases accordingly. This shows that as the resource usage increases, the demand increases and the demand index rises.

[0073] In this implementation scheme, the load index of the main image library is obtained by standardizing the access frequency and data transmission volume and performing weighted calculations. The standardization process makes the indicators of different dimensions comparable, and the weighted factors are used to adjust the contribution of different indicators to the overall load index. The current CPU, memory, and network bandwidth usage of the main image library are weighted and summed to obtain the demand index. The weighted factors are used to adjust the contribution of different resource utilization rates to the overall demand index, reflecting the current load's demand for system resources.

[0074] By accurately calculating the load index and demand index, the operating status and load conditions of the main image library can be reflected in detail, and the allocation of server resources can be dynamically adjusted to ensure efficient use of resources, optimize resource utilization, reduce resource waste, and improve the overall performance and stability of the system.

[0075] For each weight factor, we can use historical data for statistical analysis and use statistical methods such as regression analysis to determine the weight factor of each parameter. Specifically, we collect a large amount of historical data, including access frequency, data transmission volume, CPU usage, memory usage and network bandwidth usage, as well as system load and demand. We clean and preprocess the data to remove noise and outliers to ensure data quality. We use multivariate regression analysis to establish a relationship model between each parameter and system load and demand. Based on the results of regression analysis, we calculate the weight factor of each parameter.

[0076] For the reference access frequency of the main image library, collect historical access data of the main image library, covering a longer time period (such as several months to a year), calculate the access frequency of different time periods (such as daily, weekly, and monthly), find the average value and fluctuation range of the access frequency, and select a representative access frequency value as the reference access frequency based on the analysis results.

[0077] For the reference data transfer volume of the main image library, collect the historical data transfer volume information of the main image library, covering a longer time period (such as several months to a year), calculate the data transfer volume in different time periods (such as daily, weekly, and monthly), find the average value and fluctuation range of the data transfer volume, and select a representative data transfer volume value as the reference data transfer volume based on the analysis results.

[0078] Specifically, the status data of each branch mirror library includes the access frequency of each branch mirror library, the data transmission volume of each branch mirror library, and the current load data of each branch mirror library includes the current CPU utilization rate of each branch mirror library, the current memory utilization rate of each branch mirror library, and the network bandwidth utilization rate of each branch mirror library.

[0079]

[0080] DZ=δ21i*CPUfi+δ22i*NCfi+δ23i*KDfi;

[0081] In the formula, MC fi is the total number of branch image library access requests for the i-th branch image library within unit time t. The number of access requests for each branch image library is counted through the server access log or monitoring system. is the branch mirror library access frequency of the i-th branch mirror library, zC fi is the reference access frequency of the branch mirror library of the i-th branch mirror library, γ 21i is the branch mirror library access frequency weight factor of the i-th branch mirror library, MS fi is the data transmission volume of the branch image library of the i-th branch image library within unit time t. The data transmission volume of each branch image library is obtained through the network monitoring system or bandwidth usage statistics tool. 22i is the branch image library data transmission weight factor of the i-th branch image library, zS fi is the reference transmission amount of branch image library data of the i-th branch image library within unit time t, CPU fi is the current CPU usage of the branch image library of the i-th branch image library. The CPU usage of each branch image library is obtained through system monitoring tools such as Nagios, Zabbix or the system's own monitoring commands (such as top, vmstat). 21iis the current CPU usage weight factor of the branch image library of the i-th branch image library, NC fi is the current memory usage of the branch image library of the i-th branch image library. The memory usage of each branch image library is obtained through the system monitoring tool. 22i KD is the current memory usage weight factor of the i-th branch image library. fi is the network bandwidth usage rate of the branch image library of the i-th branch image library. The network bandwidth usage rate of each branch image library is obtained through the network monitoring tool. 23i is the weight factor of the branch image library network bandwidth usage of the i-th branch image library.

[0082] In this implementation scheme, data of different dimensions are processed in a standardized manner so that the access frequency and data transmission volume are comparable, the accuracy of the load index calculation is improved, the influence of different data scales is eliminated, and the calculation results are ensured to be reasonable. By introducing weight factors, the contribution of different parameters to the load index and demand index is flexibly adjusted to reflect the actual state of the system under different load conditions. The setting of the weight factor can be adjusted according to actual needs to enhance the adaptability and flexibility of the formula. By comprehensively considering the CPU utilization rate, memory utilization rate and network bandwidth utilization rate, the current resource demand of the system is fully reflected, ensuring that the demand index can accurately reflect the actual load of the system and help optimize resource allocation.

[0083] Use historical data for statistical analysis, and use statistical methods such as regression analysis to determine the weight factors of various parameters. For the reference access frequency of the branch image library, collect the historical access data of each branch image library, covering a longer time period (such as several months to one year), calculate the access frequency of different time periods (such as daily, weekly, and monthly), find out the average value and fluctuation range of the access frequency, and select a representative access frequency value as the reference access frequency based on the analysis results. For the reference transmission volume of the branch image library data, collect the historical data transmission volume information of each branch image library, covering a longer time period (such as several months to one year), calculate the data transmission volume of different time periods (such as daily, weekly, and monthly), find out the average value and fluctuation range of the data transmission volume, and select a representative data transmission volume value as the reference data transmission volume based on the analysis results. .

[0084] An electronic device includes: a processor and a memory, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the multi-region mirror resource sharing method for service opening as described above.

[0085] A computer-readable storage medium is used to store a program, and when the program is executed by a processor, the multi-region mirror resource sharing method for service opening as described above is implemented.

[0086] In summary, this application has at least the following effects:

[0087] By accurately calculating the load index and demand index, and allocating resources based on the weight allocation index, we can ensure efficient use of server resources, avoid resource waste and resource shortage problems, and dynamically adjust server resource allocation according to real-time load and demand to ensure timely expansion of resources during peak load periods to prevent system crashes and performance degradation. By continuously monitoring the load and demand of the main image library and branch image library, we can promptly discover and handle potential problems and improve the stability and reliability of the system. Reasonable allocation of resources can avoid excessive load at a single point, disperse risks, and improve the reliability of the overall system.

[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] The present invention is described with reference to flowcharts and / or block diagrams of systems, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0092] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0093] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A multi-region image resource sharing method for service opening, characterized in that: The following steps are involved: Synchronize and share the data resources in the main Region image library of the service to other branch Region image libraries, perform integrity verification on the synchronized and shared data resources, and obtain verification results; Based on the verification results, the image libraries of each branch region are divided into those that can continue to be used and those that cannot continue to be used; Allocate servers for the main Region image library and the branch Region image libraries that can continue to be used; The server allocation for the main Region image library and each branch Region image library that can continue to be used includes: Obtain the status data of the main image library of the main Region image library and the status data of the branch image library of each branch Region image library that can continue to use; Processing the status data of the main image library and the status data of each branch image library to obtain the weight distribution index of the main image library server and the weight distribution index of each branch image library server; Allocate available servers based on the weight allocation index of the main image library server and the weight allocation index of each branch image library server; The main image library status data includes the main image library demand data and the main image library current load data, and the branch image library status data includes the branch image library demand data and the branch image library current load data; The processing of the main image library status data and the branch image library status data to obtain the main image library server weight distribution index and the branch image library server weight distribution index includes: The main image library status data is processed to obtain the main image library server weight distribution index, and the calculation formula of the main image library server weight distribution index is as follows: Where W z The weight distribution index of the main image library server, L Z is the load index of the main image library, which is obtained by analyzing the current load data of the main image library. Z The demand index of the main image library is obtained by analyzing the current load data of the main image library; The status data of each branch image library is processed to obtain the weight distribution index of each branch image library server. The calculation formula of the weight distribution index of each branch image library server is as follows: In the formula, i is the number of each branch mirror library, i = 1, 2, 3, ..., n, n is the total number of branch mirror libraries, W fi is the branch image library server weight allocation index of the i-th branch image library, L fi is the branch image library load index of the i-th branch image library, which is obtained by analyzing the current load data of the branch image library. fi is the branch image library demand index of the i-th branch image library, which is obtained by analyzing the current load data of the branch image library; α is the demand adjustment factor, β is the load adjustment factor, and e is a natural constant.

2. According to claim 1, a multi-region image resource sharing method for service opening is characterized in that: The verification result includes a first verification value and a second verification value, wherein the first verification value indicates that the resource data verification is successful, and the data resources of the branch Region mirror library are the same as the data resources of the main Region mirror library, and the second verification value indicates that the resource data verification is unsuccessful, and the data resources of the branch Region mirror library are different from the data resources of the main Region mirror library.

3. A multi-region image resource sharing method for service opening according to claim 2, characterized in that: The integrity verification of the synchronously shared data resources to obtain the verification result includes: Perform data integrity verification on the synchronously shared data resources. If the branch region mirror library data resources are incomplete, the output verification result is the second verification value; If the data resources of the branch region mirror library are complete, data consistency verification is performed on the synchronously shared data resources. If the data resources of the branch region mirror library are inconsistent with the data resources of the main region mirror library, the output verification result is the second verification value; If the data resources of the branch region mirror library are consistent with those of the main region mirror library, the synchronously shared data resources are verified for time consistency. If the data update timestamp of the branch region mirror library data resources is less than the timestamp of the last synchronization, the time consistency verification fails, and the output verification result is the second verification value. If the data update timestamp of the branch Region mirror library data resource is greater than or equal to the timestamp of the last synchronization, the timing consistency verification is successful, and the output verification result is the first verification value.

4. The multi-region image resource sharing method for service opening according to claim 3 is characterized in that: The data integrity verification includes checksum verification and hash value verification, the data consistency verification includes data version comparison, entry number comparison and attribute integrity check, and the timing consistency verification includes timestamp verification.

5. The multi-region image resource sharing method for service opening according to claim 3 is characterized in that: The division of each branch region image library into a branch region image library that can continue to be used and a branch region image library that cannot continue to be used based on the verification result includes: If the verification result is the first verification value, the corresponding branch Region image library is recorded as the branch Region image library can continue to be used; If the verification result is the second verification value, the corresponding branch Region image library is marked as no longer usable.

6. A multi-region image resource sharing method for service opening according to claim 1, characterized in that: The master image library status data includes the master image library access frequency and the master image library data transmission volume, and the master image library current load data includes the master image library current CPU usage rate, the master image library current memory usage rate and the master image library network bandwidth usage rate.

7. A multi-region image resource sharing method for service opening according to claim 1, characterized in that: The status data of each branch mirror library includes the access frequency of each branch mirror library and the data transmission volume of each branch mirror library. The current load data of each branch mirror library includes the current CPU utilization rate of each branch mirror library, the current memory utilization rate of each branch mirror library and the network bandwidth utilization rate of each branch mirror library.

Citation Information

Patent Citations

  • A method for sharing OpenStack multi-region image resources

    CN108234587B

  • Data verification method and device

    CN113297230A

  • Resource scheduling method, system and related device for distributed mirror image library

    CN114327866A

  • Load balancing method and device, electronic equipment and storage medium

    CN117033004A

  • OpenStack-based super-large mirror image virtual machine deployment acceleration implementation method

    CN117762567A