DCN Architecture Resource Detection Method, Device, Equipment and Computer Storage Medium
By calculating the minimum disaster recovery resources and comparing the deviation from used resources, combined with the detection of virtual machine usage, the problem of low detection accuracy of disaster recovery resources in the existing technology is solved, and higher detection accuracy and resource utilization optimization are achieved.
Patent Information
- Application Number
- CN201910460400.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-29
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2039-05-29
AI Technical Summary
The prior art is relatively low in the detection of the disaster recovery resources of DCN in the disaster recovery room in the off-site disaster recovery machine room, and it is impossible to effectively identify unreasonable situations of resource deployment.
By obtaining the production resource system information corresponding to the disaster recovery resources, calculate the minimum disaster recovery resources, and compare the deviation from the used resources. If there is a deviation, obtain the usage rate of each virtual machine, determine whether there is a target usage rate that is not within the preset range, and output a detection report.
It improves the accuracy of disaster recovery resource detection in the remote disaster recovery computer room, can intuitively identify the rationality of resource deployment, and helps optimize resource utilization.
Smart Images

Figure CN110209469B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial technology (Fintech), and particularly to a method, device, equipment, and computer storage medium for detecting resources in a DCN architecture. Background Art
[0002] With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also imposed on technologies. Taking large commercial banks as an example, to achieve the electronic management of customer services, they usually split different business systems and deploy them on different data center nodes according to the dimension of business systems, such as DCN (Data Center Node). Each application system adopts a centralized deployment scheme to handle all customers of the bank under this business. And one type of DCN can have multiple groups of DCNs. A group of DCNs has 2 physical DCNs in the production computer room in the same city and 1 physical DCN in the off-site disaster recovery computer room.
[0003] Moreover, with the rapid increase in the number of customers, more DCNs are required. Since the number of DCNs in each computer room is limited, major commercial banks generally focus on improving the utilization rate of DCNs in each computer room, that is, they will detect the server resources of DCNs in each computer room. In particular, the detection of the server resources (i.e., disaster recovery resources) of DCNs in the off-site disaster recovery computer room is particularly important. Currently, the detection of the disaster recovery resources of DCNs in the off-site disaster recovery computer room usually relies on operation and maintenance personnel to calculate according to a certain percentage of production resources. However, since the server resources in the production computer room comprehensively consider factors such as the number of instances and the peak business volume, there is redundancy. The disaster recovery resources in the off-site disaster recovery computer room only need the minimum startup resources. Therefore, evaluating and detecting according to the total percentage of production resources, the accuracy is very low. Therefore, how to improve the accuracy of detecting the disaster recovery resources of DCNs in the off-site disaster recovery computer room has become a technical problem to be solved urgently at present. Summary of the Invention
[0004] The main purpose of the present invention is to propose a method, device, equipment, and computer storage medium for detecting resources in a DCN architecture, aiming to improve the accuracy of detecting the disaster recovery resources of DCNs in the off-site disaster recovery computer room.
[0005] To achieve the above object, the present invention provides a method for detecting resources in a DCN architecture, and the method for detecting resources in a DCN architecture includes the following steps:
[0006] When evaluating disaster recovery resources in a DCN architecture, obtain the system information in the production resources corresponding to the disaster recovery resources, and calculate the minimum disaster recovery resources based on the system information;
[0007] Obtain the used resources in the disaster recovery resources, and determine whether there is a deviation between the minimum disaster recovery resources and the used resources;
[0008] If there is a deviation between the minimum disaster recovery resources and the used resources, obtain the utilization rate of each virtual machine corresponding to the disaster recovery resources, and determine whether there is a target utilization rate that is not within the preset range among the utilization rates;
[0009] If there is the target utilization rate, output a detection report on the virtual machine information corresponding to the target utilization rate.
[0010] Optionally, the system information includes a first application system and a second application system, and the importance level of the first application system is higher than that of the second application system;
[0011] The step of calculating the minimum disaster recovery resources based on the system information includes:
[0012] Determine the first instance number of the instances of the first application system deployed in the disaster recovery resources, and the second instance number of the instances of the second application system deployed in the disaster recovery resources;
[0013] Calculate the first sum value of the first instance number and the second instance number, and determine the minimum disaster recovery resources based on the first sum value.
[0014] Optionally, the step of determining the minimum disaster recovery resources based on the first sum value includes:
[0015] Obtain the resource utilization rate corresponding to the disaster recovery resources, calculate the first ratio value of the first sum value and the resource utilization rate, and use the first ratio value as the minimum disaster recovery resources.
[0016] Optionally, the step of obtaining the utilization rate of each virtual machine corresponding to the disaster recovery resources includes:
[0017] Traverse each virtual machine corresponding to the disaster recovery resources in sequence, obtain the computing power value of the target virtual machine currently traversed, and determine the third instance number of the instances deployed on the target virtual machine;
[0018] Calculate the second ratio value of the third instance number and the computing power value, and determine the utilization rate of the target virtual machine based on the second ratio value until all the virtual machines are traversed.
[0019] Optionally, the step of determining the utilization rate of the target virtual machine based on the second ratio value includes:
[0020] Obtain the resource utilization rate corresponding to the disaster recovery resource, calculate the first product between the second ratio value and the resource utilization rate, and use the first product as the utilization rate of the target virtual machine.
[0021] Optionally, the step of obtaining the utilization rate of each virtual machine corresponding to the disaster recovery resource if there is a deviation between the disaster recovery minimum resource and the used resource includes:
[0022] If there is a deviation between the disaster recovery minimum resource and the used resource, obtain the second product after multiplying the disaster recovery minimum resource by the second preset ratio value, and determine whether the deviation value of the deviation is greater than the second product;
[0023] If the deviation value is greater than the second product, obtain the utilization rate of each virtual machine corresponding to the disaster recovery resource.
[0024] Optionally, after the step of determining whether the deviation value of the deviation is greater than the second product, it includes:
[0025] If the deviation value is less than or equal to the second product, determine that the deviation between the disaster recovery minimum resource and the used resource is small, and output a detection report with information indicating sufficient disaster recovery resources.
[0026] In addition, to achieve the above object, the present invention further provides a DCN architecture resource detection device, and the DCN architecture resource detection device includes:
[0027] A detection module, configured to obtain system information in the production resources corresponding to the disaster recovery resources when evaluating the disaster recovery resources under the DCN architecture, and calculate the disaster recovery minimum resources according to the system information;
[0028] An acquisition module, configured to acquire the used resources in the disaster recovery resources, and determine whether there is a deviation between the disaster recovery minimum resources and the used resources;
[0029] A determination module, if there is a deviation between the disaster recovery minimum resource and the used resource, obtain the utilization rate of each virtual machine corresponding to the disaster recovery resource, and determine whether there is a target utilization rate outside the preset range among the utilization rates;
[0030] An output module, configured to output a detection report of the virtual machine information corresponding to the target utilization rate if there is the target utilization rate.
[0031] In addition, to achieve the above object, the present invention further provides a DCN architecture resource detection device, where the DCN architecture resource detection device includes: a memory, a processor, and a DCN architecture resource detection program stored on the memory and executable on the processor. When the DCN architecture resource detection program is executed by the processor, the steps of the DCN architecture resource detection method as described above are implemented.
[0032] In addition, to achieve the above object, the present invention further provides a computer storage medium, on which a DCN architecture resource detection program is stored. When the DCN architecture resource detection program is executed by a processor, the steps of the DCN architecture resource detection method as described above are implemented.
[0033] When the present invention evaluates the disaster recovery resources under the DCN architecture, it obtains the system information in the production resources corresponding to the disaster recovery resources, and calculates the minimum disaster recovery resources according to the system information; obtains the used resources in the disaster recovery resources, and determines whether there is a deviation between the minimum disaster recovery resources and the used resources; if there is a deviation between the minimum disaster recovery resources and the used resources, it obtains the utilization rates of each virtual machine corresponding to the disaster recovery resources, and determines whether there is a target utilization rate outside the preset range among the utilization rates; if there is the target utilization rate, it outputs a detection report of the virtual machine information corresponding to the target utilization rate. By first determining whether there is a deviation between the minimum disaster recovery resources and the used resources when detecting the disaster recovery resources under the DCN architecture, when it is determined that there is a deviation, it can be determined that there are unreasonable places in the resource deployment of the disaster recovery resources, and then determine the utilization rates of each virtual machine corresponding to the disaster recovery resources, and output a detection report according to the result of whether the utilization rate is within the preset range, so that it can be intuitively known which virtual machines are in normal use and which virtual machines are unreasonably used, improving the accuracy of the disaster recovery resource detection of the off-site disaster recovery computer room. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention;
[0035] Figure 2 is a schematic flowchart of the first embodiment of the DCN architecture resource detection method of the present invention;
[0036] Figure 3 is a schematic diagram of the device modules of the DCN architecture resource detection device of the present invention;
[0037] Figure 4 is a schematic diagram of the scenario of the DCN component in the DCN architecture resource detection method of the present invention.
[0038] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0039] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] As Figure 1 shown, Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.
[0041] The DCN architecture resource detection device in the embodiment of the present invention can be a PC or a server device, on which a Java virtual machine is running.
[0042] As Figure 1 shown, the DCN architecture resource detection device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0043] Those skilled in the art can understand that Figure 1 the device structure shown in
[0044] does not constitute a limitation to the device, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components. Figure 1 As
[0045] shown, in Figure 1 the device shown, the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect to the client (user side) and perform data communication with the client; and the processor 1001 can be used to call the DCN architecture resource detection program stored in the memory 1005 and execute the operations in the following DCN architecture resource detection method.
[0046] Based on the above hardware structure, an embodiment of a DCN architecture resource detection method of the present invention is proposed.
[0047] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of a DCN architecture resource detection method according to the present invention. The method includes:
[0048] Step S10, when evaluating the disaster recovery resources under the DCN architecture, obtaining system information in the production resources corresponding to the disaster recovery resources, and calculating the minimum disaster recovery resources according to the system information;
[0049] DCN (Data Center Node) is a highly redundant solution for independent functional units. Each group of DCNs can independently run the functional components (business units) required for business processing. Each computer room will contain multiple DCNs. Based on the product and customer dimensions, DCNs can be divided into R-DCN for retail customers, C-DCN for corporate customers, and back-end. A type of DCN can have multiple groups of DCNs, and the number depends on the number of customers of the DCN. A group of DCNs has two physical DCNs in the same-city production computer room and one physical DCN in a different-location disaster recovery computer room. These three physical DCNs form a group of DCNs. For example, Figure 4 As shown, assuming that there are production room 1, production room 2 and disaster recovery room 1, multiple DCNs of different types, such as RDCN and XDCN, can be placed in these rooms, and a group of DCNs has 3 DCNs, such as a group of RDCN1 including RDCN1' of production room 1, RDCN1" of production room 2, and RDCN1"' of disaster recovery room 1; or a group of XDCN1 including XDCN1' of production room 1, XDCN1" of production room 2, and XDCN1"' of disaster recovery room 1. And because the application system (APP) is deployed in the DCN, there will also be application system deployment instances in the DCN in each room.
[0050] The existing DCN architecture resource detection method is to estimate manually, which has low accuracy and will affect the overall business of financial institutions such as banks and insurance companies, thereby resulting in low economic benefits. In order to solve the above defects, the present invention proposes a DCN architecture resource detection method.
[0051] Specifically, when evaluating the disaster recovery resources in the disaster recovery computer room under the DCN architecture, the CMDB can be used to query the systems that have been released in the production DCN, determine the production resources corresponding to the disaster recovery resources to be evaluated, and then obtain the system information corresponding to the production resources, such as the system name, the instance corresponding to the system, the corresponding DCN information, which virtual machine it is deployed on, and the specifications of the corresponding virtual machine. When these system information are obtained, the minimum disaster recovery resources (i.e., the minimum disaster recovery resources) corresponding to this production environment can be calculated based on these system information. To calculate the minimum disaster recovery resources, the calculation algorithm for the minimum disaster recovery resources and the parameter definitions in the algorithm need to be determined first. When defining the parameters, it is necessary to divide the importance levels of the systems released in the DCN. For example, in the disaster recovery resources, 3 instances are deployed for systems with a high importance level (importance level A), and 2 instances are deployed for systems with a lower importance level (importance level B and C). Based on the DCN architecture, a system may appear in multiple groups of DCNs. If a system appears in multiple groups of DCNs in the production deployment instances, this system also needs to appear in the same number of DCNs in the disaster recovery. That is, if system X appears in 1 group of DCNs, it is counted 1 time, and if system Y appears in 2 groups of DCNs, it is counted 2 times. The total number of times systems X and Y appear is 3 times. The number of times system A appears is α, and the number of times systems B and C appear is β. Since disaster recovery does not consider the business peak, the method for calculating the minimum disaster recovery resources can be calculated according to the disaster recovery resources required for 1 instance (1-core CPU, 2GB memory). Considering the memory required for each instance to start and the memory occupied by the operating system of each virtual machine, that is, the minimum unit of virtual machine is 4-core CPU, 8GB memory, and at most 3 instances can be deployed, and the resource utilization rate can be 0.75. Therefore, the minimum disaster recovery resource algorithm can be Ω (minimum disaster recovery resources) = (α × 3 + β × 2) / 0.75. Among them, the disaster recovery resources can be the resources in the disaster recovery computer room, and the resources can be server resources, which are divided into physical machine and virtual machine resources. One server can be virtualized into multiple virtual machines, usually measured by computing power, with the unit of core number (CPU) and memory (GB). For example, there is an X86 server of model M10, and its computing power as a physical machine is 48-core CPU and 128GB memory. In addition, it can also be virtualized into 12 virtual machines with 4-core CPU and 8GB memory. The minimum disaster recovery resources can be the minimum disaster recovery resources required for all existing systems to deploy all instances in the production computer room. The production resources can be all the resources required for the system to deploy instances.
[0052] Step S20, obtain the used resources in the disaster recovery resources, and determine whether there is a deviation between the minimum disaster recovery resources and the used resources;
[0053] The used resources can be the resources in the disaster recovery resources that have been used by the system. After obtaining the minimum disaster recovery resources, it is possible to determine whether the total resources in the disaster recovery computer room are sufficient. That is, first obtain the used resources that have been used at the current moment in the disaster recovery resources, and then compare the minimum disaster recovery resources with the used resources to determine whether there is a deviation between the minimum disaster recovery resources and the used resources, and perform different operations according to the determination result.
[0054] Step S30, if there is a deviation between the minimum disaster recovery resources and the used resources, obtain the utilization rates of the virtual machines corresponding to the disaster recovery resources, and determine whether there is a target utilization rate that is not within the preset range among the utilization rates.
[0055] When it is determined through judgment that there is a deviation between the minimum disaster recovery resources and the used resources, the deviation value can be obtained, and different operations can be performed according to the deviation value in different ranges. Specifically, when the deviation value is within the first preset percentage of the minimum disaster recovery resources, perform the first lighting operation, indicating that the resource deviation is relatively small; when the deviation value is between the first preset percentage and the second preset percentage of the minimum disaster recovery resources, perform the second lighting operation, indicating that the resource deviation is relatively large; when the deviation value exceeds the second preset percentage of the minimum disaster recovery resources, perform the third lighting operation, indicating that the resource deviation is very large, where the first preset percentage is less than the second preset percentage. For example, when the deviation value is within 10% and 10% of the minimum disaster recovery resources, a green light prompt can be output to remind the user that although there is a difference in resources, the deviation is relatively small; when the deviation value is between 10% and 30% of the minimum disaster recovery resources, a yellow light prompt can be output to remind the user that the resource deviation is relatively large and requires key attention; when the deviation value is 30% and above of the minimum disaster recovery resources, a red light prompt can be output to remind the user that the resource deviation is very large and management measures need to be taken.
[0056] After determining the deviation value between the minimum disaster recovery resources and the used resources, it is also necessary to obtain the utilization rate of each virtual machine corresponding to the disaster recovery resources. The utilization rate of each virtual machine can be obtained by dividing the instances deployed on this virtual machine by the computing power of this virtual machine, and then multiplying by the resource utilization rate, such as 0.75. The final result is the utilization rate of this virtual machine. After obtaining the utilization rate, it is necessary to determine whether there is a target utilization rate outside the preset range among the various utilization rates. The preset range can be between the resource utilization rate of 0.75 and 1. For example, when the utilization rate is greater than 0.75 and less than or equal to 1, it can be considered that a reasonable number of instances are deployed on this virtual machine. At this time, the host utilization rate can be rated as reasonable, that is, there is a target utilization rate. When the utilization rate is greater than 1, it can be considered that too many instances are deployed on this virtual machine and it needs to be checked again. At this time, the host utilization rate can be rated as overused. When the utilization rate is less than or equal to the resource utilization rate, it can be considered that there is waste in the use of this virtual machine and it needs to be checked again. At this time, the host utilization rate can be rated as resource waste.
[0057] Step S40, if there is the target utilization rate, output a detection report of the virtual machine information corresponding to the target utilization rate.
[0058] When it is determined through judgment that there is a target utilization rate outside the preset range, that is, it can be considered that the utilization rate is not between 0.75 and 1, a detection report of the virtual machine information corresponding to the utilization rate outside the preset range can be output. That is, the system will count the list of the number of hosts with the host utilization rate rated as overused and resource waste, and can be distinguished according to the host usage department for resource managers to conduct resource inspection. However, when it is found that there is a utilization rate within the preset range, it can be considered that the host corresponding to this utilization rate is used reasonably and does not need to be checked again.
[0059] In this embodiment, when evaluating the disaster recovery resources in the DCN architecture, the system information in the production resources corresponding to the disaster recovery resources is obtained, and the minimum disaster recovery resources are calculated according to the system information; the used resources in the disaster recovery resources are obtained, and whether there is a deviation between the minimum disaster recovery resources and the used resources is determined; if there is a deviation between the minimum disaster recovery resources and the used resources, the utilization rates of the virtual machines corresponding to the disaster recovery resources are obtained, and whether there is a target utilization rate outside the preset range among the utilization rates is determined; if there is the target utilization rate, a detection report of the virtual machine information corresponding to the target utilization rate is output. When detecting the disaster recovery resources in the DCN architecture, by first determining whether there is a deviation between the minimum disaster recovery resources and the used resources, when it is determined that there is a deviation, it can be determined that there are unreasonable places in the resource deployment of the disaster recovery resources, and then the utilization rates of the virtual machines corresponding to the disaster recovery resources are determined, and a detection report is output according to the result of whether the utilization rate is within the preset range, so that it can be intuitively known which virtual machines are in normal use and which virtual machines are unreasonably used, improving the accuracy of the detection of the disaster recovery resources in the off-site disaster recovery computer room. The accuracy of the detection of the disaster recovery resources in the off-site disaster recovery computer room is higher in the process of detecting the DCN architecture resources of financial institutions such as banks.
[0060] Further, based on the first embodiment of the DCN architecture resource detection method of the present invention, a second embodiment of the DCN architecture resource detection method of the present invention is proposed. This embodiment is a refinement of step S10 of the first embodiment of the DCN architecture resource detection method of the present invention, which calculates the minimum disaster recovery resources according to the system information, and includes:
[0061] Step S11, determining the first instance number of the instances of the first application system deployed in the disaster recovery resources, and the second instance number of the instances of the second application system deployed in the disaster recovery resources;
[0062] It should be noted that in this embodiment, the system information includes a first application system and a second application system, and the importance level of the first application system is higher than that of the second application system.
[0063] An instance can be a process in which a system is deployed on a virtual machine, and the more instances are deployed, the more resources are consumed, but at the same time, the more business volume can be carried. The first instance number can be the number of instances of the first application system that have been deployed in the disaster recovery resources at the current moment. The second instance number can be the number of instances of the second application system that have been deployed in the disaster recovery resources at the current moment. The first instance number of the instances of all the first application systems with a high importance level that have been deployed in the disaster recovery resources and the second instance number of the instances of all the second application systems with a low importance level that have been deployed in the disaster recovery resources are counted and calculated.
[0064] Step S12, calculate the first sum value of the first instance quantity and the second instance quantity, and determine the minimum disaster recovery resources based on the first sum value.
[0065] Add the obtained first instance quantity and second instance quantity to obtain a sum value, that is, the first sum value, and the minimum disaster recovery resources required for computing disaster recovery can be determined according to this first sum value.
[0066] In this embodiment, by obtaining the first sum value between the first instance quantity corresponding to the first application system and the second instance quantity corresponding to the second application system, and then determining the minimum disaster recovery resources according to the first sum value, the minimum disaster recovery resources required can be directly determined according to the total number of instances, improving the accuracy of obtaining the minimum disaster recovery resources.
[0067] Specifically, the step of determining the minimum disaster recovery resources based on the first sum value includes:
[0068] Step S121, obtain the resource utilization rate corresponding to the disaster recovery resources, calculate the first ratio value of the first sum value and the resource utilization rate, and use the first ratio value as the minimum disaster recovery resources.
[0069] After obtaining the first sum value between the first instance quantity and the second instance quantity, it is also necessary to obtain the resource utilization rate corresponding to the disaster recovery resources. The resource utilization rate is the resource utilization rate of the virtual machine. Since the memory required for each instance to start and the operating system of each virtual machine also need to occupy memory. For example, the smallest unit of virtual machine has 4-core CPU and 8GB memory, and at most 3 instances can be deployed, and the resource utilization rate is 0.75. Then divide the first sum value by the resource utilization rate to obtain the first ratio value. At this time, the first ratio value can be used as the minimum disaster recovery resources required for disaster recovery.
[0070] In this embodiment, by obtaining the resource utilization rate, calculating the first ratio value of the first sum value and the resource utilization rate, and using the first ratio value as the minimum disaster recovery resources, the accuracy of obtaining the minimum disaster recovery resources is improved.
[0071] Further, on the basis of any one of the first to second embodiments of the present invention, a third embodiment of the resource detection method for the DCN architecture of the present invention is proposed. This embodiment is a refinement of the step of obtaining the usage rate of each virtual machine corresponding to the disaster recovery resources in step S30 of the first embodiment of the present invention, and includes:
[0072] Step S31, sequentially traverse each virtual machine corresponding to the disaster recovery resources, obtain the computing power value of the target virtual machine currently traversed, and determine the third instance quantity of the instances deployed on the target virtual machine;
[0073] Calculate the computing power value, with the unit being the number of cores (CPU) and memory (GB). For example, there is an X86 server with the model number M10. As a physical machine, its computing power value is 48 cores of CPU and 128 GB of memory. It can also be virtualized into 12 virtual machines with 4 cores of CPU and 8 GB of memory. The number of third instances can be the number of all instances deployed on the virtual machine. Traverse each virtual machine corresponding to the disaster recovery resources in turn, and obtain the computing power value of the target virtual machine being traversed, such as 4 cores of CPU, 8 GB of memory, etc. Then, determine the number of third instances of the instances already deployed on the target virtual machine.
[0074] Step S32: Calculate the second ratio value between the number of third instances and the computing power value, and determine the utilization rate of the target virtual machine based on the second ratio value until the traversal of each virtual machine is completed.
[0075] The second ratio value can be the ratio between the number of third instances in the virtual machine and the computing power value of the virtual machine. After obtaining the number of third instances and the computing power value, it is necessary to calculate the second ratio value between the number of third instances and the computing power value. After obtaining the second ratio value, the utilization rate of the computing target virtual machine can be directly determined according to the second ratio value. It should be noted that the calculation method for the utilization rate of all virtual machines is the same as that for the utilization rate of the target virtual machine, and the utilization rates of all virtual machines need to be obtained, that is, the traversal of each virtual machine is completed.
[0076] In this embodiment, by calculating the second ratio value between the number of third instances of the instances deployed on the virtual machine and the computing power value of the virtual machine, and determining the utilization rate of the target virtual machine according to the second ratio value, the accuracy of detecting the utilization rate of the virtual machine is improved.
[0077] Specifically, the step of determining the utilization rate of the target virtual machine based on the second ratio value includes:
[0078] Step S321: Obtain the resource utilization rate corresponding to the disaster recovery resources, calculate the first product between the second ratio value and the resource utilization rate, and use the first product as the utilization rate of the target virtual machine.
[0079] Since one instance requires a 4-core CPU and 8GB of memory, and a minimum unit of virtual machine (4-core CPU and 8GB) can deploy 3 instances, actually 1 virtual machine with a 4-core CPU and 8GB of memory is needed. The extra 1-core CPU and 2GB of memory can be used as the memory required for the actual startup of this virtual machine and the CPU and memory occupied by the operating system of each virtual machine. Obtain the resource utilization rate corresponding to the disaster recovery resources, calculate the first product between the second ratio value and the resource utilization rate, and the calculated first product can be used as the utilization rate of the target virtual machine. It should be noted that the utilization rate of each virtual machine corresponding to the disaster recovery resources needs to be obtained. The first product can be the product between the second ratio value and the resource utilization rate.
[0080] In this embodiment, by calculating the first product of the second ratio value and the resource utilization rate and using the first product as the utilization rate of the target virtual machine, the accuracy of calculating the utilization rate of the virtual machine is improved, enabling users to accurately know the usage of each virtual machine.
[0081] Further, on the basis of the first embodiment of the present invention, a fourth embodiment of the resource detection method for the DCN architecture of the present invention is proposed. This embodiment is a refinement of the step S30 in the first embodiment of the present invention, where there is a deviation between the disaster recovery minimum resources and the used resources, and the steps for obtaining the utilization rate of each virtual machine corresponding to the disaster recovery resources include:
[0082] Step S35, if there is a deviation between the disaster recovery minimum resources and the used resources, obtain the second product after multiplying the disaster recovery minimum resources by the second preset ratio value, and determine whether the deviation value of the deviation is greater than the second product;
[0083] The second product can be the product after multiplying the disaster recovery minimum resources by the second preset ratio value. When it is determined that there is a deviation between the disaster recovery minimum resources and the used resources, the disaster recovery minimum resources can be multiplied by the second preset ratio value to obtain the second product, and the deviation value between the disaster recovery minimum resources and the used resources can be determined. The deviation value is compared with the second product to determine whether the deviation value is greater than the second product, and different operations are performed based on the comparison result.
[0084] Step S36, if the deviation value is greater than the second product, obtain the utilization rate of each virtual machine corresponding to the disaster recovery resources.
[0085] When it is determined that the deviation value is greater than the second product, it can be determined that there is an unreasonable plan for the used resources. At this time, it is necessary to continue to obtain the utilization rate of each virtual machine corresponding to the disaster recovery resources to determine which virtual machines are used normally and which are not, so as to facilitate users to reasonably plan and arrange the disaster recovery resources.
[0086] In this embodiment, by determining whether the deviation value between the minimum disaster recovery resources and the used resources is greater than the second product of the minimum disaster recovery resources and the second preset ratio value, and when the deviation value is greater than the second product, obtaining the utilization rate of each virtual machine, the utilization rate of each virtual machine is detected when it is determined that the disaster recovery resources are unevenly distributed, thereby improving the user experience.
[0087] Specifically, after the step of determining whether the deviation value is greater than the second product, it includes:
[0088] Step S37, if the deviation value is less than or equal to the second product, output a detection report with information indicating sufficient disaster recovery resources.
[0089] When it is determined through judgment that the deviation value is less than or equal to the second product, it can be considered that the deviation between the minimum disaster recovery resources and the used resources is small, that is, it can be considered that the disaster recovery resources are sufficient, and thus a detection report with information indicating sufficient disaster recovery resources is output.
[0090] In this embodiment, by directly outputting a detection report with information indicating sufficient disaster recovery resources when the deviation value is less than or equal to the second product, users can accurately know the information that the disaster recovery resources are sufficient, thereby improving the user experience.
[0091] The present invention also provides a DCN architecture resource detection device. Referring to Figure 3 , the DCN architecture resource detection device includes:
[0092] A detection module, configured to obtain system information in the production resources corresponding to the disaster recovery resources when evaluating the disaster recovery resources under the DCN architecture, and calculate the minimum disaster recovery resources according to the system information;
[0093] An acquisition module, configured to acquire the used resources in the disaster recovery resources, and determine whether there is a deviation between the minimum disaster recovery resources and the used resources;
[0094] A determination module, if there is a deviation between the minimum disaster recovery resources and the used resources, acquire the utilization rate of each virtual machine corresponding to the disaster recovery resources, and determine whether there is a target utilization rate that is not within the preset range among the utilization rates;
[0095] An output module, configured to output a detection report of the virtual machine information corresponding to the target utilization rate if there is the target utilization rate.
[0096] Further, the system information includes a first application system and a second application system, and the importance level of the first application system is higher than that of the second application system. The detection module is further configured to:
[0097] Determine the first instance number of the instances of the first application system deployed in the disaster recovery resources, and the second instance number of the instances of the second application system deployed in the disaster recovery resources;
[0098] Calculate the first sum value of the first instance number and the second instance number, and determine the minimum disaster recovery resources based on the first sum value.
[0099] Further, the detection module is further configured to:
[0100] Obtain the resource utilization rate corresponding to the disaster recovery resources, calculate the first ratio value of the first sum value and the resource utilization rate, and use the first ratio value as the minimum disaster recovery resources.
[0101] Further, the determination module is further configured to:
[0102] Traverse each virtual machine corresponding to the disaster recovery resources in sequence, obtain the computing power value of the target virtual machine currently traversed, and determine the third instance number of the instances deployed on the target virtual machine;
[0103] Calculate the second ratio value of the third instance number and the computing power value, and determine the utilization rate of the target virtual machine based on the second ratio value until all the virtual machines are traversed.
[0104] Further, the determination module is further configured to:
[0105] Obtain the resource utilization rate corresponding to the disaster recovery resources, and calculate the first product between the second ratio value and the resource utilization rate, and use the first product as the utilization rate of the target virtual machine.
[0106] Further, the determination module is further configured to:
[0107] If there is a deviation between the minimum disaster recovery resources and the used resources, obtain the second product after multiplying the minimum disaster recovery resources by the second preset ratio value, and determine whether the deviation value of the deviation is greater than the second product;
[0108] If the deviation value is greater than the second product, obtain the utilization rates of each virtual machine corresponding to the disaster recovery resources.
[0109] Further, the determination module is further configured to:
[0110] If the deviation value is less than or equal to the second product, output a detection report with information indicating sufficient disaster recovery resources.
[0111] The methods executed by the above program modules can refer to the various embodiments of the resource detection method of the DCN architecture of the present invention, which will not be elaborated here.
[0112] The present invention also provides a computer storage medium.
[0113] A DCN architecture resource detection program is stored on the computer storage medium of the present invention. When the DCN architecture resource detection program is executed by a processor, the steps of the DCN architecture resource detection method described above are implemented.
[0114] Among them, the method implemented when the DCN architecture resource detection program running on the processor is executed can refer to each embodiment of the DCN architecture resource detection method of the present invention, which will not be elaborated here.
[0115] It should be noted that in this article, the terms "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.
[0116] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0118] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for detecting DCN architecture resources, characterized in that The DCN architecture resource detection method includes the following steps: When evaluating the disaster recovery resources under the DCN architecture of the data center nodes, obtain the system information in the production resources corresponding to the disaster recovery resources, and calculate the minimum disaster recovery resources according to the system information; the system information includes a first application system and a second application system, and the importance level of the first application system is higher than that of the second application system; The step of calculating the minimum disaster recovery resources according to the system information includes: determining the first instance number of the instances of the first application system deployed in the disaster recovery resources, and the second instance number of the instances of the second application system deployed in the disaster recovery resources; calculating the first sum value of the first instance number and the second instance number, and determining the minimum disaster recovery resources based on the first sum value; Obtain the used resources in the disaster recovery resources, and determine whether there is a deviation between the minimum disaster recovery resources and the used resources; If there is a deviation between the minimum disaster recovery resources and the used resources, obtain the utilization rate of each virtual machine corresponding to the disaster recovery resources, and determine whether there is a target utilization rate that is not within the preset range among the utilization rates; If there is the target utilization rate, output a detection report on the virtual machine information corresponding to the target utilization rate.
2. The DCN architecture resource detection method according to claim 1, characterized in that, The step of determining the minimum disaster recovery resources based on the first sum value includes: Obtain the resource utilization rate corresponding to the disaster recovery resources, calculate the first ratio value of the first sum value and the resource utilization rate, and use the first ratio value as the minimum disaster recovery resources.
3. The DCN architecture resource detection method according to claim 1, wherein, The step of obtaining the utilization rate of each virtual machine corresponding to the disaster recovery resources includes: Traverse each virtual machine corresponding to the disaster recovery resources in turn, obtain the computing power value of the target virtual machine currently traversed, and determine the third instance number of the instances deployed on the target virtual machine; Calculate the second ratio value of the third instance number and the computing power value, and determine the utilization rate of the target virtual machine based on the second ratio value until all the virtual machines are traversed.
4. The DCN architecture resource detection method according to claim 3, wherein The step of determining the utilization rate of the target virtual machine based on the second ratio value includes: Obtain the resource utilization rate corresponding to the disaster recovery resources, and calculate the first product between the second ratio value and the resource utilization rate, and use the first product as the utilization rate of the target virtual machine.
5. The DCN architecture resource detection method according to claim 1, wherein The step of, if there is a deviation between the minimum disaster recovery resources and the used resources, obtaining the utilization rate of each virtual machine corresponding to the disaster recovery resources includes: If there is a deviation between the minimum disaster recovery resources and the used resources, obtain the second product after multiplying the minimum disaster recovery resources by a second preset ratio value, and determine whether the deviation value of the deviation is greater than the second product; If the deviation value is greater than the second product, obtain the utilization rate of each virtual machine corresponding to the disaster recovery resources.
6. The DCN architecture resource detection method according to claim 5, characterized in that, After the step of determining whether the deviation value of the deviation is greater than the second product, it includes: If the deviation value is less than or equal to the second product, output a detection report with information indicating sufficient disaster recovery resources.
7. A DCN architecture resource detection device, characterized in that, The DCN architecture resource detection device includes: A detection module, which is used to obtain the system information in the production resources corresponding to the disaster recovery resources when evaluating the disaster recovery resources under the DCN architecture, and calculate the minimum disaster recovery resources according to the system information; the system information includes a first application system and a second application system, and the importance level of the first application system is higher than that of the second application system; specifically, the detection module is configured to: determine the first instance number of the instances of the first application system deployed in the disaster recovery resources, and the second instance number of the instances of the second application system deployed in the disaster recovery resources; and calculate the first sum value of the first instance number and the second instance number, and determine the minimum disaster recovery resources based on the first sum value. An acquisition module, which is used to acquire the used resources in the disaster recovery resources, and determine whether there is a deviation between the minimum disaster recovery resources and the used resources. A determination module, if there is a deviation between the minimum disaster recovery resources and the used resources, then acquire the utilization rates of the virtual machines corresponding to the disaster recovery resources, and determine whether there is a target utilization rate that is not within the preset range among the utilization rates. An output module, which is used to output a detection report of the virtual machine information corresponding to the target utilization rate if there is the target utilization rate.
8. A DCN architecture resource detection device, characterized in that, The DCN architecture resource detection device includes: a memory, a processor, and a DCN architecture resource detection program stored on the memory and executable on the processor. When the DCN architecture resource detection program is executed by the processor, the steps of the DCN architecture resource detection method described in any one of claims 1 to 6 are implemented.
9. A computer storage medium, characterized in that, A DCN architecture resource detection program is stored on the computer storage medium. When the DCN architecture resource detection program is executed by the processor, the steps of the DCN architecture resource detection method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Instance node management method and management equipment
CN104836850A
Virtual machine underutilization detector
US20190056969A1