Resource scheduling method and system, electronic equipment, storage medium and product

By synchronizing the original addresses and configuration information of disk resources in the scheduling system, task units can determine and access the correct disk addresses, solving the problem of task failure caused by disk drift and improving the success rate of task execution.

CN121008741APending Publication Date: 2025-11-25ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410644120.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

The problem of disk drift causing task failure has not been effectively solved by existing technologies.

Method used

By synchronizing the original disk address and configuration information of the target disk resource in the scheduling system, the task unit can determine and access the correct address of the target disk resource based on this information, restore the disk address, and thus avoid disk drift.

Benefits of technology

This improved the success rate of disk resource access, thereby increasing the success rate of task execution and resolving the issue of task failure caused by disk drift.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008741A_ABST
    Figure CN121008741A_ABST
Patent Text Reader

Abstract

The invention discloses a resource scheduling method and system, electronic equipment, a storage medium and a product. The method comprises the steps that under the condition that a resource allocation request sent by a task unit is received, target disk resources are allocated to the task unit from at least one disk resource; configuration information of the at least one disk resource is obtained, the configuration information comprises the mapping relation between the original disk address of the at least one disk resource and the identification information of the at least one disk resource, and the original disk address is used for representing the disk address of the at least one disk resource in the initialization process; and synchronizing the original disk address and the configuration information of the target disk resource to the task unit, so that the task unit determines a target disk address of the target disk resource based on the original disk address and the configuration information, and accesses the target disk resource based on the target disk address. The technical problem of task execution failure caused by disk fluttering of the disk is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of cloud computing, in particular to a resource scheduling method and system, an electronic device, a storage medium and a product. BACKGROUND

[0002] Generally, a scheduling system allocates disk resources to tasks with resource requirements. However, if a disk drifts, that is, the dev address (Device File Address) of the disk changes, the previous path cannot access the disk, and when scheduling tasks, it is found that the task cannot be found because of the disk, and thus the task fails.

[0003] At present, no effective solution has been proposed for the above problems. SUMMARY

[0004] Embodiments of the present application provide a resource scheduling method and system, an electronic device, a storage medium and a product to at least solve the technical problem of task execution failure due to disk drifting.

[0005] According to an aspect of an embodiment of the present application, a resource scheduling method is provided, applied to a scheduling system, and the method comprises: in the case of receiving a resource allocation request sent by a task unit, allocating a target disk resource for the task unit from at least one disk resource; obtaining configuration information of the at least one disk resource, wherein the configuration information contains a mapping relationship between an original disk address of the at least one disk resource and identification information of the at least one disk resource, and the original disk address is used to represent a disk address of the at least one disk resource in an initialization process; synchronizing the original disk address of the target disk resource and the configuration information to the task unit, so that the task unit determines a target disk address of the target disk resource based on the original disk address and the configuration information, and accesses the target disk resource based on the target disk address.

[0006] According to another aspect of an embodiment of the present application, a resource scheduling method is also provided, applied to a task unit, and the method comprises: sending a resource allocation request to a scheduling system, and receiving an original disk address and configuration information of a target disk resource synchronized by the scheduling system, wherein the target disk resource is a disk resource allocated by the scheduling system for the task unit from at least one disk resource, the configuration information contains a mapping relationship between an original disk address of the at least one disk resource and identification information of the at least one disk resource, and the original disk address is used to represent a disk address of the at least one disk resource in an initialization process; determining a target disk address of the target disk resource based on the original disk address and the configuration information; and accessing the target disk resource based on the target disk address.

[0007] According to another aspect of the embodiments of this application, a resource scheduling system is also provided, including: a task unit for sending a resource allocation request; a worker node for providing at least one disk resource; and a scheduling system connected to the task unit and the worker node, for allocating a target disk resource to the task unit from the at least one disk resource, and synchronizing the original disk address of the target disk resource and the configuration information of the at least one disk resource to the task unit, wherein the configuration information includes a mapping relationship between the original disk address of the at least one disk resource and the identification information of the at least one disk resource, and the original disk address is used to characterize the disk address of the at least one disk resource during the initialization process; the task unit is also used to determine the target disk address of the target disk resource based on the original disk address and the configuration information, and access the target disk resource based on the target disk address.

[0008] According to another aspect of the embodiments of this application, a resource scheduling apparatus is also provided, disposed in a scheduling system. The apparatus includes: an allocation module, configured to allocate a target disk resource to a task unit from at least one disk resource upon receiving a resource allocation request sent by a task unit; an acquisition module, configured to acquire configuration information of at least one disk resource, wherein the configuration information includes a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, the original disk address being used to characterize the disk address of at least one disk resource during the initialization process; and a synchronization module, configured to synchronize the original disk address and configuration information of the target disk resource to the task unit, so that the task unit determines the target disk address of the target disk resource based on the original disk address and configuration information, and accesses the target disk resource based on the target disk address.

[0009] According to another aspect of the embodiments of this application, a resource scheduling device is also provided, disposed in a task unit. The device includes: a communication module, configured to send a resource allocation request to a scheduling system and receive the original disk address and configuration information of a target disk resource synchronized by the scheduling system, wherein the target disk resource is a disk resource allocated to the task unit by the scheduling system from at least one disk resource, and the configuration information includes a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, and the original disk address is used to characterize the disk address of at least one disk resource during the initialization process; a determination module, configured to determine the target disk address of the target disk resource based on the original disk address and the configuration information; and an access module, configured to access the target disk resource based on the target disk address.

[0010] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0011] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0012] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0013] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.

[0014] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.

[0015] In this embodiment, upon receiving a resource allocation request from a task unit, a target disk resource is allocated to the task unit from at least one disk resource. Configuration information of the at least one disk resource is obtained, and the original disk address and configuration information of the target disk resource are synchronized to the task unit. This allows the task unit to determine the target disk address of the target disk resource based on the original disk address and configuration information, and access the target disk resource based on the target disk address. It is noteworthy that after allocating the target disk resource, the scheduling system synchronizes the original disk address and configuration information of the target disk resource to the task unit. Therefore, when using the disk resource, the task unit can determine the target disk address based on the original disk address and configuration information, thus restoring the true disk address of the target disk resource. This allows successful access to the target disk resource based on the target disk address, preventing disk drift and improving the success rate of disk resource access, thereby increasing the success rate of task execution and solving the technical problem of task execution failure due to disk drift.

[0016] It is worth noting that the general description above and the detailed description that follow are merely for illustrative purposes and do not constitute a limitation on this application. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a resource scheduling method according to an embodiment of this application;

[0019] Figure 2 This is a schematic diagram of a computer terminal as a computing node in a computing environment according to an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of a computer terminal serving as a service mesh according to an embodiment of this application;

[0021] Figure 4 This is a flowchart of the resource scheduling method according to Embodiment 1 of this application;

[0022] Figure 5 This is a schematic diagram of an optional hard disk resource allocation method according to an embodiment of this application;

[0023] Figure 6 This is a flowchart of the resource scheduling method according to Embodiment 2 of this application;

[0024] Figure 7 This is a schematic diagram of an optional hard disk resource access method according to an embodiment of this application;

[0025] Figure 8 This is a schematic diagram of a resource scheduling device according to Embodiment 3 of this application;

[0026] Figure 9 This is a schematic diagram of a resource scheduling device according to Embodiment 4 of this application;

[0027] Figure 10 This is a schematic diagram of a resource scheduling system according to an embodiment of this application;

[0028] Figure 11 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0032] Disk drift: The dev address of a disk resource has changed, making the disk inaccessible via a previously known path.

[0033] Disk unique identifier: A unique identifier for a disk, such as SN (Serial Number) or PCI (Peripheral Component Interconnect) address.

[0034] Snapshot: A method of recording and saving information at a specific moment for various purposes such as data protection, analysis, recovery, and decision support.

[0035] Example 1

[0036] According to an embodiment of this application, a resource scheduling method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0037] The method embodiment provided in Embodiment 1 of this application can be executed in a mobile terminal, computer terminal, server or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a resource scheduling method is shown. Figure 1As shown, the computer terminal 10 may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also 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 a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0038] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the method in the above embodiments. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0041] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10.

[0042] Figure 1 The hardware structure block diagram shown can serve not only as an exemplary block diagram of the computer terminal 10 described above, but also as an exemplary block diagram of the server described above. In one optional embodiment, Figure 2 The use of the above is illustrated in a block diagram. Figure 1 The computer terminal 10 shown is an embodiment of a computing node in computing environment 201. Figure 2 A block diagram of a computing environment is shown, such as Figure 2 As shown, computing environment 201 includes multiple computing nodes (such as servers) running on a distributed network (represented as 210-1, 210-2, ..., in the diagram). Each computing node contains local processing and memory resources, and end user 202 can remotely run applications or store data within computing environment 201. Applications can be provided as multiple services 220-1, 220-2, 220-3, and 220-4 within computing environment 201, representing services "A", "D", "E", and "H", respectively.

[0043] End user 202 can provide and access services through a web browser or other software application on a client. In some embodiments, the provisioning and / or requests of end user 202 can be provided to ingress gateway 230. Ingress gateway 230 may include a corresponding agent to handle the provisioning and / or requests for services (one or more services provided in computing environment 201).

[0044] Services are provided or deployed based on various virtualization technologies supported by the computing environment 201. In some embodiments, services may be provided based on virtual machine (VM)-based virtualization, container-based virtualization, and / or similar methods. VM-based virtualization can simulate a real computer by initializing a virtual machine, executing programs and applications without directly accessing any actual hardware resources. While the machine is virtualized by a virtual machine, container-based virtualization can launch containers to virtualize an entire operating system (OS), allowing multiple workloads to run on a single OS instance.

[0045] In one embodiment based on container virtualization, several containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). For example, such as Figure 2 As shown, service 220-2 can be equipped with one or more Pods 240-1, 240-2, ..., 240-N (collectively referred to as Pods). A Pod can include a proxy 245 and one or more containers 242-1, 242-2, ..., 242-M (collectively referred to as containers). One or more containers within a Pod handle requests related to one or more corresponding functions of the service. Proxy 245 typically controls service-related network functions such as routing and load balancing. Other services can also be equipped with similar Pods.

[0046] During operation, executing a user request from end user 202 may require invoking one or more services in computing environment 201, and executing one or more functions of one service may require invoking one or more functions of another service. For example... Figure 2 As shown, service "A" 220-1 receives user requests from terminal user 202 from ingress gateway 230. Service "A" 220-1 can call service "D" 220-2, and service "D" 220-2 can request service "E" 220-3 to perform one or more functions.

[0047] The aforementioned computing environment can be a cloud computing environment, where resource allocation is managed by cloud services, allowing functionality development without needing to consider implementation, adjustment, or server scaling. This computing environment allows developers to execute event-responsive code without building or maintaining complex infrastructure. Services can be partitioned into a set of functions that can automatically and independently scale, rather than scaling a single hardware device to handle potential loads.

[0048] In another alternative embodiment, Figure 3 The use of the above is illustrated in a block diagram. Figure 1 The computer terminal 10 (or mobile device) shown is an embodiment of a service mesh. Figure 3A block diagram of a service mesh structure is shown, such as Figure 3 As shown, the service mesh 300 is mainly used to facilitate secure and reliable communication between multiple microservices. Microservices refer to the decomposition of an application into multiple smaller services or instances, which are distributed across different clusters / machines.

[0049] like Figure 3 As shown, a microservice may include application service instance A and application service instance B, which together form the functional application layer of service mesh 300. In one implementation, application service instance A runs as a container / process 308 on machine / workload container group 314 (Pod), and application service instance B runs as a container / process 310 on machine / workload container group 316 (Pod).

[0050] In one implementation, application service instance A can be a product query service, and application service instance B can be a product order placement service.

[0051] like Figure 3 As shown, application service instance A and grid agent (sidecar) 303 coexist in machine workload container group 314, and application service instance B and grid agent 305 coexist in machine workload container 316. Grid agents 303 and 305 form the data plane layer of service mesh 300. Grid agents 303 and 305 run as containers / processes 304 and 306 respectively, and can receive requests 312 for product query services. Grid agent 303 and application service instance A can communicate bidirectionally, and grid agent 305 and application service instance B can also communicate bidirectionally. Furthermore, grid agents 303 and 305 can also communicate bidirectionally with each other.

[0052] In one implementation, traffic from application service instance A is routed to the appropriate destination via mesh proxy 303, and network traffic from application service instance B is routed to the appropriate destination via mesh proxy 305. It should be noted that the network traffic mentioned here includes, but is not limited to, Hypertext Transfer Protocol (HTTP), Representative State Transfer (REST), high-performance, general-purpose open-source frameworks (Google Remote Procedure Call, gRPC), and open-source in-memory data structure storage systems (Redis).

[0053] In one implementation, the functionality of the extended data plane layer can be achieved by writing custom filters for the agents (Envoy) in service mesh 300. The service mesh agent configuration can enable the service mesh to correctly proxy service traffic, achieving service interoperability and service governance. Mesh agents 303 and 305 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.

[0054] like Figure 3 As shown, the service mesh 300 also includes a control plane layer. This control plane layer can consist of a set of services running in a dedicated namespace, hosted by a managed control plane component 301 within machine / workload container groups (machine / Pods) 302. Figure 3 As shown, the managed control plane component 301 communicates bidirectionally with grid agents 303 and 305. The managed control plane component 301 is configured to perform several control and management functions. For example, the managed control plane component 301 receives telemetry data transmitted by grid agents 303 and 305 and can further aggregate this telemetry data. In addition to these services, the managed control plane component 301 can also provide a user-facing Application Programming Interface (API) to facilitate easier manipulation of network behavior and to provide configuration data to grid agents 303 and 305.

[0055] Under the aforementioned operating environment, this application provides the following: Figure 4 The resource scheduling method shown. Figure 4 This is a flowchart of the resource scheduling method according to Embodiment 1 of this application. Figure 4 As shown, this method is applied to a scheduling system and may specifically include the following steps:

[0056] Step S402: Upon receiving a resource allocation request from a task unit, allocate target disk resources to the task unit from at least one disk resource.

[0057] The aforementioned scheduling system can be a device in a distributed cluster that manages and coordinates other nodes, responsible for advanced management functions such as task scheduling, resource allocation, and system monitoring. The aforementioned task unit can be a device or container in the distributed cluster responsible for executing specific tasks, typically with specific execution requirements, such as a need for computing resources. The aforementioned resource allocation request can be a request for the allocation of computing resources required for task execution, determined by the task's execution requirements. The aforementioned at least one disk resource can be an idle resource provided by a worker node in the distributed cluster. Here, a worker node can be a server or virtual machine in the distributed cluster that provides computing, storage, and network resources; it can also be referred to as a host machine.

[0058] In one optional embodiment, when a task unit receives a task, it can determine the required computing resources, particularly disk resources, based on the task, and then generate a corresponding resource allocation request, which is then sent to the scheduling system. Upon receiving the resource allocation request, the scheduling system can select a disk resource matching the request from at least one available disk resource in the distributed cluster, and use this target disk resource.

[0059] Step S404: Obtain configuration information for at least one disk resource, wherein the configuration information includes a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, and the original disk address is used to characterize the disk address of at least one disk resource during the initialization process.

[0060] The aforementioned original disk address can be the disk address of at least one disk resource during the initialization process, that is, the original dev address of the target disk resource. This dev address will change when the disk floats. The aforementioned identification information can be a unique identifier of the disk resource, such as SN, PCI address, etc. In this embodiment, the identification information is SN as an example for detailed explanation.

[0061] In one optional embodiment, since disk drift causes a change in the disk's dev address, to prevent task execution failure due to disk drift, the mapping relationship between the original dev address of the disk resource and its unique identifier sn can be obtained. This allows the new dev address of the changed disk resource to be determined based on the unique identifier sn. It should be noted that, to prevent configuration information from being tampered with, configuration information can be recorded using snapshots.

[0062] Step S406: Synchronize the original disk address and configuration information of the target disk resource to the task unit, so that the task unit can determine the target disk address of the target disk resource based on the original disk address and configuration information, and access the target disk resource based on the target disk address.

[0063] In one optional embodiment, the scheduling system can synchronize the original dev address and configuration information of the target disk resource to the task unit, so that when the task unit executes the task, it can recover the new dev address of the target disk resource based on the configuration information and the original dev address, thereby accessing the target disk resource based on the new dev address and ensuring that the task execution will not fail.

[0064] The following is combined Figure 5 A preferred embodiment of this application will be described in detail below. For example... Figure 5 As shown, a task can contain two Pods, Pod1 and Pod2. The scheduling system can allocate resources. Idle hosts can contain multiple hard disk resources with dev addresses of / dev / nvme01, / dev / nvme02, / dev / nvme, etc. The scheduling system receives resource allocation requests from the two Pods. Pod1 requests two hard disk resources, while Pod2 requests one. Therefore, the scheduling system can allocate idle hosts for both Pods and allocate hard disk resources 1 and 2 from the idle hosts to Pod1, with dev addresses of / dev / nvme01 and / dev / nvme02 respectively. It can also allocate hard disk resource 3 from the idle hosts to Pod2, with a dev address of / dev / nvme03. To prevent disk drift, an additional step can be added to the existing protocol: the scheduling system can generate a real-time mapping between dev addresses and sns (sn.sn.) as the configuration information mentioned above and synchronize it to both Pods.

[0065] The solution provided by the above embodiments of this application, upon receiving a resource allocation request from a task unit, allocates a target disk resource to the task unit from at least one disk resource, obtains the configuration information of at least one disk resource, and synchronizes the original disk address and configuration information of the target disk resource to the task unit. This allows the task unit to determine the target disk address of the target disk resource based on the original disk address and configuration information, and access the target disk resource based on the target disk address. It is noteworthy that after allocating the target disk resource, the scheduling system synchronizes the original disk address and configuration information of the target disk resource to the task unit. Therefore, when using the disk resource, the task unit can determine the target disk address based on the original disk address and configuration information, thus restoring the true disk address of the target disk resource. This allows successful access to the target disk resource based on the target disk address, preventing disk drift and improving the success rate of disk resource access, thereby further improving the success rate of task execution. Ultimately, this solves the technical problem of task execution failure caused by disk drift.

[0066] In the above embodiments of this application, before receiving the resource allocation request sent by the task unit, the method further includes: obtaining the identification information of at least one disk resource and the original disk address of at least one disk resource; determining the mapping relationship between the identification information and the original disk address; and generating configuration information based on the mapping relationship.

[0067] In an optional embodiment, the mapping relationship between the dev address and sn of different disks in the worker node can be recorded during initialization of any worker node, that is, during single-machine initialization, thereby generating the above-mentioned configuration information.

[0068] In the above embodiments of this application, generating configuration information based on mapping relationships includes: determining whether at least one disk resource can be accessed normally based on the original disk address of at least one disk resource; and generating configuration information based on mapping relationships when it is determined that at least one disk resource can be accessed normally.

[0069] In one alternative embodiment, it can be determined that disk resources have not experienced disk drift by checking whether / dev / nvme* is arranged in an orderly manner and without any missing numbers. If / dev / nvme* is arranged in an orderly manner and without any missing numbers, such as nvme0, nvme1, ..., nvme11, etc., it can be determined that disk resources have not experienced disk drift. Furthermore, the mapping relationship between the dev address and sn of different disks can be recorded in a fixed local directory, such as / var / disk / meta.conf.

[0070] In the above embodiments of this application, if it is determined that at least one disk resource has not been accessed, the working node that owns at least one disk resource is restarted.

[0071] In one alternative embodiment, if / dev / nvme* is not ordered or contains missing numbers, it can be determined that disk resources have drifted. To further avoid the impact of disk drift, the worker node can be restarted. Usually, a device restart will not cause disk drift.

[0072] In the above embodiments of this application, synchronizing configuration information to the task unit includes: generating an allocation snapshot corresponding to the configuration information; storing the allocation snapshot in the target directory on the local machine of the scheduling system; and sharing the target directory with the task unit.

[0073] The target directory mentioned above can be a directory located locally on the scheduling system, used to store allocated snapshots, and shared with all task units. For example, it could be / var / disk / , but it is not limited to this.

[0074] In an optional embodiment, during the disk resource allocation process by the scheduling system, an allocation snapshot can be generated based on the mapping relationship between the disk's dev address and its sn, and stored in " / var / disk / meta.conf_alloc". This ensures that the sn of the disk resource corresponding to the dev address allocated by the existing protocol has been recorded. It should be noted that, to implement the above technical solution, the scheduling system can share the directory / var / disk / with all pods.

[0075] In the above embodiments of this application, after synchronizing the original disk address and configuration information of the target disk resource to the task unit, the method further includes: obtaining the current disk address of at least one disk resource in real time, wherein the current disk address is used to represent the disk address that normally accesses at least one disk resource; generating a real-time disk list based on the mapping relationship between the current disk address and the identification information; and synchronizing the real-time disk list to the task unit so that the task unit can determine the target disk address based on the real-time disk list.

[0076] The aforementioned current disk address may be the actual dev address of the disk resource when the scheduling system allocates disk resources. This dev address may or may not change relative to the original dev address at the time of initialization.

[0077] In one optional embodiment, during the disk resource allocation process by the scheduling system, the current dev address of the disk resource can be obtained in real time. Then, based on the mapping relationship between the current dev address and sn, a real-time disk list is generated. This disk list records the mapping relationship between the current dev address and sn of at least one disk unit. The scheduling system can synchronize this disk list to the task unit, so that the task unit can determine the original sn corresponding to the original dev address based on the mapping relationship between the original dev address and sn of the target disk resource, and then determine the target dev address corresponding to the original sn based on the mapping relationship between the current dev address and sn.

[0078] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0079] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0081] Example 2

[0082] According to an embodiment of this application, a resource scheduling method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0083] Figure 6 This is a flowchart of the resource scheduling method according to Embodiment 2 of this application. Figure 6 As shown, this method is applied to a task unit and may specifically include the following steps:

[0084] Step S602: Send a resource allocation request to the scheduling system and receive the original disk address and configuration information of the target disk resource synchronized by the scheduling system. The target disk resource is the disk resource allocated by the scheduling system to the task unit from at least one disk resource. The configuration information contains the mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource. The original disk address is used to represent the disk address of at least one disk resource during the initialization process.

[0085] Step S604: Determine the target disk address of the target disk resource based on the original disk address and configuration information.

[0086] Step S606: Access the target disk resource based on the target disk address.

[0087] The solution provided in the above embodiments of this application sends a resource allocation request to the scheduling system and receives the original disk address and configuration information of the target disk resource synchronized by the scheduling system. Based on the original disk address and configuration information, the target disk address of the target disk resource is determined, and the target disk resource is accessed based on the target disk address. It is noteworthy that after allocating the target disk resource, the scheduling system synchronizes the original disk address and configuration information of the target disk resource to the task unit. Therefore, when the task unit uses the disk resource, it can determine the target disk address of the target disk resource based on the original disk address and configuration information, thus restoring the true disk address of the target disk resource. This allows successful access to the target disk resource based on the target disk address, preventing disk drift and improving the success rate of disk resource access, thereby further improving the success rate of task execution. This solves the technical problem of task execution failure caused by disk drift.

[0088] In the above embodiments of this application, determining the target disk address of a target disk resource based on the original disk address and configuration information includes: obtaining a real-time disk list synchronized by a scheduling system, wherein the real-time disk list stores a mapping relationship between the current disk address and identification information of at least one disk resource, and the current disk address is the disk address of at least one disk resource obtained in real time; obtaining identification information that has a mapping relationship with the original disk address from the configuration information to obtain target identification information; and obtaining the disk address that has a mapping relationship with the target identification information from the real-time disk list to obtain the target disk address.

[0089] In the above embodiments of this application, receiving configuration information synchronized by the scheduling system includes: receiving the target directory synchronized by the scheduling system, wherein the target directory is a local directory of the scheduling system; and obtaining the allocation snapshot corresponding to the configuration information from the target directory.

[0090] The following is combined Figure 7 A preferred embodiment of this application will be described in detail below. For example... Figure 7 As shown, after receiving the original dev address of the target disk resource synchronized by the scheduling system, the task obtains the allocation snapshot corresponding to the configuration information from the target directory, and determines the original sn corresponding to the original dev address based on the configuration information recorded in the allocation snapshot. Then, it determines the disk address corresponding to the original sn from the real-time disk list obtained in real time, and obtains the target dev address, that is, the real dev address of the target disk resource. Thus, the target disk resource can be accessed based on the real dev address.

[0091] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0092] Example 3

[0093] According to an embodiment of this application, a resource scheduling apparatus for implementing the above-described resource scheduling method is also provided, which is installed in a scheduling system, such as... Figure 8 As shown, the device 800 includes: an allocation module 802, a first acquisition module 804, and a first synchronization module 806.

[0094] The allocation module 802 is used to allocate a target disk resource to the task unit from at least one disk resource upon receiving a resource allocation request sent by the task unit; the first acquisition module 804 is used to acquire configuration information of at least one disk resource, wherein the configuration information includes a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, and the original disk address is used to characterize the disk address of at least one disk resource during the initialization process; the first synchronization module 806 is used to synchronize the original disk address and configuration information of the target disk resource to the task unit, so that the task unit can determine the target disk address of the target disk resource based on the original disk address and configuration information, and access the target disk resource based on the target disk address.

[0095] It should be noted that the allocation module 802, the first acquisition module 804, and the first synchronization module 806 mentioned above correspond to steps S402 to S406 in Embodiment 1. The three modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0096] In the above embodiments of this application, the device further includes: a second acquisition module, a determination module, and a first generation module.

[0097] The second acquisition module is used to acquire the identification information of at least one disk resource and the original disk address of at least one disk resource; the determination module is used to determine the mapping relationship between the identification information and the original disk address; and the generation module is used to generate configuration information based on the mapping relationship.

[0098] In the above embodiments of this application, the generation module includes: a determining unit and a first generation unit.

[0099] The determining unit is used to determine whether at least one disk resource has been accessed normally based on the original disk address of at least one disk resource; the first generating unit is used to generate configuration information based on the mapping relationship if it is determined that at least one disk resource has been accessed normally.

[0100] In the above embodiments of this application, the device further includes a restart module.

[0101] The restart module is used to restart a worker node that has at least one disk resource if it is determined that at least one disk resource has not been accessed.

[0102] In the above embodiments of this application, the synchronization module includes: a second generation unit, a storage unit, and a sharing unit.

[0103] The second generation unit is used to generate the allocation snapshot corresponding to the configuration information; the storage unit is used to store the allocation snapshot in the target directory on the local machine of the scheduling system; and the sharing unit is used to share the target directory with the task unit.

[0104] In the above embodiments of this application, the device further includes: a third acquisition module, a second generation module, and a second synchronization module.

[0105] The third acquisition module is used to acquire the current disk address of at least one disk resource in real time, wherein the current disk address is used to represent the disk address that can normally access at least one disk resource; the second generation module is used to generate a real-time disk list based on the mapping relationship between the current disk address and the identification information; the second synchronization module is used to synchronize the real-time disk list to the task unit so that the task unit can determine the target disk address based on the real-time disk list.

[0106] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0107] Example 4

[0108] According to an embodiment of this application, a resource scheduling device for implementing the above-described resource scheduling method is also provided, which is disposed in a task unit, such as... Figure 9 As shown, the device 900 includes: a communication module 902, a determination module 904, and an access module 906.

[0109] The communication module 902 is used to send a resource allocation request to the scheduling system and receive the original disk address and configuration information of the target disk resource synchronized by the scheduling system. The target disk resource is the disk resource allocated by the scheduling system to the task unit from at least one disk resource. The configuration information contains the mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource. The original disk address is used to represent the disk address of at least one disk resource during the initialization process. The determination module 904 is used to determine the target disk address of the target disk resource based on the original disk address and the configuration information. The access module 906 is used to access the target disk resource based on the target disk address.

[0110] It should be noted that the communication module 902, the determination module 904, and the access module 906 mentioned above correspond to steps S602 to S606 in Embodiment 2. The three modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of the device and run in the computer terminal 10 provided in Embodiment 1.

[0111] In the above embodiments of this application, the determining module includes: a first obtaining unit, a second obtaining unit, and a third obtaining unit.

[0112] The first acquisition unit is used to acquire a real-time disk list synchronized by the scheduling system. The real-time disk list stores a mapping relationship between the current disk address and identification information of at least one disk resource. The current disk address is the disk address of at least one disk resource acquired in real time. The second acquisition unit is used to acquire the identification information that has a mapping relationship with the original disk address from the configuration information to obtain the target identification information. The third acquisition unit is used to acquire the disk address that has a mapping relationship with the target identification information from the real-time disk list to obtain the target disk address.

[0113] In the above embodiments of this application, the communication module includes: a receiving unit and a fourth acquisition unit.

[0114] The receiving unit is used to receive the target directory synchronized by the scheduling system, wherein the target directory is a local directory of the scheduling system; the fourth obtaining unit is used to obtain the allocation snapshot corresponding to the configuration information from the target directory.

[0115] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0116] Example 5

[0117] According to embodiments of this application, a resource scheduling system is also provided, such as... Figure 10 As shown, the system includes:

[0118] Task unit 1002 is used to send resource allocation requests.

[0119] Worker node 1004 is used to provide at least one disk resource.

[0120] The scheduling system 1006 is connected to the task unit and the worker node. It is used to allocate target disk resources to the task unit from at least one disk resource and synchronize the original disk address of the target disk resource and the configuration information of at least one disk resource to the task unit. The configuration information contains a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource. The original disk address is used to represent the disk address of at least one disk resource during the initialization process.

[0121] The task unit is also used to determine the target disk address of the target disk resource based on the original disk address and configuration information, and to access the target disk resource based on the target disk address.

[0122] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0123] Example 6

[0124] Embodiments of this application may provide an electronic device, which may be any one of a group of electronic devices. Optionally, in this embodiment, the aforementioned electronic device may also be replaced by a terminal device such as a mobile terminal.

[0125] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0126] In this embodiment, the computer terminal described above can execute the program code in the method.

[0127] Optionally, Figure 11 This is a structural block diagram of an electronic device according to an embodiment of this application. As shown in the figure, the electronic device A may include: one or more (only one is shown in the figure) processors 1102, memory 1104, memory controller, and peripheral interfaces, wherein the peripheral interfaces are connected to a radio frequency module, an audio module, and a display.

[0128] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0129] The processor can invoke information and application programs stored in memory via a transmission device to perform the following steps: upon receiving a resource allocation request from a task unit, allocating a target disk resource for the task unit from at least one disk resource; obtaining configuration information of at least one disk resource, wherein the configuration information contains a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, the original disk address being used to characterize the disk address of at least one disk resource during the initialization process; synchronizing the original disk address and configuration information of the target disk resource to the task unit, so that the task unit determines the target disk address of the target disk resource based on the original disk address and configuration information, and accesses the target disk resource based on the target disk address.

[0130] Optionally, the processor may also execute program code that performs the following steps: obtaining identification information of at least one disk resource and the original disk address of at least one disk resource; determining the mapping relationship between the identification information and the original disk address; and generating configuration information based on the mapping relationship.

[0131] Optionally, the processor may also execute program code that performs the following steps: determining whether at least one disk resource is successfully accessed based on the original disk address of at least one disk resource; and generating configuration information based on the mapping relationship if it is determined that at least one disk resource is successfully accessed.

[0132] Optionally, the processor may also execute program code that performs the following steps: if it is determined that at least one disk resource has not been accessed, restart the worker node that has at least one disk resource.

[0133] Optionally, the processor may also execute program code that performs the following steps: generates an allocation snapshot corresponding to the configuration information; stores the allocation snapshot in the target directory on the local machine of the scheduling system; and shares the target directory with the task unit.

[0134] Optionally, the processor may also execute program code that performs the following steps: real-time acquisition of the current disk address of at least one disk resource, wherein the current disk address is used to represent the disk address that normally accesses at least one disk resource; generating a real-time disk list based on the mapping relationship between the current disk address and the identification information; and synchronizing the real-time disk list to the task unit so that the task unit can determine the target disk address based on the real-time disk list.

[0135] The processor can invoke information and application programs stored in memory via a transmission device to perform the following steps: sending a resource allocation request to the scheduling system and receiving the original disk address and configuration information of the target disk resource synchronized by the scheduling system, wherein the target disk resource is a disk resource allocated by the scheduling system to the task unit from at least one disk resource, and the configuration information contains a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, and the original disk address is used to characterize the disk address of at least one disk resource during the initialization process; determining the target disk address of the target disk resource based on the original disk address and the configuration information; and accessing the target disk resource based on the target disk address.

[0136] Optionally, the processor may also execute program code that performs the following steps: obtaining a real-time disk list synchronized by the scheduling system, wherein the real-time disk list stores a mapping relationship between the current disk address and identification information of at least one disk resource, and the current disk address is the disk address of at least one disk resource obtained in real time; obtaining identification information that has a mapping relationship with the original disk address from the configuration information to obtain target identification information; obtaining the disk address that has a mapping relationship with the target identification information from the real-time disk list to obtain the target disk address.

[0137] Optionally, the processor may also execute program code that performs the following steps: receiving a target directory synchronized by the scheduling system, wherein the target directory is a local directory of the scheduling system; and obtaining an allocation snapshot corresponding to the configuration information from the target directory.

[0138] This application provides a resource scheduling scheme. Upon receiving a resource allocation request from a task unit, a target disk resource is allocated to the task unit from at least one disk resource. Configuration information of the at least one disk resource is obtained, and the original disk address and configuration information of the target disk resource are synchronized to the task unit. This allows the task unit to determine the target disk address of the target disk resource based on the original disk address and configuration information, and access the target disk resource based on the target disk address. It is noteworthy that after allocating the target disk resource, the scheduling system synchronizes the original disk address and configuration information of the target disk resource to the task unit. Therefore, when using the disk resource, the task unit can determine the target disk address based on the original disk address and configuration information, thus restoring the true disk address of the target disk resource. This allows successful access to the target disk resource based on the target disk address, preventing disk drift and improving the success rate of disk resource access, thereby increasing the success rate of task execution and solving the technical problem of task execution failure caused by disk drift.

[0139] Those skilled in the art will understand that, Figure 11 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. This diagram does not limit the structure of the aforementioned electronic devices. For example, electronic device A may include more or fewer components (such as network interfaces, display devices, etc.) than shown in the diagram, or may have a different configuration than shown in the diagram.

[0140] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0141] Example 7

[0142] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store program code executed by the method provided in the above embodiments.

[0143] Optionally, in this embodiment, the storage medium may be located in any one of the electronic devices in the group of electronic devices in the computer network, or in any one of the mobile terminals in the group of mobile terminals.

[0144] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: upon receiving a resource allocation request sent by a task unit, allocating a target disk resource to the task unit from at least one disk resource; obtaining configuration information of at least one disk resource, wherein the configuration information includes a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, the original disk address being used to characterize the disk address of at least one disk resource during the initialization process; synchronizing the original disk address and configuration information of the target disk resource to the task unit, so that the task unit determines the target disk address of the target disk resource based on the original disk address and configuration information, and accesses the target disk resource based on the target disk address.

[0145] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: obtaining identification information of at least one disk resource and the original disk address of at least one disk resource; determining a mapping relationship between the identification information and the original disk address; and generating configuration information based on the mapping relationship.

[0146] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: determining whether at least one disk resource is normally accessible based on the original disk address of at least one disk resource; and generating configuration information based on the mapping relationship if it is determined that at least one disk resource is normally accessible.

[0147] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: restarting a worker node that owns at least one disk resource if it is determined that at least one disk resource has not been accessed.

[0148] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: generating an allocation snapshot corresponding to the configuration information; storing the allocation snapshot in a target directory local to the scheduling system; and sharing the target directory with the task unit.

[0149] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: obtaining the current disk address of at least one disk resource in real time, wherein the current disk address is used to characterize the disk address that normally accesses at least one disk resource; generating a real-time disk list based on the mapping relationship between the current disk address and identification information; and synchronizing the real-time disk list to the task unit so that the task unit determines the target disk address based on the real-time disk list.

[0150] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: sending a resource allocation request to the scheduling system and receiving the original disk address and configuration information of the target disk resource synchronized by the scheduling system, wherein the target disk resource is a disk resource allocated by the scheduling system to the task unit from at least one disk resource, the configuration information contains a mapping relationship between the original disk address of at least one disk resource and the identification information of at least one disk resource, and the original disk address is used to characterize the disk address of at least one disk resource during the initialization process; determining the target disk address of the target disk resource based on the original disk address and the configuration information; and accessing the target disk resource based on the target disk address.

[0151] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: obtaining a real-time disk list synchronized by a scheduling system, wherein the real-time disk list stores a mapping relationship between the current disk address and identification information of at least one disk resource, the current disk address being the disk address of at least one disk resource obtained in real time; obtaining identification information that has a mapping relationship with the original disk address from configuration information to obtain target identification information; obtaining the disk address that has a mapping relationship with the target identification information from the real-time disk list to obtain the target disk address.

[0152] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: receiving a target directory synchronized by the scheduling system, wherein the target directory is a local directory of the scheduling system; and obtaining an allocation snapshot corresponding to the configuration information from the target directory.

[0153] Example 8

[0154] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product may include a computer program that, when executed by a processor, implements the methods provided in the embodiments described above.

[0155] Example 9

[0156] Embodiments of this application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which can be used to store a computer program that, when executed by a processor, implements the method provided in the above embodiments.

[0157] Example 10

[0158] Embodiments of this application also provide a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it implements the method provided in the above embodiments.

[0159] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0160] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0161] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0162] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0163] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0164] If the integrated unit is implemented as 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 prior art, or all or part of the 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 cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0165] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A resource scheduling method, characterized in that, Applied to a scheduling system, the method includes: Upon receiving a resource allocation request from a task unit, a target disk resource is allocated to the task unit from at least one disk resource. Obtain configuration information of the at least one disk resource, wherein the configuration information includes a mapping relationship between the original disk address of the at least one disk resource and the identification information of the at least one disk resource, and the original disk address is used to characterize the disk address of the at least one disk resource during the initialization process; The original disk address of the target disk resource and the configuration information are synchronized to the task unit, so that the task unit can determine the target disk address of the target disk resource based on the original disk address and the configuration information, and access the target disk resource based on the target disk address.

2. The method according to claim 1, characterized in that, Before receiving a resource allocation request from a task unit, the method further includes: Obtain the identification information of the at least one disk resource, and the original disk address of the at least one disk resource; Determine the mapping relationship between the identification information and the original disk address; The configuration information is generated based on the mapping relationship.

3. The method according to claim 2, characterized in that, The process of generating the configuration information based on the mapping relationship includes: Based on the original disk address of the at least one disk resource, determine whether the at least one disk resource can be accessed normally; If it is determined that normal access to the at least one disk resource is possible, the configuration information is generated based on the mapping relationship.

4. The method according to claim 3, characterized in that, If it is determined that the at least one disk resource has not been accessed, restart the worker node that owns the at least one disk resource.

5. The method according to claim 1, characterized in that, The step of synchronizing the configuration information to the task unit includes: Generate the allocation snapshot corresponding to the configuration information; The allocation snapshot is stored in the target directory local to the scheduling system. Share the target directory with the task unit.

6. The method according to any one of claims 1 to 5, characterized in that, After synchronizing the original disk address of the target disk resource and the configuration information to the task unit, the method further includes: The current disk address of the at least one disk resource is obtained in real time, wherein the current disk address is used to represent the disk address that normally accesses the at least one disk resource; A real-time disk list is generated based on the mapping relationship between the current disk address and the identification information; The real-time disk list is synchronized to the task unit so that the task unit can determine the target disk address based on the real-time disk list.

7. A resource scheduling method, characterized in that, Applied to a task unit, the method includes: Send a resource allocation request to the scheduling system and receive the original disk address and configuration information of the target disk resource synchronized by the scheduling system. The target disk resource is the disk resource allocated by the scheduling system to the task unit from at least one disk resource. The configuration information contains the mapping relationship between the original disk address of the at least one disk resource and the identification information of the at least one disk resource. The original disk address is used to represent the disk address of the at least one disk resource during the initialization process. The target disk address of the target disk resource is determined based on the original disk address and the configuration information. Access the target disk resources based on the target disk address.

8. The method according to claim 7, characterized in that, Determining the target disk address of the target disk resource based on the original disk address and the configuration information includes: Obtain the real-time disk list synchronized by the scheduling system, wherein the real-time disk list stores the mapping relationship between the current disk address of the at least one disk resource and the identification information, and the current disk address is the disk address of the at least one disk resource obtained in real time; Obtain the identification information that has a mapping relationship with the original disk address from the configuration information to obtain the target identification information; The target disk address is obtained by retrieving the disk address that has a mapping relationship with the target identifier information from the real-time disk list.

9. The method according to claim 7, characterized in that, The step of receiving the configuration information synchronized by the scheduling system includes: Receive the target directory synchronized by the scheduling system, wherein the target directory is a local directory of the scheduling system; Obtain the allocation snapshot corresponding to the configuration information from the target directory.

10. A resource scheduling system, characterized in that, include: Task unit, used to send resource allocation requests; A worker node is used to provide at least one disk resource; A scheduling system, connected to the task unit and the worker node, is used to allocate target disk resources to the task unit from the at least one disk resource, and synchronize the original disk address of the target disk resource and the configuration information of the at least one disk resource to the task unit. The configuration information includes a mapping relationship between the original disk address of the at least one disk resource and the identification information of the at least one disk resource. The original disk address is used to represent the disk address of the at least one disk resource during the initialization process. The task unit is further configured to determine the target disk address of the target disk resource based on the original disk address and the configuration information, and access the target disk resource based on the target disk address.

11. The system according to claim 10, characterized in that, The scheduling system is also used to obtain the current disk address of the at least one disk resource in real time, and generate a real-time disk list based on the mapping relationship between the current disk address and the identification information; The task unit is further configured to obtain identification information that has a mapping relationship with the original disk address from the configuration information to obtain target identification information, and obtain the disk address that has a mapping relationship with the target identification information from the real-time disk list to obtain the target disk address.

12. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 9.

14. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 9.