Method, system and device for controlling capacity expansion and shrinkage of equipment and storage medium

By obtaining equipment information and status and dynamically scheduling equipment, the problem that drilling ship equipment cannot expand and scale in time is solved, and the resource utilization rate and real-time performance of expansion and scale operation is improved.

CN119938151AActive Publication Date: 2025-05-06GUANGZHOU MARINE GEOLOGICAL SURVEY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411827070.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-05-06
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

The prior art cannot achieve timely expansion and shrinking of drilling ship equipment, resulting in low resource utilization.

Method used

By obtaining the CPU usage and memory usage information of the device, determining the status of the device and task, and dynamically scheduling the device according to the expansion and scaling strategy, real-time scaling of the device is achieved.

Benefits of technology

It improves the utilization rate of equipment resources and realizes real-time and efficient equipment expansion and capacity operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938151A_ABST
    Figure CN119938151A_ABST
Patent Text Reader

Abstract

The invention discloses a control method, system and device for capacity expansion and shrinkage of equipment and a storage medium. The method comprises the following steps: acquiring first information of each device; determining a first state of each device; determining a second state of each task; if the first task of which the second state is to be scheduled and the first device set of which the first state is idle exist, scheduling the first device to execute the first task according to a capacity expansion strategy, and updating the state of the first task to be in scheduling and updating the state of the first device to be in capacity expansion; or, if the second equipment set with the first state being in work exists, performing capacity reduction operation on the second equipment according to a capacity reduction strategy, updating the state of the second task to be waiting for scheduling, and updating the state of the second equipment to be in capacity reduction; and if the second equipment completes the capacity reduction operation, updating the state of the second equipment to be idle. According to the embodiment of the invention, the real-time performance of capacity expansion and shrinkage operation can be realized, and the resource utilization rate is improved; the device can be widely applied to the technical field of capacity expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of capacity expansion and contraction technology, and in particular to a method, system, device and storage medium for controlling capacity expansion and contraction of equipment. Background Art

[0002] During the normal operation of a drilling ship, a large number of professional equipment such as sensor equipment, camera equipment, infrared equipment, etc. are usually required to participate in the work. These devices usually have certain storage and computing capabilities, and are distributed in large numbers in different operating areas. For example, a large number of equipment are installed in drilling racks, workbenches, etc. There are extreme conditions such as typhoons and waves in offshore operations. Equipment is generally more easily damaged than on land and has a shorter life cycle; therefore, the equipment on drilling ships is usually designed with redundancy. In daily work, it is necessary to expand and shrink the equipment to ensure the orderly development of work and maximize the utilization of resources. In related technologies, it mainly relies on manual observation of the equipment operation status, and then manually dispatches drilling equipment (such as sensors, cameras, etc.). It is impossible to evaluate the performance of the equipment and achieve timely expansion and contraction; resulting in low resource utilization. Summary of the invention

[0003] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0004] To this end, an object of the present invention is to provide a fast and practical control method, system, device and storage medium for equipment expansion and contraction.

[0005] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

[0006] On the one hand, an embodiment of the present invention provides a method for controlling device expansion and contraction, comprising the following steps:

[0007] A method for controlling device expansion and contraction in an embodiment of the present invention, the method comprising: obtaining first information of each device; the first information comprising CPU usage and memory usage; determining a first state of each device; the first state comprising working, idle, offline, expanding and shrinking; determining a second state of each task; the second state comprising waiting for scheduling, scheduling, executing and completed; if there is a first task waiting for scheduling in the second state, and there is a first device set in the idle state, scheduling the first device to execute the first task according to the expansion strategy, and updating the state of the first task to being scheduled, and updating the state of the first device to being expanded; the first device set comprises the first Device, the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to characterize a device in an idle state; or, if there is a second device set whose first state is working, the second device is scaled down according to the reduction strategy, and the state of the second task is updated to wait for scheduling, and the state of the second device is updated to shrinking; if the second device completes the shrinking operation, the state of the second device is updated to idle; the second device set includes the second device, and the second task is a task scheduled to the second device, and the reduction strategy is used to characterize whether to perform a reduction operation on the second device according to the first information of the second device. The embodiment of the present application improves the accuracy of the evaluation by determining the device information, device status and task status, and evaluating the device and task according to the real-time information; and performs expansion and contraction scheduling according to the device information, so as to realize the real-time performance of the expansion and contraction operation and improve the resource utilization.

[0008] In addition, the device expansion and contraction control method according to the above embodiment of the present invention may also have the following additional technical features:

[0009] Furthermore, in the device expansion and contraction control method of the embodiment of the present invention, the step of scheduling the first device to perform the first task according to the expansion strategy includes:

[0010] Acquire first information of each first device in the first device set;

[0011] Determining a weight of each of the first devices according to the first information;

[0012] The devices are sorted in order of the weights from large to small or from small to large, and a first device ranked first is determined as the first device to be expanded.

[0013] Further, in one embodiment of the present invention, the first information of the first device includes a first CPU usage rate and a first memory usage rate; the method determines the first weight of the first device by the following steps:

[0014] A first probability is determined by taking a first value as a base and a second value as an exponent; wherein the second value is related to the first CPU usage rate;

[0015] Determine a second probability by taking the first value as a base and a third value as an exponent; the third value is related to the first memory usage rate;

[0016] The first probability and the second probability are averaged to determine a first weight.

[0017] Furthermore, in one embodiment of the present invention, the method further comprises the following steps:

[0018] Get the first timestamp of the last expansion or reduction;

[0019] If the time between the current moment and the first timestamp is less than the first threshold, the expansion or reduction operation is not performed.

[0020] Furthermore, in one embodiment of the present invention, the method further comprises:

[0021] If the second task is completed, the status of the second device is updated to idle, and the status of the second task is updated to completed;

[0022] Alternatively, if the second device completes the boot or restart operation, the status of the second device is updated to idle.

[0023] Furthermore, in one embodiment of the present invention, the method further comprises:

[0024] receiving first information at the current moment sent by the second device, and storing the information in a database;

[0025] Obtain the first information of the previous moment of the second device in the database. If the time between the previous moment and the current moment is greater than a second threshold, update the status of the second device to an offline state, update the status of the task executed by the second device to a waiting scheduling state, and issue a first fault warning information.

[0026] Furthermore, in one embodiment of the present invention, the method further comprises:

[0027] Recording second information of a second device; the second device is used to represent a newly added device, and the second information includes network address information and device address information;

[0028] Receive third information sent by the second device when it is turned on; if the third information is inconsistent with the second information, issue second fault warning information.

[0029] On the other hand, an embodiment of the present invention provides a control system for equipment expansion and contraction, including:

[0030] The first module is used to obtain first information of each device; the first information includes CPU usage and memory usage;

[0031] The second module is used to determine the first state of each device; the first state includes working, idle, offline, expanding and shrinking;

[0032] The third module is used to determine the second status of each task; the second status includes waiting for scheduling, scheduling, executing and completed;

[0033] A fourth module is used for, if there is a first task whose second state is waiting for scheduling and there is a first device set whose first state is idle, scheduling the first device to execute the first task according to the expansion strategy, and updating the state of the first task to being scheduled, and updating the state of the first device to being expanded; the first device set includes the first device, the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to represent a device in an idle state;

[0034] The fifth module is used to, if there is a second device set whose first status is working, perform a scaling-down operation on the second device according to the scaling-down strategy, and update the status of the second task to waiting for scheduling, and update the status of the second device to shrinking; if the second device completes the scaling-down operation, update the status of the second device to idle; the second device set includes the second device, the second task is a task scheduled to the second device, and the scaling-down strategy is used to characterize whether to perform a scaling-down operation on the second device based on the first information of the second device.

[0035] On the other hand, an embodiment of the present invention provides a device for controlling expansion and contraction of equipment, including:

[0036] at least one processor;

[0037] at least one memory for storing at least one program;

[0038] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method for controlling device expansion and contraction.

[0039] On the other hand, an embodiment of the present invention provides a storage medium storing a program executable by a processor, wherein the program executable by the processor is used to implement the above-mentioned method for controlling the expansion and contraction of the device when executed by the processor.

[0040] The control method for expansion and contraction proposed in an embodiment of the present invention includes the following steps: obtaining first information of each device; the first information includes CPU usage and memory usage; determining a first state of each device; the first state includes working, idle, offline, expanding and shrinking; determining a second state of each task; the second state includes waiting for scheduling, scheduling, executing and completed; if there is a first task waiting for scheduling in the second state, and there is a first device set in the idle state, scheduling the first device to execute the first task according to the expansion strategy, and updating the state of the first task to scheduling, and updating the state of the first device to expanding; the first device set includes the first device The expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to characterize a device in an idle state; or, if there is a second device set whose first state is working, the second device is scaled down according to the reduction strategy, and the state of the second task is updated to wait for scheduling, and the state of the second device is updated to shrinking; if the second device completes the shrinking operation, the state of the second device is updated to idle; the second device set includes the second device, and the second task is a task scheduled to the second device, and the reduction strategy is used to characterize whether to perform a reduction operation on the second device according to the first information of the second device. The embodiment of the present application improves the accuracy of the evaluation by determining the device information, device status and task status, and evaluating the device and task according to the real-time information; and performs expansion and contraction scheduling according to the device information, so as to realize the real-time performance of the expansion and contraction operation and improve the resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 A flow chart of an embodiment of a method for controlling equipment expansion and contraction provided by the present invention;

[0043] Figure 2 A flow chart of another embodiment of a method for controlling equipment expansion and contraction provided by the present invention;

[0044] Figure 3 A schematic diagram of a flow chart of an embodiment of a capacity expansion process provided by the present invention;

[0045] Figure 4A schematic diagram of an embodiment of device state switching provided by the present invention;

[0046] Figure 5 A schematic diagram of a flow chart of another embodiment of the capacity expansion process provided by the present invention;

[0047] Figure 6 A schematic diagram of an embodiment of task state switching provided by the present invention;

[0048] Figure 7 A schematic diagram of a flow chart of an embodiment of a state change process provided by the present invention;

[0049] Figure 8 A schematic diagram of a process flow of an embodiment of the capacity reduction process provided by the present invention;

[0050] Fig. 9 A schematic diagram of the structure of an embodiment of a control system for equipment expansion and contraction provided by the present invention;

[0051] Fig.10 A schematic structural diagram of an embodiment of a device for controlling expansion and contraction of equipment provided by the present invention. DETAILED DESCRIPTION

[0052] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0053] A drilling vessel is a vessel specially used for drilling seabed geological structures and is mainly used for marine geological exploration.

[0054] TCP Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. TCP is designed to adapt to a layered protocol hierarchy that supports multi-network applications. Pairs of processes in host computers connected to different but interconnected computer communication networks rely on TCP to provide reliable communication services. TCP assumes that it can obtain simple, possibly unreliable datagram services from lower-level protocols. In principle, TCP should be able to operate on a variety of communication systems from hard-wired connections to packet switching or circuit switching networks.

[0055] UDP Transmission Control Protocol (User Datagram Protocol) is a connectionless transport layer protocol that provides simple, transaction-oriented, unreliable information transmission services.

[0056] MAC address (Media Access Control Address), literally translated as media access control address, each device in the network has a unique network identifier, this address is called MAC address or network card address, written inside the hardware by the network equipment manufacturer when it is produced. MAC address is 48 bits (6 bytes), usually expressed as 12 hexadecimal numbers, with colons separating every 2 hexadecimal numbers, such as 08:00:20:0A:8C:6D is a MAC address. As shown in the figure below, the first 3 bytes represent OUI (Organizationally Unique Identifier), which is the code assigned by the IEEE registration management agency to different manufacturers to distinguish different manufacturers. The last 3 bytes are assigned by the manufacturer.

[0057] Capacity expansion refers to the process of increasing capacity or scale. For the services provided by applications, as user demand increases, existing devices or applications are unable to provide services that meet the expected quality due to high load, so capacity expansion is needed to ensure service quality. Capacity expansion here can be simply understood as adding devices and applications.

[0058] Scaling refers to the process of reducing capacity or scale. For the services provided by applications, as user demand decreases, existing devices or applications have low loads. In order to save resources and reduce energy consumption, it is necessary to improve resource utilization by scaling down. Scaling here can be simply understood as reducing devices and applications.

[0059] Background of expansion and contraction of drilling equipment: During the normal operation of a drilling ship, a large number of professional equipment such as sensors, cameras, infrared equipment, etc. are usually required to participate in the work. These devices usually have certain storage and computing capabilities, and are distributed in large quantities on the operating equipment, such as drilling racks, workbenches, etc. There are a large number of devices installed in places such as drilling racks. The reasons for doing this are: first, to obtain the operation status from multiple angles, and second, to back up each other, that is, if a certain device is suddenly damaged, it will not delay the work of other devices. This is different from land. There are extreme conditions such as typhoons and waves in offshore operations. Equipment is generally more easily damaged than on land, and has a shorter life cycle. At the same time, the intensity of offshore operations is usually very high, and it is not realistic to replace and repair equipment after it breaks down, such as in drilling operations. Therefore, most of them are arranged in advance. A large number of equipment (with redundancy). At the same time, offshore operations are characterized by short-term and high-frequency work, such as working continuously for 1 day after determining the drilling station. Considering that the power supply resources of drilling ships are very scarce and tight, if all equipment (sensors, cameras, infrared equipment, etc.) are involved in each operation, it will consume huge power resources.

[0060] At present, the technical solution mainly relies on manual observation of the equipment operation status, and then manually dispatches the drilling equipment (such as sensors, cameras, etc.). It is impossible to evaluate the equipment performance and timely expand and shrink capacity. Specifically, relying on manual observation of the equipment operation status and then manually dispatching the drilling equipment (such as sensors, cameras, etc.) is inefficient and the level of automation is insufficient. It is impossible to evaluate the performance of the equipment in real time. For example, assuming that the equipment suddenly has an abnormal condition (manifested as high load), the existing practice is to discover it by observing whether the equipment is working normally, but in fact it can be observed earlier with the help of indicators such as CPU usage. It is impossible to expand and shrink capacity in a timely manner. When the equipment has problems, manual active dispatch is required, and it is impossible to actively dispatch before the equipment is abnormal. At the same time, this will lead to an additional waste of a large amount of resources such as electricity, and for ships sailing in the ocean, resources are very scarce.

[0061] It is understandable that the ideal situation is to set a fixed number of devices to participate in the operation according to the needs, but considering the intensity of different operations and the performance of the equipment, it becomes difficult to manually maintain the number of devices. Therefore, a solution that can dynamically evaluate the performance of the equipment is needed to automatically increase or decrease the equipment to ensure the quality of the operation.

[0062] The following describes in detail a method and system for controlling device expansion and contraction according to an embodiment of the present invention with reference to the accompanying drawings. First, a method for controlling device expansion and contraction according to an embodiment of the present invention will be described with reference to the accompanying drawings.

[0063] Reference Figure 1In an embodiment of the present invention, a method for controlling device expansion and contraction is provided. The method for controlling device expansion and contraction in the embodiment of the present invention can be applied to a terminal or a server, or can be software running in a terminal or a server. The terminal can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The method for controlling device expansion and contraction in the embodiment of the present invention mainly includes the following steps:

[0064] S100: Acquire first information of each device; the first information includes CPU usage and memory usage;

[0065] S200: Determine a first state of each device; the first state includes working, idle, offline, expanding, and shrinking;

[0066] S300: Determine the second status of each task; the second status includes waiting for scheduling, scheduling, executing and completed;

[0067] S400: If there is a first task whose second state is waiting for scheduling, and there is a first device set whose first state is idle, schedule the first device to execute the first task according to the expansion strategy, and update the state of the first task to being scheduled, and update the state of the first device to being expanded; the first device set includes the first device, and the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to represent a device in an idle state;

[0068] S500: If there is a second device set whose first status is working, the second device is scaled down according to the scaling-down strategy, and the status of the second task is updated to waiting for scheduling, and the status of the second device is updated to being scaled down; if the second device completes the scaling-down operation, the status of the second device is updated to being idle; the second device set includes the second device, the second task is a task scheduled to the second device, and the scaling-down strategy is used to characterize whether to perform a scaling-down operation on the second device based on the first information of the second device.

[0069] In some possible implementations, reference Figure 2 As shown, the control method provided in the embodiment of the present application is mainly used to achieve the following aspects:

[0070] 1) The drilling equipment actively registers its equipment information with the dispatch server;

[0071] 2) The scheduling server evaluates the performance information of the drilling equipment in real time based on the CPU usage and remaining memory status;

[0072] 3) The scheduling server dynamically expands and shrinks capacity based on task information to ensure that the task is completed as expected.

[0073] Specifically, refer to Figure 2 In the embodiment shown, the process is as follows:

[0074] Step 1: The device registers its device information with the dispatch server. Whenever a new device is added, the dispatch server on board will record the information of the newly added device in the database. The network on board is actually a local area network, which is equipped with a network gateway to control the connection to the Internet. At the same time, the newly added device will be configured with the IP address of the dispatch server when it is started, so the device can confirm the information of the dispatch server. Whenever the device is turned on (eg restart scenario), it will actively register its own information with the dispatch server. The registered information includes its own MAC address, LAN IP address, geographic location information, etc. After receiving the registration request, the dispatch server will check and compare the MAC address with the information in the database. If the information is consistent, it will reply that the registration is successful, otherwise it will notify the operation and maintenance personnel that the device may be misconfigured or faulty.

[0075] Step 2: The scheduling server broadcasts and collects the current operation information of the device. The scheduling server will broadcast to all devices regularly. The broadcast is based on the UDP protocol, mainly to notify the device to actively register information with itself or request the device to reply to the real-time operation information. In order to prevent the active registration request of the device from being ignored due to some extreme situations (the device just crashes during registration). The broadcast frequency is configurable, usually once every 1 minute.

[0076] Step 3: The device actively replies to the broadcast or regularly replies to the current operation information of the device. When the device receives the broadcast information, it will check whether the device is successfully registered. If not, it will actively request the dispatch server to register the device information. In other cases, the device operation information is actively reported, including the average CPU usage in the past 30 seconds and the current memory usage (this can be configured, the default is 30 seconds). After the device is successfully registered, it will actively send the device real-time operation information to the dispatch server using the UDP protocol, and the frequency is once every 1 second (this is configurable). In general, the dispatch server has the real-time operation information of all online devices. The dispatch server can confirm the offline device by comparing the device operation information with the database information. Generally speaking, if the device operation information is not received within 3 minutes (this is configurable), the device will be judged to be suspected of failure. At this time, the operation and maintenance personnel will be actively notified, the offline device will be judged to be offline, and the subtasks assigned to the offline device will be reset to the unscheduled state.

[0077] Step 4: Task start. Whenever an operation is needed at sea, professional technicians will set the task in advance. They only need to set the minimum number of devices minNeedDevice and the maximum number maxNeedDevice that the task occupies. If maxNeedDevice is not set, the default maxNeedDevice = 1.5*minNeedDevice. The start and end time of the task are usually set. For example, if the task requires at least 4 devices (i.e. minNeedDevice = 4), then the default maxNeedDevice = 1.5*minNeedDevice = 6.

[0078] Step 5: Reference Figure 3 , expand the equipment capacity according to the task requirements. After the task is set successfully, when the start time arrives, the scheduling server divides the task into several subtasks according to the task information. Then, the equipment capacity expansion operation is performed according to the subtask's active request.

[0079] Step 6: Notify the capacity expansion and assign devices to perform subtasks. The capacity expansion process will select the best device to perform subtasks based on the real-time operation status.

[0080] Step 7: Reduce equipment capacity according to task requirements. Reduce equipment capacity as needed based on task execution status and real-time equipment operation information.

[0081] Step 8: Notify the device to reduce capacity, stop the current subtask, and stop allocating new subtasks to the device. If the device confirms the reduction, it will actively stop allocating new subtasks and stop the currently executing subtask.

[0082] Step 9: Task completion: When all subtasks are completed, the task is completed.

[0083] Specifically, the embodiment of the present application performs task scheduling according to the status of the device and the task. Figure 4 As shown, the device has a total of 5 states, as follows:

[0084] Offline: When the dispatch server cannot receive information from the device within 3 minutes, it will be considered as offline.

[0085] Idle: The device is in idle state when the initial state, subtask or scaling is completed. At this time, the device will enter standby state and wait for the assigned subtask to wake up.

[0086] Expansion: The state when requesting device expansion. In the embodiment of the present application, only idle devices can perform expansion operations, so that the same device can only perform one task at the same time, ensuring efficient execution of tasks and improving the completeness of task completion.

[0087] Working: The state when the expansion is completed. When the device in this application is working, the expansion scheduling will not be performed. Therefore, the next state of the device in work may be idle or shrinking.

[0088] Scaling: the state when the device is requested to scale down. In the embodiment of the present application, when the scaling down is completed, there is no task running in the device, and at this time, the state of the device is idle.

[0089] The embodiment of the present application performs expansion and contraction according to the status of the equipment and the task. Specifically, for a device in an idle state and a task waiting to be scheduled, the device is scheduled from the idle state to perform the task. Therefore, the scheduling server of the embodiment of the present application evaluates the performance information of the drilling operation equipment in real time based on the CPU usage and the remaining memory status. The scheduling server of the embodiment of the present application dynamically performs expansion and contraction operations according to the task information to ensure that the task is completed as expected. The embodiment of the present application can automatically and efficiently complete the processes from equipment registration to equipment expansion and contraction scheduling, which not only improves the operating efficiency, but also reduces equipment consumption and energy consumption such as electricity.

[0090] Optionally, in one embodiment of the present invention, referring to Figure 5 , scheduling the first device to perform the first task according to the expansion strategy, including:

[0091] Step S410: Acquire first information of each first device in the first device set;

[0092] Step S420: determining a weight of each first device according to the first information;

[0093] Step S430: sorting the devices in descending order or in ascending order according to the weight, and determining that the first device ranked first is the first device to be expanded.

[0094] In some possible implementations, for idle devices, the capacity of the device and the capacity required by the task waiting to be scheduled can be matched to select the appropriate device for task scheduling; task scheduling can also be performed based on the device's previous utilization rate; task scheduling can also be performed based on the length of the device's idle time. Of course, the expansion strategy can be modified according to actual scheduling requirements to meet customer needs.

[0095] Optionally, in one embodiment of the present invention, the first information of the first device includes a first CPU usage rate and a first memory usage rate; the method determines the first weight of the first device by the following steps:

[0096] The first probability is determined by taking the first value as a base and the second value as an exponent; the second value is related to the first CPU usage rate;

[0097] The second probability is determined by taking the first value as a base and the third value as an exponent; the third value is related to the first memory usage rate;

[0098] The first probability and the second probability are averaged to determine a first weight.

[0099] In some possible implementations, the present application embodiment may perform capacity expansion operations through the following steps, specifically:

[0100] Step 21: Check the last capacity expansion and contraction information. For the capacity expansion process, when a device is determined to be expanded, there are two state switches. Each switch needs to do the following:

[0101] Idle-Expanding: The scheduling server updates the device status to expanding in the database, marks the subtask as the scheduling status, saves the parameters required for the subtask execution, data download links and other information in the database, and then sends the expansion instruction to the device to schedule the subtask. The expansion instruction mainly includes: device MAC address, device IP address, subtask information, etc. After receiving the expansion instruction, the device queries the database and then actively downloads the parameters and necessary data for the subtask execution. A series of preparations need to be completed from the issuance to the execution of the subtask, so it takes a certain amount of time for the device to be ready from receiving the instruction. The expanding state refuses to accept new scheduling requests.

[0102] Expansion-Working: When the device is ready, the device status is updated to Working in the database, and then it will switch to the Working state.

[0103] Regarding the scaling-down process, when a device is determined to be scaled down, there are two state switches. Each switch requires the following:

[0104] Working - Scaling: The scheduling server updates the device status in the database to Scaling, and then sends a scaling instruction to the device. The scaling instruction mainly includes: device MAC address, device IP address, subtask information, etc. After receiving the scaling instruction, the device needs to check the completion status of the current subtask, save the current subtask execution information, report to the scheduling server and stop executing the current subtask. The Scaling state refuses to accept new scheduling requests.

[0105] Scaling - Idle: When the device completes processing the current subtask, the device status is updated to Idle in the database, and then it switches to the Idle state.

[0106] In general, if the device is in the state of expanding, it will prepare for expansion. When it is ready, change the database status to working, and then start executing the subtask. If the device is in the state of shrinking, it will prepare for shrinking. When it is ready, change the database status to idle. When the subtask is completed, the device will actively report to the scheduling server, and the scheduling server will mark the subtask as completed in the database, and it will not be scheduled later. When the device receives abnormal information about the execution of the subtask (the device refuses to execute the subtask during the shrinking process, the device loses connection, etc.), the subtask status will be set from being scheduled to being unscheduled. If the device is in the state of expanding or shrinking for more than 10 seconds, the scheduling server will resend the expansion and shrinking instructions to prevent the device from not receiving the expansion and shrinking instructions due to network packet loss.

[0107] Step 22: Get all current resource status information. That is, get the status information of all devices. The status information is divided into two parts: device status information: the status information of each device can be obtained by querying the database; device real-time operation information: real-time operation information obtained through active reporting by the device and broadcasting by the scheduling server, including the average CPU usage rate of 30 seconds and the current memory usage rate (this can be configured, the default is 30 seconds). Through the above information, you can get the number of devices currently in idle state curAvailDeviceNum (i.e. idle state) and the number of devices currently in busy state curBusyDeviceNum (non-idle is busy).

[0108] Step 23: Get the current task execution status information. That is, get the execution information of all subtasks of the current task. This is mainly obtained by querying the database. The execution information includes the status of each subtask and the corresponding assigned device information. For example, Figure 6 , subtask 1 is assigned to device 3 and is in the scheduling state; subtask 2 is assigned to device 4 and is in the executing state, and so on. Of course, the embodiment of the present application can set a visual interface to show the processing process of the task to the staff. At the same time, different color boxes or different color fonts can be set for different task states to distinguish them, so as to improve the customer experience.

[0109] Through the above information, we can get the current number of unscheduled subtasks curLeftSubTaskNum (i.e. unscheduled state), the current number of completed subtasks curFinishSubTaskNum (i.e. completed state), and the current subtask data waiting to be executed or being executed curDoingSubTaskNum (i.e. scheduled or executing state).

[0110] Step 24: Are there any idle devices currently? If the number of devices in the current idle state, curAvailDeviceNum, is 0, it means the number of remaining idle devices is 0. Notify the operation and maintenance personnel that the entire device system is fully loaded, and go to Step 212. Otherwise, go to Step 25.

[0111] Step 25: Is the task completed? If the number of unscheduled subtasks currently, curLeftSubTaskNum, is 0, it means the task is completed. For the first check, notify the person in charge of the task that the task is completed, and go to Step 212. Otherwise, go to Step 26.

[0112] Step 26: Obtain the resource information required for the current task execution. That is, obtain the parameter information of the current task, which is mainly obtained by querying the database. It is mainly the minimum number of devices minNeedDevice and the maximum number of devices maxNeedDevice occupied by the task. Then the current required number of devices curNeedDeviceNum = maxNeedDevice - curDoingSubTaskNum.

[0113] Step 27: Does the number of devices currently in use exceed the maximum number set for the task? If the number of subtasks currently waiting to be executed or being executed, curDoingSubTaskNum, is greater than maxNeedDevice, that is, it exceeds the maximum number of devices, reject the expansion scheduling, and regularly notify the person in charge of the task and the operation and maintenance personnel, and go to Step 212. If curDoingSubTaskNum is greater than minNeedDevice, then choose to expand based on a certain probability: If random(0,1) < MinProb (this can be configured, the default is 0.5), go to Step 212, otherwise go to Step 28. Here, random(0,1) is a random value within [0,1]. The reason for this design is considered as follows: If it is less than minNeedDevice, it means that devices need to be scheduled quickly to meet the minimum requirements of the task; if it exceeds maxNeedDevice, it means that the maximum requirements of the task are met and no new devices will be scheduled additionally; in the remaining cases, choose to schedule according to the probability MinProb. This is done to avoid a single task quickly抢占 all devices.

[0114] Step 28: Traverse all unscheduled subtasks. For all unscheduled subtasks, traverse them one by one and schedule the best devices. If the traversal is completed, go to Step 212. Otherwise, go to Step 29.

[0115] Step 29: Check if the scaling cooling time is satisfied. For the current subtask, assume that the timestamp of the last scaling operation is lastOptStamp, the current time is now, and the minimum scaling interval minOptInterval is 30 (this can be configured, with a default of 30s). If now < lastOptStamp + minOptInterval, that is, the time since the last scaling operation has not exceeded the minimum interval minOptInterval, reject the scheduling and go to Step 28. Otherwise, go to Step 210. Additionally, for the currently executing task, if the number of devices that have been scheduled - the number of devices to be scaled down <= minNeedDevice, directly reject the scaling down and go to Step 28, because the minimum number of devices required for task execution needs to be ensured.

[0116] Reasons for setting the minimum interval here: To avoid frequent scaling scheduling for a single subtask, which may cause system oscillations. Considering that some subtasks may be too complex, or the devices may not be able to support, or the network may cause data not to be ready, etc., the following scenario may occur: In the first round of scheduling, devices are allocated for expansion first. Then, if the devices find that they cannot execute, they will immediately notify the scheduling server to perform a scaling-down operation. Then, the second round of scheduling will repeat the first round, and so on. Therefore, to avoid an infinite loop of "expansion scheduling -> scaling-down scheduling -> expansion scheduling scaling-down scheduling ->......" for devices and subtasks, the minimum scaling interval is set. In summary, the minimum scaling interval minOptInterval is the minimum time interval for a single subtask to perform frequent scaling due to irresistible circumstances.

[0117] Step 210: Select appropriate devices for the task for scheduling.

[0118] Step 211: Request to schedule devices to complete the expansion scheduling operation. Assume that the current subtask is SubTask and the selected device is BestDevice. The optimal device has been selected in Step 210. This step is to prepare for the expansion scheduling, including the following operations:

[0119] Modify the status information of the subtask SubTask: Modify it to "scheduling", and the allocated device is BestDevice;

[0120] Modify the status information of the scheduled device BestDevice: Modify it to "expanding", as well as other task parameter information;

[0121] Send an expansion instruction: Send an expansion instruction to the BestDevice device. Go to Step 28.

[0122] Step 212: This expansion operation is completed, waiting for the next execution. Reaching this step indicates that the current round of expansion operation is completed.

[0123] Steps 21 to 212 belong to the expansion completion process, which is executed cyclically every second. The expansion process is task-oriented, and the reduction process is device-oriented. The two restrict each other and efficiently promote task completion.

[0124] Optionally, in one embodiment of the present invention, the method further comprises:

[0125] Get the first timestamp of the last expansion or reduction;

[0126] If the time between the current moment and the first timestamp is less than the first threshold, the capacity expansion or contraction operation is not performed.

[0127] It is understandable that the first threshold in the embodiment of the present application is the minimum interval minOptInterval in the above expansion operation embodiment. By judging the expansion cooling time, it is decided whether to perform the expansion and contraction operations to protect the security and availability of the system.

[0128] Optionally, in one embodiment of the present invention, referring to Figure 7 As shown, the method also includes:

[0129] Step S510: if the second task is completed, the status of the second device is updated to idle, and the status of the second task is updated to completed;

[0130] Alternatively, step S520: if the second device completes the boot or restart operation, the status of the second device is updated to idle.

[0131] Optionally, in one embodiment of the present invention, the method further comprises:

[0132] receiving first information at the current moment sent by the second device, and storing the information in a database;

[0133] Obtain the first information of the second device at the previous moment in the database. If the time between the previous moment and the current moment is greater than the second threshold, update the status of the second device to an offline state, update the status of the task executed by the second device to a waiting scheduling state, and issue a first fault warning message.

[0134] Optionally, in one embodiment of the present invention, the method further comprises:

[0135] Recording second information of the second device; the second device is used to represent the newly added device, and the second information includes network address information and device address information;

[0136] Receive the third information sent by the second device when it is turned on; if the third information is inconsistent with the second information, issue a second fault warning information.

[0137] Reference Figure 8As shown, the present embodiment of the application performs a capacity reduction operation on the device, which is specifically divided into the following situations:

[0138] Case 1: The device is continuously overloaded: The CPU or memory of the device is continuously overloaded, that is, the performance of the device cannot support the execution of the currently assigned subtasks. If it is found that the CPU usage of the device is continuously overloaded by 120% or more, or the memory usage is continuously overloaded by 100%. That is, the device whose CPU usage in the second device set is greater than the fourth threshold is determined to be the second device; or, the device whose memory usage in the second device set is greater than the fifth threshold is determined to be the second device. Of course, it can also be set that if the duration exceeds MaxDuration1 (this can be configured, the default is 60s), the device is considered to be in a high-load situation.

[0139] Case 2: The device is unable to enter the working state due to environmental anomalies. For example, when the device is in the state of expansion, it is necessary to prepare to download the parameters and necessary resources required for the execution of the subtask. If the network fluctuates or the terminal occurs, the device will be unable to enter the working state for a long time. This is easy to happen when the ship is sailing in severe sea conditions. If it is found that the device is continuously in the state of expansion or reduction, and the duration exceeds 30s, the operation and maintenance personnel will be notified. If the duration exceeds MaxDuration2 (this can be configured, the default is 180s), the node is considered to be suspected of equipment abnormality and cannot be executed. At this time, the device is not waited for and is directly judged as unable to enter the working state.

[0140] Case 3: Device abnormality. That is, the device is abnormal due to severe sea conditions, long-term high-intensity use, or unknown factors, resulting in physical failure. If no response to the device's real-time operation information is received for more than 90 seconds, the device can be determined to be offline. In a 90-second cycle, the device theoretically needs to report real-time operation information to the dispatch server 90 times (once per second). If the latest information is not received for 90 consecutive times, the device is determined to be offline.

[0141] Case 4: The device continues to work with a very low load. If the device is in working state, the CPU usage of the device is lower than CPUMinPercent (this can be configured, the default is 20%), and the memory usage is lower than MemMinPercent (this can be configured, the default is 20%), please note that only when these two conditions are met at the same time, it is allowed to be determined as shrinking. That is, the device with a CPU usage lower than the fourth threshold and a memory usage lower than the fifth threshold in the second device set is determined to be the second device. If it is found that the device CPU usage is lower than CPUMinPercent, and the memory usage is continuously lower than MemMinPercent, if the duration exceeds MaxDuration3 (this can be configured, the default is 60s), the device is considered to be in a continuous low load situation.

[0142] In view of the above situation, the embodiments of the present application take the following measures:

[0143] Case 1: The device is continuously overloaded: Change the status of the assigned subtask to waiting for scheduling, change the device status to shrinking, and notify the device to stop task execution immediately. After shrinking is complete, change the device status to idle, and do not schedule tasks for a period of time.

[0144] Case 2: The device cannot enter the working state due to abnormal environment. Change the status of the assigned subtask to unscheduled, change the device status to shrinking, and notify the device to stop task execution immediately.

[0145] Case 3: Device abnormality. Change the status of the assigned subtask to unscheduled (i.e. waiting for scheduling), change the device status to offline, and notify the device to stop task execution immediately.

[0146] Case 4: The device continues to work with a very low load. Change the status of the assigned subtask to unscheduled, change the device status to shrinking, and notify the device to stop task execution immediately. There may be a problem here: if the subtask division is unreasonable, frequent expansion and shrinking operations may occur everywhere. The minimum expansion and shrinking interval minOptInterval can alleviate this problem to a certain extent. This situation will be notified to the operation and maintenance personnel. After receiving the notification of Case 4, the operation and maintenance personnel may need to manually adjust the task parameters.

[0147] The embodiment of the present application prepares for expansion of the device to be expanded. Specifically, the status of the first task is updated to being scheduled, and the status of the first device is updated to being expanded; the third information required to execute the first task is put into the database, and an expansion instruction is sent to the first device.

[0148] The control method for expansion and contraction proposed in the embodiment of the present invention comprises the following steps: obtaining first information of each device; the first information comprises CPU usage and memory usage; determining a first state of each device; the first state comprises working, idle, offline, expanding and shrinking; determining a second state of each task; the second state comprises waiting for scheduling, scheduling, executing and completed; if there is a first task waiting for scheduling in the second state, and there is a first device set in the idle state, scheduling the first device to execute the first task according to the expansion strategy, and updating the state of the first task to being scheduled, and updating the state of the first device to being expanding; the first device The set includes a first device, and the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to characterize a device in an idle state; or, if there is a second device set whose first state is working, the second device is scaled down according to the reduction strategy, and the state of the second task is updated to wait for scheduling, and the state of the second device is updated to shrinking; if the second device completes the shrinking operation, the state of the second device is updated to idle; the second device set includes the second device, and the second task is a task scheduled to the second device, and the reduction strategy is used to characterize whether to shrink the second device according to the first information of the second device. The embodiment of the present application improves the accuracy of the evaluation by determining the device information, device status and task status, and evaluating the device and task according to the real-time information; and the expansion and contraction scheduling is performed according to the device information, so as to realize the real-time performance of the expansion and contraction operation and improve the resource utilization.

[0149] Secondly, refer to the attached Fig. 9 A control system for equipment expansion and contraction proposed according to an embodiment of the present invention is described.

[0150] Fig. 9 1 is a schematic diagram of the structure of a control system for equipment expansion and contraction according to an embodiment of the present invention. The system specifically includes:

[0151] The first module 910 is used to obtain first information of each device; the first information includes CPU usage and memory usage;

[0152] The second module 920 is used to determine the first state of each device; the first state includes working, idle, offline, expanding and shrinking;

[0153] The third module 930 is used to determine the second status of each task; the second status includes waiting for scheduling, scheduling, executing and completed;

[0154] The fourth module 940 is used for, if there is a first task whose second state is waiting for scheduling, and there is a first device set whose first state is idle, scheduling the first device to execute the first task according to the expansion strategy, and updating the state of the first task to being scheduled, and updating the state of the first device to being expanded; the first device set includes the first device, and the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to represent a device in an idle state;

[0155] The fifth module 950 is used to, if there is a second device set whose first status is working, perform a scaling-down operation on the second device according to the scaling-down strategy, and update the status of the second task to waiting for scheduling, and update the status of the second device to shrinking; if the second device completes the scaling-down operation, update the status of the second device to idle; the second device set includes the second device, the second task is a task scheduled to the second device, and the scaling-down strategy is used to characterize whether to perform a scaling-down operation on the second device based on the first information of the second device.

[0156] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0157] Reference Fig.10 The embodiment of the present invention provides a device for controlling the expansion and contraction of equipment, comprising:

[0158] at least one processor 810;

[0159] At least one memory 820, used to store at least one program;

[0160] When the at least one program is executed by the at least one processor 810, the at least one processor 810 implements the device expansion and contraction control method.

[0161] Similarly, the contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0162] An embodiment of the present invention further provides a computer-readable storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to execute the above-mentioned control method for expanding and contracting the device.

[0163] Similarly, the contents of the above method embodiments are all applicable to the present storage medium embodiments. The functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0164] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0165] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0166] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0167] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable programs for implementing the logical functions, and may be embodied in any computer-readable medium for use by a program execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch and execute a program from a program execution system, device or apparatus), or in conjunction with such program execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by a program execution system, device or apparatus, or in conjunction with such program execution systems, devices or apparatuses.

[0168] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0169] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0170] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0171] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0172] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A method for controlling equipment expansion and contraction, characterized in that: The following steps are involved: Acquire first information of each device; the first information includes CPU usage and memory usage; Determine a first state of each device; the first state includes working, idle, offline, expanding, and shrinking; Determine a second state of each task; the second state includes waiting for scheduling, scheduling, executing and completed; If there is a first task whose second state is waiting for scheduling, and there is a first device set whose first state is idle, schedule the first device to execute the first task according to the expansion strategy, and update the state of the first task to being scheduled, and update the state of the first device to being expanded; the first device set includes the first device, and the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; the first device is used to represent a device in an idle state; Alternatively, if there is a second device set whose first status is working, the second device is scaled down according to the scaling-down strategy, and the status of the second task is updated to waiting for scheduling, and the status of the second device is updated to shrinking; if the second device completes the shrinking operation, the status of the second device is updated to idle; the second device set includes the second device, the second task is a task scheduled to the second device, and the shrinking strategy is used to characterize whether to perform a shrinking operation on the second device based on the first information of the second device.

2. The method for controlling equipment expansion and contraction according to claim 1, characterized in that: The step of scheduling the first device to perform the first task according to the capacity expansion strategy includes: Acquire first information of each first device in the first device set; Determining a weight of each of the first devices according to the first information; The devices are sorted in order of the weights from large to small or from small to large, and a first device ranked first is determined as the first device to be expanded.

3. The method for controlling equipment expansion and contraction according to claim 2, characterized in that: The first information of the first device includes a first CPU usage rate and a first memory usage rate; the method determines a first weight of the first device by the following steps: A first probability is determined by taking a first value as a base and a second value as an exponent; wherein the second value is related to the first CPU usage rate; Determine a second probability by taking the first value as a base and a third value as an exponent; the third value is related to the first memory usage rate; The first probability and the second probability are averaged to determine a first weight.

4. The method for controlling equipment expansion and contraction according to claim 1, characterized in that: The method further comprises the following steps: Get the first timestamp of the last expansion or reduction; If the time between the current moment and the first timestamp is less than the first threshold, the expansion or reduction operation is not performed.

5. The method for controlling equipment expansion and contraction according to claim 1, characterized in that: The method further comprises: If the second task is completed, the status of the second device is updated to idle, and the status of the second task is updated to completed; Alternatively, if the second device completes the boot or restart operation, the status of the second device is updated to idle.

6. The method for controlling equipment expansion and contraction according to claim 1, characterized in that: The method further comprises: receiving first information at the current moment sent by the second device, and storing the information in a database; Obtain the first information of the previous moment of the second device in the database. If the time between the previous moment and the current moment is greater than a second threshold, update the status of the second device to an offline state, update the status of the task executed by the second device to a waiting scheduling state, and issue a first fault warning information.

7. The method for controlling equipment expansion and contraction according to claim 1, characterized in that: The method further comprises: Recording second information of a second device; the second device is used to represent a newly added device, and the second information includes network address information and device address information; Receive third information sent by the second device when it is turned on; if the third information is inconsistent with the second information, issue second fault warning information.

8. A control system for equipment expansion and contraction, characterized in that: include: The first module is used to obtain first information of each device; the first information includes CPU usage and memory usage; The second module is used to determine the first state of each device; the first state includes working, idle, offline, expanding and shrinking; The third module is used to determine the second status of each task; the second status includes waiting for scheduling, scheduling, executing and completed; A fourth module is used for, if there is a first task whose second state is waiting for scheduling and there is a first device set whose first state is idle, scheduling the first device to execute the first task according to the expansion strategy, and updating the state of the first task to being scheduled, and updating the state of the first device to being expanded; the first device set includes the first device, and the expansion strategy includes a strategy for selecting the first device from the first device set according to the first information; The first device is used to represent a device in an idle state; The fifth module is used to, if there is a second device set whose first status is working, perform a scaling-down operation on the second device according to the scaling-down strategy, and update the status of the second task to waiting for scheduling, and update the status of the second device to shrinking; if the second device completes the scaling-down operation, update the status of the second device to idle; the second device set includes the second device, the second task is a task scheduled to the second device, and the scaling-down strategy is used to characterize whether to perform a scaling-down operation on the second device based on the first information of the second device.

9. A control device for equipment expansion and contraction, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the device expansion and contraction control method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the device expansion and contraction control method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Patent Citations

  • Capacity expanding and reducing method and equipment for computer cluster

    CN106470219A

  • Configuring methods and devices of equipment resources, server and storage medium

    CN109412874A

  • Task allocation method and device, task execution method and device, equipment and storage medium

    CN116151528A

  • Increasing resource utilization in cloud computing clusters

    US20240220458A1