Method and system for regulating cloud service chain path planning and fault multi-activity

By regulating the two-level classification identification of cloud services and nodes and calculating load indicators, faults are regularly detected and service invocation paths are re-planned, which solves the problems of load balancing and fault multi-activity in the existing technology and achieves stable operation of the service chain.

CN115242794BActive Publication Date: 2024-09-03CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210885876.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2024-09-03
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

Existing technologies fail to effectively implement load balancing and fault multi-activity in regulating cloud service chain calls, resulting in service chain call failures and service interruptions, and unable to ensure stable and reliable business operations.

Method used

Through two-level classification and identification of the services and service nodes of the dual-site control cloud, the load indicator function of the service nodes and links is calculated, a load sequence table of service nodes and links is formed, faults are regularly detected, fault data is eliminated, and services are re-planned. Call path to achieve service call link switching with minimum load.

Benefits of technology

It achieves load balancing and fault multi-activity during the service chain invocation process, avoids service chain invocation failures, and ensures stable and reliable operation of the business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115242794B
    Figure CN115242794B
Patent Text Reader

Abstract

The present invention belongs to the technical field of cloud services, and discloses a method and system for regulating cloud service chain path planning and fault multi-active: two-level classification identification of services and service nodes of dual cloud sites; calculation of load index functions of service nodes, service links, and service chains in service calls; formation of service node load sequence table, service link load sequence table, and upstream and downstream service load sequence table; planning of global service call path according to the principle of minimum load, forming a currently available service call link set; regular detection of whether each service node and link in the dual cloud sites is faulty; if a fault or sudden fault is detected, the corresponding faulty service node or link data is removed, and according to the principle of minimum load, the global service call path is re-planned or the currently available subsequent service call link with the minimum load is dynamically planned to achieve fault multi-active. The present invention can quickly achieve fault multi-active and effectively ensure the stable and reliable operation of the business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cloud services, and in particular relates to a method and system for regulating cloud service chain path planning and fault multi-activity. Background Art

[0002] The control cloud is a cloud service platform for power grid dispatching business based on cloud technology concepts such as virtualization, distribution and service. In order to adapt to the characteristics of integrated power grid operation and meet the dispatching management mode of "unified dispatching and hierarchical management", the control cloud adopts a hierarchical deployment design that combines unification and distribution, forming a two-level deployment architecture of national leading nodes and provincial collaborative nodes, which together constitute a complete control cloud system. In order to ensure that the control cloud system provides services 24 / 7, the control cloud deploys multiple sites in different locations within the same control cloud node. The two sites are configured in a peer-to-peer mode and can provide services to the outside world at the same time at the business level, realizing the stable and reliable operation of the control cloud service and power grid control business.

[0003] As the scale of the control cloud construction continues to expand and business needs continue to increase, service calls generally rely on multiple downstream services, that is, on the surface, one service calls a downstream service, but in fact it calls a service chain with multiple services. In addition, to ensure the high availability of the control cloud, the service chain call of the control cloud may involve two or even more control cloud sites at the same time, that is, the service nodes in two or more control cloud sites jointly participate in the service chain call process.

[0004] In the load balancing decision of service calls in the prior art, only the load balancing between the first service node and its adjacent downstream service nodes is considered, which is not comprehensive and may even lead to situations where the call cannot be successfully made. For example, service A needs to call service B, and there are three service nodes B1, B2, and B3 that can provide service B. Service node A1 selects one of the service nodes B2 for the call based on the load of its adjacent downstream service nodes B1, B2, and B3. However, when service node B2 wants to call its downstream service C, the call may fail due to reasons such as a link disconnection between service node B2 and service node C, or the load cost of service node B2 calling service C far exceeds the load cost of service node B1 calling service C.

[0005] In addition, the existing technology does not consider how to quickly achieve fault multi-activity when a service node or link fails. This may cause the final service chain call to fail and the service to be interrupted, and cannot ensure the stable and reliable operation of the business. Summary of the invention

[0006] The purpose of the present invention is to provide a method and system for regulating cloud service chain path planning and fault multi-active, so as to solve the existing technical problem that fault multi-active cannot be quickly achieved.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] In a first aspect, the present invention provides a method for regulating cloud service chain path planning and fault multi-active, comprising:

[0009] The services and service nodes of the dual sites of the control cloud are classified and identified at two levels to form a service and service node identification table;

[0010] Calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight;

[0011] According to the service node load index function, service link load index function, service chain load index function, and service and service node identification table, a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table are formed; according to the principle of minimum load, a global service call path is planned to form a currently available service call link set;

[0012] Add service node status table and service link status table to regularly check and control whether there are faults in the service nodes and links in the dual sites of the cloud; if a fault or sudden fault is detected, remove the service node or link data of the corresponding fault, and re-plan the global service call path according to the principle of minimum load, or dynamically plan the subsequent service call link that is currently available and has the smallest load, to achieve multi-activeness in case of faults.

[0013] A further improvement of the present invention is that: the step of performing two-level classification identification on the services and service nodes of the dual-site control cloud to form a service and service node identification table specifically includes:

[0014] The services and service nodes of the dual sites of the control cloud are classified and identified at two levels; the first level is for services, and the current services are classified and identified according to the service call relationship; the second level is for service nodes, based on the service identification, to identify the nodes that provide the same service; based on the two-level classification identification, a service and service node identification table is formed.

[0015] A further improvement of the present invention is that the step of calculating the service node load index function, the service link load index function, and the service chain load index function in the service call according to the preset load index and the corresponding weight specifically includes:

[0016] Using services as the classification category for load index normalization, each load index of the service nodes providing the same service is normalized separately;

[0017] Calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight;

[0018] Service node load indicator function: f(X i )=k1F cpu (X i )+k2F m (X i )+k3F disk (X i ),i∈(1,2,…);

[0019] Service link load indicator function: f(X i-1 ,X i )=k4F b (X i-1 ,X i ),i∈(1,2,…);

[0020] Service chain load indicator function: f(X i-1 ,X i )=f(X i )+f(X i-1 ,X i ),i∈(1,2,…);

[0021] The load indicators include the CPU utilization rate F of the service node. CPU (X i ), memory usage F m (X i ), disk usage F disk (X i ), the network bandwidth of the service network link and the propagation delay F caused by the transmission distance b (X i );k j is the weight of the j-th load indicator, where The selection of indicators is not limited to the indicators mentioned in the present invention, and the indicators can be expanded or changed according to specific business characteristics, such as the data volume of the service, the type of service and other actual conditions.

[0022] A further improvement of the present invention is that: the steps of forming a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table according to the service node load index function, the service link load index function, the service chain load index function, and the service and service node identification table; and planning a global service call path according to the minimum load principle to form a currently available service call link set specifically include:

[0023] Before starting the service chain call, a global path planning is performed on the service chain based on the service node load index function, the service link load index function, and the service chain load index function;

[0024] According to the nodes providing the same service, the service node load index function results are sorted to form a service node load sequence table;

[0025] According to the network links between adjacent upstream and downstream nodes, the service link load index function results are sorted to form a service link load sequence table;

[0026] According to the network links between adjacent upstream and downstream nodes and the load of the service nodes called downstream, the load index function results of all feasible service call paths of the service chain are sorted to form an upstream and downstream service load sequence table;

[0027] According to the upstream and downstream service load sequence table and the principle of minimum load, the global service call path is planned to form a set of currently available global service call links.

[0028] A further improvement of the present invention is that if a service or a service node is added or deleted, the service node load sequence table, the service link load sequence table, and the upstream and downstream service load sequence table are dynamically updated, and the global service call link set is dynamically re-planned.

[0029] The present invention is further improved in that: the added service node status table and service link status table are used to record the fault status of the service nodes and links; the added service node status table and service link status table are updated to the service registration center.

[0030] A further improvement of the present invention is that: the steps of regularly detecting and regulating whether there are faults in each service node and link in the dual-site cloud; if a fault or sudden fault is detected, the service node or link data of the corresponding fault is removed, and according to the principle of minimum load, the global service call path is replanned or the subsequent service call link that is currently available and has the minimum load is dynamically planned to achieve multi-active failure, specifically including:

[0031] Regularly check and regulate each service node and link in the dual cloud sites:

[0032] If a node is detected to be faulty, a node fault flag is added to the service node status table. The faulty node does not participate in the service call, and the data of the corresponding faulty node is removed from the service node load sequence table and the upstream and downstream service load sequence table. The global service call path is replanned according to the principle of minimum load to achieve multi-active service node failures.

[0033] If a node involved in the service chain suddenly fails during the service chain call process, a node failure mark is added to the service node status table, and the failed node does not participate in the service call; the adjacent upstream node of the failed node is found in reverse, and the service chain path is changed from the adjacent upstream node; the data of the corresponding failed node is removed from the service node load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, according to the principle of minimum load, the currently available subsequent service call link with the minimum load is dynamically planned, and the failed node is quickly switched to achieve multi-active service node failure;

[0034] If a network link is detected to be faulty, a network link fault flag is added to the service link status table, and the faulty network link does not participate in the service call; the data of the corresponding faulty network link is removed from the service link load sequence table and the upstream and downstream service load sequence table, and the global service call path is replanned according to the principle of minimum load to achieve multi-active service link failures;

[0035] If a network link involved in the service chain suddenly fails during the service chain call process, a link failure mark is added to the service link status table, and the faulty network link does not participate in the service call; the adjacent upstream node of the faulty network link is found in reverse, and the service chain path is changed starting from the adjacent upstream node of the faulty network link; the data of the corresponding faulty network link is removed from the service link load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, according to the principle of minimum load, the currently available subsequent service call link with the minimum load is dynamically planned to quickly realize the switching of the faulty link and realize multi-active service link failure.

[0036] Regularly check whether the faulty nodes or links in the dual sites have resumed operation. If they have resumed normal operation, dynamically add them to the path planning.

[0037] In a second aspect, the present invention provides a cloud service chain path planning and fault multi-active device, comprising:

[0038] A hierarchical identification module is used to classify and identify the services and service nodes of the dual sites of the control cloud at two levels to form a service and service node identification table;

[0039] The cost calculation module is used to calculate the service node load index function, service link load index function and service chain load index function in the service call according to the preset load index and corresponding weight;

[0040] The path planning module is used to form a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table according to the service node load index function, the service link load index function, the service chain load index function, and the service and service node identification table; according to the principle of minimum load, the global service call path is planned to form a currently available service call link set;

[0041] The fault multi-active module is used to add service node status tables and service link status tables, and regularly detect and control whether there are faults in the service nodes and links in the dual sites of the cloud; if a fault or sudden fault is detected, the service node or link data of the corresponding fault is eliminated, and according to the principle of minimum load, the global service call path is re-planned or the subsequent service call link that is currently available and has the smallest load is dynamically planned to achieve fault multi-active.

[0042] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the cloud service chain path planning and fault multi-active method.

[0043] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the cloud service chain path planning and fault multi-active method is implemented.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] The purpose of the present invention is to provide a method and system for path planning and fault multi-active control of a cloud service chain. First, the services and service nodes of the dual sites of the control cloud are classified and identified at two levels to form a service and service node identification table. The two-level classification identification can clearly define the categories of services in the control cloud and which service nodes provide the services, realize the unique identification and mutual correspondence between services and service nodes, and provide a basis for the subsequent path planning and fault multi-active control. In the path planning, the load index function results of all feasible service call paths of the service chain are considered according to the network links between adjacent upstream and downstream nodes and the load of the service nodes called downstream. Instead of considering the load balancing between the first service node and its adjacent downstream service nodes, the overall downstream load in the subsequent service links is considered to form a global service call path, thereby avoiding the situation where the load balancing is not comprehensive or may not be successfully called when the service chain is called. In the fault multi-active control, the service nodes and links in the dual sites of the control cloud are regularly checked for faults. If there is a fault, the node or the link does not participate in the service call. All data of the corresponding faulty nodes or faulty links are removed from the service node status table, service link status table, service node load sequence table, service link load sequence table, and upstream and downstream service load sequence table, and the currently available service call link with the smallest load is dynamically planned to achieve multi-active failure. When a service node or a network link suddenly fails, the adjacent upstream node of the faulty node or link is reversely searched, and the service chain path is changed from the adjacent upstream node. The data of the corresponding faulty nodes or links are removed from the service node load sequence table, service link load sequence table, and upstream and downstream service load sequence table, and based on the currently completed partial service call link, the currently available subsequent service call link with the smallest load is dynamically planned according to the principle of minimum load, and the switching of the faulty link is quickly achieved. In this way, it can ensure that the link with the smallest load in the current service chain is selected, and the situation of service chain call failure can be avoided, so as to achieve multi-active failure.

[0046] In summary, the present invention takes into account the load of each service in the service chain call process, comprehensively analyzes and judges various feasible service paths when the service chain is called, and realizes the wide-area global planning of the service call path. When a service node or link fails, the currently available optimal service chain is quickly selected to avoid service chain call failure and realize fault multi-activity. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0048] Figure 1 A schematic diagram of a process of regulating cloud service chain path planning and fault multi-active method of the present invention;

[0049] Figure 2 It is the overall topology diagram of the service;

[0050] Figure 3 A schematic diagram of the dual-site service topology for regulating the cloud;

[0051] Figure 4 A schematic diagram of the normal call of the dual-site service chain for regulating the cloud;

[0052] Figure 5 A schematic diagram for regulating the multi-active failure of cloud dual-site service nodes;

[0053] Figure 6 Schematic diagram for regulating the multi-active link failure of cloud dual-site services;

[0054] Figure 7 This is a structural block diagram of a cloud service chain path planning and fault control system of the present invention;

[0055] Figure 8 This is a schematic diagram of the relationship between the service chain path planning and the fault-tolerant active-active system and the service registration center.

[0056] Fig. 9 The present invention is a structural block diagram of an electronic device. DETAILED DESCRIPTION

[0057] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.

[0058] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.

[0059] Control cloud: Based on cloud technology concepts such as virtualization, distribution and service, it adopts a physically distributed and logically unified architecture model, has the characteristics of resource virtualization, data standardization, and application service, and is an electric power control information system that provides cloud services for electric power control business. It is an enterprise private cloud for power grid control production and operation.

[0060] Control cloud node: A subsystem in the control cloud that logically and uniformly provides cloud services to the outside world. The control cloud consists of multiple levels of control cloud nodes.

[0061] Control Cloud Site: A set of infrastructure, support platforms and application software physically concentrated in a control cloud node. Each control cloud node consists of multiple peer sites, which are configured in peer mode.

[0062] Service node: A general term for physical servers, virtual machines, and containers, which can provide resources such as hard disks, CPUs, and memory.

[0063] Service: Services are expressed as component business capabilities provided by the cluster. Each component in the cluster corresponds to a service name and provides a service.

[0064] Service instance: provides service capabilities to the outside world. A service node can run one service instance or multiple service instances. A service can have one service instance or multiple service instances. Multiple service instances are distributed on different service nodes and can all provide the service.

[0065] Load balancing: It means balancing the load (work tasks) and distributing them to multiple operating units, such as FTP servers, Web servers, enterprise core application servers, and other major task servers, so as to complete the work tasks in a coordinated manner. Load balancing is built on the original network structure, and it provides a transparent, inexpensive and effective method to expand the bandwidth of servers and network devices, enhance network data processing capabilities, increase throughput, and improve network availability and flexibility.

[0066] Service provider: The callee of a service is the provider of the service, that is, the service that provides services to other services.

[0067] Service Consumer: The caller of a service is a consumer, that is, a service that depends on other services.

[0068] Service Registry: The service registry is the core component for service management and one of the most basic facilities in the microservice architecture. The registry can be said to be the "address book" in the microservice architecture. It records the mapping relationship between services and service addresses, similar to the role of directory services. It is mainly used to store service information, such as the uniform resource locator (URL) address and routing information of service providers and consumers. It can also implement service registration, publishing, load balancing, health checks, and fault detection. In a distributed architecture, services will be registered here. When service consumers need to call other services, they will select a service address from the service list based on the service list and load balancing algorithm of the service registry to call the service.

[0069] Example 1

[0070] In order to solve the problems existing in the prior art, the present invention provides a method for regulating cloud service chain path planning and fault multi-active, taking into account each service load in the service chain call process, comprehensively analyzing various feasible service paths when the service chain is called, and realizing wide-area global planning of service call paths. When a service node or link fails, the currently available optimal service chain is quickly selected to realize fault multi-active.

[0071] See also Figure 1 As shown, the present invention provides a method for regulating cloud service chain path planning and fault multi-activity, comprising the following steps:

[0072] S1. Classification mark

[0073] The services and service nodes of the dual sites of the control cloud are classified and identified at two levels. The first level is for services, and the current services are classified and identified according to the service call relationship. The second level is based on the service identification, and the nodes that provide the same service are identified for service nodes. Based on the two-level classification identification, a service and service node identification table is formed.

[0074] Specifically, the attributes of the service identifier include code, name, and description. The code is a unique digital identifier that distinguishes the service, and the number of bits can be selected according to the requirements of the control cloud. The name is a text identifier used to help users understand. The description is used to simply record the functions provided by the service.

[0075] The attributes of the service node identification include code and name. The code is a unique digital identification that distinguishes each service node. The number of code bits can be selected according to the requirements of the control cloud. The name is a text identification used to help users and maintenance personnel understand.

[0076] The service code and the service node code are combined hierarchically to form a node identifier that provides the same service, which is recorded in the service and service node identifier table.

[0077] If a service is added or deleted, the logical position of the new or deleted service in the service call is determined, the service identifier is dynamically updated, and the node identifier of the corresponding service is updated accordingly.

[0078] If there are new or retired service nodes, the service node identifier under the corresponding service will be dynamically updated according to the services provided by the node.

[0079] In the present invention, for the convenience of description, the service code is simplified to X (X = A, B, C ...), the service node code is simplified to i (i = 1, 2, 3 ...), and the service node identifier is simplified to X i (X=A,B,C…;i=1,2,3…). The overall service topology diagram is as follows Figure 2In a specific implementation, the topology diagram involves four services, namely A, B, C, and D. Service A is provided by service node A1; service nodes B1, B2, B3, B4, and B5 can all provide service B; service nodes C1, C2, and C3 can all provide service C; and service D is provided by service nodes D1 and D2.

[0080] In a specific implementation, in order to ensure the reliability and continuity of the control cloud, the control cloud is built in a dual-site mode, that is, two sites A and B are deployed in different locations, and data synchronization between the sites is achieved through a resource synchronization network. There are corresponding service nodes at sites A and B that can provide the same service. The dual-site service topology of the control cloud is shown as follows: Figure 3 shown.

[0081] S2. Cost calculation

[0082] (1) Set load indicators: Load indicators include the CPU utilization rate F of the service node CPU (X i ), memory usage F m (X i ), disk usage F disk (X i ), the network bandwidth of the service network link and the propagation delay F caused by the transmission distance b (X i The selection of indicators is not limited to the indicators mentioned in the present invention, and the indicators can be expanded or changed according to specific business characteristics, such as the data volume of the service, the type of service, and other actual conditions.

[0083] (2) Normalizing load indicators: Service is used as the classification category for load indicator normalization, and each load indicator of the service nodes providing the same service is normalized separately.

[0084] (3) Weight setting: According to the actual situation of the control cloud, set the corresponding weight k for each of the above indicators. j (j=1,2,3,4), where

[0085] (4) Cost function: Based on the load index and the corresponding weight, the service cost function is calculated, including the service node load index function, the service link load index function, and the service chain load index function.

[0086] Service node load indicator function: f(X i )=k1F cpu (X i )+k2F m (X i )+k3F disk (X i ),i∈(1,2,…)

[0087] Service link load indicator function: f(X i-1 ,X i )=k4F b (X i-1 ,X i ),i∈(1,2,…)

[0088] Service chain load indicator function: f(X i-1 ,X i )=f(X i )+f(X i-1 ,X i ),i∈(1,2,…)

[0089] S3. Path Planning

[0090] Before starting the service chain call, a global path planning is performed on the service chain based on the service node load index function, the service link load index function, and the service chain load index function.

[0091] According to the nodes providing the same service, the service node load index function results are sorted to form a service node load sequence table.

[0092] According to the network links between adjacent upstream and downstream nodes, the service link load indicator function results are sorted to form a service link load sequence table.

[0093] According to the network links between adjacent upstream and downstream nodes and the load of the service nodes called downstream, the load indicator function results of all feasible service call paths of the service chain are sorted to form an upstream and downstream service load sequence table.

[0094] According to the upstream and downstream service load sequence table and the principle of minimum load, the global service call path is planned to form a set of currently available global service call links.

[0095] If a service or a service node is added or deleted, the service node load sequence table, service link load sequence table, and upstream and downstream service load sequence table are dynamically updated, and the global service call link set is dynamically re-planned.

[0096] In a specific implementation, the normal call diagram of the dual-site service chain of the control cloud is as follows Figure 4 As shown. Figure 4 In the figure, the entire service chain involves four services, namely A, B, C, and D. To complete the downstream service call of service A, the upstream and downstream service load sequence table is used to plan the global service call path, and service nodes B1, C2, and D2 are selected to form the A1→B1→C2→D2 service chain.

[0097] S4, Failure Multi-Activity

[0098] A monitoring module is added to the service bus client, and the monitoring module is used to regularly detect whether there are faults in each service node and link in the dual site. A service node status table and a service link status table are added to record the fault status of the service node and link, and the service node status table and the service link status table are updated to the service registration center.

[0099] If a node is detected to have a fault, a node fault flag is added to the service node status table, and the node does not participate in the service call. The data of the corresponding faulty node is removed from the service node load sequence table and the upstream and downstream service load sequence table. The global service call path is replanned according to the principle of minimum load to achieve multi-active service node faults.

[0100] If a node involved in the service chain suddenly fails during the service chain call, a node failure mark is added to the service node status table, and the node does not participate in the service call. At this time, in order to complete the service chain call as soon as possible, reversely find the adjacent upstream node of the faulty node, and change the service chain path from the adjacent upstream node. Remove the data of the corresponding faulty node from the service node load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, according to the principle of minimum load, dynamically plan the currently available and least loaded subsequent service call link, quickly realize the switching of the faulty node, avoid service call failure, and realize multi-active service node failure.

[0101] If a network link is detected to have failed, a link failure flag is added to the service link status table, and the network link does not participate in the service call. The data of the corresponding failed link is removed from the service link load sequence table and the upstream and downstream service load sequence table. The global service call path is replanned according to the principle of minimum load to achieve multi-active service link failure.

[0102] If a network link involved in the service chain suddenly fails during the service chain call, a link failure mark is added to the service link status table, and the network link does not participate in the service call. At this time, in order to complete the service chain call as soon as possible, reversely find the adjacent upstream node of the faulty link, and change the service chain path from the adjacent upstream node. Remove the data of the corresponding faulty link from the service link load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, according to the principle of minimum load, dynamically plan the currently available and least loaded subsequent service call link, quickly implement the switching of the faulty link, avoid service call failure, and achieve multi-active service link failure.

[0103] Regularly check whether the faulty nodes or links in the dual sites have resumed operation. If they have resumed normal operation, dynamically add them to the path planning.

[0104] In a specific implementation, the schematic diagram of regulating cloud dual-site service node failure multi-active is as follows Figure 5 As shown. Figure 5 In the example, service node C2 fails and cannot provide service C. To complete the downstream service call of service A, the service node status table, service node load sequence table, and upstream and downstream service load sequence table are combined to dynamically re-plan the currently available service call link with the smallest load, and select service nodes B1, C1, and D2 to form a service chain A1→B1→C1→D2.

[0105] In a specific implementation, the schematic diagram of regulating cloud dual-site service link failure multi-active is as follows Figure 6 As shown. Figure 6 In the process, the network link C2→D2 fails and cannot complete the subsequent service D call. In order to complete the downstream service call of service A, the service link state table, service link load sequence table, and upstream and downstream service load sequence table are combined to dynamically re-plan the currently available service call link with the smallest load, and select service nodes B1, C2, and D1 to form a service chain A1→B1→C2→D1.

[0106] Example 2

[0107] See also Figure 7 As shown, the present invention provides a cloud service chain path planning and fault multi-active device, including:

[0108] A hierarchical identification module is used to classify and identify the services and service nodes of the dual sites of the control cloud at two levels to form a service and service node identification table;

[0109] The cost calculation module is used to calculate the service node load index function, service link load index function and service chain load index function in the service call according to the preset load index and corresponding weight;

[0110] The path planning module is used to form a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table according to the service node load index function, the service link load index function, the service chain load index function, and the service and service node identification table; according to the principle of minimum load, the global service call path is planned to form a currently available service call link set;

[0111] The fault multi-active module is used to add service node status tables and service link status tables, and regularly detect and control whether there are faults in the service nodes and links in the dual sites of the cloud; if a fault or sudden fault is detected, the service node or link data of the corresponding fault is eliminated, and according to the principle of minimum load, the global service call path is re-planned or the subsequent service call link that is currently available and has the smallest load is dynamically planned to achieve fault multi-active.

[0112] In a specific implementation, the hierarchical identification module performs two-level classification identification on the services and service nodes of the dual-site control cloud to form a service and service node identification table, specifically including:

[0113] The services and service nodes of the dual sites of the control cloud are classified and identified at two levels; the first level is for services, and the current services are classified and identified according to the service call relationship; the second level is for service nodes, based on the service identification, to identify the nodes that provide the same service; based on the two-level classification identification, a service and service node identification table is formed.

[0114] In a specific implementation, the cost calculation module calculates the service node load index function, the service link load index function, and the service chain load index function in the service call according to the preset load index and the corresponding weight, specifically including:

[0115] Using services as the classification category for load index normalization, each load index of the service nodes providing the same service is normalized separately;

[0116] Calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight;

[0117] Service node load indicator function: g(X i )=k1F cpu (X i )+k2F m (X i )+k3F disk (X i ),i∈(1,2,…);

[0118] Service link load indicator function: f(X i-1 ,X i )=k4F b (X i-1 ,X i ),i∈(1,2,…);

[0119] Service chain load indicator function: f(X i-1 ,X i )=f(X i )+f(X i-1 ,X i ),i∈(1,2,…);

[0120] The load indicators include the CPU utilization rate F of the service node. CPU (X i ), memory usage F m (X i ), disk usage Fdisk (X i ), the network bandwidth of the service network link and the propagation delay F caused by the transmission distance b (X i );k j is the weight of the j-th load indicator, where The selection of indicators is not limited to the indicators mentioned in the present invention, and the indicators can be expanded or changed according to specific business characteristics, such as the data volume of the service, the type of service and other actual conditions.

[0121] In a specific implementation, the path planning module forms a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table according to the service node load index function, the service link load index function, the service chain load index function, and the service and service node identification table; and plans a global service call path according to the minimum load principle to form a currently available service call link set, specifically including:

[0122] Before starting the service chain call, a global path planning is performed on the service chain based on the service node load index function, the service link load index function, and the service chain load index function;

[0123] According to the nodes providing the same service, the service node load index function results are sorted to form a service node load sequence table;

[0124] According to the network links between adjacent upstream and downstream nodes, the service link load index function results are sorted to form a service link load sequence table;

[0125] According to the network links between adjacent upstream and downstream nodes and the load of the service nodes called downstream, the load index function results of all feasible service call paths of the service chain are sorted to form an upstream and downstream service load sequence table;

[0126] According to the upstream and downstream service load sequence table and the principle of minimum load, the global service call path is planned to form a set of currently available global service call links.

[0127] In a specific implementation, if a service or a service node is added or deleted, the path planning module dynamically updates the service node load sequence table, the service link load sequence table, and the upstream and downstream service load sequence table, and dynamically re-plans the global service call link set.

[0128] In a specific implementation, the fault active-active module adds a service node status table and a service link status table to record the fault status of service nodes and links; the added service node status table and service link status table are updated to the service registration center.

[0129] In a specific implementation, the steps of regularly checking whether each service node and link in the dual sites of the control cloud have faults; if a fault or sudden fault is detected, the service node or link data of the corresponding fault is removed, and the global service call path is replanned according to the principle of minimum load, or the subsequent service call link that is currently available and has the minimum load is dynamically planned to achieve multi-active failure, specifically including:

[0130] Regularly check and regulate each service node and link in the dual cloud sites:

[0131] If a node is detected to be faulty, a node fault flag is added to the service node status table. The faulty node does not participate in the service call, and the data of the corresponding faulty node is removed from the service node load sequence table and the upstream and downstream service load sequence table. The global service call path is replanned according to the principle of minimum load to achieve multi-active service node failures.

[0132] If a node involved in the service chain suddenly fails during the service chain call process, a node failure mark is added to the service node status table, and the failed node does not participate in the service call; the adjacent upstream node of the failed node is found in reverse, and the service chain path is changed from the adjacent upstream node; the data of the corresponding failed node is removed from the service node load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, according to the principle of minimum load, the currently available subsequent service call link with the minimum load is dynamically planned, and the failed node is quickly switched to achieve multi-active service node failure;

[0133] If a network link is detected to be faulty, a network link fault flag is added to the service link status table, and the faulty network link does not participate in the service call; the data of the corresponding faulty network link is removed from the service link load sequence table and the upstream and downstream service load sequence table, and the global service call path is replanned according to the principle of minimum load to achieve multi-active service link failures;

[0134] If a network link involved in the service chain suddenly fails during the service chain call process, a link failure mark is added to the service link status table, and the faulty network link does not participate in the service call; the adjacent upstream node of the faulty network link is found in reverse, and the service chain path is changed starting from the adjacent upstream node of the faulty network link; the data of the corresponding faulty network link is removed from the service link load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, according to the principle of minimum load, the currently available subsequent service call link with the minimum load is dynamically planned to quickly realize the switching of the faulty link and realize multi-active service link failure.

[0135] Regularly check whether the faulty nodes or links in the dual sites have resumed operation. If they have resumed normal operation, dynamically add them to the path planning.

[0136] The above-mentioned control cloud dual-site service chain path planning and the relationship between the fault multi-active system and the service registration center are shown in the figure below: Figure 8 As shown. The service providers and service consumers at sites A and B register in the service registration center and obtain the service instance list regularly. Service providers and consumers send heartbeat signals regularly through service health monitoring to complete service renewal. A monitoring module is added to the service bus client, which is used to regularly detect whether there are faults in each service node and link in the dual sites, and feedback the service node and link status detection results to the service registration center. The service registration center uses service health monitoring and combines the service node and link status detection results to determine and update the service instance list. The service registration center provides the service address to the service chain path planning and fault multi-active system to complete the service consumer's service call to the service provider and form a service chain.

[0137] Example 3

[0138] See also Fig. 9 As shown, the present invention also provides an electronic device 100 for implementing a cloud service chain path planning and fault multi-active method; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0139] The memory 101 can be used to store the computer program 103, and the processor 102 implements the method steps of a method for regulating cloud service chain path planning and fault multi-active described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0140] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.

[0141] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for regulating cloud service chain path planning and fault multi-activity, and the processor 102 can execute the plurality of instructions to implement:

[0142] The services and service nodes of the dual sites of the control cloud are classified and identified at two levels to form a service and service node identification table;

[0143] Calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight;

[0144] According to the service node load index function, service link load index function, service chain load index function, and service and service node identification table, a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table are formed; according to the principle of minimum load, a global service call path is planned to form a currently available service call link set;

[0145] Add service node status table and service link status table to regularly check and control whether there are faults in the service nodes and links in the dual sites of the cloud; if a fault or sudden fault is detected, remove the service node or link data of the corresponding fault, and re-plan the global service call path according to the principle of minimum load, or dynamically plan the subsequent service call link that is currently available and has the smallest load, to achieve multi-activeness in case of faults.

[0146] Example 4

[0147] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).

[0148] 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.

[0149] The present invention is described with reference to flowcharts and / or block diagrams of methods, 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.

[0150] 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.

[0151] 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 The steps for the functions specified in one or more boxes.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for regulating cloud service chain path planning and fault multi-activeness, characterized in that: include: Carry out two-level classification and identification of services and service nodes at the dual sites of the control cloud to form a service and service node identification table; Calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight; Based on the service node load index function, service link load index function, service chain load index function, and service and service node identification table, a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table are formed; according to the principle of minimum load, the global service call path is planned to form a set of currently available service call links; Add service node status tables and service link status tables to regularly check whether there are faults in each service node and link in the dual-site control cloud. If a fault or sudden fault is detected, the service node or link data of the corresponding fault is eliminated, and according to the principle of minimum load, the global service call path is replanned or the subsequent service call link that is currently available and has the minimum load is dynamically planned to achieve multi-active in case of faults.

2. The cloud service chain path planning and fault multi-active method according to claim 1 is characterized in that: The step of performing two-level classification identification on the services and service nodes of the dual-site control cloud to form a service and service node identification table specifically includes: The services and service nodes of the dual sites of the control cloud are classified and identified at two levels; the first level is for services, and the current services are classified and identified according to the service call relationship; the second level is for service nodes, based on the service identification, to identify the nodes that provide the same service; based on the two-level classification identification, a service and service node identification table is formed.

3. The cloud service chain path planning and fault multi-active method according to claim 1 is characterized in that: The step of calculating the service node load index function, the service link load index function, and the service chain load index function in the service call according to the preset load index and the corresponding weight specifically includes: Use services as the classification for load index normalization, and normalize the load indicators of service nodes that provide the same service. Calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight; Service node load indicator function: f(X i )=k1F cpu (X i )+k2F m (X i )+k3F disk (X i ), i∈(1, 2, ...); Service link load indicator function: f(X i-1 , X i )=k4F b (X i-1 , X i ), i∈(1, 2, ...); Service chain load indicator function: f(X i-1 , X i )=f(X i )+f(X i-1 , X i ), i∈(1, 2, ...); Among them, the load indicators include the CPU utilization of the service node F CPU (X i ), memory usage F m (X i ), disk usage F disk (X i ), the propagation delay F caused by the network bandwidth of the service network link and the transmission distance b (X i );k j is the weight of the j-th load index, where 4. The cloud service chain path planning and fault multi-active method according to claim 1 is characterized in that: The service node load sequence table, the service link load sequence table and the upstream and downstream service load sequence table are formed according to the service node load index function, the service link load index function, the service chain load index function and the service and service node identification table; Based on the principle of minimum load, plan the global service call path and form the set of currently available service call links. The steps include: Before starting the service chain call, perform global path planning for the service chain based on the service node load index function, service link load index function, and service chain load index function; According to the nodes providing the same service, the service node load index function results are sorted to form a service node load sequence table; According to the network links between adjacent upstream and downstream nodes, the service link load index function results are sorted to form a service link load sequence table; Based on the network links between adjacent upstream and downstream nodes and the load of the service nodes called by the downstream, the load index function results of all feasible service call paths of the service chain are sorted to form an upstream and downstream service load sequence table; According to the upstream and downstream service load sequence table and the principle of minimum load, the global service call path is planned to form a set of currently available global service call links.

5. The cloud service chain path planning and fault multi-active method according to claim 1 is characterized in that: If a service or a service node is added or deleted, the service node load sequence table, service link load sequence table, and upstream and downstream service load sequence table are dynamically updated, and the global service call link set is dynamically re-planned.

6. The cloud service chain path planning and fault multi-active method according to claim 1 is characterized in that: The newly added service node status table and service link status table are used to record the fault status of service nodes and links; the newly added service node status table and service link status table are updated to the service registration center.

7. The cloud service chain path planning and fault multi-active method according to claim 1 is characterized in that: The steps of regularly detecting and controlling whether there are faults in each service node and link in the dual cloud sites; if a fault or sudden fault is detected, removing the corresponding faulty service node or link data, and replanning the global service call path or dynamically planning the currently available subsequent service call link with the lowest load according to the principle of minimum load, thereby achieving failover, specifically include: Regularly check and control each service node and link in the dual cloud sites: If a node is detected to be faulty, a node fault flag is added to the service node status table. The faulty node does not participate in service calls, and the data of the corresponding faulty node is removed from the service node load sequence table and the upstream and downstream service load sequence table. The global service call path is replanned according to the principle of minimum load to achieve multi-active service node failure. If a node involved in the service chain suddenly fails during the service chain call process, a node failure flag is added to the service node status table, and the failed node does not participate in the service call; the adjacent upstream node of the failed node is found in reverse, and the service chain path is changed starting from the adjacent upstream node; the data of the corresponding failed node is removed from the service node load sequence table and the upstream and downstream service load sequence table, and based on the currently completed partial service call link, the currently available and least loaded subsequent service call link is dynamically planned according to the principle of minimum load, so as to quickly implement the switching of the failed node and achieve multi-active service node failure; If a network link failure is detected, a network link failure flag is added to the service link status table, and the failed network link is excluded from service calls. The data for the corresponding failed network link is removed from the service link load sequence table and the upstream and downstream service load sequence table. The global service call path is replanned based on the principle of minimum load, achieving multi-active service link failure. If a network link involved in the service chain suddenly fails during a service chain call, a link failure flag is added to the service link status table, and the failed network link does not participate in the service call. The adjacent upstream node of the failed network link is found in reverse order, and the service chain path is changed starting from the adjacent upstream node of the failed network link. The data of the corresponding failed network link is removed from the service link load sequence table and the upstream and downstream service load sequence table. Based on the currently completed partial service call links, the currently available subsequent service call links with the lowest load are dynamically planned according to the principle of minimum load, so as to quickly implement the switching of the failed link and achieve multi-active service link failure. Regularly check whether the faulty nodes or links in the dual sites have recovered. If they have recovered to normal operation, dynamically add them to the path planning.

8. Control cloud service chain path planning and fault multi-active device, characterized by: include: A hierarchical identification module is used to classify and identify services and service nodes at two levels of the control cloud dual site, forming a service and service node identification table; The cost calculation module is used to calculate the service node load index function, service link load index function, and service chain load index function in the service call according to the preset load index and corresponding weight; The path planning module is used to form a service node load sequence table, a service link load sequence table, and an upstream and downstream service load sequence table based on the service node load index function, the service link load index function, the service chain load index function, and the service and service node identification table; according to the principle of minimum load, it plans the global service call path to form a set of currently available service call links; The fault active-active module is used to add a service node status table and a service link status table to regularly detect and control whether there are faults in each service node and link in the dual-site cloud. If a fault or sudden fault is detected, the service node or link data of the corresponding fault is eliminated, and according to the principle of minimum load, the global service call path is replanned or the subsequent service call link that is currently available and has the minimum load is dynamically planned to achieve multi-active in case of faults.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, and the processor is used to execute a computer program stored in the memory to implement the cloud service chain path planning and fault multi-active method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, it implements the cloud service chain path planning and fault multi-active method as described in any one of claims 1 to 7.