Resource scheduling method, device, equipment, medium and product

Through the dynamic scheduling management system to obtain and verify resource call information, determine the target cluster and resource nodes, the problem of scheduling management complexity in traditional scheduling methods is solved, and efficient resource scheduling and resource utilization are achieved.

CN119493667APending Publication Date: 2025-02-21SHANG HAI ZHANG JIANG SHU XUE YAN JIU YUAN
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411606450.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The traditional k8s resource cluster scheduling method has the problem of scheduling management complexity. Each business system acts independently and it is difficult to achieve efficient resource scheduling.

Method used

Provide a resource scheduling method, obtains the resource call information of the target business system and the status information of the k8s resource cluster through the dynamic scheduling management system, verify token permissions, determines the target cluster and the target resource node, and generates a target resource call request and sends it to The calling interface of the target resource node.

Benefits of technology

Reduce the complexity of resource scheduling management, and realize efficient resource scheduling through dynamic scheduling management system, avoid direct management interaction between the business system and the k8s resource cluster, and improve resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493667A_ABST
    Figure CN119493667A_ABST
Patent Text Reader

Abstract

The invention relates to a resource scheduling method and device, equipment, a medium and a product. The method comprises the following steps: acquiring resource calling information sent by a target service system and state information corresponding to each cluster in k8s resource clusters, wherein the resource calling information comprises a token and an initial resource calling request; verifying the token, and determining a target cluster and a target resource node in the target cluster from each cluster according to the authority of the token, the initial resource calling request and the state information under the condition that the verification is passed; and generating a target resource calling request based on the initial resource calling request and the target resource node, and sending the target resource calling request to a calling interface corresponding to the target resource node. By adopting the method, the scheduling management complexity can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of k8s (Kubernetes) technology, the demand for various business systems to call k8s resource clusters is getting larger and larger, and the frequency is getting higher and higher.

[0003] In traditional technology, the scheduling method for k8s resource clusters is that each business department directly has control over the k8s resource cluster, and each business department calls resources by sending a call request to the interface server corresponding to the k8s resource cluster.

[0004] However, each business system in the traditional resource scheduling method operates independently, resulting in complex scheduling management. Summary of the invention

[0005] Based on this, it is necessary to provide a resource scheduling method, device, equipment, medium and product that can reduce the complexity of scheduling management in response to the above technical problems.

[0006] In a first aspect, the present application provides a resource scheduling method, which is applied in a dynamic scheduling management system, and the method includes:

[0007] Obtain the resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster. The resource call information includes the token and the initial resource call request;

[0008] Verify the token. If the token is verified, determine the target cluster and the target resource node in the target cluster from each cluster based on the token's permissions, initial resource call request, and status information.

[0009] Based on the initial resource call request and the target resource node, a target resource call request is generated, and the target resource call request is sent to a call interface corresponding to the target resource node.

[0010] In one embodiment, the method provides a process of determining a target cluster and a target resource node in the target cluster from each cluster according to the authority of the token, the initial resource call request, and the status information, including:

[0011] Based on token permissions, determine the open clusters that are open to the target business system from each cluster;

[0012] According to the cluster status information in the status information, the open cluster is filtered to obtain the available clusters and available nodes;

[0013] According to the node attribute information in the status information, a decision selection process is performed on the available nodes to determine the target resource node.

[0014] In one embodiment, the method provided herein performs status filtering on an open cluster according to cluster status information in the status information to obtain an available cluster and an available node, including:

[0015] An open cluster whose cluster status information is in the available state is regarded as an available cluster;

[0016] In the available cluster, nodes whose node attribute information is the available attribute are regarded as available nodes.

[0017] In one of the embodiments, the node attribute information in the provided method includes node resource usage information;

[0018] The method provided includes the following steps: making a decision on the available nodes based on the node attribute information in the status information to determine the target resource node:

[0019] According to the node resource usage information, the scheduling weight corresponding to each available node is obtained;

[0020] Based on the scheduling weight, the target resource node is determined from each available node.

[0021] In one embodiment, the method provided further includes:

[0022] Monitor and process the status information corresponding to each cluster, and generate alarm information when the status information meets the preset alarm conditions.

[0023] In one embodiment, the method provided further includes:

[0024] Obtain account opening information of the target business system;

[0025] Set scheduling permissions for the target business system and send the scheduling permissions to the target business system so that the target business system can generate resource call information based on the scheduling permissions.

[0026] In a second aspect, the present application further provides a resource scheduling device, which is applied to a dynamic scheduling management system, and the device includes:

[0027] The information acquisition module is used to obtain the resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster. The resource call information includes the token and the initial resource call request;

[0028] The node determination module is used to verify the token. If the verification is successful, the target cluster and the target resource node in the target cluster are determined from each cluster according to the token's authority, initial resource call request, and status information.

[0029] The request calling module generates a target resource calling request based on the initial resource calling request and the target resource node, and sends the target resource calling request to the calling interface corresponding to the target resource node.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method of the first aspect are implemented.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method of the first aspect when the computer program is executed by a processor.

[0032] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements the steps of the method of the first aspect when executed by a processor.

[0033] The resource scheduling method, device, equipment, medium and product provided above include: obtaining resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster, the resource call information including the token and the initial resource call request; verifying the token, and if the verification is passed, determining the target cluster and the target resource node in the target cluster from each cluster according to the authority of the token, the initial resource call request and the status information; generating a target resource call request based on the initial resource call request and the target resource node, and sending the target resource call request to the call interface corresponding to the target resource node. In this way, when the target business system calls the node resources in the k8s resource cluster, it does not need to directly interact with the k8s resource cluster for management. By sending the resource call information to the dynamic scheduling management system, the resource scheduling can be efficiently completed through the dynamic scheduling management system, thereby reducing the scheduling management complexity of the resource scheduling method. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] FIG1 is an application environment diagram of a resource scheduling method in one embodiment;

[0036] FIG2 is a schematic diagram of a flow chart of a resource scheduling method in one embodiment;

[0037] FIG3 is a schematic flow chart of steps for determining a target resource node in one embodiment;

[0038] FIG4 is a schematic diagram of a flow chart of a resource scheduling method in another embodiment;

[0039] FIG5 is a structural block diagram of a resource scheduling device in one embodiment;

[0040] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.

[0042] The resource scheduling method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the dynamic scheduling management system communicates with each business system through the network, and communicates with each cluster in the k8s resource cluster through the network, such as cluster 1, cluster 2 and cluster 3 in Figure 1. The dynamic scheduling management system obtains the resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster, and the resource call information includes a token and a resource call request; the token is verified, and when the token verification passes, the target cluster and the target resource node in the target cluster are determined from each cluster according to the token authority, resource call request and status information; based on the resource call request and the target resource node, a target resource call request is generated, and the target resource call request is sent to the call interface corresponding to the target resource node. The dynamic scheduling management system and each business system can be implemented with an independent server or a server cluster consisting of multiple servers.

[0043] In an exemplary embodiment, as shown in FIG2 , a resource scheduling method is provided, which is described by taking the method applied to the dynamic scheduling management system in FIG1 as an example, and includes the following steps 202 to 206. Among them:

[0044] Step 202, obtain the resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster, the resource call information includes a token and an initial resource call request.

[0045] The target business system is one of the business systems in FIG. 1 .

[0046] Step 204 , verify the token. If the verification is successful, determine the target cluster and the target resource node in the target cluster from each cluster according to the authority of the token, the initial resource call request and the status information.

[0047] Among them, the token of the target business system is placed in the header of the resource call information. After the dynamic scheduling management system receives the resource call information, it parses and extracts the resource call information to obtain the token.

[0048] In a possible implementation, the dynamic scheduling management system includes an OAuth 2.0 interface, and the token of the target business system is issued in advance by the dynamic scheduling management system via the OAuth 2.0 authorization server. Exemplarily, the token may include verification information issued by the authorization server, such as: an identifier representing the authorization server, an authorized subject, that is, a system identifier corresponding to the target business system, and an expiration time of the token. After all the verification information is verified, the verification of the token is completed.

[0049] Among them, the token authority is the scope of authority allocated to it by the dynamic scheduling management system included in the token. When the token verification is passed, within the scope of authority of the target business system, the target cluster is determined from each cluster based on the initial resource call request and the status information corresponding to each cluster in the k8s resource cluster, and the most suitable node is selected from the target cluster as the target resource node.

[0050] Exemplarily, a node selector is used in the initial resource call request to specify a node label, and the dynamic scheduling management system can determine the target resource node according to the specified node label. Another exemplary embodiment, the dynamic scheduling management system can also select a matching target resource node according to the resource occupancy required in the initial resource call request.

[0051] Step 206: Generate a target resource calling request based on the initial resource calling request and the target resource node, and send the target resource calling request to a calling interface corresponding to the target resource node.

[0052] Among them, the target resource call request is a message obtained by encapsulating the resource call request and the information corresponding to the target resource node. The dynamic scheduling management system binds the target resource call request with the target resource node by calling the corresponding k8s cluster API server (Application Programming Interface). After binding, the target resource node cannot be used as the target resource node in the resource scheduling of other target business systems while processing the resource call task corresponding to the current target business system.

[0053] For example, the following is a code example of the target resource call request for binding the target resource node:

[0054] spec:

[0055] affinity:

[0056] nodeAffinity:

[0057] requiredDuringSchedulingIgnoredDuringExecution:

[0058] nodeSelectorTerms:

[0059] -matchExpressions:

[0060] -key: kubernetes.io / hostname

[0061] operator: In

[0062] values:

[0063] - node-1

[0064] - node-2

[0065] In a possible implementation, the method further includes storing the resource call information sent by the target business system, the determined target cluster, and relevant information of the target resource node in a database, and returning the processing result of the target resource node on the target resource call request to the target business system.

[0066] The above resource scheduling method is applied to a dynamic scheduling management system, and the method includes: obtaining resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster, the resource call information including a token and an initial resource call request; verifying the token, and if the verification is passed, determining the target cluster and the target resource node in the target cluster from each cluster according to the authority of the token, the initial resource call request and the status information; generating a target resource call request based on the initial resource call request and the target resource node, and sending the target resource call request to the call interface corresponding to the target resource node. In this way, when the target business system calls the node resources in the k8s resource cluster, it does not need to directly interact with the k8s resource cluster for management. By sending resource call information to the dynamic scheduling management system, resource scheduling can be efficiently completed through the dynamic scheduling management system; the dynamic scheduling management system can uniformly operate and maintain the resource call information of each business system and each cluster, thereby reducing the scheduling management complexity of the resource scheduling method.

[0067] In an exemplary embodiment, based on the embodiment shown in FIG. 2 , as shown in FIG. 3 , the provided method determines a target cluster and a target resource node in the target cluster from each cluster according to the authority of the token, the initial resource call request, and the state information, including:

[0068] Step 302 : Based on the authority of the token, determine an open cluster open to the target business system from various clusters.

[0069] Among them, the clusters within the token authority range corresponding to the target business system are queried from the k8s resource cluster as open clusters, and there can be multiple open clusters.

[0070] Exemplarily, the cluster permissions corresponding to the token may be as shown in Table 1 below, where "Cluster-id" indicates the cluster ID, "accessible" indicates the cluster permission status, and a value of "true" indicates permission.

[0071] Table 1 Cluster permissions corresponding to tokens

[0072] id system Cluster-id accessible - 1 Biz001 1 true - 2 Biz002 2 true - … … … … -

[0073] Optionally, an open node is further determined from each node of the open cluster, and there may be multiple open nodes. Exemplarily, the node permissions corresponding to the token may be as shown in Table 2 below, where "Cluster-id" indicates the cluster identifier, "accessible" indicates the node permission status, and a value of "true" indicates permission.

[0074] Table 2 Node permissions corresponding to tokens

[0075] id system Cluster-id Node_id accessible - 1 Biz001 1 1 true - 2 Biz001 1 2 true - 3 Biz002 2 3 true - 4 Biz002 2 4 true … … … … … …

[0076] In one possible implementation, there is no open cluster, that is, the resource call information sent by the target business system is an illegal request for the dynamic scheduling management system, then the resource call information is intercepted, the resource scheduling process ends, and no subsequent steps are performed, and the processing result of the intercepted resource call information is directly returned to the target business system.

[0077] Step 304: Perform status filtering on the open clusters according to the cluster status information in the status information to obtain available clusters and available nodes.

[0078] In a possible implementation, step 304 may further include the following steps: taking an open cluster whose cluster status information is in an available state as an available cluster; and taking a node whose node attribute information is in an available attribute in the available cluster as an available node.

[0079] Exemplarily, the status information corresponding to each cluster in the k8s resource cluster can be shown in Table 3 below, where the "status" column indicates the cluster status information, and the value "OK" indicates that the cluster status information is in an available state. The node attribute information is shown in Table 4, where the "status" column indicates the node status in the node attribute information, and the value "active" indicates that the node attribute is an available attribute. In Table 1, clusters with ids 1 and 2 can both be used as available clusters; in Table 2, nodes with ids 1, 2, and 4 can all be used as available nodes.

[0080] Table 3 Status information corresponding to the cluster

[0081] id name Server_url status - 1 Cluster-1 192.168.1.11:6443 OK - 2 Cluster-1 192.168.2.28:6443 OK - … … … … -

[0082] Table 4 Node attribute information

[0083] id Cluster-id Node_name status - 1 1 Node_1 active - 2 1 Node_2 active - 3 2 Node_a inactive - 4 2 Node_b active - … … … … -

[0084] Step 306: Perform decision selection processing on available nodes according to the node attribute information in the state information to determine the target resource node.

[0085] In a possible implementation, the node attribute information includes node resource usage information; step 306 may further include: obtaining a scheduling weight corresponding to each available node according to the node resource usage information; and determining a target resource node from each available node based on the scheduling weight.

[0086] Exemplarily, the node resource usage information of the available nodes may include memory status, central processing unit occupancy rate cpuUseRate and graphics processing unit occupancy rate gpuUseRate, and the scheduling weight ω may be expressed as:

[0087] ω=(1-cpuUseRate)*80%+(1-gpuUseRate)*20%.

[0088] In a possible implementation, each available node is sorted according to the scheduling weight, and the available node with the highest scheduling weight is used as the target resource node.

[0089] In this embodiment, the target cluster and target resource node are determined based on the resource call information of the target business system and the status information corresponding to each cluster in the k8s resource cluster, so that dynamic resource scheduling management is realized without increasing the workload of the target business system. The target business system can switch between clusters and nodes without perception, thereby ensuring resource scheduling effect and scheduling efficiency.

[0090] In an exemplary embodiment, the provided method also includes: when a new cluster is added to the k8s resource cluster, the dynamic scheduling management system obtains status information corresponding to the new cluster, and adds the status information corresponding to the new cluster to the overall status information of the k8s resource cluster.

[0091] The status information corresponding to the new cluster may include the id, name, service address, user credential information of the new cluster, and node attribute information corresponding to the nodes in the new cluster.

[0092] In an exemplary embodiment, the provided method further includes: monitoring and processing status information corresponding to each cluster, and generating alarm information when the status information meets a preset alarm condition.

[0093] The monitoring process may be to periodically pull the status information corresponding to each cluster, and compare the status information corresponding to each cluster with the alarm condition to determine whether the status information meets the alarm condition. Exemplarily, the alarm condition may be: the status information obtained at the current pulling time is changed compared to the previous pulling time, such as the cluster status information has changed, or the node attribute information of a node in the cluster has changed.

[0094] In a possible implementation, the status information corresponding to each cluster is visualized, the status information is displayed on a display in an interface, and the display can interact with the operator. Optionally, the alarm information can be displayed on the display to alert the operator, or through devices such as sound and light sensors and vibration sensors. Optionally, the resource call information sent by each target business system is classified and displayed according to the load type of the called resource. The load type may include but is not limited to: Deployments, Pods, Jobs, or StatefulSets.

[0095] In an exemplary embodiment, the target business system communicates with the dynamic scheduling management system for the first time. The method also includes: obtaining account opening information of the target business system; setting scheduling authority for the target business system, and sending the scheduling authority to the target business system, so that the target business system generates resource call information based on the scheduling authority.

[0096] Optionally, in combination with the above-mentioned embodiment, the dynamic scheduling management system includes an OAuth 2.0 interface, and the business system that communicates with the dynamic scheduling management system for the first time needs to request an access token from the OAuth 2.0 authorization server. After obtaining the token, the target business system can generate resource call information based on the token and account opening information and send it to the dynamic scheduling management system. The dynamic scheduling management system completes verification based on the token and account opening information of the target business system and schedules the k8s resource cluster.

[0097] In this embodiment, account confirmation and authorization are performed on possible target business systems to ensure resource scheduling for authorized business systems, so as to optimize resource utilization and management.

[0098] In an exemplary embodiment, as shown in FIG4 , a resource scheduling method is provided, which is described by taking the method applied to the dynamic scheduling management system in FIG1 as an example, and includes the following steps 401 to 410. Among them:

[0099] Step 401, obtaining the account opening information of the target business system.

[0100] Step 402: Set scheduling authority for the target business system, and send the scheduling authority to the target business system so that the target business system can generate resource calling information based on the scheduling authority.

[0101] Step 403, obtain the resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster, the resource call information includes a token and an initial resource call request.

[0102] Step 404 , verify the token. If the verification is successful, determine an open cluster open to the target business system from among the clusters based on the token authority.

[0103] Step 405: An open cluster whose cluster status information is in an available state is used as an available cluster.

[0104] Step 406: In the available cluster, nodes whose node attribute information is the available attribute are used as available nodes.

[0105] Among them, the node attribute information includes node resource usage information.

[0106] Step 407: Obtain the scheduling weight corresponding to each available node according to the node resource usage information.

[0107] Step 408: Determine the target resource node from the available nodes based on the scheduling weight.

[0108] Step 409: Generate a target resource calling request based on the initial resource calling request and the target resource node, and send the target resource calling request to a calling interface corresponding to the target resource node.

[0109] Step 410: monitor and process the status information corresponding to each cluster, and generate alarm information when the status information meets the preset alarm condition.

[0110] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0111] Based on the same inventive concept, the embodiment of the present application also provides a resource scheduling device for implementing the resource scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more resource scheduling device embodiments provided below can refer to the limitations on the resource scheduling method above, and will not be repeated here.

[0112] In an exemplary embodiment, as shown in FIG5 , a resource scheduling device is provided, including: an information acquisition module 502, a node determination module 504 and a request calling module 506, wherein:

[0113] Information acquisition module 502, used to obtain resource call information sent by the target business system and status information corresponding to each cluster in the k8s resource cluster, the resource call information includes a token and an initial resource call request;

[0114] The node determination module 504 is used to verify the token, and if the verification is successful, determine the target cluster and the target resource node in the target cluster from each cluster according to the authority of the token, the initial resource call request and the status information;

[0115] The request calling module 506 generates a target resource calling request based on the initial resource calling request and the target resource node, and sends the target resource calling request to a calling interface corresponding to the target resource node.

[0116] In one of the embodiments, the node determination module 504 is also used to determine, from various clusters, an open cluster that is open to the target business system based on token permissions; perform status filtering on the open clusters according to the cluster status information in the status information to obtain available clusters and available nodes; perform decision selection on the available nodes according to the node attribute information in the status information to determine the target resource node.

[0117] In one embodiment, the node determination module 504 is further configured to use an open cluster whose cluster status information is in an available state as an available cluster; and use a node whose node attribute information is in an available attribute in an available cluster as an available node.

[0118] In one embodiment, the node attribute information includes node resource usage information; the node determination module 504 is further used to obtain the scheduling weight corresponding to each available node according to the node resource usage information; and determine the target resource node from each available node based on the scheduling weight.

[0119] In one of the embodiments, the device further includes a monitoring alarm module, which is used to monitor and process the status information corresponding to each cluster, and generate alarm information when the status information meets the preset alarm condition.

[0120] In one of the embodiments, the device also includes an authority allocation module for obtaining account opening information of the target business system; setting scheduling authority for the target business system, and sending the scheduling authority to the target business system so that the target business system can generate resource call information based on the scheduling authority.

[0121] Each module in the resource scheduling device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0122] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource scheduling method is implemented.

[0123] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0126] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0129] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0130] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A resource scheduling method, characterized in that: Applied to a dynamic scheduling management system, the method comprises: Obtain resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster, wherein the resource call information includes a token and an initial resource call request; Verifying the token, and if the verification is successful, determining a target cluster and a target resource node in the target cluster from each of the clusters according to the authority of the token, the initial resource call request, and the state information; Based on the initial resource call request and the target resource node, a target resource call request is generated, and the target resource call request is sent to a call interface corresponding to the target resource node.

2. The method according to claim 1, characterized in that The step of determining a target cluster and a target resource node in the target cluster from each of the clusters according to the authority of the token, the initial resource call request, and the state information includes: Based on the authority of the token, determining an open cluster open to the target business system from the clusters; According to the cluster status information in the status information, status filtering is performed on the open cluster to obtain available clusters and available nodes; According to the node attribute information in the state information, decision selection processing is performed on the available nodes to determine the target resource node.

3. The method according to claim 2, characterized in that According to the cluster status information in the status information, status filtering is performed on the open cluster to obtain available clusters and available nodes, including: The open cluster whose cluster status information is in an available state is used as an available cluster; In the available cluster, a node whose node attribute information is an available attribute is used as the available node.

4. The method according to claim 2, characterized in that: The node attribute information includes node resource usage information; The step of performing decision selection processing on the available nodes according to the node attribute information in the state information to determine the target resource node includes: Obtaining a scheduling weight corresponding to each of the available nodes according to the node resource usage information; Based on the scheduling weight, the target resource node is determined from the available nodes.

5. The method according to claim 1, characterized in that The method further comprises: The status information corresponding to each of the clusters is monitored and processed, and when the status information meets a preset alarm condition, alarm information is generated.

6. The method according to claim 1, characterized in that The method further comprises: Obtain account opening information of the target business system; A scheduling authority is set for the target business system, and the scheduling authority is sent to the target business system, so that the target business system generates the resource calling information based on the scheduling authority.

7. A resource scheduling device, characterized in that: Applied to a dynamic scheduling management system, the device comprises: The information acquisition module is used to obtain the resource call information sent by the target business system and the status information corresponding to each cluster in the k8s resource cluster. The resource call information includes a token and an initial resource call request; A node determination module, configured to verify the token, and if the verification is successful, determine a target cluster and a target resource node in the target cluster from each of the clusters according to the authority of the token, the initial resource call request and the status information; The request calling module generates a target resource calling request based on the initial resource calling request and the target resource node, and sends the target resource calling request to a calling interface corresponding to the target resource node.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Cold-chain logistics warehouse dynamic inventory allocation method based on AI processing

    CN120146769A

  • A dynamic inventory allocation method for cold chain logistics warehouses based on AI processing

    CN120146769B