Resource migration method and device, equipment and medium

Through the method of fuzzy matching rules and load information sorting, the resource migration problem caused by inconsistent network card names in the cluster is solved, the stable migration of network card IP resources is realized, and the continuity of cluster services is ensured.

CN118740923AActive Publication Date: 2024-10-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410865539.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In the cluster, the network card IP resources cannot be migrated due to inconsistent network card names, which affects the stability of the cluster service.

Method used

Use fuzzy matching rules to determine multiple migratable network cards in the cluster, monitor their real-time load information, sort according to the load information, select the node with the smallest load as the destination node, and migrate the configuration resources to this node.

Benefits of technology

It realizes the mutual migration of network card IP resources with inconsistent names between different nodes, ensuring the stability and reliability of cluster services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740923A_ABST
    Figure CN118740923A_ABST
Patent Text Reader

Abstract

The invention discloses a resource migration method and device, equipment and a medium in the technical field of computers. Partial field matching is carried out on the network card names by utilizing the fuzzy matching rule, so that the problem that migration cannot be carried out due to inconsistent network card names is solved, mutual migration of IP resources of network cards with inconsistent names among different nodes in a cluster can be realized, and the stability of cluster service is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource migration method, device, equipment and medium. Background Art

[0002] During cluster operation, node failures, network delays, and other issues may cause system performance degradation or service interruption. The network card names of each node in the current cluster are the same, otherwise the IP resources of the network card cannot be migrated between nodes, which will affect the stability of the cluster service.

[0003] Therefore, how to solve the problem that the network card IP resources cannot be migrated due to inconsistent network card names is a problem that technical personnel in this field need to solve. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a resource migration method, device, equipment and medium to solve the problem that the network card IP resources cannot be migrated due to inconsistent network card names. The specific solution is as follows:

[0005] In a first aspect, the present application provides a resource migration method, comprising:

[0006] Determine multiple migratable network cards in the cluster using fuzzy matching rules; the fuzzy matching rules perform partial field matching on the network card names;

[0007] Monitoring real-time load information of the plurality of migratable network cards;

[0008] If the real-time load information of the target migratable network card meets the migration condition, the multiple migratable network cards are arranged according to the real-time load information of the multiple migratable network cards to obtain a target sequence; the target migratable network card is any one of the multiple migratable network cards;

[0009] A node where the migratable network card with the smallest real-time load information is located is selected in the target sequence as a destination node, and configuration resources of the target migratable network card are migrated to the destination node.

[0010] Optionally, the determining a plurality of migratable network cards in the cluster by using a fuzzy matching rule includes:

[0011] Collecting configuration resources of network cards in various nodes included in the cluster to obtain a resource set;

[0012] Setting the filter items in the fuzzy matching rule; the filter items include: at least one or a combination of a network card name, a gateway address and a subnet mask;

[0013] The plurality of migratable network cards that meet the filter items are selected from the resource set by using the fuzzy matching rule.

[0014] Optionally, it also includes:

[0015] After the cluster is started, obtaining real-time operation information of the multiple migratable network cards;

[0016] According to the real-time operation information of the multiple migratable network cards, the multiple migratable network cards are sequentially recorded as a resource linked list;

[0017] Wherein, each node of the resource linked list is each migratable network card, and the attributes of each node are the network card name, gateway address and subnet mask of each migratable network card.

[0018] Optionally, obtaining real-time operation information of the multiple migratable network cards includes:

[0019] Obtaining the traffic size and bandwidth size of the multiple migratable network cards within a preset time period;

[0020] The real-time operation information of the plurality of migratable network cards is calculated according to the duration of the preset time period, the traffic size, and the bandwidth size.

[0021] Optionally, calculating and obtaining the real-time operation information of the plurality of migratable network cards according to the length of the preset time period, the traffic size, and the bandwidth size includes:

[0022] Calculating and obtaining the real-time operation information of the plurality of migratable network cards according to a target formula;

[0023] Among them, the target formula is: Li=Mi / (Si×T), Li represents the real-time operation information of the migratable network card i, the duration of the preset time period is represented by T, Mi represents the traffic size of the migratable network card i within the duration T, and Si represents the bandwidth size of the migratable network card i within the duration T.

[0024] Optionally, arranging the multiple migratable network cards according to the real-time load information of the multiple migratable network cards to obtain a target sequence includes:

[0025] Arrange the multiple migratable network cards in descending order according to the real-time load information of the multiple migratable network cards to obtain the target sequence;

[0026] Accordingly, selecting the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node includes:

[0027] The node where the migratable network card at the end of the target sequence is located is used as the destination node; or

[0028] Arranging the plurality of migratable network cards according to the real-time load information of the plurality of migratable network cards to obtain a target sequence includes:

[0029] Arrange the multiple migratable network cards in ascending order according to the real-time load information of the multiple migratable network cards to obtain the target sequence;

[0030] Accordingly, selecting the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node includes:

[0031] The node where the migratable network card at the first position in the target sequence is located is used as the destination node.

[0032] Optionally, the real-time load information of the target migratable network card meets the migration condition, including: the real-time load information of the target migratable network card is greater than a preset load threshold; or the real-time load information of the target migratable network card reports an error;

[0033] Accordingly, migrating the configuration resources of the target migratable network card to the destination node includes:

[0034] Selecting an available network card in the destination node;

[0035] Allocate the configuration resources of the target migratable network card to the available network card;

[0036] Enable the available network card to start running;

[0037] Stop the target migratable network card from running.

[0038] In a second aspect, the present application provides a resource migration device, comprising:

[0039] A determination module, used to determine multiple migratable network cards in a cluster using a fuzzy matching rule; the fuzzy matching rule performs partial field matching on the network card name;

[0040] A monitoring module, used for monitoring the real-time load information of the plurality of migratable network cards;

[0041] a sorting module, configured to arrange the plurality of migratable network cards according to the real-time load information of the plurality of migratable network cards to obtain a target sequence if the real-time load information of the target migratable network card meets the migration condition; the target migratable network card is any one of the plurality of migratable network cards;

[0042] The migration module is used to select the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node, and migrate the configuration resources of the target migratable network card to the destination node.

[0043] Optionally, the determination module is specifically used for:

[0044] Collecting configuration resources of network cards in various nodes included in the cluster to obtain a resource set;

[0045] Setting the filter items in the fuzzy matching rule; the filter items include: at least one or a combination of a network card name, a gateway address and a subnet mask;

[0046] The plurality of migratable network cards that meet the filter items are selected from the resource set by using the fuzzy matching rule.

[0047] Optionally, it also includes:

[0048] A storage module is used to obtain the real-time operation information of the multiple migratable network cards after the cluster starts running; according to the real-time operation information of the multiple migratable network cards, the multiple migratable network cards are recorded in sequence as a resource list; wherein each node of the resource list is each migratable network card, and the attributes of each node are the network card name, gateway address and subnet mask of each migratable network card.

[0049] Optionally, the storage module is specifically used for:

[0050] Obtaining the traffic size and bandwidth size of the multiple migratable network cards within a preset time period;

[0051] The real-time operation information of the plurality of migratable network cards is calculated according to the duration of the preset time period, the traffic size, and the bandwidth size.

[0052] Optionally, the storage module is specifically used for:

[0053] Calculating and obtaining the real-time operation information of the plurality of migratable network cards according to a target formula;

[0054] Among them, the target formula is: Li=Mi / (Si×T), Li represents the real-time operation information of the migratable network card i, the duration of the preset time period is represented by T, Mi represents the traffic size of the migratable network card i within the duration T, and Si represents the bandwidth size of the migratable network card i within the duration T.

[0055] Optionally, the sorting module is specifically used to: arrange the multiple migratable network cards in descending order according to real-time load information of the multiple migratable network cards to obtain the target sequence; accordingly, the migration module is specifically used to: take the node where the migratable network card at the end of the target sequence is located as the destination node.

[0056] Optionally, the sorting module is specifically used to: arrange the multiple migratable network cards in ascending order according to real-time load information of the multiple migratable network cards to obtain the target sequence; accordingly, the migration module is specifically used to: take the node where the migratable network card in the first position in the target sequence is located as the destination node.

[0057] Optionally, the real-time load information of the target migratable network card meets the migration condition, including: the real-time load information of the target migratable network card is greater than a preset load threshold; or the real-time load information of the target migratable network card reports an error.

[0058] Optionally, the migration module is specifically used to:

[0059] Selecting an available network card in the destination node;

[0060] Allocate the configuration resources of the target migratable network card to the available network card;

[0061] Enable the available network card to start running;

[0062] Stop the target migratable network card from running.

[0063] In a third aspect, the present application provides an electronic device, including:

[0064] Memory for storing computer programs;

[0065] The processor is used to execute the computer program to implement the resource migration method disclosed above.

[0066] In a fourth aspect, the present application provides a non-volatile storage medium for storing a computer program, wherein the computer program implements the aforementioned disclosed resource migration method when executed by a processor.

[0067] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned disclosed resource migration method when executed by a processor.

[0068] It can be seen from the above scheme that the present application provides a resource migration method, including: using fuzzy matching rules to determine multiple migratable network cards in a cluster; the fuzzy matching rules perform partial field matching on the network card name; monitoring the real-time load information of the multiple migratable network cards; if the real-time load information of the target migratable network card meets the migration conditions, then according to the real-time load information of the multiple migratable network cards, the multiple migratable network cards are arranged to obtain a target sequence; the target migratable network card is any one of the multiple migratable network cards; in the target sequence, the node where the migratable network card with the smallest real-time load information is located is selected as the destination node, and the configuration resources of the target migratable network card are migrated to the destination node.

[0069] It can be seen that the present application uses fuzzy matching rules to screen out multiple migratable network cards in the cluster; monitors the real-time load information of multiple migratable network cards; if the real-time load information of the target migratable network card meets the migration condition, the multiple migratable network cards are arranged according to the real-time load information of the multiple migratable network cards to obtain a target sequence; the target migratable network card is any one of the multiple migratable network cards; in the target sequence, the node where the migratable network card with the smallest real-time load information is located is selected as the destination node, and the configuration resources of the target migratable network card are migrated to the destination node. This solution uses fuzzy matching rules to match some fields of the network card name, which solves the problem of being unable to migrate due to inconsistent network card names, and can realize the mutual migration of IP resources of network cards with inconsistent names between different nodes in the cluster, ensuring the stability of cluster services.

[0070] Correspondingly, a resource migration device, equipment and medium provided by the present application also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0072] Figure 1 A flow chart of a resource migration method disclosed in this application;

[0073] Figure 2 A schematic diagram of a cluster disclosed in this application;

[0074] Figure 3 A flow chart of another resource migration method disclosed in this application;

[0075] Figure 4A flow chart of another resource migration method disclosed in this application;

[0076] Figure 5 A schematic diagram of a resource migration device disclosed in this application;

[0077] Figure 6 A server structure diagram provided for this application;

[0078] Figure 7 A terminal structure diagram provided for this application. DETAILED DESCRIPTION

[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other examples obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0080] At present, during the operation of the cluster, problems such as node failure and network delay may cause system performance degradation or service interruption. The network card names of each node in the current cluster are the same, otherwise the IP resources of the network card cannot be migrated between nodes, which will affect the stability of the cluster service. To this end, this application provides a resource migration solution that can solve the problem of network card IP resources being unable to migrate due to inconsistent network card names.

[0081] See also Figure 1 As shown, the embodiment of the present application discloses a resource migration method, including:

[0082] S101. Determine multiple migratable network cards in a cluster by using fuzzy matching rules.

[0083] In this embodiment, the cluster may be a distributed storage system, which includes multiple nodes, each node includes multiple network cards, some of which are used to provide external access services, some of which are used for communication between nodes, and the migratable network cards are used to provide external access services. Among them, the fuzzy matching rule performs partial field matching on the network card name. For example: if the matching field set for the network card name by the fuzzy matching rule is eth*, then the network card names such as eth0, eth, eth1, and ethx will be matched.

[0084] In one embodiment, multiple migratable network cards are determined in a cluster using fuzzy matching rules, including: collecting configuration resources of network cards in each node included in the cluster to obtain a resource set; setting filter items in the fuzzy matching rules; the filter items include: at least one or a combination of network card name, gateway address and subnet mask; using the fuzzy matching rules to select multiple migratable network cards that meet the filter items in the resource set to filter out network cards for providing access services to the outside. The configuration resources of such network cards can be migrated between different nodes, thereby achieving the effect of one node replacing another node in providing access services to the outside.

[0085] S102: Monitor real-time load information of multiple migratable network cards.

[0086] After the cluster is started, the real-time operation information of multiple migratable network cards is obtained; according to the real-time operation information of multiple migratable network cards, the multiple migratable network cards are sequentially recorded as a resource linked list; wherein each node of the resource linked list is each migratable network card, and the attributes of each node are the network card name, gateway address and subnet mask of each migratable network card. The real-time operation information of the migratable network cards can be stored sequentially by using the resource linked list.

[0087] In one embodiment, obtaining the real-time operation information of multiple migratable network cards includes: obtaining the traffic size and bandwidth size of the multiple migratable network cards within a preset time period; and calculating the real-time operation information of the multiple migratable network cards according to the duration, traffic size, and bandwidth size of the preset time period. The real-time operation information is specifically real-time load information, that is, real-time load size.

[0088] Among them, according to the length of the preset time period, the traffic size and the bandwidth size, the real-time operation information of multiple migratable network cards is calculated, including: the real-time operation information of multiple migratable network cards is calculated according to the target formula; wherein the target formula is: Li=Mi / (Si×T), Li represents the real-time operation information of the migratable network card i, the length of the preset time period is represented by T, Mi represents the traffic size of the migratable network card i within the length T, and Si represents the bandwidth size of the migratable network card i within the length T.

[0089] S103: If the real-time load information of the target migratable network card meets the migration condition, the multiple migratable network cards are arranged according to their real-time load information to obtain a target sequence.

[0090] The target migratable network card is any one of the multiple migratable network cards.

[0091] In one embodiment, according to the real-time load information of the multiple migratable network cards, the multiple migratable network cards are arranged to obtain a target sequence, including: according to the real-time load information of the multiple migratable network cards, the multiple migratable network cards are arranged in descending order to obtain the target sequence; accordingly, in the target sequence, the node where the migratable network card with the smallest real-time load information is located is selected as the destination node, including: the node where the migratable network card at the end position in the target sequence is located is selected as the destination node. Or, according to the real-time load information of the multiple migratable network cards, the multiple migratable network cards are arranged to obtain a target sequence, including: according to the real-time load information of the multiple migratable network cards, the multiple migratable network cards are arranged in ascending order to obtain the target sequence; accordingly, in the target sequence, the node where the migratable network card with the smallest real-time load information is located is selected as the destination node, including: the node where the migratable network card at the first position in the target sequence is located is selected as the destination node.

[0092] S104: Select the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node, and migrate the configuration resources of the target migratable network card to the destination node.

[0093] In one embodiment, the real-time load information of the target migratable network card meets the migration conditions, including: the real-time load information of the target migratable network card is greater than a preset load threshold; or the real-time load information of the target migratable network card is reported as an error; accordingly, the configuration resources of the target migratable network card are migrated to the destination node, including: selecting an available network card in the destination node; configuring the configuration resources of the target migratable network card to the available network card; starting the available network card to run; and stopping the target migratable network card from running.

[0094] It can be seen that this embodiment uses fuzzy matching rules to screen out multiple migratable network cards in the cluster; monitors the real-time load information of multiple migratable network cards; if the real-time load information of the target migratable network card meets the migration condition, the multiple migratable network cards are arranged according to the real-time load information of the multiple migratable network cards to obtain a target sequence; the target migratable network card is any one of the multiple migratable network cards; in the target sequence, the node where the migratable network card with the smallest real-time load information is located is selected as the destination node, and the configuration resources of the target migratable network card are migrated to the destination node. This solution uses fuzzy matching rules to match some fields of the network card name, solves the problem of inability to migrate due to inconsistent network card names, and can realize the mutual migration of IP resources of network cards with inconsistent names between different nodes in the cluster, ensuring the stability of cluster services.

[0095] In one example, cluster deployment generally requires the following configuration operations: The cluster provides a unified management portal for external services, through which cluster services can be accessed. For example, IPaddr services are used for management in Pacemaker. Pacemaker is a cluster resource manager in a high-availability cluster, used to manage and monitor resources in a cluster environment to ensure the maximum availability of cluster services. See Figure 2 ,The cluster includes two servers, each of which has cluster services deployed on ,each server. The client accesses the cluster and its security ,configuration, storage, etc. through the daemon process.

[0096] In Pacemaker, IP resources are mainly managed through the IPaddr service, including the allocation, monitoring, and fault recovery of IP addresses of nodes in the cluster. Since cluster services usually need to be accessed through the network, the availability and stability of IP addresses are crucial to the normal operation of cluster services.

[0097] See also Figure 3 , the management of IPaddr services includes:

[0098] Define IP resource services: In the Pacemaker configuration file or through command line configuration, the administrator needs to define IP resource information, including IP address, subnet mask, network interface, gateway address and other information. This configuration information tells Pacemaker how to allocate and manage IP addresses.

[0099] Resource allocation service: When the cluster service is started, Pacemaker will allocate IP resources to one or more nodes according to the configuration information. This usually involves executing network configuration commands on the nodes to bind the IP addresses to the corresponding network interfaces.

[0100] Monitoring and fault recovery services: Pacemaker constantly monitors the status of nodes and resource usage in the cluster. If a node or IP resource fails, Pacemaker detects this change and triggers appropriate recovery actions. This may include transferring IP resources from the failed node to other healthy nodes to ensure service continuity.

[0101] Resource management service: receives signals from the pacemaker daemon and performs different operations based on the signals; resource operation methods include resource start, resource stop, and resource status acquisition.

[0102] The cluster storage system stores service data and user data, and can adopt a network storage model, such as SAN (Storage Area Network). SAN is a high-speed dedicated network, mainly used to connect computer systems and independent storage subsystems. In SAN, storage devices (such as hard disks, etc.) are not directly connected to any single server, but form a separate network, so that these storage devices can communicate with multiple servers at high speed and reliably.

[0103] The cluster can provide MySQL and Apache services. The cluster's security configuration can ensure data security and the stability of the cluster system. Corosync, arbitration, and isolation can be used to ensure the stability of the cluster. When a network failure occurs in the cluster, the Pacemaker daemon will detect the network problem and call the resource management module to migrate IP resources. During the migration process, Pacemaker will select other normal nodes in the cluster to set IPs to restore normal communication in the cluster.

[0104] The IP resource migration solution provided in this embodiment includes a resource definition module, a resource management module and a resource monitoring module. These management modules can achieve: the migration process does not require manual intervention and configuration of redundant network cards, active migration when the network card load is too large, and the migration of IP resources no longer depends on the Pacemaker daemon process, making resource migration more flexible and controllable, and can effectively reduce the instability of cluster services caused by inability to access the cluster due to cluster network failures, thereby ensuring the normal operation of the entire cluster and the normal use of services.

[0105] See also Figure 4 ,The resource definition module in the IP resource migration solution: supports flexible and dynamic configuration by managers, and supports full matching and fuzzy matching rules, so that IP resources can be migrated among nodes with different operating systems or different network card types.

[0106] Resource management module: This module is used to receive signals from cluster management software daemons, such as the pacemaker daemon, and perform different operations based on the signal type; resource operation methods include resource start, resource stop, and resource status acquisition; resource status includes online and offline resources.

[0107] Resource monitoring module: This module is used to monitor the status of cluster IP resources, maintain cluster resource information according to the resource configuration rules given by the resource definition module, and send signals to the pacemaker daemon process based on resource status information to perform resource operations.

[0108] In the resource definition module, the IP resource information that needs to be configured includes: network card name (such as eth0), IP address (such as 192.168.122.111), gateway address (such as 192.168.122.1), subnet mask (such as 255.255.0.0), etc. Among them, the network card name supports full match rules and fuzzy match rules. When matching with the full match rule, the network card name must be exactly the same as the name of the network card to be set; when matching with the fuzzy match rule, regular matching is used. For example, if the network card name is set to eth and fuzzy matching is used, then eth0, eth, eth1, ethx and other network cards can be matched.

[0109] The next step is to use fuzzy matching rules to filter all qualified network card information in the cluster, and store the filtered information in a preset data structure; the filtering conditions are: the network card name, gateway address, and subnet mask must all be matched successfully. The purpose of filtering: no need to check in the cluster during migration. After the cluster is started, the qualified network cards are sorted by load, and the information is saved in a linked list to obtain an IP resource linked list; the saved information mainly includes the network card name, IP address, gateway address, and subnet mask.

[0110] The resource monitoring module monitors the information of all qualified network cards in the cluster in real time and updates it to the IP resource list in the resource definition module; it monitors the cluster network information in real time. If the network card fails or the load is too large (for example, the load reaches 90%, and network jams may occur at this time), the order in the list is adjusted, and a signal (including migration source node and destination node) is actively sent to the daemon process, so that the daemon process can perform IP resource migration.

[0111] Among them, when sorting the resources in the IP resource list, the sorting rule is sorted according to the network card load size, and the smaller load is prioritized in the front, indicating that it is preferentially selected as the destination node when the IP resource is migrated. The load size can be obtained through system commands, and the load size is not limited to the following calculation steps: by regularly executing the system command ifconfig to obtain the network card traffic size, the traffic size is represented by M, and the time is represented by T; by the ethtool command to obtain the network card bandwidth, the bandwidth is represented by S; the load is represented by L, then L = M / (S×T), the larger L is, the greater the load is, and vice versa.

[0112] The resource management module operates on resources, including stopping resources, starting resources, and obtaining resource status. It also receives signals from the cluster management software daemon and performs different operations according to the signal type, mainly including the following three types: Resource startup: mainly receiving cluster management software daemon signals and setting IP addresses according to the IP resource list in the resource definition module. This process can be performed through operating system commands (ifconfig or ip) to perform IP configuration operations, such as: ifconfig eth0 192.168.1.10netmask 255.255.255.0up. Resource stop: mainly refers to the stop of IP resources. This process can be performed through basic operating system commands to delete IP operations, such as: ip addr del192.168.1.100 / 24dev eth0. Resource status acquisition: This module mainly obtains the current running status of resources, which includes online and offline. In one example, after selecting an available network card in the destination node, the configuration resources of the target migratable network card are configured to the available network card through the ifconfig command or the ip configuration command, so that the available network card is started and operated; the configuration resources of the target migratable network card are deleted through the operating system command, so that the target migratable network card is stopped.

[0113] In this embodiment, the daemon process receives the migration signal from the resource monitoring module, making the resource regulation more flexible, that is, by judging the system load size, timely regulating the resources, making the system resource utilization more reasonable, the resource allocation more reasonable, and giving full play to the performance of the cluster. It can also migrate resources in different operating systems or when the network card names are not unified. The migration is more flexible and the stability of the cluster is guaranteed.

[0114] A resource migration device provided in an embodiment of the present application is introduced below. The resource migration device described below can be referenced to other embodiments described in this document.

[0115] See also Figure 5 As shown, the embodiment of the present application discloses a resource migration device, including:

[0116] Determination module 501, used to determine multiple migratable network cards in the cluster by using fuzzy matching rules; the fuzzy matching rules perform partial field matching on the network card names;

[0117] A monitoring module 502, used to monitor real-time load information of multiple migratable network cards;

[0118] The sorting module 503 is used to arrange the multiple migratable network cards according to the real-time load information of the multiple migratable network cards to obtain a target sequence if the real-time load information of the target migratable network card meets the migration condition; the target migratable network card is any one of the multiple migratable network cards;

[0119] The migration module 504 is used to select the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node, and migrate the configuration resources of the target migratable network card to the destination node.

[0120] In one implementation, the determination module is specifically configured to:

[0121] Collect the configuration resources of the network cards in each node included in the cluster to obtain a resource set;

[0122] Set the filter items in the fuzzy matching rule; the filter items include: at least one or a combination of the network card name, gateway address and subnet mask;

[0123] A fuzzy matching rule is used to select multiple migratable network cards that meet the filter items in the resource collection.

[0124] In one embodiment, it further includes:

[0125] The storage module is used to obtain the real-time operation information of multiple migratable network cards after the cluster is started and run; according to the real-time operation information of the multiple migratable network cards, the multiple migratable network cards are recorded in sequence as a resource list; wherein each node of the resource list is each migratable network card, and the attributes of each node are the network card name, gateway address and subnet mask of each migratable network card.

[0126] In one embodiment, the storage module is specifically used for:

[0127] Obtain the traffic size and bandwidth size of multiple migratable network cards within a preset time period;

[0128] According to the duration of the preset time period, the flow volume and the bandwidth volume, the real-time operation information of the multiple migratable network cards is calculated.

[0129] In one embodiment, the storage module is specifically used for:

[0130] The real-time operation information of multiple migratable network cards is obtained by calculation according to the target formula;

[0131] Among them, the target formula is: Li=Mi / (Si×T), Li represents the real-time operation information of the migratable network card i, the length of the preset time period is represented by T, Mi represents the traffic size of the migratable network card i within the length T, and Si represents the bandwidth size of the migratable network card i within the length T.

[0132] In one embodiment, the sorting module is specifically used to: arrange multiple migratable network cards in descending order according to their real-time load information to obtain a target sequence; accordingly, the migration module is specifically used to: take the node where the migratable network card at the end of the target sequence is located as the destination node.

[0133] In one embodiment, the sorting module is specifically used to: arrange multiple migratable network cards in ascending order according to their real-time load information to obtain a target sequence; accordingly, the migration module is specifically used to: take the node where the migratable network card at the first position in the target sequence is located as the destination node.

[0134] In one implementation, the real-time load information of the target migratable network card meets the migration condition, including: the real-time load information of the target migratable network card is greater than a preset load threshold; or the real-time load information of the target migratable network card reports an error.

[0135] In one embodiment, the migration module is specifically used to:

[0136] Select an available network card in the destination node;

[0137] Allocate the configuration resources of the target migratable network card to the available network card;

[0138] Enable the available network cards to start running;

[0139] Stop the target migratable NIC from running.

[0140] Among them, for more specific working processes of each module and unit in this embodiment, reference can be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0141] It can be seen that this embodiment provides a resource migration device that can use fuzzy matching rules to perform partial field matching on the network card name, thereby solving the problem of inability to migrate due to inconsistent network card names, and can realize mutual migration of IP resources of network cards with inconsistent names between different nodes in the cluster, thereby ensuring the stability of cluster services.

[0142] An electronic device provided in an embodiment of the present application is introduced below. The electronic device described below can be referenced to other embodiments described in this document.

[0143] The present application discloses an electronic device, including:

[0144] Memory, used to store computer programs;

[0145] A processor is used to execute the computer program to implement the method disclosed in any of the above embodiments.

[0146] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: using fuzzy matching rules to determine multiple migratable network cards in the cluster; performing partial field matching on the network card name according to the fuzzy matching rules; monitoring the real-time load information of multiple migratable network cards; if the real-time load information of the target migratable network card meets the migration condition, arranging the multiple migratable network cards according to the real-time load information of the multiple migratable network cards to obtain a target sequence; the target migratable network card is any one of the multiple migratable network cards; selecting the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node, and migrating the configuration resources of the target migratable network card to the destination node.

[0147] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: collect the configuration resources of the network cards in each node included in the cluster to obtain a resource set; set the filter items in the fuzzy matching rules; the filter items include: at least one or a combination of the network card name, gateway address and subnet mask; use the fuzzy matching rules to select multiple migratable network cards that meet the filter items in the resource set.

[0148] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: after the cluster starts running, real-time operation information of multiple migratable network cards is obtained; according to the real-time operation information of the multiple migratable network cards, the multiple migratable network cards are recorded in sequence as a resource list; wherein each node of the resource list is each migratable network card, and the attributes of each node are the network card name, gateway address and subnet mask of each migratable network card.

[0149] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: obtaining the traffic size and bandwidth size of multiple migratable network cards within a preset time period; and calculating the real-time operation information of multiple migratable network cards based on the length of the preset time period, the traffic size and the bandwidth size.

[0150] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: real-time operation information of multiple migratable network cards is calculated according to the target formula; wherein the target formula is: Li=Mi / (Si×T), Li represents the real-time operation information of the migratable network card i, the duration of the preset time period is represented by T, Mi represents the traffic size of the migratable network card i within the duration T, and Si represents the bandwidth size of the migratable network card i within the duration T.

[0151] In this embodiment, when the processor executes the computer program stored in the memory, the following steps can be specifically implemented: selecting an available network card in the destination node; configuring the configuration resources of the target migratable network card to the available network card; starting the available network card; and stopping the target migratable network card.

[0152] Furthermore, the present application also provides an electronic device. The electronic device can be Figure 6 The server shown can also be Figure 7 Terminal shown. Figure 6 and Figure 7 All of them are structural diagrams of electronic devices according to an exemplary embodiment, and the contents in the diagrams cannot be regarded as any limitation on the scope of use of the present application.

[0153] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present application. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input / output interface, and a communication bus. The memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the relevant steps in the resource migration disclosed in any of the aforementioned embodiments.

[0154] In this embodiment, the power supply is used to provide working voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external devices, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0155] In addition, the memory as a carrier for resource storage can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include operating system, computer programs and data, etc. The storage method can be temporary storage or permanent storage.

[0156] The operating system is used to manage and control the hardware devices and computer programs on the server to realize the operation and processing of the data in the memory by the processor, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the resource migration method disclosed in any of the aforementioned embodiments, the computer program can further include computer programs that can be used to complete other specific tasks. In addition to data such as application update information, the data can also include data such as application developer information.

[0157] Figure 7A schematic diagram of the structure of a terminal provided in an embodiment of the present application, the terminal may specifically include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer, etc.

[0158] Generally, the terminal in this embodiment includes: a processor and a memory.

[0159] Among them, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0160] The memory may include one or more computer non-volatile storage media, which may be non-transitory. The memory may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor, it can implement the relevant steps in the resource migration method performed by the terminal side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, update information of the application.

[0161] In some embodiments, the terminal may also include a display screen, an input and output interface, a communication interface, a sensor, a power supply, and a communication bus.

[0162] Those skilled in the art will understand that Figure 7The structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than those shown in the figure.

[0163] A non-volatile storage medium provided in an embodiment of the present application is introduced below. The non-volatile storage medium described below can be cross-referenced with other embodiments described herein.

[0164] A non-volatile storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the resource migration method disclosed in the above-mentioned embodiment. The non-volatile storage medium is a computer-readable non-volatile storage medium, which, as a carrier for resource storage, may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system, a computer program and data, etc., and the storage method may be temporary storage or permanent storage.

[0165] A computer program product provided in an embodiment of the present application is introduced below. The computer program product described below can be referenced to other embodiments described in this document.

[0166] A computer program product includes a computer program / instruction, which implements the steps of the resource migration method disclosed above when executed by a processor.

[0167] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0168] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of non-volatile storage medium known in the art.

[0169] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A resource migration method, characterized in that: include: Use fuzzy matching rules to determine multiple migratable network cards in the cluster; The fuzzy matching rule performs partial field matching on the network card name; Monitoring real-time load information of the plurality of migratable network cards; If the real-time load information of the target migratable network card meets the migration condition, the multiple migratable network cards are arranged according to the real-time load information of the multiple migratable network cards to obtain a target sequence; The target migratable network card is any one of the multiple migratable network cards; A node where the migratable network card with the smallest real-time load information is located is selected in the target sequence as a destination node, and configuration resources of the target migratable network card are migrated to the destination node.

2. The method according to claim 1, characterized in that The method of determining a plurality of migratable network cards in a cluster by using a fuzzy matching rule includes: Collecting configuration resources of network cards in various nodes included in the cluster to obtain a resource set; Setting the filter items in the fuzzy matching rule; the filter items include: at least one or a combination of a network card name, a gateway address and a subnet mask; The plurality of migratable network cards that meet the filter items are selected from the resource set by using the fuzzy matching rule.

3. The method according to claim 1, characterized in that Also includes: After the cluster is started, obtaining real-time operation information of the multiple migratable network cards; According to the real-time operation information of the multiple migratable network cards, the multiple migratable network cards are sequentially recorded as a resource linked list; Wherein, each node of the resource linked list is each migratable network card, and the attributes of each node are the network card name, gateway address and subnet mask of each migratable network card.

4. The method according to claim 3, characterized in that Acquiring real-time operation information of the multiple migratable network cards, including: Obtaining the traffic size and bandwidth size of the multiple migratable network cards within a preset time period; The real-time operation information of the plurality of migratable network cards is calculated according to the duration of the preset time period, the traffic size, and the bandwidth size.

5. The method according to claim 4, characterized in that According to the duration of the preset time period, the traffic size, and the bandwidth size, the real-time operation information of the plurality of migratable network cards is calculated, including: Calculating and obtaining the real-time operation information of the plurality of migratable network cards according to a target formula; Among them, the target formula is: Li=Mi / (Si×T), Li represents the real-time operation information of the migratable network card i, the duration of the preset time period is represented by T, Mi represents the traffic size of the migratable network card i within the duration T, and Si represents the bandwidth size of the migratable network card i within the duration T.

6. The method according to any one of claims 1 to 5, characterized in that: Arranging the plurality of migratable network cards according to the real-time load information of the plurality of migratable network cards to obtain a target sequence includes: Arrange the multiple migratable network cards in descending order according to the real-time load information of the multiple migratable network cards to obtain the target sequence; Accordingly, selecting the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node includes: The node where the migratable network card at the end of the target sequence is located is used as the destination node; or Arranging the plurality of migratable network cards according to the real-time load information of the plurality of migratable network cards to obtain a target sequence includes: Arrange the multiple migratable network cards in ascending order according to the real-time load information of the multiple migratable network cards to obtain the target sequence; Accordingly, selecting the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node includes: The node where the migratable network card at the first position in the target sequence is located is used as the destination node.

7. The method according to any one of claims 1 to 5, characterized in that: The real-time load information of the target migratable network card meets the migration condition, including: the real-time load information of the target migratable network card is greater than a preset load threshold; or the real-time load information of the target migratable network card is reported as an error; Accordingly, migrating the configuration resources of the target migratable network card to the destination node includes: Selecting an available network card in the destination node; Allocate the configuration resources of the target migratable network card to the available network card; Enable the available network card to start running; Stop the target migratable network card from running.

8. A resource migration device, characterized in that: include: A determination module, used for determining multiple migratable network cards in a cluster by using fuzzy matching rules; The fuzzy matching rule performs partial field matching on the network card name; A monitoring module, used for monitoring the real-time load information of the plurality of migratable network cards; A sorting module, configured to arrange the plurality of migratable network cards according to the real-time load information of the plurality of migratable network cards to obtain a target sequence if the real-time load information of the target migratable network card meets the migration condition; The target migratable network card is any one of the multiple migratable network cards; The migration module is used to select the node where the migratable network card with the smallest real-time load information is located in the target sequence as the destination node, and migrate the configuration resources of the target migratable network card to the destination node.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 7.

10. A non-volatile storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Virtual service migration method based on fuzzy logic

    CN105743985A

  • ISCSI access load balancing method

    CN108055338A

  • Method and device for making network card equipment names in storage cluster consistent

    CN109347677A

  • Virtual machine automatic migration decision-making method based on user experience in multi-cloud environment

    CN114296868A

  • Data migration method and device, electronic equipment and computer readable medium

    CN115543967A