Self-adaptive load balancing method and device, electronic equipment and storage medium

By constructing a global semantic computing power model and performing fuzzy evaluation methods, the problem of lack of dynamic perception and multi-strategy adaptation of load balancing scheduling algorithms in the existing technology is solved, and efficient and accurate adaptive load balancing is achieved.

CN119718572APending Publication Date: 2025-03-28E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411783458.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing load balancing scheduling algorithm lacks the ability to perceive dynamic load states, cannot achieve refined load balancing, and only considers a single scheduling strategy, and cannot adapt to complex and changeable application load scenarios.

Method used

An adaptive load balancing method is proposed. By constructing a global semantic computing power model, defining basic semantics and key indicators, combining and describing target computing power requirements, correlating service semantics, using the primitive computing power model to obtain semantic vector representations of resource nodes, calculating similarity, filtering target resources, performing fuzzy evaluation, and determining scheduling priorities.

Benefits of technology

It realizes efficient and accurate adaptive load balancing, and can more accurately evaluate the degree of matching computing power requirements of heterogeneous resources, improve scheduling flexibility and targetedness, and achieve efficient utilization of computing power resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718572A_ABST
    Figure CN119718572A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive load balancing method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out the hierarchical modeling based on different semantic granularities in response to a preset heterogeneous resource and service calculation demand, and constructing a global semantic computing power model; obtaining a first semantic vector representation of a resource node in the target heterogeneous resource cluster; performing similarity calculation according to the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; target resources in the target heterogeneous resource cluster are obtained through screening based on the similarity list; obtaining a comprehensive evaluation score corresponding to each resource node through fuzzy evaluation; and determining the scheduling priority of each resource node based on the comprehensive evaluation score so as to perform load balancing scheduling. The self-adaptive load balancing method can efficiently and accurately realize self-adaptive load balancing and can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an adaptive load balancing method, device, electronic equipment and storage medium. Background Art

[0002] In the current cloud computing environment, heterogeneous computing resources are increasing day by day, with significant differences in structure, performance, power consumption, etc. At the same time, different types of application loads have different requirements for computing resources. How to accurately schedule the application load to the best matching heterogeneous computing resources according to its actual needs is the key to improving resource utilization and application execution efficiency. Most of the existing load balancing scheduling algorithms make scheduling decisions based on static resource attributes, lack the ability to perceive dynamic load states, and cannot achieve refined load balancing. In addition, these algorithms often only consider a single scheduling strategy, such as based on minimum response time, minimum load, etc., which cannot fully adapt to complex and changing application load scenarios. Summary of the invention

[0003] The present invention proposes an adaptive load balancing method, device, electronic device and storage medium, aiming to solve one of the technical problems in the related art at least to a certain extent. The embodiments of the present invention can efficiently and accurately realize adaptive load balancing.

[0004] On the one hand, an embodiment of the present invention provides an adaptive load balancing method, including:

[0005] In response to the preset heterogeneous resources and service computing requirements, hierarchical modeling is performed based on different semantic granularities to construct a global semantic computing power model;

[0006] Among them, building a global semantic computing power model includes defining basic semantics and key indicators to build a primitive computing power model of the primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model associated with service semantics; the service computing power model includes the service computing power semantic vector of the service to be scheduled;

[0007] Using the primitive computing model, obtaining the first semantic vector representation of the resource nodes in the target heterogeneous resource cluster;

[0008] Calculate the similarity between the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; filter and obtain the target resource in the target heterogeneous resource cluster based on the similarity list; the similarity list includes the similarity score between the service computing power semantic vector and each first semantic vector;

[0009] Perform fuzzy evaluation on the resource usage status and similarity score corresponding to each resource node to obtain the comprehensive evaluation score corresponding to each resource node;

[0010] The scheduling priority of each resource node is determined based on the comprehensive evaluation score, so that the target heterogeneous resource cluster can balance the load of each resource node according to the scheduling priority.

[0011] Optionally, in response to preset heterogeneous resources and service computing requirements, hierarchical modeling is performed based on different semantic granularities to construct a global semantic computing power model, and constructing a primitive computing power model includes the following steps:

[0012] Obtain the preset primitive computing power indicators of each underlying heterogeneous computing power resource, and then integrate them to obtain multiple sets of training data sets; the primitive computing power indicators include computing power, bandwidth and energy consumption; the semantic similarity scores between the primitive computing power indicators of different underlying heterogeneous computing power resources annotated in the training data set;

[0013] Perform unique-hot encoding on each primitive computing power indicator in each set of training data sets to obtain the encoding indicator corresponding to each primitive computing power indicator; concatenate all encoding indicators to obtain the input vector;

[0014] The input vector is used as the input of the converter model, so that the converter model can learn the correlation between the primitive computing power indicators based on the multi-head self-attention mechanism;

[0015] Based on the association degree and semantic similarity score, the converter model is trained using the contrast loss function to construct the primitive computing model.

[0016] Among them, the primitive computing power model is used to use the trained converter model to process and obtain the second semantic vector representation of any set of primitive computing power indicators, so as to construct a primitive computing power semantic library.

[0017] Optionally, the primitive computing power semantic library includes semantic vectors and corresponding computing operations corresponding to primitive computing power combinations of different underlying heterogeneous computing power resources in the target heterogeneous resource cluster; in response to preset heterogeneous resources and service computing requirements, hierarchical modeling is performed based on different semantic granularities to construct a global semantic computing power model, and constructing a composite computing power model includes the following steps:

[0018] The semantic vectors and computing operations in the primitive computing power semantic library are represented as semantic vectors, which are then used as inputs of leaf nodes in the tree structure.

[0019] According to the input of each leaf node, a hierarchical structure is built based on the tree-structured LSTM model to capture the computing power semantics and construct a composite computing power model.

[0020] Optionally, in response to preset heterogeneous resources and service computing requirements, hierarchical modeling is performed based on different semantic granularities to construct a global semantic computing power model, and constructing a service computing power model includes the following steps:

[0021] In response to the preset main demand dimensions of service computing power, different types of service computing demand samples are collected; the main demand dimensions include application algorithm type, computing intensity, memory demand, storage demand, bandwidth demand and delay requirement;

[0022] The service computing demand samples are described in text form to construct a service computing power corpus; the service computing power corpus includes service sentences corresponding to each service computing demand sample after the textual description;

[0023] The semantic encoder obtained based on transfer learning is applied to the service computing power corpus for transfer training to obtain the service computing power semantic vector corresponding to each service computing demand sample;

[0024] Among them, transfer training is carried out using the similarity between each service sentence as a supervisory signal.

[0025] Optionally, obtaining a first semantic vector representation of a resource node in a target heterogeneous resource cluster by using a primitive computing power model includes the following steps:

[0026] Obtain monitoring indicators of resource nodes in the target heterogeneous resource cluster through real-time monitoring; monitoring indicators include computing power, bandwidth and energy consumption;

[0027] Perform one-hot encoding on the monitoring indicators to obtain the encoded indicators corresponding to each monitoring indicator;

[0028] All encoded indicators are concatenated and input into the primitive computing power model to obtain the first semantic vector representation corresponding to the resource node.

[0029] Optionally, similarity calculation is performed based on the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; and the target resource in the target heterogeneous resource cluster is screened based on the similarity list, including the following steps:

[0030] Obtain the service computing power semantic vector of the service to be scheduled from the service computing power model;

[0031] The cosine similarity measurement method is used to sequentially process the similarity scores between the service computing power semantic vector and the first semantic vector of each resource node, and a similarity list is obtained;

[0032] The resource node corresponding to the highest similarity score in the similarity list is taken as the target resource.

[0033] Optionally, performing fuzzy evaluation on the resource usage status and similarity score corresponding to each resource node to obtain a comprehensive evaluation score corresponding to each resource node includes the following steps:

[0034] Based on the preset value range, the resource usage status corresponding to each resource node and the membership of the similarity score corresponding to each value range are obtained by using the membership function;

[0035] According to the membership degree, the resource usage status and similarity score corresponding to each resource node are divided into fuzzy sets corresponding to the corresponding fuzzy levels;

[0036] According to the fuzzy levels corresponding to the fuzzy sets of resource usage status and similarity scores, a comprehensive evaluation score is obtained based on the preset fuzzy mapping rules;

[0037] Among them, the fuzzy level corresponding to the resource usage status is inversely proportional to the comprehensive evaluation score; the fuzzy level corresponding to the similarity score is directly proportional to the comprehensive evaluation score.

[0038] On the other hand, an embodiment of the present invention provides an adaptive load balancing device, including:

[0039] The first module is used to respond to preset heterogeneous resources and service computing requirements, perform hierarchical modeling based on different semantic granularities, and construct a global semantic computing model;

[0040] Among them, building a global semantic computing power model includes defining basic semantics and key indicators to build a primitive computing power model of the primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model associated with service semantics; the service computing power model includes the service computing power semantic vector of the service to be scheduled;

[0041] The second module uses the primitive computing model to obtain the first semantic vector representation of the resource nodes in the target heterogeneous resource cluster;

[0042] The third module calculates the similarity between the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; based on the similarity list, the target resource in the target heterogeneous resource cluster is screened; the similarity list includes the similarity score between the service computing power semantic vector and each first semantic vector;

[0043] The fourth module performs fuzzy evaluation on the resource usage status and similarity score corresponding to each resource node to obtain the comprehensive evaluation score corresponding to each resource node;

[0044] The fifth module determines the scheduling priority of each resource node based on the comprehensive evaluation score, so that the target heterogeneous resource cluster performs load balancing on each resource node according to the scheduling priority.

[0045] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned adaptive load balancing method.

[0046] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned adaptive load balancing method.

[0047] The embodiment of the present invention constructs a global semantic computing power model by performing hierarchical modeling based on different semantic granularities in response to preset heterogeneous resources and service computing requirements; wherein, constructing the global semantic computing power model includes defining basic semantics and key indicators to construct a primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model with associated service semantics; the service computing power model includes a service computing power semantic vector of the service to be scheduled; the first semantic vector representation of the resource node in the target heterogeneous resource cluster is obtained by using the primitive computing power model; the similarity is calculated based on the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; the target resource in the target heterogeneous resource cluster is obtained based on the similarity list; the similarity list includes the similarity score between the service computing power semantic vector and each first semantic vector; the resource usage status and the similarity score corresponding to each resource node are fuzzily evaluated to obtain a comprehensive evaluation score corresponding to each resource node; the scheduling priority of each resource node is determined based on the comprehensive evaluation score, so that the target heterogeneous resource cluster performs load balancing on each resource node according to the scheduling priority. The present invention constructs a global semantic computing model for different semantic granularities to achieve unified cloud-edge resource modeling and computing power requirements; at the same time, in order to quantify the availability of resources and the degree of adaptation of services, a unified measurement of heterogeneous computing resources is achieved based on the global semantic model, and the matching degree of heterogeneous resources to computing power requirements is more accurately evaluated, thereby improving the flexibility and pertinence of scheduling and achieving efficient utilization of computing power resources. The present invention can achieve adaptive load balancing efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0049] Figure 1 A schematic diagram of an implementation environment for adaptive load balancing provided by an embodiment of the present invention;

[0050] Figure 2 A schematic diagram of a flow chart of an adaptive load balancing method provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the expansion process of building a primitive computing power model provided by an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of the development process of building a composite computing power model provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of the expansion process of the service computing power model provided in an embodiment of the present invention;

[0054] Figure 6 A schematic diagram of the overall architecture flow of the adaptive load balancing method provided by an embodiment of the present invention;

[0055] Figure 7 A schematic diagram of the primitive computing power model construction process provided by an embodiment of the present invention;

[0056] Figure 8 A schematic diagram of a unified measurement process for heterogeneous resources provided by an embodiment of the present invention;

[0057] Fig. 9 A schematic diagram of the structure of an adaptive load balancing device provided by an embodiment of the present invention;

[0058] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0060] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0061] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments.

[0062] To facilitate the understanding of the technical solution of the present invention, the following is an explanation of the specific names of the technical features that may appear in the technical solution of the present invention:

[0063] Heterogeneous computing power: refers to a processing system that coordinates multiple computing powers such as CPU, GPU, FPGA, ASIC, etc., which can meet application requirements in different scenarios and maximize computing efficiency. It can solve the challenges brought by diversified scenarios, massive data, and large-scale deployment, meet the needs of rapid growth of real-time data and accelerated formation of unstructured data, and provide high-concurrency and high-efficiency computing capabilities.

[0064] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.

[0065] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0066] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0067] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.

[0068] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides an adaptive load balancing method. The following is an example of applying the adaptive load balancing method in the terminal 102. It can be understood that the adaptive load balancing method can also be applied to the server 101.

[0069] Reference Figure 2 , Figure 2 The flowchart of the adaptive load balancing method applied to the terminal provided by the embodiment of the present invention, the execution subject of the adaptive load balancing method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:

[0070] S100, in response to preset heterogeneous resources and service computing requirements, hierarchical modeling is performed based on different semantic granularities to construct a global semantic computing power model;

[0071] Among them, building a global semantic computing power model includes defining basic semantics and key indicators to build a primitive computing power model of the primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model associated with service semantics; the service computing power model includes the service computing power semantic vector of the service to be scheduled;

[0072] Exemplarily, in some specific implementations, in order to achieve efficient utilization of resources and provide more accurate resource descriptions, the present invention unifies the modeling of heterogeneous computing power semantics and designs a global semantic computing power model. Different modeling methods are used for different semantic granularities (primitives / compounds / services), and the underlying computing power primitives are gradually abstracted and compounded into service-level computing power demand models to describe the computing power requirements of various end-to-cloud services, ensuring the expressiveness and scalability of the model, so that the model itself has sufficient semantics and standardization. For the global semantic computing power model, the present invention adopts a hierarchical structure designed into three levels, namely, a primitive computing power model for defining the most basic semantics and key indicators, a composite computing power model for combining and describing more complex computing power requirements, and a service computing power model that associates the composite computing power model with service semantics.

[0073] It should be noted that in some embodiments, Figure 3 As shown, in step S100, constructing the primitive computing power model includes the following steps: S111, obtaining the preset primitive computing power indicators of each underlying heterogeneous computing power resource, and then integrating them to obtain multiple sets of training data sets; the primitive computing power indicators include computing power, bandwidth and energy consumption; the semantic similarity scores between the primitive computing power indicators marked with different underlying heterogeneous computing power resources in the training data set; S112, performing unique hot encoding on each primitive computing power indicator in each set of training data sets to obtain the encoding indicator corresponding to each primitive computing power indicator; splicing all the encoding indicators to obtain the input vector; S113, using the input vector as the input of the converter model, so that the converter model learns the correlation degree between each primitive computing power indicator based on the multi-head self-attention mechanism; S114, based on the correlation degree and the semantic similarity score, the converter model is trained using the contrast loss function to construct the primitive computing power model; wherein, the primitive computing power model is used to use the trained converter model to process and obtain the second semantic vector representation of any set of primitive computing power indicators, so as to construct the primitive computing power semantic library.

[0074] For example, in some specific implementations, as a primitive computing power model that defines basic semantics and key indicators, this solution uses a self-attention mechanism to uniformly model and describe the primitive computing power indicators (computing power, bandwidth, energy consumption, etc.) of the underlying heterogeneous computing power resources (CPU / GPU / FPGA / TPU, etc.), and can obtain a vector identifier that can well express the semantics of the primitive computing power. At the same time, it can automatically discover the inherent correlation between indicators, avoid artificial design features, and have strong expressiveness and generalization. The process is as follows:

[0075] (1) Construct a training data set. Collect primitive computing power indicators of each underlying heterogeneous computing resource (such as CPU computing power, GPU matrix multiplication power, FPGA bit computing power, bandwidth, energy consumption, etc.), score the samples based on these indicators, and annotate semantically similar sample pairs to obtain a supervised training data set. The following annotations indicate that sample 1 and sample 2 are semantically similar (5 points), and sample 1 and sample 3 are not similar (2 points):

[0076] Sample 1: computing power = 10TFlops, bandwidth = 100GB / s, power consumption = 200W;

[0077] Sample 2: computing power = 9TFlops, bandwidth = 90GB / s, power consumption = 180W;

[0078] Sample 3: Computing power = 20TFlops, bandwidth = 120GB / s, power consumption = 300W;

[0079] (2) Perform a one-hot encoding on each core primitive computing power indicator, concatenate all the encoded indicators into a vector, and use it as the input of the Transformer (i.e., transformer model) encoder; use the Transformer's multi-head self-attention mechanism, where each attention head corresponds to a potential dependency relationship between indicators. The attention head automatically learns the importance and correlation between primitive computing power indicators;

[0080] (3) Use the contrastive loss function to train the Transformer. That is, the distance between the semantic vectors of similar sample pairs is small enough, and the distance between the semantic vectors of dissimilar sample pairs is large enough. For example, the model will learn that the semantic vectors of samples 1 and 2 are very close.

[0081] (4) Finally, the last layer output of the Transformer encoder is taken as the semantic vector representation of the primitive computing power. For any set of primitive indicators, semantic vectors are generated through the above steps, and finally a complete primitive computing power semantic library is obtained.

[0082] It should be noted that the primitive computing power semantic library includes semantic vectors and corresponding computing operations corresponding to primitive computing power combinations of different underlying heterogeneous computing power resources in the target heterogeneous resource cluster; in some embodiments, such as Figure 4 As shown, in step S100, building a composite computing power model includes the following steps: S121, representing the semantic vectors and computing operations in the primitive computing power semantic library as semantic vectors, and then using them as inputs of leaf nodes of a tree structure; S122, based on the input of each leaf node, building a hierarchical structure based on a tree structure LSTM model to capture the computing power semantics, and constructing a composite computing power model.

[0083] For example, in some specific implementations, since there are many complex resource demand conditions in actual resource demand, in order to describe complex computing modes, according to the computing characteristics and topological structure, a hierarchical structure is constructed based on the Tree-Structured LSTM model (i.e., a tree-structured LSTM model) to capture the computing power semantics, and the primitive computing power is combined into a composite computing power model:

[0084] (1) The semantic vectors and computing operations (such as addition, multiplication, AND, NOT, convolution, etc.) in the primitive computing power semantic library are expressed as semantic vectors as the input of the leaf nodes of the tree, such as leaf_nodes = [cpu_flop, cpu_int, gpu_matmul, fpga_bitops], where cpu_flop represents the floating point computing power vector, cpu_int represents the integer computing power vector, gpu_matmul represents the matrix multiplication power vector, and fpga_bitops represents the bit computing power vector;

[0085] (2) Each internal node corresponds to a more complex and specific combined computing power mode (convolution, RNN, etc.) and has its own semantic representation. If there is no complex computing power mode, it is empty.

[0086] (3) Tree-Structured LSTM propagates calculations on the tree structure and recursively calculates the hidden states of internal nodes (for leaf nodes, primitive computing semantics is used as input; for internal nodes, the combination of hidden states of their child nodes is calculated; and the hidden states of child nodes are input into the TreeLSTM unit);

[0087] (4) Until the hidden state of the root node, i.e., the semantic vector representation of the composite computing power model, is obtained.

[0088] It should be noted that in some embodiments, Figure 5As shown, in step S100, constructing a service computing power model includes the following steps: S131, in response to the main demand dimensions of preset service computing power, collecting different types of service computing demand samples; the main demand dimensions include application algorithm type, computing intensity, memory demand, storage demand, bandwidth demand and delay requirement; S132, textually describing the service computing demand samples to construct a service computing power corpus; the service computing power corpus includes service sentences corresponding to each service computing demand sample after the textual description; S133, applying the semantic encoder obtained based on transfer learning to the service computing power corpus for transfer training to obtain the service computing power semantic vector corresponding to each service computing demand sample; wherein, the transfer training is performed with the similarity between each service sentence as the supervision signal.

[0089] For example, in some specific implementations, a composite computing power model is used to model and semantically express the service computing needs for specific application fields, and then a service computing power model library is constructed, and then the computing power service semantic vector is obtained from large-scale computing samples through transfer learning:

[0090] (1) Define the main demand dimensions of service computing power from multiple dimensions such as application algorithm type, computing intensity (CPU / GPU / FPGA / TPU, etc.), memory demand, storage demand, bandwidth demand, and latency demand. Collect large-scale service computing demand samples (such as database services: high CPU demand, high memory demand, and high storage demand). Describe application algorithms and computing power requirements in text form (such as a machine learning training model requires n V100 GPUs). Build a service computing power corpus.

[0091] (2) Pre-training the RoBERTa language model on a general corpus to obtain a semantic encoder;

[0092] (3) Migrate the pre-trained model to the service computing model library for further training, use the similarity of service sentence pairs as a supervision signal, and learn and optimize the service computing semantic vector. For example, compare two service requirements:

[0093] "Transformer-based neural machine translation service has high requirements for GPU and memory";

[0094] "CNN-based image recognition service, requires GPU resources and has moderate memory requirements";

[0095] By calculating their semantic similarity, we can learn that "Transformer" and "neural machine translation" have higher GPU and memory requirements, while "CNN" and "image recognition" have average GPU and memory requirements. Thus, we can obtain the semantic vector representation of each service.

[0096] S200, using the primitive computing model to obtain a first semantic vector representation of a resource node in a target heterogeneous resource cluster;

[0097] It should be noted that, in some embodiments, step S200 may include the following steps: obtaining monitoring indicators of resource nodes in the target heterogeneous resource cluster through real-time monitoring; the monitoring indicators include computing power, bandwidth and energy consumption; performing one-hot encoding on the monitoring indicators to obtain encoded indicators corresponding to each monitoring indicator; concatenating all encoded indicators and inputting them into the primitive computing power model to obtain the first semantic vector representation corresponding to the resource node.

[0098] For example, in some specific implementations, resource nodes in a distributed heterogeneous resource cluster can be mapped to the semantic space of a global semantic computing model through heterogeneous computing resource mapping. That is, heterogeneous resource indicators are obtained through real-time monitoring and mapped to semantic vector expressions within the global semantic computing model. This can be implemented as follows:

[0099] (1) Real-time monitoring to obtain indicators of available resource nodes;

[0100] (2) Keep the monitoring indicators consistent with the input indicators of the primitive computing power semantic model and perform one-hot encoding;

[0101] (3) Input the encoded indicators into the primitive computing power semantic model to obtain the semantic vector representation of the resource node. For example, if the monitoring indicator of a CPU node is [number of cores: 8, main frequency: 3.2GHz, memory: 16GB, usage rate: 30%], its corresponding semantic vector is [0.6, 0.3, 0.2, 0.4].

[0102] S300, performing similarity calculation based on the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; and filtering and obtaining a target resource in the target heterogeneous resource cluster based on the similarity list;

[0103] The similarity list includes similarity scores between the service computing power semantic vector and each first semantic vector;

[0104] It should be noted that, in some embodiments, step S300 may include the following steps: obtaining the service computing power semantic vector of the service to be scheduled from the service computing power model; using the cosine similarity measurement method to sequentially process the service computing power semantic vector and the similarity scores represented by the first semantic vector of each resource node, and compiling them to obtain a similarity list; and taking the resource node corresponding to the highest similarity score in the similarity list as the target resource.

[0105] For example, in some specific implementations, in order to achieve accurate scheduling later, it is necessary to measure the semantic similarity between the service computing power model and the available computing power resources, that is, use the cosine similarity calculation method to calculate the similarity between the service computing power semantic vector and the real-time resource semantic vector as the matching score. This can be implemented as follows:

[0106] (1) First, obtain the semantic vector of the service to be scheduled from the service computing model;

[0107] (2) Obtain the semantic vectors of all available real-time resources from the results of heterogeneous computing resource mapping;

[0108] (3) Based on the cosine similarity measurement method, a list of similarity scores between the service semantic vector and each real-time resource semantic vector is calculated;

[0109] (4) Sort the scores from high to low to obtain the real-time resources that best match the service requirements.

[0110] S400, performing fuzzy evaluation on the resource usage status and similarity score corresponding to each resource node to obtain a comprehensive evaluation score corresponding to each resource node;

[0111] It should be noted that, in some embodiments, step S400 may include the following steps: based on a preset range of values, using a membership function to obtain the membership of the resource usage status and similarity score corresponding to each resource node for each range of values; dividing the resource usage status and similarity score corresponding to each resource node into fuzzy sets corresponding to corresponding fuzzy levels according to the membership; obtaining a comprehensive evaluation score based on a preset fuzzy mapping rule according to the fuzzy level corresponding to the fuzzy set in which the resource usage status and the similarity score are located; wherein the fuzzy level corresponding to the resource usage status is inversely proportional to the comprehensive evaluation score; and the fuzzy level corresponding to the similarity score is directly proportional to the comprehensive evaluation score.

[0112] For example, in some specific implementations, in order to better handle uncertain scenarios, that is, situations where there are multi-dimensional resource usage, an evaluation model based on fuzzy logic is designed to perform a comprehensive evaluation score on heterogeneous computing resources based on computing power matching metrics and resource usage status:

[0113] (1) Fuzzification of computing power matching. The available real-time resources corresponding to the continuous computing power matching metric similarity score list are discretized into several fuzzy sets. Assuming that the computing power matching metric list is [0.75, 0.82, 0.69, 0.91, 0.63], it can be divided into the following fuzzy sets: low matching (Low): [0, 0.6], medium matching (Medium): [0.5, 0.8], high matching (High): [0.7, 1]. By using the corresponding membership function to calculate each fuzzy set, the matching degree in the computing power matching metric list is calculated to obtain the membership in each fuzzy set. For example, for a matching degree of 0.63, its membership in the low matching set is 0.05, its membership in the medium matching set is 0.65, and its membership in the high matching set is 0.

[0114] (2) The real-time resource usage status (CPU / memory / bandwidth usage, etc.) is fuzzified into three fuzzy sets: low, medium, and high.

[0115] (3) Based on the computing power matching and resource usage status, a fuzzy rule base is constructed, such as "if the computing power matching degree is high and the resource usage rate is low, then the score is high", which is mainly expressed by the "If-Then" structure of fuzzy logic;

[0116] (4) Input the fuzzified results (computing power matching degree and resource usage status) and fuzzy rules into the fuzzy inference system to obtain the final resource evaluation score. For example, assuming that the computing power matching degree is 0.82 (high), the CPU usage rate is 30% (low), the memory usage rate is 60% (medium), and the bandwidth usage rate is 20% (low). Since the computing power matching degree is 0.82, it belongs to the "high matching degree" fuzzy set, and its membership degree is 1.

[0117] According to the above process, the following inferences are made:

[0118] The examples are as follows: CPU usage of 30% belongs to the "low usage" fuzzy set with a membership of 1; memory usage of 60% belongs to the "medium usage" fuzzy set with a membership of 1; bandwidth usage of 20% belongs to the "low usage" fuzzy set with a membership of 1; according to the rule "if the computing power match is high and the resource usage is low, the score is high", the activation degree of this rule is min(1,1,1)=1; the output is fuzzified into a score of 0-10, and the final score is 9 points.

[0119] S500 . Determine the scheduling priority of each resource node based on the comprehensive evaluation score, so that the target heterogeneous resource cluster performs load balancing on each resource node according to the scheduling priority.

[0120] Exemplarily, in some specific implementations, scheduling is based on value assessment: combining the heterogeneous computing resource assessment scores obtained above, resource nodes with high scores are scheduled preferentially, thereby improving scheduling quality and avoiding resource waste.

[0121] Among them, in some specific application scenarios, in addition to scheduling based on value assessment, multiple scheduling strategy algorithms can be designed for different scenarios and goals, and scheduling strategies can be adaptively selected. It mainly includes rule-based scheduling, reinforcement learning-based scheduling, and weighted combinations of different schedulers through context factors. It can be achieved as follows:

[0122] (1) Rule-based scheduling: Scheduling decisions are made directly based on manually designed rules;

[0123] (2) Scheduling based on reinforcement learning: using a preset reinforcement strategy to directly output scheduling decisions;

[0124] (3) Context-based multi-strategy automatic grouping and scheduling:

[0125] Design a context vector to describe the current average number of running tasks, average CPU usage, average memory usage, task priority, etc. Context = [AvgRunningTasks, AvgCpuUtil, AvgMemUtil, TaskPriorityLevel];

[0126] The weights assigned to each scheduling strategy are obtained by supervised learning training, that is, for the rule scheduler A, the value assessment scheduler B and the reinforcement learning scheduler C, a weighted combination decision is made at time t according to their context vector Context(t) and their weights wa(t), wb(t), wc(t): Action(t) = max{wa(t)*A.predict(Context(t)), wb(t)*B.predict(Context(t)), wc(t)*C.predict(Context(t))};

[0127] After executing Action(t), the weights of each scheduler are updated according to the observed feedback (such as average response time), and the environmental state quantities such as Context(t+1) are updated at the same time to prepare for the next decision.

[0128] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.

[0129] First of all, it should be explained that in order to solve the related problems of the existing technology, an adaptive load balancing method is needed, which can integrate the global semantic computing power model, the unified measurement of heterogeneous computing power resources and multiple scheduling strategies.

[0130] In view of this, the present invention proposes an adaptive load balancing method based on cloud computing. The method is characterized by: proposing a global semantic computing power model architecture to uniformly model heterogeneous resources and service computing requirements; designing a unified measurement mechanism for heterogeneous computing power resources based on the global semantic computing power model; and proposing an adaptive load balancing multi-strategy scheduling algorithm mechanism based on the global semantic computing power model and the unified measurement mechanism for heterogeneous computing power resources. Figure 6 As shown, the specific process can be implemented as follows:

[0131] 6.1 Global semantic computing model:

[0132] In order to achieve efficient resource utilization and provide more accurate resource description, the present invention unifies the modeling of heterogeneous computing power semantics and designs a global semantic computing power model. Different modeling methods are used for different semantic granularities (primitives / compounds / services), and the underlying computing power primitives are gradually abstracted and compounded into a service-level computing power demand model to describe the computing power requirements of various end-to-cloud services, ensuring the expressiveness and scalability of the model, so that the model itself has sufficient semantics and standardization.

[0133] For the global semantic computing power model, the present invention adopts a hierarchical structure and is designed into three levels, namely, the primitive computing power model for defining the most basic semantics and key indicators, the composite computing power model for combining to describe more complex computing power requirements, and the service computing power model that associates the composite computing power model with service semantics.

[0134] 6.1.1 Primitive computing model:

[0135] As a primitive computing power model that defines basic semantics and key indicators, this solution uses the self-attention mechanism to uniformly model and describe the primitive computing power indicators (computing power, bandwidth, energy consumption, etc.) of the underlying heterogeneous computing power resources (CPU / GPU / FPGA / TPU, etc.), which can obtain vector identifiers that well express the semantics of primitive computing power. At the same time, it can automatically discover the inherent correlation between indicators, avoid artificially designed features, and has strong expressiveness and generalization. Figure 7 As shown, the process is as follows:

[0136] (1) Construct a training data set. Collect primitive computing power indicators of each underlying heterogeneous computing resource (such as CPU computing power, GPU matrix multiplication power, FPGA bit computing power, bandwidth, energy consumption, etc.), score the samples based on these indicators, and annotate semantically similar sample pairs to obtain a supervised training data set. The following annotations indicate that sample 1 and sample 2 are semantically similar (5 points), and sample 1 and sample 3 are not similar (2 points):

[0137] Sample 1: computing power = 10TFlops, bandwidth = 100GB / s, power consumption = 200W;

[0138] Sample 2: computing power = 9TFlops, bandwidth = 90GB / s, power consumption = 180W;

[0139] Sample 3: Computing power = 20TFlops, bandwidth = 120GB / s, power consumption = 300W;

[0140] (2) Perform a one-hot encoding on each core primitive computing power indicator, concatenate all the encoded indicators into a vector, and use it as the input of the Transformer (i.e., transformer model) encoder; use the Transformer's multi-head self-attention mechanism, where each attention head corresponds to a potential dependency relationship between indicators. The attention head automatically learns the importance and correlation between primitive computing power indicators;

[0141] (3) Use the contrastive loss function to train the Transformer. That is, the distance between the semantic vectors of similar sample pairs is small enough, and the distance between the semantic vectors of dissimilar sample pairs is large enough. For example, the model will learn that the semantic vectors of samples 1 and 2 are very close.

[0142] (4) Finally, the last layer output of the Transformer encoder is taken as the semantic vector representation of the primitive computing power. For any set of primitive indicators, semantic vectors are generated through the above steps, and finally a complete primitive computing power semantic library is obtained.

[0143] 6.1.2 Composite computing power model:

[0144] Since there are many complex resource demand conditions in actual resource demand, in order to describe complex computing modes, a hierarchical structure is built based on the Tree-Structured LSTM model (i.e., tree-structured LSTM model) to capture computing power semantics according to computing characteristics and topological structures, and the primitive computing power is combined into a composite computing power model:

[0145] (1) The semantic vectors and computing operations (such as addition, multiplication, AND, NOT, convolution, etc.) in the primitive computing power semantic library are expressed as semantic vectors as the input of the leaf nodes of the tree, such as leaf_nodes = [cpu_flop, cpu_int, gpu_matmul, fpga_bitops], where cpu_flop represents the floating point computing power vector, cpu_int represents the integer computing power vector, gpu_matmul represents the matrix multiplication power vector, and fpga_bitops represents the bit computing power vector;

[0146] (2) Each internal node corresponds to a more complex and specific combined computing power mode (convolution, RNN, etc.) and has its own semantic representation. If there is no complex computing power mode, it is empty;

[0147] (3) Tree-Structured LSTM propagates calculations on the tree structure and recursively calculates the hidden states of internal nodes (for leaf nodes, primitive computing semantics is used as input; for internal nodes, the combination of hidden states of their child nodes is calculated; and the hidden states of child nodes are input into the TreeLSTM unit);

[0148] (4) Until the hidden state of the root node, i.e., the semantic vector representation of the composite computing power model, is obtained.

[0149] 6.1.3 Service computing model:

[0150] In response to the service computing needs for specific application fields, a composite computing power model is used for modeling and semantic expression, and then a service computing power model library is built. Then, the computing power service semantic vector is obtained from large-scale computing samples through transfer learning:

[0151] (1) Define the main demand dimensions of service computing power from multiple dimensions such as application algorithm type, computing intensity (CPU / GPU / FPGA / TPU, etc.), memory demand, storage demand, bandwidth demand, and latency demand. Collect large-scale service computing demand samples (such as database services: high CPU demand, high memory demand, and high storage demand). Describe application algorithms and computing power requirements in text form (such as a machine learning training model requires n V100 GPUs). Build a service computing power corpus.

[0152] (2) Pre-training the RoBERTa language model on a general corpus to obtain a semantic encoder;

[0153] (3) Migrate the pre-trained model to the service computing model library for further training, use the similarity of service sentence pairs as a supervision signal, and learn and optimize the service computing semantic vector. For example, compare two service requirements:

[0154] "Transformer-based neural machine translation service has high requirements for GPU and memory";

[0155] "CNN-based image recognition service, requires GPU resources and has moderate memory requirements";

[0156] By calculating their semantic similarity, we can learn that "Transformer" and "neural machine translation" have higher GPU and memory requirements, while "CNN" and "image recognition" have average GPU and memory requirements. Thus, we can obtain the semantic vector representation of each service.

[0157] 6.2 Unified measurement of heterogeneous computing resources:

[0158] In order to solve the problem of representation and measurement of heterogeneous resources, a unified measurement mechanism for heterogeneous computing resources is designed in combination with the above-mentioned global semantic computing power model. The main contents include: heterogeneous computing power resource mapping, computing power matching measurement, and heterogeneous computing power resource evaluation.

[0159] like Figure 8 As shown, the specific implementation can be as follows:

[0160] 6.2.1 Heterogeneous computing resource mapping:

[0161] Map the resource nodes in the distributed heterogeneous resource cluster to the semantic space of the global semantic computing model. That is, obtain heterogeneous resource indicators through real-time monitoring and map them into semantic vector expressions in the global semantic computing model.

[0162] (1) Real-time monitoring to obtain indicators of available resource nodes;

[0163] (2) Keep the monitoring indicators consistent with the input indicators of the primitive computing power semantic model in 6.1.1 and perform one-hot encoding;

[0164] (3) Input the encoded indicators into the primitive computing power semantic model of 6.1.1 to obtain the semantic vector representation of the resource node. For example, if the monitoring indicator of a CPU node is [Number of cores: 8, main frequency: 3.2GHz, memory: 16GB, usage rate: 30%], its corresponding semantic vector is [0.6, 0.3, 0.2, 0.4].

[0165] 6.2.2 Computing power matching measurement:

[0166] In order to achieve precise scheduling in the future, it is necessary to measure the semantic similarity between the service computing power model and the available computing power resources, that is, to use the cosine similarity calculation method to calculate the similarity between the service computing power semantic vector and the real-time resource semantic vector as the matching score.

[0167] (1) First, obtain the semantic vector of the service to be scheduled from the service computing model in 6.1.3;

[0168] (2) Obtain the semantic vectors of all available real-time resources from the heterogeneous computing resource mapping module in 6.2.1;

[0169] (3) Based on the cosine similarity measurement method, a list of similarity scores between the service semantic vector and each real-time resource semantic vector is calculated;

[0170] (4) Sort the scores from high to low to obtain the real-time resources that best match the service requirements.

[0171] 6.2.3 Heterogeneous computing resource evaluation:

[0172] In order to better handle uncertain scenarios, that is, situations with multi-dimensional resource usage, an evaluation model based on fuzzy logic is designed to comprehensively evaluate and score heterogeneous computing resources based on computing power matching metrics and resource usage status:

[0173] (1) Fuzzify the computing power matching degree. The available real-time resources corresponding to the continuous computing power matching metric similarity score list in 6.2.2 are discretized into several fuzzy sets. Assuming that the computing power matching metric list is [0.75, 0.82, 0.69, 0.91, 0.63], it can be divided into the following fuzzy sets: low matching degree (Low): [0, 0.6], medium matching degree (Medium): [0.5, 0.8], high matching degree (High): [0.7, 1]. By using the corresponding membership function to calculate each fuzzy set, the matching degree in the computing power matching metric list is calculated to obtain the membership in each fuzzy set. For example, for a matching degree of 0.63, its membership in the low matching degree set is 0.05, its membership in the medium matching degree set is 0.65, and its membership in the high matching degree set is 0.

[0174] (2) The real-time resource usage status (CPU / memory / bandwidth usage, etc.) is fuzzified into three fuzzy sets: low, medium, and high.

[0175] (3) Based on the computing power matching and resource usage status, a fuzzy rule base is constructed, such as "if the computing power matching degree is high and the resource usage rate is low, then the score is high", which is mainly expressed by the "If-Then" structure of fuzzy logic;

[0176] (4) Input the fuzzified results (computing power matching degree and resource usage status) and fuzzy rules into the fuzzy inference system to obtain the final resource evaluation score. For example, assuming that the computing power matching degree is 0.82 (high), the CPU usage rate is 30% (low), the memory usage rate is 60% (medium), and the bandwidth usage rate is 20% (low). Since the computing power matching degree is 0.82, it belongs to the "high matching degree" fuzzy set, and its membership degree is 1.

[0177] According to the above process, the following inferences are made:

[0178] The CPU usage of 30% belongs to the "low usage" fuzzy set with a membership of 1; the memory usage of 60% belongs to the "medium usage" fuzzy set with a membership of 1; the bandwidth usage of 20% belongs to the "low usage" fuzzy set with a membership of 1; according to the rule "if the computing power match is high and the resource usage is low, the score is high", the activation degree of this rule is min(1,1,1)=1; the output is fuzzified into a score of 0-10, and the final score is 9 points.

[0179] 6.3 Adaptive load balancing multi-strategy scheduling algorithm mechanism:

[0180] Design multiple scheduling strategy algorithms for different scenarios and goals, and select scheduling strategies adaptively. Mainly including rule-based scheduling, value assessment-based scheduling, and reinforcement learning-based scheduling, and weighted combinations of different schedulers through context factors.

[0181] (1) Rule-based scheduling: Scheduling decisions are made directly based on manually designed rules;

[0182] (2) Scheduling based on value assessment: Based on the heterogeneous computing resource assessment scores obtained in 6.2.3, resource nodes with high scores are scheduled first, thereby improving scheduling quality and avoiding resource waste;

[0183] (3) Scheduling based on reinforcement learning: using the preset reinforcement strategy to directly output scheduling decisions;

[0184] (4) Context-based multi-strategy automatic grouping and scheduling:

[0185] Design a context vector to describe the current average number of running tasks, average CPU usage, average memory usage, task priority, etc. Context = [AvgRunningTasks, AvgCpuUtil, AvgMemUtil, TaskPriorityLevel];

[0186] The weights assigned to each scheduling strategy are obtained by supervised learning training, that is, for the rule scheduler A, the value assessment scheduler B and the reinforcement learning scheduler C, a weighted combination decision is made at time t according to their context vector Context(t) and their weights wa(t), wb(t), wc(t): Action(t) = max{wa(t)*A.predict(Context(t)), wb(t)*B.predict(Context(t)), wc(t)*C.predict(Context(t))};

[0187] After executing Action(t), the weights of each scheduler are updated according to the observed feedback (such as average response time), and the environmental state quantities such as Context(t+1) are updated at the same time to prepare for the next decision.

[0188] In summary, in order to solve the differentiation and load changes of cloud-edge computing network resources, the present invention designs an adaptive load balancing method based on cloud computing, proposes a global semantic computing power model for different semantic granularities (primitive / composite / service), and unifies cloud-edge resource modeling and computing power requirements;

[0189] At the same time, in order to quantify the availability of resources and the degree of service adaptation, a unified measurement method for heterogeneous computing resources based on a global semantic model is designed to more accurately evaluate the matching degree of heterogeneous resources to computing power requirements;

[0190] Based on the global semantic model and the unified measurement mechanism of heterogeneous computing resources, the adaptive load balancing multi-strategy scheduling algorithm mechanism automatically selects and combines appropriate strategies according to the scheduling scenario, which improves the flexibility and pertinence of scheduling and realizes the efficient use of computing resources.

[0191] Compared with the prior art, the present invention has at least the following beneficial effects:

[0192] Compared with traditional rules or indicator descriptions, the global semantic computing model's semantic vector can automatically learn the underlying semantic associations, reduce the degree of manual intervention, and has stronger expressive power.

[0193] Compared with the traditional single-dimensional evaluation method, the unified measurement of heterogeneous resources is more comprehensive and reasonable. It takes into account the matching degree of computing power requirements and the use status of multi-dimensional resources on the basis of the global semantic computing power model. It organically combines the global semantic computing power model, similarity matching, and fuzzy evaluation to form a complete new measurement system.

[0194] On the basis of the above, multi-strategy decision-making has improved the intelligent scheduling capability and made it more adaptable.

[0195] On the other hand, Fig. 9 As shown, an embodiment of the present invention provides an adaptive load balancing device 900, including:

[0196] The first module 901 is used to respond to preset heterogeneous resources and service computing requirements, perform hierarchical modeling based on different semantic granularities, and construct a global semantic computing power model;

[0197] Among them, building a global semantic computing power model includes defining basic semantics and key indicators to build a primitive computing power model of the primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model associated with service semantics; the service computing power model includes the service computing power semantic vector of the service to be scheduled;

[0198] The second module 902 uses the primitive computing model to obtain a first semantic vector representation of a resource node in the target heterogeneous resource cluster;

[0199] The third module 903 calculates the similarity between the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; based on the similarity list, the target resource in the target heterogeneous resource cluster is screened; the similarity list includes the similarity score between the service computing power semantic vector and each first semantic vector;

[0200] The fourth module 904 performs fuzzy evaluation on the resource usage status and similarity score corresponding to each resource node to obtain a comprehensive evaluation score corresponding to each resource node;

[0201] The fifth module 905 determines the scheduling priority of each resource node based on the comprehensive evaluation score, so that the target heterogeneous resource cluster performs load balancing on each resource node according to the scheduling priority.

[0202] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0203] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0204] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0205] like Fig.10 As shown, Fig.10 A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:

[0206] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0207] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;

[0208] Input / output interface 1003, used to implement information input and output;

[0209] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0210] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );

[0211] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

[0212] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0213] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0214] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0215] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0216] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0217] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0218] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0219] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0220] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.

[0221] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented by the present invention. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.

[0222] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of various functional modules in the device disclosed in the present invention, the actual implementation of the module will be understood within the conventional skills of engineers. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0223] If the function 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 technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0224] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.

[0225] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0226] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0227] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0228] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0229] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. An adaptive load balancing method, characterized in that: The following steps are involved: In response to the preset heterogeneous resources and service computing requirements, hierarchical modeling is performed based on different semantic granularities to construct a global semantic computing power model. Among them, constructing the global semantic computing power model includes defining basic semantics and key indicators to construct a primitive computing power model of the primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model associated with service semantics; the service computing power model includes a service computing power semantic vector of the service to be scheduled; Acquire a first semantic vector representation of a resource node in a target heterogeneous resource cluster using the primitive computing power model; Calculate the similarity between the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; filter and obtain the target resource in the target heterogeneous resource cluster based on the similarity list; the similarity list includes the similarity score between the service computing power semantic vector and each of the first semantic vectors; Performing fuzzy evaluation on the resource usage status and the similarity score corresponding to each resource node to obtain a comprehensive evaluation score corresponding to each resource node; The scheduling priority of each of the resource nodes is determined based on the comprehensive evaluation score, so that the target heterogeneous resource cluster performs load balancing on each of the resource nodes according to the scheduling priority.

2. The adaptive load balancing method according to claim 1, characterized in that: In the step of performing hierarchical modeling based on different semantic granularities in response to preset heterogeneous resources and service computing requirements to construct a global semantic computing power model, constructing the primitive computing power model includes the following steps: Obtaining the primitive computing power indicators of each preset underlying heterogeneous computing power resource, and then integrating them to obtain multiple sets of training data sets; the primitive computing power indicators include computing power, bandwidth and energy consumption; the semantic similarity scores between the primitive computing power indicators of the underlying heterogeneous computing power resources marked with different semantic similarity scores in the training data set; Performing one-hot encoding on each primitive computing power indicator in each group of the training data set to obtain a coding indicator corresponding to each primitive computing power indicator; and concatenating all the coding indicators to obtain an input vector; Using the input vector as an input of a converter model, so that the converter model learns the correlation between the primitive computing power indicators based on a multi-head self-attention mechanism; Based on the association degree and the semantic similarity score, the converter model is trained using a contrast loss function to construct the primitive computing power model; The primitive computing power model is used to obtain a second semantic vector representation of any group of primitive computing power indicators by processing the trained converter model to construct a primitive computing power semantic library.

3. The adaptive load balancing method according to claim 1, characterized in that: The primitive computing power semantic library includes semantic vectors and corresponding computing operations corresponding to primitive computing power combinations of different underlying heterogeneous computing power resources in the target heterogeneous resource cluster; in the step of performing hierarchical modeling based on different semantic granularities in response to preset heterogeneous resources and service computing requirements to construct a global semantic computing power model, constructing the composite computing power model includes the following steps: The semantic vector and the computing operation in the primitive computing power semantic library are represented as semantic vectors, which are then used as inputs of leaf nodes of a tree structure; According to the input of each leaf node, a hierarchical structure is constructed based on the tree structure LSTM model to capture the computing power semantics, and the composite computing power model is constructed.

4. The adaptive load balancing method according to claim 1, characterized in that: In the step of performing hierarchical modeling based on different semantic granularities in response to preset heterogeneous resources and service computing requirements to construct a global semantic computing power model, constructing the service computing power model includes the following steps: In response to the preset main demand dimensions of service computing power, different types of service computing demand samples are collected; the main demand dimensions include application algorithm type, computing intensity, memory demand, storage demand, bandwidth demand and delay requirement; The service computing demand sample is described in text form to construct a service computing power corpus; the service computing power corpus includes a service sentence corresponding to each service computing demand sample after the textual description; Applying the semantic encoder obtained based on transfer learning to the service computing power corpus for transfer training to obtain the service computing power semantic vector corresponding to each of the service computing demand samples; The transfer training is performed using the similarity between the service sentences as a supervisory signal.

5. The adaptive load balancing method according to claim 1, characterized in that: The method of using the primitive computing power model to obtain a first semantic vector representation of a resource node in a target heterogeneous resource cluster includes the following steps: Acquire monitoring indicators of resource nodes in the target heterogeneous resource cluster through real-time monitoring; the monitoring indicators include computing power, bandwidth and energy consumption; Performing one-hot encoding on the monitoring indicators to obtain encoded indicators corresponding to each of the monitoring indicators; All the encoded indicators are spliced ​​and input into the primitive computing power model to obtain the first semantic vector representation corresponding to the resource node.

6. The adaptive load balancing method according to claim 1, characterized in that: The similarity calculation is performed based on the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; The target resource in the target heterogeneous resource cluster is obtained by screening based on the similarity list, including the following steps: Acquire the service computing power semantic vector of the service to be scheduled from the service computing power model; Using the cosine similarity measurement method, sequentially process to obtain the similarity scores represented by the service computing power semantic vector and the first semantic vector of each resource node, and sort them to obtain a similarity list; The resource node corresponding to the highest similarity score in the similarity list is used as the target resource.

7. The adaptive load balancing method according to claim 1, characterized in that: The fuzzy evaluation of the resource usage status and the similarity score corresponding to each resource node to obtain a comprehensive evaluation score corresponding to each resource node includes the following steps: Based on a preset value range, the resource usage status corresponding to each resource node and the membership of the similarity score corresponding to each value range are obtained by using a membership function; Dividing the resource usage status and the similarity score corresponding to each resource node into fuzzy sets corresponding to corresponding fuzzy levels according to the membership degree; According to the resource usage status and the fuzzy level corresponding to the fuzzy set in which the similarity score is located, obtaining the comprehensive evaluation score based on a preset fuzzy mapping rule; Among them, the fuzzy level corresponding to the resource usage status is inversely proportional to the comprehensive evaluation score; the fuzzy level corresponding to the similarity score is directly proportional to the comprehensive evaluation score.

8. An adaptive load balancing device, characterized in that: include: The first module is used to respond to preset heterogeneous resources and service computing requirements, perform hierarchical modeling based on different semantic granularities, and construct a global semantic computing power model; Among them, constructing the global semantic computing power model includes defining basic semantics and key indicators to construct a primitive computing power model of the primitive computing power semantic library, a composite computing power model that combines and describes the target computing power requirements, and a service computing power model associated with service semantics; the service computing power model includes a service computing power semantic vector of the service to be scheduled; The second module uses the primitive computing model to obtain a first semantic vector representation of a resource node in a target heterogeneous resource cluster; The third module calculates the similarity between the first semantic vector representation corresponding to each resource node and the service computing power semantic vector to obtain a similarity list; based on the similarity list, the target resources in the target heterogeneous resource cluster are screened; the similarity list includes the similarity scores between the service computing power semantic vector and each of the first semantic vectors; The fourth module performs fuzzy evaluation on the resource usage status and the similarity score corresponding to each resource node to obtain a comprehensive evaluation score corresponding to each resource node; The fifth module determines the scheduling priority of each of the resource nodes based on the comprehensive evaluation score, so that the target heterogeneous resource cluster performs load balancing on each of the resource nodes according to the scheduling priority.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Cited By

  • Distributed computing power intelligent scheduling system and method

    CN120448120A

  • Task planning evaluation method and device, electronic equipment and storage medium

    CN120470022A

  • Calculation network resource measurement method and device and electronic equipment

    CN120658746A