Molecular dynamics calculation task allocation method, device, system, equipment and medium

Through dynamic scoring and allocation mechanisms, the problem of low resource utilization in molecular dynamics calculations is solved, and the stability of task execution and calculation efficiency are improved.

CN119149268APending Publication Date: 2024-12-17SHANGHAI SMARTLOGIC TECHNOLOGY LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411309744.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing molecular dynamics calculation preprocessing task allocation methods lack consideration for real-time resource usage, resulting in overloading of computing nodes or idle resources, unable to make full use of all available resources, resulting in unstable task execution and low computational efficiency.

Method used

By detecting the task to be assigned in the task queue, select alternative devices based on the device information table and task information, use preset factor weights to calculate the scores of each alternative device, select the highest-rated device for task allocation, and ensure that Dynamicity of task allocation and resource utilization.

Benefits of technology

It achieves the stability of task execution and improves computing efficiency, avoids task failure or system crash caused by resource conflicts, and makes full use of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149268A_ABST
    Figure CN119149268A_ABST
Patent Text Reader

Abstract

The invention discloses a molecular dynamics calculation task allocation method, device and system, equipment and a medium. The method comprises the steps that when it is detected that a to-be-distributed preprocessing task exists in a task queue, an equipment information table at the current moment is acquired; determining a plurality of alternative devices in the device cluster according to the device information table and the task information of the pre-processing task; according to the equipment information table and preset factor weights, scores of all the alternative equipment are calculated, and according to the scores of all the alternative equipment, target equipment used for executing the pre-processing task is determined; and according to the equipment information table, sending the basic information of the target equipment to a task distribution module, so that the task distribution module distributes the pre-processing task to the target equipment. By adopting the technical scheme, the dynamic task allocation can be implemented according to the real-time resource state of the equipment, so that one piece of equipment only executes one task at the same time, the task execution stability is ensured, and the resource utilization rate and the calculation efficiency are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load balancing, and in particular to a method, device, system, equipment and medium for allocating molecular dynamics computing tasks. Background Art

[0002] In molecular dynamics calculations, pre-processing tasks are crucial links. Pre-processing tasks generally include data preparation, parameter setting, force field calculation, and determination of initialization conditions. These tasks have high demands on computing resources such as CPU (Central Processing Unit), memory, disk space, and I / O (Input / Output) capabilities. Due to the large number of pre-processing tasks in molecular dynamics calculations and the high requirements for computing devices that perform pre-processing tasks, only one pre-processing task can be processed on a computing device at the same time. Therefore, it is necessary to reasonably allocate pre-processing tasks in the device cluster.

[0003] At present, most of the pre-processing task allocation methods for molecular dynamics calculations are relatively simple, generally including static resource allocation strategies, simple dynamic adjustment methods based on load, and priority queue scheduling methods.

[0004] However, relying on static resource allocation strategies, tasks are usually allocated according to pre-set rules or simple resource usage, without considering real-time resource usage, resulting in some computing nodes being overloaded while other node resources are idle; simple load-based dynamic adjustment methods only consider the impact of a single factor, load; priority queue scheduling methods, although effective in handling urgent tasks, lack comprehensive resource utilization optimization and cannot fully utilize all available resources. Summary of the invention

[0005] The present invention provides a molecular dynamics calculation task allocation method, device, system, equipment and medium, which can implement dynamic task allocation according to the real-time resource status of the device, so that one device only executes one task at the same time, ensuring the stability of task execution and effectively improving resource utilization and computing efficiency.

[0006] According to one aspect of the present invention, a method for allocating molecular dynamics calculation tasks is provided, comprising:

[0007] When it is detected that there is a pre-processing task to be assigned in the task queue, the device information table at the current moment is obtained;

[0008] Determine multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task;

[0009] Calculate the score of each candidate device according to the device information table and the preset factor weights, and determine the target device for executing the pre-processing task according to the score of each candidate device;

[0010] According to the device information table, the basic information of the target device is sent to the task distribution module, so that the task distribution module can distribute the pre-processing task to the target device.

[0011] According to another aspect of the present invention, there is provided a pre-processing task execution system, including a central control module, a detection module, an information collection module, a task distribution module and a device cluster;

[0012] The central control module is used to execute the molecular dynamics calculation task allocation method described in any embodiment of the present invention;

[0013] The detection module is used to regularly check the device configuration table maintained by the user, and when a change in the device configuration information in the device configuration table is detected, update the device information table according to the changed device configuration information;

[0014] The information collection module is used to read the device information table at regular intervals, collect device status information and device occupancy information of the corresponding device according to the read basic information of the device, and update the device information table;

[0015] The task distribution module is used to distribute the pre-processing tasks to be assigned in the task queue to the target device according to the basic information of the target device sent by the central control module;

[0016] The device cluster includes multiple devices, and the devices are used to execute the pre-processing tasks sent by the task distribution module.

[0017] According to another aspect of the present invention, there is provided a molecular dynamics calculation task allocation device, comprising:

[0018] The device information table reading unit is used to obtain the device information table at the current moment when detecting that there is a pre-processing task to be assigned in the task queue;

[0019] A candidate device determining unit, configured to determine a plurality of candidate devices in a device cluster according to the device information table and task information of a pre-processing task;

[0020] a target device determination unit, configured to calculate scores of the candidate devices according to the device information table and preset factor weights, and determine a target device for executing the pre-processing task according to the scores of the candidate devices;

[0021] The task distribution unit is used to send the basic information of the target device to the task distribution module according to the device information table, so that the task distribution module can distribute the pre-processing task to the target device.

[0022] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0023] at least one processor; and

[0024] a memory communicatively connected to the at least one processor; wherein,

[0025] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the molecular dynamics calculation task allocation method described in any embodiment of the present invention.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the molecular dynamics calculation task allocation method described in any embodiment of the present invention when executed.

[0027] The technical solution of the embodiment of the present invention obtains the device information table at the current moment when it is detected that there is a pre-processing task to be assigned in the task queue, determines multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task, calculates the score of each candidate device according to the device information table and the preset factor weight, and determines the target device for executing the pre-processing task according to the score of each candidate device, and sends the basic information of the target device to the task distribution module according to the device information table so that the task distribution module can distribute the pre-processing task to the target device. This method can implement dynamic task allocation according to the real-time resource status of the device, so that one device only executes one task at the same time, thereby ensuring the stability of task execution, effectively improving resource utilization and computing efficiency, and avoiding the problem of task execution failure or system crash due to resource conflicts.

[0028] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 is a flowchart of a molecular dynamics calculation task allocation method provided according to Embodiment 1 of the present invention;

[0031] Figure 2 is a flowchart of another molecular dynamics calculation task allocation method provided according to the second embodiment of the present invention;

[0032] Figure 3 is a schematic diagram of the structure of a molecular dynamics calculation task allocation device provided according to Embodiment 3 of the present invention;

[0033] Figure 4 is a structural diagram of a pre-processing task execution system provided according to a fourth embodiment of the present invention;

[0034] Figure 5 is an architecture diagram of a pre-processing task execution system provided according to an embodiment of the present invention;

[0035] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the molecular dynamics calculation task allocation method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] Embodiment 1

[0039] Figure 1 This is a flowchart of a molecular dynamics calculation task allocation method provided in the first embodiment of the present invention. This embodiment can be applied to the situation where the pre-processing tasks in the molecular dynamics calculation are allocated to the resource matching device. The method can be executed by a molecular dynamics calculation task allocation device. The molecular dynamics calculation task allocation device can be implemented in the form of hardware and / or software and can be configured in the central control module of the pre-processing task execution system. Figure 1 As shown, the method includes:

[0040] S110: When it is detected that there is a pre-processing task to be assigned in the task queue, a device information table at the current moment is obtained.

[0041] Optionally, whenever there is a pre-processing task to be assigned, the pre-processing task to be assigned is stored in the task queue. The pre-processing task to be assigned may include a newly generated pre-processing task and a pre-processing task that fails to be executed by the device.

[0042] Optionally, the central control module may perform periodic detection on the task queue, and the detection rules may include: each time a pre-processing task is assigned, the status of the pre-processing tasks in the task queue is detected; and after determining that the task queue is empty, each time a specified time node is reached, the status of the pre-processing tasks in the task queue is detected.

[0043] In an optional example, when the task queue stores pre-processing tasks to be assigned, the central control module assigns each pre-processing task in the task queue in turn until all pre-processing tasks in the task queue are assigned. After determining that the task queue is empty, the central control module checks whether new pre-processing tasks to be assigned are stored in the task queue at specified intervals.

[0044] Optionally, the device information table may be a maintainable linked list. The device information table may include basic information, device status information, and device occupancy information of each device in the device cluster.

[0045] Optionally, the basic information of the device may include information such as the device IP (Internet Protocol) that can execute the pre-processing task, the login account password, and the device characteristic number, but is not limited to the above information.

[0046] Optionally, the basic information in the device information table can be maintained by the detection module of the pre-processing task execution system. The user can manage the devices that can be used to perform pre-processing tasks through the device configuration table maintained by the user. Whenever the detection module detects that the device configuration information in the device configuration information table has changed, it can maintain the device information table according to the change content.

[0047] Optionally, the device status information may include at least the total CPU resources, available CPU resources, CPU load, total memory, available memory, total disk space, remaining disk space, total I / O, remaining I / O, network bandwidth, and system running time, but is not limited to the above device status information. It may also include information such as the number of CPU cores and CPU utilization. The network bandwidth may include the remaining network bandwidth and the maximum network bandwidth.

[0048] Optionally, the device status information can be maintained by the information collection module of the pre-processing task execution system. The information collection module can access each available device in the device information table at the current time point at a specified time point, and collect the device status information of each available device, and maintain the device information table through the collected device status information.

[0049] Optionally, the device occupancy information may be a flag bit of the device occupancy status, and different values ​​of the flag bit may represent different states of the device occupancy information. For example, when the flag bit is 0, it indicates that the device is in an idle state, and when it is 1, it indicates that the device is executing a task.

[0050] Optionally, the equipment occupancy information may be collected and maintained by an information collection module in the pre-processing task execution system, or may be maintained by a task distribution module according to task allocation conditions.

[0051] S120: Determine a plurality of candidate devices in the device cluster according to the device information table and the task information of the pre-processing task.

[0052] Optionally, according to the allocation requirements of pre-processing tasks, a device can only execute one pre-processing task at the same time. At the same time, it is also necessary to ensure that the computing resources of the device can meet the needs of the pre-processing tasks. Therefore, the alternative device can refer to an idle device with sufficient remaining disk space to execute the pre-processing task.

[0053] Optionally, a device cluster may include multiple devices, and the devices in the device cluster are devices that can execute pre-processing tasks.

[0054] Optionally, each idle device currently in an idle state may be determined in the device cluster according to the occupancy information of each device in the device information table.

[0055] Optionally, based on the device status information in the device information table, the remaining disk space of each idle device can be determined, and the disk size required for the pre-processing task can be compared with the remaining disk space of each idle device to determine the alternative device that can be used to execute the pre-processing task currently to be assigned.

[0056] Optionally, the task information of the pre-processing task may include the number and size of files that need to be generated by the pre-processing task, and the product of the number and size of files may be used as the disk size required by the pre-processing task.

[0057] S130: Calculate the score of each candidate device according to the device information table and the preset factor weights, and determine the target device for executing the pre-processing task according to the score of each candidate device.

[0058] Optionally, the factor weights may include CPU weight, memory weight, disk weight, I / O weight, network bandwidth weight, system uptime weight, and system load weight.

[0059] Optionally, after determining the alternative devices, a temporary device information table can be generated based on the device status information of each alternative device in the device information table. The temporary device information table only stores the device status information of each alternative device. After the current pre-processing task to be assigned is completed, the temporary device information table is destroyed, and when the next pre-processing task is assigned, a temporary device information table matching the next pre-processing task is generated.

[0060] Optionally, after the scores are calculated, the candidate device with the highest score may be determined as the target device. When there are multiple candidate devices with the highest scores, one of the devices may be randomly selected as the target device.

[0061] S140. According to the device information table, basic information of the target device is sent to the task distribution module, so that the task distribution module can distribute the pre-processing task to the target device.

[0062] Optionally, after determining the target device, basic information of the target device may be sent to the task distribution module, so that the task distribution module can locate the target device in the device cluster according to the basic information and send the pre-processing task to the target device.

[0063] The technical solution of the embodiment of the present invention obtains the device information table at the current moment when it is detected that there is a pre-processing task to be assigned in the task queue, determines multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task, calculates the score of each candidate device according to the device information table and the preset factor weight, and determines the target device for executing the pre-processing task according to the score of each candidate device, and sends the basic information of the target device to the task distribution module according to the device information table so that the task distribution module can distribute the pre-processing task to the target device. This method can implement dynamic task allocation according to the real-time resource status of the device, so that one device only executes one task at the same time, thereby ensuring the stability of task execution, effectively improving resource utilization and computing efficiency, and avoiding the problem of task execution failure or system crash due to resource conflicts.

[0064] Embodiment 2

[0065] Figure 2 This is a flow chart of a molecular dynamics calculation task allocation method provided in the second embodiment of the present invention. This embodiment specifically describes the molecular dynamics calculation task allocation method based on the above embodiment. Figure 2 As shown, the method includes:

[0066] S210: When it is detected that there is a pre-processing task to be assigned in the task queue, the device information table at the current moment is obtained.

[0067] S220 . Determine a plurality of idle devices in the device cluster according to the device occupancy information of each device in the device information table, and determine the remaining disk space of each idle device according to the device status information of each idle device.

[0068] S230: Determine the disk size required for calculating the pre-processing task according to the task information of the pre-processing task, and determine a plurality of candidate devices according to the disk size and the remaining disk space of each idle device.

[0069] S240: Calculate the score of each candidate device according to the device status information of each candidate device in the device information table and the factor weight, and determine the candidate device with the highest score as the target device.

[0070] Optionally, the device score can be calculated according to the following formula:

[0071] score=wcpu*(cpu_free / cpu_total)+wmem*(mem_free / mem_total)+wdisk*(disk_free / disk_total)-wload*load_avg+wuptime*uptime+wnetwork*(network_free / network_total)+wio*(io_free / io_total);

[0072] Among them, wcpu is the CPU weight, cpu_free is the CPU available amount, cpu_total is the total CPU resources, wmem is the memory weight, mem_free is the memory available amount, mem_total is the total memory, wdisk is the disk weight, disk_free is the remaining disk space, disk_total is the total disk space, wload is the system load weight, load_avg is the CPU load, wuptime is the system running time weight, uptime is the system running time, wnetwork is the network bandwidth weight, network_free is the remaining network bandwidth, network_total is the maximum network bandwidth, wio is the I / O weight, io_free is the I / O remaining amount, and io_total is the I / O total amount.

[0073] S250. According to the device information table, basic information of the target device is sent to the task distribution module, so that the task distribution module can distribute the pre-processing task to the target device.

[0074] The technical solution of the embodiment of the present invention obtains the device information table at the current moment when it is detected that there is a pre-processing task to be assigned in the task queue, determines multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task, calculates the score of each candidate device according to the device information table and the preset factor weight, and determines the target device for executing the pre-processing task according to the score of each candidate device, and sends the basic information of the target device to the task distribution module according to the device information table so that the task distribution module can distribute the pre-processing task to the target device. This method can implement dynamic task allocation according to the real-time resource status of the device, so that one device only executes one task at the same time, thereby ensuring the stability of task execution, effectively improving resource utilization and computing efficiency, and avoiding the problem of task execution failure or system crash due to resource conflicts.

[0075] Embodiment 3

[0076] Figure 3 This is a schematic diagram of the structure of a molecular dynamics calculation task allocation device provided in the third embodiment of the present invention. Figure 3 As shown, the apparatus includes: a device information table reading unit 310 , an alternative device determining unit 320 , a target device determining unit 330 and a task distributing unit 340 .

[0077] The device information table reading unit 310 is used to obtain the device information table at the current moment when it is detected that there is a pre-processing task to be assigned in the task queue.

[0078] The candidate device determining unit 320 is configured to determine a plurality of candidate devices in the device cluster according to the device information table and the task information of the pre-processing task.

[0079] The target device determination unit 330 is used to calculate the score of each candidate device according to the device information table and the preset factor weights, and determine the target device for executing the pre-processing task according to the score of each candidate device.

[0080] The task distribution unit 340 is used to send the basic information of the target device to the task distribution module according to the device information table, so that the task distribution module can distribute the pre-processing task to the target device.

[0081] The technical solution of the embodiment of the present invention obtains the device information table at the current moment when it is detected that there is a pre-processing task to be assigned in the task queue, determines multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task, calculates the score of each candidate device according to the device information table and the preset factor weight, and determines the target device for executing the pre-processing task according to the score of each candidate device, and sends the basic information of the target device to the task distribution module according to the device information table so that the task distribution module can distribute the pre-processing task to the target device. This method can implement dynamic task allocation according to the real-time resource status of the device, so that one device only executes one task at the same time, thereby ensuring the stability of task execution, effectively improving resource utilization and computing efficiency, and avoiding the problem of task execution failure or system crash due to resource conflicts.

[0082] Based on the above embodiments, the device information table includes basic information, device status information and device occupancy information of each device in the device cluster;

[0083] The device status information includes at least the total amount of CPU resources, the available amount of CPU resources, CPU load, the total amount of memory, the available amount of memory, the total disk space, the remaining disk space, the total I / O amount, the remaining I / O amount, the network bandwidth and the system running time.

[0084] Based on the above embodiments, the candidate device determination unit 320 may be specifically configured to:

[0085] Determine a plurality of idle devices in the device cluster according to the device occupancy information of each device in the device information table, and determine the remaining disk space of each idle device according to the device status information of each idle device;

[0086] According to the task information of the pre-processing task, the disk size required for calculating the pre-processing task is determined, and according to the disk size and the remaining disk space of each idle device, a plurality of candidate devices are determined.

[0087] Based on the above embodiments, the factor weights include CPU weight, memory weight, disk weight, I / O weight, network bandwidth weight, system running time weight and system load weight.

[0088] Based on the above embodiments, the target device determination unit 330 may be specifically configured to:

[0089] According to the device status information of each candidate device in the device information table and the factor weight, the score of each candidate device is calculated, and the candidate device with the highest score is determined as the target device.

[0090] The molecular dynamics calculation task allocation device provided in the embodiment of the present invention can execute the molecular dynamics calculation task allocation method provided in any embodiment of the present invention, and has the corresponding functional units and beneficial effects of the execution method.

[0091] Embodiment 4

[0092] Figure 4 This is a schematic diagram of the structure of a pre-processing task execution system provided by the fourth embodiment of the present invention. Figure 4 As shown, the system includes: a central control module 410 , a detection module 420 , an information collection module 430 , a task distribution module 440 and a device cluster 450 .

[0093] The central control module 410 is used to execute the molecular dynamics calculation task allocation method described in the embodiment of the present invention.

[0094] The detection module 420 is used to periodically check the device configuration table maintained by the user, and when a change in the device configuration information in the device configuration table is detected, update the device information table according to the changed device configuration information.

[0095] The information collection module 430 is used to read the device information table at regular intervals, collect device status information and device occupancy information of the corresponding device according to the read basic information of the device, and update the device information table.

[0096] The task distribution module 440 is used to distribute the pre-processing tasks to be assigned in the task queue to the target device according to the basic information of the target device sent by the central control module 410.

[0097] The device cluster 450 includes multiple devices, and the devices are used to execute the pre-processing tasks sent by the task distribution module 440 .

[0098] Optionally, the device in the device cluster 450 is further used to generate a task execution failure message and send it to the task distribution module when it is determined that the target pre-processing task currently executed by the device fails to execute;

[0099] The task distribution module is also used to add the target pre-processing task to the task queue when receiving a task execution failure message of the target pre-processing task sent by the device.

[0100] The advantage of this setting is that it provides an effective retry and allocation mechanism after task execution fails, ensuring the stability of the system and ensuring that the task is finally completed.

[0101] Figure 5 This is an architecture diagram of an optional pre-processing task execution system. Figure 5 As shown, the detection module 420 cyclically reads the configuration table configured by the user, and updates and writes the configuration table into the device information table in real time according to the updated content of the configuration table. The central control module 410 can control the operation of the detection module 420. After the pre-processing task execution system is started for the first time, the central control module 410 can control the detection module 420 to read the configuration table periodically.

[0102] Similarly, the central control module 410 can also control the information collection module 430 to periodically collect information in the pre-processing machine cluster after the pre-processing task execution system is first started. The pre-processing machine cluster can represent the device cluster 450, in which the machines are equivalent to the devices in this application. The information collection module 430 can determine the machines written in the linked list that can be used to execute the pre-processing task by reading the device information table, and read the device status information and device occupancy information of the machines in the pre-processing machine cluster.

[0103] The technical solution of the embodiment of the present invention configures a central control module, a detection module, an information collection module, a task distribution module and a device cluster in the pre-processing task system, and these modules collaboratively allocate pre-processing tasks and process the pre-processing tasks. This can implement dynamic task allocation according to the real-time resource status of the device, so that one device only executes one task at the same time, thereby ensuring the stability of task execution, effectively improving resource utilization and computing efficiency, and avoiding problems such as task execution failure or system crash due to resource conflicts.

[0104] Embodiment 5

[0105] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0106] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0107] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0108] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the molecular dynamics calculation task allocation method described in an embodiment of the present invention. That is:

[0109] When it is detected that there is a pre-processing task to be assigned in the task queue, the device information table at the current moment is obtained;

[0110] Determine multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task;

[0111] Calculate the score of each candidate device according to the device information table and the preset factor weights, and determine the target device for executing the pre-processing task according to the score of each candidate device;

[0112] According to the device information table, the basic information of the target device is sent to the task distribution module, so that the task distribution module can distribute the pre-processing task to the target device.

[0113] In some embodiments, the molecular dynamics calculation task allocation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the molecular dynamics calculation task allocation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the molecular dynamics calculation task allocation method in any other appropriate manner (for example, by means of firmware).

[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0116] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0118] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0119] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A molecular dynamics calculation task allocation method, characterized in that: include: When it is detected that there is a pre-processing task to be assigned in the task queue, the device information table at the current moment is obtained; Determine multiple candidate devices in the device cluster according to the device information table and the task information of the pre-processing task; Calculate the score of each candidate device according to the device information table and the preset factor weights, and determine the target device for executing the pre-processing task according to the score of each candidate device; According to the device information table, the basic information of the target device is sent to the task distribution module, so that the task distribution module can distribute the pre-processing task to the target device.

2. The method according to claim 1, characterized in that The device information table includes basic information, device status information and device occupancy information of each device in the device cluster; Among them, the device status information at least includes the total amount of central processing unit CPU resources, the available amount of CPU resources, CPU load, the total amount of memory, the available amount of memory, the total disk space, the remaining disk space, the total I / O amount, the remaining I / O amount, the network bandwidth and the system running time.

3. The method according to claim 2, characterized in that According to the device information table and the task information of the pre-processing task, multiple candidate devices are determined in the device cluster, including: Determine a plurality of idle devices in the device cluster according to the device occupancy information of each device in the device information table, and determine the remaining disk space of each idle device according to the device status information of each idle device; According to the task information of the pre-processing task, the disk size required for calculating the pre-processing task is determined, and according to the disk size and the remaining disk space of each idle device, a plurality of candidate devices are determined.

4. The method according to claim 3, characterized in that The factor weights include CPU weight, memory weight, disk weight, I / O weight, network bandwidth weight, system running time weight, and system load weight.

5. The method according to claim 4, characterized in that According to the device information table and the preset factor weights, the scores of the candidate devices are calculated respectively, and according to the scores of the candidate devices, the target device for executing the pre-processing task is determined, including: According to the device status information of each candidate device in the device information table and the factor weight, the score of each candidate device is calculated, and the candidate device with the highest score is determined as the target device.

6. A pre-processing task execution system, characterized in that: It includes central control module, detection module, information collection module, task distribution module and equipment cluster; The central control module is used to execute the molecular dynamics calculation task allocation method according to any one of claims 1 to 5; The detection module is used to regularly check the device configuration table maintained by the user, and when a change in the device configuration information in the device configuration table is detected, update the device information table according to the changed device configuration information; The information collection module is used to read the device information table at regular intervals, collect device status information and device occupancy information of the corresponding device according to the read basic information of the device, and update the device information table; The task distribution module is used to distribute the pre-processing tasks to be assigned in the task queue to the target device according to the basic information of the target device sent by the central control module; The device cluster includes multiple devices, and the devices are used to execute the pre-processing tasks sent by the task distribution module.

7. The system according to claim 6, characterized in that The device is also used to generate a task execution failure message and send it to the task distribution module when it is determined that the target pre-processing task currently executed by the device has failed to execute; The task distribution module is also used to add the target pre-processing task to the task queue when receiving a task execution failure message of the target pre-processing task sent by the device.

8. A molecular dynamics calculation task allocation device, characterized in that: include: The device information table reading unit is used to obtain the device information table at the current moment when detecting that there is a pre-processing task to be assigned in the task queue; A candidate device determining unit, configured to determine a plurality of candidate devices in a device cluster according to the device information table and task information of a pre-processing task; a target device determination unit, configured to calculate scores of the candidate devices according to the device information table and preset factor weights, and determine a target device for executing the pre-processing task according to the scores of the candidate devices; The task distribution unit is used to send the basic information of the target device to the task distribution module according to the device information table, so that the task distribution module can distribute the pre-processing task to the target device.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the molecular dynamics calculation task allocation method according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the molecular dynamics calculation task allocation method according to any one of claims 1 to 5 when executed.

Citation Information

Cited By

  • Resource scheduling method, device, equipment, medium and product

    CN120803662A