CN112148497A - Disk resource management method and device and electronic equipment - Google Patents

Disk resource management method and device and electronic equipment Download PDF

Info

Publication number
CN112148497A
CN112148497A CN202011085350.4A CN202011085350A CN112148497A CN 112148497 A CN112148497 A CN 112148497A CN 202011085350 A CN202011085350 A CN 202011085350A CN 112148497 A CN112148497 A CN 112148497A
Authority
CN
China
Prior art keywords
disk
node
target
resources
disk resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011085350.4A
Other languages
Chinese (zh)
Inventor
陶尚虎
杨博
董嘉华
乔飞
刘晓东
徐坤
张友平
邵杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Cloud Cabinet Network Technology Co ltd
Original Assignee
Jiangsu Cloudbox Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Cloudbox Network Technology Co ltd filed Critical Jiangsu Cloudbox Network Technology Co ltd
Priority to CN202011085350.4A priority Critical patent/CN112148497A/en
Publication of CN112148497A publication Critical patent/CN112148497A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure provides a disk resource management method, a disk resource management device and electronic equipment, belonging to the technical field of electricity, and specifically comprising the following steps: when receiving an operation request aiming at a target program, acquiring an operation disk resource corresponding to the operation of the target program; inquiring a preset node with the allocable disk resources larger than the operating disk resources from the database as an initial node; screening all the initial nodes to obtain the target nodes; and allocating target disk resources corresponding to the size of the running disk resources in the target node to the target program. By the scheme, the nodes meeting the running conditions of the target program in the disk are simultaneously inquired, and the nodes with the most meeting disk resource size are selected through screening to distribute the disk resource, so that the distribution efficiency and the resource utilization rate of disk resource management are improved.

Description

Disk resource management method and device and electronic equipment
Technical Field
The present disclosure relates to the field of electrical technologies, and in particular, to a method and an apparatus for managing disk resources, and an electronic device.
Background
At present, along with the rapid development of the internet of things technology, the intelligent express cabinet is a new thing which is continuously developed along with express business. The intelligent express cabinet system serves as a service end of an express terminal, provides data services such as user authentication, configuration, scheduling, monitoring and operation logs, serves as a system for continuously providing services for 24 hours and using the services at high frequency, and needs to monitor the occupied state of disk resources in real time. However, the existing disk resource management method can only manage the whole resources of the disk, and the allocation is suspended when the disk is in an occupied state, which causes resource waste and system rushing due to unbalanced allocation.
Therefore, the existing disk resource management method has the problems of low allocation efficiency and low resource utilization rate.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method and an apparatus for managing disk resources, and an electronic device, which at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides a disk resource management method, including:
when receiving an operation request aiming at a target program, acquiring an operation disk resource corresponding to the operation of the target program;
inquiring a preset node with the allocable disk resources larger than the operating disk resources from the database as an initial node;
screening all the initial nodes to obtain the target nodes;
and allocating target disk resources corresponding to the size of the running disk resources in the target node to the target program.
According to a specific implementation manner of the embodiment of the present disclosure, the step of obtaining the running disk resource corresponding to the running of the target program includes:
inquiring a configuration file corresponding to the target program;
and reading the configuration file to obtain the running disk resource.
According to a specific implementation manner of the embodiment of the present disclosure, the step of querying, from a database, a preset node, where allocable disk resources are larger than the operational disk resources, as an initial node includes:
acquiring allocable disk resources of all the preset nodes;
judging whether the distributable disk resources of the preset node are greater than or equal to the running disk resources or not;
if the distributable disk resources of the preset node are greater than or equal to the running disk resources, taking the preset node as the initial node;
and if the assignable disk resources of the preset node are smaller than the running disk resources, forbidding the preset node to be used as the initial node.
According to a specific implementation manner of the embodiment of the present disclosure, the step of screening all the initial nodes to obtain the target node includes:
judging whether the number of the initial nodes is greater than or equal to a threshold value, wherein the threshold value is a positive integer greater than 5;
if the number of the initial nodes is larger than or equal to a threshold value, screening out the initial nodes corresponding to the highest value of the allocable disk resources and the lowest value of the allocable disk resources, and randomly selecting one initial node from the rest initial nodes as the target node;
and if the number of the initial nodes is smaller than a threshold value, randomly selecting one initial node from all the initial nodes as the target node.
According to a specific implementation manner of the embodiment of the present disclosure, after the step of allocating the target disk resource corresponding to the size of the running disk resource in the target node to the target program, the method further includes:
updating the disk resource information of the target node;
and sending the disk resource information to the database.
According to a specific implementation manner of the embodiment of the present disclosure, the step of updating the disk resource information corresponding to the allocable disk resource of the target node includes:
marking the target disk resource as occupying the disk resource;
calculating parameters of occupied disk resources and parameters of allocable disk resources in the target node;
and taking the parameters of the occupied disk resources and the parameters of the allocable disk resources as the disk resource information.
In a second aspect, an embodiment of the present disclosure provides a disk resource management device, including:
the acquisition module is used for acquiring corresponding running disk resources when a target program is run when receiving a running request aiming at the target program;
the query module is used for querying a preset node, as an initial node, of which the assignable disk resources are larger than the operating disk resources from the database;
the screening module is used for screening all the initial nodes to obtain the target nodes;
and the allocation module is used for allocating target disk resources corresponding to the size of the running disk resources in the target node for the target program.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining module is further configured to:
inquiring a configuration file corresponding to the target program;
and reading the configuration file to obtain the running disk resource.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the disk resource management method of the first aspect or any implementation manner of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the disk resource management method in the foregoing first aspect or any implementation manner of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the disk resource management method in the foregoing first aspect or any implementation manner of the first aspect.
The disk resource management scheme in the embodiment of the disclosure includes: when receiving an operation request aiming at a target program, acquiring an operation disk resource corresponding to the operation of the target program; inquiring a preset node with the allocable disk resources larger than the operating disk resources from the database as an initial node; screening all the initial nodes to obtain the target nodes; and allocating target disk resources corresponding to the size of the running disk resources in the target node to the target program. By the scheme, the nodes meeting the running conditions of the target program in the disk are simultaneously inquired, and the nodes with the most meeting disk resource size are selected through screening to distribute the disk resource, so that the distribution efficiency and the resource utilization rate of disk resource management are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a disk resource management method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another disk resource management method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a disk resource management device according to an embodiment of the present disclosure;
fig. 4 is a schematic view of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
At present, along with the rapid development of the internet of things technology, the intelligent express cabinet is a new thing which is continuously developed along with express business. The intelligent express cabinet system serves as a service end of an express terminal, provides data services such as user authentication, configuration, scheduling, monitoring and operation logs, serves as a system for continuously providing services for 24 hours and using the services at high frequency, and needs to monitor the occupied state of disk resources in real time. However, the existing disk resource management method can only manage the whole resources of the disk, and the allocation is suspended when the disk is in an occupied state, which causes a problem of resource waste.
For example, in the application of an intelligent express cabinet system, the intelligent express cabinet mainly has the function of assisting a courier to send and receive express, and the facing users are vast couriers and recipients. As a 24-hour unattended express temporary storage cabinet, the intelligent express cabinet interacts with a server through an Internet of things card and is used as an application of the Internet of things technology in the modern logistics industry, the intelligent express cabinet is the most effective solution for the last kilometer of electronic commerce terminal logistics, the delivery efficiency of couriers is improved, the delivery cost is reduced, the privacy and the safety of users are guaranteed, and the intelligent express cabinet is gradually and widely recognized and popularized. However, most of the micro services are operated based on a container technology at present, and the control of hardware resources is basically centralized on the level of a CPU and a memory, and the disk index of the server is not considered. All the microservices running on the server need to use the disk, and in some cases, a certain microservices container needs to occupy a large amount of disk and last for a while, which will cause the following failures: firstly, because a system disk is occupied for a long time, other micro-service containers in the server cannot use the disk, so that other micro-service containers in the server cannot normally provide services; secondly, the host operating system cannot normally operate disk data because the server disk is completely occupied, so that the host operating system is abnormal in operation and even crashed.
The embodiment of the disclosure provides a disk resource management method, which can be applied to a disk resource allocation process in an intelligent express cabinet or an electronic warehousing scene.
Referring to fig. 1, a flowchart of a disk resource management method provided in the embodiment of the present disclosure is schematically shown. As shown in fig. 1, the method mainly comprises the following steps:
s101, when receiving an operation request aiming at a target program, acquiring a corresponding operation disk resource when the target program is operated;
in a specific implementation, in a monitoring scene of an intelligent express cabinet, when a certain express cabinet needs to be monitored in real time, a corresponding operation request of a target program is sent out, and when an electronic device receives the operation request of the target program, parameters of a corresponding operation disk resource when the target program is operated can be obtained in advance, so that a next operation flow is determined. Of course, the parameters of the running disk resources may also be stored in a preset storage area after the parameters of the running disk resources are acquired, so as to process a plurality of the target programs at the same time.
S102, inquiring a preset node with the allocable disk resource larger than the running disk resource from a database as an initial node;
the database may correspondingly store resource data of all the initial nodes, and after the parameters of the operating disk resources are obtained, a preset node, where allocable disk resources are larger than the operating disk resources, may be queried in the database according to the parameters of the operating disk resources as the initial node and extracted. Specifically, the preset node with the assignable disk resource larger than the operating disk resource may be used as the initial node identifier, or a new node list may be established according to the preset node with the assignable disk resource larger than the operating disk resource, so as to facilitate subsequent screening operations.
S103, screening all the initial nodes to obtain the target nodes;
in specific implementation, considering that a plurality of initial nodes exist at the same time, all the initial nodes can be screened according to actual use requirements to obtain the target node. For example, an initial node may be screened out that has other programs running within it.
And S104, distributing target disk resources corresponding to the size of the running disk resources in the target node for the target program.
After the target node is obtained, the target program needs to be run in the target node, and a target disk resource corresponding to the size of the running disk resource in the target node may be allocated to the target program.
For example, if the total disk resource of the target node is 500M, and the size of the operating disk resource is 100M, it is necessary to allocate the size of the corresponding target disk resource in the target node to the target program, which is 100M.
According to the disk resource management scheme, the nodes meeting the running conditions of the target program in the disk are simultaneously inquired, and the nodes which meet the size of the disk resource most are selected through screening to distribute the disk resource, so that the distribution efficiency and the resource utilization rate of disk resource management are improved.
On the basis of the foregoing embodiment, the obtaining of the running disk resource corresponding to the target program in the step S101 includes:
inquiring a configuration file corresponding to the target program;
and reading the configuration file to obtain the running disk resource.
In specific implementation, when a new program is added, the running disk resource corresponding to the new program may be input as a configuration file to be stored, and when the new program is used as a target program to wait for running, the configuration file may be read first, so that the running disk resource may be obtained.
On the basis of the foregoing embodiment, as shown in fig. 2, in step S102, querying, from a database, a preset node where an allocable disk resource is larger than the operating disk resource as an initial node includes:
s201, acquiring all the allocable disk resources of the preset nodes;
all the allocable disk resources of the preset node may be read from the database, for example, if the total disk resources read to the node a is 500M, and the used disk resources are 300M, the allocable disk resources are 200M.
S202, judging whether the distributable disk resource of the preset node is larger than or equal to the running disk resource;
after the distributable disk resources of the preset nodes are obtained, the operating disk resources can be compared with the distributable disk resources of all the preset nodes, so that the next operation flow is determined.
If the assignable disk resources of the preset node are greater than or equal to the running disk resources, executing step S203, and taking the preset node as the initial node;
for example, if the assignable disk resource of the preset node is 200M and the running disk resource is 100M, the preset node is taken as the initial node. Or, if the assignable disk resource of the preset node is 200M and the running disk resource is 200M, the preset node is taken as the initial node.
If the assignable disk resource of the preset node is smaller than the running disk resource, executing step S204, and prohibiting the preset node from being the initial node.
For example, if the allocable disk resource of the preset node is 50M and the operating disk resource is 100M, the preset node is prohibited from being used as the initial node. Of course, when the preset node cannot be selected as the initial node, a prompt message can be sent to the terminal.
On the basis of the foregoing embodiment, the step of screening all the initial nodes to obtain the target node in step S103 includes:
judging whether the number of the initial nodes is greater than or equal to a threshold value, wherein the threshold value is a positive integer greater than 2;
in specific implementation, in consideration of ensuring that a node most suitable for the operation of the target program can be selected, a threshold value may be preset, and after the number of the initial nodes is calculated, the number of the initial nodes is compared with the threshold value, so as to determine the next operation flow.
If the number of the initial nodes is larger than or equal to a threshold value, screening out the initial nodes corresponding to the highest value of the allocable disk resources and the lowest value of the allocable disk resources, and randomly selecting one initial node from the rest initial nodes as the target node;
for example, if the threshold is 5, when the number of the initial nodes is 6, the initial nodes corresponding to the highest value of the allocable disk resources and the lowest value of the allocable disk resources are first screened, and one of the remaining initial nodes is randomly selected as the target node, so that resource waste is not caused or a program operation fault is easily caused when the disk resources are too small.
And if the number of the initial nodes is smaller than a threshold value, randomly selecting one initial node from all the initial nodes as the target node.
In specific implementation, if the threshold is 5, when the number of the initial nodes is 3, then performing a screening operation is easy to cause a calculation error or screen out a suitable initial node, and one initial node may be randomly selected from all the initial nodes as the target node.
On the basis of the foregoing embodiment, after allocating the target disk resource corresponding to the size of the running disk resource in the target node to the target program in step S104, the method further includes:
updating the disk resource information of the target node;
further, the step of updating the disk resource information corresponding to the allocable disk resource of the target node includes:
marking the target disk resource as occupying the disk resource;
calculating parameters of occupied disk resources and parameters of allocable disk resources in the target node;
and taking the parameters of the occupied disk resources and the parameters of the allocable disk resources as the disk resource information.
In specific implementation, considering that, after the target node allocates, to the target program, the target disk resource corresponding to the size of the operating disk resource in the target node, an allocable disk resource may also exist for subsequent new target program allocation, after allocating, to the target program, the target disk resource corresponding to the size of the operating disk resource in the target node, the target disk resource may be marked as occupying the disk resource, then parameters of occupying the disk resource and parameters of allocable disk resources in the target node are calculated, and then the parameters of occupying the disk resource and the parameters of allocable disk resources are used as the disk resource information.
For example, if the total disk resource of the target node is 500M, the allocable disk resource is 300M, and the operating disk resource is 100M, after allocating the target disk resource corresponding to the size of the operating disk resource in the target node to the target program, the parameter of the allocable disk resource is updated to 200M, the parameter of the occupied disk resource is updated to 300M, and then the parameter of the allocable disk resource and the parameter of the occupied disk resource are used as the disk resource information.
And sending the disk resource information to the database.
And after the disk resource information is obtained, sending the disk resource information to the database, so that when a program is newly added in the later period, the calculation can be continuously carried out by following the disk resource information, and a conforming target node is selected. Of course, after the disk resource of the target node is allocated each time, the disk resource information needs to be updated.
Corresponding to the above method embodiment, referring to fig. 3, an embodiment of the present disclosure further provides a disk resource management device 30, including:
an obtaining module 301, configured to obtain, when receiving an operation request for a target program, an operation disk resource corresponding to the target program when the target program is operated;
a query module 302, configured to query, from a database, a preset node where an allocable disk resource is larger than the operating disk resource as an initial node;
a screening module 303, configured to screen all the initial nodes to obtain the target node;
an allocating module 304, configured to allocate, to the target program, a target disk resource in the target node corresponding to the size of the running disk resource.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining module 301 is further configured to:
inquiring a configuration file corresponding to the target program;
and reading the configuration file to obtain the running disk resource.
The apparatus shown in fig. 3 may correspondingly execute the content in the above method embodiment, and details of the part not described in detail in this embodiment refer to the content described in the above method embodiment, which is not described again here.
Referring to fig. 4, an embodiment of the present disclosure also provides an electronic device 40, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the disk resource management method of the foregoing method embodiments.
The disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the disk resource management method in the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the disk resource management method in the aforementioned method embodiments.
Referring now to FIG. 4, a block diagram of an electronic device 40 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device 40 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 40 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 40 to communicate wirelessly or by wire with other devices to exchange data. While the figures illustrate an electronic device 40 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the steps associated with the method embodiments.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, enable the electronic device to perform the steps associated with the method embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A disk resource management method is characterized by comprising the following steps:
when receiving an operation request aiming at a target program, acquiring an operation disk resource corresponding to the operation of the target program;
inquiring a preset node with the allocable disk resources larger than the operating disk resources from the database as an initial node;
screening all the initial nodes to obtain the target nodes;
and allocating target disk resources corresponding to the size of the running disk resources in the target node to the target program.
2. The method according to claim 1, wherein the step of obtaining the running disk resource corresponding to the running of the target program comprises:
inquiring a configuration file corresponding to the target program;
and reading the configuration file to obtain the running disk resource.
3. The method of claim 1, wherein the step of querying the database for a default node with an allocable disk resource larger than the operational disk resource as an initial node comprises:
acquiring allocable disk resources of all the preset nodes;
judging whether the distributable disk resources of the preset node are greater than or equal to the running disk resources or not;
if the distributable disk resources of the preset node are greater than or equal to the running disk resources, taking the preset node as the initial node;
and if the assignable disk resources of the preset node are smaller than the running disk resources, forbidding the preset node to be used as the initial node.
4. The method of claim 3, wherein the step of screening all of the initial nodes to obtain the target node comprises:
judging whether the number of the initial nodes is greater than or equal to a threshold value, wherein the threshold value is a positive integer greater than 5;
if the number of the initial nodes is larger than or equal to a threshold value, screening out the initial nodes corresponding to the highest value of the allocable disk resources and the lowest value of the allocable disk resources, and randomly selecting one initial node from the rest initial nodes as the target node;
and if the number of the initial nodes is smaller than a threshold value, randomly selecting one initial node from all the initial nodes as the target node.
5. The method of claim 1, wherein after the step of allocating the target disk resource corresponding to the size of the operating disk resource in the target node to the target program, the method further comprises:
updating the disk resource information of the target node;
and sending the disk resource information to the database.
6. The method according to claim 5, wherein the step of updating the disk resource information corresponding to the allocable disk resource of the target node includes:
marking the target disk resource as occupying the disk resource;
calculating parameters of occupied disk resources and parameters of allocable disk resources in the target node;
and taking the parameters of the occupied disk resources and the parameters of the allocable disk resources as the disk resource information.
7. A disk resource management apparatus, comprising:
the acquisition module is used for acquiring corresponding running disk resources when a target program is run when receiving a running request aiming at the target program;
the query module is used for querying a preset node, as an initial node, of which the assignable disk resources are larger than the operating disk resources from the database;
the screening module is used for screening all the initial nodes to obtain the target nodes;
and the allocation module is used for allocating target disk resources corresponding to the size of the running disk resources in the target node for the target program.
8. The apparatus of claim 7, wherein the obtaining module is further configured to:
inquiring a configuration file corresponding to the target program;
and reading the configuration file to obtain the running disk resource.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the disk resource management method of any of the preceding claims 1-6.
10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the disk resource management method of any one of the preceding claims 1-6.
CN202011085350.4A 2020-10-12 2020-10-12 Disk resource management method and device and electronic equipment Pending CN112148497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011085350.4A CN112148497A (en) 2020-10-12 2020-10-12 Disk resource management method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011085350.4A CN112148497A (en) 2020-10-12 2020-10-12 Disk resource management method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112148497A true CN112148497A (en) 2020-12-29

Family

ID=73951470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011085350.4A Pending CN112148497A (en) 2020-10-12 2020-10-12 Disk resource management method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112148497A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667405A (en) * 2021-01-05 2021-04-16 田宇 Information processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150220370A1 (en) * 2014-02-04 2015-08-06 Fujitsu Limited Job scheduling apparatus and method therefor
CN109471705A (en) * 2017-09-08 2019-03-15 杭州海康威视数字技术股份有限公司 Method, equipment and system, the computer equipment of task schedule
CN110858161A (en) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 Resource allocation method, device, system, equipment and medium
CN111459678A (en) * 2020-04-02 2020-07-28 上海极链网络科技有限公司 Resource scheduling method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150220370A1 (en) * 2014-02-04 2015-08-06 Fujitsu Limited Job scheduling apparatus and method therefor
CN109471705A (en) * 2017-09-08 2019-03-15 杭州海康威视数字技术股份有限公司 Method, equipment and system, the computer equipment of task schedule
CN110858161A (en) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 Resource allocation method, device, system, equipment and medium
CN111459678A (en) * 2020-04-02 2020-07-28 上海极链网络科技有限公司 Resource scheduling method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667405A (en) * 2021-01-05 2021-04-16 田宇 Information processing method, device, equipment and storage medium
WO2022148086A1 (en) * 2021-01-05 2022-07-14 田宇 Information processing method and apparatus, and device and storage medium

Similar Documents

Publication Publication Date Title
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN113553178A (en) Task processing method and device and electronic equipment
CN110545313B (en) Message push control method and device and electronic equipment
CN113204425A (en) Method and device for process management internal thread, electronic equipment and storage medium
CN115617511A (en) Resource data processing method and device, electronic equipment and storage medium
CN117311999B (en) Resource scheduling method, storage medium and electronic equipment of service cluster
CN112148497A (en) Disk resource management method and device and electronic equipment
CN102377793B (en) Flash interaction method and device based on mobile communication equipment terminal
CN113391882B (en) Virtual machine memory management method and device, storage medium and electronic equipment
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN113660699A (en) Intelligent cluster networking method and device and electronic equipment
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN114675954A (en) Task scheduling method and device
CN113282455A (en) Monitoring processing method and device
CN111343468A (en) Message processing method and device and electronic equipment
CN110868564B (en) Storage task allocation method, cloud storage system and electronic equipment
CN111813545B (en) Resource allocation method, device, medium and equipment
CN113347278B (en) Data processing method and device and electronic equipment
CN111124594B (en) Container operation method and device, heterogeneous GPU (graphics processing Unit) server and container cluster system
CN118158082B (en) Method, device, equipment and medium for updating communication resource message of intelligent household equipment
CN114500469B (en) Automatic identification and address allocation method for intelligent electric equipment
CN111026571A (en) Processor frequency reduction processing method and device and electronic equipment
CN116820539A (en) System software operation maintenance system and method based on Internet
CN117176813A (en) Method and device for processing service request

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210508

Address after: 210000 Room 301, 3rd floor, 138 Fengtai South Road, Yuhuatai District, Nanjing City, Jiangsu Province

Applicant after: Nanjing cloud cabinet Network Technology Co.,Ltd.

Address before: Room 1501, building 1, Tianhe Plaza, 146 Fengtai South Road, Yuhuatai District, Nanjing, Jiangsu Province 210000

Applicant before: JIANGSU CLOUDBOX NETWORK TECHNOLOGY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201229