CN110708369B - File deployment method and device for equipment nodes, scheduling server and storage medium - Google Patents

File deployment method and device for equipment nodes, scheduling server and storage medium Download PDF

Info

Publication number
CN110708369B
CN110708369B CN201910913993.4A CN201910913993A CN110708369B CN 110708369 B CN110708369 B CN 110708369B CN 201910913993 A CN201910913993 A CN 201910913993A CN 110708369 B CN110708369 B CN 110708369B
Authority
CN
China
Prior art keywords
node
scheduling
machine room
equipment
nodes
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.)
Active
Application number
CN201910913993.4A
Other languages
Chinese (zh)
Other versions
CN110708369A (en
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910913993.4A priority Critical patent/CN110708369B/en
Publication of CN110708369A publication Critical patent/CN110708369A/en
Application granted granted Critical
Publication of CN110708369B publication Critical patent/CN110708369B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers

Abstract

A method of file deployment for a device node, the method comprising: when a file deployment instruction is received, first capacity information of each machine room can be acquired from a data server, wherein each machine room comprises a plurality of equipment nodes; determining a target machine room from all machine rooms according to the first capacity information of each machine room; judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room; if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node; and deploying the file indicated by the file deployment instruction to the dispatching equipment node. The invention also provides a file deployment device, a scheduling server and a storage medium of the equipment node. The invention can improve the scheduling efficiency of the equipment node.

Description

File deployment method and device for equipment nodes, scheduling server and storage medium
Technical Field
The present invention relates to the field of device node scheduling technologies, and in particular, to a method and an apparatus for file deployment of device nodes, a scheduling server, and a storage medium.
Background
With the development of internet technology, online storage of files (cloud storage) on the internet is becoming more popular due to its convenience.
At present, a cloud storage scheduling scheme is mainly scheduled in a Content Delivery Network (CDN) manner, but in practice, it is found that the cloud storage scheduling scheme needs to verify Network performance of device nodes in a Network, and select a device node with the best Network performance from the device nodes for scheduling, and the operation of the cloud storage scheduling scheme needs to consume much time, is not efficient in scheduling, and cannot meet rapid deployment of a large number of files.
Therefore, how to improve the scheduling efficiency of the device node is an urgent technical problem to be solved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a scheduling server, and a storage medium for deploying a file in a device node, which can improve the scheduling efficiency of the device node.
A first aspect of the present invention provides a file deployment method for a device node, where the method includes:
when a file deployment instruction is received, acquiring first capacity information of each machine room from a data server, wherein each machine room comprises a plurality of equipment nodes;
determining a target machine room from all machine rooms according to the first capacity information of each machine room;
judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room;
if target equipment nodes meeting the scheduling requirements exist in all the equipment nodes, determining scheduling equipment nodes from the target equipment nodes;
and deploying the file indicated by the file deployment instruction to the dispatching equipment node.
In a possible implementation manner, the determining, according to the preset score threshold and the scheduling scores of all the device nodes in the target machine room, whether there is a target device node that meets the scheduling requirement in all the device nodes includes:
counting a first number of equipment nodes of which the scheduling scores are greater than a maximum preset score threshold value in the target machine room aiming at the maximum preset score threshold value in the preset score threshold values;
judging whether the first number is greater than or equal to a preset number threshold value;
if the first number is larger than or equal to a preset number threshold, determining that target equipment nodes meeting scheduling requirements exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are larger than the maximum preset score threshold in the target machine room.
In one possible implementation, the method further includes:
if the first number is smaller than a preset number threshold, extracting a first preset score threshold except the maximum preset score threshold according to the arrangement sequence of the preset score thresholds from large to small;
counting a second number of equipment nodes of which the scheduling scores are larger than the first preset score threshold value in the target machine room;
judging whether the second quantity is greater than or equal to the preset quantity threshold value;
if the second number is greater than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirement exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are greater than the first preset score threshold in the target machine room.
In one possible implementation, the method further includes:
for each machine room, acquiring node information of each equipment node in the machine room at preset time intervals;
determining a plurality of weighted values of the equipment nodes according to the node information;
calculating a scheduling score of the device node according to the plurality of weight values;
storing the scheduling score to the data server.
In one possible implementation, the method further includes:
for each machine room, acquiring second capacity information of each equipment node in the machine room at intervals of the preset time interval;
counting the second capacity information of all equipment nodes in the machine room to obtain first capacity information of the machine room;
storing the first capacity information to the data server.
In a possible implementation manner, the first capacity information includes a total capacity of space and a capacity of used space, and the determining, according to the first capacity information of each machine room, a target machine room from all the machine rooms includes:
determining the available space capacity of each machine room according to the total space capacity and the used space capacity;
judging whether the computer room disaster tolerance is needed or not according to the configuration file;
and if the disaster tolerance of the machine rooms is not needed, determining the machine room with the maximum available space capacity as a target machine room from all the machine rooms.
In one possible implementation, the method further includes:
if the machine room disaster recovery is needed, sorting all the machine rooms according to the sequence of the available space capacity from large to small;
and determining two machine rooms in the front of the sequence as target machine rooms according to the sequence of the sequenced all machine rooms.
A second aspect of the present invention provides an apparatus for deploying a file in a device node, where the apparatus includes:
the device comprises an acquisition module, a data server and a data processing module, wherein the acquisition module is used for acquiring first capacity information of each machine room from the data server when a file deployment instruction is received, and each machine room comprises a plurality of equipment nodes;
the determining module is used for determining a target machine room from all the machine rooms according to the first capacity information of each machine room;
the judging module is used for judging whether target equipment nodes meeting the dispatching requirement exist in all the equipment nodes or not according to a preset score threshold value and the dispatching scores of all the equipment nodes in the target machine room;
the determining module is further configured to determine a scheduling device node from the target device nodes if the target device node satisfying the scheduling requirement exists in all the device nodes;
and the deployment module is used for deploying the file indicated by the file deployment instruction to the scheduling equipment node.
A third aspect of the present invention provides a scheduling server, which includes a processor and a memory, wherein the processor is configured to implement the file deployment method for the device node when executing the computer program stored in the memory.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the file deployment method for a device node.
According to the technical scheme, when a file deployment instruction is received, first capacity information of all machine rooms can be obtained from a data server, wherein each machine room comprises a plurality of equipment nodes; determining a target machine room from all machine rooms according to the first capacity information of each machine room; judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room; if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node; and deploying the file indicated by the file deployment instruction to the dispatching equipment node. Therefore, in the invention, the information of all the machine rooms can be obtained from the data server, the target machine room for scheduling is determined, and the nodes are selected from the target machine room for scheduling according to the scheduling scores of all the nodes in the target machine room and the preset score threshold, namely, the scheduling nodes are determined according to the information stored by the data server, communication with the nodes is not needed, and time is not needed to be spent on verifying various information of the nodes, so that the fast scheduling can be carried out, a large number of files can be deployed fast, and the scheduling efficiency is improved.
Drawings
Fig. 1 is a flowchart of a file deployment method for device nodes according to a preferred embodiment of the present invention.
FIG. 2 is a functional block diagram of a file deployment apparatus for device nodes according to an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of a scheduling server according to a preferred embodiment of the method for implementing file deployment of device nodes in the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The file deployment method of the equipment node is applied to the scheduling server, and can also be applied to a hardware environment formed by the scheduling server and the electronic equipment connected with the scheduling server through a network, and the scheduling server and the electronic equipment are jointly executed. Networks include, but are not limited to: a wide area network, a metropolitan area network, or a local area network.
The dispatch server is a server, and the server may refer to a computer system capable of providing services to other devices (e.g., electronic devices) in the network. A personal computer may also be called a server if it can externally provide a File Transfer Protocol (FTP) service. In a narrow sense, a server refers to a high-performance computer, which can provide services to the outside through a network, and compared with a common personal computer, the server has higher requirements on stability, security, performance and the like, and therefore, hardware such as a CPU, a chipset, a memory, a disk system, a network and the like is different from that of the common personal computer.
The electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like. The electronic device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers, wherein Cloud Computing is one of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers. The user device includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), or the like.
Referring to fig. 1, fig. 1 is a flowchart illustrating a file deployment method for a device node according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed, and some steps may be omitted.
S11, when a file deployment instruction is received, the scheduling server obtains first capacity information of each machine room from the data server, wherein each machine room comprises a plurality of equipment nodes; .
The data server may be a redis (remote DIctionary server) server, which is a key-value storage system for storing data.
The device node may include, but is not limited to, an intelligent hardware device and a server.
The scheduling server may be a server for scheduling the device node.
In the embodiment of the present invention, the data server stores storage information (first capacity information) of each machine room, and each machine room has a plurality of device nodes. When a file deployment instruction is received, the scheduling server may obtain the first capacity information of all the computer rooms from the data server.
And S12, the scheduling server determines a target machine room from all the machine rooms according to the first capacity information of each machine room.
Specifically, the determining the target machine room from all the machine rooms according to the first capacity information of each machine room includes:
determining the available space capacity of each machine room according to the total space capacity and the used space capacity;
judging whether the computer room disaster tolerance is needed or not according to the configuration file;
and if the disaster tolerance of the machine rooms is not needed, determining the machine room with the maximum available space capacity as a target machine room from all the machine rooms.
The first capacity information may include a total capacity of space of one machine room and a used capacity of space.
The computer room disaster recovery means that files are backed up in another computer room, so that the files are prevented from being lost or the service of the files is prevented from being provided due to the failure of one computer room.
In this optional embodiment, the available space capacity of the machine room may be determined according to the total space capacity and the used space capacity of the machine room, and if the parameter configured by the configuration file indicates that disaster tolerance of the machine room is not required, only the device node in one machine room needs to be selected for scheduling, and the machine room with the maximum available space capacity may be determined as the target machine room, so as to ensure that the device node selected from the target machine room has sufficient space capacity to store the file.
As an optional implementation, the method further comprises:
if the machine room disaster recovery is needed, sorting all the machine rooms according to the sequence of the available space capacity from large to small;
and determining two machine rooms in the front of the sequence as target machine rooms according to the sequence of the sequenced all machine rooms.
In this optional embodiment, if the parameter of the configuration file configuration indicates that a machine room disaster recovery needs to be performed, in addition to selecting a device node storage file from one machine room, a device node storage file needs to be selected from another machine room. All the machine rooms can be sorted according to the sequence of the available space capacity from large to small, and the two machine rooms in the front of the sorting are determined as target machine rooms, namely the two machine rooms with the largest available space capacity are determined as the target machine rooms.
And S13, the scheduling server judges whether a target equipment node meeting the scheduling requirement exists in all the equipment nodes according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room, if so, the step S14 is executed, and if not, the process is ended.
Wherein, the preset score threshold value can be multiple.
Wherein the scheduling score is used to measure whether a device node is eligible to be scheduled.
In the embodiment of the invention, not every equipment node can meet the requirement to be scheduled, the equipment nodes which can be scheduled need to be determined from the machine room, and whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes can be judged according to the preset score threshold and the scheduling scores of all the equipment nodes.
As an optional implementation manner, the determining, according to the preset score threshold and the scheduling scores of all the device nodes in the target machine room, whether there is a target device node that meets the scheduling requirement in all the device nodes includes:
counting a first number of equipment nodes of which the scheduling scores are greater than a maximum preset score threshold value in the target machine room aiming at the maximum preset score threshold value in the preset score threshold values;
judging whether the first number is greater than or equal to a preset number threshold value;
if the first number is larger than or equal to a preset number threshold, determining that target equipment nodes meeting scheduling requirements exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are larger than the maximum preset score threshold in the target machine room.
The preset number threshold corresponds to the number of files to be deployed in the machine room, it is assumed that the number of device nodes suitable for being scheduled corresponding to one file to be deployed is 125, if the number of files to be deployed in the machine room is 1, the preset number threshold is 125, and if the number of files to be deployed is 2, the preset number threshold is 250. Because one computer room or one device node may have multiple tasks being deployed, in order to ensure that multiple tasks can be processed in parallel, it is necessary to ensure that multiple device nodes can be scheduled when a file is deployed.
In this optional implementation manner, the preset score threshold may be determined according to a service requirement, and the preset score thresholds selected in the embodiment of the present invention are 75, 50, 25, and 0. The maximum preset score threshold is 75, the device nodes with the scheduling scores larger than 75 may be returned from the data server, and it is determined whether the number (first number) of the returned device nodes is larger than or equal to the preset number threshold, and if the first number is larger than or equal to the preset number threshold, it is determined that target device nodes meeting the scheduling requirement exist in all the device nodes.
As an optional implementation, the method further comprises:
if the first number is smaller than a preset number threshold, extracting a first preset score threshold except the maximum preset score threshold according to the arrangement sequence of the preset score thresholds from large to small;
counting a second number of equipment nodes of which the scheduling scores are larger than the first preset score threshold value in the target machine room;
judging whether the second quantity is greater than or equal to the preset quantity threshold value;
and if the second quantity is greater than or equal to the preset quantity threshold, determining that target equipment nodes meeting scheduling requirements exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are greater than the first preset score threshold in the target machine room.
As an optional implementation manner, assuming that the preset score threshold is 75, 50, 25, and 0, if the first number is smaller than the preset number threshold, determining 50 as the first preset score threshold, counting a second number of device nodes of which the scheduling scores are greater than 50 in the target machine room, and determining whether the second number is greater than or equal to the preset number threshold, and if the second number is greater than or equal to the preset number threshold, determining that target device nodes meeting the scheduling requirement exist in all the device nodes of the target machine room. If the second number is smaller than the preset number threshold, counting a third number of the equipment nodes of which the scheduling scores are larger than 25 in the target machine room, judging whether the third number is larger than or equal to the preset number threshold, and if the third number is larger than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirements exist in all the equipment nodes of the target machine room. If the third number is smaller than the preset number threshold, counting a fourth number of the equipment nodes of which the scheduling scores are larger than 0 in the target machine room, judging whether the fourth number is larger than or equal to the preset number threshold, and if the fourth number is larger than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirements exist in all the equipment nodes of the target machine room. Optionally, if the fourth number is smaller than the preset number threshold, generating warning information, and sending the warning information to the user terminal.
S14, the scheduling server determines the scheduling equipment node from the target equipment node.
In the embodiment of the present invention, the target device nodes all satisfy the scheduling requirement, and therefore, the device node for scheduling (scheduling device node) may be randomly selected from the target device nodes, and the device node with the largest available space capacity in the target device nodes may also be determined as the scheduling device node, and the like.
And S15, the scheduling server deploys the file indicated by the file deployment instruction to the scheduling equipment node.
In the embodiment of the invention, the deployment number of the files corresponds to the number of the scheduling equipment nodes, and one scheduling equipment node deploys one file.
As an optional implementation, the method further comprises:
for each machine room, acquiring node information of each equipment node in the machine room at preset time intervals;
determining a plurality of weighted values of the equipment nodes according to the node information;
calculating a scheduling score of the device node according to the plurality of weight values;
storing the scheduling score to the data server.
Wherein the node information may include: node status, available space capacity, node load, number of tasks, node type, etc.
Wherein the node type may include: servers, intelligent hardware devices, and the like.
In this optional embodiment, a time interval (preset time interval) may be preset, node information of all device nodes in each machine room is obtained at intervals of the preset time interval, and then a plurality of weight values of the device nodes may be determined according to the node information, where for a node state, when the node state is online, the weight value is 1, and when the node state is not online, the weight value is 0; for the available space capacity, when the available space capacity is greater than 50T, the weight value is 5, when the available space capacity is greater than 10T and less than or equal to 50T, the weight value is 4, when the available space capacity is greater than 3T and less than or equal to 10T, the weight value is 3, when the available space capacity is greater than 500G and less than or equal to 3T, the weight value is 2, when the available space capacity is greater than 100G and less than or equal to 500G, the weight value is 1, and when the available space capacity is less than 100G, the weight value is 0; the node load may be a CPU (central processing unit) load and the number of CPU cores used by the load, and for an equipment node whose node type is a server, when the load is less than 1, the weight value is 5, when the load is greater than or equal to 1 and less than 1/4 of the number of CPU cores, the weight value is 4, when the load is greater than or equal to 1/4 of the number of CPU cores and less than 1/2 of the number of CPU cores, the weight value is 3, when the load is greater than or equal to 1/2 of the number of CPU cores and less than 3/4 of the number of CPU cores, the weight value is 2, when the load is greater than or equal to 3/4 of the number of CPU cores, the weight value is 1. For a device node of which the node type is an intelligent hardware device, when the load is less than 1, the weight value is 5, the load is greater than or equal to 1 and less than 2, the weight value is 4, when the load is greater than or equal to 2 and less than 3, the weight value is 3, when the load is greater than or equal to 3 and less than 4, the weight value is 2, and when the load is greater than or equal to 4, the weight value is 1. The weight value may be determined according to the number of tasks being deployed, for an equipment node whose node type is a server, when the number of tasks is less than 2, the weight value is 5, when the number of tasks is greater than or equal to 2 and less than 4, the weight value is 4, when the number of tasks is greater than or equal to 4 and less than 6, the weight value is 3, when the number of tasks is greater than or equal to 6 and less than 8, the weight value is 2, and when the number of tasks is greater than or equal to 8, the weight value is 1. For a device node of which the node type is an intelligent hardware device, when the number of tasks is less than 1, the weight value is 5, when the number of tasks is greater than or equal to 1 and less than 2, the weight value is 4, when the number of tasks is greater than or equal to 2 and less than 3, the weight value is 3, when the number of tasks is greater than or equal to 3 and less than 4, the weight value is 2, and when the number of tasks is greater than or equal to 4, the weight value is 1. The values of the weighted values corresponding to different node information can be set according to specific conditions. And finally, multiplying the weight value of the node state, the weight value of the available space capacity, the weight value of the node load and the weight value of the task quantity to obtain the scheduling score of the equipment node. The scheduling scores of the equipment nodes can be stored in the data server, and when the nodes need to be scheduled, the scheduling scores can be directly read and a scheduling strategy can be made, so that the scheduling efficiency is improved.
As an optional implementation, the method further comprises:
for each machine room, acquiring second capacity information of each equipment node in the machine room at intervals of the preset time interval;
counting the second capacity information of all equipment nodes in the machine room to obtain first capacity information of the machine room;
storing the first capacity information to the data server.
In this optional embodiment, a time interval (preset time interval) may be preset, and the capacity information of all the device nodes may be obtained at intervals of the preset time interval, where the capacity information may include the total space capacity and the used space capacity of the device nodes, and the capacity information of one machine room may be determined by counting the capacity information of all the device nodes in one machine room, and these pieces of information may be stored in the data server and updated regularly. Therefore, the capacity information of the computer room or the capacity information of the equipment nodes can be directly read from the data server, and related operations such as inquiry and the like do not need to be carried out on a plurality of equipment nodes, so that the efficiency can be improved.
In the method flow described in fig. 1, when a file deployment instruction is received, first capacity information of all machine rooms may be obtained from a data server, where each machine room includes a plurality of device nodes; determining a target machine room from all machine rooms according to the first capacity information of each machine room; judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room; if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node; and deploying the file indicated by the file deployment instruction to the dispatching equipment node. Therefore, the information of all the machine rooms can be obtained from the data server, the target machine room for scheduling is determined, the nodes are selected from the target machine room for scheduling according to the scheduling scores of all the nodes in the target machine room and the preset score threshold, namely the scheduling nodes are determined according to the information stored by the data server, communication with the nodes is not needed, time is not needed to be spent on verifying various information of the nodes, and therefore fast scheduling can be achieved, a large number of files can be deployed fast, and scheduling efficiency is improved.
The above description is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and it will be apparent to those skilled in the art that modifications may be made without departing from the inventive concept of the present invention, and these modifications are within the scope of the present invention.
Referring to fig. 2, fig. 2 is a functional block diagram of a file deployment apparatus for device nodes according to a preferred embodiment of the present invention.
In some embodiments, the file deploying means of the device node runs in a scheduling server. The file deploying means of the device node may comprise a plurality of functional modules consisting of program code segments. The program code of each of the program segments may be stored in a memory and executed by at least one processor to perform some or all of the steps of the file deployment method for a device node described in fig. 1.
In this embodiment, the file deployment apparatus of the device node may be divided into a plurality of functional modules according to the functions executed by the file deployment apparatus. The functional module may include: an acquisition module 201, a determination module 202, a judgment module 203, and a deployment module 204. The module referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in memory. In some embodiments, the functionality of the modules will be described in greater detail in subsequent embodiments.
An obtaining module 201, configured to obtain, from a data server, first capacity information of each machine room when a file deployment instruction is received, where each machine room includes a plurality of device nodes;
the data server may be a redis (remote DIctionary server) server, which is a key-value storage system for storing data.
The device node may include, but is not limited to, an intelligent hardware device and a server.
The scheduling server may be a server for scheduling the device node.
In the embodiment of the present invention, the data server stores storage information (first capacity information) of each machine room, and each machine room has a plurality of device nodes. When a file deployment instruction is received, the scheduling server can acquire first capacity information of all the machine rooms from the data server.
A determining module 202, configured to determine a target machine room from all machine rooms according to the first capacity information of each machine room;
specifically, the determining the target machine room from all the machine rooms according to the first capacity information of each machine room includes:
determining the available space capacity of each machine room according to the total space capacity and the used space capacity;
judging whether the computer room disaster recovery is needed or not according to the configuration file;
and if the machine room disaster recovery is not needed, determining the machine room with the maximum available space capacity as a target machine room from all the machine rooms.
The judging module 203 is configured to judge whether a target device node meeting a scheduling requirement exists in all device nodes according to a preset score threshold and scheduling scores of all device nodes in the target machine room;
wherein, the preset score threshold value can be multiple.
Wherein the scheduling score is used to measure whether a device node is eligible to be scheduled.
In the embodiment of the invention, not every equipment node can meet the requirement to be scheduled, the equipment nodes which can be scheduled need to be determined from the machine room, and whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes can be judged according to the preset score threshold and the scheduling scores of all the equipment nodes.
The determining module 202 is further configured to determine a scheduling device node from the target device nodes if there is a target device node that meets the scheduling requirement among all the device nodes;
in the embodiment of the present invention, the target device nodes all satisfy the scheduling requirement, and therefore, the device node for scheduling (scheduling device node) may be randomly selected from the target device nodes, and the device node with the largest available space capacity in the target device nodes may also be determined as the scheduling device node, and the like.
A deployment module 204, configured to deploy the file indicated by the file deployment instruction to the scheduling device node.
In the embodiment of the invention, the deployment number of the files corresponds to the number of the scheduling equipment nodes, and one scheduling equipment node deploys one file.
As an optional implementation manner, the preset score thresholds are multiple, the preset score thresholds are sorted from large to small, and the manner that the determining module 203 determines, according to the preset score thresholds and the scheduling scores of all the device nodes in the target machine room, whether a target device node meeting the scheduling requirement exists in all the device nodes is specifically:
counting a first number of equipment nodes of which the scheduling scores are greater than a maximum preset score threshold value in the target machine room aiming at the maximum preset score threshold value in the preset score threshold values;
judging whether the first number is greater than or equal to a preset number threshold value;
if the first number is larger than or equal to a preset number threshold, determining that target equipment nodes meeting scheduling requirements exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are larger than the maximum preset score threshold in the target machine room.
The preset number threshold corresponds to the number of files to be deployed in the machine room, and it is assumed that the number of nodes suitable for being scheduled corresponding to one file to be deployed is 125, if the number of files to be deployed in the machine room is 1, the preset number threshold is 125, and if the number of files to be deployed is 2, the preset number threshold is 250. Because one computer room or one device node may have multiple tasks being deployed, in order to ensure that multiple tasks can be processed in parallel, it is necessary to ensure that multiple device nodes can be scheduled when a file is deployed.
In this optional implementation manner, the preset score threshold may be determined according to a service requirement, and the preset score thresholds selected in the embodiment of the present invention are 75, 50, 25, and 0. The maximum preset score threshold is 75, the device nodes with the scheduling scores larger than 75 may be returned from the data server, and it is determined whether the number (first number) of the returned device nodes is larger than or equal to the preset number threshold, and if the first number is larger than or equal to the preset number threshold, it is determined that target device nodes meeting the scheduling requirement exist in all the device nodes.
As an optional implementation manner, the file deployment apparatus of the device node may further include:
the extraction module is used for extracting a first preset score threshold except the maximum preset score threshold according to the arrangement sequence of the preset score thresholds from large to small if the first number is smaller than a preset number threshold;
the counting module is used for counting a second number of the equipment nodes of which the scheduling scores are larger than the first preset score threshold value in the target machine room;
the determining module 203 is further configured to determine whether the second number is greater than or equal to the preset number threshold;
the determining module 202 is further configured to determine that, if the second number is greater than or equal to the preset number threshold, a target device node meeting a scheduling requirement exists in all the device nodes, where the target device node is a device node in the target machine room whose scheduling score is greater than the first preset score threshold.
As an optional implementation manner, assuming that the preset score threshold is 75, 50, 25, and 0, if the first number is smaller than the preset number threshold, determining 50 as the first preset score threshold, counting a second number of device nodes of which the scheduling scores are greater than 50 in the target machine room, and determining whether the second number is greater than or equal to the preset number threshold, and if the second number is greater than or equal to the preset number threshold, determining that target device nodes meeting the scheduling requirement exist in all the device nodes of the target machine room. If the second number is smaller than the preset number threshold, counting a third number of the equipment nodes of which the scheduling scores are larger than 25 in the target machine room, judging whether the third number is larger than or equal to the preset number threshold, and if the third number is larger than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirements exist in all the equipment nodes of the target machine room. If the third number is smaller than the preset number threshold, counting a fourth number of the equipment nodes of which the scheduling scores are larger than 0 in the target machine room, judging whether the fourth number is larger than or equal to the preset number threshold, and if the fourth number is larger than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirements exist in all the equipment nodes of the target machine room. Optionally, if the first device node does not meet the requirement for scheduling, generating warning information, and sending the warning information to the user terminal.
As an optional implementation manner, the obtaining module 201 is further configured to obtain, for each machine room, node information of each device node in the machine room at preset time intervals;
the determining module 202 is further configured to determine a plurality of weight values of the device node according to the node information;
the file deployment apparatus of the device node may further include:
a calculating module, configured to calculate a scheduling score of the device node according to the plurality of weight values;
a storage module to store the scheduling score to the data server.
Wherein the node information may include: node status, available space capacity, node load, number of tasks, node type, etc.
Wherein the node type may include: servers, intelligent hardware devices, and the like.
In this optional embodiment, a time interval (preset time interval) may be preset, node information of all device nodes in each machine room is obtained at every preset time interval, and then a plurality of weight values of the device nodes may be determined according to the node information, where for a node state, when online, a weight value is 1, and when offline, a weight value is 0; for the available space capacity, when the available space capacity is greater than 50T, the weight value is 5, when the available space capacity is greater than 10T and less than or equal to 50T, the weight value is 4, when the available space capacity is greater than 3T and less than or equal to 10T, the weight value is 3, when the available space capacity is greater than 500G and less than or equal to 3T, the weight value is 2, when the available space capacity is greater than 100G and less than or equal to 500G, the weight value is 1, and when the available space capacity is less than 100G, the weight value is 0; the node load may be a CPU (central processing unit) load and the number of CPU cores used by the load, and for an equipment node whose node type is a server, when the load is less than 1, the weight value is 5, when the load is greater than or equal to 1 and less than 1/4 of the number of CPU cores, the weight value is 4, when the load is greater than or equal to 1/4 of the number of CPU cores and less than 1/2 of the number of CPU cores, the weight value is 3, when the load is greater than or equal to 1/2 of the number of CPU cores and less than 3/4 of the number of CPU cores, the weight value is 2, when the load is greater than or equal to 3/4 of the number of CPU cores, the weight value is 1. For a device node of which the node type is an intelligent hardware device, when the load is less than 1, the weight value is 5, the load is greater than or equal to 1 and less than 2, the weight value is 4, when the load is greater than or equal to 2 and less than 3, the weight value is 3, when the load is greater than or equal to 3 and less than 4, the weight value is 2, and when the load is greater than or equal to 4, the weight value is 1. The weight value can be determined according to the number of tasks being deployed, for a device node of which the node type is a server, when the number of tasks is less than 2, the weight value is 5, when the number of tasks is greater than or equal to 2 and less than 4, the weight value is 4, when the number of tasks is greater than or equal to 4 and less than 6, the weight value is 3, when the number of tasks is greater than or equal to 6 and less than 8, the weight value is 2, and when the number of tasks is greater than or equal to 8, the weight value is 1. For a device node of which the node type is an intelligent hardware device, when the number of tasks is less than 1, the weight value is 5, when the number of tasks is greater than or equal to 1 and less than 2, the weight value is 4, when the number of tasks is greater than or equal to 2 and less than 3, the weight value is 3, when the number of tasks is greater than or equal to 3 and less than 4, the weight value is 2, and when the number of tasks is greater than or equal to 4, the weight value is 1. And finally, multiplying the weight value of the node state, the weight value of the available space capacity, the weight value of the node load and the weight value of the task quantity to obtain the scheduling score of the equipment node. The scheduling scores of the equipment nodes can be stored in the data server, and when the nodes need to be scheduled, the scheduling scores can be directly read and a scheduling strategy can be made, so that the scheduling efficiency is improved.
As an optional implementation manner, the obtaining module 201 is further configured to obtain, for each equipment room, second capacity information of each equipment node in the equipment room at intervals of the preset time interval;
the statistical module is further configured to perform statistics on the second capacity information of all the device nodes in the machine room to obtain first capacity information of the machine room;
the storage module is further configured to store the first capacity information to the data server.
In this optional implementation, a time interval (preset time interval) may be preset, the capacity information of all the device nodes is obtained at every preset time interval, the capacity information may include the total space capacity and the used space capacity of the device nodes, and the capacity information of one machine room may be determined by counting the capacity information of all the device nodes in one machine room, and these pieces of information may be stored in the data server and updated regularly. Therefore, the capacity information of the computer room or the capacity information of the equipment nodes can be directly read from the data server, and related operations such as inquiry and the like do not need to be carried out on a plurality of equipment nodes, so that the efficiency can be improved.
As an optional implementation manner, the first capacity information includes a total capacity of the space and a used capacity of the space, and the determining module 202 determines the target machine room from all the machine rooms according to the first capacity information of each machine room specifically by:
determining the available space capacity of each machine room according to the total space capacity and the used space capacity;
judging whether the computer room disaster tolerance is needed or not according to the configuration file;
and if the disaster tolerance of the machine rooms is not needed, determining the machine room with the maximum available space capacity as a target machine room from all the machine rooms.
The first capacity information may include a total capacity of space of one machine room and a used capacity of space.
The computer room disaster recovery means that files are backed up in another computer room, so that the files are prevented from being lost or the service of the files is prevented from being provided due to the failure of one computer room.
In this optional embodiment, the available space capacity of the machine room may be determined according to the total space capacity and the used space capacity of the machine room, and if the parameter configured by the configuration file indicates that disaster tolerance of the machine room is not required, only the device node in one machine room needs to be selected for scheduling, and the machine room with the maximum available space capacity may be determined as the target machine room, so as to ensure that the device node selected from the target machine room has sufficient space capacity to store the file.
As an optional implementation manner, the file deployment apparatus of the device node may further include:
the sequencing module is used for sequencing all the machine rooms according to the sequence of the available space capacity from large to small if the machine room disaster tolerance is required;
the determining module 202 is further configured to determine, according to the sequence of all the machine rooms after the sorting, two machine rooms in the front of the sorting as target machine rooms.
In this optional embodiment, if the parameter of the configuration file configuration indicates that a machine room disaster recovery needs to be performed, in addition to selecting a device node storage file from one machine room, a device node storage file needs to be selected from another machine room. All the machine rooms can be sorted according to the sequence of the available space capacity from large to small, and the two machine rooms in the front of the sorting are determined as target machine rooms, namely the two machine rooms with the largest available space capacity are determined as the target machine rooms.
In the file deployment apparatus of the device node depicted in fig. 2, when a file deployment instruction is received, first capacity information of all machine rooms may be obtained from a data server, where each machine room includes a plurality of device nodes; determining a target machine room from all machine rooms according to the first capacity information of each machine room; judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room; if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node; and deploying the file indicated by the file deployment instruction to the dispatching equipment node. Therefore, in the invention, the information of all the machine rooms can be obtained from the data server, the target machine room for scheduling is determined, and the nodes are selected from the target machine room for scheduling according to the scheduling scores of all the nodes in the target machine room and the preset score threshold, namely, the scheduling nodes are determined according to the information stored by the data server, communication with the nodes is not needed, and time is not needed to be spent on verifying various information of the nodes, so that the fast scheduling can be carried out, a large number of files can be deployed fast, and the scheduling efficiency is improved.
As shown in fig. 3, fig. 3 is a schematic structural diagram of a scheduling server according to a preferred embodiment of the method for implementing file deployment of device nodes in the present invention. The dispatch server 3 includes a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
Those skilled in the art will appreciate that the schematic diagram shown in fig. 3 is merely an example of the scheduling server 3, and does not constitute a limitation to the scheduling server 3, and may include more or less components than those shown, or combine some components, or different components, for example, the scheduling server 3 may further include an input-output device, a network access device, and the like.
The Network where the scheduling server 3 is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
The at least one Processor 32 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a discrete hardware component, etc. The processor 32 may be a microprocessor or the processor 32 may be any conventional processor, etc., and the processor 32 is a control center of the dispatch server 3 and connects various parts of the entire dispatch server 3 by various interfaces and lines.
The memory 31 may be used to store the computer program 33 and/or the module/unit, and the processor 32 implements various functions of the scheduling server 3 by running or executing the computer program and/or the module/unit stored in the memory 31 and calling data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the scheduling server 3, and the like. In addition, the memory 31 may include a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, and the like.
Referring to fig. 1, the memory 31 in the dispatch server 3 stores a plurality of instructions to implement a file deployment method for a device node, and the processor 32 can execute the plurality of instructions to implement:
when a file deployment instruction is received, acquiring first capacity information of each machine room from a data server, wherein each machine room comprises a plurality of equipment nodes;
determining a target machine room from all machine rooms according to the first capacity information of each machine room;
judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room;
if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node;
and deploying the file indicated by the file deployment instruction to the dispatching equipment node.
In an optional implementation manner, the determining, according to the preset score threshold and the scheduling scores of all the device nodes in the target machine room, whether there is a target device node that meets the scheduling requirement in all the device nodes includes:
counting a first number of equipment nodes of which the scheduling scores are greater than a maximum preset score threshold value in the target machine room aiming at the maximum preset score threshold value in the preset score threshold values;
judging whether the first quantity is greater than or equal to a preset quantity threshold value or not;
if the first number is larger than or equal to a preset number threshold, determining that target equipment nodes meeting scheduling requirements exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are larger than the maximum preset score threshold in the target machine room.
In an alternative embodiment, the processor 32 may execute the plurality of instructions to implement:
if the first number is smaller than a preset number threshold, extracting a first preset score threshold except the maximum preset score threshold according to the arrangement sequence of the preset score thresholds from large to small;
counting a second number of the equipment nodes of which the scheduling scores are larger than the first preset score threshold value in the target machine room;
judging whether the second quantity is greater than or equal to the preset quantity threshold value;
if the second number is greater than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirement exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are greater than the first preset score threshold in the target machine room.
In an alternative embodiment, the processor 32 may execute the plurality of instructions to:
for each machine room, acquiring node information of each equipment node in the machine room at preset time intervals;
determining a plurality of weighted values of the equipment nodes according to the node information;
calculating a scheduling score of the device node according to the plurality of weight values;
storing the scheduling score to the data server.
In an alternative embodiment, the processor 32 may execute the plurality of instructions to implement:
for each machine room, acquiring second capacity information of each equipment node in the machine room at intervals of the preset time interval;
counting the second capacity information of all equipment nodes in the machine room to obtain first capacity information of the machine room;
storing the first capacity information to the data server.
In an optional implementation manner, the first capacity information includes total capacity of space and used space capacity, and the determining, according to the first capacity information of each machine room, a target machine room from all machine rooms includes:
determining the available space capacity of each machine room according to the total space capacity and the used space capacity;
judging whether the computer room disaster tolerance is needed or not according to the configuration file;
and if the disaster tolerance of the machine rooms is not needed, determining the machine room with the maximum available space capacity as a target machine room from all the machine rooms.
In an alternative embodiment, the processor 32 may execute the plurality of instructions to implement:
if the machine room disaster recovery is needed, sorting all the machine rooms according to the sequence of the available space capacity from large to small;
and determining two machine rooms in the front of the sequence as target machine rooms according to the sequence of the sequenced all machine rooms.
Specifically, the processor 32 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the scheduling server 3 depicted in fig. 3, when receiving a file deployment instruction, first capacity information of all machine rooms may be obtained from a data server, where each machine room includes a plurality of device nodes; determining a target machine room from all machine rooms according to the first capacity information of each machine room; judging whether target equipment nodes meeting the scheduling requirement exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room; if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node; and deploying the file indicated by the file deployment instruction to the dispatching equipment node. Therefore, the information of all machine rooms can be obtained from the data server, the target machine room for scheduling is determined, the nodes are selected from the target machine room for scheduling according to the scheduling scores of all the nodes in the target machine room and the preset score threshold, namely the scheduling nodes are determined according to the information stored by the data server, communication with the nodes is not needed, time is not needed for verifying various information of the nodes, and therefore fast scheduling can be achieved, a large number of files can be deployed fast, and scheduling efficiency is improved.
The modules/units integrated by the dispatch server 3 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not to denote any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (9)

1. A file deployment method of a device node is applied to a scheduling server, and is characterized by comprising the following steps:
for each machine room, acquiring node information of each equipment node in the machine room at preset time intervals;
determining a plurality of weight values of the equipment nodes according to the node information, wherein for the equipment node with the node type of a server, the weight value of the equipment node on the node load is determined according to the ratio of the load of the equipment node to the number of CPU cores, or for the equipment node with the node type of intelligent hardware equipment, the weight value of the equipment node on the node load is determined according to the size relation between the load of the equipment node and a preset numerical value;
calculating a scheduling score of the device node according to the plurality of weight values;
storing the scheduling score to the data server;
when a file deployment instruction is received, acquiring first capacity information of each machine room from a data server, wherein each machine room comprises a plurality of equipment nodes;
determining a target machine room from all machine rooms according to the first capacity information of each machine room;
judging whether target equipment nodes meeting the scheduling requirements exist in all the equipment nodes or not according to a preset score threshold and the scheduling scores of all the equipment nodes in the target machine room;
if the target equipment node meeting the scheduling requirement exists in all the equipment nodes, determining a scheduling equipment node from the target equipment node;
and deploying the file indicated by the file deployment instruction to the dispatching equipment node.
2. The method according to claim 1, wherein there are a plurality of preset score thresholds, the preset score thresholds are sorted from large to small, and the determining whether there is a target device node that meets the scheduling requirement in all the device nodes according to the preset score thresholds and the scheduling scores of all the device nodes in the target machine room comprises:
counting a first number of equipment nodes of which the scheduling scores are greater than a maximum preset score threshold value in the target machine room aiming at the maximum preset score threshold value in the preset score threshold values;
judging whether the first number is greater than or equal to a preset number threshold value;
and if the first number is greater than or equal to a preset number threshold, determining that target equipment nodes meeting scheduling requirements exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are greater than the maximum preset score threshold in the target machine room.
3. The method of claim 2, further comprising:
if the first number is smaller than a preset number threshold, extracting a first preset score threshold except the maximum preset score threshold according to the arrangement sequence of the preset score thresholds from large to small;
counting a second number of equipment nodes of which the scheduling scores are larger than the first preset score threshold value in the target machine room;
judging whether the second quantity is greater than or equal to the preset quantity threshold value or not;
if the second number is greater than or equal to the preset number threshold, determining that target equipment nodes meeting the scheduling requirement exist in all the equipment nodes, wherein the target equipment nodes are the equipment nodes of which the scheduling scores are greater than the first preset score threshold in the target machine room.
4. The method of claim 1, further comprising:
for each machine room, acquiring second capacity information of each equipment node in the machine room at intervals of the preset time interval;
counting the second capacity information of all equipment nodes in the machine room to obtain first capacity information of the machine room;
storing the first capacity information to the data server.
5. The method according to any of claims 1-4, wherein the first capacity information comprises total capacity of space and used space capacity, and the determining a target room from all rooms according to the first capacity information of each room comprises:
determining the available space capacity of each machine room according to the total space capacity and the used space capacity;
judging whether the computer room disaster recovery is needed or not according to the configuration file;
and if the disaster tolerance of the machine rooms is not needed, determining the machine room with the maximum available space capacity as a target machine room from all the machine rooms.
6. The method of claim 5, further comprising:
if the machine room disaster recovery is needed, sorting all the machine rooms according to the sequence of the available space capacity from large to small;
and determining two machine rooms in the front of the sequence as target machine rooms according to the sequence of the sequenced all machine rooms.
7. A file deployment apparatus of a device node, the file deployment apparatus of the device node comprising:
the acquisition module is used for acquiring node information of each equipment node in the machine room at preset time intervals for each machine room;
the determining module is used for determining a plurality of weight values of the equipment nodes according to the node information, wherein for the equipment node with the node type of a server, the weight values of the equipment nodes on the node load are determined according to the ratio of the load of the equipment nodes to the number of CPU cores, or for the equipment node with the node type of intelligent hardware equipment, the weight values of the equipment nodes on the node load are determined according to the size relation between the load of the equipment nodes and a preset numerical value;
a calculating module, configured to calculate a scheduling score of the device node according to the plurality of weight values;
a storage module for storing the scheduling score to the data server;
the obtaining module is further configured to obtain first capacity information of each machine room from a data server when a file deployment instruction is received, where each machine room includes a plurality of device nodes;
the determining module is further configured to determine a target machine room from all the machine rooms according to the first capacity information of each machine room;
the judging module is used for judging whether target equipment nodes meeting the scheduling requirements exist in all the equipment nodes or not according to a preset score threshold value and the scheduling scores of all the equipment nodes in the target machine room;
the determining module is further configured to determine a scheduling device node from the target device nodes if the target device node satisfying the scheduling requirement exists in all the device nodes;
and the deployment module is used for deploying the file indicated by the file deployment instruction to the scheduling equipment node.
8. A scheduling server, characterized in that the scheduling server comprises a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the file deployment method of the device node according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that it stores at least one instruction which, when executed by a processor, implements a file deployment method for a device node according to any one of claims 1 to 6.
CN201910913993.4A 2019-09-25 2019-09-25 File deployment method and device for equipment nodes, scheduling server and storage medium Active CN110708369B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910913993.4A CN110708369B (en) 2019-09-25 2019-09-25 File deployment method and device for equipment nodes, scheduling server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910913993.4A CN110708369B (en) 2019-09-25 2019-09-25 File deployment method and device for equipment nodes, scheduling server and storage medium

Publications (2)

Publication Number Publication Date
CN110708369A CN110708369A (en) 2020-01-17
CN110708369B true CN110708369B (en) 2022-09-16

Family

ID=69197152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910913993.4A Active CN110708369B (en) 2019-09-25 2019-09-25 File deployment method and device for equipment nodes, scheduling server and storage medium

Country Status (1)

Country Link
CN (1) CN110708369B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432247B (en) * 2020-03-19 2022-10-18 平安科技(深圳)有限公司 Traffic scheduling method, traffic scheduling device, server and storage medium
CN111459641B (en) * 2020-04-08 2023-04-28 广州欢聊网络科技有限公司 Method and device for task scheduling and task processing across machine room
CN117742931A (en) * 2022-09-15 2024-03-22 华为云计算技术有限公司 Method and device for determining big data cluster deployment scheme, clusters and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647092A (en) * 2018-05-08 2018-10-12 深圳市零度智控科技有限公司 Cloud storage method, cloud platform and computer readable storage medium
CN109981697A (en) * 2017-12-27 2019-07-05 深圳市优必选科技有限公司 A kind of file dump method, system, server and storage medium
CN110149395A (en) * 2019-05-20 2019-08-20 华南理工大学 One kind is based on dynamic load balancing method in the case of mass small documents high concurrent

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2766731C (en) * 2011-02-03 2019-12-03 Afore Solutions Inc. Method and system for cloud based storage
CN103929454B (en) * 2013-01-15 2017-06-20 中国移动通信集团四川有限公司 The method and system of load balancing storage in a kind of cloud computing platform
CN103281374B (en) * 2013-05-30 2015-12-09 成都信息工程学院 A kind of method of data fast dispatch during cloud stores
CN103825837B (en) * 2014-02-19 2017-06-06 上海视云网络科技有限公司 A kind of method of the Distributed C DN overall schedulings of node load
CN104320487B (en) * 2014-11-11 2018-03-20 网宿科技股份有限公司 The HTTP scheduling system and method for content distributing network
CN105162878B (en) * 2015-09-24 2018-08-31 网宿科技股份有限公司 Document distribution system based on distributed storage and method
CN109542613A (en) * 2017-09-22 2019-03-29 中兴通讯股份有限公司 Distribution method, device and the storage medium of service dispatch in a kind of CDN node
CN110035306A (en) * 2019-04-23 2019-07-19 深圳市网心科技有限公司 Dispositions method and device, the dispatching method and device of file
CN110221915B (en) * 2019-05-21 2020-11-10 新华三大数据技术有限公司 Node scheduling method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981697A (en) * 2017-12-27 2019-07-05 深圳市优必选科技有限公司 A kind of file dump method, system, server and storage medium
CN108647092A (en) * 2018-05-08 2018-10-12 深圳市零度智控科技有限公司 Cloud storage method, cloud platform and computer readable storage medium
CN110149395A (en) * 2019-05-20 2019-08-20 华南理工大学 One kind is based on dynamic load balancing method in the case of mass small documents high concurrent

Also Published As

Publication number Publication date
CN110708369A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110708369B (en) File deployment method and device for equipment nodes, scheduling server and storage medium
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN108804039B (en) Adaptive data recovery flow control method and device, electronic equipment and storage medium
WO2017166643A1 (en) Method and device for quantifying task resources
CN110321226A (en) Automatic scalable appearance method, apparatus, host and the storage medium of host
US9588813B1 (en) Determining cost of service call
US20170185454A1 (en) Method and Electronic Device for Determining Resource Consumption of Task
CN108574645B (en) Queue scheduling method and device
CN114416352A (en) Computing resource allocation method and device, electronic equipment and storage medium
CN109522115A (en) Resource allocation method, electronic equipment and storage medium
CN112764920A (en) Edge application deployment method, device, equipment and storage medium
CN106339802A (en) Task allocation method, task allocation device and electronic equipment
CN104580194A (en) Virtual resource management method and device oriented to video applications
CN110704382B (en) File deployment method, device, server and storage medium
CN113347238A (en) Message partitioning method, system, device and storage medium based on block chain
CN110995856B (en) Method, device and equipment for server expansion and storage medium
CN110764705B (en) Data reading and writing method, device, equipment and storage medium
CN103414756A (en) Task distributing method and distributing node and system
CN107426012A (en) A kind of fault recovery method and its device based on super fusion architecture
CN110309328B (en) Data storage method and device, electronic equipment and storage medium
CN108762786A (en) A kind of firmware update of server cabinet, server cabinet and host
CN113377430B (en) Configuration system of industrial plug-in
CN112988383A (en) Resource allocation method, device, equipment and storage medium
WO2017028744A1 (en) Method and device for determining to-be-deployed resources
CN112073327A (en) Anti-congestion software distribution method, device and storage medium

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
GR01 Patent grant
GR01 Patent grant