Data Sending Method and Device, Non-Volatile Storage Medium, and Electronic Device
By determining the order of call-out of nodes and container sets to be called in the SRv6 network cluster, and determining the forwarding order of messages based on configuration data and comprehensive computing power, the problem of inefficient scheduling of container sets and packets in the prior art is solved, and efficient scheduling and forwarding are achieved.
Patent Information
- Application Number
- CN202211466378.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-11-22
AI Technical Summary
The prior art is difficult to schedule messages of container sets and the sixth version of the Internet protocol in the SRv6 network cluster at the same time, resulting in inefficient message scheduling.
By determining the node to be called out and the set of containers to be called out of the cluster management server, the order of call out is determined based on the configuration data and comprehensive computing power of the container set, and the container set is scheduled to the target node in the order of call out; at the same time, the order of forwarding of the messages to be forwarded is determined, and the message is forwarded to the target node according to the order of forwarding.
It realizes orderly scheduling of container sets and packets, improves scheduling efficiency and forwarding efficiency, and solves the problem of low packet scheduling efficiency.
Smart Images

Figure CN115866066B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technologies, and in particular, to a data sending method, an apparatus, a non-volatile storage medium, and an electronic device. Background Art
[0002] With the digital transformation of enterprises and the large-scale application of the sixth version of the Internet Protocol, the scale of platform clusters has become increasingly large, and the cluster scale has increased by 10 to 100 times compared with that ten years ago. It is difficult for the existing technology to solve the problem of flexibly and orderly scheduling the packets of the sixth version of the Internet Protocol to a new node while scheduling a Pod to a new node in an SRv6 networking cluster.
[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of this application provide a data sending method, an apparatus, a non-volatile storage medium, and an electronic device to at least solve the technical problem of low packet scheduling efficiency caused by the inability to orderly schedule packets to a new node while scheduling a container set to a new node.
[0005] According to one aspect of the embodiments of this application, a data sending method is provided, including: determining a node to be transferred out among multiple nodes of a cluster management server, and determining multiple container sets to be transferred out deployed on the node to be transferred out; determining a target transfer-in node corresponding to the container sets to be transferred out among the multiple nodes; determining the transfer-out order of each container set to be transferred out according to the configuration data and comprehensive computing power of each container set to be transferred out, and scheduling the container sets to be transferred out to the target transfer-in node according to the transfer-out order; determining the forwarding order of the packets to be forwarded corresponding to the container sets to be transferred out, and forwarding the packets to be forwarded to the target transfer-in node according to the forwarding order.
[0006] Optionally, determining multiple container sets to be transferred out deployed on the node to be transferred out includes: obtaining historical mirror data from the mirror database of the cluster management server; determining the configuration data of multiple container sets deployed on the node to be transferred out according to the historical mirror data, where the configuration data includes at least one of the following: CPU usage rate, memory usage, and disk throughput; assigning a value to the configuration data of each container set to obtain a first value corresponding to each container set; calculating a first average value of the first values corresponding to each container set, and determining the first average value as a first target value; if the first value corresponding to a container set is less than the first target value, determining the container set as a container set to be transferred out.
[0007] Optionally, according to the configuration data and comprehensive computing power of each set of containers to be recalled, determine the recall order of each set of containers to be recalled, including: determining whether the first values corresponding to multiple sets of containers to be recalled are the same; in the case where the first values are different, determining the recall order of multiple sets of containers to be recalled according to the magnitudes of the first values; in the case where the first values are the same, determining the recall order of multiple sets of containers to be recalled according to the magnitudes of the comprehensive computing power.
[0008] Optionally, before determining the recall order of each set of containers to be recalled according to the configuration data and comprehensive computing power of each set of containers to be recalled, the method further includes: respectively determining the logical operation ability, parallel computing ability, and neural network acceleration ability of the set of containers to be recalled; respectively determining the logical operation mapping ratio coefficient, parallel computing mapping ratio coefficient, and neural network acceleration mapping ratio coefficient of the set of containers to be recalled; determining the logical operation computing power according to the logical operation ability and the logical operation mapping ratio coefficient, determining the parallel computing power according to the parallel computing ability and the parallel computing mapping ratio coefficient, and determining the neural network acceleration computing power according to the neural network acceleration ability and the neural network acceleration mapping ratio coefficient; determining the comprehensive computing power of the set of containers to be recalled according to the logical operation computing power, parallel computing power, and neural network acceleration computing power.
[0009] Optionally, determining the nodes to be recalled among multiple nodes of the cluster management server includes: obtaining the configuration data of each node among the multiple nodes, assigning values to the configuration data of each node, and obtaining the second values corresponding to multiple configuration parameters in the configuration data, where the configuration data includes multiple configuration parameters; calculating the second average value of the multiple second values corresponding to each node, and determining the second average value as the second target value; if the second value corresponding to a node is less than the second target value, determining the node as a node to be recalled.
[0010] Optionally, determining the forwarding order of the packets to be forwarded corresponding to the set of containers to be recalled includes: obtaining the packets to be forwarded of all the container sets deployed on the nodes to be recalled through the mirror server of the cluster management server; determining the first forwarding priority of the communication protocol corresponding to the packets to be forwarded according to the proportion of the packets to be forwarded in the communication protocol; determining the second forwarding priority of the packets to be forwarded; determining the forwarding order of the packets to be forwarded according to the first forwarding priority and the second forwarding priority.
[0011] Optionally, determining the second forwarding priority of the packets to be forwarded includes: assigning a value to the first field of the target protocol to determine the target field of the target protocol; adding the target field to the packet header information of the packets to be forwarded; determining the second forwarding priority according to the target field.
[0012] According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided. The storage medium includes a stored program, wherein when the program runs, it controls the device where the storage medium is located to execute the above data sending method.
[0013] According to another aspect of the embodiments of the present application, an electronic device is further provided, including: a memory and a processor. The processor is used to run the program stored in the memory, wherein when the program runs, it executes the above data sending method.
[0014] In the embodiments of the present application, the method is adopted to determine the nodes to be removed among the multiple nodes of the cluster management server, and determine the multiple sets of containers to be removed deployed on the nodes to be removed; determine the target receiving nodes corresponding to the sets of containers to be removed among the multiple nodes; determine the removal order of each set of containers to be removed according to the configuration data and comprehensive computing power of each set of containers to be removed, and schedule the sets of containers to be removed to the target receiving nodes according to the removal order; determine the forwarding order of the packets to be forwarded corresponding to the sets of containers to be removed, and forward the packets to be forwarded to the target receiving nodes according to the forwarding order. By determining the removal order of the sets of containers to be removed according to the configuration data and comprehensive computing power of the sets of containers to be removed and determining the forwarding order of the packets to be forwarded corresponding to the sets of containers to be removed, the purpose of orderly scheduling the sets of containers and the packets to be forwarded corresponding to the sets of containers is achieved, thereby realizing the technical effect of improving the scheduling efficiency of the sets of containers and the forwarding efficiency of the packets to be forwarded corresponding to the sets of containers, and further solving the technical problem of low packet scheduling efficiency caused by the inability to orderly schedule the packets to the new nodes while scheduling the sets of containers to the new nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application, and do not constitute an improper limitation of the present application. In the drawings:
[0016] Figure 1 is a flowchart of a data sending method according to an embodiment of the present application;
[0017] Figure 2 is a flowchart of another data sending method according to an embodiment of the present application;
[0018] Figure 3 is a structural diagram of a data sending device according to an embodiment of the present application;
[0019] Figure 4 is a hardware structure block diagram of a computer terminal (or electronic device) of a data sending method provided according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0022] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained as follows:
[0023] Kubernetes: Kubernetes is a distributed system engine developed and open-sourced by Google for managing container clusters across host machines. It is built on top of Docker, allowing users to create and manage Docker container clusters, and providing a complete set of functions such as resource scheduling, automated deployment and operation, service discovery, elastic scaling, and high availability for containerized application clusters.
[0024] Node: In the Kubernetes cluster technology, a node represents the host physical computer or virtual machine server running in the Kubernetes cluster, providing the necessary computing resources for containers.
[0025] Master node: In the Kubernetes cluster technology, the master node is the computer that controls the Kubernetes nodes and is also the place where job tasks are created.
[0026] Container set: In the Kubernetes cluster technology, a container set (Pod) is the smallest basic unit created or deployed by Kubernetes. A Pod is a set composed of one or more containers that run on the same node and share the resources of the node. The core of Kubernetes scheduling is how to select a suitable node from the cluster and allocate it to the Pod.
[0027] According to an embodiment of the present application, a method embodiment of a data sending method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0028] Figure 1 is a flowchart of a data sending method according to an embodiment of the present application, as Figure 1 shown, the method includes the following steps:
[0029] Step S102, determine the node to be removed from among the multiple nodes of the cluster management server, and determine the multiple container sets to be removed deployed on the node to be removed.
[0030] According to an optional embodiment of the present application, the node to be removed from among the multiple nodes of the cluster management server is determined according to parameters such as the usage rate of the central processing unit of the node, the used size of the memory, and the throughput of the disk. Then, the multiple container sets to be removed in the node to be removed are determined according to parameters such as the usage rate of the central processing unit of the container set, the used size of the memory, and the throughput of the disk.
[0031] Step S104, determine the target node to be transferred into corresponding to the container set to be removed among the multiple nodes.
[0032] According to another optional embodiment of the present application, the core of container set scheduling is how to select a suitable node from the cluster and allocate it to the container set, and schedule the container set to be removed to a node with more sufficient total computing resources or schedule the container set to be removed to a node with relatively sufficient idle computing resources.
[0033] Step S106, determine the removal order of each container set to be removed according to the configuration data and comprehensive computing power of each container set to be removed, and schedule the container sets to be removed to the target node to be transferred into according to the removal order.
[0034] In addition to the configuration data of the container sets to be evicted, i.e., parameters such as the CPU usage rate, the used memory size, and the disk throughput, the eviction order of each container set to be evicted is determined according to the comprehensive computing power of the container sets to be evicted. When the configuration data of the container sets to be evicted are different, the container set to be evicted with the most insufficient computing resources is first scheduled to the target incoming node; when the configuration data of the container sets to be evicted are the same, the eviction order of the container sets to be evicted is determined according to the comprehensive computing power of the container sets to be evicted, and the container set to be evicted with the maximum comprehensive computing power is first scheduled to the target incoming node.
[0035] Step S108, determine the forwarding order of the packets to be forwarded corresponding to the container sets to be evicted, and forward the packets to be forwarded to the target incoming node according to the forwarding order.
[0036] As an optional embodiment of the present application, first, determine the forwarding priority of the communication protocol: classify the packets to be forwarded according to the protocol rules, obtain the IPv6 packet data of all the container sets to be evicted in the node to be evicted through the mirror server, and obtain the protocol with the highest packet ratio as the protocol with the highest priority through five-tuple analysis. In summary, the communication protocol can be divided into priorities 1-7, and all those exceeding the 7th priority are determined as the 8th priority. Second, determine the priority of the packets to be forwarded: assign a value to the cos field in the 802.1Q-Tag protocol (i.e., 802.1q) to determine the priority parameter value of the 802.1Q-Tag protocol, where the value range of the priority parameter value is 8-15. Add the priority parameter value to the packet header information of the packets to be forwarded, and determine the priority of the packets to be forwarded according to the above priority parameter value.
[0037] According to the above steps, by determining the eviction order of the container sets to be evicted according to the configuration data and comprehensive computing power of the container sets to be evicted and determining the forwarding order of the packets to be forwarded corresponding to the container sets to be evicted, the purpose of orderly scheduling the container sets and the packets to be forwarded corresponding to the container sets is achieved, thereby realizing the technical effect of improving the scheduling efficiency of the container sets and the forwarding efficiency of the packets to be forwarded corresponding to the container sets.
[0038] According to an optional embodiment of the present application, determining a plurality of container sets to be transferred out deployed on a node to be transferred out includes the following steps: obtaining historical image data from the image database of the cluster management server; determining configuration data of a plurality of container sets deployed on the node to be transferred out according to the historical image data, where the configuration data includes at least one of the following: central processing unit usage rate, memory usage amount, and disk throughput; assigning values to the configuration data of each container set to obtain a first value corresponding to each container set; calculating a first average value of the first values corresponding to each container set, and determining the first average value as a first target value; if the first value corresponding to a container set is less than the first target value, determining the container set as a container set to be transferred out.
[0039] In some optional embodiments of the present application, determining the transfer-out order of each container set to be transferred out according to the configuration data and comprehensive computing power of each container set to be transferred out includes: determining whether the first values corresponding to a plurality of container sets to be transferred out are the same; in the case where the first values are different, determining the transfer-out order of the plurality of container sets to be transferred out according to the magnitudes of the first values; in the case where the first values are the same, determining the transfer-out order of the plurality of container sets to be transferred out according to the magnitudes of the comprehensive computing powers.
[0040] In addition to the configuration data of the container sets to be transferred out, the transfer-out order of each container set to be transferred out is also determined according to the comprehensive computing power of the container sets to be transferred out. In the case where the configuration data of the container sets to be transferred out is different, the container set to be transferred out with the most insufficient computing resources is first scheduled to the target node to be transferred in; in the case where the configuration data of the container sets to be transferred out is the same, the transfer-out order of the container sets to be transferred out is determined according to the comprehensive computing power of the container sets to be transferred out, and the container set to be transferred out with the largest comprehensive computing power is first scheduled to the target node to be transferred in.
[0041] In some optional embodiments of the present application, before determining the transfer-out order of each container set to be transferred out according to the configuration data and comprehensive computing power of each container set to be transferred out, it is also necessary to: respectively determine the logical operation ability, parallel computing ability, and neural network acceleration ability of the container sets to be transferred out; respectively determine the logical operation mapping ratio coefficient, parallel computing mapping ratio coefficient, and neural network acceleration mapping ratio coefficient of the container sets to be transferred out; determine the logical operation computing power according to the logical operation ability and the logical operation mapping ratio coefficient, determine the parallel computing power according to the parallel computing ability and the parallel computing mapping ratio coefficient, and determine the neural network acceleration computing power according to the neural network acceleration ability and the neural network acceleration mapping ratio coefficient; determine the comprehensive computing power of the container sets to be transferred out according to the logical operation computing power, parallel computing power, and neural network acceleration computing power.
[0042] As another alternative embodiment of the present application, computing power is the key core ability of a device or platform to process service information for completing a certain service, which involves the computing ability of the device or platform, including logical operation ability, parallel computing ability, neural network acceleration, etc. According to different running algorithms and data calculation types involved, the computing power can be divided into logical operation ability, parallel computing ability, and neural network computing ability. For different calculation types, chips of different manufacturers have their own different designs, which involves the unified measurement of heterogeneous computing power. The computing power provided by different chips can be mapped to a unified dimension through a measurement function. For devices and platforms with heterogeneous computing power, assuming there are n logical operation chips, m parallel computing chips, and p neural network acceleration chips, then the computing power requirement of the service can be uniformly expressed by the following formula:
[0043]
[0044] where C br is the comprehensive computing power; f(x) is the mapping function; α, β, and γ are mapping proportionality coefficients; q is the redundant computing power. Taking the parallel computing ability as an example, assuming there are 3 different types of parallel computing chip resources, namely b1, b2, and b3, then f(β j ) represents the mapping function of the parallel computing ability that the j-th parallel computing chip b can provide, and q2 represents the redundant computing power of parallel computing.
[0045] In an alternative embodiment, to determine the node to be removed among multiple nodes of the cluster management server, it is achieved by the following method: Obtain the configuration data of each node among the multiple nodes, assign values to the configuration data of each node, and obtain the second values corresponding to multiple configuration parameters in the configuration data, where the configuration data includes multiple configuration parameters; Calculate the second average value of the multiple second values corresponding to each node, and determine the second average value as the second target value; If the second value corresponding to a node is less than the second target value, determine the node as the node to be removed.
[0046] According to another alternative embodiment of the present application, determining the forwarding order of the to-be-forwarded packets corresponding to the set of containers to be removed includes the following steps: Obtain the to-be-forwarded packets of the entire set of containers deployed on the node to be removed through the image server of the cluster management server; Determine the first forwarding priority of the communication protocol corresponding to the to-be-forwarded packets according to the proportion of the to-be-forwarded packets in the communication protocol; Determine the second forwarding priority of the to-be-forwarded packets; Determine the forwarding order of the to-be-forwarded packets according to the first forwarding priority and the second forwarding priority.
[0047] Classify the protocol rules for the forwarded packets. Obtain the IPv6 packet data of all the containers to be transferred in the nodes to be transferred through the mirror server, and through five-tuple analysis, obtain the protocol with the highest packet ratio as the protocol with the highest priority. In summary, the communication protocols can be classified into priorities 1-7, and all those exceeding the 7th priority are determined to be the 8th priority. The five-tuple refers to the set composed of five quantities: the source Internet protocol address, the source port, the destination Internet protocol address, the destination port, and the transport layer protocol. The five-tuple can distinguish different sessions, and the corresponding session is unique.
[0048] As an optional embodiment of the present application, to determine the second forwarding priority of the packet to be forwarded, it can be achieved by the following method: assign a value to the first field of the target protocol to determine the target field of the target protocol; add the target field to the packet header information of the packet to be forwarded; determine the second forwarding priority according to the target field.
[0049] In some optional embodiments of the present application, to determine the priority of the packet to be forwarded: assign a value to the cos field in the 802.1Q-Tag protocol (i.e., 802.1q) to determine the priority parameter value of the 802.1Q-Tag protocol, where the value range of the priority parameter value is 8-15. Add the priority parameter value to the packet header information of the packet to be forwarded, and determine the priority of the packet to be forwarded according to the above priority parameter value.
[0050] Figure 2 It is a flowchart of another data sending method according to an embodiment of the present application, as Figure 2 shown, and the method includes:
[0051] 1. Deploy a Master (primary node) and a mirror database storing all versions on the cluster management server, and obtain the configuration data of the nodes and Pods through the historical mirror data of the mirror database. The configuration data includes parameters such as the usage rate of the central processing unit, the used size of the memory, and the throughput of the disk. Determine the nodes to be transferred among the multiple nodes of the cluster management server according to the parameters such as the usage rate of the central processing unit, the used size of the memory, and the throughput of the disk of the nodes, and then determine the multiple Pods to be transferred in the nodes to be transferred according to the parameters such as the usage rate of the central processing unit, the used size of the memory, and the throughput of the disk of the Pods.
[0052] 2. Schedule the Pods to be transferred to the nodes with more sufficient total computing resources or schedule the Pods to be transferred to the nodes with relatively sufficient idle computing resources. A Pod is the smallest basic unit created or deployed by Kubernetes. A Pod represents a working unit running on the cluster and can contain multiple container processes. The core of Kubernetes scheduling is how to select appropriate nodes from the cluster to allocate to the Pods.
[0053] 3. Determine the eviction order of each Pod to be evicted according to the comprehensive computing power of the Pod to be evicted. When the configuration data of the Pods to be evicted are different, schedule the Pod to be evicted with the most insufficient computing resources to the target incoming node first; when the configuration data of the Pods to be evicted are the same, determine the eviction order of the Pods to be evicted according to the comprehensive computing power of the Pods to be evicted, and schedule the Pod to be evicted with the largest comprehensive computing power to the target incoming node first.
[0054] Since there are many server brands and the chips of different manufacturers have their unique designs, if the processing capabilities of each type of server hardware are measured separately, it is not only computationally complex but also difficult to unify the standards, and it is impossible to provide an effective reference for network construction. Therefore, the computing power provided by different chips can be mapped to a unified dimension through a metric function. For heterogeneous computing power devices and platforms, assuming there are n logic operation chips, m parallel computing chips, and p neural network acceleration chips, then the computing power requirements of the service can be uniformly expressed by the following formula:
[0055]
[0056] Among them, C br is the comprehensive computing power; f(x) is the mapping function; α, β, and γ are mapping scale factors; q is the redundant computing power. Taking parallel computing capabilities as an example, assuming there are 3 different types of parallel computing chip resources, namely b1, b2, and b3, then f(β j ) represents the mapping function of the parallel computing capabilities that the jth parallel computing chip b can provide, q2 represents the redundant computing power of parallel computing, TOPS (Tera Operations Per Second) is the unit of processor computing power, and FLOPS (Floating-point Operations Per Second) is the number of floating-point operations executed per second, which is often used to estimate the execution efficiency of a computer, especially in the field of scientific computing that involves a large number of floating-point operations.
[0057] Through the above steps, the chip processing capabilities of different types of heterogeneous servers are normalized, and the comprehensive computing power of the servers is obtained after being mapped to a unified dimension, which is convenient for subsequent server resource scheduling.
[0058] 4. Determine the forwarding order of the packets to be forwarded corresponding to the Pod to be transferred out, and forward the packets to be forwarded to the target node to be transferred in according to the forwarding order. Specifically, first, determine the forwarding priority of the communication protocol: classify the packets to be forwarded according to the protocol rules, obtain the IPv6 packet data of all the Pods to be transferred out in the node to be transferred out through the mirror server, and obtain the protocol with the highest packet ratio as the protocol with the highest priority through five-tuple analysis. In summary, the communication protocols can be divided into priorities 1-7, and all those exceeding the 7th priority are determined as the 8th priority. Second, determine the priority of the packets to be forwarded: assign a value to the cos field in the 802.1Q-Tag protocol (i.e., 802.1q) to determine the priority parameter value of the 802.1Q-Tag protocol. Among them, the value range of the priority parameter value is 8-15. Add the priority parameter value to the header information of the packets to be forwarded, and determine the priority of the packets to be forwarded according to the above priority parameter value.
[0059] Figure 3 is a structural diagram of a data sending device according to an embodiment of the present application, as Figure 3 shown, the device includes:
[0060] The first determination module 30 is configured to determine the node to be transferred out among the multiple nodes of the cluster management server, and determine the set of multiple containers to be transferred out deployed on the node to be transferred out;
[0061] The second determination module 32 is configured to determine the target node to be transferred in corresponding to the set of containers to be transferred out among the multiple nodes;
[0062] The scheduling module 34 is configured to determine the transfer-out order of each set of containers to be transferred out according to the configuration data and comprehensive computing power of each set of containers to be transferred out, and schedule each set of containers to be transferred out to the target node to be transferred in according to the transfer-out order;
[0063] The forwarding module 36 is configured to determine the forwarding order of the packets to be forwarded corresponding to the set of containers to be transferred out, and forward the packets to be forwarded to the target node to be transferred in according to the forwarding order.
[0064] It should be noted that the above Figure 3 each module can be a program module (for example, a set of program instructions for implementing a specific function), or a hardware module. For the latter, it can be presented in the following forms, but not limited to this: the manifestation form of each of the above modules is a processor, or the functions of the above modules are implemented by a processor.
[0065] Figure 4 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing the data sending method. As Figure 4As shown, the computer terminal 40 (or mobile device 40) may include one or more processors 402 (illustrated as 402a, 402b, ……, 402n in the figure) (the processor 402 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 404 for storing data, and a transmission module 406 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 4 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 40 may further include more or fewer components than Figure 4 shown in, or have a different configuration from Figure 4 that shown.
[0066] It should be noted that the above one or more processors 402 and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit may be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 40 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0067] The memory 404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data sending method in the embodiments of the present application. The processor 402 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, that is, implements the above-mentioned data sending method. The memory 404 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some instances, the memory 404 may further include a memory remotely set relative to the processor 402, and these remote memories can be connected to the computer terminal 40 through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0068] The transmission module 406 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the communication provider of the computer terminal 40. In one example, the transmission module 406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 406 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0069] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer terminal 40 (or mobile device).
[0070] It should be noted here that in some alternative embodiments, the above Figure 4 shown computer device (or electronic device) may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. It should be pointed out that Figure 4 is only an example of a specific specific instance and is intended to illustrate the types of components that may exist in the above computer device (or electronic device).
[0071] It should be noted that Figure 4 the shown electronic device is used to execute Figure 1 the shown data sending method. Therefore, the relevant explanations in the execution method of the above command also apply to this electronic device, and will not be elaborated here.
[0072] The embodiment of the present application also provides a non-volatile storage medium. The non-volatile storage medium includes a stored program, wherein when the program runs, it controls the device where the storage medium is located to execute the above data sending method.
[0073] The program executed by the non-volatile storage medium has the following functions: determining the nodes to be removed among the multiple nodes of the cluster management server, and determining the multiple sets of containers to be removed deployed on the nodes to be removed; determining the target nodes to be transferred into corresponding to the sets of containers to be removed among the multiple nodes; determining the removal order of each set of containers to be removed according to the configuration data and comprehensive computing power of each set of containers to be removed, and scheduling the sets of containers to be removed to the target nodes to be transferred into according to the removal order; determining the forwarding order of the packets to be forwarded corresponding to the sets of containers to be removed, and forwarding the packets to be forwarded to the target nodes to be transferred into according to the forwarding order.
[0074] An embodiment of the present application further provides an electronic device, including: a memory and a processor, where the processor is used to run a program stored in the memory, and when the program runs, it executes the above data sending method.
[0075] The processor is used to run a program that executes the following functions: determining a node to be removed from multiple nodes of a cluster management server, and determining a set of multiple containers to be removed deployed on the node to be removed; determining a target node to be transferred into corresponding to the set of containers to be removed among multiple nodes; determining the removal order of each set of containers to be removed according to the configuration data and comprehensive computing power of each set of containers to be removed, and scheduling the set of containers to be removed to the target node to be transferred into according to the removal order; determining the forwarding order of the packets to be forwarded corresponding to the set of containers to be removed, and forwarding the packets to be forwarded to the target node to be transferred into according to the forwarding order.
[0076] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0077] In the above embodiments of the present application, the descriptions of the respective embodiments have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0078] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.
[0079] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0081] When the integrated unit 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 this application, in essence, or the part that contributes to the related technology, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs.
[0082] The foregoing are only the preferred embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.
Claims
1. A data sending method, characterized in that, it includes: determine the node to be removed from multiple nodes of the cluster management server, and determine multiple sets of containers to be removed deployed on the node to be removed; determine the target receiving node corresponding to the set of containers to be removed among the multiple nodes; determine the removal order of each set of containers to be removed according to the configuration data and comprehensive computing power of each set of containers to be removed, and schedule the set of containers to be removed to the target receiving node according to the removal order; determine the forwarding order of the packets to be forwarded corresponding to the set of containers to be removed, and forward the packets to be forwarded to the target receiving node according to the forwarding order; in the case where the cluster management server is a heterogeneous computing power device, if there are n logic operation chips, m parallel computing chips, and p neural network acceleration chips, the comprehensive computing power is determined by the following formula: Among them, C br is the aforementioned comprehensive computing power, f(x) is a mapping function, α, β, and γ are mapping proportionality coefficients, and q 1 is the redundant computing power of the logic operation chip, q 2 is the redundant computing power of the parallel computing chip, q 3 is the redundant computing power of the neural network acceleration chip, TOPS is the unit of processor computing power, and FLOPS is the number of floating-point operations executed per second.
2. The method according to claim 1, characterized in that, determining multiple sets of containers to be removed deployed on the node to be removed includes: obtain historical mirror data from the mirror database of the cluster management server; determine the configuration data of multiple sets of containers deployed on the node to be removed according to the historical mirror data, where the configuration data includes at least one of the following: CPU usage rate, memory usage, and disk throughput; assign a value to the configuration data of each set of containers to obtain a first value corresponding to each set of containers; calculate the first average value of the first values corresponding to each set of containers, and determine the first average value as the first target value; if the first value corresponding to the set of containers is less than the first target value, determine the set of containers as the set of containers to be removed.
3. The method according to claim 2, characterized in that, determining the removal order of each set of containers to be removed according to the configuration data and comprehensive computing power of each set of containers to be removed includes: judge whether the first values corresponding to multiple sets of containers to be removed are the same; in the case where the first values are different, determine the removal order of multiple sets of containers to be removed according to the magnitudes of the first values; in the case where the first values are the same, determine the removal order of multiple sets of containers to be removed according to the magnitudes of the comprehensive computing power.
4. The method according to claim 1, characterized in that, before determining the removal order of each set of containers to be removed according to the configuration data and comprehensive computing power of each set of containers to be removed, the method further includes: respectively determine the logical operation ability, parallel computing ability, and neural network acceleration ability of the set of containers to be removed; respectively determine the logical operation mapping ratio coefficient, parallel computing mapping ratio coefficient, and neural network acceleration mapping ratio coefficient of the set of containers to be removed; Determine the logical computing power according to the logical operation ability and the logical operation mapping proportionality coefficient, determine the parallel computing power according to the parallel computing ability and the parallel computing mapping proportionality coefficient, and determine the neural network acceleration computing power according to the neural network acceleration ability and the neural network acceleration mapping proportionality coefficient; Determine the comprehensive computing power of the set of containers to be transferred out according to the logical computing power, the parallel computing power, and the neural network acceleration computing power.
5. The method according to claim 1, wherein, determining the nodes to be transferred out among the multiple nodes of the cluster management server includes: Obtain the configuration data of each node among the multiple nodes, assign values to the configuration data of each node, and obtain the second values corresponding to multiple configuration parameters in the configuration data, where the configuration data includes multiple configuration parameters; Calculate the second average value of the multiple second values corresponding to each node, and determine the second average value as the second target value; If the second value corresponding to the node is less than the second target value, determine the node as the node to be transferred out.
6. The method according to claim 1, wherein, determining the forwarding order of the packets to be forwarded corresponding to the set of containers to be transferred out includes: Obtain the packets to be forwarded of all the container sets deployed on the nodes to be transferred out through the image server of the cluster management server; Determine the first forwarding priority of the communication protocol corresponding to the packet to be forwarded according to the proportion of the packet to be forwarded in the communication protocol; Determine the second forwarding priority of the packet to be forwarded; Determine the forwarding order of the packet to be forwarded according to the first forwarding priority and the second forwarding priority.
7. The method according to claim 6, wherein, determining the second forwarding priority of the packet to be forwarded includes: Assign a value to the first field of the target protocol to determine the target field of the target protocol; Add the target field to the packet header information of the packet to be forwarded; Determine the second forwarding priority according to the target field.
8. A container set scheduling device, wherein, comprises: A first determination module, configured to determine the nodes to be transferred out among the multiple nodes of the cluster management server, and determine multiple sets of containers to be transferred out deployed on the nodes to be transferred out; A second determination module, configured to determine the target nodes to be transferred into corresponding to the set of containers to be transferred out among the multiple nodes; A scheduling module, configured to determine the transfer-out order of each set of containers to be transferred out according to the configuration data and the comprehensive computing power of each set of containers to be transferred out, and schedule the set of containers to be transferred out to the target nodes to be transferred into according to the transfer-out order; A forwarding module, configured to determine the forwarding order of the packets to be forwarded corresponding to the set of containers to be transferred out, and forward the packets to be forwarded to the target nodes to be transferred into according to the forwarding order; The container set scheduling device is further configured to, when the cluster management server is a heterogeneous computing power device, if there are n logical operation chips, m parallel computing chips, and p neural network acceleration chips, determine the comprehensive computing power through the following formula: Among them, C br is the aforementioned comprehensive computing power, f(x) is a mapping function, α, β, and γ are mapping proportionality coefficients, and q 1 is the redundant computing power of the logic operation chip, q 2 is the redundant computing power of the parallel computing chip, q is the redundant computing power of the neural network acceleration chip, TOPS is the unit of processor computing power, and FLOPS is the number of floating-point operations executed per second.
9. A non-volatile storage medium, characterized in that, the non-volatile storage medium includes a stored program, wherein when the program runs, it controls the device where the non-volatile storage medium is located to execute the data sending method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, comprising: a memory and a processor, the processor is used to run a program stored in the memory, wherein when the program runs, it executes the data sending method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Pod scheduling method and device based on Kubernetes cluster, equipment and medium
CN112214288A